TextStudio3DContourSampler
public sealed class TextStudio3DContourSamplerDetached, 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.
Methods
Section titled “Methods”
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
Properties
Section titled “Properties”
LoopCount
Section titled “LoopCount”public int LoopCount { get; }Returns
System.Int32
OuterLoopCount
Section titled “OuterLoopCount”public int OuterLoopCount { get; }Returns
System.Int32
InnerLoopCount
Section titled “InnerLoopCount”public int InnerLoopCount { get; }Returns
System.Int32
TotalLength
Section titled “TotalLength”public float TotalLength { get; }Returns
System.Single