Reorganizes the scene graph by grouping shapes with common properties, then groups these shapes in a single shape and runs the simplifier on it. More...
#include <Inventor/actions/SoReorganizeAction.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
SoReorganizeAction (SoSimplifier *_simplifier=NULL) | |
~SoReorganizeAction () | |
SoSeparator * | getSimplifiedSceneGraph () const |
void | generateNormals (SbBool g) |
SbBool | areNormalGenerated () const |
void | generateTriangleStrips (SbBool g) |
SbBool | areTriangleStripGenerated () const |
void | generateTexCoords (SbBool g) |
SbBool | areTexCoordsGenerated () const |
void | generateVPNodes (SbBool g) |
SbBool | areVPNodesGenerated () const |
void | matchIndexArrays (SbBool g) |
SbBool | areIndexArraysMatched () const |
SoSimplifier * | getSimplifier () const |
virtual void | apply (SoNode *node) |
virtual void | apply (SoPath *path) |
virtual void | apply (const SoPathList &path_list, SbBool obeys_rules=FALSE) |
Static Public Member Functions | |
static SoType | getClassTypeId () |
static SoNONUNICODE void | startReport (const char *msg) |
static void | startReport (const SbString &msg) |
static void | finishReport () |
This class reorganizes the scene graph by grouping shapes with common properties, then groups these shapes in a single shape and runs the simplifier on it. If a simplifier is not provided, it creates an indexed triangle strip set from this shape.
In order for shapes to be grouped together, they must:
SoAction, SoIndexedTriangleStripSet
SoReorganizeAction::SoReorganizeAction | ( | SoSimplifier * | _simplifier = NULL |
) |
Constructor.
SoReorganizeAction::~SoReorganizeAction | ( | ) |
Destructor.
virtual void SoReorganizeAction::apply | ( | const SoPathList & | path_list, | |
SbBool | obeys_rules = FALSE | |||
) | [virtual] |
Initiates an action on the graph defined by a list of paths. TRUE can be passed for the obeysRules flag if the given path list has the following 4 properties:
Reimplemented from SoAction.
virtual void SoReorganizeAction::apply | ( | SoPath * | path | ) | [virtual] |
Initiates an action on the graph defined by a path. Warning: Most actions call ref() on the path before traversing the scene graph, then call unref() after traversal. If the path's reference count was zero (the default), the call to apply() will cause it to be destroyed.
Reimplemented from SoAction.
virtual void SoReorganizeAction::apply | ( | SoNode * | node | ) | [virtual] |
Initiates an action on the graph defined by a node. Warning: Most actions call ref() on the node before traversing the scene graph, then call unref() after traversal. If the node's reference count was zero (the default), the call to apply() will cause it to be destroyed.
Reimplemented from SoAction.
SbBool SoReorganizeAction::areIndexArraysMatched | ( | ) | const [inline] |
Gets whether to try to match index arrays during reorganization.
SbBool SoReorganizeAction::areNormalGenerated | ( | ) | const [inline] |
Gets whether normals should be generated during reorganization.
SbBool SoReorganizeAction::areTexCoordsGenerated | ( | ) | const [inline] |
Gets whether texture coordinates should be generated during reorganization.
SbBool SoReorganizeAction::areTriangleStripGenerated | ( | ) | const [inline] |
Gets whether triangle strips should be generated; if false, IndexedFaceSets are generated.
SbBool SoReorganizeAction::areVPNodesGenerated | ( | ) | const [inline] |
Gets whether vertex property nodes should be generated during reorganization.
static void SoReorganizeAction::finishReport | ( | ) | [static] |
Ends a report.
"Done" is sent to the console window.
void SoReorganizeAction::generateNormals | ( | SbBool | g | ) | [inline] |
Sets whether normals should be generated during reorganization.
Default is TRUE.
void SoReorganizeAction::generateTexCoords | ( | SbBool | g | ) | [inline] |
Sets whether texture coordinates should be generated during reorganization.
Default is TRUE.
void SoReorganizeAction::generateTriangleStrips | ( | SbBool | g | ) | [inline] |
Sets whether triangle strips should be generated.
Default is TRUE. If false, IndexedFaceSets are generated.
void SoReorganizeAction::generateVPNodes | ( | SbBool | g | ) | [inline] |
Sets whether vertex property nodes should be generated during reorganization.
Default is TRUE.
static SoType SoReorganizeAction::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoSimplifyAction.
SoSeparator* SoReorganizeAction::getSimplifiedSceneGraph | ( | ) | const [inline] |
Returns result of reorganization as new scene graph.
SoSimplifier* SoReorganizeAction::getSimplifier | ( | ) | const [inline] |
Returns the simplifier being used, may be NULL.
virtual SoType SoReorganizeAction::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoSimplifyAction.
void SoReorganizeAction::matchIndexArrays | ( | SbBool | g | ) | [inline] |
Sets whether to try to match index arrays during reorganization.
Default is TRUE.
static void SoReorganizeAction::startReport | ( | const SbString & | msg | ) | [static] |
Starts a report.
The specified message is sent to the console window.
static SoNONUNICODE void SoReorganizeAction::startReport | ( | const char * | msg | ) | [static] |
Starts a report.
The specified message is sent to the console window.