// // 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/ConvexShape.h:35 ///
/// class ConvexShape : public Shape ///
///
/// /// /// Base class for all convex shapes. Defines a virtual interface. /// /// [InteropHandle] public readonly partial struct ConvexShape : IDisposable { /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexShape.h:91 ///
/// enum class ESupportMode ///
///
/// /// /// How the GetSupport function should behave /// /// public enum ESupportMode : int { /// /// /// Return the shape excluding the convex radius, Support::GetConvexRadius will return the convex radius /// if there is one, but adding this radius may not result in the most accurate/efficient representation /// of shapes with sharp edges /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexShape.h:93 ///
/// ExcludeConvexRadius ///
///
ExcludeConvexRadius, /// /// /// Return the shape including the convex radius, Support::GetSupport includes the convex radius if /// there is one, Support::GetConvexRadius will return 0 /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexShape.h:94 ///
/// IncludeConvexRadius ///
///
IncludeConvexRadius, /// /// /// Use both Support::GetSupport add Support::GetConvexRadius to get a support point that matches the /// original shape as accurately/efficiently as possible /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexShape.h:95 ///
/// Default ///
///
Default, } /// /// /// Convex shapes don't have sub shapes /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexShape.h:46 ///
/// virtual uint GetSubShapeIDBitsRecursive() const override ///
///
/// /// /// See Shape::GetSubShapeIDBitsRecursive /// /// public uint GetSubShapeIDBitsRecursive() => Jolt.PInvoke.ConvexShape_GetSubShapeIDBitsRecursive(this); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexShape.h:49 ///
/// virtual const PhysicsMaterial * GetMaterial(const SubShapeID &inSubShapeID) const override ///
///
/// /// /// See Shape::GetMaterial /// /// public PhysicsMaterial GetMaterial(uint subShapeID) => Jolt.PInvoke.ConvexShape_GetMaterial(this, subShapeID); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexShape.h:59 ///
/// 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.ConvexShape_GetTrianglesStart(this, ref context, box, positionCOM, rotation, scale); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexShape.h:65 ///
/// 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.ConvexShape_GetSubmergedVolume(this, centerOfMassTransform, scale, surface, out totalVolume, out submergedVolume, out centerOfBuoyancy, baseOffset); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexShape.h:105 ///
/// void SetMaterial(const PhysicsMaterial *inMaterial) ///
///
/// /// /// Material of the shape /// /// public void SetMaterial(PhysicsMaterial material) => Jolt.PInvoke.ConvexShape_SetMaterial(this, material); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexShape.h:106 ///
/// const PhysicsMaterial * GetMaterial() const ///
///
public PhysicsMaterial GetMaterial() => Jolt.PInvoke.ConvexShape_GetMaterial_2(this); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexShape.h:109 ///
/// void SetDensity(float inDensity) ///
///
/// /// /// Set density of the shape (kg / m^3) /// /// public void SetDensity(float density) => Jolt.PInvoke.ConvexShape_SetDensity(this, density); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexShape.h:112 ///
/// float GetDensity() const ///
///
/// /// /// Get density of the shape (kg / m^3) /// /// public float GetDensity() => Jolt.PInvoke.ConvexShape_GetDensity(this); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexShape.h:116 ///
/// virtual void DrawGetSupportFunction(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale, ColorArg inColor, bool inDrawSupportDirection) const override ///
///
/// /// /// See Shape::DrawGetSupportFunction /// /// public void DrawGetSupportFunction(DebugRenderer renderer, float4x4 centerOfMassTransform, float3 scale, uint color, bool drawSupportDirection) => Jolt.PInvoke.ConvexShape_DrawGetSupportFunction(this, renderer, centerOfMassTransform, scale, color, drawSupportDirection); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexShape.h:119 ///
/// virtual void DrawGetSupportingFace(DebugRenderer *inRenderer, RMat44Arg inCenterOfMassTransform, Vec3Arg inScale) const override ///
///
/// /// /// See Shape::DrawGetSupportingFace /// /// public void DrawGetSupportingFace(DebugRenderer renderer, float4x4 centerOfMassTransform, float3 scale) => Jolt.PInvoke.ConvexShape_DrawGetSupportingFace(this, renderer, centerOfMassTransform, scale); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexShape.h:123 ///
/// virtual void SaveBinaryState(StreamOut &inStream) const override ///
///
/// /// /// See Shape /// /// public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.ConvexShape_SaveBinaryState(this, stream); /// /// /// C++: /// Jolt/Physics/Collision/Shape/ConvexShape.h:128 ///
/// static void sRegister() ///
///
/// /// /// Register shape functions with the registry /// /// public static void sRegister() => Jolt.PInvoke.ConvexShape_sRegister(); public void AddRef() => Jolt.PInvoke.ConvexShape_AddRef(this); public void Release() => Jolt.PInvoke.ConvexShape_Release(this); public uint GetRefCount() => Jolt.PInvoke.ConvexShape_GetRefCount(this); public static implicit operator Shape(ConvexShape value) => Jolt.PInvoke.ConvexShape_AsShape(value); public void Dispose() { if (IsNull()) return; Release(); } } }