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

Member Description
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

Member Description
DictionaryValuesReader<int, DynamicTreeNode> Leaves

Methods

Member Description
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<T>(int proxyId)
int GetRoot()
int GetLeafCount()
int GetLeafCount(int proxyId)
void GetNodeLeaves(int proxyId, List<int> 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<int, bool> callback, ref BoundingBox aabb)
int CountLeaves(int nodeId)
int GetHeight()
int Balance(int iA)
void OverlapAllFrustum<T>(ref BoundingFrustum frustum, List<T> elementsList, bool clear)
void OverlapAllFrustum<T>(ref BoundingFrustum frustum, List<T> elementsList, uint requiredFlags, bool clear)
void OverlapAllFrustum<T>(ref BoundingFrustum frustum, List<T> elementsList, List<bool> isInsideList, bool clear)
void OverlapAllFrustum<T>(ref BoundingFrustum frustum, Action<T, bool> add)
void OverlapAllFrustum<T, Op>(ref BoundingFrustum frustum, ref Op add)
void OverlapAllFrustum<T>(ref BoundingFrustum frustum, List<T> elementsList, List<bool> isInsideList, float tSqr, bool clear)
void OverlapAllFrustum<T>(ref BoundingFrustum frustum, Action<T, bool> add, float tSqr)
void OverlapAllFrustum<T, Op>(ref BoundingFrustum frustum, float tSqr, ref Op add)
void OverlapAllFrustumConservative<T>(ref BoundingFrustum frustum, List<T> elementsList, uint requiredFlags, bool clear)
void OverlapAllFrustumAny<T>(ref BoundingFrustum frustum, List<T> elementsList, bool clear)
void OverlapAllLineSegment<T>(ref Line line, List<MyLineSegmentOverlapResult<T>> elementsList)
void OverlapAllLineSegment<T>(ref Line line, List<MyLineSegmentOverlapResult<T>> elementsList, uint requiredFlags)
void OverlapAllBoundingBox<T>(ref BoundingBox bbox, List<T> elementsList, uint requiredFlags, bool clear)
bool OverlapsAnyLeafBoundingBox(ref BoundingBox bbox)
void OverlapSizeableClusters(ref BoundingBox bbox, List<BoundingBox> boundList, double minSize)
void OverlapAllBoundingSphere<T>(ref BoundingSphere sphere, List<T> overlapElementsList, bool clear)
void GetAll<T>(List<T> elementsList, bool clear, List<BoundingBox> boxsList)
void GetAllNodeBounds(List<BoundingBox> boxsList)
void Clear()
static void Dispose()

Clone this wiki locally