SDL Breakout Engine  0.1.0
An implementation of a Breakout game using sdl, implemented with efficient resource management.
Public Member Functions | List of all members
Matrix3D Struct Reference

#include <TinyMath.hpp>

Public Member Functions

 Matrix3D () = default
 Default constructor. More...
 
 Matrix3D (float n00, float n01, float n02, float n10, float n11, float n12, float n20, float n21, float n22)
 
 Matrix3D (const Vector3D &a, const Vector3D &b, const Vector3D &c)
 
float & operator () (int i, int j)
 
const float & operator () (int i, int j) const
 
Vector3Doperator[] (int i)
 
const Vector3Doperator[] (int i) const
 
Vector3D column (int j)
 
Vector3D column (int j) const
 
bool operator== (const Matrix3D &other)
 
bool equals (const Matrix3D &other, float tolerance)
 

Detailed Description

Matrix 3D represents 3x3 matrices in Math

Constructor & Destructor Documentation

Matrix3D::Matrix3D ( )
default

Default constructor.

Matrix3D::Matrix3D ( float  n00,
float  n01,
float  n02,
float  n10,
float  n11,
float  n12,
float  n20,
float  n21,
float  n22 
)
inline

[ a1 a2 a3 -> vector 1 b1 b2 b3 -> vector 2 c1 c2 c3 -> vector 3 ]

a1 = 00 b3 = 12

01 is row 0, column 1

Parameters
n00el
n01el
n02el
n10el
n11el
n12el
n20el
n21el
n22el
Matrix3D::Matrix3D ( const Vector3D a,
const Vector3D b,
const Vector3D c 
)
inline

Matrix constructor from three vectors.

Parameters
avector1
bvector2
cvector3

Member Function Documentation

Vector3D Matrix3D::column ( int  j)
inline

Return a matrix column.

Parameters
jcolumn
Vector3D Matrix3D::column ( int  j) const
inline

Return a matrix column.

Parameters
jcolumn
bool Matrix3D::equals ( const Matrix3D &  other,
float  tolerance 
)
inline

Checks equality within a certain tolerance with the given matrix.

Parameters
othermatrix2
tolerancetolerance
float& Matrix3D::operator () ( int  i,
int  j 
)
inline

Index operator with two dimensions row, then column

Parameters
irow
jcolumn
const float& Matrix3D::operator () ( int  i,
int  j 
) const
inline

Index operator with two dimensions row, then column

Parameters
irow
jcolumn
bool Matrix3D::operator== ( const Matrix3D &  other)
inline

Checks exact equality with the given matrix.

Parameters
othermatrix2
Vector3D& Matrix3D::operator[] ( int  i)
inline

Return a row from a matrix as a vector.

Parameters
irow
const Vector3D& Matrix3D::operator[] ( int  i) const
inline

Return a row from a matrix as a vector.

Parameters
irow

The documentation for this struct was generated from the following file: