SOURCE DUMP v1

This commit is contained in:
Rian Drake 2026-10-15 14:09:11 +13:00
commit fb20299e9d

View file

@ -0,0 +1,284 @@
// <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/MutableCompoundShape.h#L32">Jolt/Physics/Collision/Shape/MutableCompoundShape.h:32</see>
/// <br/>
/// <c>class MutableCompoundShape final : public CompoundShape</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// A compound shape, sub shapes can be rotated and translated.
/// This shape is optimized for adding / removing and changing the rotation / translation of sub shapes but is less efficient in querying.
/// Shifts all child objects so that they're centered around the center of mass (which needs to be kept up to date by calling AdjustCenterOfMass).
///
/// Note: If you're using MutableCompoundShape and are querying data while modifying the shape you'll have a race condition.
/// In this case it is best to create a new MutableCompoundShape using the Clone function. You replace the shape on a body using BodyInterface::SetShape.
/// If a query is still working on the old shape, it will have taken a reference and keep the old shape alive until the query finishes.
///
/// When you modify a MutableCompoundShape, beware that the SubShapeIDs of all other shapes can change. So be careful when storing SubShapeIDs.
/// </code>
/// </remarks>
[InteropHandle]
public readonly partial struct MutableCompoundShape : IDisposable
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MutableCompoundShape.h#L163">Jolt/Physics/Collision/Shape/MutableCompoundShape.h:163</see>
/// <br/>
/// <c>struct Bounds</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 96)]
public struct Bounds
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MutableCompoundShape.h#L165">Jolt/Physics/Collision/Shape/MutableCompoundShape.h:165</see>
/// <br/>
/// <c>Vec4 mMinX</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public float4 mMinX;
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MutableCompoundShape.h#L166">Jolt/Physics/Collision/Shape/MutableCompoundShape.h:166</see>
/// <br/>
/// <c>Vec4 mMinY</c>
/// </para>
/// </summary>
[FieldOffset(16)]
public float4 mMinY;
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MutableCompoundShape.h#L167">Jolt/Physics/Collision/Shape/MutableCompoundShape.h:167</see>
/// <br/>
/// <c>Vec4 mMinZ</c>
/// </para>
/// </summary>
[FieldOffset(32)]
public float4 mMinZ;
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MutableCompoundShape.h#L168">Jolt/Physics/Collision/Shape/MutableCompoundShape.h:168</see>
/// <br/>
/// <c>Vec4 mMaxX</c>
/// </para>
/// </summary>
[FieldOffset(48)]
public float4 mMaxX;
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MutableCompoundShape.h#L169">Jolt/Physics/Collision/Shape/MutableCompoundShape.h:169</see>
/// <br/>
/// <c>Vec4 mMaxY</c>
/// </para>
/// </summary>
[FieldOffset(64)]
public float4 mMaxY;
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MutableCompoundShape.h#L170">Jolt/Physics/Collision/Shape/MutableCompoundShape.h:170</see>
/// <br/>
/// <c>Vec4 mMaxZ</c>
/// </para>
/// </summary>
[FieldOffset(80)]
public float4 mMaxZ;
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MutableCompoundShape.h#L38">Jolt/Physics/Collision/Shape/MutableCompoundShape.h:38</see>
/// <br/>
/// <c>MutableCompoundShape()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Constructor
/// </para>
/// </remarks>
public static MutableCompoundShape Create() => Jolt.PInvoke.MutableCompoundShape_Create();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MutableCompoundShape.h#L42">Jolt/Physics/Collision/Shape/MutableCompoundShape.h:42</see>
/// <br/>
/// <c>Ref&lt;MutableCompoundShape&gt; Clone() const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Clone this shape. Can be used to avoid race conditions. See the documentation of this class for more
/// information.
/// </para>
/// </remarks>
public MutableCompoundShape Clone() => Jolt.PInvoke.MutableCompoundShape_Clone(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MutableCompoundShape.h#L55">Jolt/Physics/Collision/Shape/MutableCompoundShape.h:55</see>
/// <br/>
/// <c>virtual int GetIntersectingSubShapes(const AABox &amp;inBox, uint *outSubShapeIndices, int inMaxSubShapeIndices) const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See: CompoundShape::GetIntersectingSubShapes
/// </para>
/// </remarks>
public unsafe int GetIntersectingSubShapes(AABox box, Ptr<uint> subShapeIndices, int maxSubShapeIndices) => Jolt.PInvoke.MutableCompoundShape_GetIntersectingSubShapes(this, box, subShapeIndices, maxSubShapeIndices);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MutableCompoundShape.h#L58">Jolt/Physics/Collision/Shape/MutableCompoundShape.h:58</see>
/// <br/>
/// <c>virtual int GetIntersectingSubShapes(const OrientedBox &amp;inBox, uint *outSubShapeIndices, int inMaxSubShapeIndices) const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See: CompoundShape::GetIntersectingSubShapes
/// </para>
/// </remarks>
public unsafe int GetIntersectingSubShapes(OrientedBox box, Ptr<uint> subShapeIndices, int maxSubShapeIndices) => Jolt.PInvoke.MutableCompoundShape_GetIntersectingSubShapes_2(this, box, subShapeIndices, maxSubShapeIndices);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MutableCompoundShape.h#L61">Jolt/Physics/Collision/Shape/MutableCompoundShape.h:61</see>
/// <br/>
/// <c>virtual void SaveBinaryState(StreamOut &amp;inStream) const override</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// See Shape
/// </para>
/// </remarks>
public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.MutableCompoundShape_SaveBinaryState(this, stream);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MutableCompoundShape.h#L77">Jolt/Physics/Collision/Shape/MutableCompoundShape.h:77</see>
/// <br/>
/// <c>uint AddShape(Vec3Arg inPosition, QuatArg inRotation, const Shape *inShape, uint32 inUserData = 0, uint inIndex = UINT_MAX)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Adding a new shape.
/// Beware this can create a race condition if you're running collision queries in parallel. See class documentation for more information.
/// @param inPosition The position of the new shape
/// @param inRotation The orientation of the new shape
/// @param inShape The shape to add
/// @param inUserData User data that will be stored with the shape and can be retrieved using GetCompoundUserData
/// @param inIndex Index where to insert the shape, UINT_MAX to add to the end
/// @return The index of the newly added shape
/// </code>
/// </remarks>
public uint AddShape(float3 position, floatQuat rotation, Shape shape, uint userData, uint index) => Jolt.PInvoke.MutableCompoundShape_AddShape(this, position, rotation, shape, userData, index);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MutableCompoundShape.h#L81">Jolt/Physics/Collision/Shape/MutableCompoundShape.h:81</see>
/// <br/>
/// <c>void RemoveShape(uint inIndex)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Remove a shape by index.
/// Beware this can create a race condition if you're running collision queries in parallel. See class documentation for more information.
/// </code>
/// </remarks>
public void RemoveShape(uint index) => Jolt.PInvoke.MutableCompoundShape_RemoveShape(this, index);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MutableCompoundShape.h#L85">Jolt/Physics/Collision/Shape/MutableCompoundShape.h:85</see>
/// <br/>
/// <c>void ModifyShape(uint inIndex, Vec3Arg inPosition, QuatArg inRotation)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Modify the position / orientation of a shape.
/// Beware this can create a race condition if you're running collision queries in parallel. See class documentation for more information.
/// </code>
/// </remarks>
public void ModifyShape(uint index, float3 position, floatQuat rotation) => Jolt.PInvoke.MutableCompoundShape_ModifyShape(this, index, position, rotation);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MutableCompoundShape.h#L89">Jolt/Physics/Collision/Shape/MutableCompoundShape.h:89</see>
/// <br/>
/// <c>void ModifyShape(uint inIndex, Vec3Arg inPosition, QuatArg inRotation, const Shape *inShape)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Modify the position / orientation and shape at the same time.
/// Beware this can create a race condition if you're running collision queries in parallel. See class documentation for more information.
/// </code>
/// </remarks>
public void ModifyShape(uint index, float3 position, floatQuat rotation, Shape shape) => Jolt.PInvoke.MutableCompoundShape_ModifyShape_2(this, index, position, rotation, shape);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MutableCompoundShape.h#L105">Jolt/Physics/Collision/Shape/MutableCompoundShape.h:105</see>
/// <br/>
/// <c>void AdjustCenterOfMass()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Recalculate the center of mass and shift all objects so they're centered around it
/// (this needs to be done of dynamic bodies and if the center of mass changes significantly due to adding / removing / repositioning sub shapes or else the simulation will look unnatural)
/// Note that after adjusting the center of mass of an object you need to call BodyInterface::NotifyShapeChanged and Constraint::NotifyShapeChanged on the relevant bodies / constraints.
/// Beware this can create a race condition if you're running collision queries in parallel. See class documentation for more information.
/// </code>
/// </remarks>
public void AdjustCenterOfMass() => Jolt.PInvoke.MutableCompoundShape_AdjustCenterOfMass(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/MutableCompoundShape.h#L110">Jolt/Physics/Collision/Shape/MutableCompoundShape.h:110</see>
/// <br/>
/// <c>static void sRegister()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Register shape functions with the registry
/// </para>
/// </remarks>
public static void sRegister() => Jolt.PInvoke.MutableCompoundShape_sRegister();
public void AddRef() => Jolt.PInvoke.MutableCompoundShape_AddRef(this);
public void Release() => Jolt.PInvoke.MutableCompoundShape_Release(this);
public uint GetRefCount() => Jolt.PInvoke.MutableCompoundShape_GetRefCount(this);
public static implicit operator CompoundShape(MutableCompoundShape value) => Jolt.PInvoke.MutableCompoundShape_AsCompoundShape(value);
public static implicit operator Shape(MutableCompoundShape value) => Jolt.PInvoke.MutableCompoundShape_AsShape(value);
public void Dispose()
{
if (IsNull()) return;
Release();
}
}
}