Skip to content

TextStudio3DContourUtility

ClassTextStudio.ThreeDTextStudio.3D
public static class TextStudio3DContourUtility

Explicit validation and geometry-preserving construction of authored polygons.

public static TextStudio3DContourValidationReport Validate(TextStudio3DContourSet contour)

Validate canonical topology, permitting endpoint-only contact between distinct outer components with disjoint interiors.

Parameters

Name Type
contour TextStudio.ThreeD.TextStudio3DContourSet

Returns

TextStudio.ThreeD.TextStudio3DContourValidationReport

TryCreateSampler(TextStudio3DContourSet, out TextStudio3DContourSampler)

Section titled “TryCreateSampler(TextStudio3DContourSet, out TextStudio3DContourSampler)”
public static bool TryCreateSampler(TextStudio3DContourSet contour, out TextStudio3DContourSampler sampler)

Creates a validated arc-length sampler with public outer-first, hole-last loop indices.

Parameters

Name Type
contour TextStudio.ThreeD.TextStudio3DContourSet
sampler TextStudio.ThreeD.TextStudio3DContourSampler

Returns

System.Boolean

CreateBacking(TextStudio3DBackingShape, Rect, float, float, int)

Section titled “CreateBacking(TextStudio3DBackingShape, Rect, float, float, int)”
public static TextStudio3DContourSet CreateBacking(TextStudio3DBackingShape shape, Rect bounds, float cornerRadius = 0.1, float borderWidth = 0.05, int cornerSegments = 4)

Builds a validated contour set for a backing shape inside the supplied bounds.

Parameters

Name Type
shape TextStudio.ThreeD.TextStudio3DBackingShape
bounds UnityEngine.Rect
cornerRadius System.Single
borderWidth System.Single
cornerSegments System.Int32

Returns

TextStudio.ThreeD.TextStudio3DContourSet

Union(TextStudio3DContourSet, TextStudio3DContourSet)

Section titled “Union(TextStudio3DContourSet, TextStudio3DContourSet)”
public static TextStudio3DContourSet Union(TextStudio3DContourSet first, TextStudio3DContourSet second)

Combines the filled regions of two contour sets.

Parameters

Name Type
first TextStudio.ThreeD.TextStudio3DContourSet
second TextStudio.ThreeD.TextStudio3DContourSet

Returns

TextStudio.ThreeD.TextStudio3DContourSet

Subtract(TextStudio3DContourSet, TextStudio3DContourSet)

Section titled “Subtract(TextStudio3DContourSet, TextStudio3DContourSet)”
public static TextStudio3DContourSet Subtract(TextStudio3DContourSet subject, TextStudio3DContourSet clip)

Removes the clip region from the subject contour set.

Parameters

Name Type
subject TextStudio.ThreeD.TextStudio3DContourSet
clip TextStudio.ThreeD.TextStudio3DContourSet

Returns

TextStudio.ThreeD.TextStudio3DContourSet

Intersect(TextStudio3DContourSet, TextStudio3DContourSet)

Section titled “Intersect(TextStudio3DContourSet, TextStudio3DContourSet)”
public static TextStudio3DContourSet Intersect(TextStudio3DContourSet first, TextStudio3DContourSet second)

Returns the filled region shared by both contour sets.

Parameters

Name Type
first TextStudio.ThreeD.TextStudio3DContourSet
second TextStudio.ThreeD.TextStudio3DContourSet

Returns

TextStudio.ThreeD.TextStudio3DContourSet

public static TextStudio3DContourSet Clip(TextStudio3DContourSet source, Rect clipBounds)

Clips a contour set to a rectangular region.

Parameters

Name Type
source TextStudio.ThreeD.TextStudio3DContourSet
clipBounds UnityEngine.Rect

Returns

TextStudio.ThreeD.TextStudio3DContourSet