// // 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 { /// /// /// 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. /// /// /// C++: /// Jolt/Physics/Collision/BroadPhase/QuadTree.h:20 ///
/// class QuadTree : public NonCopyable ///
///
[InteropHandle] public readonly partial struct QuadTree : IDisposable { public static QuadTree Create() => Jolt.PInvoke.QuadTree_Create(); /// /// /// Check if there is anything in the tree /// /// /// C++: /// Jolt/Physics/Collision/BroadPhase/QuadTree.h:181 ///
/// inline bool HasBodies() const ///
///
public bool HasBodies() => Jolt.PInvoke.QuadTree_HasBodies(this); /// /// /// Check if the tree needs an UpdatePrepare/Finalize() /// /// /// C++: /// Jolt/Physics/Collision/BroadPhase/QuadTree.h:184 ///
/// inline bool IsDirty() const ///
///
public bool IsDirty() => Jolt.PInvoke.QuadTree_IsDirty(this); /// /// /// Check if this tree can get an UpdatePrepare/Finalize() or if it needs a DiscardOldTree() first /// /// /// C++: /// Jolt/Physics/Collision/BroadPhase/QuadTree.h:187 ///
/// inline bool CanBeUpdated() const ///
///
public bool CanBeUpdated() => Jolt.PInvoke.QuadTree_CanBeUpdated(this); /// /// /// Will throw away the previous frame's nodes so that we can start building a new tree in the background /// /// /// C++: /// Jolt/Physics/Collision/BroadPhase/QuadTree.h:198 ///
/// void DiscardOldTree() ///
///
public void DiscardOldTree() => Jolt.PInvoke.QuadTree_DiscardOldTree(this); /// /// /// Get the bounding box for this tree /// /// /// C++: /// Jolt/Physics/Collision/BroadPhase/QuadTree.h:201 ///
/// AABox GetBounds() const ///
///
public AABox GetBounds() => Jolt.PInvoke.QuadTree_GetBounds(this); public void Dispose() => Jolt.PInvoke.QuadTree_Destroy(this); } }