Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Matrix Class Reference

Class representing a 4x4 transformation matrix. More...

#include <matrix.h>

List of all members.

Public Member Functions

 Matrix ()
 Default constructor. The matrix is initialized to identity.
 Matrix (float s)
 Constructor initializing all elements to the given value.
virtual ~Matrix ()
 Destructor. Does nothing.
Matrixoperator= (float s)
 Assignment from a scalar value.
float operator() (int i, int j) const
 Returns a copy of the element at position row,column (i,j).
float & operator() (int i, int j)
 Returns a reference to the element at position row,column (i,j).
Matrixzero ()
 Clear all elements to zero.
Matrixidentity ()
 Set matrix to identity.
Matrixscale (float sx, float sy, float sz)
 Setup scaling matrix.
Matrixtranslation (float tx, float ty, float tz)
 Setup translation matrix.
MatrixrotX (float rx)
 Setup rotation matrix around the x-axis, where the rotation angle is given in degrees.
MatrixrotY (float ry)
 Setup rotation matrix around the y-axis, where the rotation angle is given in degrees.
MatrixrotZ (float rz)
 Setup rotation matrix around the z-axis, where the rotation angle is given in degrees.
Matrix operator+ (const Matrix &m) const
 Addition of two matrices.
Matrixoperator+= (const Matrix &m)
 Addition of two matrices in place.
Matrix operator- (const Matrix &m) const
 Subtraction of two matrices.
Matrixoperator-= (const Matrix &m)
 Subtraction of two matrices in place.
Matrix operator * (float s) const
 Multiplication of matrix by scalar.
Matrixoperator *= (float s)
 Multiplication by scalar in place.
Point operator * (const Point &p) const
 Matrix/point multiplication. The point is translated by the last column.
Vector operator * (const Vector &v) const
 Matrix/vector multiplication. The vector is not translated by the last column.
Matrix operator * (const Matrix &m) const
 Matrix multiplication.
Matrixoperator *= (const Matrix &m)
 Matrix multiplication in place.
float determinant () const
 Compute the determinant of the matrix.
Matrix inverse () const
 Compute the inverse of the matrix.

Protected Attributes

float e [16]
 The matrix elements.

Friends

Matrix operator * (float s, const Matrix &m)
 Multiplication of sclar by matrix.
std::ostream & operator<< (std::ostream &os, const Matrix &A)
 Write matrix elements to an output stream.


Detailed Description

Class representing a 4x4 transformation matrix.


The documentation for this class was generated from the following files:
Generated on Tue Mar 14 09:46:38 2006 for ASR by  doxygen 1.4.4