BurstTriangulator
v3.8.0
Search Results for

    Show / Hide Table of Contents

    Generic coordinates

    The package supports generic coordinates. Currently, support is provided for float2, double2, Vector2, fp2 and int2.

    By default, the Triangulator class is based on the double2 type. To manually select the desired coordinate type, use the generic version, namely, Triangulator<T2>.

    using var positions = new NativeArray<float2>(..., Allocator.Persistent);
    using var triangulator = new Triangulator<float2>(Allocator.Persistent)
    {
      Input = { Positions = positions },
    };
    
    triangulator.Run();
    

    Triangulator<T2> has the same API (through Extensions), as Triangulator. The only difference is that the input/output types are the same as T2.

    See benchmark for the generic coordinates here.


    feature float2 Vector21 double2 fp22 int23
    delaunay ✔️ ✔️ ✔️ ✔️ ✔️
    constraints ✔️ ✔️ ✔️ ✔️ ✔️
    holes ✔️ ✔️ ✔️ ✔️ 🟡4
    refinement ✔️ ✔️ ✔️ ✔️ ❌
    preprocessors ✔️ ✔️ ✔️ ✔️ 🟡5
    dynamic6 ✔️ ✔️ ✔️ ✔️ ❌
    \(\alpha\)-shape ✔️ ✔️ ✔️ ✔️ ✔️

    1. Via float2 reinterpret.↩

    2. This feature is available through an optional dependency. Users must install com.danielmansson.mathematics.fixedpoint. See how to install it here.↩

    3. Support up to \(\sim 2^{20}\).↩

    4. In the current implementation, holes are fully supported with Settings.AutoHolesAndBoundary. However, manual holes with int2 coordinates may not guarantee that the given hole can be created. An additional extension is planned in the future to support holes with manual floating-point precision for int2.↩

    5. Support for Preprocessor.COM with translation only is available.↩

    6. Available only through UnsafeTriangulator<T> API.↩

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