Package com.openinventor.inventor.nodes
Class SoTransform
- All Implemented Interfaces:
SafeDisposable
- Direct Known Subclasses:
SoTransformManip
General 3D geometric transformation node.
This node defines a geometric 3D transformation consisting of (in order) a (possibly) non-uniform scale about an arbitrary point, a rotation about an arbitrary point and axis, and a translation. (While the transformations can be thought of as being applied in that order, matrices are actually premultiplied in the opposite order. Therefore, the operations are listed in the reverse order throughout this reference page.)
File format/default:
Transform {
translation | 0 0 0 |
rotation | 0 0 1 0 |
scaleFactor | 1 1 1 |
scaleOrientation | 0 0 1 0 |
center | 0 0 0 |
Action behavior:
SoGLRenderAction
, SoCallbackAction
, SoGetBoundingBoxAction
, SoRayPickAction
Accumulates transformation into the current transformation. Sets: SoModelMatrixElement
SoGetMatrixAction
Returns the matrix corresponding to the total transformation.
- See Also:
-
Nested Class Summary
Nested 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 SoSFVec3f
Origin for scale and rotation.final SoSFRotation
Rotation specification.final SoSFVec3f
Scale factors.final SoSFRotation
Rotational orientation for scale.final SoSFVec3f
Translation vector.Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
combineLeft
(SoTransformation nodeOnLeft) Convenience function that combines the effects of another transformation node into the current transformation stored in this node.void
combineRight
(SoTransformation nodeOnRight) Convenience function that combines the effects of another transformation node into the current transformation stored in this node.SbMatrix[]
Returns composite matrix that transforms from object space to rotation space (the space after the scale and rotation).SbMatrix[]
Returns composite matrix that transforms from object space to scale space (the space after the scale).SbMatrix[]
Returns composite matrix that transforms from object space to translation space (the space after scale, rotation, and translation).void
Convenience function that combines the effects of a matrix transformation into the current transformation stored in this node.void
Convenience function that combines the effects of a matrix transformation into the current transformation stored in this node.void
Sets the node to translate the origin to the fromPoint and rotate the negative z-axis (0,0,-1) to lie on the vector from fromPoint to toPoint .void
Changes the center of the transformation to the given point without affecting the overall effect of the transformation.void
Sets the fields in the node to implement the transformation represented by the given 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
-
translation
Translation vector. -
rotation
Rotation specification. -
scaleFactor
Scale factors. Negative and null values may cause undesirable results. -
scaleOrientation
Rotational orientation for scale. -
center
Origin for scale and rotation.
-
-
Constructor Details
-
SoTransform
public SoTransform()Creates a transformation node with default settings.
-
-
Method Details
-
multLeft
Convenience function that combines the effects of a matrix transformation into the current transformation stored in this node. This method premultiplies the transformation. -
getTranslationSpaceMatrix
Returns composite matrix that transforms from object space to translation space (the space after scale, rotation, and translation). -
pointAt
Sets the node to translate the origin to the fromPoint and rotate the negative z-axis (0,0,-1) to lie on the vector from fromPoint to toPoint . This always tries to keep the "up" direction the positive y-axis, unless that is impossible. All current field values in the node are replaced. -
setMatrix
Sets the fields in the node to implement the transformation represented by the given matrix. Note that invalid matrices (such as singular ones) have undefined results. -
getScaleSpaceMatrix
Returns composite matrix that transforms from object space to scale space (the space after the scale). -
combineRight
Convenience function that combines the effects of another transformation node into the current transformation stored in this node. This method postmultiplies the transformation. -
multRight
Convenience function that combines the effects of a matrix transformation into the current transformation stored in this node. This method postmultiplies the transformation. -
combineLeft
Convenience function that combines the effects of another transformation node into the current transformation stored in this node. This method premultiplies the transformation. -
recenter
Changes the center of the transformation to the given point without affecting the overall effect of the transformation. -
getRotationSpaceMatrix
Returns composite matrix that transforms from object space to rotation space (the space after the scale and rotation).
-