Quiet most GLM_FORCE_RADIANS messages
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
/// dummy.cpp exist only a wordaround for CMake file.
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define GLM_FORCE_RADIANS
|
||||
#define GLM_MESSAGES
|
||||
#include "../glm.hpp"
|
||||
#include <limits>
|
||||
|
||||
@@ -43,7 +43,10 @@ namespace detail
|
||||
template <typename T, precision P> struct tmat4x2;
|
||||
template <typename T, precision P> struct tmat4x3;
|
||||
template <typename T, precision P> struct tmat4x4;
|
||||
|
||||
|
||||
template <class colType, typename rowType>
|
||||
struct mat_trait{};
|
||||
|
||||
template <template <class, precision> class matType, typename T, precision P>
|
||||
struct compute_inverse{};
|
||||
}//namespace detail
|
||||
|
||||
@@ -396,7 +396,7 @@ namespace detail
|
||||
template <typename T, precision P>
|
||||
struct compute_inverse<detail::tmat2x2, T, P>
|
||||
{
|
||||
static detail::tmat2x2<T, P> call(detail::tmat2x2<T, P> const & m)
|
||||
GLM_FUNC_QUALIFIER static detail::tmat2x2<T, P> call(detail::tmat2x2<T, P> const & m)
|
||||
{
|
||||
T Determinant = determinant(m);
|
||||
|
||||
@@ -410,18 +410,6 @@ namespace detail
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T, precision P>
|
||||
GLM_FUNC_QUALIFIER tmat2x2<T, P> compute_inverse_mat2(tmat2x2<T, P> const & m)
|
||||
{
|
||||
T Determinant = m[0][0] * m[1][1] - m[1][0] * m[0][1];
|
||||
|
||||
tmat2x2<T, P> Inverse(
|
||||
+ m[1][1] / Determinant, - m[0][1] / Determinant,
|
||||
- m[1][0] / Determinant, + m[0][0] / Determinant);
|
||||
|
||||
return Inverse;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Binary operators
|
||||
|
||||
|
||||
@@ -435,22 +435,21 @@ namespace detail
|
||||
{
|
||||
static detail::tmat3x3<T, P> call(detail::tmat3x3<T, P> const & m)
|
||||
{
|
||||
T Determinant =
|
||||
T OneOverDeterminant = static_cast<T>(1) / (
|
||||
+ m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2])
|
||||
- m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2])
|
||||
+ m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]);
|
||||
+ m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]));
|
||||
|
||||
detail::tmat3x3<T, P> Inverse(detail::tmat3x3<T, P>::_null);
|
||||
Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]);
|
||||
Inverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]);
|
||||
Inverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]);
|
||||
Inverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]);
|
||||
Inverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]);
|
||||
Inverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]);
|
||||
Inverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]);
|
||||
Inverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]);
|
||||
Inverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]);
|
||||
Inverse /= Determinant;
|
||||
Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]) * OneOverDeterminant;
|
||||
Inverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]) * OneOverDeterminant;
|
||||
Inverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]) * OneOverDeterminant;
|
||||
Inverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]) * OneOverDeterminant;
|
||||
Inverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]) * OneOverDeterminant;
|
||||
Inverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]) * OneOverDeterminant;
|
||||
Inverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]) * OneOverDeterminant;
|
||||
Inverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]) * OneOverDeterminant;
|
||||
Inverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]) * OneOverDeterminant;
|
||||
|
||||
return Inverse;
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
// Dependencies
|
||||
#include "../detail/setup.hpp"
|
||||
#include "../detail/precision.hpp"
|
||||
|
||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
||||
# pragma message("GLM: GLM_GTC_noise extension included")
|
||||
|
||||
@@ -41,6 +41,8 @@
|
||||
|
||||
// Dependencies
|
||||
#include "../detail/setup.hpp"
|
||||
#include "../detail/precision.hpp"
|
||||
#include "../detail/type_int.hpp"
|
||||
|
||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
||||
# pragma message("GLM: GLM_GTC_ulp extension included")
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "../detail/type_int.hpp"
|
||||
#include <cmath>
|
||||
#include <cfloat>
|
||||
#include <limits>
|
||||
|
||||
#if(GLM_COMPILER & GLM_COMPILER_VC)
|
||||
# pragma warning(push)
|
||||
|
||||
Reference in New Issue
Block a user