LIBRCSC Docs
Documentation for HELIOS's BASE LIBRCSC library for RoboCup 2D Simulation League.
|
2D translation matrix class More...
#include <matrix_2d.h>
Public Member Functions | |
Matrix2D () | |
create an identity matrix | |
Matrix2D (const double m11, const double m12, const double m21, const double m22, const double dx, const double dy) | |
create a matrix with all elements. More... | |
const Matrix2D & | reset () |
reset to the identity matrix More... | |
const Matrix2D & | assign (const double m11, const double m12, const double m21, const double m22, const double dx, const double dy) |
set a matrix element with the specified values. More... | |
double | m11 () const |
get the horizontal scaling factor. More... | |
double | m12 () const |
get the vertical shearing factor. More... | |
double | m21 () const |
get the horizontal shearing factor. More... | |
double | m22 () const |
get the vertical scaling factor. More... | |
double | dx () const |
get the horizontal translation factor. More... | |
double | dy () const |
get the vertical translation factor. More... | |
double | det () const |
get the matrix's determinant. More... | |
bool | invertible () const |
check if this matrix is invertible (is not isingular). More... | |
Matrix2D | inverted () const |
get the inverted matrix. More... | |
Matrix2D & | translate (const double dx, const double dy) |
moves the coordinate system. More... | |
Matrix2D & | scale (const double sx, const double sy) |
scales the coordinate system. More... | |
Matrix2D & | rotate (const AngleDeg &angle) |
rotates the coordinate system More... | |
const Matrix2D & | operator*= (const Matrix2D &m) |
multiplied by other matrix More... | |
Vector2D | transform (const Vector2D &v) const |
create transformed vector from input vector with this matrix More... | |
Vector2D | transform (const double x, const double y) const |
create transformed vector from input coordinates with this matrix More... | |
void | transform (Vector2D *v) const |
transform input vector with this matrix More... | |
std::ostream & | print (std::ostream &os) const |
put all elemtns to the output stream More... | |
Static Public Member Functions | |
static Matrix2D | make_translation (const double dx, const double dy) |
create the translation matrix. More... | |
static Matrix2D | make_scaling (const double sx, const double sy) |
create the scaling matrix. More... | |
static Matrix2D | make_rotation (const AngleDeg &angle) |
create the rotation matrix. More... | |
2D translation matrix class
( m11, m12, dx ) ( m21, m22, dy ) ( 0, 0, 1 )
|
inline |
create a matrix with all elements.
m11 | the horizontal scaling factor. |
m12 | the vertical shearing factor. |
m21 | the horizontal shearing factor. |
m22 | the vertical scaling factor. |
dx | the horizontal translation factor. |
dy | the vertical translation factor. |
|
inline |
set a matrix element with the specified values.
m11 | the horizontal scaling factor. |
m12 | the vertical shearing factor. |
m21 | the horizontal shearing factor. |
m22 | the vertical scaling factor. |
dx | the horizontal translation factor. |
dy | the vertical translation factor. |
|
inline |
get the matrix's determinant.
|
inline |
get the horizontal translation factor.
|
inline |
get the vertical translation factor.
Matrix2D rcsc::Matrix2D::inverted | ( | ) | const |
get the inverted matrix.
|
inline |
check if this matrix is invertible (is not isingular).
|
inline |
get the horizontal scaling factor.
|
inline |
get the vertical shearing factor.
|
inline |
get the horizontal shearing factor.
|
inline |
get the vertical scaling factor.
create the rotation matrix.
angle | the rotation angle |
|
inlinestatic |
create the scaling matrix.
sx | the horizontal scaling factor. |
sy | the vertical scaling factor. |
|
inlinestatic |
create the translation matrix.
dx | the horizontal translation factor. |
dy | the vertical translation factor. |
multiplied by other matrix
m | left hand side matrix |
|
inline |
put all elemtns to the output stream
os | reference to the output stream |
|
inline |
reset to the identity matrix
rotates the coordinate system
angle | rotation angle |
same as: this = make_rotation(angle) * this
|
inline |
scales the coordinate system.
sx | scaling factor for the x axis. |
sy | scaling factor for the y axis. |
same as: this = make_scaling(sx,sy) * this
|
inline |
create transformed vector from input coordinates with this matrix
x | input x-coordinates value |
y | input y-coordinates value |
create transformed vector from input vector with this matrix
v | input vector |
|
inline |
transform input vector with this matrix
v | pointer to the input vector. |
|
inline |
moves the coordinate system.
dx | move factor for the x axis. |
dy | move factor for the y axis. |
same as: this = make_translation(dx,dy) * this