// // 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/BoxShape.h:33 ///
/// class BoxShape final : public ConvexShape ///
///
/// /// /// A box, centered around the origin /// /// [InteropHandle] public readonly partial struct BoxShape : IDisposable { /// /// /// C++: /// Jolt/Physics/Collision/Shape/BoxShape.h:39 ///
/// BoxShape() ///
///
/// /// /// Constructor /// /// public static BoxShape Create() => Jolt.PInvoke.BoxShape_Create(); /// /// /// C++: /// Jolt/Physics/Collision/Shape/BoxShape.h:44 ///
/// explicit BoxShape(Vec3Arg inHalfExtent, float inConvexRadius = cDefaultConvexRadius, const PhysicsMaterial *inMaterial = nullptr) ///
///
/// /// /// Create a box with half edge length inHalfExtent and convex radius inConvexRadius. /// (internally the convex radius will be subtracted from the half extent so the total box will not grow with the convex radius). /// /// public static BoxShape Create(float3 halfExtent, float convexRadius, PhysicsMaterial material) => Jolt.PInvoke.BoxShape_Create_2(halfExtent, convexRadius, material); /// /// /// C++: /// Jolt/Physics/Collision/Shape/BoxShape.h:47 ///
/// Vec3 GetHalfExtent() const ///
///
/// /// /// Get half extent of box /// /// public float3 GetHalfExtent() => Jolt.PInvoke.BoxShape_GetHalfExtent(this); /// /// /// C++: /// Jolt/Physics/Collision/Shape/BoxShape.h:53 ///
/// virtual float GetInnerRadius() const override ///
///
/// /// /// See Shape::GetInnerRadius /// /// public float GetInnerRadius() => Jolt.PInvoke.BoxShape_GetInnerRadius(this); /// /// /// C++: /// Jolt/Physics/Collision/Shape/BoxShape.h:59 ///
/// virtual Vec3 GetSurfaceNormal(const SubShapeID &inSubShapeID, Vec3Arg inLocalSurfacePosition) const override ///
///
/// /// /// See Shape::GetSurfaceNormal /// /// public float3 GetSurfaceNormal(uint subShapeID, float3 localSurfacePosition) => Jolt.PInvoke.BoxShape_GetSurfaceNormal(this, subShapeID, localSurfacePosition); /// /// /// C++: /// Jolt/Physics/Collision/Shape/BoxShape.h:69 ///
/// 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.BoxShape_Draw(this, renderer, centerOfMassTransform, scale, color, useMaterialColors, drawWireframe); /// /// /// C++: /// Jolt/Physics/Collision/Shape/BoxShape.h:80 ///
/// 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.BoxShape_CollideSoftBodyVertices(this, centerOfMassTransform, scale, vertices, numVertices, collidingShapeIndex); /// /// /// C++: /// Jolt/Physics/Collision/Shape/BoxShape.h:83 ///
/// 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.BoxShape_GetTrianglesStart(this, ref context, box, positionCOM, rotation, scale); /// /// /// C++: /// Jolt/Physics/Collision/Shape/BoxShape.h:89 ///
/// virtual void SaveBinaryState(StreamOut &inStream) const override ///
///
/// /// /// See Shape /// /// public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.BoxShape_SaveBinaryState(this, stream); /// /// /// C++: /// Jolt/Physics/Collision/Shape/BoxShape.h:95 ///
/// virtual float GetVolume() const override ///
///
/// /// /// See Shape::GetVolume /// /// public float GetVolume() => Jolt.PInvoke.BoxShape_GetVolume(this); /// /// /// C++: /// Jolt/Physics/Collision/Shape/BoxShape.h:98 ///
/// float GetConvexRadius() const ///
///
/// /// /// Get the convex radius of this box /// /// public float GetConvexRadius() => Jolt.PInvoke.BoxShape_GetConvexRadius(this); /// /// /// C++: /// Jolt/Physics/Collision/Shape/BoxShape.h:101 ///
/// static void sRegister() ///
///
/// /// /// Register shape functions with the registry /// /// public static void sRegister() => Jolt.PInvoke.BoxShape_sRegister(); public void AddRef() => Jolt.PInvoke.BoxShape_AddRef(this); public void Release() => Jolt.PInvoke.BoxShape_Release(this); public uint GetRefCount() => Jolt.PInvoke.BoxShape_GetRefCount(this); public static implicit operator ConvexShape(BoxShape value) => Jolt.PInvoke.BoxShape_AsConvexShape(value); public static implicit operator Shape(BoxShape value) => Jolt.PInvoke.BoxShape_AsShape(value); public void Dispose() { if (IsNull()) return; Release(); } } }