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

168 lines
7.8 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/CompoundShape.h#L17">Jolt/Physics/Collision/Shape/CompoundShape.h:17</see>
/// <br/>
/// <c>class CompoundShapeSettings : public ShapeSettings</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Base class settings to construct a compound shape
/// </para>
/// </remarks>
[InteropHandle]
public readonly partial struct CompoundShapeSettings : IDisposable
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/CompoundShape.h#L31">Jolt/Physics/Collision/Shape/CompoundShape.h:31</see>
/// <br/>
/// <c>struct SubShapeSettings</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 64)]
public struct SubShapeSettings
{
/// <summary>
/// <para>
/// Sub shape (either this or mShapePtr needs to be filled up)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/CompoundShape.h#L35">Jolt/Physics/Collision/Shape/CompoundShape.h:35</see>
/// <br/>
/// <c>RefConst&lt;ShapeSettings&gt; mShape</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public ShapeSettings mShape;
/// <summary>
/// <para>
/// Sub shape (either this or mShape needs to be filled up)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/CompoundShape.h#L36">Jolt/Physics/Collision/Shape/CompoundShape.h:36</see>
/// <br/>
/// <c>RefConst&lt;Shape&gt; mShapePtr</c>
/// </para>
/// </summary>
[FieldOffset(8)]
public Shape mShapePtr;
/// <summary>
/// <para>
/// Position of the sub shape
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/CompoundShape.h#L37">Jolt/Physics/Collision/Shape/CompoundShape.h:37</see>
/// <br/>
/// <c>Vec3 mPosition</c>
/// </para>
/// </summary>
[FieldOffset(16)]
public float3 mPosition;
/// <summary>
/// <para>
/// Rotation of the sub shape
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/CompoundShape.h#L38">Jolt/Physics/Collision/Shape/CompoundShape.h:38</see>
/// <br/>
/// <c>Quat mRotation</c>
/// </para>
/// </summary>
[FieldOffset(32)]
public floatQuat mRotation;
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/CompoundShape.h#L43">Jolt/Physics/Collision/Shape/CompoundShape.h:43</see>
/// <br/>
/// <c>uint32 mUserData = 0</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// User data value (can be used by the application for any purpose).
/// Note this value can be retrieved through GetSubShape(...).mUserData, not through GetSubShapeUserData(...) as that returns Shape::GetUserData() of the leaf shape.
/// Use GetSubShapeIndexFromID get a shape index from a SubShapeID to pass to GetSubShape.
/// </code>
/// </remarks>
[FieldOffset(48)]
public uint mUserData;
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/CompoundShape.h#L19">Jolt/Physics/Collision/Shape/CompoundShape.h:19</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.CompoundShapeSettings_GetRTTI(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/CompoundShape.h#L19">Jolt/Physics/Collision/Shape/CompoundShape.h:19</see>
/// <br/>
/// <c></c>
/// </para>
/// </summary>
public unsafe Ptr CastTo(RTTI rTTI) => Jolt.PInvoke.CompoundShapeSettings_CastTo(this, rTTI);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/CompoundShape.h#L26">Jolt/Physics/Collision/Shape/CompoundShape.h:26</see>
/// <br/>
/// <c>void AddShape(Vec3Arg inPosition, QuatArg inRotation, const ShapeSettings *inShape, uint32 inUserData = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Add a shape to the compound.
/// </para>
/// </remarks>
public void AddShape(float3 position, floatQuat rotation, ShapeSettings shape, uint userData) => Jolt.PInvoke.CompoundShapeSettings_AddShape(this, position, rotation, shape, userData);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/CompoundShape.h#L29">Jolt/Physics/Collision/Shape/CompoundShape.h:29</see>
/// <br/>
/// <c>void AddShape(Vec3Arg inPosition, QuatArg inRotation, const Shape *inShape, uint32 inUserData = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Add a shape to the compound. Variant that uses a concrete shape, which means this object cannot be
/// serialized.
/// </para>
/// </remarks>
public void AddShape(float3 position, floatQuat rotation, Shape shape, uint userData) => Jolt.PInvoke.CompoundShapeSettings_AddShape_2(this, position, rotation, shape, userData);
public void AddRef() => Jolt.PInvoke.CompoundShapeSettings_AddRef(this);
public void Release() => Jolt.PInvoke.CompoundShapeSettings_Release(this);
public uint GetRefCount() => Jolt.PInvoke.CompoundShapeSettings_GetRefCount(this);
public static implicit operator ShapeSettings(CompoundShapeSettings value) => Jolt.PInvoke.CompoundShapeSettings_AsShapeSettings(value);
public void Dispose()
{
if (IsNull()) return;
Release();
}
}
}