Class SoDistributeAction
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.actions.SoAction
com.openinventor.inventor.actions.SoDistributeAction
Computes a distribution of the scene graph for use in depth compositing in ScaleViz.
This class is used to compute a distribution of the scene graph for use in depth compositing in ScaleViz.
In order to simplify the distribution of the scene graph, two different algorithms are supported for the automatic allocation of render unit IDs of each separator in a scene graph:
- ROUND_ROBIN, which implements a round robin algorithm, does static allocation based on the number of running OIRUs. This algorithm is the fastest way to distribute a scene graph between all running OIRUs, but as it does not take in account the weight of the sub scene graph assigned to each OIRU, it can potentially result in an unbalanced distribution.
- TRIANGLE_COUNT is a dynamic algorithm that takes in account the weight of each separator, and tries to distribute the scene graph as equally as possible between OIRUs. Compared with the first algorithm, it is more time consuming, but the result is a better balanced scene graph distribution. This is the default.
To specify the desired distribution algorithm, instantiate an SoDistributeAction
, specify the the desired algorithm, and apply the action on the scene graph that you want to distribute.
SoSeparator
, SoDepthComposer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Algorithms for scene graph distribution.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 -
Method Summary
Modifier and TypeMethodDescriptionstatic void
enableElement
(Class<? extends Inventor> t, int stkIndex) Returns the algorithm used to distribute the scene graph.void
setDistributeMethod
(SoDistributeAction.DistributeMethods distribMethod) Destructor.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 Details
-
SoDistributeAction
public SoDistributeAction()Constructor.
-
-
Method Details
-
enableElement
-
getDistributeMethod
Returns the algorithm used to distribute the scene graph. -
setDistributeMethod
Destructor. Specifies the algorithm used to distribute the scene graph.
Default is TRIANGLE_COUNT.
-