Matrix3f Class Reference

Represents a generic three-dimensional matrix. More...

General Functions

 Matrix3f ()
 Matrix3f default constructor. More...
 
 Matrix3f (float data[])
 Matrix3f copy constructor (deep copy). More...
 
 Matrix3f (const Matrix3f &mat)
 Matrix3f copy constructor (deep copy). More...
 
Matrix3f operator* (const Matrix3f &mat) const
 Gives the result of the multiplication between two Matrix3f. More...
 
Matrix3f operator* (const float &scalar) const
 Gives the result of the multiplication between a Matrix3f and a scalar. More...
 
Matrix3f operator+ (const Matrix3f &mat) const
 Gives the result of the addition between two Matrix3f. More...
 
Matrix3f operator+ (const float &scalar) const
 Gives the result of the addition between a Matrix3f and a scalar. More...
 
Matrix3f operator- (const Matrix3f &mat) const
 Gives the result of the subtraction between two Matrix3f. More...
 
Matrix3f operator- (const float &scalar) const
 Gives the result of the subtraction between a Matrix3f and a scalar. More...
 
bool operator== (const Matrix3f &mat) const
 Test two Matrix3f equality. More...
 
bool operator!= (const Matrix3f &mat) const
 Test two Matrix3f inequality. More...
 
float & operator() (int u, int v)
 Gets access to a specific point in the Matrix3f (read / write). More...
 
void inverse ()
 Sets the Matrix3f to its inverse. More...
 
void transpose ()
 Sets the RotationArray to its transpose. More...
 
void setIdentity ()
 Sets the Matrix3f to identity. More...
 
void setZeros ()
 Sets the Matrix3f to zero. More...
 
String getInfos ()
 Returns the components of the Matrix3f in a String. More...
 

Static Functions

static Matrix3f inverse (const Matrix3f &rotation)
 Returns the inverse of a Matrix3f. More...
 
static Matrix3f transpose (const Matrix3f &rotation)
 Returns the transpose of a Matrix3f. More...
 
static Matrix3f identity ()
 Creates an identity Matrix3f. More...
 
static Matrix3f zeros ()
 Creates a Matrix3f filled with zeros. More...
 

Attributes

String matrix_name
 Name of the matrix (optional). More...
 

Detailed Description

Represents a generic three-dimensional matrix.

It is defined in a row-major order, it means that, in the value buffer, the entire first row is stored first, followed by the entire second row, and so on. You can access the data with the 'r' ptr or by element attribute.

\[\begin{bmatrix} r00 & r01 & r02 \\ r10 & r11 & r22 \\ r20 & r21 & r22 \end{bmatrix} \]

Constructor and Destructor

Matrix3f ( )

Matrix3f default constructor.

Matrix3f ( float  data[])

Matrix3f copy constructor (deep copy).

Matrix3f ( const Matrix3f mat)

Matrix3f copy constructor (deep copy).

Parameters
mat: the Matrix3f to copy.

Functions

Matrix3f operator* ( const Matrix3f mat) const

Gives the result of the multiplication between two Matrix3f.

Matrix3f operator* ( const float &  scalar) const

Gives the result of the multiplication between a Matrix3f and a scalar.

Matrix3f operator+ ( const Matrix3f mat) const

Gives the result of the addition between two Matrix3f.

Matrix3f operator+ ( const float &  scalar) const

Gives the result of the addition between a Matrix3f and a scalar.

Matrix3f operator- ( const Matrix3f mat) const

Gives the result of the subtraction between two Matrix3f.

Matrix3f operator- ( const float &  scalar) const

Gives the result of the subtraction between a Matrix3f and a scalar.

bool operator== ( const Matrix3f mat) const

Test two Matrix3f equality.

bool operator!= ( const Matrix3f mat) const

Test two Matrix3f inequality.

float& operator() ( int  u,
int  v 
)

Gets access to a specific point in the Matrix3f (read / write).

Parameters
u: specify the row
v: specify the column
Returns
The value at the u, v coordinates.
void inverse ( )

Sets the Matrix3f to its inverse.

static Matrix3f inverse ( const Matrix3f rotation)
static

Returns the inverse of a Matrix3f.

Parameters
rotation: the Matrix3f to compute the inverse from.
Returns
The inverse of the given Matrix3f
void transpose ( )

Sets the RotationArray to its transpose.

static Matrix3f transpose ( const Matrix3f rotation)
static

Returns the transpose of a Matrix3f.

Parameters
rotation: the Matrix3f to compute the transpose from.
Returns
The transpose of the given Matrix3f
void setIdentity ( )

Sets the Matrix3f to identity.

static Matrix3f identity ( )
static

Creates an identity Matrix3f.

Returns
A Matrix3f set to identity.
void setZeros ( )

Sets the Matrix3f to zero.

static Matrix3f zeros ( )
static

Creates a Matrix3f filled with zeros.

Returns
A Matrix3f set to zero.

Referenced by Camera::isOpened().

String getInfos ( )

Returns the components of the Matrix3f in a String.

Returns
A String containing the components of the current Matix3f.

Variables

String matrix_name

Name of the matrix (optional).