Graphic3d_CullingTool class provides a possibility to store parameters of view volume, such as its vertices and equations, and contains methods detecting if given AABB overlaps view volume.
More...
#include <Graphic3d_CullingTool.hxx>
Graphic3d_CullingTool class provides a possibility to store parameters of view volume, such as its vertices and equations, and contains methods detecting if given AABB overlaps view volume.
◆ anonymous enum
Enumerates planes of view volume.
Enumerator |
---|
Plane_Left | |
Plane_Right | |
Plane_Bottom | |
Plane_Top | |
Plane_Near | |
Plane_Far | |
PlanesNB | |
◆ Graphic3d_CullingTool()
Graphic3d_CullingTool::Graphic3d_CullingTool |
( |
| ) |
|
Creates an empty selector object with parallel projection type by default.
◆ CacheClipPtsProjections()
void Graphic3d_CullingTool::CacheClipPtsProjections |
( |
| ) |
|
Caches view volume's vertices projections along its normals and AABBs dimensions. Must be called at the beginning of each BVH tree traverse loop.
◆ Camera()
Return the camera definition.
◆ IsCulled()
Checks whether given AABB should be entirely culled or not.
- Parameters
-
theCtx | [in] culling properties |
theMinPt | [in] maximum point of AABB |
theMaxPt | [in] minimum point of AABB |
- Returns
- Standard_True, if AABB is in viewing area, Standard_False otherwise
◆ isFullOut()
Detects if AABB overlaps view volume using separating axis theorem (SAT).
- Parameters
-
theMinPt | [in] maximum point of AABB. |
theMaxPt | [in] minimum point of AABB. |
- Returns
- FALSE, if AABB is in viewing area, TRUE otherwise.
◆ isTooDistant()
Returns TRUE if given AABB should be discarded by distance culling criterion.
◆ isTooSmall()
Returns TRUE if given AABB should be discarded by size culling criterion.
◆ ProjectionMatrix()
Returns current projection matrix.
◆ SetCullingDistance()
◆ SetCullingSize()
◆ SetViewportSize()
◆ SetViewVolume()
Retrieves view volume's planes equations and its vertices from projection and world-view matrices.
◆ SignedPlanePointDistance()
Calculates signed distance from plane to point.
- Parameters
-
theNormal | [in] the plane's normal. |
thePnt | [in] |
◆ ViewportHeight()
◆ ViewportWidth()
◆ WorldViewMatrix()
Returns current world view transformation matrix.
◆ WorldViewProjState()
Returns state of current world view projection transformation matrices.
◆ myCamDir
camera direction for size culling
◆ myCamera
◆ myCamEye
camera eye position for distance culling
◆ myCamScale
camera scale for size culling
◆ myClipPlanes
◆ myClipVerts
◆ myIsProjectionParallel
◆ myMaxClipProjectionPts
Max view volume's vertices projections onto its normals.
◆ myMaxOrthoProjectionPts
Max view volume's vertices projections onto normalized dimensions of AABB.
◆ myMinClipProjectionPts
Min view volume's vertices projections onto its normals.
◆ myMinOrthoProjectionPts
Min view volume's vertices projections onto normalized dimensions of AABB.
◆ myPixelSize
pixel size for size culling
◆ myProjectionMat
◆ myViewportHeight
◆ myViewportWidth
◆ myWorldViewMat
◆ myWorldViewProjState
State of world view projection matrices.
The documentation for this class was generated from the following file: