Skip to content

TextStudio3DContourSampler

ClassTextStudio.ThreeDTextStudio.3D
public sealed class TextStudio3DContourSampler

Allocation-free sampling of the flattened contour's physical distance. The immutable owner is retained, and attributed tangents describe its intended curve. Public loop order remains outer loops first, followed by holes, independently of canonical parent-before-child storage.

TryGetLoopInfo(int, out TextStudio3DContourLoopInfo)

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

Gets the role and arc length of a loop by its public loop index.

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)

Negative/overrun distances wrap. Exact vertices select their outgoing side; an exact perimeter multiple selects the first vertex. Position stays on the actual flattened edge.

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)

Samples a loop by normalized arc length, including its position and directed tangent.

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