// // Generated by Brutal.Jolt.Generate; do not edit by hand. #nullable enable using Brutal.Interop; using Brutal.Numerics; namespace Brutal.JoltApi { /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:40 ///
/// class ConvexHullShape final : public ConvexShape ///
///
/// /// /// A convex hull /// /// [InteropHandle] public readonly partial struct ConvexHullShape : IDisposable { /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:167 ///
/// struct Face ///
///
[StructLayout(LayoutKind.Explicit, Size = 4)] public struct Face { /// /// /// First index in mVertexIdx to use /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:169 ///
/// uint16 mFirstVertex ///
///
[FieldOffset(0)] public ushort mFirstVertex; /// /// /// Number of vertices in the mVertexIdx to use /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:170 ///
/// uint16 mNumVertices = 0 ///
///
[FieldOffset(2)] public ushort mNumVertices; } /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:176 ///
/// struct Point ///
///
[StructLayout(LayoutKind.Explicit, Size = 32)] public struct Point { /// /// /// Position of vertex /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:178 ///
/// Vec3 mPosition ///
///
[FieldOffset(0)] public float3 mPosition; /// /// /// Number of faces in the face array below /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:179 ///
/// int mNumFaces = 0 ///
///
[FieldOffset(16)] public int mNumFaces; /// /// /// Indices of 3 neighboring faces with the biggest difference in normal (used to shift vertices for /// convex radius) /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:180 ///
/// int mFaces[3] = { -1, -1, -1 } ///
///
[FieldOffset(20)] public int_3 mFaces; } /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:50 ///
/// ConvexHullShape() ///
///
/// /// /// Constructor /// /// public static ConvexHullShape Create() => Jolt.PInvoke.ConvexHullShape_Create(); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:54 ///
/// virtual Vec3 GetCenterOfMass() const override ///
///
/// /// /// See Shape::GetCenterOfMass /// /// public float3 GetCenterOfMass() => Jolt.PInvoke.ConvexHullShape_GetCenterOfMass(this); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:60 ///
/// virtual float GetInnerRadius() const override ///
///
/// /// /// See Shape::GetInnerRadius /// /// public float GetInnerRadius() => Jolt.PInvoke.ConvexHullShape_GetInnerRadius(this); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:66 ///
/// virtual Vec3 GetSurfaceNormal(const SubShapeID &inSubShapeID, Vec3Arg inLocalSurfacePosition) const override ///
///
/// /// /// See Shape::GetSurfaceNormal /// /// public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => Jolt.PInvoke.ConvexHullShape_GetSurfaceNormal(this, subShapeID, localSurfacePosition); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:75 ///
/// virtual void GetSubmergedVolume(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const Plane &inSurface, float &outTotalVolume, float &outSubmergedVolume, Vec3 &outCenterOfBuoyancy JPH_IF_DEBUG_RENDERER(, RVec3Arg inBaseOffset)) const override ///
///
/// /// /// See Shape::GetSubmergedVolume /// /// 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); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:79 ///
/// virtual void Draw(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale, ColorArg inColor, bool inUseMaterialColors, bool inDrawWireframe) const override ///
///
/// /// /// See Shape::Draw /// /// 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); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:82 ///
/// void DrawShrunkShape(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale) const ///
///
/// /// /// Debugging helper draw function that draws how all points are moved when a shape is shrunk by the convex /// radius /// /// public void DrawShrunkShape(DebugRenderer renderer, float4x4 centerOfMassTransform, float3 scale) => Jolt.PInvoke.ConvexHullShape_DrawShrunkShape(this, renderer, centerOfMassTransform, scale); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:93 ///
/// virtual void CollideSoftBodyVertices(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const CollideSoftBodyVertexIterator &inVertices, uint inNumVertices, int inCollidingShapeIndex) const override ///
///
/// /// /// See: Shape::CollideSoftBodyVertices /// /// public void CollideSoftBodyVertices(float4x4 centerOfMassTransform, float3 scale, CollideSoftBodyVertexIterator vertices, uint numVertices, int collidingShapeIndex) => Jolt.PInvoke.ConvexHullShape_CollideSoftBodyVertices(this, centerOfMassTransform, scale, vertices, numVertices, collidingShapeIndex); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:96 ///
/// virtual void GetTrianglesStart(GetTrianglesContext &ioContext, const AABox &inBox, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale) const override ///
///
/// /// /// See Shape::GetTrianglesStart /// /// 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); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:102 ///
/// virtual void SaveBinaryState(StreamOut &inStream) const override ///
///
/// /// /// See Shape /// /// public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.ConvexHullShape_SaveBinaryState(this, stream); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:108 ///
/// virtual float GetVolume() const override ///
///
/// /// /// See Shape::GetVolume /// /// public float GetVolume() => Jolt.PInvoke.ConvexHullShape_GetVolume(this); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:111 ///
/// float GetConvexRadius() const ///
///
/// /// /// Get the convex radius of this convex hull /// /// public float GetConvexRadius() => Jolt.PInvoke.ConvexHullShape_GetConvexRadius(this); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:117 ///
/// inline uint GetNumPoints() const ///
///
/// /// /// Get the number of vertices in this convex hull /// /// public uint GetNumPoints() => Jolt.PInvoke.ConvexHullShape_GetNumPoints(this); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:120 ///
/// inline Vec3 GetPoint(uint inIndex) const ///
///
/// /// /// Get a vertex of this convex hull relative to the center of mass /// /// public float3 GetPoint(uint index) => Jolt.PInvoke.ConvexHullShape_GetPoint(this, index); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:123 ///
/// inline uint GetNumFaces() const ///
///
/// /// /// Get the number of faces in this convex hull /// /// public uint GetNumFaces() => Jolt.PInvoke.ConvexHullShape_GetNumFaces(this); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:126 ///
/// inline uint GetNumVerticesInFace(uint inFaceIndex) const ///
///
/// /// /// Get the number of vertices in a face /// /// public uint GetNumVerticesInFace(uint faceIndex) => Jolt.PInvoke.ConvexHullShape_GetNumVerticesInFace(this, faceIndex); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:133 ///
/// inline uint GetFaceVertices(uint inFaceIndex, uint inMaxVertices, uint *outVertices) const ///
///
/// /// /// 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. /// /// public unsafe uint GetFaceVertices(uint faceIndex, uint maxVertices, Ptr vertices) => Jolt.PInvoke.ConvexHullShape_GetFaceVertices(this, faceIndex, maxVertices, vertices); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexHullShape.h:144 ///
/// static void sRegister() ///
///
/// /// /// Register shape functions with the registry /// /// 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(); } } }