BurstTriangulator
v3.8.0
Search Results for

    Show / Hide Table of Contents

    Class Triangulator

    A base class for triangulation, which provides the core functionality for performing triangulation on 2D geometric data. It acts as a wrapper for Triangulator<T2> where T2 is double2.

    Inheritance
    object
    Triangulator
    Implements
    INativeDisposable
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: andywiecko.BurstTriangulator
    Assembly: .dll
    Syntax
    public class Triangulator : INativeDisposable, IDisposable
    Remarks

    The triangulation process can be configured using the parameters available in Settings. Provide the input data via Input, and then execute the triangulation using Run() or Schedule(JobHandle). The triangulation results will be available in Output. Ensure you call Dispose() on the object after use to release resources. Example usage:

    using var positions = new NativeArray<double2>(new[]
    {
        new (0, 0), new (1, 0), new (1, 1), new (0, 1)
    }, Allocator.Persistent);
    using var triangulator = new Triangulator(Allocator.Persistent)
    {
        Input = { Positions = positions },
        Settings = { ValidateInput = false },
    };
    
    triangulator.Run();
    
    var triangles = triangulator.Output.Triangles;

    For advanced customization of the triangulation process, refer to UnsafeTriangulator<T2>.

    Constructors

    Name Description
    Triangulator(int, Allocator)

    Initializes a new instance of the Triangulator class with the specified capacity and memory allocator.

    Triangulator(Allocator)

    Initializes a new instance of the Triangulator class with the default capacity (16×1024) and specified memory allocator.

    Properties

    Name Description
    Input

    Input data used for triangulation.

    Output

    Output data resulting from the triangulation process.

    Settings

    Settings used for triangulation.

    Methods

    Name Description
    Dispose()

    Releases all resources (memory and safety handles).

    Dispose(JobHandle)

    Creates and schedules a job that releases all resources (memory and safety handles).

    Run()

    Perform the job's Execute method immediately on the same thread.

    Schedule(JobHandle)

    Schedule the job for execution on a worker thread.

    See Also

    Triangulator<T2>
    UnsafeTriangulator<T2>
    In this article
    Back to top Generated by DocFX | Documentation © 2024 by Andrzej Więckowski is licensed under CC BY 4.0