0.9.9 API documentation
matrix_projection.hpp
Go to the documentation of this file.
1 
20 #pragma once
21 
22 // Dependencies
23 #include "../gtc/constants.hpp"
24 #include "../geometric.hpp"
25 #include "../trigonometric.hpp"
26 #include "../matrix.hpp"
27 
28 #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
29 # pragma message("GLM: GLM_EXT_matrix_projection extension included")
30 #endif
31 
32 namespace glm
33 {
36 
49  template<typename T, typename U, qualifier Q>
50  GLM_FUNC_DECL vec<3, T, Q> projectZO(
51  vec<3, T, Q> const& obj, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
52 
65  template<typename T, typename U, qualifier Q>
66  GLM_FUNC_DECL vec<3, T, Q> projectNO(
67  vec<3, T, Q> const& obj, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
68 
81  template<typename T, typename U, qualifier Q>
82  GLM_FUNC_DECL vec<3, T, Q> project(
83  vec<3, T, Q> const& obj, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
84 
97  template<typename T, typename U, qualifier Q>
98  GLM_FUNC_DECL vec<3, T, Q> unProjectZO(
99  vec<3, T, Q> const& win, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
100 
113  template<typename T, typename U, qualifier Q>
114  GLM_FUNC_DECL vec<3, T, Q> unProjectNO(
115  vec<3, T, Q> const& win, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
116 
129  template<typename T, typename U, qualifier Q>
130  GLM_FUNC_DECL vec<3, T, Q> unProject(
131  vec<3, T, Q> const& win, mat<4, 4, T, Q> const& model, mat<4, 4, T, Q> const& proj, vec<4, U, Q> const& viewport);
132 
142  template<typename T, qualifier Q, typename U>
143  GLM_FUNC_DECL mat<4, 4, T, Q> pickMatrix(
144  vec<2, T, Q> const& center, vec<2, T, Q> const& delta, vec<4, U, Q> const& viewport);
145 
147 }//namespace glm
148 
149 #include "matrix_projection.inl"
GLM_FUNC_DECL mat< 4, 4, T, Q > pickMatrix(vec< 2, T, Q > const &center, vec< 2, T, Q > const &delta, vec< 4, U, Q > const &viewport)
Define a picking region.
GLM_FUNC_DECL vec< 3, T, Q > projectNO(vec< 3, T, Q > const &obj, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.
GLM_FUNC_DECL genType proj(genType const &x, genType const &Normal)
Projects x on Normal.
GLM_FUNC_DECL vec< 3, T, Q > projectZO(vec< 3, T, Q > const &obj, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.
GLM_FUNC_DECL vec< 3, T, Q > unProjectNO(vec< 3, T, Q > const &win, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.
GLM_FUNC_DECL vec< 3, T, Q > unProjectZO(vec< 3, T, Q > const &win, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.
GLM_FUNC_DECL vec< 3, T, Q > project(vec< 3, T, Q > const &obj, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates using default near...
GLM_FUNC_DECL vec< 3, T, Q > unProject(vec< 3, T, Q > const &win, mat< 4, 4, T, Q > const &model, mat< 4, 4, T, Q > const &proj, vec< 4, U, Q > const &viewport)
Map the specified window coordinates (win.x, win.y, win.z) into object coordinates using default near...
Definition: common.hpp:20