Class Transform3Dd


  • public class Transform3Dd
    extends java.lang.Object
    • Constructor Detail

      • Transform3Dd

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

        public Transform3Dd()
        Default Constructor.

        Initializes with 0 translation and Identity matrix as rotation
      • Transform3Dd

        public Transform3Dd​(Vector3Dd d,
                            Rotation3Dd R)
        Constructs a homogeneous transform
        Parameters:
        d - [in] \mathbf{d} A 3x1 translation vector
        R - [in] \mathbf{R} A 3x3 rotation matrix
      • Transform3Dd

        public Transform3Dd​(Rotation3Dd R)
        A homogeneous transform with a rotation of R and a
        translation of zero.
      • Transform3Dd

        public Transform3Dd​(Vector3Dd d)
        A homogeneous transform with a rotation of zero and a
        translation of d.
      • Transform3Dd

        public Transform3Dd​(Vector3Dd d,
                            Rotation3DVectord r)
        Constructs a homogeneous transform

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

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

      • getCPtr

        public static long getCPtr​(Transform3Dd obj)
      • delete

        public void delete()
      • DH

        public static Transform3Dd DH​(double alpha,
                                      double a,
                                      double d,
                                      double theta)
      • craigDH

        public static Transform3Dd craigDH​(double alpha,
                                           double a,
                                           double d,
                                           double theta)
      • DHHGP

        public static Transform3Dd DHHGP​(double alpha,
                                         double a,
                                         double beta,
                                         double b)
      • get

        public double get​(long row,
                          long column)
      • set

        public void set​(long row,
                        long column,
                        double d)
      • equals

        public boolean equals​(Transform3Dd rhs)
        Comparison operator.

        The comparison operator makes a element wise comparison.
        Returns true only if all elements are equal.

        Parameters:
        rhs - [in] Transform to compare with
        Returns:
        True if equal.
      • notEqual

        public boolean notEqual​(Transform3Dd rhs)
        Comparison operator.

        The comparison operator makes a element wise comparison.
        Returns true if any of the elements are different.

        Parameters:
        rhs - [in] Transform to compare with
        Returns:
        True if not equal.
      • equal

        public boolean equal​(Transform3Dd t3d,
                             double precision)
        Compares the transformations with a given precision

        Performs an element wise comparison. Two elements are considered equal if the difference
        are less than precision.

        Parameters:
        t3d - [in] Transform to compare with
        precision - [in] The precision to use for testing
        Returns:
        True if all elements are less than precision apart.
      • equal

        public boolean equal​(Transform3Dd t3d)
        Compares the transformations with a given precision

        Performs an element wise comparison. Two elements are considered equal if the difference
        are less than precision.

        Parameters:
        t3d - [in] Transform to compare with

        Returns:
        True if all elements are less than precision apart.
      • multiply

        public Vector3Dd multiply​(Vector3Dd bP)
        Calculates \robax{a}{\mathbf{p}} = \robabx{a}{b}{\mathbf{T}} \robax{b}{\mathbf{p}} thus transforming point \mathbf{p} from frame b
        to frame a
        Parameters:
        bP - [in] \robax{b}{\mathbf{p}}
        Returns:
        \robax{a}{\mathbf{p}}
      • R

        public Rotation3Dd R()
        Gets the rotation part \mathbf{R} from \mathbf{T}
        Returns:
        \mathbf{R}
      • P

        public Vector3Dd P()
        Gets the position part \mathbf{d} from \mathbf{T}
        Returns:
        \mathbf{d}
      • toString

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

        public static Transform3Dd invMult​(Transform3Dd t1,
                                           Transform3Dd t2)
        computes the inverse of t1 and multiplies it with t2.
        The result is saved in t1. t1 = inv(t1) * t2
      • makeLookAt

        public static Transform3Dd makeLookAt​(Vector3Dd eye,
                                              Vector3Dd center,
                                              Vector3Dd 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
      • e

        public EigenMatrix4d e()
        Returns a Eigen 4x4 matrix \mathbf{M}\in SE(3) that represents this homogeneous transformation

        Returns:
        \mathbf{M}\in SE(3)