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

178 lines
8.5 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/BroadPhase/BroadPhase.h#L25">Jolt/Physics/Collision/BroadPhase/BroadPhase.h:25</see>
/// <br/>
/// <c>class BroadPhase : public BroadPhaseQuery</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Used to do coarse collision detection operations to quickly prune out bodies that will not collide.
/// </para>
/// </remarks>
[InteropHandle]
public readonly partial struct BroadPhase
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/BroadPhase/BroadPhase.h#L44">Jolt/Physics/Collision/BroadPhase/BroadPhase.h:44</see>
/// <br/>
/// <c>struct UpdateState { void *mData[4]; }</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Context used during broadphase update
/// </para>
/// </remarks>
[StructLayout(LayoutKind.Explicit, Size = 32)]
public struct UpdateState
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/BroadPhase/BroadPhase.h#L44">Jolt/Physics/Collision/BroadPhase/BroadPhase.h:44</see>
/// <br/>
/// <c>void *mData[4]</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Context used during broadphase update
/// </para>
/// </remarks>
[FieldOffset(0)]
public nint_4 mData;
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/BroadPhase/BroadPhase.h#L32">Jolt/Physics/Collision/BroadPhase/BroadPhase.h:32</see>
/// <br/>
/// <c>virtual void Init(BodyManager *inBodyManager, const BroadPhaseLayerInterface &amp;inLayerInterface)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Initialize the broadphase.
/// @param inBodyManager The body manager singleton
/// @param inLayerInterface Interface that maps object layers to broadphase layers.
/// Note that the broadphase takes a pointer to the data inside inObjectToBroadPhaseLayer so this object should remain static.
/// </code>
/// </remarks>
public void Init(BodyManager bodyManager, BroadPhaseLayerInterface layerInterface) => Jolt.PInvoke.BroadPhase_Init(this, bodyManager, layerInterface);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/BroadPhase/BroadPhase.h#L35">Jolt/Physics/Collision/BroadPhase/BroadPhase.h:35</see>
/// <br/>
/// <c>virtual void Optimize()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Should be called after many objects have been inserted to make the broadphase more efficient, usually
/// done on startup only
/// </para>
/// </remarks>
public void Optimize() => Jolt.PInvoke.BroadPhase_Optimize(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/BroadPhase/BroadPhase.h#L38">Jolt/Physics/Collision/BroadPhase/BroadPhase.h:38</see>
/// <br/>
/// <c>virtual void FrameSync()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Must be called just before updating the broadphase when none of the body mutexes are locked
/// </para>
/// </remarks>
public void FrameSync() => Jolt.PInvoke.BroadPhase_FrameSync(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/BroadPhase/BroadPhase.h#L41">Jolt/Physics/Collision/BroadPhase/BroadPhase.h:41</see>
/// <br/>
/// <c>virtual void LockModifications()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Must be called before UpdatePrepare to prevent modifications from being made to the tree
/// </para>
/// </remarks>
public void LockModifications() => Jolt.PInvoke.BroadPhase_LockModifications(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/BroadPhase/BroadPhase.h#L54">Jolt/Physics/Collision/BroadPhase/BroadPhase.h:54</see>
/// <br/>
/// <c>virtual void UnlockModifications()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Must be called after UpdateFinalize to allow modifications to the broadphase
/// </para>
/// </remarks>
public void UnlockModifications() => Jolt.PInvoke.BroadPhase_UnlockModifications(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/BroadPhase/BroadPhase.h#L75">Jolt/Physics/Collision/BroadPhase/BroadPhase.h:75</see>
/// <br/>
/// <c>virtual void RemoveBodies(BodyID *ioBodies, int inNumber) = 0</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Remove inNumber bodies in ioBodies from the broadphase.
/// ioBodies may be shuffled around by this function.
/// </code>
/// </remarks>
public unsafe void RemoveBodies(Ptr<uint> bodies, int number) => Jolt.PInvoke.BroadPhase_RemoveBodies(this, bodies, number);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/BroadPhase/BroadPhase.h#L79">Jolt/Physics/Collision/BroadPhase/BroadPhase.h:79</see>
/// <br/>
/// <c>virtual void NotifyBodiesAABBChanged(BodyID *ioBodies, int inNumber, bool inTakeLock = true) = 0</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Call whenever the aabb of a body changes (can change order of ioBodies array)
/// inTakeLock should be false if we're between LockModifications/UnlockModifications, in which case care needs to be taken to not call this between UpdatePrepare/UpdateFinalize
/// </code>
/// </remarks>
public unsafe void NotifyBodiesAABBChanged(Ptr<uint> bodies, int number, bool takeLock) => Jolt.PInvoke.BroadPhase_NotifyBodiesAABBChanged(this, bodies, number, takeLock);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/BroadPhase/BroadPhase.h#L82">Jolt/Physics/Collision/BroadPhase/BroadPhase.h:82</see>
/// <br/>
/// <c>virtual void NotifyBodiesLayerChanged(BodyID *ioBodies, int inNumber) = 0</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Call whenever the layer (and optionally the aabb as well) of a body changes (can change order of
/// ioBodies array)
/// </para>
/// </remarks>
public unsafe void NotifyBodiesLayerChanged(Ptr<uint> bodies, int number) => Jolt.PInvoke.BroadPhase_NotifyBodiesLayerChanged(this, bodies, number);
public static implicit operator BroadPhaseQuery(BroadPhase value) => Jolt.PInvoke.BroadPhase_AsBroadPhaseQuery(value);
}
}