1b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG///////////////////////////////////////////////////////////////////////////////////
2b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// OpenGL Mathematics (glm.g-truc.net)
3b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG///
4b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
5b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// Permission is hereby granted, free of charge, to any person obtaining a copy
6b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// of this software and associated documentation files (the "Software"), to deal
7b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// in the Software without restriction, including without limitation the rights
8b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// copies of the Software, and to permit persons to whom the Software is
10b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// furnished to do so, subject to the following conditions:
11b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG///
12b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// The above copyright notice and this permission notice shall be included in
13b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// all copies or substantial portions of the Software.
14b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG///
15b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// THE SOFTWARE.
22b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG///
23b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// @ref gtx_matrix_interpolation
24b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// @file glm/gtx/matrix_interpolation.hpp
25b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// @date 2011-03-05 / 2011-06-07
26b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// @author Ghenadii Ursachi (the.asteroth@gmail.com)
27b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG///
28b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// @see core (dependence)
29b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG///
30b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// @defgroup gtx_matrix_interpolation GLM_GTX_matrix_interpolation
31b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// @ingroup gtx
32b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG///
33b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// @brief Allows to directly interpolate two exiciting matrices.
34b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG///
35b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG/// <glm/gtx/matrix_interpolation.hpp> need to be included to use these functionalities.
36b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG///////////////////////////////////////////////////////////////////////////////////
37b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG
38b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG#ifndef GLM_GTX_matrix_interpolation
39b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG#define GLM_GTX_matrix_interpolation
40b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG
41b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG// Dependency:
42b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG#include "../glm.hpp"
43b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG
44b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
45b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG#	pragma message("GLM: GLM_GTX_matrix_interpolation extension included")
46b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG#endif
47b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG
48b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarGnamespace glm
49b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG{
50b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// @addtogroup gtx_matrix_interpolation
51b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// @{
52b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG
53b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// Get the axis and angle of the rotation from a matrix.
54b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// From GLM_GTX_matrix_interpolation extension.
55b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	template <typename T, precision P>
56b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	GLM_FUNC_DECL void axisAngle(
57b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG		detail::tmat4x4<T, P> const & mat,
58b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG		detail::tvec3<T, P> & axis,
59b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG		T & angle);
60b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG
61b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// Build a matrix from axis and angle.
62b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// From GLM_GTX_matrix_interpolation extension.
63b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	template <typename T, precision P>
64b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	GLM_FUNC_DECL detail::tmat4x4<T, P> axisAngleMatrix(
65b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG		detail::tvec3<T, P> const & axis,
66b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG		T const angle);
67b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG
68b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// Extracts the rotation part of a matrix.
69b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// From GLM_GTX_matrix_interpolation extension.
70b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	template <typename T, precision P>
71b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	GLM_FUNC_DECL detail::tmat4x4<T, P> extractMatrixRotation(
72b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG		detail::tmat4x4<T, P> const & mat);
73b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG
74b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// Build a interpolation of 4 * 4 matrixes.
75b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// From GLM_GTX_matrix_interpolation extension.
76b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// Warning! works only with rotation and/or translation matrixes, scale will generate unexpected results.
77b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	template <typename T, precision P>
78b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	GLM_FUNC_DECL detail::tmat4x4<T, P> interpolate(
79b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG		detail::tmat4x4<T, P> const & m1,
80b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG		detail::tmat4x4<T, P> const & m2,
81b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG		T const delta);
82b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG
83b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG	/// @}
84b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG}//namespace glm
85b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG
86b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG#include "matrix_interpolation.inl"
87b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG
88b0b195df6c4343219e339ccb37978e8432a5f871Tony-LunarG#endif//GLM_GTX_matrix_interpolation
89