mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 04:58:24 +01:00
383 lines
19 KiB
C#
383 lines
19 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.Jolt.Generate; do not edit by hand.
|
|
#nullable enable
|
|
|
|
using Brutal.Interop;
|
|
using Brutal.Numerics;
|
|
namespace Brutal.JoltApi
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L40">Jolt/Physics/Collision/Shape/ConvexHullShape.h:40</see>
|
|
/// <br/>
|
|
/// <c>class ConvexHullShape final : public ConvexShape</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// A convex hull
|
|
/// </para>
|
|
/// </remarks>
|
|
[InteropHandle]
|
|
public readonly partial struct ConvexHullShape : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L167">Jolt/Physics/Collision/Shape/ConvexHullShape.h:167</see>
|
|
/// <br/>
|
|
/// <c>struct Face</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[StructLayout(LayoutKind.Explicit, Size = 4)]
|
|
public struct Face
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// First index in mVertexIdx to use
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L169">Jolt/Physics/Collision/Shape/ConvexHullShape.h:169</see>
|
|
/// <br/>
|
|
/// <c>uint16 mFirstVertex</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(0)]
|
|
public ushort mFirstVertex;
|
|
/// <summary>
|
|
/// <para>
|
|
/// Number of vertices in the mVertexIdx to use
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L170">Jolt/Physics/Collision/Shape/ConvexHullShape.h:170</see>
|
|
/// <br/>
|
|
/// <c>uint16 mNumVertices = 0</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(2)]
|
|
public ushort mNumVertices;
|
|
}
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L176">Jolt/Physics/Collision/Shape/ConvexHullShape.h:176</see>
|
|
/// <br/>
|
|
/// <c>struct Point</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[StructLayout(LayoutKind.Explicit, Size = 32)]
|
|
public struct Point
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Position of vertex
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L178">Jolt/Physics/Collision/Shape/ConvexHullShape.h:178</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mPosition</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(0)]
|
|
public float3 mPosition;
|
|
/// <summary>
|
|
/// <para>
|
|
/// Number of faces in the face array below
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L179">Jolt/Physics/Collision/Shape/ConvexHullShape.h:179</see>
|
|
/// <br/>
|
|
/// <c>int mNumFaces = 0</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(16)]
|
|
public int mNumFaces;
|
|
/// <summary>
|
|
/// <para>
|
|
/// Indices of 3 neighboring faces with the biggest difference in normal (used to shift vertices for
|
|
/// convex radius)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L180">Jolt/Physics/Collision/Shape/ConvexHullShape.h:180</see>
|
|
/// <br/>
|
|
/// <c>int mFaces[3] = { -1, -1, -1 }</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(20)]
|
|
public int_3 mFaces;
|
|
}
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L50">Jolt/Physics/Collision/Shape/ConvexHullShape.h:50</see>
|
|
/// <br/>
|
|
/// <c>ConvexHullShape()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Constructor
|
|
/// </para>
|
|
/// </remarks>
|
|
public static ConvexHullShape Create() => Jolt.PInvoke.ConvexHullShape_Create();
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L54">Jolt/Physics/Collision/Shape/ConvexHullShape.h:54</see>
|
|
/// <br/>
|
|
/// <c>virtual Vec3 GetCenterOfMass() const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// See Shape::GetCenterOfMass
|
|
/// </para>
|
|
/// </remarks>
|
|
public float3 GetCenterOfMass() => Jolt.PInvoke.ConvexHullShape_GetCenterOfMass(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L60">Jolt/Physics/Collision/Shape/ConvexHullShape.h:60</see>
|
|
/// <br/>
|
|
/// <c>virtual float GetInnerRadius() const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// See Shape::GetInnerRadius
|
|
/// </para>
|
|
/// </remarks>
|
|
public float GetInnerRadius() => Jolt.PInvoke.ConvexHullShape_GetInnerRadius(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L66">Jolt/Physics/Collision/Shape/ConvexHullShape.h:66</see>
|
|
/// <br/>
|
|
/// <c>virtual Vec3 GetSurfaceNormal(const SubShapeID &inSubShapeID, Vec3Arg inLocalSurfacePosition) const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// See Shape::GetSurfaceNormal
|
|
/// </para>
|
|
/// </remarks>
|
|
public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => Jolt.PInvoke.ConvexHullShape_GetSurfaceNormal(this, subShapeID, localSurfacePosition);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L75">Jolt/Physics/Collision/Shape/ConvexHullShape.h:75</see>
|
|
/// <br/>
|
|
/// <c>virtual void GetSubmergedVolume(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const Plane &inSurface, float &outTotalVolume, float &outSubmergedVolume, Vec3 &outCenterOfBuoyancy JPH_IF_DEBUG_RENDERER(, RVec3Arg inBaseOffset)) const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// See Shape::GetSubmergedVolume
|
|
/// </para>
|
|
/// </remarks>
|
|
public void GetSubmergedVolume(float4x4 centerOfMassTransform, float3 scale, Plane surface, out float totalVolume, out float submergedVolume, out float3 centerOfBuoyancy, float3 baseOffset) => Jolt.PInvoke.ConvexHullShape_GetSubmergedVolume(this, centerOfMassTransform, scale, surface, out totalVolume, out submergedVolume, out centerOfBuoyancy, baseOffset);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L79">Jolt/Physics/Collision/Shape/ConvexHullShape.h:79</see>
|
|
/// <br/>
|
|
/// <c>virtual void Draw(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale, ColorArg inColor, bool inUseMaterialColors, bool inDrawWireframe) const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// See Shape::Draw
|
|
/// </para>
|
|
/// </remarks>
|
|
public void Draw(DebugRenderer renderer, float4x4 centerOfMassTransform, float3 scale, uint color, bool useMaterialColors, bool drawWireframe) => Jolt.PInvoke.ConvexHullShape_Draw(this, renderer, centerOfMassTransform, scale, color, useMaterialColors, drawWireframe);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L82">Jolt/Physics/Collision/Shape/ConvexHullShape.h:82</see>
|
|
/// <br/>
|
|
/// <c>void DrawShrunkShape(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Debugging helper draw function that draws how all points are moved when a shape is shrunk by the convex
|
|
/// radius
|
|
/// </para>
|
|
/// </remarks>
|
|
public void DrawShrunkShape(DebugRenderer renderer, float4x4 centerOfMassTransform, float3 scale) => Jolt.PInvoke.ConvexHullShape_DrawShrunkShape(this, renderer, centerOfMassTransform, scale);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L93">Jolt/Physics/Collision/Shape/ConvexHullShape.h:93</see>
|
|
/// <br/>
|
|
/// <c>virtual void CollideSoftBodyVertices(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const CollideSoftBodyVertexIterator &inVertices, uint inNumVertices, int inCollidingShapeIndex) const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// See: Shape::CollideSoftBodyVertices
|
|
/// </para>
|
|
/// </remarks>
|
|
public void CollideSoftBodyVertices(float4x4 centerOfMassTransform, float3 scale, CollideSoftBodyVertexIterator vertices, uint numVertices, int collidingShapeIndex) => Jolt.PInvoke.ConvexHullShape_CollideSoftBodyVertices(this, centerOfMassTransform, scale, vertices, numVertices, collidingShapeIndex);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L96">Jolt/Physics/Collision/Shape/ConvexHullShape.h:96</see>
|
|
/// <br/>
|
|
/// <c>virtual void GetTrianglesStart(GetTrianglesContext &ioContext, const AABox &inBox, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale) const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// See Shape::GetTrianglesStart
|
|
/// </para>
|
|
/// </remarks>
|
|
public void GetTrianglesStart(ref Shape.GetTrianglesContext context, AABox box, float3 positionCOM, floatQuat rotation, float3 scale) => Jolt.PInvoke.ConvexHullShape_GetTrianglesStart(this, ref context, box, positionCOM, rotation, scale);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L102">Jolt/Physics/Collision/Shape/ConvexHullShape.h:102</see>
|
|
/// <br/>
|
|
/// <c>virtual void SaveBinaryState(StreamOut &inStream) const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// See Shape
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.ConvexHullShape_SaveBinaryState(this, stream);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L108">Jolt/Physics/Collision/Shape/ConvexHullShape.h:108</see>
|
|
/// <br/>
|
|
/// <c>virtual float GetVolume() const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// See Shape::GetVolume
|
|
/// </para>
|
|
/// </remarks>
|
|
public float GetVolume() => Jolt.PInvoke.ConvexHullShape_GetVolume(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L111">Jolt/Physics/Collision/Shape/ConvexHullShape.h:111</see>
|
|
/// <br/>
|
|
/// <c>float GetConvexRadius() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get the convex radius of this convex hull
|
|
/// </para>
|
|
/// </remarks>
|
|
public float GetConvexRadius() => Jolt.PInvoke.ConvexHullShape_GetConvexRadius(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L117">Jolt/Physics/Collision/Shape/ConvexHullShape.h:117</see>
|
|
/// <br/>
|
|
/// <c>inline uint GetNumPoints() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get the number of vertices in this convex hull
|
|
/// </para>
|
|
/// </remarks>
|
|
public uint GetNumPoints() => Jolt.PInvoke.ConvexHullShape_GetNumPoints(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L120">Jolt/Physics/Collision/Shape/ConvexHullShape.h:120</see>
|
|
/// <br/>
|
|
/// <c>inline Vec3 GetPoint(uint inIndex) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get a vertex of this convex hull relative to the center of mass
|
|
/// </para>
|
|
/// </remarks>
|
|
public float3 GetPoint(uint index) => Jolt.PInvoke.ConvexHullShape_GetPoint(this, index);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L123">Jolt/Physics/Collision/Shape/ConvexHullShape.h:123</see>
|
|
/// <br/>
|
|
/// <c>inline uint GetNumFaces() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get the number of faces in this convex hull
|
|
/// </para>
|
|
/// </remarks>
|
|
public uint GetNumFaces() => Jolt.PInvoke.ConvexHullShape_GetNumFaces(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L126">Jolt/Physics/Collision/Shape/ConvexHullShape.h:126</see>
|
|
/// <br/>
|
|
/// <c>inline uint GetNumVerticesInFace(uint inFaceIndex) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get the number of vertices in a face
|
|
/// </para>
|
|
/// </remarks>
|
|
public uint GetNumVerticesInFace(uint faceIndex) => Jolt.PInvoke.ConvexHullShape_GetNumVerticesInFace(this, faceIndex);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L133">Jolt/Physics/Collision/Shape/ConvexHullShape.h:133</see>
|
|
/// <br/>
|
|
/// <c>inline uint GetFaceVertices(uint inFaceIndex, uint inMaxVertices, uint *outVertices) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Get the vertices indices of a face
|
|
/// @param inFaceIndex Index of the face.
|
|
/// @param inMaxVertices Maximum number of vertices to return.
|
|
/// @param outVertices Array of vertices indices, must be at least inMaxVertices in size, the vertices are returned in counter clockwise order and the positions can be obtained using GetPoint(index).
|
|
/// @return Number of vertices in face, if this is bigger than inMaxVertices, not all vertices were retrieved.
|
|
/// </code>
|
|
/// </remarks>
|
|
public unsafe uint GetFaceVertices(uint faceIndex, uint maxVertices, Ptr<uint> vertices) => Jolt.PInvoke.ConvexHullShape_GetFaceVertices(this, faceIndex, maxVertices, vertices);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L144">Jolt/Physics/Collision/Shape/ConvexHullShape.h:144</see>
|
|
/// <br/>
|
|
/// <c>static void sRegister()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Register shape functions with the registry
|
|
/// </para>
|
|
/// </remarks>
|
|
public static void sRegister() => Jolt.PInvoke.ConvexHullShape_sRegister();
|
|
public void AddRef() => Jolt.PInvoke.ConvexHullShape_AddRef(this);
|
|
public void Release() => Jolt.PInvoke.ConvexHullShape_Release(this);
|
|
public uint GetRefCount() => Jolt.PInvoke.ConvexHullShape_GetRefCount(this);
|
|
public static implicit operator ConvexShape(ConvexHullShape value) => Jolt.PInvoke.ConvexHullShape_AsConvexShape(value);
|
|
public static implicit operator Shape(ConvexHullShape value) => Jolt.PInvoke.ConvexHullShape_AsShape(value);
|
|
public void Dispose()
|
|
{
|
|
if (IsNull()) return;
|
|
Release();
|
|
}
|
|
}
|
|
}
|