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

nvtraverser::SearchTraverser Class Reference

Traverser for searching all objects of one class type. More...

#include <SearchTraverser.h>

Inheritance diagram for nvtraverser::SearchTraverser:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::vector< const
nvsg::Object * >::const_iterator 
iterator
 Iterator type definition. More...


Public Methods

NVSG_API SearchTraverser (void)
 Constructor. More...

NVSG_API const std::vector<
const nvsg::Object * > & 
getResults (void) const
 Get a constant reference to the vector of search results. More...

NVSG_API void setClassName (const std::string &name)
 Set the class name to search for. More...

NVSG_API void setBaseClassSearch (bool enable)
 Enable/Disable the search for base classes. More...


Protected Methods

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

virtual NVSG_API void doApply (const nvsg::ViewState *pViewState, const nvsg::Scene *pScene)
 Set up the search and traverse the scene. More...

virtual NVSG_API void handleGeoNode (const nvsg::GeoNode *p)
 Routine to handle a GeoNode while traversing the scene graph. More...

virtual NVSG_API void handleGroup (const nvsg::Group *p)
 Routine to handle a Group node while traversing the scene graph. More...

virtual NVSG_API void handleLOD (const nvsg::LOD *p)
 Routine to handle a LOD (Level Of Detail) node while traversing the scene graph. More...

virtual NVSG_API void handleSwitch (const nvsg::Switch *p)
 Routine to handle a Switch node while traversing the scene graph. More...

virtual NVSG_API void handleTransform (const nvsg::Transform *p)
 Routine to handle a Transform node while traversing the scene graph. More...

virtual NVSG_API void handleAnimatedTransform (const nvsg::AnimatedTransform *p)
 Routine to handle a AnimatedTransform node while traversing the scene graph. More...

virtual NVSG_API void handleDirectedLight (const nvsg::DirectedLight *p)
 Routine to handle a DirectedLight node while traversing the scene graph. More...

virtual NVSG_API void handlePointLight (const nvsg::PointLight *p)
 Routine to handle a PointLight node while traversing the scene graph. More...

virtual NVSG_API void handleSpotLight (const nvsg::SpotLight *p)
 Routine to handle a SpotLight node while traversing the scene graph. More...

virtual NVSG_API void handleQuads (const nvsg::Quads *p)
 Routine to handle a Quads object while traversing the scene graph. More...

virtual NVSG_API void handleAnimatedQuads (const nvsg::AnimatedQuads *p)
 Routine to handle a AnimatedQuads object while traversing the scene graph. More...

virtual NVSG_API void handleQuadStrips (const nvsg::QuadStrips *p)
 Routine to handle a QuadStrips object while traversing the scene graph. More...

virtual NVSG_API void handleTriangles (const nvsg::Triangles *p)
 Routine to handle a Triangles object while traversing the scene graph. More...

virtual NVSG_API void handleAnimatedTriangles (const nvsg::AnimatedTriangles *p)
 Routine to handle a AnimatedTriangles object while traversing the scene graph. More...

virtual NVSG_API void handleSkinnedTriangles (const nvsg::SkinnedTriangles *p)
 Routine to handle a SkinnedTriangles object while traversing the scene graph. More...

virtual NVSG_API void handleTriStrips (const nvsg::TriStrips *p)
 Routine to handle a TriStrips object while traversing the scene graph. More...

virtual NVSG_API void handleStateSet (const nvsg::StateSet *p)
 Routine to handle a StateSet object while traversing the scene graph. More...

virtual NVSG_API void handleCgFx (const nvsg::CgFx *p)
 Routine to handle a CgFx attribute while traversing the scene graph. More...

virtual NVSG_API void handleFaceAttribute (const nvsg::FaceAttribute *p)
 Routine to handle a FaceAttribute attribute while traversing the scene graph. More...

virtual NVSG_API void handleMaterial (const nvsg::Material *p)
 Routine to handle a Material attribute while traversing the scene graph. More...

virtual NVSG_API void handleTextureAttribute (const nvsg::TextureAttribute *p)
 Routine to handle a TextureAttribute attribute while traversing the scene graph. More...

virtual NVSG_API void handleJitterCamera (const nvsg::JitterCamera *p, const nvsg::Node *root)
 Routine to handle a JitterCamera object while traversing the scene graph. More...

virtual NVSG_API void handleParallelCamera (const nvsg::ParallelCamera *p, const nvsg::Node *root)
 Routine to handle a ParallelCamera object while traversing the scene graph. More...

virtual NVSG_API void handlePerspectiveCamera (const nvsg::PerspectiveCamera *p, const nvsg::Node *root)
 Routine to handle a PerspectiveCamera object while traversing the scene graph. More...

virtual NVSG_API void handleStereoCamera (const nvsg::StereoCamera *p, const nvsg::Node *root)
 Routine to handle a StereoCamera object while traversing the scene graph. More...

virtual NVSG_API void handleFramedTrafoAnimation (const nvsg::FramedAnimation< nvmath::Trafo > *p)
 Routine to handle a FramedAnimation<Trafo> object while traversing the scene graph. More...

virtual NVSG_API void handleFramedVNVectorAnimation (const nvsg::FramedAnimation< nvsg::VNVector > *p)
 Routine to handle a FramedAnimation<VNVector> object while traversing the scene graph. More...

virtual NVSG_API void handleLinearInterpolatedTrafoAnimation (const nvsg::LinearInterpolatedAnimation< nvmath::Trafo > *p)
 Routine to handle a LinearInterpolatedAnimation<Trafo> object while traversing the scene graph. More...

virtual NVSG_API void handleLinearInterpolatedVNVectorAnimation (const nvsg::LinearInterpolatedAnimation< nvsg::VNVector > *p)
 Routine to handle a LinearInterpolatedAnimation<VNVector> object while traversing the scene graph. More...

virtual NVSG_API void search (const nvsg::Animation< nvmath::Trafo > *p)
 Search through an Animation<Trafo> object. More...

virtual NVSG_API void search (const nvsg::Animation< nvsg::VNVector > *p)
 Search through an Animation<VNVector> object. More...

virtual NVSG_API void search (const nvsg::Camera *p)
 Search through a Camera object. More...

virtual NVSG_API void search (const nvsg::Drawable *p)
 Search through a Drawable object. More...

virtual NVSG_API void search (const nvsg::GeoSet *p)
 Search through a GeoSet object. More...

virtual NVSG_API void search (const nvsg::Group *p)
 Search through a Group object. More...

virtual NVSG_API void search (const nvsg::InterpolatedAnimation< nvmath::Trafo > *p)
 Search through an InterpolatedAnimation<Trafo>. More...

virtual NVSG_API void search (const nvsg::InterpolatedAnimation< nvsg::VNVector > *p)
 Search through an InterpolatedAnimation<VNVector>. More...

virtual NVSG_API void search (const nvsg::LightSource *p)
 Search through a LightSource object. More...

virtual NVSG_API void search (const nvsg::MonoCamera *p)
 Search through a MonoCamera object. More...

virtual NVSG_API void search (const nvsg::Node *p)
 Search through a Node object. More...

virtual NVSG_API void search (const nvsg::Object *p)
 Search through an Object object. More...

virtual NVSG_API void search (const nvsg::Quads *p)
 Search through an Quads object. More...

virtual NVSG_API void search (const nvsg::StateAttribute *p)
 Search through a StateAttribute object. More...

virtual NVSG_API void search (const nvsg::Transform *p)
 Search through a Transform object. More...

virtual NVSG_API void search (const nvsg::Triangles *p)
 Search through a Triangles object. More...


Detailed Description

Traverser for searching all objects of one class type.

With a search traverser you can scan over a scene and get a vector of pointers to the objects you're searching. It's possible to search for objects of a specific class or for objects that have a specific base class.


Member Typedef Documentation

typedef std::vector<const nvsg::Object*>::const_iterator nvtraverser::SearchTraverser::iterator
 

Iterator type definition.


Constructor & Destructor Documentation

NVSG_API nvtraverser::SearchTraverser::SearchTraverser void   
 

Constructor.

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

Destructor.


Member Function Documentation

const std::vector< const nvsg::Object * > & nvtraverser::SearchTraverser::getResults void    const [inline]
 

Get a constant reference to the vector of search results.

Returns:
constant reference to the vector of search results

void nvtraverser::SearchTraverser::setClassName const std::string &    name [inline]
 

Set the class name to search for.

The class name to look for needs to be fully qualified, i.e. "class nvsg::LightSource" instead of "LightSource" only.

Parameters:
name  class name to look for in a sceene

void nvtraverser::SearchTraverser::setBaseClassSearch bool    enable [inline]
 

Enable/Disable the search for base classes.

If the search for base class is enabled, all classes that are equal to are are derived from the search class are found.

Parameters:
enable  true, to enable base class search, otherwise false

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

Set up the search and traverse the scene.

Parameters:
pViewState  ignored
pScene  scene to traverse

Reimplemented from nvtraverser::Traverser.

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

Routine to handle a GeoNode while traversing the scene graph.

Parameters:
p  Points to the currently visited GeoNode object.

Reimplemented from nvtraverser::Traverser.

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

Routine to handle a Group node while traversing the scene graph.

Parameters:
p  Points to the currently visited Group object.

Reimplemented from nvtraverser::Traverser.

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

Routine to handle a LOD (Level Of Detail) node while traversing the scene graph.

Parameters:
p  Points to the currently visited LOD object.

Reimplemented from nvtraverser::Traverser.

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

Routine to handle a Switch node while traversing the scene graph.

Parameters:
p  Points to the currently visited Switch object.

Reimplemented from nvtraverser::Traverser.

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

Routine to handle a Transform node while traversing the scene graph.

Parameters:
p  Points to the currently visited Transform object.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::SearchTraverser::handleAnimatedTransform const nvsg::AnimatedTransform   p [protected, virtual]
 

Routine to handle a AnimatedTransform node while traversing the scene graph.

Parameters:
p  Points to the currently visited AnimatedTransform object.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::SearchTraverser::handleDirectedLight const nvsg::DirectedLight   p [protected, virtual]
 

Routine to handle a DirectedLight node while traversing the scene graph.

Parameters:
p  Points to the currently visited DirectedLight object.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::SearchTraverser::handlePointLight const nvsg::PointLight   p [protected, virtual]
 

Routine to handle a PointLight node while traversing the scene graph.

Parameters:
p  Points to the currently visited PointLight object.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::SearchTraverser::handleSpotLight const nvsg::SpotLight   p [protected, virtual]
 

Routine to handle a SpotLight node while traversing the scene graph.

Parameters:
p  Points to the currently visited SpotLight object.

Reimplemented from nvtraverser::Traverser.

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

Routine to handle a Quads object while traversing the scene graph.

Parameters:
p  Points to the currently visited Quads object.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::SearchTraverser::handleAnimatedQuads const nvsg::AnimatedQuads   p [protected, virtual]
 

Routine to handle a AnimatedQuads object while traversing the scene graph.

Parameters:
p  Points to the currently visited AnimatedQuads object.

Reimplemented from nvtraverser::Traverser.

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

Routine to handle a QuadStrips object while traversing the scene graph.

Parameters:
p  Points to the currently visited QuadStrips object.

Reimplemented from nvtraverser::Traverser.

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

Routine to handle a Triangles object while traversing the scene graph.

Parameters:
p  Points to the currently visited Triangles object.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::SearchTraverser::handleAnimatedTriangles const nvsg::AnimatedTriangles   p [protected, virtual]
 

Routine to handle a AnimatedTriangles object while traversing the scene graph.

Parameters:
p  Points to the currently visited AnimatedTriangles object.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::SearchTraverser::handleSkinnedTriangles const nvsg::SkinnedTriangles   p [protected, virtual]
 

Routine to handle a SkinnedTriangles object while traversing the scene graph.

Parameters:
p  Points to the currently visited SkinnedTriangles object.

Reimplemented from nvtraverser::Traverser.

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

Routine to handle a TriStrips object while traversing the scene graph.

Parameters:
p  Points to the currently visited TriStrips object.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::SearchTraverser::handleStateSet const nvsg::StateSet   p [protected, virtual]
 

Routine to handle a StateSet object while traversing the scene graph.

Parameters:
p  Points to the currently visited StateSet object.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::SearchTraverser::handleCgFx const nvsg::CgFx   p [protected, virtual]
 

Routine to handle a CgFx attribute while traversing the scene graph.

Parameters:
p  Points to the currently visited CgFx object.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::SearchTraverser::handleFaceAttribute const nvsg::FaceAttribute   p [protected, virtual]
 

Routine to handle a FaceAttribute attribute while traversing the scene graph.

Parameters:
p  Points to the currently visited FaceAttribute object.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::SearchTraverser::handleMaterial const nvsg::Material   p [protected, virtual]
 

Routine to handle a Material attribute while traversing the scene graph.

Parameters:
p  Points to the currently visited Material object.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::SearchTraverser::handleTextureAttribute const nvsg::TextureAttribute   p [protected, virtual]
 

Routine to handle a TextureAttribute attribute while traversing the scene graph.

Parameters:
p  Points to the currently visited TextureAttribute object.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::SearchTraverser::handleJitterCamera const nvsg::JitterCamera   p,
const nvsg::Node   root
[protected, virtual]
 

Routine to handle a JitterCamera object while traversing the scene graph.

Parameters:
p  Points to the currently visited JitterCamera object.
root  If valid, points to the root node to be traversed with the actual camera settings.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::SearchTraverser::handleParallelCamera const nvsg::ParallelCamera   p,
const nvsg::Node   root
[protected, virtual]
 

Routine to handle a ParallelCamera object while traversing the scene graph.

Parameters:
p  Points to the currently visited ParallelCamera object.
root  If valid, points to the root node to be traversed with the actual camera settings.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::SearchTraverser::handlePerspectiveCamera const nvsg::PerspectiveCamera   p,
const nvsg::Node   root
[protected, virtual]
 

Routine to handle a PerspectiveCamera object while traversing the scene graph.

Parameters:
p  Points to the currently visited PerspectiveCamera object.
root  If valid, points to the root node to be traversed with the actual camera settings.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::SearchTraverser::handleStereoCamera const nvsg::StereoCamera   p,
const nvsg::Node   root
[protected, virtual]
 

Routine to handle a StereoCamera object while traversing the scene graph.

Parameters:
p  Points to the currently visited StereoCamera object.
root  If valid, points to the root node to be traversed with the actual camera settings.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::SearchTraverser::handleFramedTrafoAnimation const nvsg::FramedAnimation< nvmath::Trafo > *    p [protected, virtual]
 

Routine to handle a FramedAnimation<Trafo> object while traversing the scene graph.

Parameters:
p  Points to the currently visited Animation object.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::SearchTraverser::handleFramedVNVectorAnimation const nvsg::FramedAnimation< nvsg::VNVector > *    p [protected, virtual]
 

Routine to handle a FramedAnimation<VNVector> object while traversing the scene graph.

Parameters:
p  Points to the currently visited Animation object.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::SearchTraverser::handleLinearInterpolatedTrafoAnimation const nvsg::LinearInterpolatedAnimation< nvmath::Trafo > *    p [protected, virtual]
 

Routine to handle a LinearInterpolatedAnimation<Trafo> object while traversing the scene graph.

Parameters:
p  Points to the currently visited Animation object.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::SearchTraverser::handleLinearInterpolatedVNVectorAnimation const nvsg::LinearInterpolatedAnimation< nvsg::VNVector > *    p [protected, virtual]
 

Routine to handle a LinearInterpolatedAnimation<VNVector> object while traversing the scene graph.

Parameters:
p  Points to the currently visited Animation object.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::SearchTraverser::search const nvsg::Animation< nvmath::Trafo > *    p [protected, virtual]
 

Search through an Animation<Trafo> object.

This function is called when base class searching is enabled.

Parameters:
p  Animation to search through

virtual NVSG_API void nvtraverser::SearchTraverser::search const nvsg::Animation< nvsg::VNVector > *    p [protected, virtual]
 

Search through an Animation<VNVector> object.

This function is called when base class searching is enabled.

Parameters:
p  Animation to search through

virtual NVSG_API void nvtraverser::SearchTraverser::search const nvsg::Camera   p [protected, virtual]
 

Search through a Camera object.

This function is called when base class searching is enabled.

Parameters:
p  Camera to search through

virtual NVSG_API void nvtraverser::SearchTraverser::search const nvsg::Drawable   p [protected, virtual]
 

Search through a Drawable object.

This function is called when base class searching is enabled.

Parameters:
p  Drawable to search through

virtual NVSG_API void nvtraverser::SearchTraverser::search const nvsg::GeoSet   p [protected, virtual]
 

Search through a GeoSet object.

This function is called when base class searching is enabled.

Parameters:
p  GeoSet to search through

virtual NVSG_API void nvtraverser::SearchTraverser::search const nvsg::Group   p [protected, virtual]
 

Search through a Group object.

This function is called when Group is searched through or base class searching is enabled.

Parameters:
p  Group to search through

virtual NVSG_API void nvtraverser::SearchTraverser::search const nvsg::InterpolatedAnimation< nvmath::Trafo > *    p [protected, virtual]
 

Search through an InterpolatedAnimation<Trafo>.

This function is called when base class searching is enabled.

Parameters:
p  InterpolatedAnimation to search through

virtual NVSG_API void nvtraverser::SearchTraverser::search const nvsg::InterpolatedAnimation< nvsg::VNVector > *    p [protected, virtual]
 

Search through an InterpolatedAnimation<VNVector>.

This function is called when base class searching is enabled.

Parameters:
p  InterpolatedAnimation to search through

virtual NVSG_API void nvtraverser::SearchTraverser::search const nvsg::LightSource   p [protected, virtual]
 

Search through a LightSource object.

This function is called when base class searching is enabled.

Parameters:
p  LightSource to search through

virtual NVSG_API void nvtraverser::SearchTraverser::search const nvsg::MonoCamera   p [protected, virtual]
 

Search through a MonoCamera object.

This function is called when base class searching is enabled.

Parameters:
p  MonoCamera to search through

virtual NVSG_API void nvtraverser::SearchTraverser::search const nvsg::Node   p [protected, virtual]
 

Search through a Node object.

This function is called when base class searching is enabled.

Parameters:
p  Node to search through

virtual NVSG_API void nvtraverser::SearchTraverser::search const nvsg::Object   p [protected, virtual]
 

Search through an Object object.

This function is called when base class searching is enabled.

Parameters:
p  Object to search through

virtual NVSG_API void nvtraverser::SearchTraverser::search const nvsg::Quads   p [protected, virtual]
 

Search through an Quads object.

This function is called when a Quad is search through or a base class searching is enabled.

Parameters:
p  Quads to search through

virtual NVSG_API void nvtraverser::SearchTraverser::search const nvsg::StateAttribute   p [protected, virtual]
 

Search through a StateAttribute object.

This function is called when base class searching is enabled.

Parameters:
p  StateAttribute to search through

virtual NVSG_API void nvtraverser::SearchTraverser::search const nvsg::Transform   p [protected, virtual]
 

Search through a Transform object.

This function is called when Transform is searched or a base class searching is enabled.

Parameters:
p  Transform to search through

virtual NVSG_API void nvtraverser::SearchTraverser::search const nvsg::Triangles   p [protected, virtual]
 

Search through a Triangles object.

This function is called when a Triangles is searched or a base class searching is enabled.

Parameters:
p  Triangles to search through


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