Package org.robwork.sdurw
Class Rotation2Dd
- java.lang.Object
-
- org.robwork.sdurw.Rotation2Dd
-
public class Rotation2Dd 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 Rotation2Dd()
A rotation matrix with uninitialized storage.Rotation2Dd(double 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]
Rotation2Dd(double r11, double r12, double r21, double r22)
Constructs an initialized 2x2 rotation matrix
Rotation2Dd(long cPtr, boolean cMemoryOwn)
Rotation2Dd(Vector2Dd i)
Construct an initialized 2x2 rotation matrix.
The second of column of the matrix is deduced from the first column.
Rotation2Dd(Vector2Dd i, Vector2Dd 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()
EigenMatrix2d
e()
Returns a boost 2x2 matrix \mathbf{M}\in SO(2) that represents this rotation
boolean
equals(Rotation2Dd rhs)
Comparison operator.
The comparison operator makes a element wise comparison.
Returns true only if all elements are equal.
double
get(long row, long column)
static long
getCPtr(Rotation2Dd obj)
static Rotation2Dd
identity()
Constructs a 2x2 rotation matrix set to identityRotation2Dd
multiply(Rotation2Dd bRc)
Calculates \robabx{a}{c}{\mathbf{R}} = \robabx{a}{b}{\mathbf{R}} \robabx{b}{c}{\mathbf{R}}
Vector2Dd
multiply(Vector2Dd bVc)
Calculates \robabx{a}{c}{\mathbf{v}} = \robabx{a}{b}{\mathbf{R}} \robabx{b}{c}{\mathbf{v}}
boolean
notEqual(Rotation2Dd 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, double d)
java.lang.String
toString()
-
-
-
Constructor Detail
-
Rotation2Dd
public Rotation2Dd(long cPtr, boolean cMemoryOwn)
-
Rotation2Dd
public Rotation2Dd()
A rotation matrix with uninitialized storage.
-
Rotation2Dd
public Rotation2Dd(double r11, double r12, double r21, double 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]
-
Rotation2Dd
public Rotation2Dd(Vector2Dd i, Vector2Dd 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}}
-
Rotation2Dd
public Rotation2Dd(double 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
-
-
Rotation2Dd
public Rotation2Dd(Vector2Dd 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(Rotation2Dd obj)
-
delete
public void delete()
-
identity
public static Rotation2Dd 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(Rotation2Dd 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(Rotation2Dd 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 EigenMatrix2d e()
Returns a boost 2x2 matrix \mathbf{M}\in SO(2) that represents this rotation
- Returns:
- \mathbf{M}\in SO(2)
-
multiply
public Rotation2Dd multiply(Rotation2Dd 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 Vector2Dd multiply(Vector2Dd 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 classjava.lang.Object
-
get
public double get(long row, long column)
-
set
public void set(long row, long column, double d)
-
-