46 #ifndef GLM_GTC_matrix_transform
47 #define GLM_GTC_matrix_transform
50 #include "../mat4x4.hpp"
51 #include "../vec2.hpp"
52 #include "../vec3.hpp"
53 #include "../vec4.hpp"
55 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
56 # pragma message("GLM: GLM_GTC_matrix_transform extension included")
84 template <
typename T, precision P>
85 GLM_FUNC_DECL detail::tmat4x4<T, P>
translate(
86 detail::tmat4x4<T, P>
const & m,
87 detail::tvec3<T, P>
const & v);
100 template <
typename T, precision P>
101 GLM_FUNC_DECL detail::tmat4x4<T, P>
rotate(
102 detail::tmat4x4<T, P>
const & m,
104 detail::tvec3<T, P>
const &
axis);
116 template <
typename T, precision P>
117 GLM_FUNC_DECL detail::tmat4x4<T, P>
scale(
118 detail::tmat4x4<T, P>
const & m,
119 detail::tvec3<T, P>
const & v);
132 template <
typename T>
133 GLM_FUNC_DECL detail::tmat4x4<T, defaultp>
ortho(
150 template <
typename T>
151 GLM_FUNC_DECL detail::tmat4x4<T, defaultp>
ortho(
167 template <
typename T, precision P>
168 GLM_FUNC_DECL detail::tmat4x4<T, P>
frustum(
184 template <
typename T, precision P>
200 template <
typename T, precision P>
215 template <
typename T, precision P>
217 T fovy, T aspect, T near);
226 template <
typename T, precision P>
228 T fovy, T aspect, T near);
239 template <
typename T,
typename U, precision P>
240 GLM_FUNC_DECL detail::tvec3<T, P>
project(
241 detail::tvec3<T, P>
const & obj,
242 detail::tmat4x4<T, P>
const & model,
243 detail::tmat4x4<T, P>
const &
proj,
244 detail::tvec4<U, P>
const & viewport);
255 template <
typename T,
typename U, precision P>
256 GLM_FUNC_DECL detail::tvec3<T, P>
unProject(
257 detail::tvec3<T, P>
const & win,
258 detail::tmat4x4<T, P>
const & model,
259 detail::tmat4x4<T, P>
const &
proj,
260 detail::tvec4<U, P>
const & viewport);
270 template <
typename T, precision P,
typename U>
271 GLM_FUNC_DECL detail::tmat4x4<T, P>
pickMatrix(
272 detail::tvec2<T, P>
const & center,
273 detail::tvec2<T, P>
const & delta,
274 detail::tvec4<U, P>
const & viewport);
283 template <
typename T, precision P>
284 GLM_FUNC_DECL detail::tmat4x4<T, P>
lookAt(
285 detail::tvec3<T, P>
const & eye,
286 detail::tvec3<T, P>
const & center,
287 detail::tvec3<T, P>
const & up);
292 #include "matrix_transform.inl"
294 #endif//GLM_GTC_matrix_transform
GLM_FUNC_DECL detail::tmat4x4< T, P > rotate(detail::tmat4x4< T, P > const &m, T const &angle, detail::tvec3< T, P > const &axis)
Builds a rotation 4 * 4 matrix created from an axis vector and an angle.
vecType proj(vecType const &x, vecType const &Normal)
Projects x on Normal.
GLM_FUNC_DECL T angle(detail::tquat< T, P > const &x)
Returns the quaternion rotation angle.
GLM_FUNC_DECL detail::tmat4x4< T, P > scale(detail::tmat4x4< T, P > const &m, detail::tvec3< T, P > const &v)
Builds a scale 4 * 4 matrix created from 3 scalars.
GLM_FUNC_DECL detail::tmat4x4< T, P > tweakedInfinitePerspective(T fovy, T aspect, T near)
Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics har...
GLM_FUNC_DECL detail::tmat4x4< T, P > translate(detail::tmat4x4< T, P > const &m, detail::tvec3< T, P > const &v)
Builds a translation 4 * 4 matrix created from a vector of 3 components.
GLM_FUNC_DECL detail::tmat4x4< T, P > perspective(T const &fovy, T const &aspect, T const &near, T const &far)
Creates a matrix for a symetric perspective-view frustum.
GLM_FUNC_DECL detail::tmat4x4< T, P > pickMatrix(detail::tvec2< T, P > const ¢er, detail::tvec2< T, P > const &delta, detail::tvec4< U, P > const &viewport)
Define a picking region.
GLM_FUNC_DECL detail::tmat4x4< T, P > infinitePerspective(T fovy, T aspect, T near)
Creates a matrix for a symmetric perspective-view frustum with far plane at infinite.
GLM_FUNC_DECL detail::tmat4x4< T, defaultp > ortho(T const &left, T const &right, T const &bottom, T const &top, T const &zNear, T const &zFar)
Creates a matrix for an orthographic parallel viewing volume.
GLM_FUNC_DECL detail::tvec3< T, P > axis(detail::tquat< T, P > const &x)
Returns the q rotation axis.
GLM_FUNC_DECL detail::tvec3< T, P > unProject(detail::tvec3< T, P > const &win, detail::tmat4x4< T, P > const &model, detail::tmat4x4< T, P > const &proj, detail::tvec4< U, P > const &viewport)
Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.
GLM_FUNC_DECL detail::tmat4x4< T, P > perspectiveFov(T const &fov, T const &width, T const &height, T const &near, T const &far)
Builds a perspective projection matrix based on a field of view.
GLM_FUNC_DECL detail::tmat4x4< T, P > lookAt(detail::tvec3< T, P > const &eye, detail::tvec3< T, P > const ¢er, detail::tvec3< T, P > const &up)
Build a look at view matrix.
GLM_FUNC_DECL detail::tmat4x4< T, P > frustum(T const &left, T const &right, T const &bottom, T const &top, T const &near, T const &far)
Creates a frustum matrix.
GLM_FUNC_DECL detail::tvec3< T, P > project(detail::tvec3< T, P > const &obj, detail::tmat4x4< T, P > const &model, detail::tmat4x4< T, P > const &proj, detail::tvec4< U, P > const &viewport)
Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.