Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

gcu::Matrix Class Reference

#include <chemistry/matrix.h>

List of all members.

Public Member Functions

 Matrix ()
virtual ~Matrix ()
 Matrix (gdouble Psi, gdouble Theta, gdouble Phi, MatrixType Type)
 Matrix (gdouble x11, gdouble x12, gdouble x13, gdouble x21, gdouble x22, gdouble x23, gdouble x31, gdouble x32, gdouble x33)
Matrixoperator * (Matrix &cMat)
Matrixoperator= (Matrix &cMat)
void Euler (gdouble &Psi, gdouble &Theta, gdouble &Phi)
void Transform (gdouble &dx, gdouble &dy, gdouble &dz)


Detailed Description

This class provides some operations related to rotation of a solid in space. The matrices are 3x3.

Definition at line 50 of file matrix.h.


Constructor & Destructor Documentation

gcu::Matrix::Matrix  ) 
 

Default constructor. Members are not initialized. This constructor is rarely used.

virtual gcu::Matrix::~Matrix  )  [virtual]
 

The destructor of Matrix.

gcu::Matrix::Matrix gdouble  Psi,
gdouble  Theta,
gdouble  Phi,
MatrixType  Type
 

Parameters:
Psi: precession angle.
Theta: nutaton angle.
Phi: rotation angle.
Type: the type of the Matrix.
Constructs a Matrix instance starting from three angles and the type. if Type is euler or antieuler, the angles are the Euler's angles. If Type is rotation, the values have a somewhat different meaning: they are the angles rotation describing the rotation applid to a solid; the result ing matrix is then multiplied by the current "euler" matrix to give th new euler matrix. The code used in CrystalView::Rotate and in GtkChem3DViewer code is (when mouse has moved by x and y on the screen):
        gdouble z = sqrt(x*x + y*y);
        Matrix Mat(0, (y > 0)? - acos(x/z) :acos(x/z), z * M_PI / 90., rotation);
        m_Euler = Mat * m_Euler;
The (M_PI / 90.) factor is arbitrary here.

gcu::Matrix::Matrix gdouble  x11,
gdouble  x12,
gdouble  x13,
gdouble  x21,
gdouble  x22,
gdouble  x23,
gdouble  x31,
gdouble  x32,
gdouble  x33
 

Parameters:
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.
x13: value to use at first line and third 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.
x23: value to use at second line and third column of the matrix.
x31: value to use at third line and first column of the matrix.
x32: value to use at third line and second column of the matrix.
x33: value to use at third line and third column of the matrix.
Constructs a matrix from its components.


Member Function Documentation

void gcu::Matrix::Euler gdouble &  Psi,
gdouble &  Theta,
gdouble &  Phi
 

Parameters:
Psi: precession angle.
Theta: nutaton angle.
Phi: rotation angle.
Get the Euler's angles associated to a "euler" Matrix as defined in MatrixType.

Matrix& gcu::Matrix::operator * Matrix cMat  ) 
 

Parameters:
cMat: a Matrix instance to use in the multiplication.
The matricial multiplication operator.

Matrix& gcu::Matrix::operator= Matrix cMat  ) 
 

Parameters:
cMat: the Matrix instance to copy.
Copies a Matrix instance into another one.

void gcu::Matrix::Transform gdouble &  dx,
gdouble &  dy,
gdouble &  dz
 

Parameters:
dx: the x coordinate.
dy: the y coordinate.
dz: the z coordinate.
Initially, dx, dy and dz 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:
Generated on Wed Mar 10 16:48:10 2004 for The Gnome Chemistry Utils by doxygen 1.3.3