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 #if(defined(GLM_MESSAGES) && !defined(glm_ext))
00022 #       pragma message("GLM: GLM_GTX_transform2 extension included")
00023 #endif
00024 
00025 namespace glm
00026 {
00027         namespace test{
00028                 void main_gtx_transform2();
00029         }//namespace test
00030 
00031     namespace gtx{
00033         namespace transform2
00034         {
00035                 using namespace gtx::transform;
00036 
00039 
00042                 template <typename T> 
00043                 detail::tmat3x3<T> shearX2D(
00044                         detail::tmat3x3<T> const & m, 
00045                         T y);
00046 
00049                 template <typename T> 
00050                 detail::tmat3x3<T> shearY2D(
00051                         detail::tmat3x3<T> const & m, 
00052                         T x);
00053 
00056                 template <typename T> 
00057                 detail::tmat4x4<T> shearX3D(
00058                         const detail::tmat4x4<T> & m,
00059                         T y, 
00060                         T z);
00061                 
00064                 template <typename T> 
00065                 detail::tmat4x4<T> shearY3D(
00066                         const detail::tmat4x4<T> & m, 
00067                         T x, 
00068                         T z);
00069                 
00072                 template <typename T> 
00073                 detail::tmat4x4<T> shearZ3D(
00074                         const detail::tmat4x4<T> & m, 
00075                         T x, 
00076                         T y);
00077 
00078                 //template <typename T> inline detail::tmat4x4<T> shear(const detail::tmat4x4<T> & m, shearPlane, planePoint, angle)
00079                 // Identity + tan(angle) * cross(Normal, OnPlaneVector)     0
00080                 // - dot(PointOnPlane, normal) * OnPlaneVector              1
00081 
00082                 // Reflect functions seem to don't work
00083                 //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)
00084                 //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)
00085                 
00088                 template <typename T> 
00089                 detail::tmat3x3<T> proj2D(
00090                         const detail::tmat3x3<T> & m, 
00091                         const detail::tvec3<T>& normal);
00092                                 
00095                 template <typename T> 
00096                 detail::tmat4x4<T> proj3D(
00097                         const detail::tmat4x4<T> & m, 
00098                         const detail::tvec3<T>& normal);
00099 
00102                 template <typename valType> 
00103                 detail::tmat4x4<valType> scaleBias(
00104                         valType scale, 
00105                         valType bias);
00106 
00109                 template <typename valType> 
00110                 detail::tmat4x4<valType> scaleBias(
00111                         detail::tmat4x4<valType> const & m, 
00112                         valType scale, 
00113                         valType bias);
00114 
00116 
00117         }//namespace transform2
00118     }//namespace gtx
00119 }//namespace glm
00120 
00121 #include "transform2.inl"
00122 
00123 namespace glm{using namespace gtx::transform2;}
00124 
00125 #endif//glm_gtx_transform2