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

nvtraverser::IdentityToGroupTraverser Class Reference

Traverser that replaces identity transforms by groups. More...

#include <IdentityToGroupTraverser.h>

Inheritance diagram for nvtraverser::IdentityToGroupTraverser:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

NVSG_API IdentityToGroupTraverser (void)
 Constructor.

Protected Member Functions

virtual NVSG_API ~IdentityToGroupTraverser (void)
 Protected destructor to prevent instantiation of an IdentityToGroupTraverser on stack.
virtual NVSG_API void handleAnimatedTransform (const nvsg::AnimatedTransform *p)
 Routine to handle a AnimatedTransform object while traversing the scene graph.
virtual NVSG_API void handleGroup (const nvsg::Group *p)
 Routine to handle a Group object while traversing the scene graph.
virtual NVSG_API void handleTransform (const nvsg::Transform *p)
 Routine to handle a Transform object while traversing the scene graph.

Detailed Description

Traverser that replaces identity transforms by groups.

Identical StateSets are recognized and linked to the same one. Identical StateAttributes are recognized and linked to the same one. This way, redundant objects are removed, thereby reducing storage space as well as run time.


Constructor & Destructor Documentation

NVSG_API nvtraverser::IdentityToGroupTraverser::IdentityToGroupTraverser void   ) 
 

Constructor.

virtual NVSG_API nvtraverser::IdentityToGroupTraverser::~IdentityToGroupTraverser void   )  [protected, virtual]
 

Protected destructor to prevent instantiation of an IdentityToGroupTraverser on stack.


Member Function Documentation

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

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

Explicitly go to Traverser::handleTransform() to prevent handling in handleTransform.

Parameters:
p  points to the currently visited AnimatedTransform object.

Reimplemented from nvtraverser::Traverser.

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

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

Replaces any Transform in it's list of children that is to be replaced by a Group.

Parameters:
p  points to the currently visited Group

Reimplemented from nvtraverser::Traverser.

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

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

After traversing the Transform p, this handler compares it to the identity transform. If it is the identity, all it's children are moved to a Group, the pair <p,Group> are stored for handling in handleGroup.

Parameters:
p  points to the currently visited Transform object.

Reimplemented from nvtraverser::Traverser.


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