The Fast Light Environment Kit



class FMatrix3x3

Class Hierarchy

FBase
   |
   +----FMatrix3x3

Include Files

#include <Flek/FMatrix3x3.H>

Description

Class for a 3x3 matrix. Built from Vector3d 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


Variable Descriptions

FVector3 row[3];

3 rows of the matrix

Method Descriptions

FMatrix3x3

FMatrix3x3::FMatrix3x3();

Default constructor - creates an identity matrix.

FMatrix3x3::FMatrix3x3(double scalar);

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

FMatrix3x3::FMatrix3x3(const FVector3& r0, const FVector3& r1, const FVector3& r2);

Three argument constructor - from 3 FVector3s.

FMatrix3x3::FMatrix3x3(const FMatrix3x3& mat);

Copy constructor.

I

static FMatrix3x3 FMatrix3x3::I(void);

Creates the identity matrix.

Return Value
The identity matrix.

copy_from

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

Copy values from another matrix.

determinant

friend double FMatrix3x3::determinant(const FMatrix3x3& mat);

Finds the determinant of a given matrix.

Parameters
matThe source matrix.

Return Value
The detrminant of the source matrix.

identity

static FMatrix3x3 FMatrix3x3::identity();

Creates the identity matrix.

Return Value
The identity matrix.

invert

void FMatrix3x3::invert(void);

Inverts this matrix, using elementary row operations.

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

Find the inverse of a given matrix using elementary row operations.

Parameters
matThe source matrix.

Return Value
The inverse of the source matrix.

operator *

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

Post-multiplication by a scalar.

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

Pre-multiplication by a scalar.

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

Multiplication of 2 matrices - outer product.

friend FVector3 FMatrix3x3::operator * (const FMatrix3x3& mat, const FVector3& vec);

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

friend FVector3 FMatrix3x3::operator * (const FVector3& vec, const FMatrix3x3& mat);

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

operator *=

void FMatrix3x3::operator *=(double scalar);

Multiplies each element in the matrix by a scalar.

Parameters
scalarThe scalar to multiply by.

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

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

operator +=

void FMatrix3x3::operator +=(const FMatrix3x3& mat);

Adds each element in the given matrix to this matrix.

Parameters
matThe matrix of values to add to this matrix.

operator -

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

Negation. Each element in the given matrix is returned negated in a new matrix.

Parameters
matThe source matrix.

Return Value
The negated matrix.

operator -=

void FMatrix3x3::operator -=(const FMatrix3x3& mat);

Subtracts each element in the given matrix from this matrix.

Parameters
matThe matrix of values to subtract from this matrix.

operator /

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

Division by a scalar.

operator /=

void FMatrix3x3::operator /=(double scalar);

Divides each element in the matrix by a scalar.

Parameters
scalarThe scalar to divide by.

operator =

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

Assignment operator

void FMatrix3x3::operator =(double scalar);

Assignment from a scalar

operator []

FVector3& FMatrix3x3::operator [] (uint index);

Access a row of the matrix - no range checks

Parameters
indexThe index of the row that should be returned.

Return Value
The specified row of the matrix.

const FVector3& FMatrix3x3::operator [] (uint index);

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

Parameters
indexThe index of the row that should be returned.

Return Value
The specified row of the matrix.

operator ^

friend FMatrix3x3 FMatrix3x3::operator ^(const FVector3& v1, const FVector3& v2);

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

product

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

Element-by-element multiplication of 2 matrices.

reset

void FMatrix3x3::reset();

Reset the matrix to it's default state - identity

set

void FMatrix3x3::set(const FVector3& r0, const FVector3& r1, const FVector3& r2);

Sets the rows of the matrix.

Parameters
r0The new row "0" for this matrix.
r1The new row "0" for this matrix.
r2The new row "0" for this matrix.

void FMatrix3x3::set(double scalar);

Sets every element in the matrix to a scalar.

Parameters
scalarValue assigned to each element.

transpose

void FMatrix3x3::transpose(void);

Transposes this matrix.

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

Finds the transpose of a given matrix.

Parameters
matThe matrix to find a transpose for.

Return Value
The transpose of the giben matrix.

~FMatrix3x3

virtual FMatrix3x3::~FMatrix3x3();

Destructor

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