Untold Engine
Beta v0.0.16
docs
|
The U4DBVHManager class represents the Boundary Volume Hierarchy manager. More...
Public Member Functions | |
U4DBVHManager () | |
Constructor of the class. | |
~U4DBVHManager () | |
Destructor of the class. | |
void | buildBVH () |
Method which starts building the BVH algorithm. | |
void | buildBVHNode (U4DBVHNode< U4DDynamicAction > *uNode, int uLeftIndex, int uSplitIndex) |
Method which builds a BVH tree node. More... | |
std::vector< U4DDynamicAction * > | getModelsContainer () |
Method which returns all 3D entities in the BVH tree. More... | |
void | calculateBVHVolume (U4DBVHNode< U4DDynamicAction > *uNode) |
Method which computes a BVH node volume. More... | |
void | getBVHLongestDimensionVector (U4DBVHNode< U4DDynamicAction > *uNode) |
Method which computes the BVH node longest dimension vector. More... | |
void | getBVHSplitIndex (U4DBVHNode< U4DDynamicAction > *uNode) |
Method which computes a BVH node split index. More... | |
void | addModelToTreeContainer (U4DDynamicAction *uAction) |
Method which adds a model to the model container. More... | |
void | startCollision () |
Method which starts testing Broad-Phase collisions. | |
void | heapSorting (U4DBVHNode< U4DDynamicAction > *uNode) |
Method to heap sort the BVH tree nodes. More... | |
void | reHeapDown (U4DBVHNode< U4DDynamicAction > *uNode, int root, int bottom) |
Method used to heap-down sort the BVH tree nodes. More... | |
void | swap (U4DBVHNode< U4DDynamicAction > *uNode, int uindex1, int uindex2) |
Method used to swap the BVH tree node's array index. More... | |
std::vector< U4DBroadPhaseCollisionModelPair > | getBroadPhaseCollisionPairs () |
Method which returns all broad-phase collision pairs. More... | |
void | clearContainers () |
Method which clears all broad-phase collision containers. | |
Public Attributes | |
std::vector< U4DBroadPhaseCollisionModelPair > | broadPhaseCollisionPairs |
Container to the Broad-Phase collision pair. | |
std::vector< std::shared_ptr< U4DBVHNode< U4DDynamicAction > > > | treeContainer |
Smart pointer to the root tree container. | |
The U4DBVHManager class represents the Boundary Volume Hierarchy manager.
void U4DEngine::U4DBVHManager::addModelToTreeContainer | ( | U4DDynamicAction * | uAction | ) |
Method which adds a model to the model container.
uAction | Dynamic action |
void U4DEngine::U4DBVHManager::buildBVHNode | ( | U4DBVHNode< U4DDynamicAction > * | uNode, |
int | uLeftIndex, | ||
int | uSplitIndex | ||
) |
Method which builds a BVH tree node.
uNode | Tree node |
uLeftIndex | Left index |
uSplitIndex | Split index |
void U4DEngine::U4DBVHManager::calculateBVHVolume | ( | U4DBVHNode< U4DDynamicAction > * | uNode | ) |
Method which computes a BVH node volume.
uNode | BVH tree node |
std::vector< U4DBroadPhaseCollisionModelPair > U4DEngine::U4DBVHManager::getBroadPhaseCollisionPairs | ( | ) |
Method which returns all broad-phase collision pairs.
void U4DEngine::U4DBVHManager::getBVHLongestDimensionVector | ( | U4DBVHNode< U4DDynamicAction > * | uNode | ) |
Method which computes the BVH node longest dimension vector.
uNode | BVH tree node |
void U4DEngine::U4DBVHManager::getBVHSplitIndex | ( | U4DBVHNode< U4DDynamicAction > * | uNode | ) |
Method which computes a BVH node split index.
uNode | BVH tree node |
std::vector< U4DDynamicAction * > U4DEngine::U4DBVHManager::getModelsContainer | ( | ) |
Method which returns all 3D entities in the BVH tree.
void U4DEngine::U4DBVHManager::heapSorting | ( | U4DBVHNode< U4DDynamicAction > * | uNode | ) |
Method to heap sort the BVH tree nodes.
uNode | BVH tree node |
void U4DEngine::U4DBVHManager::reHeapDown | ( | U4DBVHNode< U4DDynamicAction > * | uNode, |
int | root, | ||
int | bottom | ||
) |
Method used to heap-down sort the BVH tree nodes.
uNode | BVH tree node |
root | Index of root node |
bottom | bottom index |
void U4DEngine::U4DBVHManager::swap | ( | U4DBVHNode< U4DDynamicAction > * | uNode, |
int | uindex1, | ||
int | uindex2 | ||
) |
Method used to swap the BVH tree node's array index.
uNode | BVH tree node |
uindex1 | Node array index |
uindex2 | Node array index |