brutal/brutal.jolt/Brutal.Jolt/Generated/Classes/SphereShapeSettings.gen.cs
2026-10-15 14:12:02 +13:00

127 lines
5.7 KiB
C#

// <auto-generated/>
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L12">Jolt/Physics/Collision/Shape/SphereShape.h:12</see>
/// <br/>
/// <c>class SphereShapeSettings final : public ConvexShapeSettings</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Class that constructs a SphereShape
/// </para>
/// </remarks>
[InteropHandle]
public readonly partial struct SphereShapeSettings : IDisposable
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L18">Jolt/Physics/Collision/Shape/SphereShape.h:18</see>
/// <br/>
/// <c>SphereShapeSettings() = default</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Default constructor for deserialization
/// </para>
/// </remarks>
public static SphereShapeSettings Create() => Jolt.PInvoke.SphereShapeSettings_Create();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L21">Jolt/Physics/Collision/Shape/SphereShape.h:21</see>
/// <br/>
/// <c>explicit SphereShapeSettings(float inRadius, const PhysicsMaterial *inMaterial = nullptr)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Create a sphere with radius inRadius
/// </para>
/// </remarks>
public static SphereShapeSettings Create(float radius, PhysicsMaterial material) => Jolt.PInvoke.SphereShapeSettings_Create_2(radius, material);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L14">Jolt/Physics/Collision/Shape/SphereShape.h:14</see>
/// <br/>
/// <c></c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// The returned handle is borrowed from its owner; don't Dispose it.
/// </para>
/// </remarks>
public RTTI GetRTTI() => Jolt.PInvoke.SphereShapeSettings_GetRTTI(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L14">Jolt/Physics/Collision/Shape/SphereShape.h:14</see>
/// <br/>
/// <c></c>
/// </para>
/// </summary>
public unsafe Ptr CastTo(RTTI rTTI) => Jolt.PInvoke.SphereShapeSettings_CastTo(this, rTTI);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L24">Jolt/Physics/Collision/Shape/SphereShape.h:24</see>
/// <br/>
/// <c>virtual ShapeResult Create() const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See: ShapeSettings
/// </para>
/// <para>
/// Throws InvalidOperationException with Jolt's error message when the operation fails.
/// </para>
/// </remarks>
public Shape CreateShape()
{
var _handle = Jolt.PInvoke.SphereShapeSettings_CreateShape(this);
if (_handle.IsNull()) throw new InvalidOperationException(Jolt.GetLastError());
return _handle;
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L26">Jolt/Physics/Collision/Shape/SphereShape.h:26</see>
/// <br/>
/// <c>float mRadius = 0.0f</c>
/// </para>
/// </summary>
public float GetRadius() => Jolt.PInvoke.SphereShapeSettings_GetRadius(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/SphereShape.h#L26">Jolt/Physics/Collision/Shape/SphereShape.h:26</see>
/// <br/>
/// <c>float mRadius = 0.0f</c>
/// </para>
/// </summary>
public void SetRadius(float value) => Jolt.PInvoke.SphereShapeSettings_SetRadius(this, value);
public void AddRef() => Jolt.PInvoke.SphereShapeSettings_AddRef(this);
public void Release() => Jolt.PInvoke.SphereShapeSettings_Release(this);
public uint GetRefCount() => Jolt.PInvoke.SphereShapeSettings_GetRefCount(this);
public static implicit operator ConvexShapeSettings(SphereShapeSettings value) => Jolt.PInvoke.SphereShapeSettings_AsConvexShapeSettings(value);
public static implicit operator ShapeSettings(SphereShapeSettings value) => Jolt.PInvoke.SphereShapeSettings_AsShapeSettings(value);
public void Dispose()
{
if (IsNull()) return;
Release();
}
}
}