Untold Engine  Beta v0.0.16
docs
U4DEngine::U4DVisibilityCulling Class Reference

The U4DVisibilityCulling class tests whether a 3D model is within the frustum. More...

Public Member Functions

 U4DVisibilityCulling ()
 class constructor
 
 ~U4DVisibilityCulling ()
 class destructor
 
bool aabbInFrustum (std::vector< U4DPlane > &uPlanes, U4DAABB *uAABB)
 check if all the points of the AABB intersect or are inside the plane More...
 
void startFrustumIntersection (std::vector< std::shared_ptr< U4DBVHNode< U4DModel >>> &uTreeContainer, std::vector< U4DPlane > &uPlanes)
 starts the frustum intersection More...
 
void testFrustumIntersection (U4DBVHNode< U4DModel > *uTreeLeftNode, U4DBVHNode< U4DModel > *uTreeRightNode, std::vector< U4DPlane > &uPlanes)
 tests the frustum intersection More...
 

Detailed Description

The U4DVisibilityCulling class tests whether a 3D model is within the frustum.

Member Function Documentation

◆ aabbInFrustum()

bool U4DEngine::U4DVisibilityCulling::aabbInFrustum ( std::vector< U4DPlane > &  uPlanes,
U4DAABB uAABB 
)

check if all the points of the AABB intersect or are inside the plane

Parameters
uPlanescamera planes
uAABBAABB box encompassing the 3D models
Returns
true if all AABB points are inside the plane

◆ startFrustumIntersection()

void U4DEngine::U4DVisibilityCulling::startFrustumIntersection ( std::vector< std::shared_ptr< U4DBVHNode< U4DModel >>> &  uTreeContainer,
std::vector< U4DPlane > &  uPlanes 
)

starts the frustum intersection

Parameters
uTreeContainertree containing the AABB boxes encompassing the 3D models
uPlanescamera planes

◆ testFrustumIntersection()

void U4DEngine::U4DVisibilityCulling::testFrustumIntersection ( U4DBVHNode< U4DModel > *  uTreeLeftNode,
U4DBVHNode< U4DModel > *  uTreeRightNode,
std::vector< U4DPlane > &  uPlanes 
)

tests the frustum intersection

Parameters
uTreeLeftNodeleft node of tree containing the AABB boxes encompassing the 3D models
uTreeRightNoderight node of tree containing the AABB boxes encompassing the 3D models
uPlanescamera planes