mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-27 13:38:25 +01:00
170 lines
7.1 KiB
C#
170 lines
7.1 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.Jolt.Generate; do not edit by hand.
|
|
#nullable enable
|
|
|
|
using Brutal.Interop;
|
|
using Brutal.Numerics;
|
|
namespace Brutal.JoltApi
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/ConvexHullBuilder.h#L20">Jolt/Geometry/ConvexHullBuilder.h:20</see>
|
|
/// <br/>
|
|
/// <c>class ConvexHullBuilder : public NonCopyable</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// A convex hull builder that tries to create hulls as accurately as possible. Used for offline processing.
|
|
/// </para>
|
|
/// </remarks>
|
|
[InteropHandle]
|
|
public readonly partial struct ConvexHullBuilder : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/ConvexHullBuilder.h#L96">Jolt/Geometry/ConvexHullBuilder.h:96</see>
|
|
/// <br/>
|
|
/// <c>enum class EResult</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Result enum that indicates how the hull got created
|
|
/// </para>
|
|
/// </remarks>
|
|
public enum EResult : int
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Hull building finished successfully
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/ConvexHullBuilder.h#L98">Jolt/Geometry/ConvexHullBuilder.h:98</see>
|
|
/// <br/>
|
|
/// <c>Success</c>
|
|
/// </para>
|
|
/// </summary>
|
|
Success,
|
|
/// <summary>
|
|
/// <para>
|
|
/// Hull building finished successfully, but the desired accuracy was not reached because the max
|
|
/// vertices limit was reached
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/ConvexHullBuilder.h#L99">Jolt/Geometry/ConvexHullBuilder.h:99</see>
|
|
/// <br/>
|
|
/// <c>MaxVerticesReached</c>
|
|
/// </para>
|
|
/// </summary>
|
|
MaxVerticesReached,
|
|
/// <summary>
|
|
/// <para>
|
|
/// Too few points to create a hull
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/ConvexHullBuilder.h#L100">Jolt/Geometry/ConvexHullBuilder.h:100</see>
|
|
/// <br/>
|
|
/// <c>TooFewPoints</c>
|
|
/// </para>
|
|
/// </summary>
|
|
TooFewPoints,
|
|
/// <summary>
|
|
/// <para>
|
|
/// Too few faces in the created hull (signifies precision errors during building)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/ConvexHullBuilder.h#L101">Jolt/Geometry/ConvexHullBuilder.h:101</see>
|
|
/// <br/>
|
|
/// <c>TooFewFaces</c>
|
|
/// </para>
|
|
/// </summary>
|
|
TooFewFaces,
|
|
/// <summary>
|
|
/// <para>
|
|
/// Degenerate hull detected
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/ConvexHullBuilder.h#L102">Jolt/Geometry/ConvexHullBuilder.h:102</see>
|
|
/// <br/>
|
|
/// <c>Degenerate</c>
|
|
/// </para>
|
|
/// </summary>
|
|
Degenerate,
|
|
}
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/ConvexHullBuilder.h#L260">Jolt/Geometry/ConvexHullBuilder.h:260</see>
|
|
/// <br/>
|
|
/// <c>struct Coplanar</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[StructLayout(LayoutKind.Explicit, Size = 8)]
|
|
public struct Coplanar
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Index in mPositions
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/ConvexHullBuilder.h#L262">Jolt/Geometry/ConvexHullBuilder.h:262</see>
|
|
/// <br/>
|
|
/// <c>int mPositionIdx</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(0)]
|
|
public int mPositionIdx;
|
|
/// <summary>
|
|
/// <para>
|
|
/// Distance to the edge of closest face (should be > 0)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/ConvexHullBuilder.h#L263">Jolt/Geometry/ConvexHullBuilder.h:263</see>
|
|
/// <br/>
|
|
/// <c>float mDistanceSq</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(4)]
|
|
public float mDistanceSq;
|
|
}
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/ConvexHullBuilder.h#L114">Jolt/Geometry/ConvexHullBuilder.h:114</see>
|
|
/// <br/>
|
|
/// <c>int GetNumVerticesUsed() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Returns the amount of vertices that are currently used by the hull
|
|
/// </para>
|
|
/// </remarks>
|
|
public int GetNumVerticesUsed() => Jolt.PInvoke.ConvexHullBuilder_GetNumVerticesUsed(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/ConvexHullBuilder.h#L120">Jolt/Geometry/ConvexHullBuilder.h:120</see>
|
|
/// <br/>
|
|
/// <c>void GetCenterOfMassAndVolume(Vec3 &outCenterOfMass, float &outVolume) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Calculate the center of mass and the volume of the current convex hull
|
|
/// </para>
|
|
/// </remarks>
|
|
public void GetCenterOfMassAndVolume(out float3 centerOfMass, out float volume) => Jolt.PInvoke.ConvexHullBuilder_GetCenterOfMassAndVolume(this, out centerOfMass, out volume);
|
|
public void Dispose() => Jolt.PInvoke.ConvexHullBuilder_Destroy(this);
|
|
}
|
|
}
|