AI_SDB_VisibleFrustumVisitor Class Reference
[Spatial Database]

#include <AI_SDB_VisibleFrustumVisitor.h>

Inheritance diagram for AI_SDB_VisibleFrustumVisitor:

AI_SDB_VisibilityVisitor AI_SDB_OccludedFrustumVisitor AI_SDB_VisibleFrustumGenArray AI_SDB_OccludedFrustumGenArray

List of all members.


Detailed Description

Visits all elements visible in a view frustum, useful for rendering to a camera.

This visitor finds all the elements possible visible from a given viewpoint within a view frustum. This is useful for determining objects that appear on screen with a given projective camera.

The visitor will call Visit() for every element determined possibly visible.

Public Member Functions

 AI_SDB_VisibleFrustumVisitor (const AI_SDB_Camera &cameraprojection, const AI_Matrix44 &cameratransform)
 ~AI_SDB_VisibleFrustumVisitor ()
void Reset ()
 reset any accumulated state. The view frustum is unchanged
void Reset (const AI_SDB_Camera &newcamera, const AI_Matrix44 &newxform)
 reset any data and reposition the frustum.
void Visit (AI_SDB_SpatialElement *visitee)
 Test and possibly process an element.
virtual AI_SDB_VisitorFlags VisibilityTest (const AI_BBox &testbox, AI_SDB_VisitorFlags flags)
virtual AI_SDB_VisitorFlags VisibilityTest (const AI_Sphere &testsphere, AI_SDB_VisitorFlags flags)
virtual void EnterLocalSpace (AI_Matrix44 &warp)
virtual void LeaveLocalSpace ()
 leave a local space

Protected Member Functions

AI_Matrix44GetCameraTransform () const
AI_SDB_FrustumClipperGetFrustumClipper () const

Protected Attributes

AI_Array< AI_Matrix44m_viewertransformstack
AI_Array< AI_SDB_FrustumClipperm_viewfrustumstack
AI_SDB_Camera m_cameraprojection


Constructor & Destructor Documentation

AI_SDB_VisibleFrustumVisitor::AI_SDB_VisibleFrustumVisitor ( const AI_SDB_Camera cameraprojection,
const AI_Matrix44 cameratransform 
)

AI_SDB_VisibleFrustumVisitor::~AI_SDB_VisibleFrustumVisitor (  ) 


Member Function Documentation

void AI_SDB_VisibleFrustumVisitor::Reset (  )  [virtual]

reset any accumulated state. The view frustum is unchanged

Reimplemented from AI_SDB_VisibilityVisitor.

Reimplemented in AI_SDB_VisibleFrustumGenArray, AI_SDB_OccludedFrustumGenArray, and AI_SDB_OccludedFrustumVisitor.

void AI_SDB_VisibleFrustumVisitor::Reset ( const AI_SDB_Camera newcamera,
const AI_Matrix44 newxform 
)

reset any data and reposition the frustum.

Reimplemented in AI_SDB_OccludedFrustumGenArray, and AI_SDB_OccludedFrustumVisitor.

void AI_SDB_VisibleFrustumVisitor::Visit ( AI_SDB_SpatialElement visitee  )  [virtual]

Test and possibly process an element.

Implements AI_SDB_VisibilityVisitor.

Reimplemented in AI_SDB_VisibleFrustumGenArray, and AI_SDB_OccludedFrustumGenArray.

AI_SDB_VisitorFlags AI_SDB_VisibleFrustumVisitor::VisibilityTest ( const AI_BBox testbox,
AI_SDB_VisitorFlags  flags 
) [virtual]

Check if an element should be culled. If the returned AI_SDB_VisitorFlags produces a TestResult() of true, the element is visible. The returned AI_SDB_VisitorFlags can be used for more efficient visibility tests of primitives enclosed in this bounding box

Implements AI_SDB_VisibilityVisitor.

Reimplemented in AI_SDB_OccludedFrustumVisitor.

AI_SDB_VisitorFlags AI_SDB_VisibleFrustumVisitor::VisibilityTest ( const AI_Sphere testsphere,
AI_SDB_VisitorFlags  flags 
) [virtual]

Check if an element should be culled. If the returned AI_SDB_VisitorFlags produces a TestResult() of true, the element is visible. The returned AI_SDB_VisitorFlags can be used for more efficient visibility tests of primitives enclosed in this bounding AI_Sphere

Implements AI_SDB_VisibilityVisitor.

Reimplemented in AI_SDB_OccludedFrustumVisitor.

void AI_SDB_VisibleFrustumVisitor::EnterLocalSpace ( AI_Matrix44 warp  )  [virtual]

entering a new local space; the matrix given will transform from the current local system into the new space local coordinate system. This is used to possibly update a transform matrix or to transform the spatial region to a new coordinate system.

Reimplemented from AI_SDB_VisibilityVisitor.

Reimplemented in AI_SDB_OccludedFrustumVisitor.

void AI_SDB_VisibleFrustumVisitor::LeaveLocalSpace (  )  [virtual]

leave a local space

Reimplemented from AI_SDB_VisibilityVisitor.

Reimplemented in AI_SDB_OccludedFrustumVisitor.

AI_Matrix44 & AI_SDB_VisibleFrustumVisitor::GetCameraTransform (  )  const [inline, protected]

AI_SDB_FrustumClipper & AI_SDB_VisibleFrustumVisitor::GetFrustumClipper (  )  const [inline, protected]


Member Data Documentation


The documentation for this class was generated from the following files: