brutal/Brutal.Jolt/Generated/Classes/StaticCompoundShapeSettings.gen.cs
Rian Drake b578433e37 first
2026-10-15 17:10:50 +13:00

103 lines
4.5 KiB
C#

// <auto-generated/>
// 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
{
/// <summary>
/// <para>
/// Class that constructs a StaticCompoundShape. Note that if you only want a compound of 1 shape, use a
/// RotatedTranslatedShape instead.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/StaticCompoundShape.h#L17">Jolt/Physics/Collision/Shape/StaticCompoundShape.h:17</see>
/// <br/>
/// <c>class StaticCompoundShapeSettings final : public CompoundShapeSettings</c>
/// </para>
/// </summary>
[InteropHandle]
public readonly partial struct StaticCompoundShapeSettings : IDisposable
{
public static StaticCompoundShapeSettings Create() => Jolt.PInvoke.StaticCompoundShapeSettings_Create();
/// <inheritdoc cref="ShapeSettings.GetRTTI()"/>
public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI();
/// <inheritdoc cref="ShapeSettings.CastTo(RTTI)"/>
public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti);
/// <inheritdoc cref="ShapeSettings.CreateShape()"/>
public Shape CreateShape() => ((ShapeSettings)this).CreateShape();
/// <summary>
/// <para>
/// Specialization of Create() function that allows specifying a temp allocator to avoid temporary memory
/// allocations on the heap
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/StaticCompoundShape.h#L27">Jolt/Physics/Collision/Shape/StaticCompoundShape.h:27</see>
/// <br/>
/// <c>ShapeResult Create(TempAllocator &amp;inTempAllocator) const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Throws JoltException with Jolt's error message when the operation fails.
/// </para>
/// </remarks>
public Shape CreateShape(TempAllocator tempAllocator)
{
var _handle = Jolt.PInvoke.StaticCompoundShapeSettings_CreateShape(this, tempAllocator);
if (_handle.IsNull())
throw JoltException.FromLastError();
return _handle;
}
public void AddRef() => ((ShapeSettings)this).AddRef();
public void Release() => ((ShapeSettings)this).Release();
public uint GetRefCount() => ((ShapeSettings)this).GetRefCount();
public static implicit operator CompoundShapeSettings(StaticCompoundShapeSettings value) =>
Unsafe.BitCast<StaticCompoundShapeSettings, CompoundShapeSettings>(value);
public static implicit operator ShapeSettings(StaticCompoundShapeSettings value) =>
Unsafe.BitCast<StaticCompoundShapeSettings, ShapeSettings>(value);
public void Dispose()
{
if (IsNull())
return;
Release();
}
/// <inheritdoc cref="CompoundShapeSettings.AddShape(float3, floatQuat, ShapeSettings, uint)"/>
public void AddShape(float3 position, floatQuat rotation, ShapeSettings shape, uint userData = 0) =>
((CompoundShapeSettings)this).AddShape(position, rotation, shape, userData);
/// <inheritdoc cref="CompoundShapeSettings.AddShape(float3, floatQuat, Shape, uint)"/>
public void AddShape(float3 position, floatQuat rotation, Shape shape, uint userData = 0) =>
((CompoundShapeSettings)this).AddShape(position, rotation, shape, userData);
/// <inheritdoc cref="CompoundShapeSettings.GetSubShapes()"/>
[return: Brutal.Attributes.Fixed]
public unsafe ReadOnlySpan<CompoundShapeSettings.SubShapeSettings> GetSubShapes() =>
((CompoundShapeSettings)this).GetSubShapes();
/// <inheritdoc cref="ShapeSettings.ClearCachedResult()"/>
public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult();
/// <inheritdoc cref="ShapeSettings.GetUserData()"/>
public ulong GetUserData() => ((ShapeSettings)this).GetUserData();
/// <inheritdoc cref="ShapeSettings.SetUserData(ulong)"/>
public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value);
}
}