Lugdunum  0.1.0
Namespaces | Classes | Typedefs | Functions | Variables
lug::Math Namespace Reference

Namespaces

 Geometry
 

Classes

class  Matrix
 
class  Quaternion
 
class  ValArray
 
class  Vector
 

Typedefs

using Quatf = Quaternion< float >
 
using Quatd = Quaternion< double >
 

Functions

template<typename T >
epsilon ()
 
template<typename T >
pi ()
 
template<typename T >
twoPi ()
 
template<typename T >
rootPi ()
 
template<typename T >
halfPi ()
 
template<typename T >
threeOverTwoPi ()
 
template<typename T >
quarterPi ()
 
template<typename T >
oneOverPi ()
 
template<typename T >
oneOverTwoPi ()
 
template<typename T >
twoOverPi ()
 
template<typename T >
fourOverPi ()
 
template<typename T >
twoOverRootPi ()
 
template<typename T >
oneOverRootPi ()
 
template<typename T >
rootHalfPi ()
 
template<typename T >
rootTwoPi ()
 
template<typename T >
rootLnFour ()
 
template<typename T >
e ()
 
template<typename T >
euler ()
 
template<typename T >
rootTwo ()
 
template<typename T >
rootThree ()
 
template<typename T >
rootFive ()
 
template<typename T >
lnTwo ()
 
template<typename T >
lnTen ()
 
template<typename T >
lnLnTwo ()
 
template<typename T >
goldenRatio ()
 
template<uint8_t Rows, uint8_t Columns, typename T >
Matrix< Rows, Columns, T > operator- (const Matrix< Rows, Columns, T > &lhs)
 
template<uint8_t Rows, uint8_t Columns, typename T >
Matrix< Rows, Columns, T > operator+ (const Matrix< Rows, Columns, T > &lhs, T rhs)
 
template<uint8_t Rows, uint8_t Columns, typename T >
Matrix< Rows, Columns, T > operator- (const Matrix< Rows, Columns, T > &lhs, T rhs)
 
template<uint8_t Rows, uint8_t Columns, typename T >
Matrix< Rows, Columns, T > operator* (const Matrix< Rows, Columns, T > &lhs, T rhs)
 
template<uint8_t Rows, uint8_t Columns, typename T >
Matrix< Rows, Columns, T > operator/ (const Matrix< Rows, Columns, T > &lhs, T rhs)
 
template<uint8_t Rows, uint8_t Columns, typename T >
Matrix< Rows, Columns, T > operator+ (T lhs, const Matrix< Rows, Columns, T > &rhs)
 
template<uint8_t Rows, uint8_t Columns, typename T >
Matrix< Rows, Columns, T > operator- (T lhs, const Matrix< Rows, Columns, T > &rhs)
 
template<uint8_t Rows, uint8_t Columns, typename T >
Matrix< Rows, Columns, T > operator* (T lhs, const Matrix< Rows, Columns, T > &rhs)
 
template<uint8_t Rows, uint8_t Columns, typename T >
Matrix< Rows, Columns, T > operator/ (T lhs, const Matrix< Rows, Columns, T > &rhs)
 
template<uint8_t Rows, uint8_t Columns, typename T >
Matrix< Rows, Columns, T > operator+ (const Matrix< Rows, Columns, T > &lhs, const Matrix< Rows, Columns, T > &rhs)
 
template<uint8_t Rows, uint8_t Columns, typename T >
Matrix< Rows, Columns, T > operator- (const Matrix< Rows, Columns, T > &lhs, const Matrix< Rows, Columns, T > &rhs)
 
template<uint8_t RowsLeft, uint8_t ColumnsLeft, uint8_t RowsRight, uint8_t ColumnsRight, typename T >
Matrix< RowsLeft, ColumnsRight, T > operator* (const Matrix< RowsLeft, ColumnsLeft, T > &lhs, const Matrix< RowsRight, ColumnsRight, T > &rhs)
 
template<uint8_t RowsLeft, uint8_t ColumnsLeft, uint8_t RowsRight, uint8_t ColumnsRight, typename T >
Matrix< RowsLeft, ColumnsRight, T > operator/ (const Matrix< RowsLeft, ColumnsLeft, T > &lhs, const Matrix< RowsRight, ColumnsRight, T > &rhs)
 
