//
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyShape.h:15
///
/// class SoftBodyShape final : public Shape
///
///
///
///
/// Shape used exclusively for soft bodies. Adds the ability to perform collision checks against soft bodies.
///
///
[InteropHandle]
public readonly partial struct SoftBodyShape : IDisposable
{
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyShape.h:21
///
/// SoftBodyShape()
///
///
///
///
/// Constructor
///
///
public static SoftBodyShape Create() => Jolt.PInvoke.SoftBodyShape_Create();
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyShape.h:24
///
/// uint GetSubShapeIDBits() const
///
///
///
///
/// Determine amount of bits needed to encode sub shape id
///
///
public uint GetSubShapeIDBits() => Jolt.PInvoke.SoftBodyShape_GetSubShapeIDBits(this);
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyShape.h:27
///
/// uint32 GetFaceIndex(const SubShapeID &inSubShapeID) const
///
///
///
///
/// Convert a sub shape ID back to a face index
///
///
public uint GetFaceIndex(uint subShapeID) => Jolt.PInvoke.SoftBodyShape_GetFaceIndex(this, subShapeID);
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyShape.h:30
///
/// virtual bool MustBeStatic() const override
///
///
///
///
/// See Shape
///
///
public bool MustBeStatic() => Jolt.PInvoke.SoftBodyShape_MustBeStatic(this);
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyShape.h:31
///
/// virtual Vec3 GetCenterOfMass() const override
///
///
public float3 GetCenterOfMass() => Jolt.PInvoke.SoftBodyShape_GetCenterOfMass(this);
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyShape.h:33
///
/// virtual uint GetSubShapeIDBitsRecursive() const override
///
///
public uint GetSubShapeIDBitsRecursive() => Jolt.PInvoke.SoftBodyShape_GetSubShapeIDBitsRecursive(this);
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyShape.h:34
///
/// virtual float GetInnerRadius() const override
///
///
public float GetInnerRadius() => Jolt.PInvoke.SoftBodyShape_GetInnerRadius(this);
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyShape.h:36
///
/// virtual const PhysicsMaterial * GetMaterial(const SubShapeID &inSubShapeID) const override
///
///
public PhysicsMaterial GetMaterial(uint subShapeID) => Jolt.PInvoke.SoftBodyShape_GetMaterial(this, subShapeID);
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyShape.h:37
///
/// virtual Vec3 GetSurfaceNormal(const SubShapeID &inSubShapeID, Vec3Arg inLocalSurfacePosition) const override
///
///
public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => Jolt.PInvoke.SoftBodyShape_GetSurfaceNormal(this, subShapeID, localSurfacePosition);
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyShape.h:39
///
/// virtual void GetSubmergedVolume(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const Plane &inSurface, float &outTotalVolume, float &outSubmergedVolume, Vec3 &outCenterOfBuoyancy
///
///
public void GetSubmergedVolume(float4x4 centerOfMassTransform, float3 scale, Plane surface, out float totalVolume, out float submergedVolume, out float3 centerOfBuoyancy, float3 baseOffset) => Jolt.PInvoke.SoftBodyShape_GetSubmergedVolume(this, centerOfMassTransform, scale, surface, out totalVolume, out submergedVolume, out centerOfBuoyancy, baseOffset);
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyShape.h:45
///
/// virtual void Draw(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale, ColorArg inColor, bool inUseMaterialColors, bool inDrawWireframe) const override
///
///
public void Draw(DebugRenderer renderer, float4x4 centerOfMassTransform, float3 scale, uint color, bool useMaterialColors, bool drawWireframe) => Jolt.PInvoke.SoftBodyShape_Draw(this, renderer, centerOfMassTransform, scale, color, useMaterialColors, drawWireframe);
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyShape.h:50
///
/// virtual void CollideSoftBodyVertices(Mat44Arg inCenterOfMassTransform, Vec3Arg inScale, const CollideSoftBodyVertexIterator &inVertices, uint inNumVertices, int inCollidingShapeIndex) const override
///
///
public void CollideSoftBodyVertices(float4x4 centerOfMassTransform, float3 scale, CollideSoftBodyVertexIterator vertices, uint numVertices, int collidingShapeIndex) => Jolt.PInvoke.SoftBodyShape_CollideSoftBodyVertices(this, centerOfMassTransform, scale, vertices, numVertices, collidingShapeIndex);
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyShape.h:51
///
/// virtual void GetTrianglesStart(GetTrianglesContext &ioContext, const AABox &inBox, Vec3Arg inPositionCOM, QuatArg inRotation, Vec3Arg inScale) const override
///
///
public void GetTrianglesStart(ref Shape.GetTrianglesContext context, AABox box, float3 positionCOM, floatQuat rotation, float3 scale) => Jolt.PInvoke.SoftBodyShape_GetTrianglesStart(this, ref context, box, positionCOM, rotation, scale);
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyShape.h:54
///
/// virtual float GetVolume() const override
///
///
public float GetVolume() => Jolt.PInvoke.SoftBodyShape_GetVolume(this);
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyShape.h:57
///
/// static void sRegister()
///
///
///
///
/// Register shape functions with the registry
///
///
public static void sRegister() => Jolt.PInvoke.SoftBodyShape_sRegister();
public void AddRef() => Jolt.PInvoke.SoftBodyShape_AddRef(this);
public void Release() => Jolt.PInvoke.SoftBodyShape_Release(this);
public uint GetRefCount() => Jolt.PInvoke.SoftBodyShape_GetRefCount(this);
public static implicit operator Shape(SoftBodyShape value) => Jolt.PInvoke.SoftBodyShape_AsShape(value);
public void Dispose()
{
if (IsNull()) return;
Release();
}
}
}