//
// 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/EmptyShape.h:13
///
/// class EmptyShapeSettings final : public ShapeSettings
///
///
///
///
/// Class that constructs an EmptyShape
///
///
[InteropHandle]
public readonly partial struct EmptyShapeSettings : IDisposable
{
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/EmptyShape.h:18
///
/// EmptyShapeSettings() = default
///
///
public static EmptyShapeSettings Create() => Jolt.PInvoke.EmptyShapeSettings_Create();
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/EmptyShape.h:19
///
/// explicit EmptyShapeSettings(Vec3Arg inCenterOfMass)
///
///
public static EmptyShapeSettings Create(float3 centerOfMass) => Jolt.PInvoke.EmptyShapeSettings_Create_2(centerOfMass);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/EmptyShape.h:15
///
///
///
///
///
///
/// The returned handle is borrowed from its owner; don't Dispose it.
///
///
public RTTI GetRTTI() => Jolt.PInvoke.EmptyShapeSettings_GetRTTI(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/EmptyShape.h:15
///
///
///
///
public unsafe Ptr CastTo(RTTI rTTI) => Jolt.PInvoke.EmptyShapeSettings_CastTo(this, rTTI);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/EmptyShape.h:21
///
/// ShapeResult Create() const override
///
///
///
///
/// Throws InvalidOperationException with Jolt's error message when the operation fails.
///
///
public Shape CreateShape()
{
var _handle = Jolt.PInvoke.EmptyShapeSettings_CreateShape(this);
if (_handle.IsNull()) throw new InvalidOperationException(Jolt.GetLastError());
return _handle;
}
///
///
/// Determines the center of mass for this shape
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/EmptyShape.h:23
///
/// Vec3 mCenterOfMass = Vec3::sZero()
///
///
public float3 GetCenterOfMass() => Jolt.PInvoke.EmptyShapeSettings_GetCenterOfMass(this);
///
///
/// Determines the center of mass for this shape
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/EmptyShape.h:23
///
/// Vec3 mCenterOfMass = Vec3::sZero()
///
///
public void SetCenterOfMass(float3 value) => Jolt.PInvoke.EmptyShapeSettings_SetCenterOfMass(this, value);
public void AddRef() => Jolt.PInvoke.EmptyShapeSettings_AddRef(this);
public void Release() => Jolt.PInvoke.EmptyShapeSettings_Release(this);
public uint GetRefCount() => Jolt.PInvoke.EmptyShapeSettings_GetRefCount(this);
public static implicit operator ShapeSettings(EmptyShapeSettings value) => Jolt.PInvoke.EmptyShapeSettings_AsShapeSettings(value);
public void Dispose()
{
if (IsNull()) return;
Release();
}
}
}