Skip to content

QuadraticBezierExtrusionPathAsset

ClassTextStudio.ThreeDTextStudio.3D
[CreateAssetMenu(fileName = "Quadratic Extrusion Path", menuName = "Text Studio/3D/Geometry/Quadratic Extrusion Path", order = 111)]
public sealed class QuadraticBezierExtrusionPathAsset : ExtrusionPathAsset, IExtrusionPath, IExtrusionPathCacheIdentity, IExtrusionPathFrameProfile

Reusable quadratic extrusion sweep with deterministic content identity. Inspector edits and TextStudio.ThreeD.QuadraticBezierExtrusionPathAsset.Configure(UnityEngine.Vector3%2cUnityEngine.Vector3%2cUnityEngine.Vector3%2cSystem.Int32) advance the serialized revision when sampled output changes.

public void Configure(Vector3 start, Vector3 control, Vector3 end, int sampleCount = 32)

Replaces the renderer-local quadratic path, clamps sampling from four to 128, and refreshes its cache identity.

Parameters

Name Type
start UnityEngine.Vector3
control UnityEngine.Vector3
end UnityEngine.Vector3
sampleCount System.Int32

ConfigureFrame(float, float, Vector2, Vector2)

Section titled “ConfigureFrame(float, float, Vector2, Vector2)”
public void ConfigureFrame(float bankDegrees, float rollDegrees, Vector2 backScale, Vector2 frontScale)

Configures cross-section orientation and scale without changing path points.

Parameters

Name Type
bankDegrees System.Single
rollDegrees System.Single
backScale UnityEngine.Vector2
frontScale UnityEngine.Vector2

Sample(float, out Vector3, out Vector3, out Vector3)

Section titled “Sample(float, out Vector3, out Vector3, out Vector3)”
public override 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).
public override ExtrusionPathFrameSample SampleFrame(float t)

Samples authored rotation and cross-section scale at normalized distance.

Parameters

Name Type
t System.Single

Returns

TextStudio.ThreeD.ExtrusionPathFrameSample

public QuadraticBezierExtrusionPathAsset()

public Vector3 StartPoint { get; }

Returns

UnityEngine.Vector3

public Vector3 ControlPoint { get; }

Returns

UnityEngine.Vector3

public Vector3 EndPoint { get; }

Returns

UnityEngine.Vector3

public float BankDegrees { get; }

Returns

System.Single

public float RollDegrees { get; }

Returns

System.Single

public Vector2 BackScale { get; }

Returns

UnityEngine.Vector2

public Vector2 FrontScale { get; }

Returns

UnityEngine.Vector2

public override 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

public override int SampleCount { get; }

Minimum axial segment count required to represent this path.

Returns

System.Int32

public override int Revision { get; }

Monotonic content revision owned by the path provider.

Returns

System.Int32

public override int CacheIdentity { get; }

Deterministic identity for the current immutable path snapshot.

Returns

System.Int32