Class 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
    • 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.