template<uint8_t Rows, uint8_t Columns, typename T >
bool operator== (const Matrix< Rows, Columns, T > &lhs, const Matrix< Rows, Columns, T > &rhs)
 
template<uint8_t Rows, uint8_t Columns, typename T >
bool operator!= (const Matrix< Rows, Columns, T > &lhs, const Matrix< Rows, Columns, T > &rhs)
 
template<uint8_t Rows, uint8_t Columns, typename T >
std::ostream & operator<< (std::ostream &os, const Matrix< Rows, Columns, T > &matrix)
 
template<typename T >
Quaternion< T > normalize (const Quaternion< T > &lhs)
 
template<typename T >
Quaternion< T > conjugate (const Quaternion< T > &lhs)
 
template<typename T >
Quaternion< T > inverse (const Quaternion< T > &lhs)
 
template<typename T >
dot (const Quaternion< T > &lhs, const Quaternion< T > &rhs)
 
template<typename T >
Quaternion< T > directionTo (const Vector< 3, T > &original, const Vector< 3, T > &expected)
 
template<typename T >
Quaternion< T > operator- (const Quaternion< T > &lhs)
 
template<typename T >
Quaternion< T > operator+ (const Quaternion< T > &lhs, const Quaternion< T > &rhs)
 
template<typename T >
Quaternion< T > operator- (const Quaternion< T > &lhs, const Quaternion< T > &rhs)
 
template<typename T >
Quaternion< T > operator* (const Quaternion< T > &lhs, const Quaternion< T > &rhs)
 
template<typename T >
Quaternion< T > operator/ (const Quaternion< T > &lhs, const Quaternion< T > &rhs)
 
template<typename T >
bool operator== (const Quaternion< T > &lhs, const Quaternion< T > &rhs)
 
template<typename T >
bool operator!= (const Quaternion< T > &lhs, const Quaternion< T > &rhs)
 
template<typename T >
std::ostream & operator<< (std::ostream &os, const Quaternion< T > &quaternion)
 
template<size_t Size, typename T = float>
ValArray< Size, T > operator+ (const ValArray< Size, T > &lhs, const T &rhs)
 
template<size_t Size, typename T = float>
ValArray< Size, T > operator- (const ValArray< Size, T > &lhs, const T &rhs)
 
template<size_t Size, typename T = float>
ValArray< Size, T > operator* (const ValArray< Size, T > &lhs, const T &rhs)
 
template<size_t Size, typename T = float>
ValArray< Size, T > operator/ (const ValArray< Size, T > &lhs, const T &rhs)
 
template<size_t Size, typename T = float>
ValArray< Size, T > operator+ (const T &lhs, const ValArray< Size, T > &rhs)
 
template<size_t Size, typename T = float>
ValArray< Size, T > operator- (const T &lhs, const ValArray< Size, T > &rhs)
 
template<size_t Size, typename T = float>
ValArray< Size, T > operator* (const T &lhs, const ValArray< Size, T > &rhs)
 
template<size_t Size, typename T = float>
ValArray< Size, T > operator/ (const T &lhs, const ValArray< Size, T > &rhs)
 
template<size_t Size, typename T = float>
ValArray< Size, T > operator+ (const ValArray< Size, T > &lhs, const ValArray< Size, T > &rhs)
 
template<size_t Size, typename T = float>
ValArray< Size, T > operator- (const ValArray< Size, T > &lhs, const ValArray< Size, T > &rhs)
 
template<size_t Size, typename T = float>
ValArray< Size, T > operator* (const ValArray< Size, T > &lhs, const ValArray< Size, T > &rhs)
 
template<size_t Size, typename T = float>
ValArray< Size, T > operator/ (const ValArray< Size, T > &lhs, const ValArray< Size, T > &rhs)
 
template<size_t Size, typename T = float>
bool operator== (const ValArray< Size, T > &lhs, const ValArray< Size, T > &rhs)
 
template<size_t Size, typename T = float>
bool operator!= (const ValArray< Size, T > &lhs, const ValArray< Size, T > &rhs)
 
template<typename T >
constexpr Vector< 3, T > cross (const Vector< 3, T > &lhs, const Vector< 3, T > &rhs)
 
