This commit is contained in:
Rian Drake 2026-10-15 14:09:11 +13:00
commit b578433e37
33 changed files with 784842 additions and 0 deletions

View file

@ -0,0 +1,182 @@
// <auto-generated/>
// 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
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/AABBTree/AABBTreeBuilder.h#L13">Jolt/AABBTree/AABBTreeBuilder.h:13</see>
/// <br/>
/// <c>struct AABBTreeBuilderStats</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 56)]
public partial struct AABBTreeBuilderStats
{
/// <summary>
/// <para>
/// Stats returned by the triangle splitter algorithm
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/AABBTree/AABBTreeBuilder.h#L16">Jolt/AABBTree/AABBTreeBuilder.h:16</see>
/// <br/>
/// <c>TriangleSplitter::Stats mSplitterStats</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// @name Splitter stats
/// </para>
/// </remarks>
[FieldOffset(0)]
public TriangleSplitter.Stats SplitterStats;
/// <summary>
/// <para>
/// Surface Area Heuristic cost of this tree
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/AABBTree/AABBTreeBuilder.h#L19">Jolt/AABBTree/AABBTreeBuilder.h:19</see>
/// <br/>
/// <c>float mSAHCost = 0.0f</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// @name Tree structure
/// </para>
/// </remarks>
[FieldOffset(16)]
public float SAHCost;
/// <summary>
/// <para>
/// Minimal depth of tree (number of nodes)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/AABBTree/AABBTreeBuilder.h#L20">Jolt/AABBTree/AABBTreeBuilder.h:20</see>
/// <br/>
/// <c>int mMinDepth = 0</c>
/// </para>
/// </summary>
[FieldOffset(20)]
public int MinDepth;
/// <summary>
/// <para>
/// Maximum depth of tree (number of nodes)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/AABBTree/AABBTreeBuilder.h#L21">Jolt/AABBTree/AABBTreeBuilder.h:21</see>
/// <br/>
/// <c>int mMaxDepth = 0</c>
/// </para>
/// </summary>
[FieldOffset(24)]
public int MaxDepth;
/// <summary>
/// <para>
/// Number of nodes in the tree
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/AABBTree/AABBTreeBuilder.h#L22">Jolt/AABBTree/AABBTreeBuilder.h:22</see>
/// <br/>
/// <c>int mNodeCount = 0</c>
/// </para>
/// </summary>
[FieldOffset(28)]
public int NodeCount;
/// <summary>
/// <para>
/// Number of leaf nodes (that contain triangles)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/AABBTree/AABBTreeBuilder.h#L23">Jolt/AABBTree/AABBTreeBuilder.h:23</see>
/// <br/>
/// <c>int mLeafNodeCount = 0</c>
/// </para>
/// </summary>
[FieldOffset(32)]
public int LeafNodeCount;
/// <summary>
/// <para>
/// Configured max triangles per leaf
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/AABBTree/AABBTreeBuilder.h#L26">Jolt/AABBTree/AABBTreeBuilder.h:26</see>
/// <br/>
/// <c>int mMaxTrianglesPerLeaf = 0</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// @name Configured stats
/// </para>
/// </remarks>
[FieldOffset(36)]
public int MaxTrianglesPerLeaf;
/// <summary>
/// <para>
/// Minimal amount of triangles in a leaf
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/AABBTree/AABBTreeBuilder.h#L29">Jolt/AABBTree/AABBTreeBuilder.h:29</see>
/// <br/>
/// <c>int mTreeMinTrianglesPerLeaf = 0</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// @name Actual stats
/// </para>
/// </remarks>
[FieldOffset(40)]
public int TreeMinTrianglesPerLeaf;
/// <summary>
/// <para>
/// Maximal amount of triangles in a leaf
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/AABBTree/AABBTreeBuilder.h#L30">Jolt/AABBTree/AABBTreeBuilder.h:30</see>
/// <br/>
/// <c>int mTreeMaxTrianglesPerLeaf = 0</c>
/// </para>
/// </summary>
[FieldOffset(44)]
public int TreeMaxTrianglesPerLeaf;
/// <summary>
/// <para>
/// Average amount of triangles in leaf nodes
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/AABBTree/AABBTreeBuilder.h#L31">Jolt/AABBTree/AABBTreeBuilder.h:31</see>
/// <br/>
/// <c>float mTreeAvgTrianglesPerLeaf = 0.0f</c>
/// </para>
/// </summary>
[FieldOffset(48)]
public float TreeAvgTrianglesPerLeaf;
}
}

View file

