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

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.

Methods

Member Description
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&nbsp;GetUserData<T>(int&nbsp;proxyId)
int&nbsp;GetRoot()
int&nbsp;GetLeafCount(int&nbsp;proxyId)
void&nbsp;GetNodeLeaves(int&nbsp;proxyId,&nbsp;List<int>&nbsp;children)
BoundingBoxD&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;BoundingBoxD&nbsp;fatAABB) Get the fat BoundingBox for a proxy.
void&nbsp;Query(Func<int,&nbsp;bool>&nbsp;callback,&nbsp;ref&nbsp;BoundingBoxD&nbsp;aabb)
void&nbsp;QueryPoint(Func<int,&nbsp;bool>&nbsp;callback,&nbsp;ref&nbsp;Vector3D&nbsp;point)
int&nbsp;CountLeaves(int&nbsp;nodeId)
int&nbsp;GetHeight()
bool&nbsp;IsRootNull()
int&nbsp;Balance(int&nbsp;iA)
void&nbsp;OverlapAllFrustum<T>(ref&nbsp;BoundingFrustumD&nbsp;frustum,&nbsp;List<T>&nbsp;elementsList,&nbsp;bool&nbsp;clear)
void&nbsp;OverlapAllFrustum<T>(ref&nbsp;BoundingFrustumD&nbsp;frustum,&nbsp;List<T>&nbsp;elementsList,&nbsp;uint&nbsp;requiredFlags,&nbsp;bool&nbsp;clear)
void&nbsp;OverlapAllFrustumAny<T>(ref&nbsp;BoundingFrustumD&nbsp;frustum,&nbsp;List<T>&nbsp;elementsList,&nbsp;bool&nbsp;clear)
void&nbsp;OverlapAllFrustum<T>(ref&nbsp;BoundingFrustumD&nbsp;frustum,&nbsp;List<T>&nbsp;elementsList,&nbsp;List<bool>&nbsp;isInsideList)
void&nbsp;OverlapAllFrustum<T>(ref&nbsp;BoundingFrustumD&nbsp;frustum,&nbsp;T&nbsp;results)
void&nbsp;OverlapAllFrustum<T>(ref&nbsp;BoundingFrustumD&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;BoundingFrustumD&nbsp;frustum,&nbsp;Action<T,&nbsp;bool>&nbsp;add,&nbsp;float&nbsp;tSqr)
void&nbsp;OverlapAllFrustum<T>(ref&nbsp;BoundingFrustumD&nbsp;frustum,&nbsp;T&nbsp;results,&nbsp;float&nbsp;tSqr)
void&nbsp;OverlapAllLineSegment<T>(ref&nbsp;LineD&nbsp;line,&nbsp;List<MyLineSegmentOverlapResult<T>>&nbsp;elementsList,&nbsp;bool&nbsp;clear)
void&nbsp;OverlapAllLineSegment<T>(ref&nbsp;LineD&nbsp;line,&nbsp;List<MyLineSegmentOverlapResult<T>>&nbsp;elementsList,&nbsp;uint&nbsp;requiredFlags,&nbsp;bool&nbsp;clear)
void&nbsp;OverlapAllBoundingBox<T>(ref&nbsp;BoundingBoxD&nbsp;bbox,&nbsp;List<T>&nbsp;elementsList,&nbsp;uint&nbsp;requiredFlags,&nbsp;bool&nbsp;clear)
void&nbsp;OverlapAllBoundingBox<T>(ref&nbsp;MyOrientedBoundingBoxD&nbsp;obb,&nbsp;List<T>&nbsp;elementsList,&nbsp;uint&nbsp;requiredFlags,&nbsp;bool&nbsp;clear)
bool&nbsp;OverlapsAnyLeafBoundingBox(ref&nbsp;BoundingBoxD&nbsp;bbox)
void&nbsp;GetAproximateClustersForAabb(ref&nbsp;BoundingBoxD&nbsp;bbox,&nbsp;double&nbsp;minSize,&nbsp;List<BoundingBoxD>&nbsp;boundList)
void&nbsp;OverlapAllBoundingSphere<T>(ref&nbsp;BoundingSphereD&nbsp;sphere,&nbsp;List<T>&nbsp;overlapElementsList,&nbsp;bool&nbsp;clear)
void&nbsp;OverlapAllBoundingSphere<T>(ref&nbsp;BoundingSphereD&nbsp;sphere,&nbsp;Action<T>&nbsp;addAction)
void&nbsp;GetAll<T>(List<T>&nbsp;elementsList,&nbsp;bool&nbsp;clear,&nbsp;List<BoundingBoxD>&nbsp;boxsList)
void&nbsp;GetAll<T>(Action<T>&nbsp;add)
void&nbsp;GetAll<T>(Action<T,&nbsp;BoundingBoxD>&nbsp;add)
void&nbsp;GetAllNodeBounds(List<BoundingBoxD>&nbsp;boxsList)
void&nbsp;Clear()
static void&nbsp;Dispose()

Clone this wiki locally