// // 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 StaticCompoundShape. Note that if you only want a compound of 1 shape, use a /// RotatedTranslatedShape instead. /// /// /// C++: /// Jolt/Physics/Collision/Shape/StaticCompoundShape.h:17 ///
/// class StaticCompoundShapeSettings final : public CompoundShapeSettings ///
///
[InteropHandle] public readonly partial struct StaticCompoundShapeSettings : IDisposable { public static StaticCompoundShapeSettings Create() => Jolt.PInvoke.StaticCompoundShapeSettings_Create(); /// public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI(); /// public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti); /// public Shape CreateShape() => ((ShapeSettings)this).CreateShape(); /// /// /// Specialization of Create() function that allows specifying a temp allocator to avoid temporary memory /// allocations on the heap /// /// /// C++: /// Jolt/Physics/Collision/Shape/StaticCompoundShape.h:27 ///
/// ShapeResult Create(TempAllocator &inTempAllocator) const ///
///
/// /// /// Throws JoltException with Jolt's error message when the operation fails. /// /// 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(value); public static implicit operator ShapeSettings(StaticCompoundShapeSettings value) => Unsafe.BitCast(value); public void Dispose() { if (IsNull()) return; Release(); } /// public void AddShape(float3 position, floatQuat rotation, ShapeSettings shape, uint userData = 0) => ((CompoundShapeSettings)this).AddShape(position, rotation, shape, userData); /// public void AddShape(float3 position, floatQuat rotation, Shape shape, uint userData = 0) => ((CompoundShapeSettings)this).AddShape(position, rotation, shape, userData); /// [return: Brutal.Attributes.Fixed] public unsafe ReadOnlySpan GetSubShapes() => ((CompoundShapeSettings)this).GetSubShapes(); /// public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult(); /// public ulong GetUserData() => ((ShapeSettings)this).GetUserData(); /// public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value); } }