Main Page | Class Hierarchy | Class List | Class Members

Matrix3D Class Reference

List of all members.

Public Member Functions

 Matrix3D (void)
 Matrix3D (const Point3D &eulerAngles)
 Matrix3D (const class Quaternion &q)
 Matrix3D (const class Matrix4D &m)
double & operator() (int col, int row)
double & index (int col, int row)
double det (void) const
Matrix3D operator- (void) const
Matrix3D operator * (const Matrix3D &m) const
Matrix3Doperator *= (const Matrix3D &m)
Matrix3D operator+ (const Matrix3D &m) const
Matrix3Doperator+= (const Matrix3D &m)
Matrix3D operator- (const Matrix3D &m) const
Matrix3Doperator-= (const Matrix3D &m)
Matrix3D operator * (double f) const
Matrix3Doperator *= (double f)
Matrix3D operator/ (double f) const
Matrix3Doperator/= (double f)
Matrix3D transpose (void) const
Matrix3D invert (void) const
Point3D operator * (const Point3D &p) const
Ray3D operator * (const Ray3D &ray) const
Point3D toEuler (void) const
Point3D toEuler (const Point3D &euler) const
double squareNorm (void) const
void SVD (Matrix3D &r1, Matrix3D &diagonal, Matrix3D &r2) const
void Factor (Matrix3D &rot, Matrix3D &sym) const
Matrix3D closestRotation (void) const
Matrix3D symmetrize (void) const
Matrix3D skewSymmetrize (void) const

Static Public Member Functions

static int Invert (const Matrix3D &in, Matrix3D &out)
static Matrix3D IdentityMatrix (void)
static double SquareL2Difference (const Matrix3D &m1, const Matrix3D &m2)
static Matrix3D Exp (const Matrix3D &m, int iter=100)
static Matrix3D Log (const Matrix3D &m, double eps=0.0001)
static Matrix3D SquareRoot (const Matrix3D &m, double eps=0.000001)

Public Attributes

double m [3][3]

Detailed Description

This class represents a 3x3 matrix.


Constructor & Destructor Documentation

Matrix3D::Matrix3D void   ) 
 

This constructor generates an identity matrix

Matrix3D::Matrix3D const Point3D eulerAngles  ) 
 

This constructor generates a rotation matrix from the specified Euler angles

Matrix3D::Matrix3D const class Quaternion q  ) 
 

This constructor generates a rotation matrix from the specified quaternion

Matrix3D::Matrix3D const class Matrix4D m  ) 
 

This constructor generates a matrix from the top 3x3 matrix of the Matrix4D


Member Function Documentation

Matrix3D Matrix3D::closestRotation void   )  const
 

This method returns the closest 3x3 rotation matrix

double Matrix3D::det void   )  const
 

This method returns the determinant of the matrix.

Matrix3D Matrix3D::Exp const Matrix3D m,
int  iter = 100
[static]
 

This method returns the exponent of a matrix

void Matrix3D::Factor Matrix3D rot,
Matrix3D sym
const
 

This method factors a matrix as the product of a rotation and a symmetric matrix

Matrix3D Matrix3D::IdentityMatrix void   )  [static]
 

This static method returns the identity matrix.

double & Matrix3D::index int  col,
int  row
 

This method returns the entry of the matrix in the col-th column and the row-th row.

int Matrix3D::Invert const Matrix3D in,
Matrix3D out
[static]
 

This static method tries to invert the input matrix and write it out into the output. A value of 0 is returned if the matrix has 0 determinant.

Matrix3D Matrix3D::invert void   )  const
 

This method returns the inverse of a matrix. (Note that it does not change the entries of the current matrix.)

Matrix3D Matrix3D::Log const Matrix3D m,
double  eps = 0.0001
[static]
 

This method returns the logarithm of a matrix

Ray3D Matrix3D::operator * const Ray3D ray  )  const
 

This method applies transformation to a ray.

Point3D Matrix3D::operator * const Point3D p  )  const
 

This method transforms a 3D point.

Matrix3D Matrix3D::operator * double  f  )  const
 

This method scales the entries of a matrix and returns a new matrix.

Matrix3D Matrix3D::operator * const Matrix3D m  )  const
 

This method multiplies two matrices and returns the product.

Matrix3D & Matrix3D::operator *= double  f  ) 
 

This method scales the entries of the current matrix.

Matrix3D & Matrix3D::operator *= const Matrix3D m  ) 
 

This method multiplies the current matrix (on the right) by the input matrix..

double & Matrix3D::operator() int  col,
int  row
 

This method returns the entry of the matrix in the col-th column and the row-th row.

Matrix3D Matrix3D::operator+ const Matrix3D m  )  const
 

This method adds two matrices and returns the sum.

Matrix3D & Matrix3D::operator+= const Matrix3D m  ) 
 

This method adds the input matrix to the current matrix.

Matrix3D Matrix3D::operator- const Matrix3D m  )  const
 

This method subtracts two matrices and returns the difference.

Matrix3D Matrix3D::operator- void   )  const
 

This method returns the negative of the matrix

Matrix3D & Matrix3D::operator-= const Matrix3D m  ) 
 

This method subtracts the input matrix from the current matrix.

Matrix3D Matrix3D::operator/ double  f  )  const
 

This method divides the entries of a matrix and returns a new matrix.

Matrix3D & Matrix3D::operator/= double  f  ) 
 

This method divides the entries of the current matrix.

Matrix3D Matrix3D::skewSymmetrize void   )  const
 

This method returns nearest skew-symmetric matrix

double Matrix3D::SquareL2Difference const Matrix3D m1,
const Matrix3D m2
[static]
 

This method returns sum of the squares of the entries of the difference matrix.

double Matrix3D::squareNorm void   )  const
 

This method returns the sum of the squares of the matrix entries

Matrix3D Matrix3D::SquareRoot const Matrix3D m,
double  eps = 0.000001
[static]
 

This method returns the square-root of a matrix

void Matrix3D::SVD Matrix3D r1,
Matrix3D diagonal,
Matrix3D r2
const
 

This method computes the SVD decomposition of the upper 3x3 matrix, such that r1 and r2 are rotations and the upper 3x3 matrix is equal to r1*diagonal*r2

Matrix3D Matrix3D::symmetrize void   )  const
 

This method returns nearest symmetric matrix

Point3D Matrix3D::toEuler const Point3D euler  )  const
 

Because the Euler angles are not unique, the following method returns the Euler angles closest to the input ones

Point3D Matrix3D::toEuler void   )  const
 

This method returns the Euler Angles of a rotation matrix

Matrix3D Matrix3D::transpose void   )  const
 

This method returns the transpose of a matrix. (Note that it does not change the entries of the current matrix.)


Member Data Documentation

double Matrix3D::m[3][3]
 

The actual matrix entries


Generated on Wed Feb 22 15:44:23 2006 for Assignment 2 by  doxygen 1.4.1