Class SoReorganizeAction
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.actions.SoAction
-
- com.openinventor.inventor.actions.SoSimplifyAction
-
- com.openinventor.inventor.actions.SoReorganizeAction
-
public class SoReorganizeAction extends SoSimplifyAction
Reorganizes the scene graph by grouping shapes with common properties, then groups these shapes in a single shape and runs the simplifier on it. 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:
- Be indexed shapes (e.g.,
SoIndexedFaceSet
) - Have the same material properties
- Have a material binding of PER_VERTEX_INDEXED.
- See Also:
SoAction
,SoIndexedTriangleStripSet
- Be indexed shapes (e.g.,
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.actions.SoAction
SoAction.AppliedCodes, SoAction.DistribModes, SoAction.PathCodes, SoAction.PathIndices
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoReorganizeAction()
Calls SoReorganizeAction((com.openinventor.inventor.simplifier.SoSimplifier)null).SoReorganizeAction(SoSimplifier _simplifier)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
areIndexArraysMatched()
Gets whether to try to match index arrays during reorganization.boolean
areNormalGenerated()
Gets whether normals should be generated during reorganization.boolean
areTexCoordsGenerated()
Gets whether texture coordinates should be generated during reorganization.boolean
areTriangleStripGenerated()
Gets whether triangle strips should be generated; if false, IndexedFaceSets are generated.boolean
areVPNodesGenerated()
Gets whether vertex property nodes should be generated during reorganization.static void
enableElement(java.lang.Class<? extends Inventor> t, int stkIndex)
static void
finishReport()
Ends a report.void
generateNormals(boolean g)
Sets whether normals should be generated during reorganization.void
generateTexCoords(boolean g)
Sets whether texture coordinates should be generated during reorganization.void
generateTriangleStrips(boolean g)
Sets whether triangle strips should be generated.void
generateVPNodes(boolean g)
Sets whether vertex property nodes should be generated during reorganization.SoSeparator
getSimplifiedSceneGraph()
Returns result of reorganization as new scene graph.SoSimplifier
getSimplifier()
Returns the simplifier being used, may be NULL.void
matchIndexArrays(boolean g)
Sets whether to try to match index arrays during reorganization.static void
startReport(java.lang.String msg)
Starts a report.-
Methods inherited from class com.openinventor.inventor.actions.SoSimplifyAction
getDirectRanges, getDirectSimplificationLevels, getMinTriangles, getNumRanges, getNumSimplificationLevels, getRanges, getSimplificationLevels, getSizeFactor, getUrlName, isInlineLOD, isRenderCulling, isVerbose, setInlineLOD, setMinTriangles, setRanges, setRenderCulling, setSimplificationLevels, setSizeFactor, setUrlName, setVerbosity
-
Methods inherited from class com.openinventor.inventor.actions.SoAction
apply, apply, clearApplyResult, forwardTraversal, forwardTraversal, getContinueActionInBranchFlag, getCurPath, getDistribMode, getNodeAppliedTo, getOriginalPathListAppliedTo, getPathAppliedTo, getPathCode, getPathListAppliedTo, getPipeId, getSceneManager, getState, getWhatAppliedTo, hasTerminated, invalidateState, isBeingApplied, isLastPathListAppliedTo, isUsingAlternateRep, nullAction, postDelayedTraversal, preDelayedTraversal, resetContinueActionInBranchFlag, setPipeId, setSceneManager, setUpState, stopActionInBranch, traverse, useAlternateRep
-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Constructor Detail
-
SoReorganizeAction
public SoReorganizeAction()
Calls SoReorganizeAction((com.openinventor.inventor.simplifier.SoSimplifier)null).
-
SoReorganizeAction
public SoReorganizeAction(SoSimplifier _simplifier)
Constructor.
-
-
Method Detail
-
getSimplifier
public SoSimplifier getSimplifier()
Returns the simplifier being used, may be NULL.
-
generateTriangleStrips
public void generateTriangleStrips(boolean g)
Sets whether triangle strips should be generated.
Default is true. If false, IndexedFaceSets are generated.
-
areNormalGenerated
public boolean areNormalGenerated()
Gets whether normals should be generated during reorganization.
-
generateNormals
public void generateNormals(boolean g)
Sets whether normals should be generated during reorganization.
Default is true.
-
getSimplifiedSceneGraph
public SoSeparator getSimplifiedSceneGraph()
Returns result of reorganization as new scene graph.
-
startReport
public static void startReport(java.lang.String msg)
Starts a report. The specified message is sent to the console window.
-
areVPNodesGenerated
public boolean areVPNodesGenerated()
Gets whether vertex property nodes should be generated during reorganization.
-
matchIndexArrays
public void matchIndexArrays(boolean g)
Sets whether to try to match index arrays during reorganization.
Default is true.
-
areIndexArraysMatched
public boolean areIndexArraysMatched()
Gets whether to try to match index arrays during reorganization.
-
finishReport
public static void finishReport()
Ends a report. "Done" is sent to the console window.
-
generateTexCoords
public void generateTexCoords(boolean g)
Sets whether texture coordinates should be generated during reorganization.
Default is true.
-
areTriangleStripGenerated
public boolean areTriangleStripGenerated()
Gets whether triangle strips should be generated; if false, IndexedFaceSets are generated.
-
enableElement
public static void enableElement(java.lang.Class<? extends Inventor> t, int stkIndex)
-
generateVPNodes
public void generateVPNodes(boolean g)
Sets whether vertex property nodes should be generated during reorganization.
Default is true.
-
areTexCoordsGenerated
public boolean areTexCoordsGenerated()
Gets whether texture coordinates should be generated during reorganization.
-
-