public class SoGlobalSimplifyAction extends SoSimplifyAction
This class traverses the scene graph and collects all the triangles in a single list. This list is then simplified and the result is stored in a new scene graph.
The SoGlobalSimplifyAction provides two simplification strategies:
The default strategy is SIMPLIFY_BY_SUBGROUP.
NOTE: Colors and normal vectors in the existing shapes are not preserved!
Calling generateNormals(true), which is the default, tells Open Inventor to compute per-vertex normal during this action. When disabled (calling generateNormals(false)), objects may appear faceted instead of appearing smooth.
If generateNormals is false, it may be useful to call addShapeHints(true). This tells Open Inventor to add an SoShapeHints node to the result scene graph that will cause normals to be computed during the next render traversal.
By default the SoGlobalSimplifyAction collects all the triangles even if they are part of a simple shape (cube, cone, sphere, text3...). Setting the setCatchAllShapesFlag() flag to false tells the action to collect triangles only if they belong to a complex shape.
The getSimplifiedSceneGraph() method returns the root of the new scene graph after applying the SoGlobalSimplifyAction.
Typically you will pass an instance of SoDecimator to the constructor. Please see SoDecimator for info about which geometry objects can be simplified.
See also:
SoAction, SoLevelOfSimplification, SoShapeSimplifyAction, SoSimplifyAction
| Modifier and Type | Class and Description |
|---|---|
static class |
SoGlobalSimplifyAction.Strategies
Strategy.
|
SoAction.AppliedCodes, SoAction.DistribModes, SoAction.PathCodes, SoAction.PathIndicesInventor.ConstructorCommand| Modifier and Type | Field and Description |
|---|---|
static int |
SIMPLIFY_BY_SUBGROUP
Deprecated.
|
static int |
SIMPLIFY_GLOBALLY
Deprecated.
Use
SoGlobalSimplifyAction.Strategies.SIMPLIFY_GLOBALLY instead. |
ALL, BELOW_PATH, CLUSTER_ONLY, IN_PATH, LOCAL_ONLY, NO_PATH, NODE, OFF_PATH, PATH, PATH_LISTVERBOSE_LEVEL, ZeroHandle| Constructor and Description |
|---|
SoGlobalSimplifyAction(SoSimplifier _simplifier)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addShapeHintsNode(boolean a)
Sets whether a shape hints node is added.
|
boolean |
areAllShapesCatched()
Gets the flag that specifies whether simple shapes are simplified.
|
boolean |
areNormalGenerated()
Gets the normal generation flag.
|
static void |
enableElement(java.lang.Class<? extends Inventor> t,
int stkIndex) |
void |
generateNormals(boolean g)
Sets the normal generation flag.
|
SoGlobalSimplifyAction.Strategies |
getSimplificationStrategy()
Gets the strategy used to determine how to group triangles into the simplified shapes.
|
SoSeparator |
getSimplifiedSceneGraph()
This returns the new scene graph which contains the simplified result.
|
boolean |
isShapeHintAdded()
Gets whether a shape hints node will be added.
|
void |
setCatchAllShapesFlag(boolean c)
Sets the flag that specifies whether simple shapes are simplified.
|
void |
setSimplificationStrategy(SoGlobalSimplifyAction.Strategies st)
Sets the strategy used to determine how to group triangles into the simplified shapes.
|
getDirectRanges, getDirectSimplificationLevels, getMinTriangles, getNumRanges, getNumSimplificationLevels, getRanges, getSimplificationLevels, getSizeFactor, getUrlName, isInlineLOD, isRenderCulling, isVerbose, setInlineLOD, setMinTriangles, setRanges, setRenderCulling, setSimplificationLevels, setSizeFactor, setUrlName, setVerbosityapply, apply, clearApplyResult, forwardTraversal, getContinueActionInBranchFlag, getCurPath, getNodeAppliedTo, getOriginalPathListAppliedTo, getPathAppliedTo, getPathCode, getPathListAppliedTo, getPipeId, getSceneManager, getState, getWhatAppliedTo, hasTerminated, invalidateState, isBeingApplied, isLastPathListAppliedTo, isUsingAlternateRep, nullAction, postDelayedTraversal, preDelayedTraversal, resetContinueActionInBranchFlag, setPipeId, setSceneManager, setUpState, stopActionInBranch, traverse, useAlternateRepdispose, getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads@Deprecated public static final int SIMPLIFY_GLOBALLY
SoGlobalSimplifyAction.Strategies.SIMPLIFY_GLOBALLY instead.@Deprecated public static final int SIMPLIFY_BY_SUBGROUP
SoGlobalSimplifyAction.Strategies.SIMPLIFY_BY_SUBGROUP instead.public SoGlobalSimplifyAction(SoSimplifier _simplifier)
SoSimplifier class that is passed in the constructor.public boolean isShapeHintAdded()
public boolean areAllShapesCatched()
public void setCatchAllShapesFlag(boolean c)
public static void enableElement(java.lang.Class<? extends Inventor> t, int stkIndex)
public void addShapeHintsNode(boolean a)
public boolean areNormalGenerated()
public SoGlobalSimplifyAction.Strategies getSimplificationStrategy()
public void setSimplificationStrategy(SoGlobalSimplifyAction.Strategies st)
public void generateNormals(boolean g)
public SoSeparator getSimplifiedSceneGraph()
Generated on July 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com