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

VRageMath.MyDynamicAABBTree

Malware edited this page Dec 21, 2018 · 54 revisions

Index

MyDynamicAABBTree 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.
### Properties
_DictionaryValuesReader Leaves_
### Methods
_int AddProxy(ref BoundingBox 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 BoundingBox aabb, Vector3 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 GetLeafCount(int proxyId)_
_void GetNodeLeaves(int proxyId, List children)_
_BoundingBox GetAabb(int proxyId)_
_void GetChildren(int proxyId, ref int left, ref int right)_
_void GetFatAABB(int proxyId, ref BoundingBox fatAABB)_ Get the fat BoundingBox for a proxy.
_void Query(Func callback, ref BoundingBox aabb)_
_int CountLeaves(int nodeId)_
_int GetHeight()_
_int Balance(int iA)_
_void OverlapAllFrustum(ref BoundingFrustum frustum, List elementsList, bool clear)_
_void OverlapAllFrustum(ref BoundingFrustum frustum, List elementsList, uint requiredFlags, bool clear)_
_void OverlapAllFrustum(ref BoundingFrustum frustum, List elementsList, List isInsideList, bool clear)_
_void OverlapAllFrustum(ref BoundingFrustum frustum, Action add)_
_void OverlapAllFrustum(ref BoundingFrustum frustum, ref Op add)_
_void OverlapAllFrustum(ref BoundingFrustum frustum, List elementsList, List isInsideList, float tSqr, bool clear)_
_void OverlapAllFrustum(ref BoundingFrustum frustum, Action add, float tSqr)_
_void OverlapAllFrustum(ref BoundingFrustum frustum, float tSqr, ref Op add)_
_void OverlapAllFrustumConservative(ref BoundingFrustum frustum, List elementsList, uint requiredFlags, bool clear)_
_void OverlapAllFrustumAny(ref BoundingFrustum frustum, List elementsList, bool clear)_
_void OverlapAllLineSegment(ref Line line, List> elementsList)_
_void OverlapAllLineSegment(ref Line line, List> elementsList, uint requiredFlags)_
_void OverlapAllBoundingBox(ref BoundingBox bbox, List elementsList, uint requiredFlags, bool clear)_
_bool OverlapsAnyLeafBoundingBox(ref BoundingBox bbox)_
_void OverlapSizeableClusters(ref BoundingBox bbox, List boundList, double minSize)_
_void OverlapAllBoundingSphere(ref BoundingSphere sphere, List overlapElementsList, bool clear)_
_void GetAll(List elementsList, bool clear, List boxsList)_
_void GetAllNodeBounds(List boxsList)_
_void Clear()_
static _void Dispose()_

Clone this wiki locally