Class Rotation2Df


  • public class Rotation2Df
    extends java.lang.Object
    A 2x2 rotation matrix \mathbf{R}\in SO(2)

    \mathbf{R}= \left[ \begin{array}{cc} {}^A\hat{X}_B {}^A\hat{Y}_B \end{array} \right] = \left[ \begin{array}{cc} r_{11} r_{12} \\ r_{21} r_{22} \end{array} \right]
    • Constructor Summary

      Constructors 
      Constructor Description
      Rotation2Df()
      A rotation matrix with uninitialized storage.
      Rotation2Df​(float theta)
      Constructs an initialized 2x2 rotation matrix
      \robabx{a}{b}{\mathbf{R}} = \left[ \begin{array}{cc} \robabx{a}{b}{\mathbf{i}} \robabx{a}{b}{\mathbf{j}} \end{array} \right]

      Rotation2Df​(float r11, float r12, float r21, float r22)
      Constructs an initialized 2x2 rotation matrix

      Rotation2Df​(long cPtr, boolean cMemoryOwn)  
      Rotation2Df​(Vector2Df i)
      Construct an initialized 2x2 rotation matrix.

      The second of column of the matrix is deduced from the first column.

      Rotation2Df​(Vector2Df i, Vector2Df j)
      Constructs an initialized 2x2 rotation matrix
      \robabx{a}{b}{\mathbf{R}} = \left[ \begin{array}{cc} \robabx{a}{b}{\mathbf{i}} \robabx{a}{b}{\mathbf{j}} \end{array} \right]

    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete()  
      EigenMatrix2f e()
      Returns a boost 2x2 matrix \mathbf{M}\in SO(2) that represents this rotation

      boolean equals​(Rotation2Df rhs)
      Comparison operator.

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

      float get​(long row, long column)  
      static long getCPtr​(Rotation2Df obj)  
      static Rotation2Df identity()
      Constructs a 2x2 rotation matrix set to identity
      Rotation2Df multiply​(Rotation2Df bRc)
      Calculates \robabx{a}{c}{\mathbf{R}} = \robabx{a}{b}{\mathbf{R}} \robabx{b}{c}{\mathbf{R}}



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


      boolean notEqual​(Rotation2Df rhs)
      Comparison operator.

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

      void set​(long row, long column, float d)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Rotation2Df

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

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

        public Rotation2Df​(float r11,
                           float r12,
                           float r21,
                           float r22)
        Constructs an initialized 2x2 rotation matrix

        Parameters:
        r11 - r_{11}
        r12 - r_{12}
        r21 - r_{21}
        r22 - r_{22}

        \mathbf{R} = \left[ \begin{array}{cc} r_{11} r_{12} \\ r_{21} r_{22} \end{array} \right]
      • Rotation2Df

        public Rotation2Df​(Vector2Df i,
                           Vector2Df j)
        Constructs an initialized 2x2 rotation matrix
        \robabx{a}{b}{\mathbf{R}} = \left[ \begin{array}{cc} \robabx{a}{b}{\mathbf{i}} \robabx{a}{b}{\mathbf{j}} \end{array} \right]

        Parameters:
        i - \robabx{a}{b}{\mathbf{i}}
        j - \robabx{a}{b}{\mathbf{j}}
      • Rotation2Df

        public Rotation2Df​(float theta)
        Constructs an initialized 2x2 rotation matrix
        \robabx{a}{b}{\mathbf{R}} = \left[ \begin{array}{cc} \robabx{a}{b}{\mathbf{i}} \robabx{a}{b}{\mathbf{j}} \end{array} \right]

        Parameters:
        theta -
      • Rotation2Df

        public Rotation2Df​(Vector2Df i)
        Construct an initialized 2x2 rotation matrix.

        The second of column of the matrix is deduced from the first column.

        Parameters:
        i - [in] The first column of the rotation matrix.
    • Method Detail

      • getCPtr

        public static long getCPtr​(Rotation2Df obj)
      • delete

        public void delete()
      • identity

        public static Rotation2Df identity()
        Constructs a 2x2 rotation matrix set to identity
        Returns:
        a 2x2 identity rotation matrix

        \mathbf{R} = \left[ \begin{array}{cc} 1 0\\ 0 1 \end{array} \right]
      • equals

        public boolean equals​(Rotation2Df rhs)
        Comparison operator.

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

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

        public boolean notEqual​(Rotation2Df rhs)
        Comparison operator.

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

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

        public EigenMatrix2f e()
        Returns a boost 2x2 matrix \mathbf{M}\in SO(2) that represents this rotation

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

        public Rotation2Df multiply​(Rotation2Df 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 Vector2Df multiply​(Vector2Df 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}}
      • toString

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

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

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