This file will define Vector and various vector functions.
In most cases you should include Vector.hpp instead, which provides additional helper functions (but has more dependencies).
This file is part of the Lumina Graphics Framework.
Go to the source code of this file.
Classes | |
| struct | VectorImpl< T, N > |
| Specialized helper base struct for Vector. More... | |
| struct | VectorImpl< T, 2 > |
| struct | VectorImpl< T, 3 > |
| struct | VectorImpl< T, 4 > |
| class | VectorIterator< T, N > |
| struct | Vector< T, N > |
| Represents a vector with arbitrary dimension and type of elements. More... | |
| class | VectorIterator< T, N > |
Functions | |
| constexpr std::size_t | vecMin (std::size_t a, std::size_t b) |
| Calculates the smaller number at compile time. More... | |
| template<typename T1 , typename T2 , std::size_t N> | |
| auto | operator+ (const Vector< T1, N > &v1, const Vector< T2, N > &v2) -> Vector< decltype(T1(0)+T2(0)), N > |
| template<typename T1 , typename T2 , std::size_t N> | |
| auto | operator- (const Vector< T1, N > &v1, const Vector< T2, N > &v2) -> Vector< decltype(T1(0)-T2(0)), N > |
| template<typename T1 , typename T2 , std::size_t N> | |
| auto | operator* (const Vector< T1, N > &v, T2 scalar) -> Vector< decltype(T1(0)*T2(0)), N > |
| template<typename T1 , typename T2 , std::size_t N> | |
| auto | operator* (T2 scalar, const Vector< T1, N > &v) -> Vector< decltype(T1(0)*T2(0)), N > |
| template<typename T1 , typename T2 , std::size_t N> | |
| auto | operator/ (const Vector< T1, N > &v, T2 scalar) -> Vector< decltype(T1(0)/T2(0)), N > |
| template<typename T1 , typename T2 , std::size_t N> | |
| auto | operator/ (T2 scalar, const Vector< T1, N > &v) -> Vector< decltype(T1(0)/T2(0)), N > |
| template<typename T1 , typename T2 , std::size_t N> | |
| auto | dot (const Vector< T1, N > &lh, const Vector< T2, N > &rh) -> decltype(T1(0)+T2(0)) |
| template<typename T1 , typename T2 > | |
| auto | cross (const Vector< T1, 3 > &lh, const Vector< T2, 3 > &rh) -> Vector< decltype(T1(0)*T2(0)), 3 > |
| template<typename T1 , typename T2 , std::size_t N> | |
| auto | distance (const Vector< T1, N > &a, const Vector< T2, N > &b) -> decltype((a-b).length()) |
| template<typename T1 , typename T2 , std::size_t N> | |
| auto | angle (const Vector< T1, N > &a, const Vector< T2, N > &b) -> decltype(acos(a.length()*b.length())) |
| template<typename Tdst , typename Tsrc , std::size_t N> | |
| Vector< Tdst, N > | vector_cast (const Vector< Tsrc, N > &in) |
| template<std::size_t Ndst, std::size_t Nsrc, typename T > | |
| Vector< T, Ndst > | vector_cast (const Vector< T, Nsrc > &in) |
| template<typename Tdst , std::size_t Ndst, typename Tsrc , std::size_t Nsrc> | |
| Vector< Tdst, Ndst > | vector_cast (const Vector< Tsrc, Nsrc > &in) |
| template<typename T , std::size_t N> | |
| Vector< T, N >::iterator | begin (Vector< T, N > v) |
| template<typename T , std::size_t N> | |
| Vector< T, N >::iterator | end (Vector< T, N > v) |
Variables | |
| constexpr double | vecPI = 3.14159265359 |
| definition of PI | |