//
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using System.Runtime.CompilerServices;
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
///
///
/// A convex hull builder specifically made for the EPA penetration depth calculation. It trades accuracy for
/// speed and will simply abort of the hull forms defects due to numerical precision problems.
///
///
/// C++:
/// Jolt/Geometry/EPAConvexHullBuilder.h:24
///
/// class EPAConvexHullBuilder : public NonCopyable
///
///
[InteropHandle]
public readonly partial struct EPAConvexHullBuilder
{
///
///
/// Initialize the hull with 3 points
///
///
/// C++:
/// Jolt/Geometry/EPAConvexHullBuilder.h:234
///
/// void Initialize(int inIdx1, int inIdx2, int inIdx3)
///
///
public void Initialize(int idx1, int idx2, int idx3) =>
Jolt.PInvoke.EPAConvexHullBuilder_Initialize(this, idx1, idx2, idx3);
///
///
/// Check if there's another triangle to process from the queue
///
///
/// C++:
/// Jolt/Geometry/EPAConvexHullBuilder.h:262
///
/// bool HasNextTriangle() const
///
///
public bool HasNextTriangle() => Jolt.PInvoke.EPAConvexHullBuilder_HasNextTriangle(this);
///
///
/// Max triangles in hull
///
///
/// C++:
/// Jolt/Geometry/EPAConvexHullBuilder.h:36
///
/// static constexpr int cMaxTriangles = 256
///
///
///
///
/// Due to the Euler characteristic (https://en.wikipedia.org/wiki/Euler_characteristic) we know that Vertices - Edges + Faces = 2
/// In our case we only have triangles and they are always fully connected, so each edge is shared exactly between 2 faces: Edges = Faces * 3 / 2
/// Substituting: Vertices = Faces / 2 + 2 which is approximately Faces / 2.
///
///
public static int GetMaxTriangles() => Jolt.PInvoke.EPAConvexHullBuilder_GetMaxTriangles();
///
///
/// Max number of points in hull
///
///
/// C++:
/// Jolt/Geometry/EPAConvexHullBuilder.h:37
///
/// static constexpr int cMaxPoints = cMaxTriangles / 2
///
///
public static int GetMaxPoints() => Jolt.PInvoke.EPAConvexHullBuilder_GetMaxPoints();
///
///
/// Max number of edges in FindEdge
///
///
/// C++:
/// Jolt/Geometry/EPAConvexHullBuilder.h:40
///
/// static constexpr int cMaxEdgeLength = 128
///
///
///
///
/// Constants
///
///
public static int GetMaxEdgeLength() => Jolt.PInvoke.EPAConvexHullBuilder_GetMaxEdgeLength();
///
///
/// Minimum area of a triangle before, if smaller than this it will not be added to the priority queue
///
///
/// C++:
/// Jolt/Geometry/EPAConvexHullBuilder.h:41
///
/// static constexpr float cMinTriangleArea = 1.0e-10f
///
///
public static float GetMinTriangleArea() => Jolt.PInvoke.EPAConvexHullBuilder_GetMinTriangleArea();
///
///
/// Epsilon value used to determine if a point is in the interior of a triangle
///
///
/// C++:
/// Jolt/Geometry/EPAConvexHullBuilder.h:42
///
/// static constexpr float cBarycentricEpsilon = 1.0e-3f
///
///
public static float GetBarycentricEpsilon() => Jolt.PInvoke.EPAConvexHullBuilder_GetBarycentricEpsilon();
}
}