@ -0,0 +1,515 @@
// <auto-generated/>
// 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
{
/// <summary>
/// <para>
/// Axis aligned box
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L15">Jolt/Geometry/AABox.h:15</see>
/// <br/>
/// <c>class AABox</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 32)]
public partial struct AABox
{
/// <summary>
/// <para>
/// Bounding box min and max
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L309">Jolt/Geometry/AABox.h:309</see>
/// <br/>
/// <c>Vec3 mMin</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public float3 Min;
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L310">Jolt/Geometry/AABox.h:310</see>
/// <br/>
/// <c>Vec3 mMax</c>
/// </para>
/// </summary>
[FieldOffset(16)]
public float3 Max;
/// <summary>
/// <para>
/// Constructor
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L21">Jolt/Geometry/AABox.h:21</see>
/// <br/>
/// <c>AABox()</c>
/// </para>
/// </summary>
public static AABox Create() => Jolt.PInvoke.AABox_Create();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L22">Jolt/Geometry/AABox.h:22</see>
/// <br/>
/// <c>AABox(Vec3Arg inMin, Vec3Arg inMax)</c>
/// </para>
/// </summary>
public static AABox Create(float3 min, float3 max) => Jolt.PInvoke.AABox_Create_2(min, max);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L23">Jolt/Geometry/AABox.h:23</see>
/// <br/>
/// <c>AABox(DVec3Arg inMin, DVec3Arg inMax)</c>
/// </para>
/// </summary>
public static AABox Create(double3 min, double3 max) => Jolt.PInvoke.AABox_Create_3(min, max);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L24">Jolt/Geometry/AABox.h:24</see>
/// <br/>
/// <c>AABox(Vec3Arg inCenter, float inRadius)</c>
/// </para>
/// </summary>
public static AABox Create(float3 center, float radius) => Jolt.PInvoke.AABox_Create_4(center, radius);
/// <summary>
/// <para>
/// Create box from 2 points
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L27">Jolt/Geometry/AABox.h:27</see>
/// <br/>
/// <c>static AABox sFromTwoPoints(Vec3Arg inP1, Vec3Arg inP2)</c>
/// </para>
/// </summary>
public static AABox FromTwoPoints(float3 p1, float3 p2) => Jolt.PInvoke.AABox_FromTwoPoints(p1, p2);
/// <summary>
/// <para>
/// Create box from indexed triangle
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L30">Jolt/Geometry/AABox.h:30</see>
/// <br/>
/// <c>static AABox sFromTriangle(const VertexList &amp;inVertices, const IndexedTriangle &amp;inTriangle)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// vertices is copied into a native container for the call; the span is only read.
/// </para>
/// </remarks>
public static unsafe AABox FromTriangle(ReadOnlySpan<float3> vertices, in IndexedTriangle triangle)
{
fixed (float3* vertices_fixed = vertices)
{
return Jolt.PInvoke.AABox_FromTriangle(vertices_fixed, (nuint)vertices.Length, in triangle);
}
}
/// <summary>
/// <para>
/// Get bounding box of size FLT_MAX
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L38">Jolt/Geometry/AABox.h:38</see>
/// <br/>
/// <c>static AABox sBiggest()</c>
/// </para>
/// </summary>
public static AABox Biggest() => Jolt.PInvoke.AABox_Biggest();
/// <summary>
/// <para>
/// Reset the bounding box to an empty bounding box
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L49">Jolt/Geometry/AABox.h:49</see>
/// <br/>
/// <c>void SetEmpty()</c>
/// </para>
/// </summary>
public void SetEmpty() => Jolt.PInvoke.AABox_SetEmpty(ref this);
/// <summary>
/// <para>
/// Check if the bounding box is valid (max &gt;= min)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L56">Jolt/Geometry/AABox.h:56</see>
/// <br/>
/// <c>bool IsValid() const</c>
/// </para>
/// </summary>
public readonly bool IsValid() => Jolt.PInvoke.AABox_IsValid(ref Unsafe.AsRef(in this));
/// <summary>
/// <para>
/// Encapsulate triangle in bounding box
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L87">Jolt/Geometry/AABox.h:87</see>
/// <br/>
/// <c>void Encapsulate(const VertexList &amp;inVertices, const IndexedTriangle &amp;inTriangle)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// vertices is copied into a native container for the call; the span is only read.
/// </para>
/// </remarks>
public unsafe void Encapsulate(ReadOnlySpan<float3> vertices, in IndexedTriangle triangle)
{
fixed (float3* vertices_fixed = vertices)
{
Jolt.PInvoke.AABox_Encapsulate(ref this, vertices_fixed, (nuint)vertices.Length, in triangle);
}
}
/// <summary>
/// <para>
/// Encapsulate point in bounding box
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L62">Jolt/Geometry/AABox.h:62</see>
/// <br/>
/// <c>void Encapsulate(Vec3Arg inPos)</c>
/// </para>
/// </summary>
public void Encapsulate(float3 pos) => Jolt.PInvoke.AABox_Encapsulate_2(ref this, pos);
/// <summary>
/// <para>
/// Encapsulate bounding box in bounding box
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L69">Jolt/Geometry/AABox.h:69</see>
/// <br/>
/// <c>void Encapsulate(const AABox &amp;inRHS)</c>
/// </para>
/// </summary>
public void Encapsulate(in AABox rhs) => Jolt.PInvoke.AABox_Encapsulate_3(ref this, in rhs);
/// <summary>
/// <para>
/// Encapsulate triangle in bounding box
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L76">Jolt/Geometry/AABox.h:76</see>
/// <br/>
/// <c>void Encapsulate(const Triangle &amp;inRHS)</c>
/// </para>
/// </summary>
public void Encapsulate(in Triangle rhs) => Jolt.PInvoke.AABox_Encapsulate_4(ref this, in rhs);
/// <summary>
/// <para>
/// Intersect this bounding box with inOther, returns the intersection
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L94">Jolt/Geometry/AABox.h:94</see>
/// <br/>
/// <c>AABox Intersect(const AABox &amp;inOther) const</c>
/// </para>
/// </summary>
public readonly AABox Intersect(in AABox other) =>
Jolt.PInvoke.AABox_Intersect(ref Unsafe.AsRef(in this), in other);
/// <summary>
/// <para>
/// Make sure that each edge of the bounding box has a minimal length
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L100">Jolt/Geometry/AABox.h:100</see>
/// <br/>
/// <c>void EnsureMinimalEdgeLength(float inMinEdgeLength)</c>
/// </para>
/// </summary>
public void EnsureMinimalEdgeLength(float minEdgeLength) =>
Jolt.PInvoke.AABox_EnsureMinimalEdgeLength(ref this, minEdgeLength);
/// <summary>
/// <para>
/// Widen the box on both sides by inVector
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L107">Jolt/Geometry/AABox.h:107</see>
/// <br/>
/// <c>void ExpandBy(Vec3Arg inVector)</c>
/// </para>
/// </summary>
public void ExpandBy(float3 vector) => Jolt.PInvoke.AABox_ExpandBy(ref this, vector);
/// <summary>
/// <para>
/// Get center of bounding box
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L114">Jolt/Geometry/AABox.h:114</see>
/// <br/>
/// <c>Vec3 GetCenter() const</c>
/// </para>
/// </summary>
public readonly float3 GetCenter() => Jolt.PInvoke.AABox_GetCenter(ref Unsafe.AsRef(in this));
/// <summary>
/// <para>
/// Get extent of bounding box (half of the size)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L120">Jolt/Geometry/AABox.h:120</see>
/// <br/>
/// <c>Vec3 GetExtent() const</c>
/// </para>
/// </summary>
public readonly float3 GetExtent() => Jolt.PInvoke.AABox_GetExtent(ref Unsafe.AsRef(in this));
/// <summary>
/// <para>
/// Get size of bounding box
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L126">Jolt/Geometry/AABox.h:126</see>
/// <br/>
/// <c>Vec3 GetSize() const</c>
/// </para>
/// </summary>
public readonly float3 GetSize() => Jolt.PInvoke.AABox_GetSize(ref Unsafe.AsRef(in this));
/// <summary>
/// <para>
/// Get surface area of bounding box
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L132">Jolt/Geometry/AABox.h:132</see>
/// <br/>
/// <c>float GetSurfaceArea() const</c>
/// </para>
/// </summary>
public readonly float GetSurfaceArea() => Jolt.PInvoke.AABox_GetSurfaceArea(ref Unsafe.AsRef(in this));
/// <summary>
/// <para>
/// Get volume of bounding box
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L139">Jolt/Geometry/AABox.h:139</see>
/// <br/>
/// <c>float GetVolume() const</c>
/// </para>
/// </summary>
public readonly float GetVolume() => Jolt.PInvoke.AABox_GetVolume(ref Unsafe.AsRef(in this));
/// <summary>
/// <para>
/// Check if this box contains another box
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L146">Jolt/Geometry/AABox.h:146</see>
/// <br/>
/// <c>bool Contains(const AABox &amp;inOther) const</c>
/// </para>
/// </summary>
public readonly bool Contains(in AABox other) =>
Jolt.PInvoke.AABox_Contains(ref Unsafe.AsRef(in this), in other);
/// <summary>
/// <para>
/// Check if this box contains a point
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L152">Jolt/Geometry/AABox.h:152</see>
/// <br/>
/// <c>bool Contains(Vec3Arg inOther) const</c>
/// </para>
/// </summary>
public readonly bool Contains(float3 other) => Jolt.PInvoke.AABox_Contains_2(ref Unsafe.AsRef(in this), other);
/// <summary>
/// <para>
/// Check if this box contains a point
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L158">Jolt/Geometry/AABox.h:158</see>
/// <br/>
/// <c>bool Contains(DVec3Arg inOther) const</c>
/// </para>
/// </summary>
public readonly bool Contains(double3 other) => Jolt.PInvoke.AABox_Contains_3(ref Unsafe.AsRef(in this), other);
/// <summary>
/// <para>
/// Check if this box overlaps with another box
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L164">Jolt/Geometry/AABox.h:164</see>
/// <br/>
/// <c>bool Overlaps(const AABox &amp;inOther) const</c>
/// </para>
/// </summary>
public readonly bool Overlaps(in AABox other) =>
Jolt.PInvoke.AABox_Overlaps(ref Unsafe.AsRef(in this), in other);
/// <summary>
/// <para>
/// Check if this box overlaps with a plane
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L170">Jolt/Geometry/AABox.h:170</see>
/// <br/>
/// <c>bool Overlaps(const Plane &amp;inPlane) const</c>
/// </para>
/// </summary>
public readonly bool Overlaps(in Plane plane) =>
Jolt.PInvoke.AABox_Overlaps_2(ref Unsafe.AsRef(in this), in plane);
/// <summary>
/// <para>
/// Translate bounding box
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L179">Jolt/Geometry/AABox.h:179</see>
/// <br/>
/// <c>void Translate(Vec3Arg inTranslation)</c>
/// </para>
/// </summary>
public void Translate(float3 translation) => Jolt.PInvoke.AABox_Translate(ref this, translation);
/// <summary>
/// <para>
/// Translate bounding box
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L186">Jolt/Geometry/AABox.h:186</see>
/// <br/>
/// <c>void Translate(DVec3Arg inTranslation)</c>
/// </para>
/// </summary>
public void Translate(double3 translation) => Jolt.PInvoke.AABox_Translate_2(ref this, translation);
/// <summary>
/// <para>
/// Transform bounding box
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L193">Jolt/Geometry/AABox.h:193</see>
/// <br/>
/// <c>AABox Transformed(Mat44Arg inMatrix) const</c>
/// </para>
/// </summary>
public readonly AABox Transformed(in float4x4 matrix) =>
Jolt.PInvoke.AABox_Transformed(ref Unsafe.AsRef(in this), in matrix);
/// <summary>
/// <para>
/// Transform bounding box
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L216">Jolt/Geometry/AABox.h:216</see>
/// <br/>
/// <c>AABox Transformed(DMat44Arg inMatrix) const</c>
/// </para>
/// </summary>
public readonly AABox Transformed(in double4x4 matrix) =>
Jolt.PInvoke.AABox_Transformed_2(ref Unsafe.AsRef(in this), in matrix);
/// <summary>
/// <para>
/// Scale this bounding box, can handle non-uniform and negative scaling
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L224">Jolt/Geometry/AABox.h:224</see>
/// <br/>
/// <c>AABox Scaled(Vec3Arg inScale) const</c>
/// </para>
/// </summary>
public readonly AABox Scaled(float3 scale) => Jolt.PInvoke.AABox_Scaled(ref Unsafe.AsRef(in this), scale);
/// <summary>
/// <para>
/// Calculate the support vector for this convex shape.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L230">Jolt/Geometry/AABox.h:230</see>
/// <br/>
/// <c>Vec3 GetSupport(Vec3Arg inDirection) const</c>
/// </para>
/// </summary>
public readonly float3 GetSupport(float3 direction) =>
Jolt.PInvoke.AABox_GetSupport(ref Unsafe.AsRef(in this), direction);
/// <summary>
/// <para>
/// Get the closest point on or in this box to inPoint
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L297">Jolt/Geometry/AABox.h:297</see>
/// <br/>
/// <c>Vec3 GetClosestPoint(Vec3Arg inPoint) const</c>
/// </para>
/// </summary>
public readonly float3 GetClosestPoint(float3 point) =>
Jolt.PInvoke.AABox_GetClosestPoint(ref Unsafe.AsRef(in this), point);
/// <summary>
/// <para>
/// Get the squared distance between inPoint and this box (will be 0 if in Point is inside the box)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/AABox.h#L303">Jolt/Geometry/AABox.h:303</see>
/// <br/>
/// <c>inline float GetSqDistanceTo(Vec3Arg inPoint) const</c>
/// </para>
/// </summary>
public readonly float GetSqDistanceTo(float3 point) =>
Jolt.PInvoke.AABox_GetSqDistanceTo(ref Unsafe.AsRef(in this), point);
}
}

View file

@ -0,0 +1,53 @@
// <auto-generated/>
// 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
{
/// <summary>
/// <para>
/// Structure that holds AABox moving linearly through 3d space
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/AABoxCast.h#L12">Jolt/Physics/Collision/AABoxCast.h:12</see>
/// <br/>
/// <c>struct AABoxCast</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 48)]
public partial struct AABoxCast
{
/// <summary>
/// <para>
/// Axis aligned box at starting location
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/AABoxCast.h#L16">Jolt/Physics/Collision/AABoxCast.h:16</see>
/// <br/>
/// <c>AABox mBox</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public AABox Box;
/// <summary>
/// <para>
/// Direction and length of the cast (anything beyond this length will not be reported as a hit)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/AABoxCast.h#L17">Jolt/Physics/Collision/AABoxCast.h:17</see>
/// <br/>
/// <c>Vec3 mDirection</c>
/// </para>
/// </summary>
[FieldOffset(32)]
public float3 Direction;
}
}

View file

@ -0,0 +1,47 @@
// <auto-generated/>
// 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
{
/// <summary>
/// <para>
/// Structure that holds a body pair
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyPair.h#L13">Jolt/Physics/Body/BodyPair.h:13</see>
/// <br/>
/// <c>struct alignas(uint64) BodyPair</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 8)]
public partial struct BodyPair
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyPair.h#L30">Jolt/Physics/Body/BodyPair.h:30</see>
/// <br/>
/// <c>BodyID mBodyA</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public uint BodyA;
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyPair.h#L31">Jolt/Physics/Body/BodyPair.h:31</see>
/// <br/>
/// <c>BodyID mBodyB</c>
/// </para>
/// </summary>
[FieldOffset(4)]
public uint BodyB;
}
}

View file

