Untold Engine
Beta v0.0.16
docs
|
The U4DVisibilityManager class tests whether a model is within the camera frustum. More...
Public Member Functions | |
U4DVisibilityManager () | |
class constructor | |
~U4DVisibilityManager () | |
class destructor | |
void | buildBVH () |
Method which starts building the BVH algorithm. | |
void | buildBVHNode (U4DBVHNode< U4DModel > *uNode, int uLeftIndex, int uSplitIndex) |
Method which builds a BVH tree node. More... | |
std::vector< U4DModel * > | getModelsContainer () |
Method which returns all 3D entities in the BVH tree. More... | |
void | calculateBVHVolume (U4DBVHNode< U4DModel > *uNode) |
Method which computes a BVH node volume. More... | |
void | getBVHLongestDimensionVector (U4DBVHNode< U4DModel > *uNode) |
Method which computes the BVH node longest dimension vector. More... | |
void | getBVHSplitIndex (U4DBVHNode< U4DModel > *uNode) |
Method which computes a BVH node split index. More... | |
void | addModelToTreeContainer (U4DModel *uModel) |
Method which adds a model to the model container. More... | |
void | heapSorting (U4DBVHNode< U4DModel > *uNode) |
Method to heap sort the BVH tree nodes. More... | |
void | reHeapDown (U4DBVHNode< U4DModel > *uNode, int root, int bottom) |
Method used to heap-down sort the BVH tree nodes. More... | |
void | swap (U4DBVHNode< U4DModel > *uNode, int uindex1, int uindex2) |
Method used to swap the BVH tree node's array index. More... | |
void | startFrustumIntersection (std::vector< U4DPlane > &uPlanes) |
Starts the frustum vs model culling test. More... | |
void | clearContainers () |
Method which clears all broad-phase collision containers. | |
void | setPauseBVHFBuild (bool uValue) |
method to inform that the bvh should be built. This method sets a flag but does not initiate construction of the bvh More... | |
bool | getPauseBVHBuild () |
method that returns if the manager should build the BVH More... | |
void | startTimerForNextBVHBuild () |
This methods starts the timer for the next bvh build. Note, it simply starts a timer. Once the time has elapsed, it sets the computeBVHFlag. It does not initiate the construction of the bvh. | |
void | bvhTimerIntervalElapsed () |
Method that is called by the scheduler once the time interval has elapsed. | |
void | changeVisibilityInterval (float uValue) |
change the current visibility interval. The default is 0.5. More... | |
The U4DVisibilityManager class tests whether a model is within the camera frustum.
void U4DEngine::U4DVisibilityManager::addModelToTreeContainer | ( | U4DModel * | uModel | ) |
Method which adds a model to the model container.
uModel | 3D model entity |
void U4DEngine::U4DVisibilityManager::buildBVHNode | ( | U4DBVHNode< U4DModel > * | uNode, |
int | uLeftIndex, | ||
int | uSplitIndex | ||
) |
Method which builds a BVH tree node.
uNode | Tree node |
uLeftIndex | Left index |
uSplitIndex | Split index |
void U4DEngine::U4DVisibilityManager::calculateBVHVolume | ( | U4DBVHNode< U4DModel > * | uNode | ) |
Method which computes a BVH node volume.
uNode | BVH tree node |
void U4DEngine::U4DVisibilityManager::changeVisibilityInterval | ( | float | uValue | ) |
change the current visibility interval. The default is 0.5.
This interval determines how fast the BVH is computed to determine which 3D models are within the camera frustum. The lower this interval, the faster the BVH is computed.
uValue | time interval. |
void U4DEngine::U4DVisibilityManager::getBVHLongestDimensionVector | ( | U4DBVHNode< U4DModel > * | uNode | ) |
Method which computes the BVH node longest dimension vector.
uNode | BVH tree node |
void U4DEngine::U4DVisibilityManager::getBVHSplitIndex | ( | U4DBVHNode< U4DModel > * | uNode | ) |
Method which computes a BVH node split index.
uNode | BVH tree node |
std::vector< U4DModel * > U4DEngine::U4DVisibilityManager::getModelsContainer | ( | ) |
Method which returns all 3D entities in the BVH tree.
bool U4DEngine::U4DVisibilityManager::getPauseBVHBuild | ( | ) |
method that returns if the manager should build the BVH
void U4DEngine::U4DVisibilityManager::heapSorting | ( | U4DBVHNode< U4DModel > * | uNode | ) |
Method to heap sort the BVH tree nodes.
uNode | BVH tree node |
void U4DEngine::U4DVisibilityManager::reHeapDown | ( | U4DBVHNode< U4DModel > * | 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::U4DVisibilityManager::setPauseBVHFBuild | ( | bool | uValue | ) |
method to inform that the bvh should be built. This method sets a flag but does not initiate construction of the bvh
uValue | value to inform the manager to build the bvh |
void U4DEngine::U4DVisibilityManager::startFrustumIntersection | ( | std::vector< U4DPlane > & | uPlanes | ) |
Starts the frustum vs model culling test.
uPlanes | frustum planes |
void U4DEngine::U4DVisibilityManager::swap | ( | U4DBVHNode< U4DModel > * | 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 |