public abstract class SoAction extends Inventor
SoAction
is the base class for all actions. Classes derived from SoAction
define operations to be applied at each node encountered during traversal of a scene graph. The function that gets called to implement the action for a particular node type is determined by a lookup table in the global database.
An action may be applied to a node (SoNode
), a path (SoPath
) or a list of paths (SoPathList).
Hidden references:
Some actions, e.g. SoSearchAction
and SoRayPickAction
, create one or more SoPath
objects when they are applied to the scene graph. The SoPath
object references each node in the path. This reference will prevent the node and its associated memory from being reclaimed for as long as the SoPath
object exists. These SoPath
objects are stored internally in the action and exist until the action object itself is reclaimed or reset.
SoNode
, SoPath
, SoPathList, SoCallbackAction
, SoGLRenderAction
, SoGetBoundingBoxAction
, SoGetMatrixAction
, SoHandleEventAction
, SoPickAction
, SoRayPickAction
, SoSearchAction
, SoWriteAction
Modifier and Type | Class and Description |
---|---|
static class |
SoAction.AppliedCodes |
static class |
SoAction.DistribModes
This is used to define the way an action is distributed across a cluster.
|
static class |
SoAction.PathCodes |
static class |
SoAction.PathIndices |
Inventor.ConstructorCommand
VERBOSE_LEVEL, ZeroHandle
Modifier and Type | Method and Description |
---|---|
void |
apply(SoNode node)
Initiates an action on the graph defined by a node.
|
void |
apply(SoPath path)
Initiates an action on the graph defined by a path.
|
void |
clearApplyResult()
When applied, an action may reference nodes or create objects (e.g.
|
void |
forwardTraversal(SoNode node)
Traverse a node that is not part of the current scenegraph.
|
boolean |
getContinueActionInBranchFlag()
This function indicates if the action must stop in the current branch.
|
SoPath |
getCurPath() |
SoAction.DistribModes |
getDistribMode()
Returns the distribution mode of this action across a cluster (ScaleViz-Cluster only) Default is LOCAL_ONLY.
|
SoNode |
getNodeAppliedTo() |
java.util.Vector<SoPath> |
getOriginalPathListAppliedTo() |
SoPath |
getPathAppliedTo() |
SoAction.PathIndices |
getPathCode()
Returns path code based on where current node (the node at the end of the current path) lies with respect to the path(s) the action is being applied to.
|
java.util.Vector<SoPath> |
getPathListAppliedTo() |
int |
getPipeId()
Gets pipe identifier in the range [1..N] associated to this render action while running a ScaleViz Multipipe configuration.
|
SoSceneManager |
getSceneManager()
Return the
SoSceneManager associated with this action. |
SoState |
getState() |
SoAction.AppliedCodes |
getWhatAppliedTo() |
boolean |
hasTerminated() |
void |
invalidateState()
Invalidates the current traversal state in the action, forcing it to be recreated when the action is next applied.
|
boolean |
isBeingApplied()
Returns true if this action is currently being applied.
|
boolean |
isLastPathListAppliedTo() |
boolean |
isUsingAlternateRep()
Returns true if current action is using alternate representations.
|
static void |
nullAction(SoAction name_7952,
SoNode name_7953) |
void |
postDelayedTraversal()
Method called by SoMultiPassManager after delayed pass traversals.
|
boolean |
preDelayedTraversal()
Method called by SoMultiPassManager before delayed pass traversals.
|
void |
resetContinueActionInBranchFlag()
This function resets the continue action flag.
|
void |
setPipeId(int id)
Sets pipe identifier in the range [1..N] associated to this render action while running a ScaleViz Multipipe configuration.
|
void |
setSceneManager(SoSceneManager mgr)
Set the scene manager associated with this action (if any ).
|
void |
setUpState() |
void |
stopActionInBranch()
This function stops the action in the current Scene Graph branch.
|
void |
traverse(SoNode node) |
void |
useAlternateRep(boolean enable)
Tell the action to use alternate representations during traversal when available.
|
dispose, getNativeResourceHandle
public void useAlternateRep(boolean enable)
SoNode
derived object to choose to provide or not an alternate representation for a given action.public void resetContinueActionInBranchFlag()
public boolean getContinueActionInBranchFlag()
public boolean isUsingAlternateRep()
public java.util.Vector<SoPath> getOriginalPathListAppliedTo()
public boolean hasTerminated()
public boolean isLastPathListAppliedTo()
public void stopActionInBranch()
It is mainly used to stop the GetBoundingBox action in the SoBBox
node.
public void apply(SoNode node)
public SoAction.PathIndices getPathCode()
public SoState getState()
public void apply(SoPath path)
public void invalidateState()
public void clearApplyResult()
SoPath
) that reference nodes. This is especially true for SoSearchAction
and SoRayPickAction
. These references will prevent the nodes from being destroyed and so may appear to be a "memory leak".
All references are cleared when the action is destroyed or re-applied. However it may be useful to clear them explicitly to remove references to nodes.
public void traverse(SoNode node)
public SoPath getCurPath()
public boolean isBeingApplied()
public SoAction.DistribModes getDistribMode()
public boolean preDelayedTraversal()
public SoSceneManager getSceneManager()
SoSceneManager
associated with this action.public void postDelayedTraversal()
public void forwardTraversal(SoNode node)
SoPath
. Casting the path to a SoFullPath allows access to the whole path.
This method can be used to delegate an action to an internal/private scene graph. So a node can have an internal scene graph without actually being a "group" node. This is a convenient way to implement "composite" nodes that create their behavior using other Open Inventor nodes.
The node parameter can be of any type. Sensors may still be attached directly to nodes and fields in the internal scene graph.
This method must not be called from a node derived from SoGroup
or SoBaseKit
. This method should not be called on nodes that are part of the public/visible scene graph.
public int getPipeId()
public SoPath getPathAppliedTo()
public void setSceneManager(SoSceneManager mgr)
SoHandleEventAction
, SoRayPickAction
, etc).public java.util.Vector<SoPath> getPathListAppliedTo()
public void setUpState()
public SoAction.AppliedCodes getWhatAppliedTo()
public void setPipeId(int id)
public SoNode getNodeAppliedTo()
Generated on July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com