From 387cf660f36dd64fa0c0a0b194160e0e939bb665 Mon Sep 17 00:00:00 2001 From: andywiecko Date: Sun, 26 Jan 2025 15:31:37 +0100 Subject: [PATCH] docs: add summaries for helpers --- Runtime/Triangulator.cs | 52 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/Runtime/Triangulator.cs b/Runtime/Triangulator.cs index 44c5f9d..c904b26 100644 --- a/Runtime/Triangulator.cs +++ b/Runtime/Triangulator.cs @@ -42,6 +42,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE namespace andywiecko.BurstTriangulator { + /// + /// An representing the status of triangulation. + /// To check if the triangulation was successful, compare the status with . + /// [Flags] public enum Status { @@ -124,8 +128,14 @@ public enum Status #pragma warning restore IDE0055 } + /// + /// An representing the type of transformation applied to input positions before triangulation. + /// public enum Preprocessor { + /// + /// Identity transformation. + /// None = 0, /// /// Transforms to local coordinate system using center of mass. @@ -137,6 +147,9 @@ public enum Preprocessor PCA } + /// + /// A helper class for setting up refinement thresholds. + /// [Serializable] public class RefinementThresholds { @@ -165,6 +178,9 @@ public class RefinementThresholds public float Angle { get; set; } = math.radians(5); } + /// + /// A helper class for configuring triangulation parameters. + /// [Serializable] public class TriangulationSettings { @@ -268,6 +284,18 @@ public class TriangulationSettings public float ConcentricShellsParameter { get; set; } = 0.001f; } + /// + /// A managed helper class that contains all native buffers for triangulation input. + /// + /// The coordinate type. Supported types include: + /// , + /// , + /// , + /// , + /// and + /// . + /// For more information on type restrictions, refer to the documentation. + /// public class InputData where T2 : unmanaged { /// @@ -315,6 +343,18 @@ public class ManagedInput where T2 : unmanaged }; } + /// + /// A managed helper class that contains all native buffers for triangulation output. + /// + /// The coordinate type. Supported types include: + /// , + /// , + /// , + /// , + /// and + /// . + /// For more information on type restrictions, refer to the documentation. + /// public class OutputData where T2 : unmanaged { /// @@ -353,6 +393,7 @@ public class OutputData where T2 : unmanaged public NativeList IgnoredHalfedgesForPlantingSeeds => owner.ignoredHalfedgesForPlantingSeeds; private readonly Triangulator owner; + /// [Obsolete("This will be converted into internal ctor.")] public OutputData(Triangulator owner) => this.owner = owner; } @@ -416,6 +457,15 @@ public class Triangulator : IDisposable public JobHandle Schedule(JobHandle dependencies = default) => impl.Schedule(dependencies); } + /// The coordinate type. Supported types include: + /// , + /// , + /// , + /// , + /// and + /// . + /// For more information on type restrictions, refer to the documentation. + /// public class Triangulator : IDisposable where T2 : unmanaged { public TriangulationSettings Settings { get; set; } = new(); @@ -613,6 +663,7 @@ namespace andywiecko.BurstTriangulator.LowLevel.Unsafe /// /// Obsolete: use instead. /// + /// [Obsolete("Use " + nameof(NativeInputData) + "<> instead.")] public struct InputData where T2 : unmanaged { @@ -632,6 +683,7 @@ public struct InputData where T2 : unmanaged /// /// Obsolete: use instead. /// + /// [Obsolete("Use " + nameof(NativeOutputData) + "<> instead.")] public struct OutputData where T2 : unmanaged {