mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-30 20:13:22 +08:00
Updated GLM version w/ now standard radians as angles.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
/// OpenGL Mathematics (glm.g-truc.net)
|
||||
///
|
||||
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
|
||||
/// Copyright (c) 2005 - 2015 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
|
||||
@@ -12,6 +12,10 @@
|
||||
/// 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
|
||||
@@ -34,13 +38,20 @@
|
||||
/// <glm/gtc/matrix_integer.hpp> need to be included to use these functionalities.
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef GLM_GTC_matrix_integer
|
||||
#define GLM_GTC_matrix_integer GLM_VERSION
|
||||
#pragma once
|
||||
|
||||
// Dependency:
|
||||
#include "../glm.hpp"
|
||||
#include "../mat2x2.hpp"
|
||||
#include "../mat2x3.hpp"
|
||||
#include "../mat2x4.hpp"
|
||||
#include "../mat3x2.hpp"
|
||||
#include "../mat3x3.hpp"
|
||||
#include "../mat3x4.hpp"
|
||||
#include "../mat4x2.hpp"
|
||||
#include "../mat4x3.hpp"
|
||||
#include "../mat4x4.hpp"
|
||||
|
||||
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
|
||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
||||
# pragma message("GLM: GLM_GTC_matrix_integer extension included")
|
||||
#endif
|
||||
|
||||
@@ -51,300 +62,300 @@ namespace glm
|
||||
|
||||
/// High-precision signed integer 2x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x2<highp_int> highp_imat2;
|
||||
typedef tmat2x2<int, highp> highp_imat2;
|
||||
|
||||
/// High-precision signed integer 3x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x3<highp_int> highp_imat3;
|
||||
typedef tmat3x3<int, highp> highp_imat3;
|
||||
|
||||
/// High-precision signed integer 4x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x4<highp_int> highp_imat4;
|
||||
typedef tmat4x4<int, highp> highp_imat4;
|
||||
|
||||
/// High-precision signed integer 2x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x2<highp_int> highp_imat2x2;
|
||||
typedef tmat2x2<int, highp> highp_imat2x2;
|
||||
|
||||
/// High-precision signed integer 2x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x3<highp_int> highp_imat2x3;
|
||||
typedef tmat2x3<int, highp> highp_imat2x3;
|
||||
|
||||
/// High-precision signed integer 2x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x4<highp_int> highp_imat2x4;
|
||||
typedef tmat2x4<int, highp> highp_imat2x4;
|
||||
|
||||
/// High-precision signed integer 3x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x2<highp_int> highp_imat3x2;
|
||||
typedef tmat3x2<int, highp> highp_imat3x2;
|
||||
|
||||
/// High-precision signed integer 3x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x3<highp_int> highp_imat3x3;
|
||||
typedef tmat3x3<int, highp> highp_imat3x3;
|
||||
|
||||
/// High-precision signed integer 3x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x4<highp_int> highp_imat3x4;
|
||||
typedef tmat3x4<int, highp> highp_imat3x4;
|
||||
|
||||
/// High-precision signed integer 4x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x2<highp_int> highp_imat4x2;
|
||||
typedef tmat4x2<int, highp> highp_imat4x2;
|
||||
|
||||
/// High-precision signed integer 4x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x3<highp_int> highp_imat4x3;
|
||||
typedef tmat4x3<int, highp> highp_imat4x3;
|
||||
|
||||
/// High-precision signed integer 4x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x4<highp_int> highp_imat4x4;
|
||||
typedef tmat4x4<int, highp> highp_imat4x4;
|
||||
|
||||
|
||||
/// Medium-precision signed integer 2x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x2<mediump_int> mediump_imat2;
|
||||
typedef tmat2x2<int, mediump> mediump_imat2;
|
||||
|
||||
/// Medium-precision signed integer 3x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x3<mediump_int> mediump_imat3;
|
||||
typedef tmat3x3<int, mediump> mediump_imat3;
|
||||
|
||||
/// Medium-precision signed integer 4x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x4<mediump_int> mediump_imat4;
|
||||
typedef tmat4x4<int, mediump> mediump_imat4;
|
||||
|
||||
|
||||
/// Medium-precision signed integer 2x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x2<mediump_int> mediump_imat2x2;
|
||||
typedef tmat2x2<int, mediump> mediump_imat2x2;
|
||||
|
||||
/// Medium-precision signed integer 2x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x3<mediump_int> mediump_imat2x3;
|
||||
typedef tmat2x3<int, mediump> mediump_imat2x3;
|
||||
|
||||
/// Medium-precision signed integer 2x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x4<mediump_int> mediump_imat2x4;
|
||||
typedef tmat2x4<int, mediump> mediump_imat2x4;
|
||||
|
||||
/// Medium-precision signed integer 3x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x2<mediump_int> mediump_imat3x2;
|
||||
typedef tmat3x2<int, mediump> mediump_imat3x2;
|
||||
|
||||
/// Medium-precision signed integer 3x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x3<mediump_int> mediump_imat3x3;
|
||||
typedef tmat3x3<int, mediump> mediump_imat3x3;
|
||||
|
||||
/// Medium-precision signed integer 3x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x4<mediump_int> mediump_imat3x4;
|
||||
typedef tmat3x4<int, mediump> mediump_imat3x4;
|
||||
|
||||
/// Medium-precision signed integer 4x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x2<mediump_int> mediump_imat4x2;
|
||||
typedef tmat4x2<int, mediump> mediump_imat4x2;
|
||||
|
||||
/// Medium-precision signed integer 4x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x3<mediump_int> mediump_imat4x3;
|
||||
typedef tmat4x3<int, mediump> mediump_imat4x3;
|
||||
|
||||
/// Medium-precision signed integer 4x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x4<mediump_int> mediump_imat4x4;
|
||||
typedef tmat4x4<int, mediump> mediump_imat4x4;
|
||||
|
||||
|
||||
/// Low-precision signed integer 2x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x2<lowp_int> lowp_imat2;
|
||||
typedef tmat2x2<int, lowp> lowp_imat2;
|
||||
|
||||
/// Low-precision signed integer 3x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x3<lowp_int> lowp_imat3;
|
||||
typedef tmat3x3<int, lowp> lowp_imat3;
|
||||
|
||||
/// Low-precision signed integer 4x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x4<lowp_int> lowp_imat4;
|
||||
typedef tmat4x4<int, lowp> lowp_imat4;
|
||||
|
||||
|
||||
/// Low-precision signed integer 2x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x2<lowp_int> lowp_imat2x2;
|
||||
typedef tmat2x2<int, lowp> lowp_imat2x2;
|
||||
|
||||
/// Low-precision signed integer 2x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x3<lowp_int> lowp_imat2x3;
|
||||
typedef tmat2x3<int, lowp> lowp_imat2x3;
|
||||
|
||||
/// Low-precision signed integer 2x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x4<lowp_int> lowp_imat2x4;
|
||||
typedef tmat2x4<int, lowp> lowp_imat2x4;
|
||||
|
||||
/// Low-precision signed integer 3x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x2<lowp_int> lowp_imat3x2;
|
||||
typedef tmat3x2<int, lowp> lowp_imat3x2;
|
||||
|
||||
/// Low-precision signed integer 3x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x3<lowp_int> lowp_imat3x3;
|
||||
typedef tmat3x3<int, lowp> lowp_imat3x3;
|
||||
|
||||
/// Low-precision signed integer 3x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x4<lowp_int> lowp_imat3x4;
|
||||
typedef tmat3x4<int, lowp> lowp_imat3x4;
|
||||
|
||||
/// Low-precision signed integer 4x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x2<lowp_int> lowp_imat4x2;
|
||||
typedef tmat4x2<int, lowp> lowp_imat4x2;
|
||||
|
||||
/// Low-precision signed integer 4x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x3<lowp_int> lowp_imat4x3;
|
||||
typedef tmat4x3<int, lowp> lowp_imat4x3;
|
||||
|
||||
/// Low-precision signed integer 4x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x4<lowp_int> lowp_imat4x4;
|
||||
typedef tmat4x4<int, lowp> lowp_imat4x4;
|
||||
|
||||
|
||||
/// High-precision unsigned integer 2x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x2<highp_uint> highp_umat2;
|
||||
typedef tmat2x2<uint, highp> highp_umat2;
|
||||
|
||||
/// High-precision unsigned integer 3x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x3<highp_uint> highp_umat3;
|
||||
typedef tmat3x3<uint, highp> highp_umat3;
|
||||
|
||||
/// High-precision unsigned integer 4x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x4<highp_uint> highp_umat4;
|
||||
typedef tmat4x4<uint, highp> highp_umat4;
|
||||
|
||||
/// High-precision unsigned integer 2x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x2<highp_uint> highp_umat2x2;
|
||||
typedef tmat2x2<uint, highp> highp_umat2x2;
|
||||
|
||||
/// High-precision unsigned integer 2x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x3<highp_uint> highp_umat2x3;
|
||||
typedef tmat2x3<uint, highp> highp_umat2x3;
|
||||
|
||||
/// High-precision unsigned integer 2x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x4<highp_uint> highp_umat2x4;
|
||||
typedef tmat2x4<uint, highp> highp_umat2x4;
|
||||
|
||||
/// High-precision unsigned integer 3x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x2<highp_uint> highp_umat3x2;
|
||||
typedef tmat3x2<uint, highp> highp_umat3x2;
|
||||
|
||||
/// High-precision unsigned integer 3x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x3<highp_uint> highp_umat3x3;
|
||||
typedef tmat3x3<uint, highp> highp_umat3x3;
|
||||
|
||||
/// High-precision unsigned integer 3x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x4<highp_uint> highp_umat3x4;
|
||||
typedef tmat3x4<uint, highp> highp_umat3x4;
|
||||
|
||||
/// High-precision unsigned integer 4x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x2<highp_uint> highp_umat4x2;
|
||||
typedef tmat4x2<uint, highp> highp_umat4x2;
|
||||
|
||||
/// High-precision unsigned integer 4x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x3<highp_uint> highp_umat4x3;
|
||||
typedef tmat4x3<uint, highp> highp_umat4x3;
|
||||
|
||||
/// High-precision unsigned integer 4x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x4<highp_uint> highp_umat4x4;
|
||||
typedef tmat4x4<uint, highp> highp_umat4x4;
|
||||
|
||||
|
||||
/// Medium-precision unsigned integer 2x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x2<mediump_uint> mediump_umat2;
|
||||
typedef tmat2x2<uint, mediump> mediump_umat2;
|
||||
|
||||
/// Medium-precision unsigned integer 3x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x3<mediump_uint> mediump_umat3;
|
||||
typedef tmat3x3<uint, mediump> mediump_umat3;
|
||||
|
||||
/// Medium-precision unsigned integer 4x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x4<mediump_uint> mediump_umat4;
|
||||
typedef tmat4x4<uint, mediump> mediump_umat4;
|
||||
|
||||
|
||||
/// Medium-precision unsigned integer 2x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x2<mediump_uint> mediump_umat2x2;
|
||||
typedef tmat2x2<uint, mediump> mediump_umat2x2;
|
||||
|
||||
/// Medium-precision unsigned integer 2x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x3<mediump_uint> mediump_umat2x3;
|
||||
typedef tmat2x3<uint, mediump> mediump_umat2x3;
|
||||
|
||||
/// Medium-precision unsigned integer 2x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x4<mediump_uint> mediump_umat2x4;
|
||||
typedef tmat2x4<uint, mediump> mediump_umat2x4;
|
||||
|
||||
/// Medium-precision unsigned integer 3x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x2<mediump_uint> mediump_umat3x2;
|
||||
typedef tmat3x2<uint, mediump> mediump_umat3x2;
|
||||
|
||||
/// Medium-precision unsigned integer 3x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x3<mediump_uint> mediump_umat3x3;
|
||||
typedef tmat3x3<uint, mediump> mediump_umat3x3;
|
||||
|
||||
/// Medium-precision unsigned integer 3x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x4<mediump_uint> mediump_umat3x4;
|
||||
typedef tmat3x4<uint, mediump> mediump_umat3x4;
|
||||
|
||||
/// Medium-precision unsigned integer 4x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x2<mediump_uint> mediump_umat4x2;
|
||||
typedef tmat4x2<uint, mediump> mediump_umat4x2;
|
||||
|
||||
/// Medium-precision unsigned integer 4x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x3<mediump_uint> mediump_umat4x3;
|
||||
typedef tmat4x3<uint, mediump> mediump_umat4x3;
|
||||
|
||||
/// Medium-precision unsigned integer 4x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x4<mediump_uint> mediump_umat4x4;
|
||||
typedef tmat4x4<uint, mediump> mediump_umat4x4;
|
||||
|
||||
|
||||
/// Low-precision unsigned integer 2x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x2<lowp_uint> lowp_umat2;
|
||||
typedef tmat2x2<uint, lowp> lowp_umat2;
|
||||
|
||||
/// Low-precision unsigned integer 3x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x3<lowp_uint> lowp_umat3;
|
||||
typedef tmat3x3<uint, lowp> lowp_umat3;
|
||||
|
||||
/// Low-precision unsigned integer 4x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x4<lowp_uint> lowp_umat4;
|
||||
typedef tmat4x4<uint, lowp> lowp_umat4;
|
||||
|
||||
|
||||
/// Low-precision unsigned integer 2x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x2<lowp_uint> lowp_umat2x2;
|
||||
typedef tmat2x2<uint, lowp> lowp_umat2x2;
|
||||
|
||||
/// Low-precision unsigned integer 2x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x3<lowp_uint> lowp_umat2x3;
|
||||
typedef tmat2x3<uint, lowp> lowp_umat2x3;
|
||||
|
||||
/// Low-precision unsigned integer 2x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat2x4<lowp_uint> lowp_umat2x4;
|
||||
typedef tmat2x4<uint, lowp> lowp_umat2x4;
|
||||
|
||||
/// Low-precision unsigned integer 3x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x2<lowp_uint> lowp_umat3x2;
|
||||
typedef tmat3x2<uint, lowp> lowp_umat3x2;
|
||||
|
||||
/// Low-precision unsigned integer 3x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x3<lowp_uint> lowp_umat3x3;
|
||||
typedef tmat3x3<uint, lowp> lowp_umat3x3;
|
||||
|
||||
/// Low-precision unsigned integer 3x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat3x4<lowp_uint> lowp_umat3x4;
|
||||
typedef tmat3x4<uint, lowp> lowp_umat3x4;
|
||||
|
||||
/// Low-precision unsigned integer 4x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x2<lowp_uint> lowp_umat4x2;
|
||||
typedef tmat4x2<uint, lowp> lowp_umat4x2;
|
||||
|
||||
/// Low-precision unsigned integer 4x3 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x3<lowp_uint> lowp_umat4x3;
|
||||
typedef tmat4x3<uint, lowp> lowp_umat4x3;
|
||||
|
||||
/// Low-precision unsigned integer 4x4 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef detail::tmat4x4<lowp_uint> lowp_umat4x4;
|
||||
typedef tmat4x4<uint, lowp> lowp_umat4x4;
|
||||
|
||||
#if(defined(GLM_PRECISION_HIGHP_INT))
|
||||
typedef highp_imat2 imat2;
|
||||
@@ -451,7 +462,7 @@ namespace glm
|
||||
typedef lowp_umat4x4 umat4x4;
|
||||
#else //if(defined(GLM_PRECISION_MEDIUMP_UINT))
|
||||
|
||||
/// Unsigned integer 2x2 matrix.
|
||||
/// Unsigned integer 2x2 matrix.
|
||||
/// @see gtc_matrix_integer
|
||||
typedef mediump_umat2 umat2;
|
||||
|
||||
@@ -502,5 +513,3 @@ namespace glm
|
||||
|
||||
/// @}
|
||||
}//namespace glm
|
||||
|
||||
#endif//GLM_GTC_matrix_integer
|
||||
|
||||
Reference in New Issue
Block a user