Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

nvtraverser::CullTraverser Class Reference

Base class for different culling implementations. More...

#include <CullTraverser.h>

Inheritance diagram for nvtraverser::CullTraverser:

Inheritance graph
[legend]
Collaboration diagram for nvtraverser::CullTraverser:

Collaboration graph
[legend]
List of all members.

Protected Methods

NVSG_API CullTraverser ()
 Constructor (protected to prevent explicit instantiation). More...

virtual NVSG_API ~CullTraverser (void)
 Destructor. More...

virtual NVSG_API nvsg::CullCode cullCode (const nvsg::Drawable *p) const
 determine the CullCode of a Drawable. More...

virtual NVSG_API nvsg::CullCode cullCode (const nvsg::Node *p) const
 Determine the CullCode of a Node. More...

virtual NVSG_API void handleGeoNode (const nvsg::GeoNode *p)
 Determine the CullCode of each Drawable of p. More...

virtual NVSG_API void handleGroup (const nvsg::Group *p)
 Determine the CullCode of all children of p. More...

virtual NVSG_API void handleLOD (const nvsg::LOD *p)
 Determine the CullCode of all children of p. More...

virtual NVSG_API void handleSwitch (const nvsg::Switch *p)
 Determine the CullCode of all children of p. More...

virtual NVSG_API void handleTransform (const nvsg::Transform *p)
 Determine the CullCode of all children of p. More...

virtual NVSG_API void handleQuads (const nvsg::Quads *p)
 Determine the CullCode of the Quads p. More...

virtual NVSG_API void handleQuadStrips (const nvsg::QuadStrips *p)
 Determine the CullCode of the QuadStrips p. More...

virtual NVSG_API void handleTriangles (const nvsg::Triangles *p)
 Determine the CullCode of the Triangles p. More...

virtual NVSG_API void handleTriStrips (const nvsg::TriStrips *p)
 Determine the CullCode of the TriStrips p. More...

virtual NVSG_API void traverseLight (const nvsg::LightSource *p)
 Set the CullCode of the LightSource p. More...

virtual NVSG_API void doApply (const nvsg::ViewState *pViewState, const nvsg::Scene *pScene)
 Initiate traversing a given scene graph. More...


Detailed Description

Base class for different culling implementations.

Use this class as the base class for cull traversers. /**

Note:
A CullTraverser doesn't change anything in the scene graph, but might be used by a modifying traverser. therefore, it gets the readOnly flag as a parameter to pass to ModelViewTraverser.


Constructor & Destructor Documentation

NVSG_API nvtraverser::CullTraverser::CullTraverser   [protected]
 

Constructor (protected to prevent explicit instantiation).

virtual NVSG_API nvtraverser::CullTraverser::~CullTraverser void    [protected, virtual]
 

Destructor.


Member Function Documentation

virtual NVSG_API nvsg::CullCode nvtraverser::CullTraverser::cullCode const nvsg::Drawable   p const [protected, virtual]
 

determine the CullCode of a Drawable.

The default implementation returns CC_IN.

Returns:
CullCode for Drawable p.
Parameters:
p  pointer to Drawable for determining the CullCode

Reimplemented in nvtraverser::FrustumCullTraverser, and nvtraverser::OcclusionCullTraverser.

virtual NVSG_API nvsg::CullCode nvtraverser::CullTraverser::cullCode const nvsg::Node   p const [protected, virtual]
 

Determine the CullCode of a Node.

The default implementaion returns CC_IN.

Returns:
CullCode for Node p.
Parameters:
p  pointer to Node for determining the CullCode

Reimplemented in nvtraverser::FrustumCullTraverser, and nvtraverser::OcclusionCullTraverser.

virtual NVSG_API void nvtraverser::CullTraverser::handleGeoNode const nvsg::GeoNode   p [protected, virtual]
 

Determine the CullCode of each Drawable of p.

If the GeoNode p is partially visible, the CullCode of each of it's Drawable is determined and then traversed.

Parameters:
p  GeoNode to traverse

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::CullTraverser::handleGroup const nvsg::Group   p [protected, virtual]
 

Determine the CullCode of all children of p.

If the Group p is partially visible, the CullCode of each of it's children is determined and then traversed.

Parameters:
p  Group to traverse

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::CullTraverser::handleLOD const nvsg::LOD   p [protected, virtual]
 

Determine the CullCode of all children of p.

If the LOD p is partially visible, the CullCode of each of it's children is determined and then traversed.

Parameters:
p  LOD to traverse

Reimplemented from nvtraverser::ModelViewTraverser.

virtual NVSG_API void nvtraverser::CullTraverser::handleSwitch const nvsg::Switch   p [protected, virtual]
 

Determine the CullCode of all children of p.

If the Switch p is partially visible, the CullCode of each of it's children is determined and then traversed.

Parameters:
p  Switch to traverse

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::CullTraverser::handleTransform const nvsg::Transform   p [protected, virtual]
 

Determine the CullCode of all children of p.

If the Transform p is partially visible, the CullCode of each of it's children is determined and then traversed.

Parameters:
p  Transform to traverse

Reimplemented from nvtraverser::ModelViewTraverser.

virtual NVSG_API void nvtraverser::CullTraverser::handleQuads const nvsg::Quads   p [protected, virtual]
 

Determine the CullCode of the Quads p.

The CullCode is determined and added to the Object to CullData map on top of the ObjectCullDataMapStack.

Parameters:
p  Quads to determine CullData for

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::CullTraverser::handleQuadStrips const nvsg::QuadStrips   p [protected, virtual]
 

Determine the CullCode of the QuadStrips p.

The CullCode is determined and added to the Object to CullData map on top of the ObjectCullDataMapStack.

Parameters:
p  QuadStrips for determining the CullData

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::CullTraverser::handleTriangles const nvsg::Triangles   p [protected, virtual]
 

Determine the CullCode of the Triangles p.

The CullCode is determined and added to the Object to CullData map on top of the ObjectCullDataMapStack.

Parameters:
p  Triangles for determining the CullData

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::CullTraverser::handleTriStrips const nvsg::TriStrips   p [protected, virtual]
 

Determine the CullCode of the TriStrips p.

The CullCode is determined and added to the Object to CullData map on top of the ObjectCullDataMapStack.

Parameters:
p  TriStrips for determining the CullData

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::CullTraverser::traverseLight const nvsg::LightSource   p [protected, virtual]
 

Set the CullCode of the LightSource p.

All lights are always considered to be in.

Parameters:
p  Points to the LightSource currently traversed.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::CullTraverser::doApply const nvsg::ViewState   pViewState,
const nvsg::Scene   pScene
[protected, virtual]
 

Initiate traversing a given scene graph.

This overloadable function is called from the traverser's entry point apply. The base implementation first initiates the traversing of the scene's global states, if available. After that the scene itself is traversed. If an optional ViewState ViewState is passed through viewState, it is applied prior to traversing the scene.

Custom traversers may override this function in order to implement initial work to be done before traversing the scene. For derived classes to ensure proper traversing of the scene, it is recommended to always call the base implementation after the initial work has been done.

Reimplemented from nvtraverser::Traverser.

Reimplemented in nvtraverser::OcclusionCullTraverser.


The documentation for this class was generated from the following file:
Generated on Tue Mar 1 13:20:36 2005 for NVSGSDK by NVIDIA