//
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using System.Runtime.CompilerServices;
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
///
///
/// Class that constructs a SphereShape
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/SphereShape.h:12
///
/// class SphereShapeSettings final : public ConvexShapeSettings
///
///
[InteropHandle]
public readonly partial struct SphereShapeSettings : IDisposable
{
///
///
/// Default constructor for deserialization
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/SphereShape.h:18
///
/// SphereShapeSettings() = default
///
///
public static SphereShapeSettings Create() => Jolt.PInvoke.SphereShapeSettings_Create();
///
///
/// Create a sphere with radius inRadius
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/SphereShape.h:21
///
/// explicit SphereShapeSettings(float inRadius, const PhysicsMaterial *inMaterial = nullptr)
///
///
public static SphereShapeSettings Create(float radius, PhysicsMaterial material = default) =>
Jolt.PInvoke.SphereShapeSettings_Create_2(radius, material);
///
public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI();
///
public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti);
///
public Shape CreateShape() => ((ShapeSettings)this).CreateShape();
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/SphereShape.h:26
///
/// float mRadius = 0.0f
///
///
public float GetRadius() => Jolt.PInvoke.SphereShapeSettings_GetRadius(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/SphereShape.h:26
///
/// float mRadius = 0.0f
///
///
public void SetRadius(float value) => Jolt.PInvoke.SphereShapeSettings_SetRadius(this, value);
public void AddRef() => ((ShapeSettings)this).AddRef();
public void Release() => ((ShapeSettings)this).Release();
public uint GetRefCount() => ((ShapeSettings)this).GetRefCount();
public static implicit operator ConvexShapeSettings(SphereShapeSettings value) =>
Unsafe.BitCast(value);
public static implicit operator ShapeSettings(SphereShapeSettings value) =>
Unsafe.BitCast(value);
public void Dispose()
{
if (IsNull())
return;
Release();
}
///
public void SetDensity(float density) => ((ConvexShapeSettings)this).SetDensity(density);
///
public PhysicsMaterial GetMaterial() => ((ConvexShapeSettings)this).GetMaterial();
///
public void SetMaterial(PhysicsMaterial value) => ((ConvexShapeSettings)this).SetMaterial(value);
///
public float GetDensity() => ((ConvexShapeSettings)this).GetDensity();
///
public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult();
///
public ulong GetUserData() => ((ShapeSettings)this).GetUserData();
///
public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value);
}
}