#include <Matrix4D.h>
Public Member Functions | |
Matrix4D () | |
Matrix4D (float x) | |
Matrix4D (const Matrix4D &mat) | |
virtual | ~Matrix4D () |
const Matrix4D & | operator= (const Matrix4D &mat) |
const Matrix4D & | operator= (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) |
Definition at line 13 of file Matrix4D.h.
rcrt::Matrix4D::Matrix4D | ( | ) |
rcrt::Matrix4D::Matrix4D | ( | float | x | ) |
rcrt::Matrix4D::Matrix4D | ( | const Matrix4D & | mat | ) |
rcrt::Matrix4D::~Matrix4D | ( | ) | [virtual] |
Definition at line 153 of file Matrix4D.cpp.
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] |
void rcrt::Matrix4D::div | ( | float | mat[4][4], | |
int & | i, | |||
float & | factor | |||
) | [inline, static, private] |
void rcrt::Matrix4D::res | ( | float | mat[4][4], | |
int & | i, | |||
int & | b, | |||
float & | factor | |||
) | [inline, static, private] |
const Matrix4D & rcrt::Matrix4D::operator= | ( | float | mat[4][4] | ) |
Definition at line 93 of file Matrix4D.cpp.
References values, rcrt::HCoord4D::w(), rcrt::HCoord4D::x(), rcrt::HCoord4D::y(), and rcrt::HCoord4D::z().
Definition at line 105 of file Matrix4D.cpp.
References values, rcrt::Point3D::x(), rcrt::Point3D::y(), and rcrt::Point3D::z().
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 |
Matrix4D rcrt::Matrix4D::operator/ | ( | const float | f | ) | const |
Definition at line 138 of file Matrix4D.cpp.
Vec4D rcrt::Matrix4D::operator[] | ( | const int & | i | ) | const |
i | The index of the column. |
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().
Definition at line 60 of file Matrix4D.h.
References values, rcrt::Vec3D::x(), rcrt::Vec3D::y(), and rcrt::Vec3D::z().
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().
std::ostream& operator<< | ( | std::ostream & | out, | |
const Matrix4D & | m | |||
) | [friend] |
Definition at line 136 of file Matrix4D.h.
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().