/////////////////////////////////////////////////////////////////////////////////////////////////// // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) /////////////////////////////////////////////////////////////////////////////////////////////////// // Created : 2005-12-21 // Updated : 2006-11-13 // Licence : This source is under MIT License // File : glm/gtx/transform2.hpp /////////////////////////////////////////////////////////////////////////////////////////////////// // Dependency: // - GLM core // - GLM_GTX_transform /////////////////////////////////////////////////////////////////////////////////////////////////// #ifndef glm_gtx_transform2 #define glm_gtx_transform2 // Dependency: #include "../glm.hpp" #include "../gtx/transform.hpp" #if(defined(GLM_MESSAGES) && !defined(glm_ext)) # pragma message("GLM: GLM_GTX_transform2 extension included") #endif namespace glm{ namespace gtx{ namespace transform2 ///< GLM_GTX_transform2 extension: Add extra transformation matrices { using namespace gtx::transform; /// \addtogroup gtx_transform2 /// @{ //! Transforms a matrix with a shearing on X axis. //! From GLM_GTX_transform2 extension. template detail::tmat3x3 shearX2D( detail::tmat3x3 const & m, T y); //! Transforms a matrix with a shearing on Y axis. //! From GLM_GTX_transform2 extension. template detail::tmat3x3 shearY2D( detail::tmat3x3 const & m, T x); //! Transforms a matrix with a shearing on X axis //! From GLM_GTX_transform2 extension. template detail::tmat4x4 shearX3D( const detail::tmat4x4 & m, T y, T z); //! Transforms a matrix with a shearing on Y axis. //! From GLM_GTX_transform2 extension. template detail::tmat4x4 shearY3D( const detail::tmat4x4 & m, T x, T z); //! Transforms a matrix with a shearing on Z axis. //! From GLM_GTX_transform2 extension. template detail::tmat4x4 shearZ3D( const detail::tmat4x4 & m, T x, T y); //template GLM_FUNC_QUALIFIER detail::tmat4x4 shear(const detail::tmat4x4 & m, shearPlane, planePoint, angle) // Identity + tan(angle) * cross(Normal, OnPlaneVector) 0 // - dot(PointOnPlane, normal) * OnPlaneVector 1 // Reflect functions seem to don't work //template detail::tmat3x3 reflect2D(const detail::tmat3x3 & m, const detail::tvec3& normal){return reflect2DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension) //template detail::tmat4x4 reflect3D(const detail::tmat4x4 & m, const detail::tvec3& normal){return reflect3DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension) //! Build planar projection matrix along normal axis. //! From GLM_GTX_transform2 extension. template detail::tmat3x3 proj2D( const detail::tmat3x3 & m, const detail::tvec3& normal); //! Build planar projection matrix along normal axis. //! From GLM_GTX_transform2 extension. template detail::tmat4x4 proj3D( const detail::tmat4x4 & m, const detail::tvec3& normal); //! Build a scale bias matrix. //! From GLM_GTX_transform2 extension. template detail::tmat4x4 scaleBias( valType scale, valType bias); //! Build a scale bias matrix. //! From GLM_GTX_transform2 extension. template detail::tmat4x4 scaleBias( detail::tmat4x4 const & m, valType scale, valType bias); /// @} }// namespace transform2 }// namespace gtx }// namespace glm #include "transform2.inl" namespace glm{using namespace gtx::transform2;} #endif//glm_gtx_transform2