template<uint8_t Rows, typename T >
constexpr T dot (const Vector< Rows, T > &lhs, const Vector< Rows, T > &rhs)
 
template<uint8_t Rows, uint8_t Columns, typename T >
constexpr Matrix< Rows, Columns, T > outer (const Vector< Rows, T > &lhs, const Vector< Columns, T > &rhs)
 
template<uint8_t Rows, typename T >
constexpr Vector< Rows, T > normalize (const Vector< Rows, T > &lhs)
 
template<uint8_t Rows, typename T >
Vector< Rows, T > operator* (const Vector< Rows, T > &lhs, const Vector< Rows, T > &rhs)
 
template<uint8_t Rows, typename T >
Vector< Rows, T > operator/ (const Vector< Rows, T > &lhs, const Vector< Rows, T > &rhs)
 
template<uint8_t Rows, typename T >
Vector< Rows, T > operator* (const Vector< Rows, T > &lhs, const Matrix< Rows, Rows, T > &rhs)
 
template<uint8_t Rows, typename T >
Vector< Rows, T > operator* (const Matrix< Rows, Rows, T > &lhs, const Vector< Rows, T > &rhs)
 
template<typename T >
Vector< 3, T > operator* (const Vector< 3, T > &lhs, const Matrix< 4, 4, T > &rhs)
 
template<typename T >
Vector< 3, T > operator* (const Matrix< 4, 4, T > &lhs, const Vector< 3, T > &rhs)
 

Variables

template class LUG_MATH_API Quaternion< float >
 
template class LUG_MATH_API Quaternion< double >
 

Typedef Documentation

◆ Quatf

using lug::Math::Quatf = typedef Quaternion<float>

Definition at line 75 of file Quaternion.hpp.

◆ Quatd

using lug::Math::Quatd = typedef Quaternion<double>

Definition at line 78 of file Quaternion.hpp.

Function Documentation

◆ epsilon()

template<typename T >
T lug::Math::epsilon ( )
inline

Definition at line 2 of file Constant.inl.

◆ pi()

template<typename T >
T lug::Math::pi ( )
inline

Definition at line 7 of file Constant.inl.

◆ twoPi()

template<typename T >
T lug::Math::twoPi ( )
inline

Definition at line 12 of file Constant.inl.

◆ rootPi()

template<typename T >
T lug::Math::rootPi ( )
inline

Definition at line 17 of file Constant.inl.

◆ halfPi()

template<typename T >
T lug::Math::halfPi ( )
inline

Definition at line 22 of file Constant.inl.

◆ threeOverTwoPi()

template<typename T >
T lug::Math::threeOverTwoPi ( )
inline

Definition at line 27 of file Constant.inl.

◆ quarterPi()

template<typename T >
T lug::Math::quarterPi ( )
inline

Definition at line 32 of file Constant.inl.

◆ oneOverPi()

template<typename T >
T lug::Math::oneOverPi ( )
inline

Definition at line 37 of file Constant.inl.

◆ oneOverTwoPi()

template<typename T >
T lug::Math::oneOverTwoPi ( )
inline

Definition at line 42 of file Constant.inl.

◆ twoOverPi()

template<typename T >
T lug::Math::twoOverPi ( )
inline

Definition at line 47 of file Constant.inl.

◆ fourOverPi()

template<typename T >
T lug::Math::fourOverPi ( )
inline

Definition at line 52 of file Constant.inl.

◆ twoOverRootPi()

template<typename T >
T lug::Math::twoOverRootPi ( )
inline

Definition at line 57 of file Constant.inl.

◆ oneOverRootPi()

template<typename T >
T lug::Math::oneOverRootPi ( )
inline

Definition at line 62 of file Constant.inl.

◆ rootHalfPi()

template<typename T >
T lug::Math::rootHalfPi ( )
inline

Definition at line 67 of file Constant.inl.

◆ rootTwoPi()

template<typename T >
T lug::Math::rootTwoPi ( )
inline

Definition at line 72 of file Constant.inl.

◆ rootLnFour()

template<typename T >
T lug::Math::rootLnFour ( )
inline

Definition at line 77 of file Constant.inl.

◆ e()

template<typename T >
T lug::Math::e ( )
inline

Definition at line 82 of file Constant.inl.

◆ euler()

