![]() |
PERRY v1.0.0
P-E-R-R-Y/PERRY helps creating games with a bunch of tools.
|
Classes | |
| class | Matrice< T > |
Functions | |
| Matrice< T >::Matrice (int rows, int cols) | |
| Construct a new Matrice object. | |
| Matrice< T >::Matrice (const std::vector< std::vector< T > > &grid) | |
| Construct a new Matrice object. | |
| T & | Matrice< T >::operator() (int row, int col) |
| get the value of the matrix at the given row and column | |
| const T & | Matrice< T >::operator() (int row, int col) const |
| get the unmutable value of the matrix at the given row and column | |
| Matrice< T > | Matrice< T >::operator= (const Matrice< T > &other) |
| copy constructor | |
| int | Matrice< T >::getRows () const |
| Get the Rows object. | |
| int | Matrice< T >::getCols () const |
| Get the Cols object. | |
| void | Matrice< T >::print () const |
| Print the matrix. | |
| template<typename T> | |
| Matrice< T > | operator* (const Matrice< T > &a, const Matrice< T > &b) |
| Define the multiplication operator for matrix multiplication. | |
| sf::Vector3f | crossProduct (sf::Vector3f a, sf::Vector3f b) |
| cross product of two vectors gives you a new vector that is perpendicular to both input vectors | |
| sf::Vector3f | normaliseV3f (const sf::Vector3f &vec) |
| convert a vector to a unit vector | |
| float | dotProduct (sf::Vector3f a, sf::Vector3f b) |
| give an idea about how much two vectors are aligned | |
| sf::Vector3f | viewFromUp (const sf::Vector3f up) |
| viewFromUp will return a view vector based on the up vector | |
Variables | |
| std::vector< std::vector< T > > | Matrice< T >::data |
| int | Matrice< T >::rows |
| int | Matrice< T >::cols |
| sf::Vector3f crossProduct | ( | sf::Vector3f | a, |
| sf::Vector3f | b ) |
cross product of two vectors gives you a new vector that is perpendicular to both input vectors
| a | |
| b |
| float dotProduct | ( | sf::Vector3f | a, |
| sf::Vector3f | b ) |
give an idea about how much two vectors are aligned
need to normalize the vectors before using the dot product
| a | |
| b |
|
inline |
Get the Cols object.
|
inline |
Get the Rows object.
Construct a new Matrice object.
| grid |
Construct a new Matrice object.
| rows | |
| cols |
| sf::Vector3f normaliseV3f | ( | const sf::Vector3f & | vec | ) |
convert a vector to a unit vector
| vec |
|
inline |
get the value of the matrix at the given row and column
| row | |
| col |
|
inline |
get the unmutable value of the matrix at the given row and column
| row | |
| col |
Define the multiplication operator for matrix multiplication.
| T |
| a | |
| b |
| sf::Vector3f viewFromUp | ( | const sf::Vector3f | up | ) |
viewFromUp will return a view vector based on the up vector
| up |