CrystalSpace

Public API Reference

CS::Math::Matrix4 Class Reference

A 4x4 matrix. More...

#include <csgeom/matrix4.h>

List of all members.

Public Member Functions

csVector4 Col (size_t n) const
 Get a column from this matrix as a vector.
csVector4 Col1 () const
 Get the first column of this matrix as a vector.
csVector4 Col2 () const
 Get the second column of this matrix as a vector.
csVector4 Col3 () const
 Get the third column of this matrix as a vector.
csVector4 Col4 () const
 Get the third column of this matrix as a vector.
csString Description () const
 Return a textual representation of the matrix.
float Determinant () const
 Compute determinant of this matrix.
Matrix4 GetInverse () const
 Return the inverse of this matrix.
csTransform GetTransform () const
 Return a csTransform object representation of the matrix.
Matrix4 GetTranspose () const
 Return the transpose of this matrix.
void Invert ()
 Invert this matrix.
 Matrix4 (csMatrix3 const &m)
 Construct from a 3x3 matrix.
 Matrix4 (csTransform const &o)
 Construct from a transform.
 Matrix4 (Matrix4 const &o)
 Copy constructor.
 Matrix4 (float am11, float am12, float am13, float am14, float am21, float am22, float am23, float am24, float am31, float am32, float am33, float am34, float am41, float am42, float am43, float am44)
 Construct a matrix and initialize it.
 Matrix4 ()
 Construct a matrix, initialized to be the identity.
csVector4 operator* (const csVector4 &v) const
 Multiply matrix with a Vector.
Matrix4operator*= (float f)
 Scale complete matrix.
Matrix4operator/= (float f)
 Scale complete matrix.
Matrix4operator= (const Matrix4 &o)
 Assign another matrix to this one.
csVector4 Row (size_t n) const
 Get a row from this matrix as a vector.
csVector4 Row1 () const
 Get the first row of this matrix as a vector.
csVector4 Row2 () const
 Get the second row of this matrix as a vector.
csVector4 Row3 () const
 Get the third row of this matrix as a vector.
csVector4 Row4 () const
 Get the third row of this matrix as a vector.
void Transpose ()
 Transpose this matrix.

Friends

Matrix4 operator* (const Matrix4 &m1, const Matrix4 &m2)
 Multiply two matrices.

Detailed Description

A 4x4 matrix.

Definition at line 43 of file matrix4.h.


Constructor & Destructor Documentation

CS::Math::Matrix4::Matrix4 (  )  [inline]

Construct a matrix, initialized to be the identity.

Definition at line 53 of file matrix4.h.

CS::Math::Matrix4::Matrix4 ( float  am11,
float  am12,
float  am13,
float  am14,
float  am21,
float  am22,
float  am23,
float  am24,
float  am31,
float  am32,
float  am33,
float  am34,
float  am41,
float  am42,
float  am43,
float  am44 
) [inline]

Construct a matrix and initialize it.

Definition at line 61 of file matrix4.h.

CS::Math::Matrix4::Matrix4 ( Matrix4 const &  o  )  [inline]

Copy constructor.

Definition at line 72 of file matrix4.h.

CS::Math::Matrix4::Matrix4 ( csTransform const &  o  )  [inline]

Construct from a transform.

Definition at line 81 of file matrix4.h.

CS::Math::Matrix4::Matrix4 ( csMatrix3 const &  m  )  [inline]

Construct from a 3x3 matrix.

Definition at line 94 of file matrix4.h.


Member Function Documentation

csVector4 CS::Math::Matrix4::Col ( size_t  n  )  const [inline]

Get a column from this matrix as a vector.

Definition at line 146 of file matrix4.h.

csVector4 CS::Math::Matrix4::Col1 (  )  const [inline]

Get the first column of this matrix as a vector.

Definition at line 134 of file matrix4.h.

csVector4 CS::Math::Matrix4::Col2 (  )  const [inline]

Get the second column of this matrix as a vector.

Definition at line 137 of file matrix4.h.

csVector4 CS::Math::Matrix4::Col3 (  )  const [inline]

Get the third column of this matrix as a vector.

Definition at line 140 of file matrix4.h.

csVector4 CS::Math::Matrix4::Col4 (  )  const [inline]

Get the third column of this matrix as a vector.

Definition at line 143 of file matrix4.h.

csString CS::Math::Matrix4::Description (  )  const

Return a textual representation of the matrix.

float CS::Math::Matrix4::Determinant (  )  const [inline]

Compute determinant of this matrix.

Definition at line 201 of file matrix4.h.

Matrix4 CS::Math::Matrix4::GetInverse (  )  const [inline]

Return the inverse of this matrix.

Definition at line 212 of file matrix4.h.

csTransform CS::Math::Matrix4::GetTransform (  )  const

Return a csTransform object representation of the matrix.

Matrix4 CS::Math::Matrix4::GetTranspose (  )  const [inline]

Return the transpose of this matrix.

Definition at line 250 of file matrix4.h.

void CS::Math::Matrix4::Invert (  )  [inline]

Invert this matrix.

Definition at line 239 of file matrix4.h.

csVector4 CS::Math::Matrix4::operator* ( const csVector4 v  )  const [inline]

Multiply matrix with a Vector.

Definition at line 191 of file matrix4.h.

Matrix4& CS::Math::Matrix4::operator*= ( float  f  )  [inline]

Scale complete matrix.

Definition at line 170 of file matrix4.h.

Matrix4& CS::Math::Matrix4::operator/= ( float  f  )  [inline]

Scale complete matrix.

Definition at line 180 of file matrix4.h.

Matrix4& CS::Math::Matrix4::operator= ( const Matrix4 o  )  [inline]

Assign another matrix to this one.

Definition at line 167 of file matrix4.h.

csVector4 CS::Math::Matrix4::Row ( size_t  n  )  const [inline]

Get a row from this matrix as a vector.

Definition at line 121 of file matrix4.h.

csVector4 CS::Math::Matrix4::Row1 (  )  const [inline]

Get the first row of this matrix as a vector.

Definition at line 109 of file matrix4.h.

csVector4 CS::Math::Matrix4::Row2 (  )  const [inline]

Get the second row of this matrix as a vector.

Definition at line 112 of file matrix4.h.

csVector4 CS::Math::Matrix4::Row3 (  )  const [inline]

Get the third row of this matrix as a vector.

Definition at line 115 of file matrix4.h.

csVector4 CS::Math::Matrix4::Row4 (  )  const [inline]

Get the third row of this matrix as a vector.

Definition at line 118 of file matrix4.h.

void CS::Math::Matrix4::Transpose (  )  [inline]

Transpose this matrix.

Definition at line 242 of file matrix4.h.


Friends And Related Function Documentation

Matrix4 operator* ( const Matrix4 m1,
const Matrix4 m2 
) [friend]

Multiply two matrices.


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

Generated for Crystal Space 2.0 by doxygen 1.6.1