template<typename T >
T lug::Math::euler ( )
inline

Definition at line 87 of file Constant.inl.

◆ rootTwo()

template<typename T >
T lug::Math::rootTwo ( )
inline

Definition at line 92 of file Constant.inl.

◆ rootThree()

template<typename T >
T lug::Math::rootThree ( )
inline

Definition at line 97 of file Constant.inl.

◆ rootFive()

template<typename T >
T lug::Math::rootFive ( )
inline

Definition at line 102 of file Constant.inl.

◆ lnTwo()

template<typename T >
T lug::Math::lnTwo ( )
inline

Definition at line 107 of file Constant.inl.

◆ lnTen()

template<typename T >
T lug::Math::lnTen ( )
inline

Definition at line 112 of file Constant.inl.

◆ lnLnTwo()

template<typename T >
T lug::Math::lnLnTwo ( )
inline

Definition at line 117 of file Constant.inl.

◆ goldenRatio()

template<typename T >
T lug::Math::goldenRatio ( )
inline

Definition at line 122 of file Constant.inl.

◆ operator-() [1/9]

template<uint8_t Rows, uint8_t Columns, typename T >
Matrix<Rows, Columns, T> lug::Math::operator- ( const Matrix< Rows, Columns, T > &  lhs)

◆ operator+() [1/7]

template<uint8_t Rows, uint8_t Columns, typename T >
Matrix<Rows, Columns, T> lug::Math::operator+ ( const Matrix< Rows, Columns, T > &  lhs,
rhs 
)

◆ operator-() [2/9]

template<uint8_t Rows, uint8_t Columns, typename T >
Matrix<Rows, Columns, T> lug::Math::operator- ( const Matrix< Rows, Columns, T > &  lhs,
rhs 
)

◆ operator*() [1/12]

template<uint8_t Rows, uint8_t Columns, typename T >
Matrix<Rows, Columns, T> lug::Math::operator* ( const Matrix< Rows, Columns, T > &  lhs,
rhs 
)

◆ operator/() [1/8]

template<uint8_t Rows, uint8_t Columns, typename T >
Matrix<Rows, Columns, T> lug::Math::operator/ ( const Matrix< Rows, Columns, T > &  lhs,
rhs 
)

◆ operator+() [2/7]

template<uint8_t Rows, uint8_t Columns, typename T >
Matrix<Rows, Columns, T> lug::Math::operator+ ( lhs,
const Matrix< Rows, Columns, T > &  rhs 
)

◆ operator-() [3/9]

template<uint8_t Rows, uint8_t Columns, typename T >
Matrix<Rows, Columns, T> lug::Math::operator- ( lhs,
const Matrix< Rows, Columns, T > &  rhs 
)

◆ operator*() [2/12]

template<uint8_t Rows, uint8_t Columns, typename T >
Matrix<Rows, Columns, T> lug::Math::operator* ( lhs,
const Matrix< Rows, Columns, T > &  rhs 
)

◆ operator/() [2/8]

template<uint8_t Rows, uint8_t Columns, typename T >
Matrix<Rows, Columns, T> lug::Math::operator/ ( lhs,
const Matrix< Rows, Columns, T > &  rhs 
)

◆ operator+() [3/7]

template<uint8_t Rows, uint8_t Columns, typename T >
Matrix<Rows, Columns, T> lug::Math::operator+ ( const Matrix< Rows, Columns, T > &  lhs,
const Matrix< Rows, Columns, T > &  rhs 
)

◆ operator-() [4/9]

template<uint8_t Rows, uint8_t Columns, typename T >
Matrix<Rows, Columns, T> lug::Math::operator- ( const Matrix< Rows, Columns, T > &  lhs,
const Matrix< Rows, Columns, T > &  rhs 
)

◆ operator*() [3/12]

template<uint8_t RowsLeft, uint8_t ColumnsLeft, uint8_t RowsRight, uint8_t ColumnsRight, typename T >
Matrix<RowsLeft, ColumnsRight, T> lug::Math::operator* ( const Matrix< RowsLeft, ColumnsLeft, T > &  lhs,
const Matrix< RowsRight, ColumnsRight, T > &  rhs 
)

◆ operator/() [3/8]

