Rune Engine  Version 0.2.7-alpha
Documentation for how to make games using the Rune Engine.
rune::Mat3 Class Reference

3 x 3 matrix to be used for math. More...

#include <mat3.h>

Public Member Functions

 Mat3 ()
 Default empty constructor that sets X and Y to 0.
 
 Mat3 (double a11, double a12, double a13, double a21, double a22, double a23, double a31, double a32, double a33)
 Constructor that sets up a new vector.
 
Mat3 operator- (const Mat3 &right)
 Overload of subtraction operator. More...
 
Mat3 operator- ()
 Overload of negation operator. More...
 
Mat3 operator+ (const Mat3 &right)
 Overload of addition operator. More...
 
Mat3 operator* (const rune::Mat3 &right)
 Overload of multiplication operator. More...
 
Mat3 operator* (double scalar)
 Overload of multiplication operator for a scalar on the left. More...
 
rune::Vec3 operator* (const rune::Vec3 &right)
 Overload of multiplication operator for a rune::Mat3. More...
 
Mat3 operator/ (const Mat3 &right)
 Overload of division operator. More...
 
Mat3operator-= (const Mat3 &right)
 Overload of -= operator. More...
 
Mat3operator+= (const Mat3 &right)
 Overload of += operator. More...
 
Mat3operator+= (const double scalar)
 Overload of += operator for scalar. More...
 
Mat3operator*= (const Mat3 &right)
 Overload of *= operator. More...
 
Mat3operator*= (const double right)
 Overload of *= operator for a scalar multiplier. More...
 
Mat3operator/= (const Mat3 &right)
 Overload of *= operator. More...
 
Mat3operator/= (const double right)
 Overload of *= operator for a scalar multiplier. More...
 
bool operator== (const Mat3 &right)
 Overload of comparator operator. More...
 
bool operator!= (const Mat3 &right)
 Overload of != operator. More...
 
Mat3 operator/ (double scalar)
 Overload of division operator. More...
 
Mat3 invert ()
 Inversion of the matrix. More...
 
double determinant ()
 Determinant of the matrix. More...
 
double * operator[] (int index)
 Array like accessing of elements. More...
 
std::ostream & operator<< (std::ostream &os, const rune::Mat3 &mat)
 

Friends

RUNE_ENGINE std::ostream & operator<< (std::ostream &os, const Mat3 &vector)
 Overload of stream operator for printing.
 

Detailed Description

3 x 3 matrix to be used for math.

Author
Thomas Montano
Date
May 16 2020

Member Function Documentation

◆ determinant()

double rune::Mat3::determinant ( )

Determinant of the matrix.

Returns
The determinant of the matrix.

◆ invert()

rune::Mat3 rune::Mat3::invert ( )

Inversion of the matrix.

Returns
The inverted matrix, if invertible.

◆ operator!=()

bool rune::Mat3::operator!= ( const Mat3 right)

Overload of != operator.

Parameters
rightThe rune::Mat3 to compare to.
Returns
Whether or not the two matrices are non equivalent.

◆ operator*() [1/3]

rune::Mat3 rune::Mat3::operator* ( const rune::Mat3 right)

Overload of multiplication operator.

Parameters
rightThe matrix to be multiplied by.
Returns
The result of the multiplication.

◆ operator*() [2/3]

rune::Vec3 rune::Mat3::operator* ( const rune::Vec3 vec)

Overload of multiplication operator for a rune::Mat3.

Parameters
vecThe vector to be multiplied with.
Returns
The result of the multiplication.

◆ operator*() [3/3]

rune::Mat3 rune::Mat3::operator* ( double  scalar)

Overload of multiplication operator for a scalar on the left.

Parameters
scalarThe scalar to be multiplied by.
Returns
A memberwise multiplication.

◆ operator*=() [1/2]

rune::Mat3 & rune::Mat3::operator*= ( const double  right)

Overload of *= operator for a scalar multiplier.

Parameters
rightThe matrix to multiply by.
Returns
A member wise multiplication.

◆ operator*=() [2/2]

rune::Mat3 & rune::Mat3::operator*= ( const Mat3 right)

Overload of *= operator.

Parameters
rightThe matrix to be multiplied by.
Returns
A reference to the modified matrix.

◆ operator+()

rune::Mat3 rune::Mat3::operator+ ( const Mat3 right)

Overload of addition operator.

Parameters
rightThe matrix to be added.
Returns
An element wise addition.

◆ operator+=() [1/2]

rune::Mat3 & rune::Mat3::operator+= ( const double  scalar)

Overload of += operator for scalar.

Parameters
scalarThe scalar to be added.
Returns
An elementwise addition.

◆ operator+=() [2/2]

rune::Mat3 & rune::Mat3::operator+= ( const Mat3 right)

Overload of += operator.

Parameters
rightThe matrix to be added.
Returns
A reference to the modified matrix.

◆ operator-() [1/2]

rune::Mat3 rune::Mat3::operator- ( )

Overload of negation operator.

Returns
The negative of the matrix.

◆ operator-() [2/2]

rune::Mat3 rune::Mat3::operator- ( const Mat3 right)

Overload of subtraction operator.

Parameters
rightThe matrix to be subtracted.
Returns
An element wise subtraction.

◆ operator-=()

rune::Mat3 & rune::Mat3::operator-= ( const Mat3 right)

Overload of -= operator.

Parameters
rightThe matrix to be subtracted by.
Returns
A reference to the modified matrix.

◆ operator/() [1/2]

rune::Mat3 rune::Mat3::operator/ ( const Mat3 right)

Overload of division operator.

Parameters
rightThe matrix to be divided by.
Returns
The result of the multiplication by the matrix inverse.

◆ operator/() [2/2]

rune::Mat3 rune::Mat3::operator/ ( double  scalar)

Overload of division operator.

Parameters
scalarThe scalar value to be multiplied by.
Returns
An elementwise multiplication.

◆ operator/=() [1/2]

rune::Mat3 & rune::Mat3::operator/= ( const double  right)

Overload of *= operator for a scalar multiplier.

Parameters
rightThe scalar to be divided by.
Returns
An element wise division.

◆ operator/=() [2/2]

rune::Mat3 & rune::Mat3::operator/= ( const Mat3 right)

Overload of *= operator.

Parameters
rightThe matrix to be divided by.
Returns
A reference to the modified matrix.

◆ operator<<()

std::ostream & operator<< ( std::ostream &  os,
const rune::Mat3 mat 
)
Parameters
osOutput stream that the vector should be printed to.
matmat to be printed.
Returns
Stream to be printed to the console.

◆ operator==()

bool rune::Mat3::operator== ( const Mat3 right)

Overload of comparator operator.

Parameters
rightThe rune::Mat3 to compare to.
Returns
Whether or not the two matrices are equivalent.

◆ operator[]()

double * rune::Mat3::operator[] ( int  index)

Array like accessing of elements.

Parameters
indexThe element to be accessed.
Returns
The accessed element.

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