53 #include "../mat4x4.hpp"
54 #include "../vec2.hpp"
55 #include "../vec3.hpp"
56 #include "../vec4.hpp"
57 #include "../gtc/constants.hpp"
59 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
60 # pragma message("GLM: GLM_GTC_matrix_transform extension included")
86 template <
typename T, precision P>
88 tmat4x4<T, P>
const & m,
89 tvec3<T, P>
const & v);
100 template <
typename T, precision P>
101 GLM_FUNC_DECL tmat4x4<T, P>
rotate(
102 tmat4x4<T, P>
const & m,
104 tvec3<T, P>
const &
axis);
114 template <
typename T, precision P>
115 GLM_FUNC_DECL tmat4x4<T, P>
scale(
116 tmat4x4<T, P>
const & m,
117 tvec3<T, P>
const & v);
130 template <
typename T>
131 GLM_FUNC_DECL tmat4x4<T, defaultp>
ortho(
148 template <
typename T>
149 GLM_FUNC_DECL tmat4x4<T, defaultp>
ortho(
165 template <
typename T>
166 GLM_FUNC_DECL tmat4x4<T, defaultp>
frustum(
182 template <
typename T>
198 template <
typename T>
213 template <
typename T>
229 template <
typename T>
246 template <
typename T>
263 template <
typename T>
278 template <
typename T>
280 T fovy, T aspect, T near);
289 template <
typename T>
291 T fovy, T aspect, T near);
301 template <
typename T>
303 T fovy, T aspect, T near, T ep);
315 template <
typename T,
typename U, precision P>
316 GLM_FUNC_DECL tvec3<T, P>
project(
317 tvec3<T, P>
const & obj,
318 tmat4x4<T, P>
const & model,
319 tmat4x4<T, P>
const &
proj,
320 tvec4<U, P>
const & viewport);
332 template <
typename T,
typename U, precision P>
334 tvec3<T, P>
const & win,
335 tmat4x4<T, P>
const & model,
336 tmat4x4<T, P>
const &
proj,
337 tvec4<U, P>
const & viewport);
347 template <
typename T, precision P,
typename U>
349 tvec2<T, P>
const & center,
350 tvec2<T, P>
const & delta,
351 tvec4<U, P>
const & viewport);
360 template <
typename T, precision P>
361 GLM_FUNC_DECL tmat4x4<T, P>
lookAt(
362 tvec3<T, P>
const & eye,
363 tvec3<T, P>
const & center,
364 tvec3<T, P>
const & up);
373 template <
typename T, precision P>
374 GLM_FUNC_DECL tmat4x4<T, P>
lookAtRH(
375 tvec3<T, P>
const & eye,
376 tvec3<T, P>
const & center,
377 tvec3<T, P>
const & up);
386 template <
typename T, precision P>
387 GLM_FUNC_DECL tmat4x4<T, P>
lookAtLH(
388 tvec3<T, P>
const & eye,
389 tvec3<T, P>
const & center,
390 tvec3<T, P>
const & up);
395 #include "matrix_transform.inl"
GLM_FUNC_DECL vecType proj(vecType const &x, vecType const &Normal)
Projects x on Normal.
GLM_FUNC_DECL tmat4x4< T, P > translate(tmat4x4< T, P > const &m, tvec3< T, P > const &v)
Builds a translation 4 * 4 matrix created from a vector of 3 components.
GLM_FUNC_DECL tmat4x4< T, defaultp > perspectiveFov(T fov, T width, T height, T near, T far)
Builds a perspective projection matrix based on a field of view and the default handedness.
GLM_FUNC_DECL tmat4x4< T, defaultp > tweakedInfinitePerspective(T fovy, T aspect, T near, T ep)
Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics har...
GLM_FUNC_DECL tmat4x4< T, defaultp > perspective(T fovy, T aspect, T near, T far)
Creates a matrix for a symetric perspective-view frustum based on the default handedness.
GLM_FUNC_DECL tmat4x4< T, defaultp > perspectiveRH(T fovy, T aspect, T near, T far)
Creates a matrix for a right handed, symetric perspective-view frustum.
GLM_FUNC_DECL tvec3< T, P > unProject(tvec3< T, P > const &win, tmat4x4< T, P > const &model, tmat4x4< T, P > const &proj, tvec4< U, P > const &viewport)
Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.
GLM_FUNC_DECL tmat4x4< T, defaultp > ortho(T left, T right, T bottom, T top)
Creates a matrix for projecting two-dimensional coordinates onto the screen.
GLM_FUNC_DECL tmat4x4< T, P > lookAt(tvec3< T, P > const &eye, tvec3< T, P > const ¢er, tvec3< T, P > const &up)
Build a look at view matrix based on the default handedness.
GLM_FUNC_DECL tmat4x4< T, P > pickMatrix(tvec2< T, P > const ¢er, tvec2< T, P > const &delta, tvec4< U, P > const &viewport)
Define a picking region.
GLM_FUNC_DECL tmat4x4< T, defaultp > perspectiveLH(T fovy, T aspect, T near, T far)
Creates a matrix for a left handed, symetric perspective-view frustum.
GLM_FUNC_DECL tmat4x4< T, defaultp > infinitePerspective(T fovy, T aspect, T near)
Creates a matrix for a symmetric perspective-view frustum with far plane at infinite.
GLM_FUNC_DECL tvec3< T, P > project(tvec3< T, P > const &obj, tmat4x4< T, P > const &model, tmat4x4< T, P > const &proj, tvec4< U, P > const &viewport)
Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.
GLM_FUNC_DECL tvec3< T, P > axis(tquat< T, P > const &x)
Returns the q rotation axis.
GLM_FUNC_DECL tmat4x4< T, defaultp > perspectiveFovRH(T fov, T width, T height, T near, T far)
Builds a right handed perspective projection matrix based on a field of view.
GLM_FUNC_DECL T angle(tquat< T, P > const &x)
Returns the quaternion rotation angle.
GLM_FUNC_DECL tmat4x4< T, defaultp > frustum(T left, T right, T bottom, T top, T near, T far)
Creates a frustum matrix.
GLM_FUNC_DECL tmat4x4< T, P > lookAtLH(tvec3< T, P > const &eye, tvec3< T, P > const ¢er, tvec3< T, P > const &up)
Build a left handed look at view matrix.
GLM_FUNC_DECL tmat4x4< T, P > rotate(tmat4x4< T, P > const &m, T angle, tvec3< T, P > const &axis)
Builds a rotation 4 * 4 matrix created from an axis vector and an angle.
GLM_FUNC_DECL tmat4x4< T, defaultp > perspectiveFovLH(T fov, T width, T height, T near, T far)
Builds a left handed perspective projection matrix based on a field of view.
GLM_FUNC_DECL tmat4x4< T, P > lookAtRH(tvec3< T, P > const &eye, tvec3< T, P > const ¢er, tvec3< T, P > const &up)
Build a right handed look at view matrix.
GLM_FUNC_DECL tmat4x4< T, P > scale(tmat4x4< T, P > const &m, tvec3< T, P > const &v)
Builds a scale 4 * 4 matrix created from 3 scalars.