template<uint8_t RowsLeft, uint8_t ColumnsLeft, uint8_t RowsRight, uint8_t ColumnsRight, typename T >
Matrix<RowsLeft, ColumnsRight, T> lug::Math::operator/ ( const Matrix< RowsLeft, ColumnsLeft, T > &  lhs,
const Matrix< RowsRight, ColumnsRight, T > &  rhs 
)

◆ operator==() [1/3]

template<uint8_t Rows, uint8_t Columns, typename T >
bool lug::Math::operator== ( const Matrix< Rows, Columns, T > &  lhs,
const Matrix< Rows, Columns, T > &  rhs 
)

◆ operator!=() [1/3]

template<uint8_t Rows, uint8_t Columns, typename T >
bool lug::Math::operator!= ( const Matrix< Rows, Columns, T > &  lhs,
const Matrix< Rows, Columns, T > &  rhs 
)

◆ operator<<() [1/2]

template<uint8_t Rows, uint8_t Columns, typename T >
std::ostream& lug::Math::operator<< ( std::ostream &  os,
const Matrix< Rows, Columns, T > &  matrix 
)

◆ normalize() [1/2]

template<typename T >
Quaternion<T> lug::Math::normalize ( const Quaternion< T > &  lhs)

◆ conjugate()

template<typename T >
Quaternion<T> lug::Math::conjugate ( const Quaternion< T > &  lhs)

◆ inverse()

template<typename T >
Quaternion<T> lug::Math::inverse ( const Quaternion< T > &  lhs)

◆ dot() [1/2]

template<typename T >
T lug::Math::dot ( const Quaternion< T > &  lhs,
const Quaternion< T > &  rhs 
)

◆ directionTo()

template<typename T >
Quaternion<T> lug::Math::directionTo ( const Vector< 3, T > &  original,
const Vector< 3, T > &  expected 
)

◆ operator-() [5/9]

template<typename T >
Quaternion<T> lug::Math::operator- ( const Quaternion< T > &  lhs)

◆ operator+() [4/7]

template<typename T >
Quaternion<T> lug::Math::operator+ ( const Quaternion< T > &  lhs,
const Quaternion< T > &  rhs 
)

◆ operator-() [6/9]

template<typename T >
Quaternion<T> lug::Math::operator- ( const Quaternion< T > &  lhs,
const Quaternion< T > &  rhs 
)

◆ operator*() [4/12]

template<typename T >
Quaternion<T> lug::Math::operator* ( const Quaternion< T > &  lhs,
const Quaternion< T > &  rhs 
)

◆ operator/() [4/8]

template<typename T >
Quaternion<T> lug::Math::operator/ ( const Quaternion< T > &  lhs,
const Quaternion< T > &  rhs 
)

◆ operator==() [2/3]

template<typename T >
bool lug::Math::operator== ( const Quaternion< T > &  lhs,
const Quaternion< T > &  rhs 
)

◆ operator!=() [2/3]

template<typename T >
bool lug::Math::operator!= ( const Quaternion< T > &  lhs,
const Quaternion< T > &  rhs 
)

◆ operator<<() [2/2]

template<typename T >
std::ostream& lug::Math::operator<< ( std::ostream &  os,
const Quaternion< T > &  quaternion 
)

◆ operator+() [5/7]

template<size_t Size, typename T = float>
ValArray<Size, T> lug::Math::operator+ ( const ValArray< Size, T > &  lhs,
const T &  rhs 
)

◆ operator-() [7/9]

template<size_t Size, typename T = float>
ValArray<Size, T> lug::Math::operator- ( const ValArray< Size, T > &  lhs,
const T &  rhs 
)

◆ operator*() [5/12]

template<size_t Size, typename T = float>
ValArray<Size, T> lug::Math::operator* ( const ValArray< Size, T > &  lhs,
const T &  rhs 
)

◆ operator/() [5/8]

template<size_t Size, typename T = float>
ValArray<Size, T> lug::Math::operator/ ( const ValArray< Size, T > &  lhs,
const T &  rhs 
)

◆ operator+() [6/7]

template<size_t Size, typename T = float>
ValArray<Size, T> lug::Math::operator+ ( const T &  lhs,
const ValArray< Size, T > &  rhs 
)

◆ operator-() [8/9]

