The Gnome Chemistry Utils
0.13.7
|
#include <gcu/matrix2d.h>
Public Member Functions | |
Matrix2D () | |
virtual | ~Matrix2D () |
Matrix2D (double Angle, bool Deg=true) | |
Matrix2D (double x11, double x12, double x21, double x22) | |
Matrix2D & | operator* (Matrix2D &cMat) |
Matrix2D & | operator= (Matrix2D &cMat) |
void | Transform (double &dx, double &dy) |
This class provides some operations related to transformations in a plane. The matrices are 2x2.
Definition at line 35 of file matrix2d.h.
Default constructor. Members are not initialized. This constructor is rarely used.
virtual gcu::Matrix2D::~Matrix2D | ( | ) | [virtual] |
The destructor of Matrix.
gcu::Matrix2D::Matrix2D | ( | double | Angle, |
bool | Deg = true |
||
) |
Angle,: | rotation angle. |
Deg,: | if true, Angle is expressed in degrees, otherwise in radians. Default is true. |
Constructs a Matrix2D representing a rotation.
gcu::Matrix2D::Matrix2D | ( | double | x11, |
double | x12, | ||
double | x21, | ||
double | x22 | ||
) |
x11,: | value to use at first line and first column of the matrix. |
x12,: | value to use at first line and second column of the matrix. |
x21,: | value to use at second line and first column of the matrix. |
x22,: | value to use at second line and second column of the matrix. |
Constructs a matrix from its components.
cMat,: | a Matrix2D instance to use in the multiplication. |
The matricial multiplication operator.
void gcu::Matrix2D::Transform | ( | double & | dx, |
double & | dy | ||
) |
dx,: | the x coordinate. |
dy,: | the y coordinate. |
Initially, dx and dy are the components of the vector to transform (multiply) by the matrix and after execution of this method, dx, dy and dz are the components of the transformed vector. So initial values are lost.