GVectors::Matrix4x4 Class Reference

A 4x4 matrix. More...

#include <matrix4x4.h>

Inheritance diagram for GVectors::Matrix4x4:

GVectors::Matrix List of all members.

Public Member Functions

 Matrix4x4 ()
 Constructor.
 Matrix4x4 (const Matrix4x4 &m)
 Copy constructor.
const Matrix4x4operator= (const Matrix4x4 &m)
 Assignment operator.
 ~Matrix4x4 ()
 Destructor.
void operator() (matindex_t r, matindex_t c, double v)
 Shorthand operator for setting values.
double operator() (matindex_t r, matindex_t c) const
 Shorthand operator for getting values.
Matrix4x4 operator+ (const Matrix4x4 &m) const
 Addition operator.
Matrix4x4 operator- (const Matrix4x4 &m) const
 Subtraction operator.
Matrix4x4 operator * (const Matrix4x4 &m) const
 Multiplication operator for Matrix4x4 classes.
Matrix4x1 operator * (const Matrix4x1 &m) const
 Multiplication operator for Matrix4x1 classes.
Matrix4x4 operator * (const double v) const
 Multiplication operator for scaler values.
Matrix4x4 operator/ (const double v) const
 Scalar division operator.
Matrix4x4operator+= (const Matrix4x4 &m)
 Shorthand addition and assignment.
Matrix4x4operator *= (const Matrix4x4 &m)
 classes.
Matrix4x4operator *= (const double v)
 Shorthand multiplication and assignment for scalar values.
Matrix4x4operator/= (const double v)
 Shorthand division and assignment for scalar values.
bool operator== (const Matrix4x4 &m) const
 Equality operator.
bool operator!= (const Matrix4x4 &m) const
 Inequality operator.

Detailed Description

The 4x4 matrix used to transform the vectors in the 3D space.


Constructor & Destructor Documentation

GVectors::Matrix4x4::Matrix4x4 (  )  [inline]

Initializes the matrix to a 4x4 matrix.

GVectors::Matrix4x4::Matrix4x4 ( const Matrix4x4 m  )  [inline]

Copy constructor.

Parameters:
m A const reference to a Matrix4x4.

GVectors::Matrix4x4::~Matrix4x4 (  )  [inline]

Does nothing. Just for completeness.


Member Function Documentation

const Matrix4x4 & Matrix4x4::operator= ( const Matrix4x4 m  ) 

Assigns another Matrix4x4 to this. The dimensions have to be identical, else an exception is thrown.

Parameters:
m A const reference to a Matrix4x4 object.
Exceptions:
GVEInvalidMDimension if the dimensions of the matrices are not identical.

void GVectors::Matrix4x4::operator() ( matindex_t  r,
matindex_t  c,
double  v 
) [inline]

Shorthand operator for setting values.

Parameters:
r Row index.
c Column index.
v Value to set at the given position.

double GVectors::Matrix4x4::operator() ( matindex_t  r,
matindex_t  c 
) const [inline]

Shorthand operator for getting values.

Parameters:
r Row index.
c Column index.
Returns:
The value at the given position.

Matrix4x4 Matrix4x4::operator+ ( const Matrix4x4 m  )  const

Adds another Matrix4x4 to this matrix.

Parameters:
m A const reference to a Matrix4x4 object.
Returns:
A Matrix4x4 holding the sum.

Matrix4x4 Matrix4x4::operator- ( const Matrix4x4 m  )  const

Subtracts another Matrix4x4 from this matrix.

Parameters:
m A const reference to a Matrix4x4 object.
Returns:
A Matrix4x4 holding the difference.

Matrix4x4 Matrix4x4::operator * ( const Matrix4x4 m  )  const

Multiplies another Matrix4x4 by this matrix.

Parameters:
m A const reference to a Matrix4x4 object.
Returns:
A Matrix4x4 holding the product.

Matrix4x1 Matrix4x4::operator * ( const Matrix4x1 m  )  const

Multiplies a Matrix4x1 by this matrix.

Parameters:
m A const reference to a Matrix4x1 object.
Returns:
A Matrix4x1 holding the product.

Matrix4x4 Matrix4x4::operator * ( const double  v  )  const

Multiplies a scalar value by this matrix.

Parameters:
v A scalar value.
Returns:
A Matrix4x4 holding the product.

Matrix4x4 GVectors::Matrix4x4::operator/ ( const double  v  )  const [inline]

Performs a division by multiplying with the reciprocal value of v.

Parameters:
v The dividend.
Returns:
A Matrix4x4 representing the result of the division.

Matrix4x4 & Matrix4x4::operator+= ( const Matrix4x4 m  ) 

Shorthand addition assignment operator.

Parameters:
m A const reference to a Matrix4x4 object.
Returns:
A const reference to this holding the sum.

Matrix4x4 & Matrix4x4::operator *= ( const Matrix4x4 m  ) 

Shorthand multiplication assignment operator.

Parameters:
m A const reference to a Matrix4x4 object.
Returns:
A const reference to this holding the product.

Matrix4x4 & Matrix4x4::operator *= ( const double  v  ) 

Shorthand multiplication assignment operator for scalar values.

Parameters:
v A scaler value.
Returns:
A const reference to this holding the product.

Matrix4x4 & Matrix4x4::operator/= ( const double  v  ) 

Shorthand division assignment operator for scalar values.

Parameters:
v A scaler value.
Returns:
A const reference to this holding the ratio.

bool Matrix4x4::operator== ( const Matrix4x4 m  )  const

Tests two Matrix4x4 for equality.

Parameters:
m A const reference to a Matrix4x4 object.
Returns:
A boolean value indicating whether or not the matrices are equal.
Return values:
true The matrices are equal.
false The matrices are not equal.

bool GVectors::Matrix4x4::operator!= ( const Matrix4x4 m  )  const [inline]

Tests two Matrix4x4 for inequality.

Parameters:
m The Matrix4x4 to be tested for inequality.
Returns:
A boolean value indicating whether or not the matrices are inequal.
Return values:
true The matrices are inequal.
false The matrices are not inequal.


The documentation for this class was generated from the following files:
Generated on Sat Sep 8 19:37:30 2007 for libgvectors by  doxygen 1.4.7