Lugdunum  0.1.0
Transform.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 #include <lug/Math/Matrix.hpp>
5 #include <lug/Math/Vector.hpp>
6 
7 namespace lug {
8 namespace Math {
9 namespace Geometry {
10 
11 // TODO: project, unproject, maybe some others projection matrices
12 
13 template <typename T>
14 Matrix<4, 4, T> translate(const Vector<3, T>& direction);
15 
16 template <typename T>
17 Matrix<4, 4, T> rotate(T angle, const Vector<3, T>& axis);
18 
19 template <typename T>
20 Matrix<4, 4, T> scale(const Vector<3, T>& factors);
21 
22 template <typename T>
23 Matrix<4, 4, T> lookAt(const Vector<3, T>& eye, const Vector<3, T>& center, const Vector<3, T>& up);
24 
25 template <typename T>
26 Matrix<4, 4, T> ortho(T left, T right, T bottom, T top, T zNear, T zFar);
27 
28 template <typename T>
29 Matrix<4, 4, T> perspective(T fovy, T aspect, T zNear, T zFar);
30 
32 
33 } // Geometry
34 } // Math
35 } // lug
Matrix< 4, 4, T > translate(const Vector< 3, T > &direction)
Matrix< 4, 4, T > rotate(T angle, const Vector< 3, T > &axis)
Matrix< 4, 4, T > ortho(T left, T right, T bottom, T top, T zNear, T zFar)
Definition: Transform.inl:81
Matrix< 4, 4, T > lookAt(const Vector< 3, T > &eye, const Vector< 3, T > &center, const Vector< 3, T > &up)
Matrix< 4, 4, T > scale(const Vector< 3, T > &factors)
Matrix< 4, 4, T > perspective(T fovy, T aspect, T zNear, T zFar)
Definition: Transform.inl:95