~mir-team/mir/in-process-egl+input-conglomeration

« back to all changes in this revision

Viewing changes to 3rd_party/glm/glm/gtx/transform.hpp

Merged trunk and fixed issues

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
///////////////////////////////////////////////////////////////////////////////////
2
 
/// OpenGL Mathematics (glm.g-truc.net)
3
 
///
4
 
/// Copyright (c) 2005 - 2012 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: Extented transformation matrices
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 GLM_VERSION
43
 
 
44
 
// Dependency:
45
 
#include "../glm.hpp"
46
 
#include "../gtc/matrix_transform.hpp"
47
 
 
48
 
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
49
 
#       pragma message("GLM: GLM_GTX_transform extension included")
50
 
#endif
51
 
 
52
 
namespace glm
53
 
{
54
 
        /// @addtogroup gtx_transform
55
 
        /// @{
56
 
 
57
 
        //! Builds 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> 
61
 
        detail::tmat4x4<T> translate(
62
 
                T x, T y, T z);
63
 
                
64
 
        //! Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars. 
65
 
        //! - From \link gtx_transform GLM_GTX_transform \endlink extension
66
 
        // - See also: \link glm::translate GLM_GTC_matrix_transform \endlink
67
 
        template <typename T> 
68
 
        detail::tmat4x4<T> translate(
69
 
                detail::tmat4x4<T> const & m, 
70
 
                T x, T y, T z);
71
 
                
72
 
        //! Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars. 
73
 
        //! - From \link gtx_transform GLM_GTX_transform \endlink extension
74
 
        // - See also: \link glm::translate GLM_GTC_matrix_transform \endlink
75
 
        template <typename T> 
76
 
        detail::tmat4x4<T> translate(
77
 
                detail::tvec3<T> const & v);
78
 
 
79
 
        //! Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. 
80
 
        //! - From \link gtx_transform GLM_GTX_transform \endlink extension
81
 
        // - See also: \link glm::rotate GLM_GTC_matrix_transform \endlink
82
 
        template <typename T> 
83
 
        detail::tmat4x4<T> rotate(
84
 
                T angle, 
85
 
                T x, T y, T z);
86
 
 
87
 
        //! Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. 
88
 
        //! - From \link gtx_transform GLM_GTX_transform \endlink extension
89
 
        // - See also: \link glm::rotate GLM_GTC_matrix_transform \endlink
90
 
        template <typename T> 
91
 
        detail::tmat4x4<T> rotate(
92
 
                T angle, 
93
 
                detail::tvec3<T> const & v);
94
 
 
95
 
        //! Transforms a matrix with a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. 
96
 
        //! - From \link gtx_transform GLM_GTX_transform \endlink extension
97
 
        // - See also: \link glm::rotate GLM_GTC_matrix_transform \endlink
98
 
        template <typename T> 
99
 
        detail::tmat4x4<T> rotate(
100
 
                detail::tmat4x4<T> const & m, 
101
 
                T angle, 
102
 
                T x, T y, T z);
103
 
                
104
 
        //! Builds a scale 4 * 4 matrix created from 3 scalars. 
105
 
        //! - From \link gtx_transform GLM_GTX_transform \endlink extension
106
 
        // - See also: \link glm::scale GLM_GTC_matrix_transform \endlink
107
 
        template <typename T> 
108
 
        detail::tmat4x4<T> scale(
109
 
                T x, T y, T z);
110
 
                
111
 
        //! Transforms a matrix with a scale 4 * 4 matrix created from 3 scalars.
112
 
        //! - From \link gtx_transform GLM_GTX_transform \endlink extension
113
 
        // - See also: \link glm::scale GLM_GTC_matrix_transform \endlink
114
 
        template <typename T> 
115
 
        detail::tmat4x4<T> scale(
116
 
                detail::tmat4x4<T> const & m, 
117
 
                T x, T y, T z);
118
 
 
119
 
        //! Transforms a matrix with a scale 4 * 4 matrix created from a vector of 3 components.
120
 
        //! - From \link gtx_transform GLM_GTX_transform \endlink extension
121
 
        // - See also: \link glm::scale GLM_GTC_matrix_transform \endlink
122
 
        template <typename T> 
123
 
        detail::tmat4x4<T> scale(
124
 
                detail::tvec3<T> const & v);
125
 
 
126
 
        /// @}
127
 
}// namespace glm
128
 
 
129
 
#include "transform.inl"
130
 
 
131
 
#endif//GLM_GTX_transform