The Fast Light Environment Kit



class FMatrix4x4

Class Hierarchy

FBase
   |
   +----FMatrix4x4

Include Files

#include <Flek/FMatrix4x4.H>

Description

Class for a 4x4 matrix. Built from Vector4d Row-major form is used. (ie) each row of the matrix is a Vector3d. This makes inversion easier, since elementary row operations are simplified

Methods


Method Descriptions

FBase

virtual FMatrix4x4::FBase(void);

Make a copy of the object implement FBase class pure virtual function

FMatrix4x4

FMatrix4x4::FMatrix4x4();

Default constructor - creates an identity matrix.

FMatrix4x4::FMatrix4x4(double scalar);

1 argument constructor - from scalar, set all elements to given value

FMatrix4x4::FMatrix4x4(const FVector4& r0, const FVector4& r1, const FVector4& r2, const FVector4& r3);

4 argument constructor - from 4 FVector4s

FMatrix4x4::FMatrix4x4(const FMatrix4x4& mat);

Copy constructor

FMatrix4x4::FMatrix4x4(const FMatrix3x3& mat3);

Constructor from a 3x3 matrix

I

static FMatrix4x4 FMatrix4x4::I(void);

Class member functions which return the identity matrix

cofactor

FMatrix3x3 FMatrix4x4::cofactor(uint r, uint c);

Find the 3x3 sub-matrix which is the co-factor for the given element

copy_from

void FMatrix4x4::copy_from(const FMatrix4x4& mat);

Copy values from another matrix

void FMatrix4x4::copy_from(const FMatrix3x3& mat3);

Copy from a 3x3 matrix. 4th row and column elements are all set to 0

fill_array_column_major

void FMatrix4x4::fill_array_column_major(double array[16]);

Fill an array with contents of the matrix Row - major form -> Column 1 == { array[0], array[1], array[2], array[3] }

fill_array_row_major

void FMatrix4x4::fill_array_row_major(double array[16]);

Fill an array with contents of the matrix Row - major form -> Row 1 == { array[0], array[1], array[2], array[3] }

identity

static FMatrix4x4 FMatrix4x4::identity(void);

Class member functions which return the identity matrix

invert

void FMatrix4x4::invert(void);

Invert the matrix. Using elementary row operations

friend FMatrix4x4 FMatrix4x4::invert(const FMatrix4x4& mat);

Find the inverse of a given matrix using elementary row operations

operator *

friend FMatrix4x4 FMatrix4x4::operator * (const FMatrix4x4& mat, double scalar);

Post-multiplication by a scalar.

friend FMatrix4x4 FMatrix4x4::operator * (double scalar, const FMatrix4x4& mat);

Pre-multiplication by a scalar.

friend FMatrix4x4 FMatrix4x4::operator * (const FMatrix4x4& mat1, const FMatrix4x4& mat2);

Multiplication of 2 matrices - outer product.

friend FVector4 FMatrix4x4::operator * (const FMatrix4x4& mat, const FVector4& vec);

Post-multiplication by a FVector4. Vector is assumed to be a column vector.

friend FVector4 FMatrix4x4::operator * (const FVector4& vec, const FMatrix4x4& mat);

Pre-multiplication by a FVector4. Vector is assumed to be a row vector.

operator *=

void FMatrix4x4::operator *=(const FMatrix4x4& mat);

Multiply self with another matrix. Simply calls above defined friend function.

operator -

friend FMatrix4x4 FMatrix4x4::operator -(const FMatrix4x4& mat);

Negation

operator /

friend FMatrix4x4 FMatrix4x4::operator /(const FMatrix4x4& mat, double scalar);

Division by a scalar.

operator =

FMatrix4x4& FMatrix4x4::operator =(const FMatrix4x4& mat);

Assignment operator

FMatrix4x4& FMatrix4x4::operator =(const FMatrix3x3& mat3);

Assignment from a FMatrix3x3

void FMatrix4x4::operator =(double scalar);

Assignment from a scalar

operator []

FVector4& FMatrix4x4::operator [] (uint index);

Access a row of the matrix - no range checks.

const FVector4& FMatrix4x4::operator [] (uint index);

Access a row of the matrix - no range checks : const version

operator ^

friend FMatrix4x4 FMatrix4x4::operator ^(const FVector4& v1, const FVector4& v2);

Multiplication of two FVector4s to produce a FMatrix4x4 - outer product or tensor product of two Vectors. Same as multiplying row vector (v1) with column vector (v2)

product

friend FMatrix4x4 FMatrix4x4::product(const FMatrix4x4& mat1, const FMatrix4x4& mat2);

Element-by-element multiplication of 2 matrices.

reset

void FMatrix4x4::reset(void);

Reset the matrix to it's default state - identity

set

void FMatrix4x4::set(const FVector4& r0, const FVector4& r1, const FVector4& r2, const FVector4& r3);

Set the rows of the matrix to the given FVector4s

transpose

friend FMatrix4x4 FMatrix4x4::transpose(const FMatrix4x4& mat);

Find the transpose of a given matrix.

~FMatrix4x4

virtual FMatrix4x4::~FMatrix4x4();

Destructor

© 2000 the Flek Development team.
Generated by ScanDoc
Last Updated: Tue May 15 8:50:06 2001