Matrix.hpp File Reference

Go to the source code of this file.

Classes

struct  playrho::IsMatrix< typename >
 Trait class for checking if type is a matrix type. More...
 
struct  playrho::IsMatrix< Vector< Vector< T, N >, M > >
 Trait class specialization for checking if type is a matrix type. More...
 
struct  playrho::IsSquareMatrix< typename >
 Trait class for checking if type is a square matrix type. More...
 
struct  playrho::IsSquareMatrix< Vector< Vector< T, M >, M > >
 Trait class specialization for checking if type is a square matrix type. More...
 

Namespaces

 playrho
 

Typedefs

template<typename T , std::size_t M, std::size_t N>
using playrho::Matrix = Vector< Vector< T, N >, M >
 Generic M by N matrix. More...
 
template<typename T >
using playrho::Matrix22 = Matrix< T, 2, 2 >
 2 by 2 matrix. More...
 
template<typename T >
using playrho::Matrix33 = Matrix< T, 3, 3 >
 3 by 3 matrix. More...
 
using playrho::Mat22 = Matrix22< Real >
 2 by 2 matrix of Real elements. More...
 
using playrho::Mass22 = Matrix22< Mass >
 2 by 2 matrix of Mass elements. More...
 
using playrho::InvMass22 = Matrix22< InvMass >
 2 by 2 matrix of InvMass elements. More...
 
using playrho::Mat33 = Matrix33< Real >
 3 by 3 matrix of Real elements. More...
 

Functions

template<typename T , std::size_t N>
PLAYRHO_CONSTEXPR std::enable_if_t<!IsVector< T >::value, Matrix< T, N, N > > playrho::GetIdentityMatrix ()
 Gets the identity matrix of the template type and size. More...
 
template<typename T >
PLAYRHO_CONSTEXPR std::enable_if_t< IsSquareMatrix< T >::value, T > playrho::GetIdentity ()
 Gets the identity matrix of the template type and size as given by the argument. More...
 
template<typename T , std::size_t N>
PLAYRHO_CONSTEXPR std::enable_if_t<!IsVector< T >::value, Vector< Vector< T, N >, 1 > > playrho::GetRowMatrix (Vector< T, N > arg)
 Gets the specified row of the given matrix as a row matrix. More...
 
template<typename T , std::size_t N>
PLAYRHO_CONSTEXPR std::enable_if_t<!IsVector< T >::value, Vector< Vector< T, 1 >, N > > playrho::GetColumnMatrix (Vector< T, N > arg)
 Gets the specified column of the given matrix as a column matrix. More...
 
template<typename T , std::size_t M, std::size_t N>
PLAYRHO_CONSTEXPR auto playrho::operator+ (const Matrix< T, M, N > &lhs, const Matrix< T, M, N > &rhs) noexcept
 Matrix addition operator for two same-type, same-sized matrices. More...
 
template<typename T , std::size_t M, std::size_t N>
PLAYRHO_CONSTEXPR auto playrho::operator- (const Matrix< T, M, N > &lhs, const Matrix< T, M, N > &rhs) noexcept
 Matrix subtraction operator for two same-type, same-sized matrices. More...
 
template<>
PLAYRHO_CONSTEXPR bool playrho::IsValid (const Mat22 &value) noexcept
 Determines if the given value is valid. More...
 
template<>
PLAYRHO_CONSTEXPR d2::AABB playrho::GetInvalid () noexcept
 Gets an invalid AABB value. More...