// // 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:13 ///
/// class BoxShapeSettings final : public ConvexShapeSettings ///
///
/// /// /// Class that constructs a BoxShape /// /// [InteropHandle] public readonly partial struct BoxShapeSettings : IDisposable { /// /// /// C++: /// Jolt/Physics/Collision/Shape/BoxShape.h:19 ///
/// BoxShapeSettings() = default ///
///
/// /// /// Default constructor for deserialization /// /// public static BoxShapeSettings Create() => Jolt.PInvoke.BoxShapeSettings_Create(); /// /// /// C++: /// Jolt/Physics/Collision/Shape/BoxShape.h:23 ///
/// explicit BoxShapeSettings(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 BoxShapeSettings Create(float3 halfExtent, float convexRadius, PhysicsMaterial material) => Jolt.PInvoke.BoxShapeSettings_Create_2(halfExtent, convexRadius, material); /// /// /// C++: /// Jolt/Physics/Collision/Shape/BoxShape.h:15 ///
/// ///
///
/// /// /// The returned handle is borrowed from its owner; don't Dispose it. /// /// public RTTI GetRTTI() => Jolt.PInvoke.BoxShapeSettings_GetRTTI(this); /// /// /// C++: /// Jolt/Physics/Collision/Shape/BoxShape.h:15 ///
/// ///
///
public unsafe Ptr CastTo(RTTI rTTI) => Jolt.PInvoke.BoxShapeSettings_CastTo(this, rTTI); /// /// /// C++: /// Jolt/Physics/Collision/Shape/BoxShape.h:26 ///
/// virtual ShapeResult Create() const override ///
///
/// /// /// See: ShapeSettings /// /// /// Throws InvalidOperationException with Jolt's error message when the operation fails. /// /// public Shape CreateShape() { var _handle = Jolt.PInvoke.BoxShapeSettings_CreateShape(this); if (_handle.IsNull()) throw new InvalidOperationException(Jolt.GetLastError()); return _handle; } /// /// /// Half the size of the box (including convex radius) /// /// /// C++: /// Jolt/Physics/Collision/Shape/BoxShape.h:28 ///
/// Vec3 mHalfExtent = Vec3::sZero() ///
///
public float3 GetHalfExtent() => Jolt.PInvoke.BoxShapeSettings_GetHalfExtent(this); /// /// /// Half the size of the box (including convex radius) /// /// /// C++: /// Jolt/Physics/Collision/Shape/BoxShape.h:28 ///
/// Vec3 mHalfExtent = Vec3::sZero() ///
///
public void SetHalfExtent(float3 value) => Jolt.PInvoke.BoxShapeSettings_SetHalfExtent(this, value); /// /// /// C++: /// Jolt/Physics/Collision/Shape/BoxShape.h:29 ///
/// float mConvexRadius = 0.0f ///
///
public float GetConvexRadius() => Jolt.PInvoke.BoxShapeSettings_GetConvexRadius(this); /// /// /// C++: /// Jolt/Physics/Collision/Shape/BoxShape.h:29 ///
/// float mConvexRadius = 0.0f ///
///
public void SetConvexRadius(float value) => Jolt.PInvoke.BoxShapeSettings_SetConvexRadius(this, value); public void AddRef() => Jolt.PInvoke.BoxShapeSettings_AddRef(this); public void Release() => Jolt.PInvoke.BoxShapeSettings_Release(this); public uint GetRefCount() => Jolt.PInvoke.BoxShapeSettings_GetRefCount(this); public static implicit operator ConvexShapeSettings(BoxShapeSettings value) => Jolt.PInvoke.BoxShapeSettings_AsConvexShapeSettings(value); public static implicit operator ShapeSettings(BoxShapeSettings value) => Jolt.PInvoke.BoxShapeSettings_AsShapeSettings(value); public void Dispose() { if (IsNull()) return; Release(); } } }