@ -0,0 +1,81 @@
// <auto-generated/>
// 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
{
/// <summary>
/// <para>
/// Structure that holds a ray cast or other object cast hit
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CastResult.h#L13">Jolt/Physics/Collision/CastResult.h:13</see>
/// <br/>
/// <c>class BroadPhaseCastResult</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 8)]
public partial struct BroadPhaseCastResult
{
/// <summary>
/// <para>
/// Body that was hit
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CastResult.h#L24">Jolt/Physics/Collision/CastResult.h:24</see>
/// <br/>
/// <c>BodyID mBodyID</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public uint BodyID;
/// <summary>
/// <para>
/// Hit fraction of the ray/object [0, 1], HitPoint = Start + mFraction * (End - Start)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CastResult.h#L25">Jolt/Physics/Collision/CastResult.h:25</see>
/// <br/>
/// <c>float mFraction = 1.0f + FLT_EPSILON</c>
/// </para>
/// </summary>
[FieldOffset(4)]
public float Fraction;
/// <summary>
/// <para>
/// Function required by the CollisionCollector. A smaller fraction is considered to be a 'better hit'. For
/// rays/cast shapes we can just use the collision fraction.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CastResult.h#L19">Jolt/Physics/Collision/CastResult.h:19</see>
/// <br/>
/// <c>inline float GetEarlyOutFraction() const</c>
/// </para>
/// </summary>
public readonly float GetEarlyOutFraction() =>
Jolt.PInvoke.BroadPhaseCastResult_GetEarlyOutFraction(ref Unsafe.AsRef(in this));
/// <summary>
/// <para>
/// Reset this result so it can be reused for a new cast.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CastResult.h#L22">Jolt/Physics/Collision/CastResult.h:22</see>
/// <br/>
/// <c>inline void Reset()</c>
/// </para>
/// </summary>
public void Reset() => Jolt.PInvoke.BroadPhaseCastResult_Reset(ref this);
}
}

View file

@ -0,0 +1,271 @@
// <auto-generated/>
// 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
{
/// <summary>
/// <para>
/// Encapsulates a collision contact between a character and another rigid body / character
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L129">Jolt/Physics/Character/CharacterVirtual.h:129</see>
/// <br/>
/// <c>class CharacterContact : public CharacterContactKey</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 128)]
public partial struct CharacterContact
{
[FieldOffset(0)]
public uint BodyB;
[FieldOffset(4)]
public uint CharacterIDB;
[FieldOffset(8)]
public uint SubShapeIDB;
/// <summary>
/// <para>
/// Position where the character makes contact
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L136">Jolt/Physics/Character/CharacterVirtual.h:136</see>
/// <br/>
/// <c>RVec3 mPosition</c>
/// </para>
/// </summary>
[FieldOffset(16)]
public float3 Position;
/// <summary>
/// <para>
/// Velocity of the contact point
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L137">Jolt/Physics/Character/CharacterVirtual.h:137</see>
/// <br/>
/// <c>Vec3 mLinearVelocity</c>
/// </para>
/// </summary>
[FieldOffset(32)]
public float3 LinearVelocity;
/// <summary>
/// <para>
/// Contact normal, pointing towards the character
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L138">Jolt/Physics/Character/CharacterVirtual.h:138</see>
/// <br/>
/// <c>Vec3 mContactNormal</c>
/// </para>
/// </summary>
[FieldOffset(48)]
public float3 ContactNormal;
/// <summary>
/// <para>
/// Surface normal of the contact. Has been flipped if the contact is back facing (mIsBackFacingContact) and
/// is equal to the contact normal if the contact normal is pointing up more.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L139">Jolt/Physics/Character/CharacterVirtual.h:139</see>
/// <br/>
/// <c>Vec3 mSurfaceNormal</c>
/// </para>
/// </summary>
[FieldOffset(64)]
public float3 SurfaceNormal;
/// <summary>
/// <para>
/// Distance to the contact &lt;= 0 means that it is an actual contact, &gt; 0 means predictive
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L140">Jolt/Physics/Character/CharacterVirtual.h:140</see>
/// <br/>
/// <c>float mDistance</c>
/// </para>
/// </summary>
[FieldOffset(80)]
public float Distance;
/// <summary>
/// <para>
/// Fraction along the path where this contact takes place
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L141">Jolt/Physics/Character/CharacterVirtual.h:141</see>
/// <br/>
/// <c>float mFraction</c>
/// </para>
/// </summary>
[FieldOffset(84)]
public float Fraction;
/// <summary>
/// <para>
/// Motion type of B, used to determine the priority of the contact
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L142">Jolt/Physics/Character/CharacterVirtual.h:142</see>
/// <br/>
/// <c>EMotionType mMotionTypeB</c>
/// </para>
/// </summary>
[FieldOffset(88)]
public MotionType MotionTypeB;
/// <summary>
/// <para>
/// If B is a sensor
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L143">Jolt/Physics/Character/CharacterVirtual.h:143</see>
/// <br/>
/// <c>bool mIsSensorB</c>
/// </para>
/// </summary>
[FieldOffset(89)]
public Brutal.Bool8 IsSensorB;
/// <summary>
/// <para>
/// Character we're colliding with (if not nullptr). Note that this may be a dangling pointer when accessed
/// through GetActiveContacts(), use mCharacterIDB instead.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L144">Jolt/Physics/Character/CharacterVirtual.h:144</see>
/// <br/>
/// <c>const CharacterVirtual * mCharacterB = nullptr</c>
/// </para>
/// </summary>
[FieldOffset(96)]
public CharacterVirtual CharacterB;
/// <summary>
/// <para>
/// User data of B
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L145">Jolt/Physics/Character/CharacterVirtual.h:145</see>
/// <br/>
/// <c>uint64 mUserData</c>
/// </para>
/// </summary>
[FieldOffset(104)]
public ulong UserData;
/// <summary>
/// <para>
/// Material of B
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L146">Jolt/Physics/Character/CharacterVirtual.h:146</see>
/// <br/>
/// <c>const PhysicsMaterial * mMaterial</c>
/// </para>
/// </summary>
[FieldOffset(112)]
public PhysicsMaterial Material;
/// <summary>
/// <para>
/// If the character actually collided with the contact (can be false if a predictive contact never becomes
/// a real one)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L147">Jolt/Physics/Character/CharacterVirtual.h:147</see>
/// <br/>
/// <c>bool mHadCollision = false</c>
/// </para>
/// </summary>
[FieldOffset(120)]
public Brutal.Bool8 HadCollision;
/// <summary>
/// <para>
/// If the contact validate callback chose to discard this contact or when the body is a sensor
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L148">Jolt/Physics/Character/CharacterVirtual.h:148</see>
/// <br/>
/// <c>bool mWasDiscarded = false</c>
/// </para>
/// </summary>
[FieldOffset(121)]
public Brutal.Bool8 WasDiscarded;
/// <summary>
/// <para>
/// When true, the velocity of the contact point can push the character
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L149">Jolt/Physics/Character/CharacterVirtual.h:149</see>
/// <br/>
/// <c>bool mCanPushCharacter = true</c>
/// </para>
/// </summary>
[FieldOffset(122)]
public Brutal.Bool8 CanPushCharacter;
/// <summary>
/// <para>
/// If this contact came from a back facing triangle / collision shape
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L150">Jolt/Physics/Character/CharacterVirtual.h:150</see>
/// <br/>
/// <c>bool mIsBackFacingContact = false</c>
/// </para>
/// </summary>
[FieldOffset(123)]
public Brutal.Bool8 IsBackFacingContact;
/// <summary>
/// <para>
/// Saving / restoring state for replay
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L133">Jolt/Physics/Character/CharacterVirtual.h:133</see>
/// <br/>
/// <c>void SaveState(StateRecorder &amp;inStream) const</c>
/// </para>
/// </summary>
public readonly void SaveState(StateRecorder stream) =>
Jolt.PInvoke.CharacterContact_SaveState(ref Unsafe.AsRef(in this), stream);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L134">Jolt/Physics/Character/CharacterVirtual.h:134</see>
/// <br/>
/// <c>void RestoreState(StateRecorder &amp;inStream)</c>
/// </para>
/// </summary>
public void RestoreState(StateRecorder stream) => Jolt.PInvoke.CharacterContact_RestoreState(ref this, stream);
}
}

View file

