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 () |
| | Creates an empty selector object with parallel projection type by default. More...
|
| |
| void | SetViewVolume (const Handle< Graphic3d_Camera > &theCamera, const Graphic3d_Mat4d &theModelWorld=Graphic3d_Mat4d()) |
| | Retrieves view volume's planes equations and its vertices from projection and world-view matrices. More...
|
| |
| void | SetViewportSize (Standard_Integer theViewportWidth, Standard_Integer theViewportHeight, Standard_Real theResolutionRatio) |
| |
| void | SetCullingDistance (CullingContext &theCtx, Standard_Real theDistance) const |
| | Setup distance culling. More...
|
| |
| void | SetCullingSize (CullingContext &theCtx, Standard_Real theSize) const |
| | Setup size culling. More...
|
| |
| void | 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. More...
|
| |
| bool | IsCulled (const CullingContext &theCtx, const Graphic3d_Vec3d &theMinPnt, const Graphic3d_Vec3d &theMaxPnt, Standard_Boolean *theIsInside=NULL) const |
| | Checks whether given AABB should be entirely culled or not. More...
|
| |
| const Handle< Graphic3d_Camera > & | Camera () const |
| | Return the camera definition. More...
|
| |
| const Graphic3d_Mat4d & | ProjectionMatrix () const |
| | Returns current projection matrix. More...
|
| |
| const Graphic3d_Mat4d & | WorldViewMatrix () const |
| | Returns current world view transformation matrix. More...
|
| |
| Standard_Integer | ViewportWidth () const |
| |
| Standard_Integer | ViewportHeight () const |
| |
| const Graphic3d_WorldViewProjState & | WorldViewProjState () const |
| | Returns state of current world view projection transformation matrices. More...
|
| |
| const Graphic3d_Vec3d & | CameraEye () const |
| | Returns camera eye position. More...
|
| |
| const Graphic3d_Vec3d & | CameraDirection () const |
| | Returns camera direction. More...
|
| |
| Standard_Real | SignedPlanePointDistance (const Graphic3d_Vec4d &theNormal, const Graphic3d_Vec4d &thePnt) |
| | Calculates signed distance from plane to point. More...
|
| |
| bool | IsOutFrustum (const Graphic3d_Vec3d &theMinPnt, const Graphic3d_Vec3d &theMaxPnt, Standard_Boolean *theIsInside=NULL) const |
| | Detects if AABB overlaps view volume using separating axis theorem (SAT). More...
|
| |
| bool | IsTooDistant (const CullingContext &theCtx, const Graphic3d_Vec3d &theMinPnt, const Graphic3d_Vec3d &theMaxPnt, Standard_Boolean *theIsInside=NULL) const |
| | Returns TRUE if given AABB should be discarded by distance culling criterion. More...
|
| |
| bool | IsTooSmall (const CullingContext &theCtx, const Graphic3d_Vec3d &theMinPnt, const Graphic3d_Vec3d &theMaxPnt) const |
| | Returns TRUE if given AABB should be discarded by size culling criterion. More...
|
| |
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.
Enumerates planes of view volume.
| Enumerator |
|---|
| Plane_Left |
|
| Plane_Right |
|
| Plane_Bottom |
|
| Plane_Top |
|
| Plane_Near |
|
| Plane_Far |
|
| PlanesNB |
|
| Graphic3d_CullingTool::Graphic3d_CullingTool |
( |
| ) |
|
Creates an empty selector object with parallel projection type by default.
| 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.
Return the camera definition.
Returns camera direction.
Returns camera eye position.
Checks whether given AABB should be entirely culled or not.
- Parameters
-
| theCtx | [in] culling properties |
| theMinPnt | [in] maximum point of AABB |
| theMaxPnt | [in] minimum point of AABB |
| theIsInside | [out] flag indicating if AABB is fully inside; initial value should be set to TRUE |
- Returns
- TRUE if AABB is completely outside of view frustum or culled by size/distance; FALSE in case of partial or complete overlap (use theIsInside to distinguish)
Detects if AABB overlaps view volume using separating axis theorem (SAT).
- Parameters
-
| theMinPnt | [in] maximum point of AABB |
| theMaxPnt | [in] minimum point of AABB |
| theIsInside | [out] flag indicating if AABB is fully inside; initial value should be set to TRUE |
- Returns
- TRUE if AABB is completely outside of view frustum; FALSE in case of partial or complete overlap (use theIsInside to distinguish)
- See also
- SelectMgr_Frustum::hasOverlap()
Returns TRUE if given AABB should be discarded by distance culling criterion.
- Parameters
-
| theMinPnt | [in] maximum point of AABB |
| theMaxPnt | [in] minimum point of AABB |
| theIsInside | [out] flag indicating if AABB is fully inside; initial value should be set to TRUE |
- Returns
- TRUE if AABB is completely behind culling distance; FALSE in case of partial or complete overlap (use theIsInside to distinguish)
Returns TRUE if given AABB should be discarded by size culling criterion.
Returns current projection matrix.
Retrieves view volume's planes equations and its vertices from projection and world-view matrices.
- Parameters
-
| theCamera | [in] camera definition |
| theModelWorld | [in] optional object transformation for computing frustum in object local coordinate system |
Calculates signed distance from plane to point.
- Parameters
-
| theNormal | [in] the plane's normal. |
| thePnt | [in] |
Returns current world view transformation matrix.
Returns state of current world view projection transformation matrices.
camera direction for size culling
camera eye position for distance culling
camera scale for size culling
Max view volume's vertices projections onto its normals.
Max view volume's vertices projections onto normalized dimensions of AABB.
Min view volume's vertices projections onto its normals.
Min view volume's vertices projections onto normalized dimensions of AABB.
pixel size for size culling
State of world view projection matrices.
The documentation for this class was generated from the following file: