#include <SearchTraverser.h>
Inheritance diagram for nvtraverser::SearchTraverser:
Public Types | |
typedef std::vector< const nvsg::Object * >::const_iterator | iterator |
Iterator type definition. | |
Public Member Functions | |
NVSG_API | SearchTraverser (void) |
Constructor. | |
NVSG_API const std::vector< const nvsg::Object * > & | getResults (void) const |
Get a constant reference to the vector of search results. | |
NVSG_API void | setClassName (const std::string &name) |
Set the class name to search for. | |
NVSG_API void | setBaseClassSearch (bool enable) |
Enable/Disable the search for base classes. | |
Protected Member Functions | |
virtual NVSG_API | ~SearchTraverser (void) |
Destructor. | |
virtual NVSG_API void | doApply (const nvsg::ViewState *pViewState, const nvsg::Scene *pScene) |
Set up the search and traverse the scene. | |
virtual NVSG_API void | handleGeoNode (const nvsg::GeoNode *p) |
Routine to handle a GeoNode while traversing the scene graph. | |
virtual NVSG_API void | handleGroup (const nvsg::Group *p) |
Routine to handle a Group node while traversing the scene graph. | |
virtual NVSG_API void | handleLOD (const nvsg::LOD *p) |
Routine to handle a LOD (Level Of Detail) node while traversing the scene graph. | |
virtual NVSG_API void | handleSwitch (const nvsg::Switch *p) |
Routine to handle a Switch node while traversing the scene graph. | |
virtual NVSG_API void | handleTransform (const nvsg::Transform *p) |
Routine to handle a Transform node while traversing the scene graph. | |
virtual NVSG_API void | handleAnimatedTransform (const nvsg::AnimatedTransform *p) |
Routine to handle a AnimatedTransform node while traversing the scene graph. | |
virtual NVSG_API void | handleDirectedLight (const nvsg::DirectedLight *p) |
Routine to handle a DirectedLight node while traversing the scene graph. | |
virtual NVSG_API void | handlePointLight (const nvsg::PointLight *p) |
Routine to handle a PointLight node while traversing the scene graph. | |
virtual NVSG_API void | handleSpotLight (const nvsg::SpotLight *p) |
Routine to handle a SpotLight node while traversing the scene graph. | |
virtual NVSG_API void | handleQuads (const nvsg::Quads *p) |
Routine to handle a Quads object while traversing the scene graph. | |
virtual NVSG_API void | handleAnimatedQuads (const nvsg::AnimatedQuads *p) |
Routine to handle a AnimatedQuads object while traversing the scene graph. | |
virtual NVSG_API void | handleQuadStrips (const nvsg::QuadStrips *p) |
Routine to handle a QuadStrips object while traversing the scene graph. | |
virtual NVSG_API void | handleTriangles (const nvsg::Triangles *p) |
Routine to handle a Triangles object while traversing the scene graph. | |
virtual NVSG_API void | handleAnimatedTriangles (const nvsg::AnimatedTriangles *p) |
Routine to handle a AnimatedTriangles object while traversing the scene graph. | |
virtual NVSG_API void | handleSkinnedTriangles (const nvsg::SkinnedTriangles *p) |
Routine to handle a SkinnedTriangles object while traversing the scene graph. | |
virtual NVSG_API void | handleTriStrips (const nvsg::TriStrips *p) |
Routine to handle a TriStrips object while traversing the scene graph. | |
virtual NVSG_API void | handleStateSet (const nvsg::StateSet *p) |
Routine to handle a StateSet object while traversing the scene graph. | |
virtual NVSG_API void | handleCgFx (const nvsg::CgFx *p) |
Routine to handle a CgFx attribute while traversing the scene graph. | |
virtual NVSG_API void | handleFaceAttribute (const nvsg::FaceAttribute *p) |
Routine to handle a FaceAttribute attribute while traversing the scene graph. | |
virtual NVSG_API void | handleMaterial (const nvsg::Material *p) |
Routine to handle a Material attribute while traversing the scene graph. | |
virtual NVSG_API void | handleTextureAttribute (const nvsg::TextureAttribute *p) |
Routine to handle a TextureAttribute attribute while traversing the scene graph. | |
virtual NVSG_API void | handleJitterCamera (const nvsg::JitterCamera *p, const nvsg::Node *root) |
Routine to handle a JitterCamera object while traversing the scene graph. | |
virtual NVSG_API void | handleParallelCamera (const nvsg::ParallelCamera *p, const nvsg::Node *root) |
Routine to handle a ParallelCamera object while traversing the scene graph. | |
virtual NVSG_API void | handlePerspectiveCamera (const nvsg::PerspectiveCamera *p, const nvsg::Node *root) |
Routine to handle a PerspectiveCamera object while traversing the scene graph. | |
virtual NVSG_API void | handleStereoCamera (const nvsg::StereoCamera *p, const nvsg::Node *root) |
Routine to handle a StereoCamera object while traversing the scene graph. | |
virtual NVSG_API void | handleFramedTrafoAnimation (const nvsg::FramedAnimation< nvmath::Trafo > *p) |
Routine to handle a FramedAnimation<Trafo> object while traversing the scene graph. | |
virtual NVSG_API void | handleFramedVNVectorAnimation (const nvsg::FramedAnimation< nvsg::VNVector > *p) |
Routine to handle a FramedAnimation<VNVector> object while traversing the scene graph. | |
virtual NVSG_API void | handleLinearInterpolatedTrafoAnimation (const nvsg::LinearInterpolatedAnimation< nvmath::Trafo > *p) |
Routine to handle a LinearInterpolatedAnimation<Trafo> object while traversing the scene graph. | |
virtual NVSG_API void | handleLinearInterpolatedVNVectorAnimation (const nvsg::LinearInterpolatedAnimation< nvsg::VNVector > *p) |
Routine to handle a LinearInterpolatedAnimation<VNVector> object while traversing the scene graph. | |
virtual NVSG_API void | search (const nvsg::Animation< nvmath::Trafo > *p) |
Search through an Animation<Trafo> object. | |
virtual NVSG_API void | search (const nvsg::Animation< nvsg::VNVector > *p) |
Search through an Animation<VNVector> object. | |
virtual NVSG_API void | search (const nvsg::Camera *p) |
Search through a Camera object. | |
virtual NVSG_API void | search (const nvsg::Drawable *p) |
Search through a Drawable object. | |
virtual NVSG_API void | search (const nvsg::GeoSet *p) |
Search through a GeoSet object. | |
virtual NVSG_API void | search (const nvsg::Group *p) |
Search through a Group object. | |
virtual NVSG_API void | search (const nvsg::InterpolatedAnimation< nvmath::Trafo > *p) |
Search through an InterpolatedAnimation<Trafo>. | |
virtual NVSG_API void | search (const nvsg::InterpolatedAnimation< nvsg::VNVector > *p) |
Search through an InterpolatedAnimation<VNVector>. | |
virtual NVSG_API void | search (const nvsg::LightSource *p) |
Search through a LightSource object. | |
virtual NVSG_API void | search (const nvsg::MonoCamera *p) |
Search through a MonoCamera object. | |
virtual NVSG_API void | search (const nvsg::Node *p) |
Search through a Node object. | |
virtual NVSG_API void | search (const nvsg::Object *p) |
Search through an Object object. | |
virtual NVSG_API void | search (const nvsg::Quads *p) |
Search through an Quads object. | |
virtual NVSG_API void | search (const nvsg::StateAttribute *p) |
Search through a StateAttribute object. | |
virtual NVSG_API void | search (const nvsg::Transform *p) |
Search through a Transform object. | |
virtual NVSG_API void | search (const nvsg::Triangles *p) |
Search through a Triangles object. |
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.
|
Iterator type definition.
|
|
Constructor.
|
|
Destructor.
|
|
Get a constant reference to the vector of search results.
|
|
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.
|
|
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.
|
|
Set up the search and traverse the scene.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a GeoNode while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a Group node while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a LOD (Level Of Detail) node while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a Switch node while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a Transform node while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a AnimatedTransform node while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a DirectedLight node while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a PointLight node while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a SpotLight node while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a Quads object while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a AnimatedQuads object while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a QuadStrips object while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a Triangles object while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a AnimatedTriangles object while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a SkinnedTriangles object while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a TriStrips object while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a StateSet object while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a CgFx attribute while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a FaceAttribute attribute while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a Material attribute while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a TextureAttribute attribute while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a JitterCamera object while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a ParallelCamera object while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a PerspectiveCamera object while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a StereoCamera object while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a FramedAnimation<Trafo> object while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a FramedAnimation<VNVector> object while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a LinearInterpolatedAnimation<Trafo> object while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a LinearInterpolatedAnimation<VNVector> object while traversing the scene graph.
Reimplemented from nvtraverser::Traverser. |
|
Search through an Animation<Trafo> object. This function is called when base class searching is enabled.
|
|
Search through an Animation<VNVector> object. This function is called when base class searching is enabled.
|
|
Search through a Camera object. This function is called when base class searching is enabled.
|
|
Search through a Drawable object. This function is called when base class searching is enabled.
|
|
Search through a GeoSet object. This function is called when base class searching is enabled.
|
|
Search through a Group object. This function is called when Group is searched through or base class searching is enabled.
|
|
Search through an InterpolatedAnimation<Trafo>. This function is called when base class searching is enabled.
|
|
Search through an InterpolatedAnimation<VNVector>. This function is called when base class searching is enabled.
|
|
Search through a LightSource object. This function is called when base class searching is enabled.
|
|
Search through a MonoCamera object. This function is called when base class searching is enabled.
|
|
Search through a Node object. This function is called when base class searching is enabled.
|
|
Search through an Object object. This function is called when base class searching is enabled.
|
|
Search through an Quads object. This function is called when a Quad is search through or a base class searching is enabled.
|
|
Search through a StateAttribute object. This function is called when base class searching is enabled.
|
|
Search through a Transform object. This function is called when Transform is searched or a base class searching is enabled.
|
|
Search through a Triangles object. This function is called when a Triangles is searched or a base class searching is enabled.
|