@ -0,0 +1,150 @@
// <auto-generated/>
// 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
{
/// <summary>
/// <para>
/// Uniquely identifies a contact between a character and another body or character
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L85">Jolt/Physics/Character/CharacterVirtual.h:85</see>
/// <br/>
/// <c>class CharacterContactKey</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 12)]
public partial struct CharacterContactKey
{
/// <summary>
/// <para>
/// ID of body we're colliding with (if not invalid)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L123">Jolt/Physics/Character/CharacterVirtual.h:123</see>
/// <br/>
/// <c>BodyID mBodyB</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public uint BodyB;
/// <summary>
/// <para>
/// Character we're colliding with (if not invalid)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L124">Jolt/Physics/Character/CharacterVirtual.h:124</see>
/// <br/>
/// <c>CharacterID mCharacterIDB</c>
/// </para>
/// </summary>
[FieldOffset(4)]
public uint CharacterIDB;
/// <summary>
/// <para>
/// Sub shape ID of body or character we're colliding with
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L125">Jolt/Physics/Character/CharacterVirtual.h:125</see>
/// <br/>
/// <c>SubShapeID mSubShapeIDB</c>
/// </para>
/// </summary>
[FieldOffset(8)]
public uint SubShapeIDB;
/// <summary>
/// <para>
/// Constructor
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L89">Jolt/Physics/Character/CharacterVirtual.h:89</see>
/// <br/>
/// <c>CharacterContactKey() = default</c>
/// </para>
/// </summary>
public static CharacterContactKey Create()
{
Jolt.PInvoke.CharacterContactKey_Create(out var _outResult);
return _outResult;
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L91">Jolt/Physics/Character/CharacterVirtual.h:91</see>
/// <br/>
/// <c>CharacterContactKey(const BodyID &amp;inBodyB, const SubShapeID &amp;inSubShapeID)</c>
/// </para>
/// </summary>
public static CharacterContactKey Create(uint bodyB, uint subShapeID)
{
Jolt.PInvoke.CharacterContactKey_Create_2(bodyB, subShapeID, out var _outResult);
return _outResult;
}
/// <summary>
/// <para>
/// Checks if two contacts refer to the same body (or virtual character)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L96">Jolt/Physics/Character/CharacterVirtual.h:96</see>
/// <br/>
/// <c>inline bool IsSameBody(const CharacterContactKey &amp;inOther) const</c>
/// </para>
/// </summary>
public readonly bool IsSameBody(in CharacterContactKey other) =>
Jolt.PInvoke.CharacterContactKey_IsSameBody(ref Unsafe.AsRef(in this), in other);
/// <summary>
/// <para>
/// Hash of this structure
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L113">Jolt/Physics/Character/CharacterVirtual.h:113</see>
/// <br/>
/// <c>inline uint64 GetHash() const</c>
/// </para>
/// </summary>
public readonly ulong GetHash() => Jolt.PInvoke.CharacterContactKey_GetHash(ref Unsafe.AsRef(in this));
/// <summary>
/// <para>
/// Saving / restoring state for replay
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L120">Jolt/Physics/Character/CharacterVirtual.h:120</see>
/// <br/>
/// <c>void SaveState(StateRecorder &amp;inStream) const</c>
/// </para>
/// </summary>
public readonly void SaveState(StateRecorder stream) =>
Jolt.PInvoke.CharacterContactKey_SaveState(ref Unsafe.AsRef(in this), stream);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L121">Jolt/Physics/Character/CharacterVirtual.h:121</see>
/// <br/>
/// <c>void RestoreState(StateRecorder &amp;inStream)</c>
/// </para>
/// </summary>
public void RestoreState(StateRecorder stream) =>
Jolt.PInvoke.CharacterContactKey_RestoreState(ref this, stream);
}
}

View file

@ -0,0 +1,55 @@
// <auto-generated/>
// 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
{
/// <summary>
/// <para>
/// This class contains settings that allow you to override the behavior of a character's collision response
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L72">Jolt/Physics/Character/CharacterVirtual.h:72</see>
/// <br/>
/// <c>class CharacterContactSettings</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 2)]
public partial struct CharacterContactSettings
{
/// <summary>
/// <para>
/// True when the object can push the virtual character.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L76">Jolt/Physics/Character/CharacterVirtual.h:76</see>
/// <br/>
/// <c>bool mCanPushCharacter = true</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public Brutal.Bool8 CanPushCharacter;
/// <summary>
/// <para>
/// True when the virtual character can apply impulses (push) the body. Note that this only works against
/// rigid bodies. Other CharacterVirtual objects can only be moved in their own update, so you must ensure
/// that in their OnCharacterContactAdded mCanPushCharacter is true.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Character/CharacterVirtual.h#L81">Jolt/Physics/Character/CharacterVirtual.h:81</see>
/// <br/>
/// <c>bool mCanReceiveImpulses = true</c>
/// </para>
/// </summary>
[FieldOffset(1)]
public Brutal.Bool8 CanReceiveImpulses;
}
}

View file

@ -0,0 +1,68 @@
// <auto-generated/>
// 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
{
/// <summary>
/// <para>
/// Structure that holds the result of colliding a point against a shape
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollidePointResult.h#L13">Jolt/Physics/Collision/CollidePointResult.h:13</see>
/// <br/>
/// <c>class CollidePointResult</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 8)]
public partial struct CollidePointResult
{
/// <summary>
/// <para>
/// Body that was hit
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollidePointResult.h#L21">Jolt/Physics/Collision/CollidePointResult.h:21</see>
/// <br/>
/// <c>BodyID mBodyID</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public uint BodyID;
/// <summary>
/// <para>
/// Sub shape ID of shape that we collided against
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollidePointResult.h#L22">Jolt/Physics/Collision/CollidePointResult.h:22</see>
/// <br/>
/// <c>SubShapeID mSubShapeID2</c>
/// </para>
/// </summary>
[FieldOffset(4)]
public uint SubShapeID2;
/// <summary>
/// <para>
/// Function required by the CollisionCollector. A smaller fraction is considered to be a 'better hit'. For
/// point queries there is no sensible return value.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollidePointResult.h#L19">Jolt/Physics/Collision/CollidePointResult.h:19</see>
/// <br/>
/// <c>inline float GetEarlyOutFraction() const</c>
/// </para>
/// </summary>
public readonly float GetEarlyOutFraction() =>
Jolt.PInvoke.CollidePointResult_GetEarlyOutFraction(ref Unsafe.AsRef(in this));
}
}

View file

@ -0,0 +1,227 @@
// <auto-generated/>
// 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
{
/// <summary>
/// <para>
/// Class that contains all information of two colliding shapes
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L18">Jolt/Physics/Collision/CollideShape.h:18</see>
/// <br/>
/// <c>class CollideShapeResult</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 1120)]
public partial struct CollideShapeResult
{
/// <summary>
/// <para>
/// Contact point on the surface of shape 1 (in world space or relative to base offset)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L59">Jolt/Physics/Collision/CollideShape.h:59</see>
/// <br/>
/// <c>Vec3 mContactPointOn1</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public float3 ContactPointOn1;
/// <summary>
/// <para>
/// Contact point on the surface of shape 2 (in world space or relative to base offset). If the penetration
/// depth is 0, this will be the same as mContactPointOn1.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L60">Jolt/Physics/Collision/CollideShape.h:60</see>
/// <br/>
/// <c>Vec3 mContactPointOn2</c>
/// </para>
/// </summary>
[FieldOffset(16)]
public float3 ContactPointOn2;
/// <summary>
/// <para>
/// Direction to move shape 2 out of collision along the shortest path (magnitude is meaningless, in world
/// space). You can use -mPenetrationAxis.Normalized() as contact normal.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L61">Jolt/Physics/Collision/CollideShape.h:61</see>
/// <br/>
/// <c>Vec3 mPenetrationAxis</c>
/// </para>
/// </summary>
[FieldOffset(32)]
public float3 PenetrationAxis;
/// <summary>
/// <para>
/// Penetration depth (move shape 2 by this distance to resolve the collision). If
/// CollideShapeSettings::mMaxSeparationDistance &gt; 0 this number can be negative to indicate that the
/// objects are separated by -mPenetrationDepth. The contact points are the closest points in that case.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L62">Jolt/Physics/Collision/CollideShape.h:62</see>
/// <br/>
/// <c>float mPenetrationDepth</c>
/// </para>
/// </summary>
[FieldOffset(48)]
public float PenetrationDepth;
/// <summary>
/// <para>
/// Sub shape ID that identifies the face on shape 1
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L63">Jolt/Physics/Collision/CollideShape.h:63</see>
/// <br/>
/// <c>SubShapeID mSubShapeID1</c>
/// </para>
/// </summary>
[FieldOffset(52)]
public uint SubShapeID1;
/// <summary>
/// <para>
/// Sub shape ID that identifies the face on shape 2
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L64">Jolt/Physics/Collision/CollideShape.h:64</see>
/// <br/>
/// <c>SubShapeID mSubShapeID2</c>
/// </para>
/// </summary>
[FieldOffset(56)]
public uint SubShapeID2;
/// <summary>
/// <para>
/// BodyID to which shape 2 belongs to
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L65">Jolt/Physics/Collision/CollideShape.h:65</see>
/// <br/>
/// <c>BodyID mBodyID2</c>
/// </para>
/// </summary>
[FieldOffset(60)]
public uint BodyID2;
/// <summary>
/// <para>
/// Colliding face on shape 1 (optional result, in world space or relative to base offset)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L66">Jolt/Physics/Collision/CollideShape.h:66</see>
/// <br/>
/// <c>Face mShape1Face</c>
/// </para>
/// </summary>
[FieldOffset(64)]
public StaticArrayVec3_32 Shape1Face;
/// <summary>
/// <para>
/// Colliding face on shape 2 (optional result, in world space or relative to base offset)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L67">Jolt/Physics/Collision/CollideShape.h:67</see>
/// <br/>
/// <c>Face mShape2Face</c>
/// </para>
/// </summary>
[FieldOffset(592)]
public StaticArrayVec3_32 Shape2Face;
/// <summary>
/// <para>
/// Default constructor
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L24">Jolt/Physics/Collision/CollideShape.h:24</see>
/// <br/>
/// <c>CollideShapeResult() = default</c>
/// </para>
/// </summary>
public static CollideShapeResult Create() => Jolt.PInvoke.CollideShapeResult_Create();
/// <summary>
/// <para>
/// Constructor
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L27">Jolt/Physics/Collision/CollideShape.h:27</see>
/// <br/>
/// <c>CollideShapeResult(Vec3Arg inContactPointOn1, Vec3Arg inContactPointOn2, Vec3Arg inPenetrationAxis, float inPenetrationDepth, const SubShapeID &amp;inSubShapeID1, const SubShapeID &amp;inSubShapeID2, const BodyID &amp;inBodyID2)</c>
/// </para>
/// </summary>
public static CollideShapeResult Create(
float3 contactPointOn1,
float3 contactPointOn2,
float3 penetrationAxis,
float penetrationDepth,
uint subShapeID1,
uint subShapeID2,
uint bodyID2
) =>
Jolt.PInvoke.CollideShapeResult_Create_2(
contactPointOn1,
contactPointOn2,
penetrationAxis,
penetrationDepth,
subShapeID1,
subShapeID2,
bodyID2
);
/// <summary>
/// <para>
/// Function required by the CollisionCollector. A smaller fraction is considered to be a 'better hit'. We
/// use -penetration depth to get the hit with the biggest penetration depth
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L39">Jolt/Physics/Collision/CollideShape.h:39</see>
/// <br/>
/// <c>inline float GetEarlyOutFraction() const</c>
/// </para>
/// </summary>
public readonly float GetEarlyOutFraction() =>
Jolt.PInvoke.CollideShapeResult_GetEarlyOutFraction(ref Unsafe.AsRef(in this));
/// <summary>
/// <para>
/// Reverses the hit result, swapping contact point 1 with contact point 2 etc.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/CollideShape.h#L42">Jolt/Physics/Collision/CollideShape.h:42</see>
/// <br/>
/// <c>inline CollideShapeResult Reversed() const</c>
/// </para>
/// </summary>
public readonly CollideShapeResult Reversed() =>
Jolt.PInvoke.CollideShapeResult_Reversed(ref Unsafe.AsRef(in this));
}
}

View file

@ -0,0 +1,179 @@
// <auto-generated/>
// 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
{
/// <summary>
/// <para>
/// A structure that contains the estimated contact and friction impulses and the resulting body velocities
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/EstimateCollisionResponse.h#L12">Jolt/Physics/Collision/EstimateCollisionResponse.h:12</see>
/// <br/>
/// <c>struct CollisionEstimationResult</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 384)]
public partial struct CollisionEstimationResult
{
/// <summary>
/// <para>
/// The estimated linear velocity of body 1 after collision
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/EstimateCollisionResponse.h#L14">Jolt/Physics/Collision/EstimateCollisionResponse.h:14</see>
/// <br/>
/// <c>Vec3 mLinearVelocity1</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public float3 LinearVelocity1;
/// <summary>
/// <para>
/// The estimated angular velocity of body 1 after collision
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/EstimateCollisionResponse.h#L15">Jolt/Physics/Collision/EstimateCollisionResponse.h:15</see>
/// <br/>
/// <c>Vec3 mAngularVelocity1</c>
/// </para>
/// </summary>
[FieldOffset(16)]
public float3 AngularVelocity1;
/// <summary>
/// <para>
/// The estimated linear velocity of body 2 after collision
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/EstimateCollisionResponse.h#L16">Jolt/Physics/Collision/EstimateCollisionResponse.h:16</see>
/// <br/>
/// <c>Vec3 mLinearVelocity2</c>
/// </para>
/// </summary>
[FieldOffset(32)]
public float3 LinearVelocity2;
/// <summary>
/// <para>
/// The estimated angular velocity of body 2 after collision
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/EstimateCollisionResponse.h#L17">Jolt/Physics/Collision/EstimateCollisionResponse.h:17</see>
/// <br/>
/// <c>Vec3 mAngularVelocity2</c>
/// </para>
/// </summary>
[FieldOffset(48)]
public float3 AngularVelocity2;
/// <summary>
/// <para>
/// Point at which friction was applied (relative to mBaseOffset of the manifold)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/EstimateCollisionResponse.h#L19">Jolt/Physics/Collision/EstimateCollisionResponse.h:19</see>
/// <br/>
/// <c>Vec3 mFrictionPoint</c>
/// </para>
/// </summary>
[FieldOffset(64)]
public float3 FrictionPoint;
/// <summary>
/// <para>
/// Normalized tangent of contact normal
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/EstimateCollisionResponse.h#L20">Jolt/Physics/Collision/EstimateCollisionResponse.h:20</see>
/// <br/>
/// <c>Vec3 mTangent1</c>
/// </para>
/// </summary>
[FieldOffset(80)]
public float3 Tangent1;
/// <summary>
/// <para>
/// Second normalized tangent of contact normal (forms a basis with mTangent1 and mWorldSpaceNormal)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/EstimateCollisionResponse.h#L21">Jolt/Physics/Collision/EstimateCollisionResponse.h:21</see>
/// <br/>
/// <c>Vec3 mTangent2</c>
/// </para>
/// </summary>
[FieldOffset(96)]
public float3 Tangent2;
/// <summary>
/// <para>
/// Estimated friction impulses in the direction of tangent 1 (kg m / s)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/EstimateCollisionResponse.h#L23">Jolt/Physics/Collision/EstimateCollisionResponse.h:23</see>
/// <br/>
/// <c>float mFrictionImpulse1 = 0</c>
/// </para>
/// </summary>
[FieldOffset(112)]
public float FrictionImpulse1;
/// <summary>
/// <para>
/// Estimated friction impulses in the direction of tangent 2 (kg m / s)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/EstimateCollisionResponse.h#L24">Jolt/Physics/Collision/EstimateCollisionResponse.h:24</see>
/// <br/>
/// <c>float mFrictionImpulse2 = 0</c>
/// </para>
/// </summary>
[FieldOffset(116)]
public float FrictionImpulse2;
/// <summary>
/// <para>
/// Estimated angular friction impulse around the world space normal (kg m^2 / s)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/EstimateCollisionResponse.h#L25">Jolt/Physics/Collision/EstimateCollisionResponse.h:25</see>
/// <br/>
/// <c>float mAngularFrictionImpulse = 0</c>
/// </para>
/// </summary>
[FieldOffset(120)]
public float AngularFrictionImpulse;
/// <summary>
/// <para>
/// Estimated contact impulses (kg m / s)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/EstimateCollisionResponse.h#L27">Jolt/Physics/Collision/EstimateCollisionResponse.h:27</see>
/// <br/>
/// <c>StaticArray&lt;float, ContactPoints::Capacity&gt; mContactImpulse</c>
/// </para>
/// </summary>
[FieldOffset(124)]
public StaticArrayFloat_64 ContactImpulse;
}
}

View file

@ -0,0 +1,139 @@
// <auto-generated/>
// 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
{
/// <summary>
/// <para>
/// Manifold class, describes the contact surface between two bodies
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L19">Jolt/Physics/Collision/ContactListener.h:19</see>
/// <br/>
/// <c>class ContactManifold</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 2128)]
public partial struct ContactManifold
{
/// <summary>
/// <para>
/// Offset to which all the contact points are relative
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L29">Jolt/Physics/Collision/ContactListener.h:29</see>
/// <br/>
/// <c>RVec3 mBaseOffset</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public float3 BaseOffset;
/// <summary>
/// <para>
/// Normal for this manifold, direction along which to move body 2 out of collision along the shortest path
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L30">Jolt/Physics/Collision/ContactListener.h:30</see>
/// <br/>
/// <c>Vec3 mWorldSpaceNormal</c>
/// </para>
/// </summary>
[FieldOffset(16)]
public float3 WorldSpaceNormal;
/// <summary>
/// <para>
/// Penetration depth (move shape 2 by this distance to resolve the collision). If this value is negative,
/// this is a speculative contact point and may not actually result in a velocity change as during solving
/// the bodies may not actually collide.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L31">Jolt/Physics/Collision/ContactListener.h:31</see>
/// <br/>
/// <c>float mPenetrationDepth</c>
/// </para>
/// </summary>
[FieldOffset(32)]
public float PenetrationDepth;
/// <summary>
/// <para>
/// Sub shapes that formed this manifold (note that when multiple manifolds are combined because they're
/// coplanar, we lose some information here because we only keep track of one sub shape pair that we
/// encounter, see description at Body::SetUseManifoldReduction)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L32">Jolt/Physics/Collision/ContactListener.h:32</see>
/// <br/>
/// <c>SubShapeID mSubShapeID1</c>
/// </para>
/// </summary>
[FieldOffset(36)]
public uint SubShapeID1;
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L33">Jolt/Physics/Collision/ContactListener.h:33</see>
/// <br/>
/// <c>SubShapeID mSubShapeID2</c>
/// </para>
/// </summary>
[FieldOffset(40)]
public uint SubShapeID2;
/// <summary>
/// <para>
/// Contact points on the surface of shape 1 relative to mBaseOffset.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L34">Jolt/Physics/Collision/ContactListener.h:34</see>
/// <br/>
/// <c>ContactPoints mRelativeContactPointsOn1</c>
/// </para>
/// </summary>
[FieldOffset(48)]
public StaticArrayVec3_64 RelativeContactPointsOn1;
/// <summary>
/// <para>
/// Contact points on the surface of shape 2 relative to mBaseOffset. If there's no penetration, this will
/// be the same as mRelativeContactPointsOn1. If there is penetration they will be different.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L35">Jolt/Physics/Collision/ContactListener.h:35</see>
/// <br/>
/// <c>ContactPoints mRelativeContactPointsOn2</c>
/// </para>
/// </summary>
[FieldOffset(1088)]
public StaticArrayVec3_64 RelativeContactPointsOn2;
/// <summary>
/// <para>
/// Swaps shape 1 and 2
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L23">Jolt/Physics/Collision/ContactListener.h:23</see>
/// <br/>
/// <c>ContactManifold SwapShapes() const</c>
/// </para>
/// </summary>
public readonly ContactManifold SwapShapes() =>
Jolt.PInvoke.ContactManifold_SwapShapes(ref Unsafe.AsRef(in this));
}
}

View file

@ -0,0 +1,160 @@
// <auto-generated/>
// 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
{
/// <summary>
/// <para>
/// When a contact point is added or persisted, the callback gets a chance to override certain properties of the
/// contact constraint. The values are filled in with their defaults by the system so the callback doesn't need
/// to modify anything, but it can if it wants to.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L40">Jolt/Physics/Collision/ContactListener.h:40</see>
/// <br/>
/// <c>class ContactSettings</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 64)]
public partial struct ContactSettings
{
/// <summary>
/// <para>
/// Combined friction for the body pair (see: PhysicsSystem::SetCombineFriction)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L43">Jolt/Physics/Collision/ContactListener.h:43</see>
/// <br/>
/// <c>float mCombinedFriction</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public float CombinedFriction;
/// <summary>
/// <para>
/// Combined restitution for the body pair (see: PhysicsSystem::SetCombineRestitution)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L44">Jolt/Physics/Collision/ContactListener.h:44</see>
/// <br/>
/// <c>float mCombinedRestitution</c>
/// </para>
/// </summary>
[FieldOffset(4)]
public float CombinedRestitution;
/// <summary>
/// <para>
/// Scale factor for the inverse mass of body 1 (0 = infinite mass, 1 = use original mass, 2 = body has half
/// the mass). For the same contact pair, you should strive to keep the value the same over time.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L45">Jolt/Physics/Collision/ContactListener.h:45</see>
/// <br/>
/// <c>float mInvMassScale1 = 1.0f</c>
/// </para>
/// </summary>
[FieldOffset(8)]
public float InvMassScale1;
/// <summary>
/// <para>
/// Scale factor for the inverse inertia of body 1 (usually same as mInvMassScale1)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L46">Jolt/Physics/Collision/ContactListener.h:46</see>
/// <br/>
/// <c>float mInvInertiaScale1 = 1.0f</c>
/// </para>
/// </summary>
[FieldOffset(12)]
public float InvInertiaScale1;
/// <summary>
/// <para>
/// Scale factor for the inverse mass of body 2 (0 = infinite mass, 1 = use original mass, 2 = body has half
/// the mass). For the same contact pair, you should strive to keep the value the same over time.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L47">Jolt/Physics/Collision/ContactListener.h:47</see>
/// <br/>
/// <c>float mInvMassScale2 = 1.0f</c>
/// </para>
/// </summary>
[FieldOffset(16)]
public float InvMassScale2;
/// <summary>
/// <para>
/// Scale factor for the inverse inertia of body 2 (usually same as mInvMassScale2)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L48">Jolt/Physics/Collision/ContactListener.h:48</see>
/// <br/>
/// <c>float mInvInertiaScale2 = 1.0f</c>
/// </para>
/// </summary>
[FieldOffset(20)]
public float InvInertiaScale2;
/// <summary>
/// <para>
/// If the contact should be treated as a sensor vs body contact (no collision response)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L49">Jolt/Physics/Collision/ContactListener.h:49</see>
/// <br/>
/// <c>bool mIsSensor</c>
/// </para>
/// </summary>
[FieldOffset(24)]
public Brutal.Bool8 IsSensor;
/// <summary>
/// <para>
/// Relative linear surface velocity between the bodies (world space surface velocity of body 2 - world
/// space surface velocity of body 1), can be used to create a conveyor belt effect
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L50">Jolt/Physics/Collision/ContactListener.h:50</see>
/// <br/>
/// <c>Vec3 mRelativeLinearSurfaceVelocity = Vec3::sZero()</c>
/// </para>
/// </summary>
[FieldOffset(32)]
public float3 RelativeLinearSurfaceVelocity;
/// <summary>
/// <para>
/// Relative angular surface velocity between the bodies (world space angular surface velocity of body 2 -
/// world space angular surface velocity of body 1). Note that this angular velocity is relative to the
/// center of mass of body 1, so if you want it relative to body 2's center of mass you need to add body 2
/// angular velocity x (body 1 world space center of mass - body 2 world space center of mass) to
/// mRelativeLinearSurfaceVelocity.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/ContactListener.h#L51">Jolt/Physics/Collision/ContactListener.h:51</see>
/// <br/>
/// <c>Vec3 mRelativeAngularSurfaceVelocity = Vec3::sZero()</c>
/// </para>
/// </summary>
[FieldOffset(48)]
public float3 RelativeAngularSurfaceVelocity;
}
}

View file

@ -0,0 +1,102 @@
// <auto-generated/>
// 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
{
/// <summary>
/// <para>
/// Triangle with 32-bit indices and material index
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/IndexedTriangle.h#L79">Jolt/Geometry/IndexedTriangle.h:79</see>
/// <br/>
/// <c>class IndexedTriangle : public IndexedTriangleNoMaterial</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 20)]
public partial struct IndexedTriangle
{
[FieldOffset(0)]
public uint_3 Idx;
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/IndexedTriangle.h#L119">Jolt/Geometry/IndexedTriangle.h:119</see>
/// <br/>
/// <c>uint32 mMaterialIndex = 0</c>
/// </para>
/// </summary>
[FieldOffset(12)]
public uint MaterialIndex;
/// <summary>
/// <para>
/// User data that can be used for anything by the application, e.g. for tracking the original index of the
/// triangle
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/IndexedTriangle.h#L120">Jolt/Geometry/IndexedTriangle.h:120</see>
/// <br/>
/// <c>uint32 mUserData = 0</c>
/// </para>
/// </summary>
[FieldOffset(16)]
public uint UserData;
/// <summary>
/// <para>
/// Constructor
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/IndexedTriangle.h#L85">Jolt/Geometry/IndexedTriangle.h:85</see>
/// <br/>
/// <c>constexpr IndexedTriangle(uint32 inI1, uint32 inI2, uint32 inI3, uint32 inMaterialIndex, uint inUserData = 0) : IndexedTriangleNoMaterial(inI1, inI2, inI3), mMaterialIndex(inMaterialIndex), mUserData(inUserData) { }</c>
/// </para>
/// </summary>
public static IndexedTriangle Create(uint i1, uint i2, uint i3, uint materialIndex, uint userData = 0)
{
Jolt.PInvoke.IndexedTriangle_Create(i1, i2, i3, materialIndex, userData, out var _outResult);
return _outResult;
}
/// <summary>
/// <para>
/// Rotate the vertices so that the lowest vertex becomes the first. This does not change the represented
/// triangle.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/IndexedTriangle.h#L94">Jolt/Geometry/IndexedTriangle.h:94</see>
/// <br/>
/// <c>IndexedTriangle GetLowestIndexFirst() const</c>
/// </para>
/// </summary>
public readonly IndexedTriangle GetLowestIndexFirst()
{
Jolt.PInvoke.IndexedTriangle_GetLowestIndexFirst(ref Unsafe.AsRef(in this), out var _outResult);
return _outResult;
}
/// <summary>
/// <para>
/// Get the hash value of this structure
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/IndexedTriangle.h#L113">Jolt/Geometry/IndexedTriangle.h:113</see>
/// <br/>
/// <c>uint64 GetHash() const</c>
/// </para>
/// </summary>
public readonly ulong GetHash() => Jolt.PInvoke.IndexedTriangle_GetHash(ref Unsafe.AsRef(in this));
}
}

View file

@ -0,0 +1,178 @@
// <auto-generated/>
// 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
{
/// <summary>
/// <para>
/// Triangle with 32-bit indices
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/IndexedTriangle.h#L12">Jolt/Geometry/IndexedTriangle.h:12</see>
/// <br/>
/// <c>class IndexedTriangleNoMaterial</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 12)]
public partial struct IndexedTriangleNoMaterial
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/IndexedTriangle.h#L75">Jolt/Geometry/IndexedTriangle.h:75</see>
/// <br/>
/// <c>uint32 mIdx[3]</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public uint_3 Idx;
/// <summary>
/// <para>
/// Constructor
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/IndexedTriangle.h#L18">Jolt/Geometry/IndexedTriangle.h:18</see>
/// <br/>
/// <c>IndexedTriangleNoMaterial() = default</c>
/// </para>
/// </summary>
public static IndexedTriangleNoMaterial Create()
{
Jolt.PInvoke.IndexedTriangleNoMaterial_Create(out var _outResult);
return _outResult;
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/IndexedTriangle.h#L19">Jolt/Geometry/IndexedTriangle.h:19</see>
/// <br/>
/// <c>constexpr IndexedTriangleNoMaterial(uint32 inI1, uint32 inI2, uint32 inI3) : mIdx { inI1, inI2, inI3 } { }</c>
/// </para>
/// </summary>
public static IndexedTriangleNoMaterial Create(uint i1, uint i2, uint i3)
{
Jolt.PInvoke.IndexedTriangleNoMaterial_Create_2(i1, i2, i3, out var _outResult);
return _outResult;
}
/// <summary>
/// <para>
/// Check if two triangles are equivalent (using the same vertices)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/IndexedTriangle.h#L28">Jolt/Geometry/IndexedTriangle.h:28</see>
/// <br/>
/// <c>bool IsEquivalent(const IndexedTriangleNoMaterial &amp;inRHS) const</c>
/// </para>
/// </summary>
public readonly bool IsEquivalent(in IndexedTriangleNoMaterial rhs) =>
Jolt.PInvoke.IndexedTriangleNoMaterial_IsEquivalent(ref Unsafe.AsRef(in this), in rhs);
/// <summary>
/// <para>
/// Check if two triangles are opposite (using the same vertices but in opposing order)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/IndexedTriangle.h#L36">Jolt/Geometry/IndexedTriangle.h:36</see>
/// <br/>
/// <c>bool IsOpposite(const IndexedTriangleNoMaterial &amp;inRHS) const</c>
/// </para>
/// </summary>
public readonly bool IsOpposite(in IndexedTriangleNoMaterial rhs) =>
Jolt.PInvoke.IndexedTriangleNoMaterial_IsOpposite(ref Unsafe.AsRef(in this), in rhs);
/// <summary>
/// <para>
/// Check if triangle is degenerate
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/IndexedTriangle.h#L44">Jolt/Geometry/IndexedTriangle.h:44</see>
/// <br/>
/// <c>bool IsDegenerate(const VertexList &amp;inVertices) const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// vertices is copied into a native container for the call; the span is only read.
/// </para>
/// </remarks>
public readonly unsafe bool IsDegenerate(ReadOnlySpan<float3> vertices)
{
fixed (float3* vertices_fixed = vertices)
{
return Jolt.PInvoke.IndexedTriangleNoMaterial_IsDegenerate(
ref Unsafe.AsRef(in this),
vertices_fixed,
(nuint)vertices.Length
);
}
}
/// <summary>
/// <para>
/// Rotate the vertices so that the second vertex becomes first etc. This does not change the represented
/// triangle.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/IndexedTriangle.h#L54">Jolt/Geometry/IndexedTriangle.h:54</see>
/// <br/>
/// <c>void Rotate()</c>
/// </para>
/// </summary>
public void Rotate() => Jolt.PInvoke.IndexedTriangleNoMaterial_Rotate(ref this);
/// <summary>
/// <para>
/// Get center of triangle
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/IndexedTriangle.h#L63">Jolt/Geometry/IndexedTriangle.h:63</see>
/// <br/>
/// <c>Vec3 GetCentroid(const VertexList &amp;inVertices) const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// vertices is copied into a native container for the call; the span is only read.
/// </para>
/// </remarks>
public readonly unsafe float3 GetCentroid(ReadOnlySpan<float3> vertices)
{
fixed (float3* vertices_fixed = vertices)
{
return Jolt.PInvoke.IndexedTriangleNoMaterial_GetCentroid(
ref Unsafe.AsRef(in this),
vertices_fixed,
(nuint)vertices.Length
);
}
}
/// <summary>
/// <para>
/// Get the hash value of this structure
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/IndexedTriangle.h#L69">Jolt/Geometry/IndexedTriangle.h:69</see>
/// <br/>
/// <c>uint64 GetHash() const</c>
/// </para>
/// </summary>
public readonly ulong GetHash() => Jolt.PInvoke.IndexedTriangleNoMaterial_GetHash(ref Unsafe.AsRef(in this));
}
}

View file

@ -0,0 +1,13 @@
// <auto-generated/>
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
namespace Brutal.JoltApi
{
/// <summary>A borrowed view of a native container: its element storage and count. Only the raw imports use it; the wrappers hand out a span over it.</summary>
public readonly struct NativeSpanView
{
public readonly nint Data;
public readonly ulong Count;
}
}

View file

@ -0,0 +1,14 @@
// <auto-generated/>
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
namespace Brutal.JoltApi
{
/// <summary>A borrowed view of a native container whose elements are objects C# only sees as handles: the element storage, the count and the native element stride. Only the raw imports use it; the wrappers hand out a <see cref="NativeHandleSpan{T}"/> over it.</summary>
public readonly struct NativeStridedView
{
public readonly nint Data;
public readonly ulong Count;
public readonly ulong Stride;
}
}

View file

@ -0,0 +1,444 @@
// <auto-generated/>
// 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
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L30">Jolt/Physics/PhysicsSettings.h:30</see>
/// <br/>
/// <c>struct PhysicsSettings</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 88)]
public partial struct PhysicsSettings
{
/// <summary>
/// <para>
/// Size of body pairs array, corresponds to the maximum amount of potential body pairs that can be in
/// flight at any time. Setting this to a low value will use less memory but slow down simulation as threads
/// may run out of narrow phase work.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L36">Jolt/Physics/PhysicsSettings.h:36</see>
/// <br/>
/// <c>int mMaxInFlightBodyPairs = 16384</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public int MaxInFlightBodyPairs;
/// <summary>
/// <para>
/// How many PhysicsStepListeners to notify in 1 batch
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L39">Jolt/Physics/PhysicsSettings.h:39</see>
/// <br/>
/// <c>int mStepListenersBatchSize = 8</c>
/// </para>
/// </summary>
[FieldOffset(4)]
public int StepListenersBatchSize;
/// <summary>
/// <para>
/// How many step listener batches are needed before spawning another job (set to INT_MAX if no parallelism
/// is desired)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L42">Jolt/Physics/PhysicsSettings.h:42</see>
/// <br/>
/// <c>int mStepListenerBatchesPerJob = 1</c>
/// </para>
/// </summary>
[FieldOffset(8)]
public int StepListenerBatchesPerJob;
/// <summary>
/// <para>
/// Baumgarte stabilization factor (how much of the position error to 'fix' in 1 update) (unit:
/// dimensionless, 0 = nothing, 1 = 100%)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L45">Jolt/Physics/PhysicsSettings.h:45</see>
/// <br/>
/// <c>float mBaumgarte = 0.2f</c>
/// </para>
/// </summary>
[FieldOffset(12)]
public float Baumgarte;
/// <summary>
/// <para>
/// Radius around objects inside which speculative contact points will be detected. Note that if this is too
/// big you will get ghost collisions as speculative contacts are based on the closest points during the
/// collision detection step which may not be the actual closest points by the time the two objects hit
/// (unit: meters)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L50">Jolt/Physics/PhysicsSettings.h:50</see>
/// <br/>
/// <c>float mSpeculativeContactDistance = 0.02f</c>
/// </para>
/// </summary>
[FieldOffset(16)]
public float SpeculativeContactDistance;
/// <summary>
/// <para>
/// How much bodies are allowed to sink into each other (unit: meters)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L53">Jolt/Physics/PhysicsSettings.h:53</see>
/// <br/>
/// <c>float mPenetrationSlop = 0.02f</c>
/// </para>
/// </summary>
[FieldOffset(20)]
public float PenetrationSlop;
/// <summary>
/// <para>
/// Fraction of its inner radius a body must move per step to enable casting for the LinearCast motion
/// quality
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L56">Jolt/Physics/PhysicsSettings.h:56</see>
/// <br/>
/// <c>float mLinearCastThreshold = 0.75f</c>
/// </para>
/// </summary>
[FieldOffset(24)]
public float LinearCastThreshold;
/// <summary>
/// <para>
/// Fraction of its inner radius a body may penetrate another body for the LinearCast motion quality
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L59">Jolt/Physics/PhysicsSettings.h:59</see>
/// <br/>
/// <c>float mLinearCastMaxPenetration = 0.25f</c>
/// </para>
/// </summary>
[FieldOffset(28)]
public float LinearCastMaxPenetration;
/// <summary>
/// <para>
/// Max distance to use to determine if two points are on the same plane for determining the contact
/// manifold between two shape faces (unit: meter)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L62">Jolt/Physics/PhysicsSettings.h:62</see>
/// <br/>
/// <c>float mManifoldTolerance = 1.0e-3f</c>
/// </para>
/// </summary>
[FieldOffset(32)]
public float ManifoldTolerance;
/// <summary>
/// <para>
/// Maximum distance to correct in a single iteration when solving position constraints (unit: meters)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L65">Jolt/Physics/PhysicsSettings.h:65</see>
/// <br/>
/// <c>float mMaxPenetrationDistance = 0.2f</c>
/// </para>
/// </summary>
[FieldOffset(36)]
public float MaxPenetrationDistance;
/// <summary>
/// <para>
/// 1 mm
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L68">Jolt/Physics/PhysicsSettings.h:68</see>
/// <br/>
/// <c>float mBodyPairCacheMaxDeltaPositionSq = Square(0.001f)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Maximum relative delta position for body pairs to be able to reuse collision results from last frame
/// (units: meter^2)
/// </para>
/// </remarks>
[FieldOffset(40)]
public float BodyPairCacheMaxDeltaPositionSq;
/// <summary>
/// <para>
/// cos(2 degrees / 2)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L71">Jolt/Physics/PhysicsSettings.h:71</see>
/// <br/>
/// <c>float mBodyPairCacheCosMaxDeltaRotationDiv2 = 0.99984769515639123915701155881391f</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Maximum relative delta orientation for body pairs to be able to reuse collision results from last frame,
/// stored as cos(max angle / 2)
/// </para>
/// </remarks>
[FieldOffset(44)]
public float BodyPairCacheCosMaxDeltaRotationDiv2;
/// <summary>
/// <para>
/// cos(5 degree)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L74">Jolt/Physics/PhysicsSettings.h:74</see>
/// <br/>
/// <c>float mContactNormalCosMaxDeltaRotation = 0.99619469809174553229501040247389f</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Maximum angle between normals that allows manifolds between different sub shapes of the same body pair
/// to be combined
/// </para>
/// </remarks>
[FieldOffset(48)]
public float ContactNormalCosMaxDeltaRotation;
/// <summary>
/// <para>
/// 1 cm
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L77">Jolt/Physics/PhysicsSettings.h:77</see>
/// <br/>
/// <c>float mContactPointPreserveLambdaMaxDistSq = Square(0.01f)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Maximum allowed distance between old and new contact point to preserve contact forces for warm start
/// (units: meter^2)
/// </para>
/// </remarks>
[FieldOffset(52)]
public float ContactPointPreserveLambdaMaxDistSq;
/// <summary>
/// <para>
/// Max squared distance to consider a vertex to be the same as another vertex, used by the internal edge
/// removal algorithm to determine if two edges are shared. (unit: meter^2)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L80">Jolt/Physics/PhysicsSettings.h:80</see>
/// <br/>
/// <c>float mInternalEdgeRemovalVertexToleranceSq = cDefaultInternalEdgeRemovalVertexToleranceSq</c>
/// </para>
/// </summary>
[FieldOffset(56)]
public float InternalEdgeRemovalVertexToleranceSq;
/// <summary>
/// <para>
/// Number of solver velocity iterations to run Note that this needs to be &gt;= 2 in order for friction to
/// work (friction is applied using the non-penetration impulse from the previous iteration)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L84">Jolt/Physics/PhysicsSettings.h:84</see>
/// <br/>
/// <c>uint mNumVelocitySteps = 10</c>
/// </para>
/// </summary>
[FieldOffset(60)]
public uint NumVelocitySteps;
/// <summary>
/// <para>
/// Number of solver position iterations to run
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L87">Jolt/Physics/PhysicsSettings.h:87</see>
/// <br/>
/// <c>uint mNumPositionSteps = 2</c>
/// </para>
/// </summary>
[FieldOffset(64)]
public uint NumPositionSteps;
/// <summary>
/// <para>
/// Minimal velocity needed before a collision can be elastic. If the relative velocity between colliding
/// objects in the direction of the contact normal is lower than this, the restitution will be zero
/// regardless of the configured value. This lets an object settle sooner. Must be a positive number. (unit:
/// m)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L92">Jolt/Physics/PhysicsSettings.h:92</see>
/// <br/>
/// <c>float mMinVelocityForRestitution = 1.0f</c>
/// </para>
/// </summary>
[FieldOffset(68)]
public float MinVelocityForRestitution;
/// <summary>
/// <para>
/// Time before object is allowed to go to sleep (unit: seconds)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L95">Jolt/Physics/PhysicsSettings.h:95</see>
/// <br/>
/// <c>float mTimeBeforeSleep = 0.5f</c>
/// </para>
/// </summary>
[FieldOffset(72)]
public float TimeBeforeSleep;
/// <summary>
/// <para>
/// To detect if an object is sleeping, we use 3 points: - The center of mass. - The centers of the faces of
/// the bounding box that are furthest away from the center. The movement of these points is tracked and if
/// the velocity of all 3 points is lower than this value, the object is allowed to go to sleep. Must be a
/// positive number. (unit: m/s)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L102">Jolt/Physics/PhysicsSettings.h:102</see>
/// <br/>
/// <c>float mPointVelocitySleepThreshold = 0.03f</c>
/// </para>
/// </summary>
[FieldOffset(76)]
public float PointVelocitySleepThreshold;
/// <summary>
/// <para>
/// By default the simulation is deterministic, it is possible to turn this off by setting this setting to
/// false. This will make the simulation run faster but it will no longer be deterministic.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L105">Jolt/Physics/PhysicsSettings.h:105</see>
/// <br/>
/// <c>bool mDeterministicSimulation = true</c>
/// </para>
/// </summary>
[FieldOffset(80)]
public Brutal.Bool8 DeterministicSimulation;
/// <summary>
/// <para>
/// Whether or not to use warm starting for constraints (initially applying previous frames impulses)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L111">Jolt/Physics/PhysicsSettings.h:111</see>
/// <br/>
/// <c>bool mConstraintWarmStart = true</c>
/// </para>
/// </summary>
[FieldOffset(81)]
public Brutal.Bool8 ConstraintWarmStart;
/// <summary>
/// <para>
/// Whether or not to use the body pair cache, which removes the need for narrow phase collision detection
/// when orientation between two bodies didn't change
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L114">Jolt/Physics/PhysicsSettings.h:114</see>
/// <br/>
/// <c>bool mUseBodyPairContactCache = true</c>
/// </para>
/// </summary>
[FieldOffset(82)]
public Brutal.Bool8 UseBodyPairContactCache;
/// <summary>
/// <para>
/// Whether or not to reduce manifolds with similar contact normals into one contact manifold (see
/// description at Body::SetUseManifoldReduction)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L117">Jolt/Physics/PhysicsSettings.h:117</see>
/// <br/>
/// <c>bool mUseManifoldReduction = true</c>
/// </para>
/// </summary>
[FieldOffset(83)]
public Brutal.Bool8 UseManifoldReduction;
/// <summary>
/// <para>
/// If we split up large islands into smaller parallel batches of work (to improve performance)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L120">Jolt/Physics/PhysicsSettings.h:120</see>
/// <br/>
/// <c>bool mUseLargeIslandSplitter = true</c>
/// </para>
/// </summary>
[FieldOffset(84)]
public Brutal.Bool8 UseLargeIslandSplitter;
/// <summary>
/// <para>
/// If objects can go to sleep or not
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L123">Jolt/Physics/PhysicsSettings.h:123</see>
/// <br/>
/// <c>bool mAllowSleeping = true</c>
/// </para>
/// </summary>
[FieldOffset(85)]
public Brutal.Bool8 AllowSleeping;
/// <summary>
/// <para>
/// When false, we prevent collision against non-active (shared) edges. Mainly for debugging the algorithm.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/PhysicsSettings.h#L126">Jolt/Physics/PhysicsSettings.h:126</see>
/// <br/>
/// <c>bool mCheckActiveEdges = true</c>
/// </para>
/// </summary>
[FieldOffset(86)]
public Brutal.Bool8 CheckActiveEdges;
}
}

