Class SoTransform

    • Field Detail

      • translation

        public final SoSFVec3f translation
        Translation vector.
      • rotation

        public final SoSFRotation rotation
        Rotation specification.
      • scaleFactor

        public final SoSFVec3f scaleFactor
        Scale factors. Non-positive values may cause undesirable results.
      • scaleOrientation

        public final SoSFRotation scaleOrientation
        Rotational orientation for scale.
      • center

        public final SoSFVec3f center
        Origin for scale and rotation.
    • Constructor Detail

      • SoTransform

        public SoTransform()
        Creates a transformation node with default settings.
    • Method Detail

      • multLeft

        public void multLeft​(SbMatrix mat)
        Convenience function that combines the effects of a matrix transformation into the current transformation stored in this node. This method premultiplies the transformation.
      • getTranslationSpaceMatrix

        public SbMatrix[] getTranslationSpaceMatrix()
        Returns composite matrix that transforms from object space to translation space (the space after scale, rotation, and translation).
      • pointAt

        public void pointAt​(SbVec3f fromPoint,
                            SbVec3f toPoint)
        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

        public void setMatrix​(SbMatrix mat)
        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

        public SbMatrix[] getScaleSpaceMatrix()
        Returns composite matrix that transforms from object space to scale space (the space after the scale).
      • combineRight

        public void combineRight​(SoTransformation nodeOnRight)
        Convenience function that combines the effects of another transformation node into the current transformation stored in this node. This method postmultiplies the transformation.
      • multRight

        public void multRight​(SbMatrix mat)
        Convenience function that combines the effects of a matrix transformation into the current transformation stored in this node. This method postmultiplies the transformation.
      • combineLeft

        public void combineLeft​(SoTransformation nodeOnLeft)
        Convenience function that combines the effects of another transformation node into the current transformation stored in this node. This method premultiplies the transformation.
      • recenter

        public void recenter​(SbVec3f newCenter)
        Changes the center of the transformation to the given point without affecting the overall effect of the transformation.
      • getRotationSpaceMatrix

        public SbMatrix[] getRotationSpaceMatrix()
        Returns composite matrix that transforms from object space to rotation space (the space after the scale and rotation).