Skip to content
This repository was archived by the owner on Dec 13, 2025. It is now read-only.

VRageMath.MyDynamicAABBTreeD

Malware edited this page Dec 21, 2018 · 54 revisions

Index

MyDynamicAABBTreeD Class

Namespace: VRageMath
Assembly: VRage.Math.dll

Summary

Dynamic aabb tree implementation as a prunning structure

Fields

static _int NullNode_ A dynamic tree arranges data in a binary tree to accelerate queries such as volume queries and ray casts. Leafs are proxies with an BoundingBox. In the tree we expand the proxy BoundingBox by Settings.b2_fatAABBFactor so that the proxy BoundingBox is bigger than the client object. This allows the client object to move by small amounts without triggering a tree update. Nodes are pooled and relocatable, so we use node indices rather than pointers.
### Methods
_int AddProxy(ref BoundingBoxD aabb, Object userData, uint userFlags, bool rebalance)_ Create a proxy. Provide a tight fitting BoundingBox and a userData pointer.
_void RemoveProxy(int proxyId)_ Destroy a proxy. This asserts if the id is invalid.
_bool MoveProxy(int proxyId, ref BoundingBoxD aabb, Vector3D displacement)_ Move a proxy with a swepted BoundingBox. If the proxy has moved outside of its fattened BoundingBox, then the proxy is removed from the tree and re-inserted. Otherwise the function returns immediately.
_T GetUserData(int proxyId)_
_int GetRoot()_
_int GetLeafCount(int proxyId)_
_void GetNodeLeaves(int proxyId, List children)_
_BoundingBoxD GetAabb(int proxyId)_
_void GetChildren(int proxyId, ref int left, ref int right)_
_void GetFatAABB(int proxyId, ref BoundingBoxD fatAABB)_ Get the fat BoundingBox for a proxy.
_void Query(Func callback, ref BoundingBoxD aabb)_
_void QueryPoint(Func callback, ref Vector3D point)_
_int CountLeaves(int nodeId)_
_int GetHeight()_
_bool IsRootNull()_
_int Balance(int iA)_
_void OverlapAllFrustum(ref BoundingFrustumD frustum, List elementsList, bool clear)_
_void OverlapAllFrustum(ref BoundingFrustumD frustum, List elementsList, uint requiredFlags, bool clear)_
_void OverlapAllFrustumAny(ref BoundingFrustumD frustum, List elementsList, bool clear)_
_void OverlapAllFrustum(ref BoundingFrustumD frustum, List elementsList, List isInsideList)_
_void OverlapAllFrustum(ref BoundingFrustumD frustum, T results)_
_void OverlapAllFrustum(ref BoundingFrustumD frustum, List elementsList, List isInsideList, float tSqr, bool clear)_
_void OverlapAllFrustum(ref BoundingFrustumD frustum, Action add, float tSqr)_
_void OverlapAllFrustum(ref BoundingFrustumD frustum, T results, float tSqr)_
_void OverlapAllLineSegment(ref LineD line, List> elementsList, bool clear)_
_void OverlapAllLineSegment(ref LineD line, List> elementsList, uint requiredFlags, bool clear)_
_void OverlapAllBoundingBox(ref BoundingBoxD bbox, List elementsList, uint requiredFlags, bool clear)_
_void OverlapAllBoundingBox(ref MyOrientedBoundingBoxD obb, List elementsList, uint requiredFlags, bool clear)_
_bool OverlapsAnyLeafBoundingBox(ref BoundingBoxD bbox)_
_void GetAproximateClustersForAabb(ref BoundingBoxD bbox, double minSize, List boundList)_
_void OverlapAllBoundingSphere(ref BoundingSphereD sphere, List overlapElementsList, bool clear)_
_void OverlapAllBoundingSphere(ref BoundingSphereD sphere, Action addAction)_
_void GetAll(List elementsList, bool clear, List boxsList)_
_void GetAll(Action add)_
_void GetAll(Action add)_
_void GetAllNodeBounds(List boxsList)_
_void Clear()_
static _void Dispose()_

Clone this wiki locally