rcrt::Matrix4D Class Reference

#include <Matrix4D.h>

List of all members.

Public Member Functions

 Matrix4D ()
 Matrix4D (float x)
 Matrix4D (const Matrix4D &mat)
virtual ~Matrix4D ()
const Matrix4Doperator= (const Matrix4D &mat)
const Matrix4Doperator= (float mat[4][4])
Matrix4D operator+ (const Matrix4D &mat) const
Matrix4D operator- (const Matrix4D &mat) const
Matrix4D operator * (const Matrix4D &mat) const
HCoord4D operator * (const HCoord4D &coords) const
Point3D operator * (const Point3D &p) const
Vec3D operator * (const Vec3D &p) const
Matrix4D operator * (const float f) const
Matrix4D operator/ (const float f) const
Vec4D operator[] (const int &i) const
Matrix4D transpose () const
Matrix4D inverse () const

Static Public Member Functions

static Matrix4D identity ()
static Matrix4D rotation (float angle, const Vec3D &axis)
static Matrix4D translation (const Vec3D &vec)
static Matrix4D getOrthoNormalBasis (const Vec3D &n, const Vec3D &v)

Private Member Functions

void assign (const Matrix4D &mat)

Static Private Member Functions

static void swap (float mat[4][4], int &i, int &ci)
static void div (float mat[4][4], int &i, float &factor)
static void res (float mat[4][4], int &i, int &b, float &factor)

Private Attributes

float values [4][4]

Friends

std::ostream & operator<< (std::ostream &out, const Matrix4D &m)


Detailed Description

Definition at line 13 of file Matrix4D.h.


Constructor & Destructor Documentation

rcrt::Matrix4D::Matrix4D (  ) 

Definition at line 9 of file Matrix4D.cpp.

References values.

rcrt::Matrix4D::Matrix4D ( float  x  ) 

Definition at line 17 of file Matrix4D.cpp.

References values.

rcrt::Matrix4D::Matrix4D ( const Matrix4D mat  ) 

Definition at line 25 of file Matrix4D.cpp.

References assign().

rcrt::Matrix4D::~Matrix4D (  )  [virtual]

Definition at line 153 of file Matrix4D.cpp.


Member Function Documentation

void rcrt::Matrix4D::assign ( const Matrix4D mat  )  [private]

Definition at line 31 of file Matrix4D.cpp.

References values.

Referenced by Matrix4D(), and operator=().

void rcrt::Matrix4D::swap ( float  mat[4][4],
int &  i,
int &  ci 
) [inline, static, private]

Definition at line 168 of file Matrix4D.cpp.

Referenced by inverse().

void rcrt::Matrix4D::div ( float  mat[4][4],
int &  i,
float &  factor 
) [inline, static, private]

Definition at line 177 of file Matrix4D.cpp.

Referenced by inverse().

void rcrt::Matrix4D::res ( float  mat[4][4],
int &  i,
int &  b,
float &  factor 
) [inline, static, private]

Definition at line 189 of file Matrix4D.cpp.

Referenced by inverse().

const Matrix4D & rcrt::Matrix4D::operator= ( const Matrix4D mat  ) 

Definition at line 40 of file Matrix4D.cpp.

References assign().

const Matrix4D & rcrt::Matrix4D::operator= ( float  mat[4][4]  ) 

Definition at line 47 of file Matrix4D.cpp.

References values.

Matrix4D rcrt::Matrix4D::operator+ ( const Matrix4D mat  )  const

Definition at line 57 of file Matrix4D.cpp.

References values.

Matrix4D rcrt::Matrix4D::operator- ( const Matrix4D mat  )  const

Definition at line 68 of file Matrix4D.cpp.

References values.

Matrix4D rcrt::Matrix4D::operator * ( const Matrix4D mat  )  const

Definition at line 79 of file Matrix4D.cpp.

References values.

HCoord4D rcrt::Matrix4D::operator * ( const HCoord4D coords  )  const

Definition at line 93 of file Matrix4D.cpp.

References values, rcrt::HCoord4D::w(), rcrt::HCoord4D::x(), rcrt::HCoord4D::y(), and rcrt::HCoord4D::z().

Point3D rcrt::Matrix4D::operator * ( const Point3D p  )  const

Definition at line 105 of file Matrix4D.cpp.

References values, rcrt::Point3D::x(), rcrt::Point3D::y(), and rcrt::Point3D::z().

Vec3D rcrt::Matrix4D::operator * ( const Vec3D p  )  const

Definition at line 117 of file Matrix4D.cpp.

References values, rcrt::Vec3D::x(), rcrt::Vec3D::y(), and rcrt::Vec3D::z().

Matrix4D rcrt::Matrix4D::operator * ( const float  f  )  const

Definition at line 127 of file Matrix4D.cpp.

References values.

Matrix4D rcrt::Matrix4D::operator/ ( const float  f  )  const

Definition at line 138 of file Matrix4D.cpp.

Vec4D rcrt::Matrix4D::operator[] ( const int &  i  )  const

Parameters:
i The index of the column.
Returns:
The ith column vector of this matrix.

Definition at line 147 of file Matrix4D.cpp.

References values.

Matrix4D rcrt::Matrix4D::transpose (  )  const

Definition at line 158 of file Matrix4D.cpp.

References values.

Referenced by rcrt::SolidObject::normalToLocal(), and rcrt::SolidObject::normalToWorld().

Matrix4D rcrt::Matrix4D::inverse (  )  const

Definition at line 198 of file Matrix4D.cpp.

References div(), identity(), res(), swap(), and values.

Referenced by rcrt::SolidObject::setWorldMatrix(), and rcrt::AffineObject::setWorldMatrix().

static Matrix4D rcrt::Matrix4D::identity (  )  [inline, static]

Definition at line 50 of file Matrix4D.h.

References values.

Referenced by rcrt::AreaLight::AreaLight(), rcrt::DynamicObject::DynamicObject(), and inverse().

static Matrix4D rcrt::Matrix4D::rotation ( float  angle,
const Vec3D axis 
) [inline, static]

Definition at line 60 of file Matrix4D.h.

References values, rcrt::Vec3D::x(), rcrt::Vec3D::y(), and rcrt::Vec3D::z().

static Matrix4D rcrt::Matrix4D::translation ( const Vec3D vec  )  [inline, static]

Definition at line 95 of file Matrix4D.h.

References values, rcrt::Vec3D::x(), rcrt::Vec3D::y(), and rcrt::Vec3D::z().

static Matrix4D rcrt::Matrix4D::getOrthoNormalBasis ( const Vec3D n,
const Vec3D v 
) [inline, static]

Definition at line 109 of file Matrix4D.h.

References rcrt::Vec3D::crossP(), values, rcrt::Vec3D::x(), rcrt::Vec3D::y(), and rcrt::Vec3D::z().

Referenced by rcrt::Material::getShadingNormal().


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const Matrix4D m 
) [friend]

Definition at line 136 of file Matrix4D.h.


Member Data Documentation

float rcrt::Matrix4D::values[4][4] [private]

Definition at line 18 of file Matrix4D.h.

Referenced by assign(), getOrthoNormalBasis(), identity(), inverse(), Matrix4D(), operator *(), operator+(), operator-(), rcrt::operator<<(), operator=(), operator[](), rotation(), translation(), and transpose().


The documentation for this class was generated from the following files:
Generated on Thu Jan 31 19:32:54 2008 for RenderingCompetitionRayTracer by  doxygen 1.5.3