public class SoSimplifyAction extends SoAction
Each simplified sub-levels can be stored in regular separators or in WWWInline nodes. In this case, the urlName defines the full url to use for each WWWInline. For instance if urlName = "dir/file", the action will generate "dir/file_1.wrl","dir/file_2.wrl", and so on. When a simplify action generates Level of Simplification nodes, the range field of each Level of Simplification node can be given globally in the range field of the simplify action. If the simplify action range field is not set, the simplify action computes it automatically for each LevelOfSimplification node. In this case, the sizeFactor field can be used to customize the range computation.
A minimum number of triangles can be set to stop the simplification when the object becomes too small. Specifying 0.0 for the last level inserts an empty node in the scene graph. This allows you to avoid rendering an object that is too small or too far from the viewer.
Available simplification actions are:
SoGlobalSimplifyAction
SoShapeSimplifyAction
SoReorganizeAction
See also:
SoAction
, SoLevelOfSimplification
, SoGlobalSimplifyAction
, SoShapeSimplifyAction
, SoReorganizeAction
SoAction.AppliedCodes, SoAction.DistribModes, SoAction.PathCodes, SoAction.PathIndices
Inventor.ConstructorCommand
ALL, BELOW_PATH, CLUSTER_ONLY, IN_PATH, LOCAL_ONLY, NO_PATH, NODE, OFF_PATH, PATH, PATH_LIST
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoSimplifyAction(SoSimplifier _simplifier)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
static void |
enableElement(java.lang.Class<? extends Inventor> t,
int stkIndex) |
java.nio.FloatBuffer |
getDirectRanges()
Gets the ranges that will be used in the LevelOfSimplification node to decide which level of detail to display.
|
java.nio.FloatBuffer |
getDirectSimplificationLevels()
Gets percentages to produce at each level of detail.
|
int |
getMinTriangles()
Gets the minimum number of triangles for a simplified child.
|
int |
getNumRanges()
Gets the number of ranges that will be used in the LevelOfSimplification node to decide which level of detail to display.
|
int |
getNumSimplificationLevels()
Gets number of levels of detail to produce.
|
float[] |
getRanges()
Gets the ranges that will be used in the LevelOfSimplification node to decide which level of detail to display.
|
float[] |
getSimplificationLevels()
Gets percentages to produce at each level of detail.
|
float |
getSizeFactor()
Gets the scale factor to use to decide what values of ranges to use in the LevelOfSimplification node.
|
java.lang.String |
getUrlName()
Gets the name used when creating Inline files for each simplified child.
|
boolean |
isInlineLOD()
Gets inlineLOD flag.
|
int |
isRenderCulling()
Gets render culling flag.
|
boolean |
isVerbose()
Gets verbosity flag.
|
void |
setInlineLOD(boolean i)
Sets inlineLOD flag.
|
void |
setMinTriangles(int mt)
Sets the minimum number of triangles for a simplified child; if a given percentage would create a simplified version that went below this minimum, no simplified chld is produced for this level.
|
void |
setRanges(float[] newRanges)
Sets the ranges that will be used in the LevelOfSimplification node to decide which level of detail to display.
|
void |
setRenderCulling(boolean r)
Sets render culling flag.
|
void |
setSimplificationLevels(float[] levels)
Sets number of levels of detail to produce and what percentage to produce at each level.
|
void |
setSizeFactor(float size)
Sets the scale factor to use to decide what values of ranges to use in the LevelOfSimplification node.
|
void |
setUrlName(java.lang.String name)
Sets the name used when creating Inline files for each simplified child.
|
void |
setVerbosity(boolean v)
Sets verbosity flag.
|
apply, 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, useAlternateRep
dispose, getAddress, getNativeResourceHandle, startInternalThreads, stopInternalThreads
public SoSimplifyAction(SoSimplifier _simplifier)
SoSimplifier
class that is passed in the constructor.public static void enableElement(java.lang.Class<? extends Inventor> t, int stkIndex)
public void setRenderCulling(boolean r)
public java.nio.FloatBuffer getDirectRanges()
public int isRenderCulling()
public int getNumSimplificationLevels()
public float getSizeFactor()
public boolean isInlineLOD()
SoWWWInline
nodes.public void setInlineLOD(boolean i)
SoWWWInline
nodes.public int getNumRanges()
public float[] getRanges()
public void setSizeFactor(float size)
public void setRanges(float[] newRanges)
public float[] getSimplificationLevels()
public void setSimplificationLevels(float[] levels)
public boolean isVerbose()
public int getMinTriangles()
public void setMinTriangles(int mt)
public java.lang.String getUrlName()
public void setUrlName(java.lang.String name)
public void setVerbosity(boolean v)
public java.nio.FloatBuffer getDirectSimplificationLevels()
Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com