matrix_transform.hpp
Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 
00042 
00043 
00044 
00045 
00046 #ifndef GLM_GTC_matrix_transform
00047 #define GLM_GTC_matrix_transform 90
00048 
00049 // Dependency:
00050 #include "../glm.hpp"
00051 
00052 #if(defined(GLM_MESSAGES) && !defined(glm_ext))
00053 #       pragma message("GLM: GLM_GTC_matrix_transform extension included")
00054 #endif
00055 
00056 namespace glm
00057 {
00060 
00084         template <typename T> 
00085         detail::tmat4x4<T> translate(
00086                 detail::tmat4x4<T> const & m,
00087                 detail::tvec3<T> const & v);
00088                 
00095         template <typename T> 
00096         detail::tmat4x4<T> rotate(
00097                 detail::tmat4x4<T> const & m,
00098                 T const & angle, 
00099                 detail::tvec3<T> const & v);
00100 
00107         template <typename T> 
00108         detail::tmat4x4<T> scale(
00109                 detail::tmat4x4<T> const & m,
00110                 detail::tvec3<T> const & v);
00111 
00115         template <typename T> 
00116         detail::tmat4x4<T> ortho(
00117                 T const & left, 
00118                 T const & right, 
00119                 T const & bottom, 
00120                 T const & top, 
00121                 T const & zNear, 
00122                 T const & zFar);
00123 
00127         template <typename T> 
00128         detail::tmat4x4<T> ortho(
00129                 T const & left, 
00130                 T const & right, 
00131                 T const & bottom, 
00132                 T const & top);
00133 
00136         template <typename T> 
00137         detail::tmat4x4<T> frustum(
00138                 T const & left, 
00139                 T const & right, 
00140                 T const & bottom, 
00141                 T const & top, 
00142                 T const & nearVal, 
00143                 T const & farVal);
00144 
00147         template <typename T> 
00148         detail::tmat4x4<T> perspective(
00149                 T const & fovy, 
00150                 T const & aspect, 
00151                 T const & zNear, 
00152                 T const & zFar);
00153 
00156         template <typename valType> 
00157         detail::tmat4x4<valType> perspectiveFov(
00158                 valType const & fov, 
00159                 valType const & width, 
00160                 valType const & height, 
00161                 valType const & zNear, 
00162                 valType const & zFar);
00163 
00166     template <typename T> 
00167         detail::tmat4x4<T> infinitePerspective(
00168                 T fovy, T aspect, T zNear);
00169 
00172     template <typename T> 
00173         detail::tmat4x4<T> tweakedInfinitePerspective(
00174                 T fovy, T aspect, T zNear);
00175 
00178         template <typename T, typename U> 
00179         detail::tvec3<T> project(
00180                 detail::tvec3<T> const & obj, 
00181                 detail::tmat4x4<T> const & model, 
00182                 detail::tmat4x4<T> const & proj, 
00183                 detail::tvec4<U> const & viewport);
00184 
00187         template <typename T, typename U> 
00188         detail::tvec3<T> unProject(
00189                 detail::tvec3<T> const & win, 
00190                 detail::tmat4x4<T> const & model, 
00191                 detail::tmat4x4<T> const & proj, 
00192                 detail::tvec4<U> const & viewport);
00193 
00196         template <typename T, typename U> 
00197         detail::tmat4x4<T> pickMatrix(
00198                 detail::tvec2<T> const & center, 
00199                 detail::tvec2<T> const & delta, 
00200                 detail::tvec4<U> const & viewport);
00201 
00208         template <typename T> 
00209         detail::tmat4x4<T> lookAt(
00210                 detail::tvec3<T> const & eye, 
00211                 detail::tvec3<T> const & center, 
00212                 detail::tvec3<T> const & up);
00213 
00215 }//namespace glm
00216 
00217 #include "matrix_transform.inl"
00218 
00219 #endif//GLM_GTC_matrix_transform