Package com.openinventor.inventor.nodes
Class SoAntiSquish
- All Implemented Interfaces:
SafeDisposable
Transformation node that undoes non-uniform 3D scales.
This node removes nonuniform 3D scaling from the current transformation matrix when traversed by an action. It is used by draggers such as the
SoTrackballDragger
that need to stay uniformly scaled no matter where they are located in the scene graph.
The magnitude of the new scale is determined by the current transformation matrix and the sizing field. This node does not change the translation or rotation in the matrix.
File format/default:
AntiSquish {
sizing | AVERAGE_DIMENSION |
recalcAlways | true |
Action behavior:
SoGLRenderAction
, SoCallbackAction
, SoGetBoundingBoxAction
, SoGetMatrixAction
, SoRayPickAction
Appends the current transformation with a new matrix to create an unsquished result.
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.openinventor.inventor.nodes.SoNode
SoNode.RenderModes
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal SoSFBool
If recalcAlways is true, this node calculates its unsquishing matrix every time it is traversed.final SoSFEnum
<SoAntiSquish.Sizings> Determines which of the algorithms enumerated by the type Sizing will be used to select the new scale when the x,y, and z scales are not equal.Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
recalc()
Sets a flag so that the next time the node is traversed, it will recalculate its unsquishing matrix.Methods inherited from class com.openinventor.inventor.nodes.SoNode
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
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
Field Details
-
sizing
Determines which of the algorithms enumerated by the type Sizing will be used to select the new scale when the x,y, and z scales are not equal. . Default is AVERAGE_DIMENSION. -
recalcAlways
If recalcAlways is true, this node calculates its unsquishing matrix every time it is traversed. If false, then this only occurs during the first traversal folllowing a call torecalc()
. Default is true.
-
-
Constructor Details
-
SoAntiSquish
public SoAntiSquish()Creates an anti-squish node with default settings.
-
-
Method Details
-
recalc
public void recalc()Sets a flag so that the next time the node is traversed, it will recalculate its unsquishing matrix.
-