Class Transform3d


  • public class Transform3d
    extends java.lang.Object
    A 4x4 homogeneous transform matrix.
    • Constructor Detail

      • Transform3d

        public Transform3d​(long cPtr,
                           boolean cMemoryOwn)
      • Transform3d

        public Transform3d()
        Default Constructor.

        Initializes with 0 translation and Identity matrix as rotation
      • Transform3d

        public Transform3d​(Vector3d position,
                           Rotation3d rotation)
        Constructs a homogeneous transform


      • Transform3d

        public Transform3d​(Vector3d d,
                           Rotation3DVectord r)
        Constructs a homogeneous transform

        Calling this constructor is equivalent to the transform
        Transform3D(d, r.toRotation3D()).

        Parameters:
        d - [in] A 3x1 translation vector
        r - [in] A 3x1 rotation vector
    • Method Detail

      • getCPtr

        public static long getCPtr​(Transform3d obj)
      • delete

        public void delete()
      • DH

        public static Transform3d DH​(double alpha,
                                     double a,
                                     double d,
                                     double theta)
        Constructs a homogeneous transform using the original
        Denavit-Hartenberg notation

        Parameters:
        alpha - [in]
        a - [in]
        d - [in]
        theta - [in]

        Returns:
        transformation matrix.
      • craigDH

        public static Transform3d craigDH​(double alpha,
                                          double a,
                                          double d,
                                          double theta)
        Constructs a homogeneous transform using the Craig (modified)
        Denavit-Hartenberg notation

        Parameters:
        alpha - [in]
        a - [in]
        d - [in]
        theta - [in]

        Returns:
        the transformation matrix.

        Note: The Craig (modified) Denavit-Hartenberg notation differs from
        the original Denavit-Hartenberg notation.
      • identity

        public static Transform3d identity()
        Constructs the identity transform

        Returns:
        the identity transform.
      • makeLookAt

        public static Transform3d makeLookAt​(Vector3d eye,
                                             Vector3d center,
                                             Vector3d up)
        creates a transformation that is positioned in eye and looking toward
        center along -z where up indicates the upward direction along which the y-axis
        is placed. Same convention as for gluLookAt
        and is handy for placing a cameraview.

        Parameters:
        eye - [in] position of view
        center - [in] point to look toward
        up - [in] the upward direction (the

        Returns:
        Transformation
      • P

        public Vector3d P()
        Gets the position part P from T

        Returns:
        the translation.
      • R

        public Rotation3d R()
        Gets the rotation part R from T.

        Returns:
        the rotation.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object