GLM Version 0.9.0

transform2.hpp

00001 
00002 // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
00004 // Created : 2005-12-21
00005 // Updated : 2006-11-13
00006 // Licence : This source is under MIT License
00007 // File    : glm/gtx/transform2.hpp
00009 // Dependency:
00010 // - GLM core
00011 // - GLM_GTX_transform
00013 
00014 #ifndef glm_gtx_transform2
00015 #define glm_gtx_transform2
00016 
00017 // Dependency:
00018 #include "../glm.hpp"
00019 #include "../gtx/transform.hpp"
00020 
00021 namespace glm
00022 {
00023         namespace test{
00024                 void main_gtx_transform2();
00025         }//namespace test
00026 
00027     namespace gtx{
00029         namespace transform2
00030         {
00031                 using namespace gtx::transform;
00032 
00035                 template <typename T> 
00036                 detail::tmat3x3<T> shearX2D(
00037                         detail::tmat3x3<T> const & m, 
00038                         T y);
00039 
00042                 template <typename T> 
00043                 detail::tmat3x3<T> shearY2D(
00044                         detail::tmat3x3<T> const & m, 
00045                         T x);
00046 
00049                 template <typename T> 
00050                 detail::tmat4x4<T> shearX3D(
00051                         const detail::tmat4x4<T> & m,
00052                         T y, 
00053                         T z);
00054                 
00057                 template <typename T> 
00058                 detail::tmat4x4<T> shearY3D(
00059                         const detail::tmat4x4<T> & m, 
00060                         T x, 
00061                         T z);
00062                 
00065                 template <typename T> 
00066                 detail::tmat4x4<T> shearZ3D(
00067                         const detail::tmat4x4<T> & m, 
00068                         T x, 
00069                         T y);
00070 
00071                 //template <typename T> inline detail::tmat4x4<T> shear(const detail::tmat4x4<T> & m, shearPlane, planePoint, angle)
00072                 // Identity + tan(angle) * cross(Normal, OnPlaneVector)     0
00073                 // - dot(PointOnPlane, normal) * OnPlaneVector              1
00074 
00075                 // Reflect functions seem to don't work
00076                 //template <typename T> detail::tmat3x3<T> reflect2D(const detail::tmat3x3<T> & m, const detail::tvec3<T>& normal){return reflect2DGTX(m, normal);}                                                                     //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
00077                 //template <typename T> detail::tmat4x4<T> reflect3D(const detail::tmat4x4<T> & m, const detail::tvec3<T>& normal){return reflect3DGTX(m, normal);}                                                                     //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension)
00078                 
00081                 template <typename T> 
00082                 detail::tmat3x3<T> proj2D(
00083                         const detail::tmat3x3<T> & m, 
00084                         const detail::tvec3<T>& normal);
00085                                 
00088                 template <typename T> 
00089                 detail::tmat4x4<T> proj3D(
00090                         const detail::tmat4x4<T> & m, 
00091                         const detail::tvec3<T>& normal);
00092 
00095                 template <typename T> 
00096                 detail::tmat4x4<T> lookAt(
00097                         detail::tvec3<T> const & eye, 
00098                         detail::tvec3<T> const & center, 
00099                         detail::tvec3<T> const & up);
00100 
00103                 template <typename valType> 
00104                 detail::tmat4x4<valType> scaleBias(
00105                         valType scale, 
00106                         valType bias);
00107 
00110                 template <typename valType> 
00111                 detail::tmat4x4<valType> scaleBias(
00112                         detail::tmat4x4<valType> const & m, 
00113                         valType scale, 
00114                         valType bias);
00115 
00116         }//namespace transform2
00117     }//namespace gtx
00118 }//namespace glm
00119 
00120 #include "transform2.inl"
00121 
00122 namespace glm{using namespace gtx::transform2;}
00123 
00124 #endif//glm_gtx_transform2