class Matrix

Manipulation with 4x4 matrices

Public Fields

float x[4][4]
Direct accessto matrix components

Public

Constructor
Matrix()
Elements are not initialized
Binary operations
Matrix& operator+= (const Matrix& A)
add-to
Matrix& operator-= (const Matrix& A)
subtract-from
Matrix& operator*= (const Matrix& A)
multiply by matrix
Matrix& operator*= (float A)
scale by scalar
friend Matrix operator+ (const Matrix& A, const Matrix& B)
friend Matrix operator- (const Matrix& A, const Matrix& B)
friend Matrix operator* (const Matrix& A, float B)
friend Matrix operator* (const Matrix& A, const Matrix& B)
Basic matrix operations
void Invert()
Invert the matrix
void Transpose()
Transpose the matrix
void Adjoint()
Compute an adjoint matrix
friend Matrix Invert(const Matrix& M)
Invert a given matrix
friend Matrix Transpose(const Matrix& M)
Transpose a given matrix
friend Matrix Adjoint(const Matrix& M)
Compute an adjoint matrix
Special matrices
friend Matrix IdentityMatrix()
friend Matrix ZeroMatrix()
friend Matrix TranslationMatrix(const Vector3D& Location)
friend Matrix RotationXMatrix(float Angle)
friend Matrix RotationYMatrix(float Angle)
friend Matrix RotationZMatrix(float Angle)
friend Matrix RotationYPRMatrix(float Yaw, float Pitch, float Roll)
friend Matrix RotationAxisMatrix(const Vector3D& axis, float Angle)
Generate matrix for rotation around an arbitrary axis
friend Matrix ScaleMatrix(float X, float Y, float Z)
Scale the matrix
friend Matrix GenRotation(const Vector3D& x, const Vector3D& y, const Vector3D& z)
Generate a rotation matrix
friend Matrix MirrorX()
Mirror in X direction
friend Matrix MirrorY()
Mirror in Y direction
friend Matrix MirrorZ()
Mirror in Z direction
friend Matrix RotationOnly(const Matrix& x)
Extract rotation part of a matrix
friend Matrix ViewMatrix(const Vector3D& LookAt, const Vector3D& Viewer, const Vector3D& Up)
Generate a viewing matrix
friend Matrix QuadricMatrix(float a, float b, float c, float d, float e, float f, float g, float h, float j, float k)
Generate matrix for a quadric object. Used by OORT
Vector transforms
friend class Vector3D operator* const Matrix& M const Vector3D& v
Transform a vector
friend class Vector3D RotateOnly const Matrix& M const Vector3D& v
Apply only rotation part to a vector
friend class Vector3D RotateAndScaleOnly const Matrix& M const Vector3D& v
Rotate and scala onlye
Other messages
friend ostream& operator<< (ostream& s, const Matrix& M)
Overloaded output operator.
Compute determinants
float det4x4(void) const
A 4x4 determinant
friend float det4x4(Matrix const &m)
A 4x4 determinant

Documentation

Manipulation with 4x4 matrices.

Include file: matrix.h

Adopted from: The Object-Oriented Ray Tracer (OORT) Copyright (C) 1993 by Nicholas Wilt.

float x[4][4]
Direct accessto matrix components

Constructor

Matrix()
Elements are not initialized

Binary operations

Matrix& operator+= (const Matrix& A)
add-to

Matrix& operator-= (const Matrix& A)
subtract-from

Matrix& operator*= (const Matrix& A)
multiply by matrix

Matrix& operator*= (float A)
scale by scalar

friend Matrix operator+ (const Matrix& A, const Matrix& B)

friend Matrix operator- (const Matrix& A, const Matrix& B)

friend Matrix operator* (const Matrix& A, float B)

friend Matrix operator* (const Matrix& A, const Matrix& B)

Basic matrix operations

void Invert()
Invert the matrix

void Transpose()
Transpose the matrix

void Adjoint()
Compute an adjoint matrix

friend Matrix Invert(const Matrix& M)
Invert a given matrix

friend Matrix Transpose(const Matrix& M)
Transpose a given matrix

friend Matrix Adjoint(const Matrix& M)
Compute an adjoint matrix

Special matrices

friend Matrix IdentityMatrix()

friend Matrix ZeroMatrix()

friend Matrix TranslationMatrix(const Vector3D& Location)

friend Matrix RotationXMatrix(float Angle)

friend Matrix RotationYMatrix(float Angle)

friend Matrix RotationZMatrix(float Angle)

friend Matrix RotationYPRMatrix(float Yaw, float Pitch, float Roll)

friend Matrix RotationAxisMatrix(const Vector3D& axis, float Angle)
Generate matrix for rotation around an arbitrary axis

friend Matrix ScaleMatrix(float X, float Y, float Z)
Scale the matrix

friend Matrix GenRotation(const Vector3D& x, const Vector3D& y, const Vector3D& z)
Generate a rotation matrix

friend Matrix MirrorX()
Mirror in X direction

friend Matrix MirrorY()
Mirror in Y direction

friend Matrix MirrorZ()
Mirror in Z direction

friend Matrix RotationOnly(const Matrix& x)
Extract rotation part of a matrix

friend Matrix ViewMatrix(const Vector3D& LookAt, const Vector3D& Viewer, const Vector3D& Up)
Generate a viewing matrix

friend Matrix QuadricMatrix(float a, float b, float c, float d, float e, float f, float g, float h, float j, float k)
Generate matrix for a quadric object. Used by OORT

Vector transforms

friend class Vector3D operator* const Matrix& M const Vector3D& v
Transform a vector

friend class Vector3D RotateOnly const Matrix& M const Vector3D& v
Apply only rotation part to a vector

friend class Vector3D RotateAndScaleOnly const Matrix& M const Vector3D& v
Rotate and scala onlye

Other messages

friend ostream& operator<< (ostream& s, const Matrix& M)
Overloaded output operator.

Compute determinants

float det4x4(void) const
A 4x4 determinant

friend float det4x4(Matrix const &m)
A 4x4 determinant


This class has no child classes.
Author:
Nicholas Wilt and Milos Sramek
Version:
1.0

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de