Class Rotation3Df


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

      • Rotation3Df

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

        public Rotation3Df()
        A rotation matrix with uninitialized storage.
      • Rotation3Df

        public Rotation3Df​(float r11,
                           float r12,
                           float r13,
                           float r21,
                           float r22,
                           float r23,
                           float r31,
                           float r32,
                           float r33)
    • Method Detail

      • getCPtr

        public static long getCPtr​(Rotation3Df obj)
      • delete

        public void delete()
      • normalize

        public void normalize()
        Normalizes the rotation matrix to satisfy SO(3).

        Makes a normalization of the rotation matrix such that the columns
        are normalized and othogonal s.t. it belongs to SO(3).
      • get

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

        public void set​(long row,
                        long column,
                        float d)
      • getRow

        public Vector3Df getRow​(long i)
        Returns the i'th row of the rotation matrix
        Parameters:
        i - [in] Index of the row to return. Only valid indices are 0, 1 and 2.
      • getCol

        public Vector3Df getCol​(long i)
        Returns the i'th column of the rotation matrix
        Parameters:
        i - [in] Index of the column to return. Only valid indices are 0, 1 and 2.
      • equals

        public boolean equals​(Rotation3Df rhs)
        Comparison operator.

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

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

        public boolean notEqual​(Rotation3Df rhs)
        Comparison operator.

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

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

        public boolean equal​(Rotation3Df rot,
                             float precision)
        Compares rotations with a given precision

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

        Parameters:
        rot - [in] Rotation 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​(Rotation3Df rot)
        Compares rotations with a given precision

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

        Parameters:
        rot - [in] Rotation to compare with

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

        public boolean isProperRotation()
        Verify that this rotation is a proper rotation

        Returns:
        True if this rotation is considered a proper rotation
      • isProperRotation

        public boolean isProperRotation​(float precision)
        Verify that this rotation is a proper rotation

        Returns:
        True if this rotation is considered a proper rotation
      • e

        public EigenMatrix3f e()
        Returns a Eigen 3x3 matrix \mathbf{M}\in SO(3) that represents this rotation

        Returns:
        \mathbf{M}\in SO(3)
      • multiply

        public Rotation3Df multiply​(Rotation3Df bRc)
        Calculates \robabx{a}{c}{\mathbf{R}} = \robabx{a}{b}{\mathbf{R}} \robabx{b}{c}{\mathbf{R}}

        Parameters:
        bRc - [in] \robabx{b}{c}{\mathbf{R}}

        Returns:
        \robabx{a}{c}{\mathbf{R}}
      • multiply

        public Vector3Df multiply​(Vector3Df bVc)
        Calculates \robabx{a}{c}{\mathbf{v}} = \robabx{a}{b}{\mathbf{R}} \robabx{b}{c}{\mathbf{v}}

        Parameters:
        bVc - [in] \robabx{b}{c}{\mathbf{v}}
        Returns:
        \robabx{a}{c}{\mathbf{v}}
      • skew

        public static Rotation3Df skew​(Vector3Df v)
        Creates a skew symmetric matrix from a Vector3D. Also
        known as the cross product matrix of v.



        Parameters:
        v - [in] vector to create Skew matrix from
      • inverse

        public Rotation3Df inverse​(boolean copy)
        Calculate the inverse.
        Parameters:
        copy - [in] if coopy is false, This function changes the object that it is invoked
        on, but this is about x5 faster than rot = inverse( rot ). else it changes the object,
        making it a bit slower.
        Returns:
        the inverse rotation.
      • tr

        public float tr()
      • assign

        public Rotation3Df assign​(Rotation3DVectorf rot)
        Assignment of RotationVector to Rotation3D
        Parameters:
        rot - [in] Rotation input
      • toString

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

        public EAAf multiply​(EAAf rhs)