FBase | +----FMatrix3x3
#include <Flek/FMatrix3x3.H>
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
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.
static FMatrix3x3 FMatrix3x3::I(void);
Creates the identity matrix.Return Value
The identity matrix.
void FMatrix3x3::copy_from(const FMatrix3x3& mat);
Copy values from another matrix.
friend double FMatrix3x3::determinant(const FMatrix3x3& mat);
Finds the determinant of a given matrix.Parameters
mat The source matrix. Return Value
The detrminant of the source matrix.
static FMatrix3x3 FMatrix3x3::identity();
Creates the identity matrix.Return Value
The identity matrix.
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
mat The source matrix. Return Value
The inverse of the source matrix.
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.
void FMatrix3x3::operator *=(double scalar);
Multiplies each element in the matrix by a scalar.Parameters
scalar The scalar to multiply by. void FMatrix3x3::operator *=(const FMatrix3x3& mat);
Multiply self with another matrix. Simply calls above defined friend function.
void FMatrix3x3::operator +=(const FMatrix3x3& mat);
Adds each element in the given matrix to this matrix.Parameters
mat The matrix of values to add to this matrix.
friend FMatrix3x3 FMatrix3x3::operator -(const FMatrix3x3& mat);
Negation. Each element in the given matrix is returned negated in a new matrix.Parameters
mat The source matrix. Return Value
The negated matrix.
void FMatrix3x3::operator -=(const FMatrix3x3& mat);
Subtracts each element in the given matrix from this matrix.Parameters
mat The matrix of values to subtract from this matrix.
friend FMatrix3x3 FMatrix3x3::operator /(const FMatrix3x3& mat, double scalar);
Division by a scalar.
void FMatrix3x3::operator /=(double scalar);
Divides each element in the matrix by a scalar.Parameters
scalar The scalar to divide by.
FMatrix3x3& FMatrix3x3::operator =(const FMatrix3x3& mat);
Assignment operatorvoid FMatrix3x3::operator =(double scalar);
Assignment from a scalar
FVector3& FMatrix3x3::operator [] (uint index);
Access a row of the matrix - no range checksParameters
index The 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 versionParameters
index The index of the row that should be returned. Return Value
The specified row of the matrix.
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)
friend FMatrix3x3 FMatrix3x3::product(const FMatrix3x3& mat1, const FMatrix3x3& mat2);
Element-by-element multiplication of 2 matrices.
void FMatrix3x3::reset();
Reset the matrix to it's default state - identity
void FMatrix3x3::set(const FVector3& r0, const FVector3& r1, const FVector3& r2);
Sets the rows of the matrix.Parameters
r0 The new row "0" for this matrix. r1 The new row "0" for this matrix. r2 The new row "0" for this matrix. void FMatrix3x3::set(double scalar);
Sets every element in the matrix to a scalar.Parameters
scalar Value assigned to each element.
void FMatrix3x3::transpose(void);
Transposes this matrix.friend FMatrix3x3 FMatrix3x3::transpose(const FMatrix3x3& mat);
Finds the transpose of a given matrix.Parameters
mat The matrix to find a transpose for. Return Value
The transpose of the giben matrix.
virtual FMatrix3x3::~FMatrix3x3();
Destructor