Skip to content

TextStudio3DContourSampler

ClassTextStudio.ThreeDTextStudio.3D
public sealed class TextStudio3DContourSampler

Detached, immutable arc-length parameterization of a canonical contour. Outer loops are indexed first, followed by holes. Sampling wraps around each closed loop and allocates no managed memory after construction.

TryGetLoopInfo(int, out TextStudio3DContourLoopInfo)

Section titled “TryGetLoopInfo(int, out TextStudio3DContourLoopInfo)”
public bool TryGetLoopInfo(int loopIndex, out TextStudio3DContourLoopInfo info)

Return immutable metadata for one loop.

Parameters

Name Type
loopIndex System.Int32
info TextStudio.ThreeD.TextStudio3DContourLoopInfo

Returns

System.Boolean

TrySample(int, float, out TextStudio3DContourSample)

Section titled “TrySample(int, float, out TextStudio3DContourSample)”
public bool TrySample(int loopIndex, float distance, out TextStudio3DContourSample sample)

Sample a physical local-space distance along one loop. Negative and overrun distances wrap deterministically; an exact perimeter multiple resolves to the loop’s first point.

Parameters

Name Type
loopIndex System.Int32
distance System.Single
sample TextStudio.ThreeD.TextStudio3DContourSample

Returns

System.Boolean

TrySampleNormalized(int, float, out TextStudio3DContourSample)

Section titled “TrySampleNormalized(int, float, out TextStudio3DContourSample)”
public bool TrySampleNormalized(int loopIndex, float normalizedDistance, out TextStudio3DContourSample sample)

Sample a normalized loop fraction. Fractions wrap with the same policy as distance.

Parameters

Name Type
loopIndex System.Int32
normalizedDistance System.Single
sample TextStudio.ThreeD.TextStudio3DContourSample

Returns

System.Boolean

public int LoopCount { get; }

Returns

System.Int32

public int OuterLoopCount { get; }

Returns

System.Int32

public int InnerLoopCount { get; }

Returns

System.Int32

public float TotalLength { get; }

Returns

System.Single