#include <StateSetUnifyTraverser.h>
Inheritance diagram for nvtraverser::StateSetUnifyTraverser:
Public Methods | |
NVSG_API | StateSetUnifyTraverser (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 | ~StateSetUnifyTraverser (void) |
Protected destructor to prevent instantiation of a StateSetUnifyTraverser on stack. More... | |
virtual NVSG_API void | handleCgFx (const nvsg::CgFx *p) |
Routine to handle a CgFx object while traversing the scene graph. More... | |
virtual NVSG_API void | handleGeoNode (const nvsg::GeoNode *p) |
Routine to handle a GeoNode object while traversing the scene graph. More... | |
virtual NVSG_API void | handleFaceAttribute (const nvsg::FaceAttribute *p) |
Routine to handle a FaceAttribute object while traversing the scene graph. More... | |
virtual NVSG_API void | handleMaterial (const nvsg::Material *p) |
Routine to handle a Material 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 | handleTextureAttribute (const nvsg::TextureAttribute *p) |
Routine to handle a TextureAttribute object while traversing the scene graph. More... | |
virtual NVSG_API void | handleTextureAttributeItem (const nvsg::TextureAttributeItem *p, size_t textureUnit) |
Routine to handle a TextureAttributeItem object while traversing the scene graph. More... |
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.
|
|
Protected destructor to prevent instantiation of a StateSetUnifyTraverser on stack.
|
|
Get the 'ignore names' flag. If the 'ignore names' flag is set, on comparing StateSets and StateAttributes their names are ignored.
|
|
Set the 'ignore names' flags. If the 'ignore names' flag is set, on comparing StateSets and StateAttributes their names are ignored.
|
|
Routine to handle a CgFx object while traversing the scene graph. After traversing the CgFx p, this handler compares it to the other previously encountered CgFx objects. If there is another identical CgFx object, p is marked to be replaced by that in the handleStateSet routine.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a GeoNode object while traversing the scene graph. After traversing the GeoNode \ p, this handler replaces all StateSet objects in it's geometries that have been marked for replacement in the handleStateSet routine.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a FaceAttribute object while traversing the scene graph. After traversing the FaceAttribute p, this handler compares it to the other previously encountered FaceAttribute objects. If there is another identical FaceAttribute object, p is marked to be replaced by that in the handleStateSet routine.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a Material object while traversing the scene graph. After traversing the Material p, this handler compares it to the other previously encountered Material objects. If there is another identical Material object, p is marked to be replaced by that in the handleStateSet routine.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a StateSet object while traversing the scene graph. After traversing the StateSet p, this handler replaces a CgFx, Material, FaceAttribute, and TextureAttribute, that has been marked for replacement in the corresponding handler. Then p is compared to the other previously encountered StateSet objects. If there is another identical StateSet object, p is marked to be replaced by that in the handleGeoNode routine.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a TextureAttribute object while traversing the scene graph. After traversing the TextureAttribute p, this handler all it's TextureAttributeItems, that has been marked for replacement in the handleTextureAttributeItem routine. Then p is compared to the other previously encountered TextureAttribute objects. If there is another identical TextureAttribute object, p is marked to be replaced by that in the handleSateSet routine.
Reimplemented from nvtraverser::Traverser. |
|
Routine to handle a TextureAttributeItem object while traversing the scene graph. After traversing the TextureAttributeItem p, this handler compares it to the other previously encountered TextureAttributeItem objects. If there is another identical TextureAttributeItem object, p is marked to be replaced by that in the handleTextureAttribute routine.
Reimplemented from nvtraverser::Traverser. |