template<size_t Size, typename T = float>
ValArray<Size, T> lug::Math::operator- ( const T &  lhs,
const ValArray< Size, T > &  rhs 
)

◆ operator*() [6/12]

template<size_t Size, typename T = float>
ValArray<Size, T> lug::Math::operator* ( const T &  lhs,
const ValArray< Size, T > &  rhs 
)

◆ operator/() [6/8]

template<size_t Size, typename T = float>
ValArray<Size, T> lug::Math::operator/ ( const T &  lhs,
const ValArray< Size, T > &  rhs 
)

◆ operator+() [7/7]

template<size_t Size, typename T = float>
ValArray<Size, T> lug::Math::operator+ ( const ValArray< Size, T > &  lhs,
const ValArray< Size, T > &  rhs 
)

◆ operator-() [9/9]

template<size_t Size, typename T = float>
ValArray<Size, T> lug::Math::operator- ( const ValArray< Size, T > &  lhs,
const ValArray< Size, T > &  rhs 
)

◆ operator*() [7/12]

template<size_t Size, typename T = float>
ValArray<Size, T> lug::Math::operator* ( const ValArray< Size, T > &  lhs,
const ValArray< Size, T > &  rhs 
)

◆ operator/() [7/8]

template<size_t Size, typename T = float>
ValArray<Size, T> lug::Math::operator/ ( const ValArray< Size, T > &  lhs,
const ValArray< Size, T > &  rhs 
)

◆ operator==() [3/3]

template<size_t Size, typename T = float>
bool lug::Math::operator== ( const ValArray< Size, T > &  lhs,
const ValArray< Size, T > &  rhs 
)

◆ operator!=() [3/3]

template<size_t Size, typename T = float>
bool lug::Math::operator!= ( const ValArray< Size, T > &  lhs,
const ValArray< Size, T > &  rhs 
)

◆ cross()

template<typename T >
constexpr Vector<3, T> lug::Math::cross ( const Vector< 3, T > &  lhs,
const Vector< 3, T > &  rhs 
)

◆ dot() [2/2]

template<uint8_t Rows, typename T >
constexpr T lug::Math::dot ( const Vector< Rows, T > &  lhs,
const Vector< Rows, T > &  rhs 
)

◆ outer()

template<uint8_t Rows, uint8_t Columns, typename T >
constexpr Matrix<Rows, Columns, T> lug::Math::outer ( const Vector< Rows, T > &  lhs,
const Vector< Columns, T > &  rhs 
)

◆ normalize() [2/2]

template<uint8_t Rows, typename T >
constexpr Vector<Rows, T> lug::Math::normalize ( const Vector< Rows, T > &  lhs)

◆ operator*() [8/12]

template<uint8_t Rows, typename T >
Vector<Rows, T> lug::Math::operator* ( const Vector< Rows, T > &  lhs,
const Vector< Rows, T > &  rhs 
)

◆ operator/() [8/8]

template<uint8_t Rows, typename T >
Vector<Rows, T> lug::Math::operator/ ( const Vector< Rows, T > &  lhs,
const Vector< Rows, T > &  rhs 
)

◆ operator*() [9/12]

template<uint8_t Rows, typename T >
Vector<Rows, T> lug::Math::operator* ( const Vector< Rows, T > &  lhs,
const Matrix< Rows, Rows, T > &  rhs 
)

◆ operator*() [10/12]

template<uint8_t Rows, typename T >
Vector<Rows, T> lug::Math::operator* ( const Matrix< Rows, Rows, T > &  lhs,
const Vector< Rows, T > &  rhs 
)

◆ operator*() [11/12]

template<typename T >
Vector<3, T> lug::Math::operator* ( const Vector< 3, T > &  lhs,
const Matrix< 4, 4, T > &  rhs 
)

◆ operator*() [12/12]

template<typename T >
Vector<3, T> lug::Math::operator* ( const Matrix< 4, 4, T > &  lhs,
const Vector< 3, T > &  rhs 
)

Variable Documentation

◆ Quaternion< float >

template class LUG_MATH_API lug::Math::Quaternion< float >

Definition at line 74 of file Quaternion.hpp.

◆ Quaternion< double >

template class LUG_MATH_API lug::Math::Quaternion< double >

Definition at line 77 of file Quaternion.hpp.