Class Transform

  • All Implemented Interfaces:
    INamedObject

    public class Transform
    extends A3DObject
    A transform contains information that allow access to object's translate/scale/rotation or transform matrix at minimum cost This is used by local transform.
    • Method Detail

      • getGeometricTranslation

        public Vector3 getGeometricTranslation()
        Gets the geometric translation. Geometric transformation only affects the entities attached and leave the child nodes unaffected. It will be merged as local transformation when you export the geometric transformation to file types that does not support it.
      • setGeometricTranslation

        public void setGeometricTranslation​(Vector3 value)
        Sets the geometric translation. Geometric transformation only affects the entities attached and leave the child nodes unaffected. It will be merged as local transformation when you export the geometric transformation to file types that does not support it.
        Parameters:
        value - New value
      • getGeometricScaling

        public Vector3 getGeometricScaling()
        Gets the geometric scaling. Geometric transformation only affects the entities attached and leave the child nodes unaffected. It will be merged as local transformation when you export the geometric transformation to file types that does not support it.
      • setGeometricScaling

        public void setGeometricScaling​(Vector3 value)
        Sets the geometric scaling. Geometric transformation only affects the entities attached and leave the child nodes unaffected. It will be merged as local transformation when you export the geometric transformation to file types that does not support it.
        Parameters:
        value - New value
      • getGeometricRotation

        public Vector3 getGeometricRotation()
        Gets the geometric Euler rotation(measured in degree). Geometric transformation only affects the entities attached and leave the child nodes unaffected. It will be merged as local transformation when you export the geometric transformation to file types that does not support it.
      • setGeometricRotation

        public void setGeometricRotation​(Vector3 value)
        Sets the geometric Euler rotation(measured in degree). Geometric transformation only affects the entities attached and leave the child nodes unaffected. It will be merged as local transformation when you export the geometric transformation to file types that does not support it.
        Parameters:
        value - New value
      • setGeometricTranslation

        public Transform setGeometricTranslation​(double x,
                                                 double y,
                                                 double z)
        Sets the geometric translation. Geometric transformation only affects the entities attached and leave the child nodes unaffected. It will be merged as local transformation when you export the geometric transformation to file types that does not support it.
      • setGeometricScaling

        public Transform setGeometricScaling​(double sx,
                                             double sy,
                                             double sz)
        Sets the geometric scaling. Geometric transformation only affects the entities attached and leave the child nodes unaffected. It will be merged as local transformation when you export the geometric transformation to file types that does not support it.
      • setGeometricRotation

        public Transform setGeometricRotation​(double rx,
                                              double ry,
                                              double rz)
        Sets the geometric Euler rotation(measured in degree). Geometric transformation only affects the entities attached and leave the child nodes unaffected. It will be merged as local transformation when you export the geometric transformation to file types that does not support it.
      • getTranslation

        public Vector3 getTranslation()
        Gets the translation
      • setTranslation

        public void setTranslation​(Vector3 value)
        Sets the translation
        Parameters:
        value - New value
      • setTranslation

        public Transform setTranslation​(double tx,
                                        double ty,
                                        double tz)
        Sets the translation of current transform.
        Parameters:
        tx -
        ty -
        tz -
      • setScale

        public Transform setScale​(double sx,
                                  double sy,
                                  double sz)
        Sets the scale of current transform.
        Parameters:
        sx -
        sy -
        sz -
      • setEulerAngles

        public Transform setEulerAngles​(double rx,
                                        double ry,
                                        double rz)
        Sets the Euler angles in degrees of current transform.
        Parameters:
        rx -
        ry -
        rz -
      • setRotation

        public Transform setRotation​(double rw,
                                     double rx,
                                     double ry,
                                     double rz)
        Sets the rotation(as quaternion components) of current transform.
        Parameters:
        rw -
        rx -
        ry -
        rz -
      • setPreRotation

        public Transform setPreRotation​(double rx,
                                        double ry,
                                        double rz)
        Sets the pre-rotation represented in degree
      • setPostRotation

        public Transform setPostRotation​(double rx,
                                         double ry,
                                         double rz)
        Sets the post-rotation represented in degree
      • getScale

        public Vector3 getScale()
        Gets the scale
      • setScale

        public void setScale​(Vector3 value)
        Sets the scale
        Parameters:
        value - New value
      • getPreRotation

        public Vector3 getPreRotation()
        Gets the pre-rotation represented in degree
      • setPreRotation

        public void setPreRotation​(Vector3 value)
        Sets the pre-rotation represented in degree
        Parameters:
        value - New value
      • getPostRotation

        public Vector3 getPostRotation()
        Gets the post-rotation represented in degree
      • setPostRotation

        public void setPostRotation​(Vector3 value)
        Sets the post-rotation represented in degree
        Parameters:
        value - New value
      • getEulerAngles

        public Vector3 getEulerAngles()
        Gets the rotation represented in Euler angles, measured in degree
      • setEulerAngles

        public void setEulerAngles​(Vector3 value)
        Sets the rotation represented in Euler angles, measured in degree
        Parameters:
        value - New value
      • getRotation

        public Quaternion getRotation()
        Gets the rotation represented in quaternion.
      • setRotation

        public void setRotation​(Quaternion value)
        Sets the rotation represented in quaternion.
        Parameters:
        value - New value
      • getTransformMatrix

        public Matrix4 getTransformMatrix()
        Gets the transform matrix.
      • setTransformMatrix

        public void setTransformMatrix​(Matrix4 value)
        Sets the transform matrix.
        Parameters:
        value - New value