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

86 lines
3.7 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/QuadTree.h#L20">Jolt/Physics/Collision/BroadPhase/QuadTree.h:20</see>
/// <br/>
/// <c>class QuadTree : public NonCopyable</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Internal tree structure in broadphase, is essentially a quad AABB tree.
/// Tree is lockless (except for UpdatePrepare/Finalize() function), modifying objects in the tree will widen the aabbs of parent nodes to make the node fit.
/// During the UpdatePrepare/Finalize() call the tree is rebuilt to achieve a tight fit again.
/// </code>
/// </remarks>
[InteropHandle]
public readonly partial struct QuadTree : IDisposable
{
public static QuadTree Create() => Jolt.PInvoke.QuadTree_Create();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/BroadPhase/QuadTree.h#L181">Jolt/Physics/Collision/BroadPhase/QuadTree.h:181</see>
/// <br/>
/// <c>inline bool HasBodies() const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Check if there is anything in the tree
/// </para>
/// </remarks>
public bool HasBodies() => Jolt.PInvoke.QuadTree_HasBodies(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/BroadPhase/QuadTree.h#L184">Jolt/Physics/Collision/BroadPhase/QuadTree.h:184</see>
/// <br/>
/// <c>inline bool IsDirty() const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Check if the tree needs an UpdatePrepare/Finalize()
/// </para>
/// </remarks>
public bool IsDirty() => Jolt.PInvoke.QuadTree_IsDirty(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/BroadPhase/QuadTree.h#L187">Jolt/Physics/Collision/BroadPhase/QuadTree.h:187</see>
/// <br/>
/// <c>inline bool CanBeUpdated() const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Check if this tree can get an UpdatePrepare/Finalize() or if it needs a DiscardOldTree() first
/// </para>
/// </remarks>
public bool CanBeUpdated() => Jolt.PInvoke.QuadTree_CanBeUpdated(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/BroadPhase/QuadTree.h#L198">Jolt/Physics/Collision/BroadPhase/QuadTree.h:198</see>
/// <br/>
/// <c>void DiscardOldTree()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Will throw away the previous frame's nodes so that we can start building a new tree in the background
/// </para>
/// </remarks>
public void DiscardOldTree() => Jolt.PInvoke.QuadTree_DiscardOldTree(this);
public void Dispose() => Jolt.PInvoke.QuadTree_Destroy(this);
}
}