Update GLM to latest version (0.9.9.3). This includes GLM's change of matrices no longer default initializing to the identity matrix. This commit thus also includes the update of all of LearnOpenGL's code to reflect this: all matrices are now constructor-initialized to the identity matrix where relevant.

This commit is contained in:
Joey de Vries
2018-12-30 14:27:14 +01:00
parent 239c456ae9
commit f4b6763356
474 changed files with 38219 additions and 38025 deletions

View File

@@ -1,45 +1,16 @@
///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net)
///
/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
/// copies of the Software, and to permit persons to whom the Software is
/// furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// Restrictions:
/// By making use of the Software for military purposes, you choose to make
/// a Bunny unhappy.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
/// THE SOFTWARE.
///
/// @ref gtx_rotate_normalized_axis
/// @file glm/gtx/rotate_normalized_axis.hpp
/// @date 2012-12-13 / 2012-12-13
/// @author Christophe Riccio
///
/// @see core (dependence)
/// @see gtc_matrix_transform
/// @see gtc_quaternion
///
///
/// @defgroup gtx_rotate_normalized_axis GLM_GTX_rotate_normalized_axis
/// @ingroup gtx
///
/// @brief Quaternions and matrices rotations around normalized axis.
///
/// <glm/gtx/rotate_normalized_axis.hpp> need to be included to use these functionalities.
///////////////////////////////////////////////////////////////////////////////////
///
/// Include <glm/gtx/rotate_normalized_axis.hpp> to use the features of this extension.
///
/// Quaternions and matrices rotations around normalized axis.
#pragma once
@@ -48,7 +19,11 @@
#include "../gtc/epsilon.hpp"
#include "../gtc/quaternion.hpp"
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
#ifndef GLM_ENABLE_EXPERIMENTAL
# error "GLM: GLM_GTX_rotate_normalized_axis is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."
#endif
#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
# pragma message("GLM: GLM_GTX_rotate_normalized_axis extension included")
#endif
@@ -57,35 +32,35 @@ namespace glm
/// @addtogroup gtx_rotate_normalized_axis
/// @{
/// Builds a rotation 4 * 4 matrix created from a normalized axis and an angle.
///
/// Builds a rotation 4 * 4 matrix created from a normalized axis and an angle.
///
/// @param m Input matrix multiplied by this rotation matrix.
/// @param angle Rotation angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.
/// @param angle Rotation angle expressed in radians.
/// @param axis Rotation axis, must be normalized.
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.
///
/// @tparam T Value type used to build the matrix. Currently supported: half (not recommended), float or double.
///
/// @see gtx_rotate_normalized_axis
/// @see - rotate(T angle, T x, T y, T z)
/// @see - rotate(tmat4x4<T, P> const & m, T angle, T x, T y, T z)
/// @see - rotate(T angle, tvec3<T, P> const & v)
template <typename T, precision P>
GLM_FUNC_DECL tmat4x4<T, P> rotateNormalizedAxis(
tmat4x4<T, P> const & m,
T const & angle,
tvec3<T, P> const & axis);
/// @see - rotate(T angle, T x, T y, T z)
/// @see - rotate(mat<4, 4, T, Q> const& m, T angle, T x, T y, T z)
/// @see - rotate(T angle, vec<3, T, Q> const& v)
template<typename T, qualifier Q>
GLM_FUNC_DECL mat<4, 4, T, Q> rotateNormalizedAxis(
mat<4, 4, T, Q> const& m,
T const& angle,
vec<3, T, Q> const& axis);
/// Rotates a quaternion from a vector of 3 components normalized axis and an angle.
///
///
/// @param q Source orientation
/// @param angle Angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.
/// @param angle Angle expressed in radians.
/// @param axis Normalized axis of the rotation, must be normalized.
///
///
/// @see gtx_rotate_normalized_axis
template <typename T, precision P>
GLM_FUNC_DECL tquat<T, P> rotateNormalizedAxis(
tquat<T, P> const & q,
T const & angle,
tvec3<T, P> const & axis);
template<typename T, qualifier Q>
GLM_FUNC_DECL qua<T, Q> rotateNormalizedAxis(
qua<T, Q> const& q,
T const& angle,
vec<3, T, Q> const& axis);
/// @}
}//namespace glm