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

nvtraverser::GroupUnifyTraverser Class Reference

Traverser that deletes unneccessary Groups. More...

#include <GroupUnifyTraverser.h>

Inheritance diagram for nvtraverser::GroupUnifyTraverser:

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

Collaboration graph
[legend]
List of all members.

Public Methods

NVSG_API GroupUnifyTraverser (void)
 Constructor. More...

NVSG_API bool getIgnoreNames (void) const
 Get the 'ignore names' flag. More...

NVSG_API void setIgnoreNames (bool ignore)
 Set the 'ignore names' flags. More...


Protected Methods

virtual NVSG_API ~GroupUnifyTraverser (void)
 Protected destructor to prevent instantiation of a GroupUnifyTraverser on stack. More...

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

virtual NVSG_API void preTraverseGroup (const nvsg::Group *p)
 This function will be called from the framework immediately before a Group is to be traversed. More...

virtual NVSG_API void postTraverseGroup (const nvsg::Group *p)
 This function will be called from the framework immediately after a Group has been traversed. More...


Detailed Description

Traverser that deletes unneccessary Groups.

A Group is unneccessary if it holds only one child. In that case, that child replaces the group in it's parent.


Constructor & Destructor Documentation

NVSG_API nvtraverser::GroupUnifyTraverser::GroupUnifyTraverser void   
 

Constructor.

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

Protected destructor to prevent instantiation of a GroupUnifyTraverser on stack.


Member Function Documentation

bool nvtraverser::GroupUnifyTraverser::getIgnoreNames void    const [inline]
 

Get the 'ignore names' flag.

If the 'ignore names' flag is set, the names of the GeoNodes are ignored.

Returns:
true if the names will be ignored, otherwise false

void nvtraverser::GroupUnifyTraverser::setIgnoreNames bool    ignore [inline]
 

Set the 'ignore names' flags.

If the 'ignore names' flag is set, the names of the GeoNodes are ignored.

Parameters:
ignore  set true to ignore names on comparison

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

Routine to handle a Group while traversing the scene graph.

This routine records all Groups with one child.

Parameters:
p  Points to the currently visited Group object.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::GroupUnifyTraverser::preTraverseGroup const nvsg::Group   p [protected, virtual]
 

This function will be called from the framework immediately before a Group is to be traversed.

Before traversing a Group, a list of Groups holding one child is created.

Parameters:
p  Points to the Group that will be traversed immediately after this call.

Reimplemented from nvtraverser::Traverser.

virtual NVSG_API void nvtraverser::GroupUnifyTraverser::postTraverseGroup const nvsg::Group   p [protected, virtual]
 

This function will be called from the framework immediately after a Group has been traversed.

After traversing a Group, children with one child are replaced by that child.

Parameters:
p  Points to the Group that was traversed immediately before this call.

Reimplemented from nvtraverser::Traverser.


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