public class SoSurroundScale extends SoTransformation
SoHandleBoxManip
, use these nodes to make themselves surround other objects.
This node only recalculates after the invalidate()
method has been called. Otherwise it uses a saved scale and translation.
When calculating what to surround, the SoSurroundScale
looks at the current path in the action and at its own field values. Then SoSurroundScale
applies an SoGetBoundingBoxAction
to the node that is numNodesUpToContainer
nodes above it on the path. SoSurroundScale
also tells the action to reset the bounding box upon traversal of the node located numNodesUpToReset
nodes above it in the path. The SoSurroundScale
then appends a translation and scale to the current transformation so that a default size SoCube
will translate and scale to fit this bounding box.
For example, when an SoHandleBoxManip
wants to surround the objects it is going to move, the scene graph will look something like this:
TheRootNode ------------------------- | | handleBoxManip movingStuff | handleBoxDragger | separator ----------------------------------- | | | motionMatrix surroundScale cubeGeom
SoHandleBoxDragger
wants to transform the cubeGeom so that it surrounds the movingStuff . So it sets the surroundScale fields to:
The SoBoundingBoxAction will then be applied to RootNode , with a reset after traversing thenumNodesUpToContainer = 4; numNodesUpToReset = 3;
SoHandleBoxManip
. So the SoSurroundScale
will surround the objects below separator , and to the right of handleBoxManip , producing the desired effect.
File format/default:
SurroundScale {
numNodesUpToContainer | 0 |
numNodesUpToReset | 0 |
Action behavior:
SoGLRenderAction
, SoCallbackAction
, SoGetBoundingBoxAction
, SoRayPickAction
Accumulates scaling and translation transformations into the current transformation.
SoGetMatrixAction
Returns the matrix corresponding to the scaling and translation.
See also:
SoTransformation
, SoTransformManip
, SoCenterballDragger
, SoCenterballManip
, SoHandleBoxDragger
, SoHandleBoxManip
, SoJackDragger
, SoJackManip
, SoTabBoxDragger
, SoTabBoxManip
, SoTrackballDragger
, SoTrackballManip
, SoTransformBoxDragger
, SoTransformBoxManip
SoNode.RenderModes
Inventor.ConstructorCommand
Modifier and Type | Field and Description |
---|---|
SoSFInt32 |
numNodesUpToContainer
When traversed by an action, if surroundScale needs to calculate a new box, surroundScale looks at the current path in the action.
|
SoSFInt32 |
numNodesUpToReset
Before applying the
SoGetBoundingBoxAction (see the numNodesUpToContainer field above) the surroundScale node travels up the path a distance of numNodesUpToReset and tells the action to reset the bounding box upon traversal of that node. |
VERBOSE_LEVEL, ZeroHandle
Constructor and Description |
---|
SoSurroundScale()
Creates a surround scale node with default settings.
|
Modifier and Type | Method and Description |
---|---|
void |
invalidate()
If you call this, then next time an action is applied the node will re-calculate its cached translation and scale values.
|
affectsState, callback, copy, copy, distribute, doAction, getAlternateRep, getBoundingBox, getByName, getMatrix, getPrimitiveCount, getRenderEngineMode, getRenderUnitID, GLRender, GLRenderBelowPath, GLRenderInPath, GLRenderOffPath, grabEventsCleanup, grabEventsSetup, handleEvent, isBoundingBoxIgnoring, isOverride, pick, rayPick, search, setOverride, touch, write
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
getNativeResourceHandle
public final SoSFInt32 numNodesUpToContainer
numNodesUpToContainer
and applies an SoGetBoundingBoxAction
to the node that it finds there.public final SoSFInt32 numNodesUpToReset
SoGetBoundingBoxAction
(see the numNodesUpToContainer
field above) the surroundScale node travels up the path a distance of numNodesUpToReset
and tells the action to reset the bounding box upon traversal of that node.Generated on July 31, 2019, Copyright © Thermo Fisher Scientific. All rights reserved. http://www.openinventor.com