Class Transform3f


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

      • Transform3f

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

        public Transform3f()
        Default Constructor.

        Initializes with 0 translation and Identity matrix as rotation
      • Transform3f

        public Transform3f​(Vector3f position,
                           Rotation3f rotation)
        Constructs a homogeneous transform


      • Transform3f

        public Transform3f​(Vector3f d,
                           Rotation3DVectorf 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​(Transform3f obj)
      • delete

        public void delete()
      • DH

        public static Transform3f DH​(float alpha,
                                     float a,
                                     float d,
                                     float 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 Transform3f craigDH​(float alpha,
                                          float a,
                                          float d,
                                          float 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 Transform3f identity()
        Constructs the identity transform

        Returns:
        the identity transform.
      • makeLookAt

        public static Transform3f makeLookAt​(Vector3f eye,
                                             Vector3f center,
                                             Vector3f 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 Vector3f P()
        Gets the position part P from T

        Returns:
        the translation.
      • R

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

        Returns:
        the rotation.
      • toString

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