IExtrusionPath
public interface IExtrusionPathAbstraction for a 3D extrusion path used by TextStudio.ThreeD.BodySweep3DMode.Path.
Implementations sample a position + orientation frame at normalised parameter t ∈ [0, 1].
The frame produced by `TextStudio.ThreeD.IExtrusionPath.Sample(System.Single%2cUnityEngine.Vector3%40%2cUnityEngine.Vector3%40%2cUnityEngine.Vector3%40)` is expected to be parallel-transported along the path (minimum-torsion frame) so the glyph's cross-section does not inherit roll from the Frenet normal flipping at inflection points. Implementations that cannot compute a parallel-transport frame should return a Frenet frame and accept occasional flips.
The built-in [TextStudio.ThreeD.LinearExtrusionPath](/tools/text-studio/3d/api/textstudio-threed-linearextrusionpath/) is the identity path and reproduces the original straight-Z extrusion. Assign custom paths through `TextStudio.ThreeD.TextStudio3DText.ExtrusionPath`.
Methods
Section titled “Methods”
Sample(float, out Vector3, out Vector3, out Vector3)
Section titled “Sample(float, out Vector3, out Vector3, out Vector3)”void Sample(float t, out Vector3 position, out Vector3 forward, out Vector3 up)Sample the path at normalised parameter t.
t = 0 corresponds to the back face (z = 0 in Standard mode);
t = 1 corresponds to the front face (z = −depth in Standard mode).
Parameters
| Name | Type | Description |
|---|---|---|
t |
System.Single | Normalised parameter in [0, 1]. |
position |
UnityEngine.Vector3 | Renderer-local position of the sampled frame. |
forward |
UnityEngine.Vector3 | Unit vector pointing along the path (replaces +Z). |
up |
UnityEngine.Vector3 | Unit vector orthogonal to forward (replaces +Y). |
Properties
Section titled “Properties”
ArcLength
Section titled “ArcLength”float ArcLength { get; }Total arc length of the path in local units. Consumed by the generator to scale per-ring Z spacing so body steps are uniform along curved paths. Return 0 for an “infinitely” short path (collapsed to a single point).
Returns
System.Single
SampleCount
Section titled “SampleCount”int SampleCount { get; }Minimum axial segment count required to represent this path.
Returns
System.Int32