View file

@ -0,0 +1,254 @@
// <auto-generated/>
// 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
{
/// <summary>
/// <para>
/// An infinite plane described by the formula X . Normal + Constant = 0.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L10">Jolt/Geometry/Plane.h:10</see>
/// <br/>
/// <c>class Plane</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 16)]
public partial struct Plane
{
/// <summary>
/// <para>
/// XYZ = normal, W = constant, plane: x . normal + constant = 0
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L101">Jolt/Geometry/Plane.h:101</see>
/// <br/>
/// <c>Vec4 mNormalAndConstant</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public float4 NormalAndConstant;
/// <summary>
/// <para>
/// Constructor
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L16">Jolt/Geometry/Plane.h:16</see>
/// <br/>
/// <c>Plane() = default</c>
/// </para>
/// </summary>
public static Plane Create() => Jolt.PInvoke.Plane_Create();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L17">Jolt/Geometry/Plane.h:17</see>
/// <br/>
/// <c>explicit Plane(Vec4Arg inNormalAndConstant)</c>
/// </para>
/// </summary>
public static Plane Create(float4 normalAndConstant) => Jolt.PInvoke.Plane_Create_2(normalAndConstant);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L18">Jolt/Geometry/Plane.h:18</see>
/// <br/>
/// <c>Plane(Vec3Arg inNormal, float inConstant)</c>
/// </para>
/// </summary>
public static Plane Create(float3 normal, float constant) => Jolt.PInvoke.Plane_Create_3(normal, constant);
/// <summary>
/// <para>
/// Create from point and normal
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L21">Jolt/Geometry/Plane.h:21</see>
/// <br/>
/// <c>static Plane sFromPointAndNormal(Vec3Arg inPoint, Vec3Arg inNormal)</c>
/// </para>
/// </summary>
public static Plane FromPointAndNormal(float3 point, float3 normal) =>
Jolt.PInvoke.Plane_FromPointAndNormal(point, normal);
/// <summary>
/// <para>
/// Create from point and normal, double precision version that more accurately calculates the plane
/// constant
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L24">Jolt/Geometry/Plane.h:24</see>
/// <br/>
/// <c>static Plane sFromPointAndNormal(DVec3Arg inPoint, Vec3Arg inNormal)</c>
/// </para>
/// </summary>
public static Plane FromPointAndNormal(double3 point, float3 normal) =>
Jolt.PInvoke.Plane_FromPointAndNormal_2(point, normal);
/// <summary>
/// <para>
/// Create from 3 counter clockwise points
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L27">Jolt/Geometry/Plane.h:27</see>
/// <br/>
/// <c>static Plane sFromPointsCCW(Vec3Arg inV1, Vec3Arg inV2, Vec3Arg inV3)</c>
/// </para>
/// </summary>
public static Plane FromPointsCCW(float3 v1, float3 v2, float3 v3) =>
Jolt.PInvoke.Plane_FromPointsCCW(v1, v2, v3);
/// <summary>
/// <para>
/// Properties
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L30">Jolt/Geometry/Plane.h:30</see>
/// <br/>
/// <c>Vec3 GetNormal() const</c>
/// </para>
/// </summary>
public readonly float3 GetNormal() => Jolt.PInvoke.Plane_GetNormal(ref Unsafe.AsRef(in this));
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L31">Jolt/Geometry/Plane.h:31</see>
/// <br/>
/// <c>void SetNormal(Vec3Arg inNormal)</c>
/// </para>
/// </summary>
public void SetNormal(float3 normal) => Jolt.PInvoke.Plane_SetNormal(ref this, normal);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L32">Jolt/Geometry/Plane.h:32</see>
/// <br/>
/// <c>float GetConstant() const</c>
/// </para>
/// </summary>
public readonly float GetConstant() => Jolt.PInvoke.Plane_GetConstant(ref Unsafe.AsRef(in this));
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L33">Jolt/Geometry/Plane.h:33</see>
/// <br/>
/// <c>void SetConstant(float inConstant)</c>
/// </para>
/// </summary>
public void SetConstant(float constant) => Jolt.PInvoke.Plane_SetConstant(ref this, constant);
/// <summary>
/// <para>
/// Store as 4 floats
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L36">Jolt/Geometry/Plane.h:36</see>
/// <br/>
/// <c>void StoreFloat4(Float4 *outV) const</c>
/// </para>
/// </summary>
public readonly unsafe void StoreFloat4(Ptr<float4> v) =>
Jolt.PInvoke.Plane_StoreFloat4(ref Unsafe.AsRef(in this), v);
/// <summary>
/// <para>
/// Offset the plane (positive value means move it in the direction of the plane normal)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L39">Jolt/Geometry/Plane.h:39</see>
/// <br/>
/// <c>Plane Offset(float inDistance) const</c>
/// </para>
/// </summary>
public readonly Plane Offset(float distance) => Jolt.PInvoke.Plane_Offset(ref Unsafe.AsRef(in this), distance);
/// <summary>
/// <para>
/// Transform the plane by a matrix
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L42">Jolt/Geometry/Plane.h:42</see>
/// <br/>
/// <c>inline Plane GetTransformed(Mat44Arg inTransform) const</c>
/// </para>
/// </summary>
public readonly Plane GetTransformed(in float4x4 transform) =>
Jolt.PInvoke.Plane_GetTransformed(ref Unsafe.AsRef(in this), in transform);
/// <summary>
/// <para>
/// Scale the plane, can handle non-uniform and negative scaling
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L49">Jolt/Geometry/Plane.h:49</see>
/// <br/>
/// <c>inline Plane Scaled(Vec3Arg inScale) const</c>
/// </para>
/// </summary>
public readonly Plane Scaled(float3 scale) => Jolt.PInvoke.Plane_Scaled(ref Unsafe.AsRef(in this), scale);
/// <summary>
/// <para>
/// Distance point to plane
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L57">Jolt/Geometry/Plane.h:57</see>
/// <br/>
/// <c>float SignedDistance(Vec3Arg inPoint) const</c>
/// </para>
/// </summary>
public readonly float SignedDistance(float3 point) =>
Jolt.PInvoke.Plane_SignedDistance(ref Unsafe.AsRef(in this), point);
/// <summary>
/// <para>
/// Project inPoint onto the plane
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L60">Jolt/Geometry/Plane.h:60</see>
/// <br/>
/// <c>Vec3 ProjectPointOnPlane(Vec3Arg inPoint) const</c>
/// </para>
/// </summary>
public readonly float3 ProjectPointOnPlane(float3 point) =>
Jolt.PInvoke.Plane_ProjectPointOnPlane(ref Unsafe.AsRef(in this), point);
/// <summary>
/// <para>
/// Returns intersection point between 3 planes
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L63">Jolt/Geometry/Plane.h:63</see>
/// <br/>
/// <c>static bool sIntersectPlanes(const Plane &amp;inP1, const Plane &amp;inP2, const Plane &amp;inP3, Vec3 &amp;outPoint)</c>
/// </para>
/// </summary>
public static bool IntersectPlanes(in Plane p1, in Plane p2, in Plane p3, out float3 point) =>
Jolt.PInvoke.Plane_IntersectPlanes(in p1, in p2, in p3, out point);
}
}

View file

@ -0,0 +1,36 @@
// <auto-generated/>
// 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
{
/// <summary>
/// <para>
/// Class that wraps a point so that it can be used with convex collision detection
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/ConvexSupport.h#L85">Jolt/Geometry/ConvexSupport.h:85</see>
/// <br/>
/// <c>struct PointConvexSupport</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 16)]
public partial struct PointConvexSupport
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/ConvexSupport.h#L93">Jolt/Geometry/ConvexSupport.h:93</see>
/// <br/>
/// <c>Vec3 mPoint</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public float3 Point;
}
}

Some files were not shown because too many files have changed in this diff Show more