//
// 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/MutableCompoundShape.h:14
///
/// class MutableCompoundShapeSettings final : public CompoundShapeSettings
///
///
///
///
/// Class that constructs a MutableCompoundShape.
///
///
[InteropHandle]
public readonly partial struct MutableCompoundShapeSettings : IDisposable
{
public static MutableCompoundShapeSettings Create() => Jolt.PInvoke.MutableCompoundShapeSettings_Create();
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/MutableCompoundShape.h:16
///
///
///
///
///
///
/// The returned handle is borrowed from its owner; don't Dispose it.
///
///
public RTTI GetRTTI() => Jolt.PInvoke.MutableCompoundShapeSettings_GetRTTI(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/MutableCompoundShape.h:16
///
///
///
///
public unsafe Ptr CastTo(RTTI rTTI) => Jolt.PInvoke.MutableCompoundShapeSettings_CastTo(this, rTTI);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/MutableCompoundShape.h:20
///
/// 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.MutableCompoundShapeSettings_CreateShape(this);
if (_handle.IsNull()) throw new InvalidOperationException(Jolt.GetLastError());
return _handle;
}
public void AddRef() => Jolt.PInvoke.MutableCompoundShapeSettings_AddRef(this);
public void Release() => Jolt.PInvoke.MutableCompoundShapeSettings_Release(this);
public uint GetRefCount() => Jolt.PInvoke.MutableCompoundShapeSettings_GetRefCount(this);
public static implicit operator CompoundShapeSettings(MutableCompoundShapeSettings value) => Jolt.PInvoke.MutableCompoundShapeSettings_AsCompoundShapeSettings(value);
public static implicit operator ShapeSettings(MutableCompoundShapeSettings value) => Jolt.PInvoke.MutableCompoundShapeSettings_AsShapeSettings(value);
public void Dispose()
{
if (IsNull()) return;
Release();
}
}
}