Math::Matrix Class Reference

#include <Matrix.hh>

Inheritance diagram for Math::Matrix:

Inheritance graph
[legend]
Collaboration diagram for Math::Matrix:

Collaboration graph
[legend]

List of all members.


Detailed Description

Operations on matrices.

Using this class we can implement various functions which define various 3D tranformations, which can by then combined by a single multiplication of their matrices and then applied to vectors -- also by a means of multiplication.

Definition at line 36 of file Matrix.hh.


Public Member Functions

void Zero ()
void LoadIdentity ()
Double GetXY (Int x, Int y) const
void SetXY (Int x, Int y, Double D)
void Set (Double(&D)[16])
void Set (const Matrix &M)
void Multiply (const Matrix &M2)
Double operator! () const
Matrix operator+ (const Matrix &M) const
Matrix operator- (const Matrix &M) const
Matrix operator* (const Matrix &M) const
void operator= (const Matrix &M)
Double operator[] (Int i) const

Protected Attributes

Double D [16]

Friends

std::ostream & operator<< (std::ostream &os, const Matrix &M)

Member Function Documentation

void Math::Matrix::Zero (  ) 

Fill matrix with zeroes.

Definition at line 22 of file Matrix.cc.

References D.

void Math::Matrix::LoadIdentity (  ) 

Reset to identity matrix.

Definition at line 45 of file Matrix.cc.

References D.

Referenced by Math::Transform::Resize(), Math::Transform::RotateX(), Math::Transform::RotateY(), Math::Transform::RotateZ(), Math::Transform::Transform(), and Math::Transform::Translate().

Here is the caller graph for this function:

Double Math::Matrix::GetXY ( Int  x,
Int  y 
) const

Read specified matrix element.

See also:
SetXY
Parameters:
x column number
y row number
Returns:
matrix element

Definition at line 66 of file Matrix.cc.

References D.

void Math::Matrix::SetXY ( Int  x,
Int  y,
Double  D 
)

Set specified matrix element.

See also:
GetXY
Parameters:
x column number
y row number
D value to set

Definition at line 56 of file Matrix.cc.

Referenced by Math::Transform::Resize(), Math::Transform::RotateX(), Math::Transform::RotateY(), Math::Transform::RotateZ(), and Math::Transform::Translate().

Here is the caller graph for this function:

void Math::Matrix::Set ( Double(&)  D[16]  ) 

Set all elements from an array

Definition at line 76 of file Matrix.cc.

References D.

Referenced by Multiply(), and Math::Transform::Transform().

Here is the caller graph for this function:

void Math::Matrix::Set ( const Matrix M  ) 

Set all elements from another matrix

Definition at line 81 of file Matrix.cc.

References D.

void Math::Matrix::Multiply ( const Matrix M2  ) 

Multiplication "in place" of matrix

Definition at line 86 of file Matrix.cc.

References D, and Set().

Here is the call graph for this function:

Double Math::Matrix::operator! (  )  const

Returns:
determinant of a matrix

Definition at line 131 of file Matrix.cc.

References D.

Matrix Math::Matrix::operator+ ( const Matrix M  )  const

Matrix addition

Definition at line 153 of file Matrix.cc.

References D.

Matrix Math::Matrix::operator- ( const Matrix M  )  const

Matrix substraction

Definition at line 161 of file Matrix.cc.

References D.

Matrix Math::Matrix::operator* ( const Matrix M  )  const

Matrix multiplication

Definition at line 174 of file Matrix.cc.

References D.

void Math::Matrix::operator= ( const Matrix M  ) 

See also:
Set

Definition at line 169 of file Matrix.cc.

References D.

Double Math::Matrix::operator[] ( Int  i  )  const

Provides read-only access to the internal matrix representation.

It's used in Vector class for vector by matrix multiplication

Parameters:
i matrix element in row-major order

Definition at line 221 of file Matrix.cc.

References D.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const Matrix M 
) [friend]

Pretty-printer

Definition at line 28 of file Matrix.cc.


Member Data Documentation

Double Math::Matrix::D[16] [protected]

Matrix internal representation in row-major order

Definition at line 39 of file Matrix.hh.

Referenced by GetXY(), LoadIdentity(), Multiply(), operator!(), operator*(), operator+(), operator-(), Math::operator<<(), operator=(), operator[](), Set(), and Zero().


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

Generated on Wed Mar 12 00:35:18 2008 for blaRAY by  doxygen 1.5.5