ActiveLib
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
active::geometry::Matrix3x3 Class Reference

A 3x3 matrix class. More...

#include <Matrix3x3.h>

Public Types

using row_t = std::array<double, 3>
 
using base_t = std::array<row_t, 3>
 
using Unique = std::unique_ptr<Matrix3x3>
 Unique pointer.
 
using Shared = std::shared_ptr<Matrix3x3>
 Shared pointer.
 
using Option = std::optional<Matrix3x3>
 Optional.
 

Public Member Functions

 Matrix3x3 ()
 
 Matrix3x3 (double a1, double b1, double c1, double a2, double b2, double c2, double a3, double b3, double c3)
 
bool operator== (const Matrix3x3 &ref) const
 
bool operator!= (const Matrix3x3 &ref) const
 
Matrix3x3 operator* (const Matrix3x3 &ref) const
 
Matrix3x3operator*= (const Matrix3x3 &ref)
 
const row_t & operator[] (unsigned short index) const
 
row_t & operator[] (unsigned short index)
 
const double & operator() (unsigned short row, unsigned short col) const
 
double & operator() (unsigned short row, unsigned short col)
 
Matrix3x3 getInverse () const
 
double getDeterminant () const
 

Static Public Member Functions

static Matrix3x3 createXRotate (double angle)
 
static Matrix3x3 createYRotate (double angle)
 
static Matrix3x3 createZRotate (double angle)
 
static Matrix3x3 createScale (double x, double y, double z)
 
static Matrix3x3 createTranslate (double x, double y, double z)
 
static Matrix3x3 createIdentity ()
 

Detailed Description

A 3x3 matrix class.

Constructor & Destructor Documentation

◆ Matrix3x3() [1/2]

Matrix3x3::Matrix3x3 ( )

Default constructor

Here is the caller graph for this function:

◆ Matrix3x3() [2/2]

Matrix3x3::Matrix3x3 ( double a1,
double b1,
double c1,
double a2,
double b2,
double c2,
double a3,
double b3,
double c3 )

Constructor

Member Function Documentation

◆ createIdentity()

Matrix3x3 Matrix3x3::createIdentity ( )
static

Create an identity matrix

Returns
The requested identity matrix
Here is the caller graph for this function:

◆ createScale()

Matrix3x3 Matrix3x3::createScale ( double x,
double y,
double z )
static

Create a scaling matrix

Parameters
xThe scale in the x axis
yThe scale in the y axis
zThe scale in the z axis
Returns
The requested scaling matrix

◆ createTranslate()

Matrix3x3 Matrix3x3::createTranslate ( double x,
double y,
double z )
static

Create a translation matrix

Parameters
xThe offset in the x axis
yThe offset in the y axis
zThe offset in the z axis
Returns
The requested transformation matrix

◆ createXRotate()

Matrix3x3 Matrix3x3::createXRotate ( double angle)
static

Create a rotation matrix about the x axis

Parameters
angleThe rotation angle
Returns
The requested rotation matrix
Here is the call graph for this function:

◆ createYRotate()

Matrix3x3 Matrix3x3::createYRotate ( double angle)
static

Create a rotation matrix about the y axis

Parameters
angleThe rotation angle
Returns
The requested rotation matrix
Here is the call graph for this function:

◆ createZRotate()

Matrix3x3 Matrix3x3::createZRotate ( double angle)
static

Create a rotation matrix about the z axis

Parameters
angleThe rotation angle
Returns
The requested rotation matrix
Here is the call graph for this function:

◆ getDeterminant()

double Matrix3x3::getDeterminant ( ) const

Get the determinant

Returns
The matrix determinant
Here is the caller graph for this function:

◆ getInverse()

Matrix3x3 Matrix3x3::getInverse ( ) const

Get the inverse matrix (or identity if none exists) return: An inverse matrix

Here is the call graph for this function:

◆ operator!=()

bool Matrix3x3::operator!= ( const Matrix3x3 & ref) const

Inequality operator

Parameters
refThe object to compare
Returns
True if the objects are not identical

◆ operator()() [1/2]

double & active::geometry::Matrix3x3::operator() ( unsigned short row,
unsigned short col )
inline

Subscript operator

Parameters
rowThe required row
colThe required column
Returns
The value at the specified position

◆ operator()() [2/2]

const double & active::geometry::Matrix3x3::operator() ( unsigned short row,
unsigned short col ) const
inline

Subscript operator

Parameters
rowThe required row
colThe required column
Returns
The value at the specified position

◆ operator*()

Matrix3x3 Matrix3x3::operator* ( const Matrix3x3 & ref) const

Multiplication operator

Parameters
refThe matrix to multiply this by
Returns
The result

◆ operator*=()

Matrix3x3 & active::geometry::Matrix3x3::operator*= ( const Matrix3x3 & ref)

Multiplication with assignment operator

Parameters
refThe matrix to multiply this by
Returns
A reference to this

◆ operator==()

bool Matrix3x3::operator== ( const Matrix3x3 & ref) const

Equality operator

Parameters
refThe object to compare
Returns
True if the objects are identical
Here is the call graph for this function:

◆ operator[]() [1/2]

row_t & active::geometry::Matrix3x3::operator[] ( unsigned short index)
inline

Row subscript operator

Parameters
indexThe required row
Returns
The matrix row

◆ operator[]() [2/2]

const row_t & active::geometry::Matrix3x3::operator[] ( unsigned short index) const
inline

Row subscript operator

Parameters
indexThe required row
Returns
The matrix row

The documentation for this class was generated from the following files: