| 1 |
NAME SoTransform SoXf "" { general 3D geometric transformation node } |
| 2 |
|
| 3 |
INCLUDE nodes/SoTransform.h |
| 4 |
|
| 5 |
DESC { |
| 6 |
This node defines a geometric 3D transformation consisting of (in |
| 7 |
order) a (possibly) non-uniform scale about an arbitrary point, a |
| 8 |
rotation about an arbitrary point and axis, and a translation. (While |
| 9 |
the transformations can be thought of as being applied in that order, |
| 10 |
matrices are actually premultiplied in the opposite order. Therefore, |
| 11 |
the operations are listed in the reverse order throughout this reference |
| 12 |
page.) |
| 13 |
} |
| 14 |
|
| 15 |
FIELD translation { Translation vector. } |
| 16 |
FIELD rotation { Rotation specification. } |
| 17 |
FIELD scaleFactor { Scale factors. } |
| 18 |
FIELD scaleOrientation { Rotational orientation for scale. } |
| 19 |
FIELD center { Origin for scale and rotation. } |
| 20 |
|
| 21 |
METHOD "" SoTransform() { |
| 22 |
Creates a transformation node with default settings. |
| 23 |
} |
| 24 |
|
| 25 |
METHOD "ptAt" void pointAt(const SbVec3f &fromPoint, const SbVec3f &toPoint) { |
| 26 |
Sets the node to translate the origin to the \vfromPoint\. and rotate |
| 27 |
the negative z-axis (0,0,-1) to lie on the vector from \vfromPoint\. |
| 28 |
to \vtoPoint\.. This always tries to keep the "up" direction the |
| 29 |
positive y-axis, unless that is impossible. All current field values |
| 30 |
in the node are replaced. |
| 31 |
} |
| 32 |
|
| 33 |
METHOD getScaleSpaceMx void getScaleSpaceMatrix(SbMatrix &mat, |
| 34 |
SbMatrix &inv) const {} |
| 35 |
METHOD getRotSpaceMx void getRotationSpaceMatrix(SbMatrix &mat, |
| 36 |
SbMatrix &inv) const {} |
| 37 |
METHOD getXlateSpaceMx void getTranslationSpaceMatrix(SbMatrix &mat, |
| 38 |
SbMatrix &inv) const { |
| 39 |
These return composite matrices that transform from object space to each |
| 40 |
of the spaces after the scale, rotation, or translation. |
| 41 |
} |
| 42 |
|
| 43 |
METHOD "" void multLeft(const SbMatrix &mat) {} |
| 44 |
METHOD "" void multRight(const SbMatrix &mat) { |
| 45 |
These are convenience functions that combine the effects of a matrix |
| 46 |
transformation into the current transformation stored in this node. |
| 47 |
The first method premultiplies the transformation and the second |
| 48 |
postmultiplies it. |
| 49 |
} |
| 50 |
|
| 51 |
METHOD "" void combineLeft(SoTransformation *nodeOnRight) {} |
| 52 |
METHOD "" void combineRight(SoTransformation *nodeOnLeft) { |
| 53 |
These are convenience functions that combine the effects of another |
| 54 |
transformation node into the current transformation stored in this |
| 55 |
node. The first method premultiplies the transformation and the |
| 56 |
second postmultiplies it. |
| 57 |
} |
| 58 |
|
| 59 |
METHOD setMx void setMatrix(const SbMatrix &mat) { |
| 60 |
Sets the fields in the node to implement the transformation |
| 61 |
represented by the given matrix. Note that invalid matrices (such as |
| 62 |
singular ones) have undefined results. |
| 63 |
} |
| 64 |
|
| 65 |
METHOD "" void recenter(const SbVec3f &newCenter) { |
| 66 |
Changes the center of the transformation to the given point without |
| 67 |
affecting the overall effect of the transformation. |
| 68 |
} |
| 69 |
|
| 70 |
METHOD "" static SoType getClassTypeId() { |
| 71 |
Returns type identifier for this class. |
| 72 |
} |
| 73 |
|
| 74 |
ACTION SoGLRenderAction, SoCallbackAction, |
| 75 |
SoGetBoundingBoxAction, SoRayPickAction { |
| 76 |
Accumulates transformation into the current transformation. |
| 77 |
} |
| 78 |
|
| 79 |
ACTION SoGetMatrixAction { |
| 80 |
Returns the matrix corresponding to the total transformation. |
| 81 |
} |
| 82 |
|
| 83 |
ALSO { |
| 84 |
SoMatrixTransform, |
| 85 |
SoResetTransform, |
| 86 |
SoRotation, |
| 87 |
SoRotationXYZ, |
| 88 |
SoScale, |
| 89 |
SoTransformManip, |
| 90 |
SoTransformSeparator, |
| 91 |
SoTranslation |
| 92 |
} |