• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 ///////////////////////////////////////////////////////////////////////////////////
2 /// OpenGL Mathematics (glm.g-truc.net)
3 ///
4 /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
5 /// Permission is hereby granted, free of charge, to any person obtaining a copy
6 /// of this software and associated documentation files (the "Software"), to deal
7 /// in the Software without restriction, including without limitation the rights
8 /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 /// copies of the Software, and to permit persons to whom the Software is
10 /// furnished to do so, subject to the following conditions:
11 ///
12 /// The above copyright notice and this permission notice shall be included in
13 /// all copies or substantial portions of the Software.
14 ///
15 /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 /// THE SOFTWARE.
22 ///
23 /// @ref gtx_transform
24 /// @file glm/gtx/transform.hpp
25 /// @date 2005-12-21 / 2011-06-07
26 /// @author Christophe Riccio
27 ///
28 /// @see core (dependence)
29 /// @see gtc_matrix_transform (dependence)
30 /// @see gtx_transform
31 /// @see gtx_transform2
32 ///
33 /// @defgroup gtx_transform GLM_GTX_transform
34 /// @ingroup gtx
35 ///
36 /// @brief Add transformation matrices
37 ///
38 /// <glm/gtx/transform.hpp> need to be included to use these functionalities.
39 ///////////////////////////////////////////////////////////////////////////////////
40 
41 #ifndef GLM_GTX_transform
42 #define GLM_GTX_transform
43 
44 // Dependency:
45 #include "../glm.hpp"
46 #include "../gtc/matrix_transform.hpp"
47 
48 #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
49 #	pragma message("GLM: GLM_GTX_transform extension included")
50 #endif
51 
52 namespace glm
53 {
54 	/// @addtogroup gtx_transform
55 	/// @{
56 
57 	/// Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars.
58 	/// - From \link gtx_transform GLM_GTX_transform \endlink extension
59 	/// - See also: \link glm::translate GLM_GTC_matrix_transform \endlink
60 	template <typename T, precision P>
61 	GLM_FUNC_DECL detail::tmat4x4<T, P> translate(
62 		detail::tvec3<T, P> const & v);
63 
64 	/// Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees.
65 	/// - From \link gtx_transform GLM_GTX_transform \endlink extension
66 	/// - See also: \link glm::rotate GLM_GTC_matrix_transform \endlink
67 	template <typename T, precision P>
68 	GLM_FUNC_DECL detail::tmat4x4<T, P> rotate(
69 		T angle,
70 		detail::tvec3<T, P> const & v);
71 
72 	/// Transforms a matrix with a scale 4 * 4 matrix created from a vector of 3 components.
73 	/// - From \link gtx_transform GLM_GTX_transform \endlink extension
74 	/// - See also: \link glm::scale GLM_GTC_matrix_transform \endlink
75 	template <typename T, precision P>
76 	GLM_FUNC_DECL detail::tmat4x4<T, P> scale(
77 		detail::tvec3<T, P> const & v);
78 
79 	/// @}
80 }// namespace glm
81 
82 #include "transform.inl"
83 
84 #endif//GLM_GTX_transform
85