The Gnome Chemistry Utils  0.14.9
Public Member Functions | List of all members
gcu::Matrix2D Class Reference

#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)
 
Matrix2Doperator* (Matrix2D &cMat)
 
Matrix2Doperator= (Matrix2D &cMat)
 
void Transform (double &dx, double &dy)
 

Detailed Description

This class provides some operations related to transformations in a plane. The matrices are 2x2.

Definition at line 35 of file matrix2d.h.

Constructor & Destructor Documentation

gcu::Matrix2D::Matrix2D ( )

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 
)
Parameters
Anglerotation angle.
Degif 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 
)
Parameters
x11value to use at first line and first column of the matrix.
x12value to use at first line and second column of the matrix.
x21value to use at second line and first column of the matrix.
x22value to use at second line and second column of the matrix.

Constructs a matrix from its components.

Member Function Documentation

Matrix2D& gcu::Matrix2D::operator* ( Matrix2D cMat)
Parameters
cMata Matrix2D instance to use in the multiplication.

The matricial multiplication operator.

Matrix2D& gcu::Matrix2D::operator= ( Matrix2D cMat)
Parameters
cMatthe Matrix2D instance to copy.

Copies a Matrix instance into another one.

void gcu::Matrix2D::Transform ( double &  dx,
double &  dy 
)
Parameters
dxthe x coordinate.
dythe 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.


The documentation for this class was generated from the following file: