Skip to content

TextStudio3DStrokeGraph

ClassTextStudio.ThreeDTextStudio.3D
public sealed class TextStudio3DStrokeGraph

Immutable shared centerline graph for placement and tube generation; contains no Unity object or callback-owned buffer.

public const int CurrentRevision = 1

Returns

System.Int32

CopyFrom(ReadOnlySpan, ReadOnlySpan, ReadOnlySpan, in TextStudio3DStrokeDiagnostics)

Section titled “CopyFrom(ReadOnlySpan, ReadOnlySpan, ReadOnlySpan, in TextStudio3DStrokeDiagnostics)”
public static TextStudio3DStrokeGraph CopyFrom(ReadOnlySpan<TextStudio3DStrokeNode> nodes, ReadOnlySpan<TextStudio3DStrokeEdge> edges, ReadOnlySpan<TextStudio3DStrokePoint> points, in TextStudio3DStrokeDiagnostics diagnostics)

Validates and copies nodes, edges, and points into an immutable stroke graph.

Parameters

Name Type
nodes System.ReadOnlySpan{TextStudio.ThreeD.TextStudio3DStrokeNode}
edges System.ReadOnlySpan{TextStudio.ThreeD.TextStudio3DStrokeEdge}
points System.ReadOnlySpan{TextStudio.ThreeD.TextStudio3DStrokePoint}
diagnostics TextStudio.ThreeD.TextStudio3DStrokeDiagnostics

Returns

TextStudio.ThreeD.TextStudio3DStrokeGraph

public ReadOnlySpan<TextStudio3DStrokePoint> GetEdgePoints(int edgeIndex)

Returns a read-only view of the sampled points owned by one edge.

Parameters

Name Type
edgeIndex System.Int32

Returns

System.ReadOnlySpan{TextStudio.ThreeD.TextStudio3DStrokePoint}

TrySample(int, float, out TextStudio3DStrokePoint)

Section titled “TrySample(int, float, out TextStudio3DStrokePoint)”
public bool TrySample(int edgeIndex, float distance, out TextStudio3DStrokePoint sample)

Samples a stroke edge at a distance clamped to its arc length.

Parameters

Name Type
edgeIndex System.Int32
distance System.Single
sample TextStudio.ThreeD.TextStudio3DStrokePoint

Returns

System.Boolean

public ReadOnlySpan<TextStudio3DStrokeNode> Nodes { get; }

Returns

System.ReadOnlySpan{TextStudio.ThreeD.TextStudio3DStrokeNode}

public ReadOnlySpan<TextStudio3DStrokeEdge> Edges { get; }

Returns

System.ReadOnlySpan{TextStudio.ThreeD.TextStudio3DStrokeEdge}

public ReadOnlySpan<TextStudio3DStrokePoint> Points { get; }

Returns

System.ReadOnlySpan{TextStudio.ThreeD.TextStudio3DStrokePoint}

public TextStudio3DStrokeDiagnostics Diagnostics { get; }

Returns

TextStudio.ThreeD.TextStudio3DStrokeDiagnostics

public ulong Fingerprint { get; }

Returns

System.UInt64

public long RetainedBytes { get; }

Returns

System.Int64

public bool IsEmpty { get; }

Returns

System.Boolean