mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 04:58:24 +01:00
320 lines
16 KiB
C#
320 lines
16 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/MeshShape.h#L84">Jolt/Physics/Collision/Shape/MeshShape.h:84</see>
|
|
/// <br/>
|
|
/// <c>class MeshShape final : public Shape</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// A mesh shape, consisting of triangles. Mesh shapes are mostly used for static geometry.
|
|
/// They can be used by dynamic or kinematic objects but only if they don't collide with other mesh or heightfield shapes as those collisions are currently not supported.
|
|
/// Note that if you make a mesh shape a dynamic or kinematic object, you need to provide a mass yourself as mesh shapes don't need to form a closed hull so don't have a well defined volume from which the mass can be calculated.
|
|
/// </code>
|
|
/// </remarks>
|
|
[InteropHandle]
|
|
public readonly partial struct MeshShape : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MeshShape.h#L209">Jolt/Physics/Collision/Shape/MeshShape.h:209</see>
|
|
/// <br/>
|
|
/// <c>enum ETriangleFlags</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// 8 bit flags stored per triangle
|
|
/// </para>
|
|
/// </remarks>
|
|
public enum ETriangleFlags : int
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MeshShape.h#L212">Jolt/Physics/Collision/Shape/MeshShape.h:212</see>
|
|
/// <br/>
|
|
/// <c>FLAGS_MATERIAL_BITS = 5</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Material index
|
|
/// </para>
|
|
/// </remarks>
|
|
FLAGS_MATERIAL_BITS = 5,
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MeshShape.h#L213">Jolt/Physics/Collision/Shape/MeshShape.h:213</see>
|
|
/// <br/>
|
|
/// <c>FLAGS_MATERIAL_MASK = (1 << FLAGS_MATERIAL_BITS) - 1</c>
|
|
/// </para>
|
|
/// </summary>
|
|
FLAGS_MATERIAL_MASK = (1 << FLAGS_MATERIAL_BITS) - 1,
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MeshShape.h#L216">Jolt/Physics/Collision/Shape/MeshShape.h:216</see>
|
|
/// <br/>
|
|
/// <c>FLAGS_ACTIVE_EGDE_SHIFT = FLAGS_MATERIAL_BITS</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Active edge bits
|
|
/// </para>
|
|
/// </remarks>
|
|
FLAGS_ACTIVE_EGDE_SHIFT = FLAGS_MATERIAL_BITS,
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MeshShape.h#L217">Jolt/Physics/Collision/Shape/MeshShape.h:217</see>
|
|
/// <br/>
|
|
/// <c>FLAGS_ACTIVE_EDGE_BITS = 3</c>
|
|
/// </para>
|
|
/// </summary>
|
|
FLAGS_ACTIVE_EDGE_BITS = 3,
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MeshShape.h#L218">Jolt/Physics/Collision/Shape/MeshShape.h:218</see>
|
|
/// <br/>
|
|
/// <c>FLAGS_ACTIVE_EDGE_MASK = (1 << FLAGS_ACTIVE_EDGE_BITS) - 1</c>
|
|
/// </para>
|
|
/// </summary>
|
|
FLAGS_ACTIVE_EDGE_MASK = (1 << FLAGS_ACTIVE_EDGE_BITS) - 1,
|
|
}
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MeshShape.h#L90">Jolt/Physics/Collision/Shape/MeshShape.h:90</see>
|
|
/// <br/>
|
|
/// <c>MeshShape()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Constructor
|
|
/// </para>
|
|
/// </remarks>
|
|
public static MeshShape Create() => Jolt.PInvoke.MeshShape_Create();
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MeshShape.h#L94">Jolt/Physics/Collision/Shape/MeshShape.h:94</see>
|
|
/// <br/>
|
|
/// <c>virtual bool MustBeStatic() const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// See Shape::MustBeStatic
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool MustBeStatic() => Jolt.PInvoke.MeshShape_MustBeStatic(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MeshShape.h#L100">Jolt/Physics/Collision/Shape/MeshShape.h:100</see>
|
|
/// <br/>
|
|
/// <c>virtual uint GetSubShapeIDBitsRecursive() const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// See Shape::GetSubShapeIDBitsRecursive
|
|
/// </para>
|
|
/// </remarks>
|
|
public uint GetSubShapeIDBitsRecursive() => Jolt.PInvoke.MeshShape_GetSubShapeIDBitsRecursive(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MeshShape.h#L103">Jolt/Physics/Collision/Shape/MeshShape.h:103</see>
|
|
/// <br/>
|
|
/// <c>virtual float GetInnerRadius() const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// See Shape::GetInnerRadius
|
|
/// </para>
|
|
/// </remarks>
|
|
public float GetInnerRadius() => Jolt.PInvoke.MeshShape_GetInnerRadius(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MeshShape.h#L109">Jolt/Physics/Collision/Shape/MeshShape.h:109</see>
|
|
/// <br/>
|
|
/// <c>virtual const PhysicsMaterial * GetMaterial(const SubShapeID &inSubShapeID) const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// See Shape::GetMaterial
|
|
/// </para>
|
|
/// </remarks>
|
|
public PhysicsMaterial GetMaterial(uint subShapeID) => Jolt.PInvoke.MeshShape_GetMaterial(this, subShapeID);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MeshShape.h#L116">Jolt/Physics/Collision/Shape/MeshShape.h:116</see>
|
|
/// <br/>
|
|
/// <c>uint GetMaterialIndex(const SubShapeID &inSubShapeID) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Determine which material index a particular sub shape uses (note that if there are no materials this function will return 0 so check the array size)
|
|
/// Note: This could for example be used to create a decorator shape around a mesh shape that overrides the GetMaterial call to replace a material with another material.
|
|
/// </code>
|
|
/// </remarks>
|
|
public uint GetMaterialIndex(uint subShapeID) => Jolt.PInvoke.MeshShape_GetMaterialIndex(this, subShapeID);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MeshShape.h#L119">Jolt/Physics/Collision/Shape/MeshShape.h:119</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.MeshShape_GetSurfaceNormal(this, subShapeID, localSurfacePosition);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MeshShape.h#L126">Jolt/Physics/Collision/Shape/MeshShape.h:126</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.MeshShape_Draw(this, renderer, centerOfMassTransform, scale, color, useMaterialColors, drawWireframe);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MeshShape.h#L139">Jolt/Physics/Collision/Shape/MeshShape.h:139</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.MeshShape_CollideSoftBodyVertices(this, centerOfMassTransform, scale, vertices, numVertices, collidingShapeIndex);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MeshShape.h#L142">Jolt/Physics/Collision/Shape/MeshShape.h:142</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.MeshShape_GetTrianglesStart(this, ref context, box, positionCOM, rotation, scale);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MeshShape.h#L148">Jolt/Physics/Collision/Shape/MeshShape.h:148</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.MeshShape_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/MeshShape.h#L151">Jolt/Physics/Collision/Shape/MeshShape.h:151</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.MeshShape_SaveBinaryState(this, stream);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MeshShape.h#L159">Jolt/Physics/Collision/Shape/MeshShape.h:159</see>
|
|
/// <br/>
|
|
/// <c>virtual float GetVolume() const override</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// See Shape::GetVolume
|
|
/// </para>
|
|
/// </remarks>
|
|
public float GetVolume() => Jolt.PInvoke.MeshShape_GetVolume(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MeshShape.h#L162">Jolt/Physics/Collision/Shape/MeshShape.h:162</see>
|
|
/// <br/>
|
|
/// <c>uint32 GetTriangleUserData(const SubShapeID &inSubShapeID) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// When MeshShape::mPerTriangleUserData is true, this function can be used to retrieve the user data that
|
|
/// was stored in the mesh shape.
|
|
/// </para>
|
|
/// </remarks>
|
|
public uint GetTriangleUserData(uint subShapeID) => Jolt.PInvoke.MeshShape_GetTriangleUserData(this, subShapeID);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MeshShape.h#L171">Jolt/Physics/Collision/Shape/MeshShape.h:171</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.MeshShape_sRegister();
|
|
public void AddRef() => Jolt.PInvoke.MeshShape_AddRef(this);
|
|
public void Release() => Jolt.PInvoke.MeshShape_Release(this);
|
|
public uint GetRefCount() => Jolt.PInvoke.MeshShape_GetRefCount(this);
|
|
public static implicit operator Shape(MeshShape value) => Jolt.PInvoke.MeshShape_AsShape(value);
|
|
public void Dispose()
|
|
{
|
|
if (IsNull()) return;
|
|
Release();
|
|
}
|
|
}
|
|
}
|