mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 04:58:24 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
|
|
@ -0,0 +1,145 @@
|
|||
// <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>
|
||||
/// Implementation of GetTrianglesStart/Next that uses a multiple fixed lists of vertices for the triangles.
|
||||
/// These are transformed into world space when getting the triangles.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/GetTrianglesContext.h#L150">Jolt/Physics/Collision/Shape/GetTrianglesContext.h:150</see>
|
||||
/// <br/>
|
||||
/// <c>class GetTrianglesContextMultiVertexList</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
[InteropHandle]
|
||||
public readonly partial struct GetTrianglesContextMultiVertexList : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/GetTrianglesContext.h#L234">Jolt/Physics/Collision/Shape/GetTrianglesContext.h:234</see>
|
||||
/// <br/>
|
||||
/// <c>struct Part</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Explicit, Size = 80)]
|
||||
public partial struct Part
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/GetTrianglesContext.h#L236">Jolt/Physics/Collision/Shape/GetTrianglesContext.h:236</see>
|
||||
/// <br/>
|
||||
/// <c>Mat44 mLocalToWorld</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
[FieldOffset(0)]
|
||||
public float4x4 LocalToWorld;
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/GetTrianglesContext.h#L237">Jolt/Physics/Collision/Shape/GetTrianglesContext.h:237</see>
|
||||
/// <br/>
|
||||
/// <c>const Vec3 * mTriangleVertices</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
[FieldOffset(64)]
|
||||
public Ptr<float3> TriangleVertices;
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/GetTrianglesContext.h#L238">Jolt/Physics/Collision/Shape/GetTrianglesContext.h:238</see>
|
||||
/// <br/>
|
||||
/// <c>size_t mNumTriangleVertices</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
[FieldOffset(72)]
|
||||
public nuint NumTriangleVertices;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Constructor, to be called in GetTrianglesStart
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/GetTrianglesContext.h#L154">Jolt/Physics/Collision/Shape/GetTrianglesContext.h:154</see>
|
||||
/// <br/>
|
||||
/// <c>GetTrianglesContextMultiVertexList(bool inIsInsideOut, const PhysicsMaterial *inMaterial)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static GetTrianglesContextMultiVertexList Create(bool isInsideOut, PhysicsMaterial material) =>
|
||||
Jolt.PInvoke.GetTrianglesContextMultiVertexList_Create(isInsideOut, material);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Add a mesh part and its transform
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/GetTrianglesContext.h#L163">Jolt/Physics/Collision/Shape/GetTrianglesContext.h:163</see>
|
||||
/// <br/>
|
||||
/// <c>void AddPart(Mat44Arg inLocalToWorld, const Vec3 *inTriangleVertices, size_t inNumTriangleVertices)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// triangleVertices is copied into a native buffer the object keeps; the span is only read.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public unsafe void AddPart(in float4x4 localToWorld, ReadOnlySpan<float3> triangleVertices)
|
||||
{
|
||||
fixed (float3* triangleVertices_fixed = triangleVertices)
|
||||
{
|
||||
Jolt.PInvoke.GetTrianglesContextMultiVertexList_AddPart(
|
||||
this,
|
||||
in localToWorld,
|
||||
triangleVertices_fixed,
|
||||
(nuint)triangleVertices.Length
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/GetTrianglesContext.h#L171">Jolt/Physics/Collision/Shape/GetTrianglesContext.h:171</see>
|
||||
/// <br/>
|
||||
/// <c>int GetTrianglesNext(int inMaxTrianglesRequested, Float3 *outTriangleVertices, const PhysicsMaterial **outMaterials)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// @see Shape::GetTrianglesNext
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// materials is a buffer of PhysicsMaterial handles you allocate and size; the handles the call writes into
|
||||
/// it are borrowed from their owner - don't Dispose them.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public unsafe int GetTrianglesNext(
|
||||
int maxTrianglesRequested,
|
||||
Ptr<float3> triangleVertices,
|
||||
Ptr<PhysicsMaterial> materials
|
||||
) =>
|
||||
Jolt.PInvoke.GetTrianglesContextMultiVertexList_GetTrianglesNext(
|
||||
this,
|
||||
maxTrianglesRequested,
|
||||
triangleVertices,
|
||||
materials
|
||||
);
|
||||
|
||||
public void Dispose() => Jolt.PInvoke.GetTrianglesContextMultiVertexList_Destroy(this);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue