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,&nbsp;DynamicTreeNode>&nbsp;Leaves

Methods

Member Description
int&nbsp;AddProxy(ref&nbsp;BoundingBox&nbsp;aabb,&nbsp;Object&nbsp;userData,&nbsp;uint&nbsp;userFlags,&nbsp;bool&nbsp;rebalance) Create a proxy. Provide a tight fitting BoundingBox and a userData pointer.
void&nbsp;RemoveProxy(int&nbsp;proxyId) Destroy a proxy. This asserts if the id is invalid.
bool&nbsp;MoveProxy(int&nbsp;proxyId,&nbsp;ref&nbsp;BoundingBox&nbsp;aabb,&nbsp;Vector3&nbsp;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&nbsp;GetUserData<T>(int&nbsp;proxyId)
int&nbsp;GetRoot()
int&nbsp;GetLeafCount()
int&nbsp;GetLeafCount(int&nbsp;proxyId)
void&nbsp;GetNodeLeaves(int&nbsp;proxyId,&nbsp;List<int>&nbsp;children)
BoundingBox&nbsp;GetAabb(int&nbsp;proxyId)
void&nbsp;GetChildren(int&nbsp;proxyId,&nbsp;ref&nbsp;int&nbsp;left,&nbsp;ref&nbsp;int&nbsp;right)
void&nbsp;GetFatAABB(int&nbsp;proxyId,&nbsp;ref&nbsp;BoundingBox&nbsp;fatAABB) Get the fat BoundingBox for a proxy.
void&nbsp;Query(Func<int,&nbsp;bool>&nbsp;callback,&nbsp;ref&nbsp;BoundingBox&nbsp;aabb)
int&nbsp;CountLeaves(int&nbsp;nodeId)
int&nbsp;GetHeight()
int&nbsp;Balance(int&nbsp;iA)
void&nbsp;OverlapAllFrustum<T>(ref&nbsp;BoundingFrustum&nbsp;frustum,&nbsp;List<T>&nbsp;elementsList,&nbsp;bool&nbsp;clear)
void&nbsp;OverlapAllFrustum<T>(ref&nbsp;BoundingFrustum&nbsp;frustum,&nbsp;List<T>&nbsp;elementsList,&nbsp;uint&nbsp;requiredFlags,&nbsp;bool&nbsp;clear)
void&nbsp;OverlapAllFrustum<T>(ref&nbsp;BoundingFrustum&nbsp;frustum,&nbsp;List<T>&nbsp;elementsList,&nbsp;List<bool>&nbsp;isInsideList,&nbsp;bool&nbsp;clear)
void&nbsp;OverlapAllFrustum<T>(ref&nbsp;BoundingFrustum&nbsp;frustum,&nbsp;Action<T,&nbsp;bool>&nbsp;add)
void&nbsp;OverlapAllFrustum<T,&nbsp;Op>(ref&nbsp;BoundingFrustum&nbsp;frustum,&nbsp;ref&nbsp;Op&nbsp;add)
void&nbsp;OverlapAllFrustum<T>(ref&nbsp;BoundingFrustum&nbsp;frustum,&nbsp;List<T>&nbsp;elementsList,&nbsp;List<bool>&nbsp;isInsideList,&nbsp;float&nbsp;tSqr,&nbsp;bool&nbsp;clear)
void&nbsp;OverlapAllFrustum<T>(ref&nbsp;BoundingFrustum&nbsp;frustum,&nbsp;Action<T,&nbsp;bool>&nbsp;add,&nbsp;float&nbsp;tSqr)
void&nbsp;OverlapAllFrustum<T,&nbsp;Op>(ref&nbsp;BoundingFrustum&nbsp;frustum,&nbsp;float&nbsp;tSqr,&nbsp;ref&nbsp;Op&nbsp;add)
void&nbsp;OverlapAllFrustumConservative<T>(ref&nbsp;BoundingFrustum&nbsp;frustum,&nbsp;List<T>&nbsp;elementsList,&nbsp;uint&nbsp;requiredFlags,&nbsp;bool&nbsp;clear)
void&nbsp;OverlapAllFrustumAny<T>(ref&nbsp;BoundingFrustum&nbsp;frustum,&nbsp;List<T>&nbsp;elementsList,&nbsp;bool&nbsp;clear)
void&nbsp;OverlapAllLineSegment<T>(ref&nbsp;Line&nbsp;line,&nbsp;List<MyLineSegmentOverlapResult<T>>&nbsp;elementsList)
void&nbsp;OverlapAllLineSegment<T>(ref&nbsp;Line&nbsp;line,&nbsp;List<MyLineSegmentOverlapResult<T>>&nbsp;elementsList,&nbsp;uint&nbsp;requiredFlags)
void&nbsp;OverlapAllBoundingBox<T>(ref&nbsp;BoundingBox&nbsp;bbox,&nbsp;List<T>&nbsp;elementsList,&nbsp;uint&nbsp;requiredFlags,&nbsp;bool&nbsp;clear)
bool&nbsp;OverlapsAnyLeafBoundingBox(ref&nbsp;BoundingBox&nbsp;bbox)
void&nbsp;OverlapSizeableClusters(ref&nbsp;BoundingBox&nbsp;bbox,&nbsp;List<BoundingBox>&nbsp;boundList,&nbsp;double&nbsp;minSize)
void&nbsp;OverlapAllBoundingSphere<T>(ref&nbsp;BoundingSphere&nbsp;sphere,&nbsp;List<T>&nbsp;overlapElementsList,&nbsp;bool&nbsp;clear)
void&nbsp;GetAll<T>(List<T>&nbsp;elementsList,&nbsp;bool&nbsp;clear,&nbsp;List<BoundingBox>&nbsp;boxsList)
void&nbsp;GetAllNodeBounds(List<BoundingBox>&nbsp;boxsList)
void&nbsp;Clear()
static void&nbsp;Dispose()

Clone this wiki locally