public class SoSplitGeometryAction extends SoAction
SoOctreeOrdering
node, is an important optimization, especially for multi-pipe rendering. However, a large object implemented as a single geometry node cannot be effectively culled. For each pipe where the object is partially visible, the entire object must be rendered.
This action splits a large object into multiple geometry nodes, without changing the appearance of the object. Culling can then applied to the new nodes individually.
The scene does not need to be subdivided into a large number of parts. Usually, 5 by 5 is enough to reasonably divide work between the threads. The new objects use the same vertex coordinates (and normals, materials,... if specified) as the original geometry. No triangles are added, removed, or split. A small amount of additional memory is required for the coordinate indices in the new objects.
Note: Currently this action applies only to SoIndexedFaceSet
and SoIndexedTriangleStripSet
nodes. The new object is the same type of node as the original.
Texture Mapping: If the original geometry has explicit texture coordinates, the result will be correct. If texture coordinates are computed by Open Inventor, the texture will be applied separately to each new object.
See also:
SoOctreeOrdering
, SoIndexedFaceSet
, SoIndexedTriangleStripSet
, SoShapeHints
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 |
---|
SoSplitGeometryAction(int divAlongX,
int divAlongY)
Constructor for splitting geometry along 2 dimensions.
|
SoSplitGeometryAction(int divAlongX,
int divAlongY,
int divAlongZ)
Constructor for splitting geometry along 3 dimensions.
|
Modifier and Type | Method and Description |
---|---|
static void |
enableElement(java.lang.Class<? extends Inventor> t,
int stkIndex) |
int[] |
getNumDivisions()
Returns the current division values to split an object in 3D.
|
int |
getNumObjFound()
Returns how many objects the action has split.
|
boolean |
isDistinguishSplitParts()
Returns true if distinguish split parts is enabled.
|
boolean |
isKeepOriginalGeometry()
Returns true if keep original geometry is enabled.
|
boolean |
isMaintainVertexOrdering()
Returns true if the option to maintain initial vertex ordering is on.
|
boolean |
isSmartSplitting()
Returns true if smart splitting is enabled.
|
int |
isTraverseAllSoSwitchChildren()
Returns true if traverse all
SoSwitch children is enabled. |
void |
setDistinguishSplitParts(boolean enable)
Calling this method before applying the action allows you to see how the action has split the objects.
|
void |
setKeepOriginalGeometry(boolean enable)
By default, the action modifies the scene graph by replacing the original node it has split with a new separator containing all the new nodes.
|
void |
setMaintainVertexOrdering(boolean enable)
If the initial geometry is composed of
SoIndexedTriangleStripSet and uses an SoShapeHints with a known vertex ordering (SoShapeHints.CLOCKWISE or SoShapeHints.COUNTERCLOCKWISE ), the action has to maintain the initial vertex ordering or problems with normals will appear. |
void |
setMaximumDivisionWarning(boolean enable)
There is a maximum number of division to divide an object because this object is composed by some primitives (triangles) that cannot be split without changing the geometry.
|
void |
setNumDivisions(int numX,
int numY)
Specifies the number of divisions for splitting an object in 2D.
|
void |
setNumDivisions(int numX,
int numY,
int numZ)
Specifies the number of divisions for splitting an object in 3D.
|
void |
setSmartSplitting(boolean enable)
If this option is set before the action is applied, objects will be split by dividing the greatest bounding box side into the largest number of divisions, the next largest side by the next largest number of divisions, and so on.
|
void |
setTraverseAllSoSwitchChildren(boolean enable)
By default the action will only traverse the active child of
SoSwitch nodes. |
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 SoSplitGeometryAction(int divAlongX, int divAlongY, int divAlongZ)
public SoSplitGeometryAction(int divAlongX, int divAlongY)
public boolean isSmartSplitting()
public boolean isDistinguishSplitParts()
public void setNumDivisions(int numX, int numY)
public void setSmartSplitting(boolean enable)
public int getNumObjFound()
public boolean isKeepOriginalGeometry()
public void setKeepOriginalGeometry(boolean enable)
SoSwitch
node containing the original node and the separator containing all the new nodes. Each new SoSwitch
node added in the scene graph is named "switchX" where X is the Xth object split. For instance, the first object split by the action will have a corresponding switch node named "switch0". Default is false.public void setMaintainVertexOrdering(boolean enable)
SoIndexedTriangleStripSet
and uses an SoShapeHints
with a known vertex ordering (SoShapeHints.CLOCKWISE
or SoShapeHints.COUNTERCLOCKWISE
), the action has to maintain the initial vertex ordering or problems with normals will appear.
A call to this function will maintain initial vertex ordering. Default is true.public void setMaximumDivisionWarning(boolean enable)
public boolean isMaintainVertexOrdering()
public static void enableElement(java.lang.Class<? extends Inventor> t, int stkIndex)
public int[] getNumDivisions()
public void setTraverseAllSoSwitchChildren(boolean enable)
SoSwitch
nodes.
A call to this method tells the action to traverse all children. Default is false.public void setNumDivisions(int numX, int numY, int numZ)
public void setDistinguishSplitParts(boolean enable)
SoIndexedShape
is assigned a unique material. Default is false.public int isTraverseAllSoSwitchChildren()
SoSwitch
children is enabled.Generated on January 23, 2025, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com