Merge 0.9.8
This commit is contained in:
commit
d029db8ac0
BIN
doc/glm.docx
BIN
doc/glm.docx
Binary file not shown.
BIN
doc/glm.pdf
BIN
doc/glm.pdf
Binary file not shown.
@ -3,6 +3,28 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#if (defined(GLM_FORCE_SWIZZLE) || defined(GLM_SWIZZLE)) && defined(GLM_FORCE_UNRESTRICTED_GENTYPE)
|
||||||
|
# error "Both GLM_FORCE_SWIZZLE and GLM_FORCE_UNRESTRICTED_GENTYPE can't be defined at the same time"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Messages
|
||||||
|
|
||||||
|
#ifdef GLM_MESSAGES
|
||||||
|
# pragma message("GLM: GLM_MESSAGES is deprecated, use GLM_FORCE_MESSAGES instead")
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define GLM_MESSAGES_ENABLED 1
|
||||||
|
#define GLM_MESSAGES_DISABLE 0
|
||||||
|
|
||||||
|
#if defined(GLM_FORCE_MESSAGES) || defined(GLM_MESSAGES)
|
||||||
|
# undef GLM_MESSAGES
|
||||||
|
# define GLM_MESSAGES GLM_MESSAGES_ENABLED
|
||||||
|
#else
|
||||||
|
# undef GLM_MESSAGES
|
||||||
|
# define GLM_MESSAGES GLM_MESSAGES_DISABLE
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include "../simd/platform.h"
|
#include "../simd/platform.h"
|
||||||
@ -16,13 +38,13 @@
|
|||||||
#define GLM_VERSION_PATCH 9
|
#define GLM_VERSION_PATCH 9
|
||||||
#define GLM_VERSION_REVISION 0
|
#define GLM_VERSION_REVISION 0
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_VERSION_DISPLAYED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_VERSION_DISPLAYED)
|
||||||
# define GLM_MESSAGE_VERSION_DISPLAYED
|
# define GLM_MESSAGE_VERSION_DISPLAYED
|
||||||
# pragma message ("GLM: version 0.9.9.0")
|
# pragma message ("GLM: version 0.9.9.0")
|
||||||
#endif//GLM_MESSAGES
|
#endif//GLM_MESSAGES
|
||||||
|
|
||||||
// Report compiler detection
|
// Report compiler detection
|
||||||
#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_COMPILER_DISPLAYED)
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_COMPILER_DISPLAYED)
|
||||||
# define GLM_MESSAGE_COMPILER_DISPLAYED
|
# define GLM_MESSAGE_COMPILER_DISPLAYED
|
||||||
# if GLM_COMPILER & GLM_COMPILER_CUDA
|
# if GLM_COMPILER & GLM_COMPILER_CUDA
|
||||||
# pragma message("GLM: CUDA compiler detected")
|
# pragma message("GLM: CUDA compiler detected")
|
||||||
@ -54,7 +76,7 @@
|
|||||||
# error "GLM_MODEL undefined, your compiler may not be supported by GLM. Add #define GLM_MODEL 0 to ignore this message."
|
# error "GLM_MODEL undefined, your compiler may not be supported by GLM. Add #define GLM_MODEL 0 to ignore this message."
|
||||||
#endif//GLM_MODEL
|
#endif//GLM_MODEL
|
||||||
|
|
||||||
#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_MODEL_DISPLAYED)
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_MODEL_DISPLAYED)
|
||||||
# define GLM_MESSAGE_MODEL_DISPLAYED
|
# define GLM_MESSAGE_MODEL_DISPLAYED
|
||||||
# if(GLM_MODEL == GLM_MODEL_64)
|
# if(GLM_MODEL == GLM_MODEL_64)
|
||||||
# pragma message("GLM: 64 bits model")
|
# pragma message("GLM: 64 bits model")
|
||||||
@ -63,7 +85,7 @@
|
|||||||
# endif//GLM_MODEL
|
# endif//GLM_MODEL
|
||||||
#endif//GLM_MESSAGES
|
#endif//GLM_MESSAGES
|
||||||
|
|
||||||
#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_ARCH_DISPLAYED)
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_ARCH_DISPLAYED)
|
||||||
# define GLM_MESSAGE_ARCH_DISPLAYED
|
# define GLM_MESSAGE_ARCH_DISPLAYED
|
||||||
# if(GLM_ARCH == GLM_ARCH_PURE)
|
# if(GLM_ARCH == GLM_ARCH_PURE)
|
||||||
# pragma message("GLM: Platform independent code")
|
# pragma message("GLM: Platform independent code")
|
||||||
@ -230,7 +252,7 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_LANG_DISPLAYED)
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_LANG_DISPLAYED)
|
||||||
# define GLM_MESSAGE_LANG_DISPLAYED
|
# define GLM_MESSAGE_LANG_DISPLAYED
|
||||||
|
|
||||||
# if GLM_LANG & GLM_LANG_CXX1Z_FLAG
|
# if GLM_LANG & GLM_LANG_CXX1Z_FLAG
|
||||||
@ -524,17 +546,44 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Swizzle operators
|
// Swizzle operators
|
||||||
|
|
||||||
// User defines: GLM_SWIZZLE
|
// User defines: GLM_FORCE_SWIZZLE
|
||||||
|
|
||||||
#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_SWIZZLE_DISPLAYED)
|
#ifdef GLM_SWIZZLE
|
||||||
|
# pragma message("GLM: GLM_SWIZZLE is deprecated, use GLM_FORCE_SWIZZLE instead")
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define GLM_SWIZZLE_ENABLED 1
|
||||||
|
#define GLM_SWIZZLE_DISABLE 0
|
||||||
|
|
||||||
|
#if defined(GLM_FORCE_SWIZZLE) || defined(GLM_SWIZZLE)
|
||||||
|
# undef GLM_SWIZZLE
|
||||||
|
# define GLM_SWIZZLE GLM_SWIZZLE_ENABLED
|
||||||
|
#else
|
||||||
|
# undef GLM_SWIZZLE
|
||||||
|
# define GLM_SWIZZLE GLM_SWIZZLE_DISABLE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_SWIZZLE_DISPLAYED)
|
||||||
# define GLM_MESSAGE_SWIZZLE_DISPLAYED
|
# define GLM_MESSAGE_SWIZZLE_DISPLAYED
|
||||||
# if defined(GLM_SWIZZLE)
|
# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
|
||||||
# pragma message("GLM: Swizzling operators enabled")
|
# pragma message("GLM: Swizzling operators enabled")
|
||||||
# else
|
# else
|
||||||
# pragma message("GLM: Swizzling operators disabled, #define GLM_SWIZZLE to enable swizzle operators")
|
# pragma message("GLM: Swizzling operators disabled, #define GLM_SWIZZLE to enable swizzle operators")
|
||||||
# endif
|
# endif
|
||||||
#endif//GLM_MESSAGES
|
#endif//GLM_MESSAGES
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Allows using not basic types as genType
|
||||||
|
|
||||||
|
// #define GLM_FORCE_UNRESTRICTED_GENTYPE
|
||||||
|
|
||||||
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_UNRESTRICTED_GENTYPE_DISPLAYED)
|
||||||
|
# define GLM_MESSAGE_UNRESTRICTED_GENTYPE_DISPLAYED
|
||||||
|
# ifdef GLM_FORCE_UNRESTRICTED_GENTYPE
|
||||||
|
# pragma message("GLM: Use unrestricted genType")
|
||||||
|
# endif
|
||||||
|
#endif//GLM_MESSAGES
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Clip control
|
// Clip control
|
||||||
|
|
||||||
@ -551,6 +600,15 @@
|
|||||||
# define GLM_DEPTH_CLIP_SPACE GLM_DEPTH_NEGATIVE_ONE_TO_ONE
|
# define GLM_DEPTH_CLIP_SPACE GLM_DEPTH_NEGATIVE_ONE_TO_ONE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_DEPTH_DISPLAYED)
|
||||||
|
# define GLM_MESSAGE_DEPTH_DISPLAYED
|
||||||
|
# if GLM_DEPTH_CLIP_SPACE == GLM_DEPTH_ZERO_TO_ONE
|
||||||
|
# pragma message("GLM: Depth clip space: Zero to one")
|
||||||
|
# else
|
||||||
|
# pragma message("GLM: Depth clip space: negative one to one")
|
||||||
|
# endif
|
||||||
|
#endif//GLM_MESSAGES
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Coordinate system, define GLM_FORCE_LEFT_HANDED before including GLM
|
// Coordinate system, define GLM_FORCE_LEFT_HANDED before including GLM
|
||||||
// to use left handed coordinate system by default.
|
// to use left handed coordinate system by default.
|
||||||
@ -568,6 +626,15 @@
|
|||||||
# define GLM_COORDINATE_SYSTEM GLM_RIGHT_HANDED
|
# define GLM_COORDINATE_SYSTEM GLM_RIGHT_HANDED
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_HANDED_DISPLAYED)
|
||||||
|
# define GLM_MESSAGE_HANDED_DISPLAYED
|
||||||
|
# if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED
|
||||||
|
# pragma message("GLM: Coordinate system: left handed")
|
||||||
|
# else
|
||||||
|
# pragma message("GLM: Coordinate system: right handed")
|
||||||
|
# endif
|
||||||
|
#endif//GLM_MESSAGES
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Qualifiers
|
// Qualifiers
|
||||||
|
|
||||||
@ -617,7 +684,7 @@
|
|||||||
# define GLM_VECTOR_CALL
|
# define GLM_VECTOR_CALL
|
||||||
#endif//GLM_COMPILER
|
#endif//GLM_COMPILER
|
||||||
|
|
||||||
#if GLM_HAS_DEFAULTED_FUNCTIONS
|
#if GLM_HAS_DEFAULTED_FUNCTIONS && !defined(GLM_FORCE_UNRESTRICTED_GENTYPE)
|
||||||
# define GLM_DEFAULT = default
|
# define GLM_DEFAULT = default
|
||||||
# ifdef GLM_FORCE_NO_CTOR_INIT
|
# ifdef GLM_FORCE_NO_CTOR_INIT
|
||||||
# define GLM_DEFAULT_CTOR = default
|
# define GLM_DEFAULT_CTOR = default
|
||||||
@ -674,7 +741,7 @@ namespace glm
|
|||||||
# endif
|
# endif
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_FORCE_SIZE_T_LENGTH)
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_FORCE_SIZE_T_LENGTH)
|
||||||
# define GLM_MESSAGE_FORCE_SIZE_T_LENGTH
|
# define GLM_MESSAGE_FORCE_SIZE_T_LENGTH
|
||||||
# if defined GLM_FORCE_SIZE_T_LENGTH
|
# if defined GLM_FORCE_SIZE_T_LENGTH
|
||||||
# pragma message("GLM: .length() returns glm::length_t, a typedef of std::size_t")
|
# pragma message("GLM: .length() returns glm::length_t, a typedef of std::size_t")
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "../fwd.hpp"
|
#include "../fwd.hpp"
|
||||||
#include "type_vec.hpp"
|
#include "type_vec.hpp"
|
||||||
#ifdef GLM_SWIZZLE
|
#if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
|
||||||
# if GLM_HAS_UNRESTRICTED_UNIONS
|
# if GLM_HAS_UNRESTRICTED_UNIONS
|
||||||
# include "_swizzle.hpp"
|
# include "_swizzle.hpp"
|
||||||
# else
|
# else
|
||||||
@ -44,7 +44,7 @@ namespace glm
|
|||||||
T r;
|
T r;
|
||||||
T s;
|
T s;
|
||||||
/*
|
/*
|
||||||
# ifdef GLM_SWIZZLE
|
# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
|
||||||
_GLM_SWIZZLE1_2_MEMBERS(T, P, tvec2, x)
|
_GLM_SWIZZLE1_2_MEMBERS(T, P, tvec2, x)
|
||||||
_GLM_SWIZZLE1_2_MEMBERS(T, P, tvec2, r)
|
_GLM_SWIZZLE1_2_MEMBERS(T, P, tvec2, r)
|
||||||
_GLM_SWIZZLE1_2_MEMBERS(T, P, tvec2, s)
|
_GLM_SWIZZLE1_2_MEMBERS(T, P, tvec2, s)
|
||||||
@ -66,7 +66,7 @@ namespace glm
|
|||||||
# else
|
# else
|
||||||
union {T x, r, s;};
|
union {T x, r, s;};
|
||||||
/*
|
/*
|
||||||
# ifdef GLM_SWIZZLE
|
# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
|
||||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC1(T, P, tvec2, tvec2, tvec3, tvec4)
|
GLM_SWIZZLE_GEN_VEC_FROM_VEC1(T, P, tvec2, tvec2, tvec3, tvec4)
|
||||||
# endif//GLM_SWIZZLE*/
|
# endif//GLM_SWIZZLE*/
|
||||||
# endif
|
# endif
|
||||||
@ -110,13 +110,13 @@ namespace glm
|
|||||||
|
|
||||||
// -- Swizzle constructors --
|
// -- Swizzle constructors --
|
||||||
/*
|
/*
|
||||||
# if(GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE))
|
# if(GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED))
|
||||||
template <int E0>
|
template <int E0>
|
||||||
GLM_FUNC_DECL tvec1(detail::_swizzle<1, T, P, tvec1, E0, -1,-2,-3> const & that)
|
GLM_FUNC_DECL tvec1(detail::_swizzle<1, T, P, tvec1, E0, -1,-2,-3> const & that)
|
||||||
{
|
{
|
||||||
*this = that();
|
*this = that();
|
||||||
}
|
}
|
||||||
# endif//(GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE))
|
# endif//(GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED))
|
||||||
*/
|
*/
|
||||||
// -- Unary arithmetic operators --
|
// -- Unary arithmetic operators --
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "type_vec.hpp"
|
#include "type_vec.hpp"
|
||||||
#ifdef GLM_SWIZZLE
|
#if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
|
||||||
# if GLM_HAS_UNRESTRICTED_UNIONS
|
# if GLM_HAS_UNRESTRICTED_UNIONS
|
||||||
# include "_swizzle.hpp"
|
# include "_swizzle.hpp"
|
||||||
# else
|
# else
|
||||||
@ -43,7 +43,7 @@ namespace glm
|
|||||||
struct{ T r, g; };
|
struct{ T r, g; };
|
||||||
struct{ T s, t; };
|
struct{ T s, t; };
|
||||||
|
|
||||||
# ifdef GLM_SWIZZLE
|
# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
|
||||||
_GLM_SWIZZLE2_2_MEMBERS(T, P, glm::tvec2, x, y)
|
_GLM_SWIZZLE2_2_MEMBERS(T, P, glm::tvec2, x, y)
|
||||||
_GLM_SWIZZLE2_2_MEMBERS(T, P, glm::tvec2, r, g)
|
_GLM_SWIZZLE2_2_MEMBERS(T, P, glm::tvec2, r, g)
|
||||||
_GLM_SWIZZLE2_2_MEMBERS(T, P, glm::tvec2, s, t)
|
_GLM_SWIZZLE2_2_MEMBERS(T, P, glm::tvec2, s, t)
|
||||||
@ -67,7 +67,7 @@ namespace glm
|
|||||||
union {T x, r, s;};
|
union {T x, r, s;};
|
||||||
union {T y, g, t;};
|
union {T y, g, t;};
|
||||||
|
|
||||||
# ifdef GLM_SWIZZLE
|
# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
|
||||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC2(T, P, tvec2, tvec2, tvec3, tvec4)
|
GLM_SWIZZLE_GEN_VEC_FROM_VEC2(T, P, tvec2, tvec2, tvec3, tvec4)
|
||||||
# endif//GLM_SWIZZLE
|
# endif//GLM_SWIZZLE
|
||||||
# endif
|
# endif
|
||||||
@ -116,13 +116,13 @@ namespace glm
|
|||||||
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tvec2(tvec2<U, Q> const & v);
|
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tvec2(tvec2<U, Q> const & v);
|
||||||
|
|
||||||
// -- Swizzle constructors --
|
// -- Swizzle constructors --
|
||||||
# if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)
|
# if GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED)
|
||||||
template <int E0, int E1>
|
template <int E0, int E1>
|
||||||
GLM_FUNC_DECL tvec2(detail::_swizzle<2, T, P, glm::tvec2, E0, E1,-1,-2> const& that)
|
GLM_FUNC_DECL tvec2(detail::_swizzle<2, T, P, glm::tvec2, E0, E1,-1,-2> const& that)
|
||||||
{
|
{
|
||||||
*this = that();
|
*this = that();
|
||||||
}
|
}
|
||||||
# endif// GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)
|
# endif// GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED)
|
||||||
|
|
||||||
// -- Unary arithmetic operators --
|
// -- Unary arithmetic operators --
|
||||||
|
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "type_vec.hpp"
|
#include "type_vec.hpp"
|
||||||
#ifdef GLM_SWIZZLE
|
#if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
|
||||||
# if GLM_HAS_UNRESTRICTED_UNIONS
|
# if GLM_HAS_UNRESTRICTED_UNIONS
|
||||||
# include "_swizzle.hpp"
|
# include "_swizzle.hpp"
|
||||||
# else
|
# else
|
||||||
# include "_swizzle_func.hpp"
|
# include "_swizzle_func.hpp"
|
||||||
# endif
|
# endif
|
||||||
#endif //GLM_SWIZZLE
|
#endif //GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
namespace glm
|
namespace glm
|
||||||
@ -43,7 +43,7 @@ namespace glm
|
|||||||
struct{ T r, g, b; };
|
struct{ T r, g, b; };
|
||||||
struct{ T s, t, p; };
|
struct{ T s, t, p; };
|
||||||
|
|
||||||
# ifdef GLM_SWIZZLE
|
# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
|
||||||
_GLM_SWIZZLE3_2_MEMBERS(T, P, glm::tvec2, x, y, z)
|
_GLM_SWIZZLE3_2_MEMBERS(T, P, glm::tvec2, x, y, z)
|
||||||
_GLM_SWIZZLE3_2_MEMBERS(T, P, glm::tvec2, r, g, b)
|
_GLM_SWIZZLE3_2_MEMBERS(T, P, glm::tvec2, r, g, b)
|
||||||
_GLM_SWIZZLE3_2_MEMBERS(T, P, glm::tvec2, s, t, p)
|
_GLM_SWIZZLE3_2_MEMBERS(T, P, glm::tvec2, s, t, p)
|
||||||
@ -67,7 +67,7 @@ namespace glm
|
|||||||
union { T y, g, t; };
|
union { T y, g, t; };
|
||||||
union { T z, b, p; };
|
union { T z, b, p; };
|
||||||
|
|
||||||
# ifdef GLM_SWIZZLE
|
# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
|
||||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, P, tvec3, tvec2, tvec3, tvec4)
|
GLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, P, tvec3, tvec2, tvec3, tvec4)
|
||||||
# endif//GLM_SWIZZLE
|
# endif//GLM_SWIZZLE
|
||||||
# endif//GLM_LANG
|
# endif//GLM_LANG
|
||||||
@ -125,7 +125,7 @@ namespace glm
|
|||||||
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tvec3(tvec3<U, Q> const & v);
|
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tvec3(tvec3<U, Q> const & v);
|
||||||
|
|
||||||
// -- Swizzle constructors --
|
// -- Swizzle constructors --
|
||||||
# if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)
|
# if GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED)
|
||||||
template <int E0, int E1, int E2>
|
template <int E0, int E1, int E2>
|
||||||
GLM_FUNC_DECL tvec3(detail::_swizzle<3, T, P, glm::tvec3, E0, E1, E2, -1> const & that)
|
GLM_FUNC_DECL tvec3(detail::_swizzle<3, T, P, glm::tvec3, E0, E1, E2, -1> const & that)
|
||||||
{
|
{
|
||||||
@ -143,7 +143,7 @@ namespace glm
|
|||||||
{
|
{
|
||||||
*this = tvec3<T, P>(scalar, v());
|
*this = tvec3<T, P>(scalar, v());
|
||||||
}
|
}
|
||||||
# endif// GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)
|
# endif// GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED)
|
||||||
|
|
||||||
// -- Unary arithmetic operators --
|
// -- Unary arithmetic operators --
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "type_vec.hpp"
|
#include "type_vec.hpp"
|
||||||
#ifdef GLM_SWIZZLE
|
#if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
|
||||||
# if GLM_HAS_UNRESTRICTED_UNIONS
|
# if GLM_HAS_UNRESTRICTED_UNIONS
|
||||||
# include "_swizzle.hpp"
|
# include "_swizzle.hpp"
|
||||||
# else
|
# else
|
||||||
@ -45,7 +45,7 @@ namespace glm
|
|||||||
|
|
||||||
typename detail::storage<T, sizeof(T) * 4, detail::is_aligned<P>::value>::type data;
|
typename detail::storage<T, sizeof(T) * 4, detail::is_aligned<P>::value>::type data;
|
||||||
|
|
||||||
# ifdef GLM_SWIZZLE
|
# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
|
||||||
_GLM_SWIZZLE4_2_MEMBERS(T, P, glm::tvec2, x, y, z, w)
|
_GLM_SWIZZLE4_2_MEMBERS(T, P, glm::tvec2, x, y, z, w)
|
||||||
_GLM_SWIZZLE4_2_MEMBERS(T, P, glm::tvec2, r, g, b, a)
|
_GLM_SWIZZLE4_2_MEMBERS(T, P, glm::tvec2, r, g, b, a)
|
||||||
_GLM_SWIZZLE4_2_MEMBERS(T, P, glm::tvec2, s, t, p, q)
|
_GLM_SWIZZLE4_2_MEMBERS(T, P, glm::tvec2, s, t, p, q)
|
||||||
@ -70,7 +70,7 @@ namespace glm
|
|||||||
union { T z, b, p; };
|
union { T z, b, p; };
|
||||||
union { T w, a, q; };
|
union { T w, a, q; };
|
||||||
|
|
||||||
# ifdef GLM_SWIZZLE
|
# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
|
||||||
GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, P, tvec4, tvec2, tvec3, tvec4)
|
GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, P, tvec4, tvec2, tvec3, tvec4)
|
||||||
# endif//GLM_SWIZZLE
|
# endif//GLM_SWIZZLE
|
||||||
# endif
|
# endif
|
||||||
@ -146,7 +146,7 @@ namespace glm
|
|||||||
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tvec4(tvec4<U, Q> const& v);
|
GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tvec4(tvec4<U, Q> const& v);
|
||||||
|
|
||||||
// -- Swizzle constructors --
|
// -- Swizzle constructors --
|
||||||
# if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)
|
# if GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED)
|
||||||
template <int E0, int E1, int E2, int E3>
|
template <int E0, int E1, int E2, int E3>
|
||||||
GLM_FUNC_DECL tvec4(detail::_swizzle<4, T, P, glm::tvec4, E0, E1, E2, E3> const & that)
|
GLM_FUNC_DECL tvec4(detail::_swizzle<4, T, P, glm::tvec4, E0, E1, E2, E3> const & that)
|
||||||
{
|
{
|
||||||
@ -188,7 +188,7 @@ namespace glm
|
|||||||
{
|
{
|
||||||
*this = tvec4<T, P>(x, v());
|
*this = tvec4<T, P>(x, v());
|
||||||
}
|
}
|
||||||
# endif// GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)
|
# endif// GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED)
|
||||||
|
|
||||||
// -- Unary arithmetic operators --
|
// -- Unary arithmetic operators --
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
namespace glm{
|
namespace glm{
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
# ifdef GLM_SWIZZLE
|
# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
|
||||||
template <precision P, int E0, int E1, int E2, int E3>
|
template <precision P, int E0, int E1, int E2, int E3>
|
||||||
struct _swizzle_base1<4, float, P, glm::tvec4, E0,E1,E2,E3, true> : public _swizzle_base0<float, 4>
|
struct _swizzle_base1<4, float, P, glm::tvec4, E0,E1,E2,E3, true> : public _swizzle_base0<float, 4>
|
||||||
{
|
{
|
||||||
@ -49,7 +49,7 @@ namespace detail
|
|||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
# endif//GLM_SWIZZLE
|
# endif// GLM_SWIZZLE == GLM_SWIZZLE_ENABLED
|
||||||
|
|
||||||
template <precision P>
|
template <precision P>
|
||||||
struct compute_vec4_add<float, P, true>
|
struct compute_vec4_add<float, P, true>
|
||||||
|
@ -27,7 +27,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_EXT_INCLUDED_DISPLAYED))
|
#include "glm.hpp"
|
||||||
|
|
||||||
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_EXT_INCLUDED_DISPLAYED)
|
||||||
# define GLM_MESSAGE_EXT_INCLUDED_DISPLAYED
|
# define GLM_MESSAGE_EXT_INCLUDED_DISPLAYED
|
||||||
# pragma message("GLM: All extensions included (not recommanded)")
|
# pragma message("GLM: All extensions included (not recommanded)")
|
||||||
#endif//GLM_MESSAGES
|
#endif//GLM_MESSAGES
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include "fwd.hpp"
|
#include "fwd.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_CORE_INCLUDED_DISPLAYED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_CORE_INCLUDED_DISPLAYED)
|
||||||
# define GLM_MESSAGE_CORE_INCLUDED_DISPLAYED
|
# define GLM_MESSAGE_CORE_INCLUDED_DISPLAYED
|
||||||
# pragma message("GLM: Core library included")
|
# pragma message("GLM: Core library included")
|
||||||
#endif//GLM_MESSAGES
|
#endif//GLM_MESSAGES
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include "../detail/_vectorize.hpp"
|
#include "../detail/_vectorize.hpp"
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTC_bitfield extension included")
|
# pragma message("GLM: GLM_GTC_bitfield extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include "../vec4.hpp"
|
#include "../vec4.hpp"
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTC_color_space extension included")
|
# pragma message("GLM: GLM_GTC_color_space extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
// Dependencies
|
// Dependencies
|
||||||
#include "../detail/setup.hpp"
|
#include "../detail/setup.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTC_constants extension included")
|
# pragma message("GLM: GLM_GTC_constants extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include "../detail/setup.hpp"
|
#include "../detail/setup.hpp"
|
||||||
#include "../detail/precision.hpp"
|
#include "../detail/precision.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTC_epsilon extension included")
|
# pragma message("GLM: GLM_GTC_epsilon extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include "../detail/precision.hpp"
|
#include "../detail/precision.hpp"
|
||||||
#include "../detail/type_vec2.hpp"
|
#include "../detail/type_vec2.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTC_functions extension included")
|
# pragma message("GLM: GLM_GTC_functions extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include "../detail/func_exponential.hpp"
|
#include "../detail/func_exponential.hpp"
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTC_integer extension included")
|
# pragma message("GLM: GLM_GTC_integer extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../detail/setup.hpp"
|
#include "../detail/setup.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTC_matrix_access extension included")
|
# pragma message("GLM: GLM_GTC_matrix_access extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include "../mat4x3.hpp"
|
#include "../mat4x3.hpp"
|
||||||
#include "../mat4x4.hpp"
|
#include "../mat4x4.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTC_matrix_integer extension included")
|
# pragma message("GLM: GLM_GTC_matrix_integer extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include "../mat3x3.hpp"
|
#include "../mat3x3.hpp"
|
||||||
#include "../mat4x4.hpp"
|
#include "../mat4x4.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTC_matrix_inverse extension included")
|
# pragma message("GLM: GLM_GTC_matrix_inverse extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "../vec4.hpp"
|
#include "../vec4.hpp"
|
||||||
#include "../gtc/constants.hpp"
|
#include "../gtc/constants.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTC_matrix_transform extension included")
|
# pragma message("GLM: GLM_GTC_matrix_transform extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -8,11 +8,7 @@
|
|||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> translate
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> translate(tmat4x4<T, P> const & m, tvec3<T, P> const & v)
|
||||||
(
|
|
||||||
tmat4x4<T, P> const & m,
|
|
||||||
tvec3<T, P> const & v
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
tmat4x4<T, P> Result(m);
|
tmat4x4<T, P> Result(m);
|
||||||
Result[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3];
|
Result[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3];
|
||||||
@ -20,12 +16,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate(tmat4x4<T, P> const & m, T angle, tvec3<T, P> const & v)
|
||||||
(
|
|
||||||
tmat4x4<T, P> const & m,
|
|
||||||
T angle,
|
|
||||||
tvec3<T, P> const & v
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
T const a = angle;
|
T const a = angle;
|
||||||
T const c = cos(a);
|
T const c = cos(a);
|
||||||
@ -36,15 +27,15 @@ namespace glm
|
|||||||
|
|
||||||
tmat4x4<T, P> Rotate(uninitialize);
|
tmat4x4<T, P> Rotate(uninitialize);
|
||||||
Rotate[0][0] = c + temp[0] * axis[0];
|
Rotate[0][0] = c + temp[0] * axis[0];
|
||||||
Rotate[0][1] = 0 + temp[0] * axis[1] + s * axis[2];
|
Rotate[0][1] = temp[0] * axis[1] + s * axis[2];
|
||||||
Rotate[0][2] = 0 + temp[0] * axis[2] - s * axis[1];
|
Rotate[0][2] = temp[0] * axis[2] - s * axis[1];
|
||||||
|
|
||||||
Rotate[1][0] = 0 + temp[1] * axis[0] - s * axis[2];
|
Rotate[1][0] = temp[1] * axis[0] - s * axis[2];
|
||||||
Rotate[1][1] = c + temp[1] * axis[1];
|
Rotate[1][1] = c + temp[1] * axis[1];
|
||||||
Rotate[1][2] = 0 + temp[1] * axis[2] + s * axis[0];
|
Rotate[1][2] = temp[1] * axis[2] + s * axis[0];
|
||||||
|
|
||||||
Rotate[2][0] = 0 + temp[2] * axis[0] + s * axis[1];
|
Rotate[2][0] = temp[2] * axis[0] + s * axis[1];
|
||||||
Rotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0];
|
Rotate[2][1] = temp[2] * axis[1] - s * axis[0];
|
||||||
Rotate[2][2] = c + temp[2] * axis[2];
|
Rotate[2][2] = c + temp[2] * axis[2];
|
||||||
|
|
||||||
tmat4x4<T, P> Result(uninitialize);
|
tmat4x4<T, P> Result(uninitialize);
|
||||||
@ -56,12 +47,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate_slow
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate_slow(tmat4x4<T, P> const & m, T angle, tvec3<T, P> const & v)
|
||||||
(
|
|
||||||
tmat4x4<T, P> const & m,
|
|
||||||
T angle,
|
|
||||||
tvec3<T, P> const & v
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
T const a = angle;
|
T const a = angle;
|
||||||
T const c = cos(a);
|
T const c = cos(a);
|
||||||
@ -70,31 +56,27 @@ namespace glm
|
|||||||
|
|
||||||
tvec3<T, P> axis = normalize(v);
|
tvec3<T, P> axis = normalize(v);
|
||||||
|
|
||||||
Result[0][0] = c + (1 - c) * axis.x * axis.x;
|
Result[0][0] = c + (static_cast<T>(1) - c) * axis.x * axis.x;
|
||||||
Result[0][1] = (1 - c) * axis.x * axis.y + s * axis.z;
|
Result[0][1] = (static_cast<T>(1) - c) * axis.x * axis.y + s * axis.z;
|
||||||
Result[0][2] = (1 - c) * axis.x * axis.z - s * axis.y;
|
Result[0][2] = (static_cast<T>(1) - c) * axis.x * axis.z - s * axis.y;
|
||||||
Result[0][3] = 0;
|
Result[0][3] = static_cast<T>(0);
|
||||||
|
|
||||||
Result[1][0] = (1 - c) * axis.y * axis.x - s * axis.z;
|
Result[1][0] = (static_cast<T>(1) - c) * axis.y * axis.x - s * axis.z;
|
||||||
Result[1][1] = c + (1 - c) * axis.y * axis.y;
|
Result[1][1] = c + (static_cast<T>(1) - c) * axis.y * axis.y;
|
||||||
Result[1][2] = (1 - c) * axis.y * axis.z + s * axis.x;
|
Result[1][2] = (static_cast<T>(1) - c) * axis.y * axis.z + s * axis.x;
|
||||||
Result[1][3] = 0;
|
Result[1][3] = static_cast<T>(0);
|
||||||
|
|
||||||
Result[2][0] = (1 - c) * axis.z * axis.x + s * axis.y;
|
Result[2][0] = (static_cast<T>(1) - c) * axis.z * axis.x + s * axis.y;
|
||||||
Result[2][1] = (1 - c) * axis.z * axis.y - s * axis.x;
|
Result[2][1] = (static_cast<T>(1) - c) * axis.z * axis.y - s * axis.x;
|
||||||
Result[2][2] = c + (1 - c) * axis.z * axis.z;
|
Result[2][2] = c + (static_cast<T>(1) - c) * axis.z * axis.z;
|
||||||
Result[2][3] = 0;
|
Result[2][3] = static_cast<T>(0);
|
||||||
|
|
||||||
Result[3] = tvec4<T, P>(0, 0, 0, 1);
|
Result[3] = tvec4<T, P>(0, 0, 0, 1);
|
||||||
return m * Result;
|
return m * Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> scale
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> scale(tmat4x4<T, P> const & m, tvec3<T, P> const & v)
|
||||||
(
|
|
||||||
tmat4x4<T, P> const & m,
|
|
||||||
tvec3<T, P> const & v
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
tmat4x4<T, P> Result(uninitialize);
|
tmat4x4<T, P> Result(uninitialize);
|
||||||
Result[0] = m[0] * v[0];
|
Result[0] = m[0] * v[0];
|
||||||
@ -105,11 +87,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> scale_slow
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> scale_slow(tmat4x4<T, P> const & m, tvec3<T, P> const & v)
|
||||||
(
|
|
||||||
tmat4x4<T, P> const & m,
|
|
||||||
tvec3<T, P> const & v
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
tmat4x4<T, P> Result(T(1));
|
tmat4x4<T, P> Result(T(1));
|
||||||
Result[0][0] = v.x;
|
Result[0][0] = v.x;
|
||||||
@ -267,13 +245,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspective
|
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspective(T fovy, T aspect, T zNear, T zFar)
|
||||||
(
|
|
||||||
T fovy,
|
|
||||||
T aspect,
|
|
||||||
T zNear,
|
|
||||||
T zFar
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
# if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED
|
# if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED
|
||||||
return perspectiveLH(fovy, aspect, zNear, zFar);
|
return perspectiveLH(fovy, aspect, zNear, zFar);
|
||||||
@ -283,12 +255,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveRH
|
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveRH(T fovy, T aspect, T zNear, T zFar)
|
||||||
(
|
|
||||||
T fovy,
|
|
||||||
T aspect,
|
|
||||||
T zNear, T zFar
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
assert(abs(aspect - std::numeric_limits<T>::epsilon()) > static_cast<T>(0));
|
assert(abs(aspect - std::numeric_limits<T>::epsilon()) > static_cast<T>(0));
|
||||||
|
|
||||||
@ -311,12 +278,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveLH
|
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveLH(T fovy, T aspect, T zNear, T zFar)
|
||||||
(
|
|
||||||
T fovy,
|
|
||||||
T aspect,
|
|
||||||
T zNear, T zFar
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
assert(abs(aspect - std::numeric_limits<T>::epsilon()) > static_cast<T>(0));
|
assert(abs(aspect - std::numeric_limits<T>::epsilon()) > static_cast<T>(0));
|
||||||
|
|
||||||
@ -339,12 +301,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveFov
|
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveFov(T fov, T width, T height, T zNear, T zFar)
|
||||||
(
|
|
||||||
T fov,
|
|
||||||
T width, T height,
|
|
||||||
T zNear, T zFar
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
# if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED
|
# if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED
|
||||||
return perspectiveFovLH(fov, width, height, zNear, zFar);
|
return perspectiveFovLH(fov, width, height, zNear, zFar);
|
||||||
@ -354,12 +311,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveFovRH
|
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveFovRH(T fov, T width, T height, T zNear, T zFar)
|
||||||
(
|
|
||||||
T fov,
|
|
||||||
T width, T height,
|
|
||||||
T zNear, T zFar
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
assert(width > static_cast<T>(0));
|
assert(width > static_cast<T>(0));
|
||||||
assert(height > static_cast<T>(0));
|
assert(height > static_cast<T>(0));
|
||||||
@ -386,12 +338,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveFovLH
|
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveFovLH(T fov, T width, T height, T zNear, T zFar)
|
||||||
(
|
|
||||||
T fov,
|
|
||||||
T width, T height,
|
|
||||||
T zNear, T zFar
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
assert(width > static_cast<T>(0));
|
assert(width > static_cast<T>(0));
|
||||||
assert(height > static_cast<T>(0));
|
assert(height > static_cast<T>(0));
|
||||||
@ -418,12 +365,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> infinitePerspective
|
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> infinitePerspective(T fovy, T aspect, T zNear)
|
||||||
(
|
|
||||||
T fovy,
|
|
||||||
T aspect,
|
|
||||||
T zNear
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
# if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED
|
# if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED
|
||||||
return infinitePerspectiveLH(fovy, aspect, zNear);
|
return infinitePerspectiveLH(fovy, aspect, zNear);
|
||||||
@ -433,68 +375,52 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> infinitePerspectiveRH
|
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> infinitePerspectiveRH(T fovy, T aspect, T zNear)
|
||||||
(
|
|
||||||
T fovy,
|
|
||||||
T aspect,
|
|
||||||
T zNear
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
T const range = tan(fovy / T(2)) * zNear;
|
T const range = tan(fovy / static_cast<T>(2)) * zNear;
|
||||||
T const left = -range * aspect;
|
T const left = -range * aspect;
|
||||||
T const right = range * aspect;
|
T const right = range * aspect;
|
||||||
T const bottom = -range;
|
T const bottom = -range;
|
||||||
T const top = range;
|
T const top = range;
|
||||||
|
|
||||||
tmat4x4<T, defaultp> Result(T(0));
|
tmat4x4<T, defaultp> Result(static_cast<T>(0));
|
||||||
Result[0][0] = (T(2) * zNear) / (right - left);
|
Result[0][0] = (static_cast<T>(2) * zNear) / (right - left);
|
||||||
Result[1][1] = (T(2) * zNear) / (top - bottom);
|
Result[1][1] = (static_cast<T>(2) * zNear) / (top - bottom);
|
||||||
Result[2][2] = - T(1);
|
Result[2][2] = - static_cast<T>(1);
|
||||||
Result[2][3] = - T(1);
|
Result[2][3] = - static_cast<T>(1);
|
||||||
Result[3][2] = - T(2) * zNear;
|
Result[3][2] = - static_cast<T>(2) * zNear;
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> infinitePerspectiveLH
|
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> infinitePerspectiveLH(T fovy, T aspect, T zNear)
|
||||||
(
|
|
||||||
T fovy,
|
|
||||||
T aspect,
|
|
||||||
T zNear
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
T const range = tan(fovy / T(2)) * zNear;
|
T const range = tan(fovy / static_cast<T>(2)) * zNear;
|
||||||
T const left = -range * aspect;
|
T const left = -range * aspect;
|
||||||
T const right = range * aspect;
|
T const right = range * aspect;
|
||||||
T const bottom = -range;
|
T const bottom = -range;
|
||||||
T const top = range;
|
T const top = range;
|
||||||
|
|
||||||
tmat4x4<T, defaultp> Result(T(0));
|
tmat4x4<T, defaultp> Result(T(0));
|
||||||
Result[0][0] = (T(2) * zNear) / (right - left);
|
Result[0][0] = (static_cast<T>(2) * zNear) / (right - left);
|
||||||
Result[1][1] = (T(2) * zNear) / (top - bottom);
|
Result[1][1] = (static_cast<T>(2) * zNear) / (top - bottom);
|
||||||
Result[2][2] = T(1);
|
Result[2][2] = static_cast<T>(1);
|
||||||
Result[2][3] = T(1);
|
Result[2][3] = static_cast<T>(1);
|
||||||
Result[3][2] = - T(2) * zNear;
|
Result[3][2] = - static_cast<T>(2) * zNear;
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Infinite projection matrix: http://www.terathon.com/gdc07_lengyel.pdf
|
// Infinite projection matrix: http://www.terathon.com/gdc07_lengyel.pdf
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> tweakedInfinitePerspective
|
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> tweakedInfinitePerspective(T fovy, T aspect, T zNear, T ep)
|
||||||
(
|
|
||||||
T fovy,
|
|
||||||
T aspect,
|
|
||||||
T zNear,
|
|
||||||
T ep
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
T const range = tan(fovy / T(2)) * zNear;
|
T const range = tan(fovy / static_cast<T>(2)) * zNear;
|
||||||
T const left = -range * aspect;
|
T const left = -range * aspect;
|
||||||
T const right = range * aspect;
|
T const right = range * aspect;
|
||||||
T const bottom = -range;
|
T const bottom = -range;
|
||||||
T const top = range;
|
T const top = range;
|
||||||
|
|
||||||
tmat4x4<T, defaultp> Result(T(0));
|
tmat4x4<T, defaultp> Result(static_cast<T>(0));
|
||||||
Result[0][0] = (static_cast<T>(2) * zNear) / (right - left);
|
Result[0][0] = (static_cast<T>(2) * zNear) / (right - left);
|
||||||
Result[1][1] = (static_cast<T>(2) * zNear) / (top - bottom);
|
Result[1][1] = (static_cast<T>(2) * zNear) / (top - bottom);
|
||||||
Result[2][2] = ep - static_cast<T>(1);
|
Result[2][2] = ep - static_cast<T>(1);
|
||||||
@ -504,12 +430,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> tweakedInfinitePerspective
|
GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> tweakedInfinitePerspective(T fovy, T aspect, T zNear)
|
||||||
(
|
|
||||||
T fovy,
|
|
||||||
T aspect,
|
|
||||||
T zNear
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
return tweakedInfinitePerspective(fovy, aspect, zNear, epsilon<T>());
|
return tweakedInfinitePerspective(fovy, aspect, zNear, epsilon<T>());
|
||||||
}
|
}
|
||||||
@ -523,16 +444,16 @@ namespace glm
|
|||||||
tvec4<U, P> const & viewport
|
tvec4<U, P> const & viewport
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tvec4<T, P> tmp = tvec4<T, P>(obj, T(1));
|
tvec4<T, P> tmp = tvec4<T, P>(obj, static_cast<T>(1));
|
||||||
tmp = model * tmp;
|
tmp = model * tmp;
|
||||||
tmp = proj * tmp;
|
tmp = proj * tmp;
|
||||||
|
|
||||||
tmp /= tmp.w;
|
tmp /= tmp.w;
|
||||||
# if GLM_DEPTH_CLIP_SPACE == GLM_DEPTH_ZERO_TO_ONE
|
# if GLM_DEPTH_CLIP_SPACE == GLM_DEPTH_ZERO_TO_ONE
|
||||||
tmp.x = tmp.x * T(0.5) + T(0.5);
|
tmp.x = tmp.x * static_cast<T>(0.5) + static_cast<T>(0.5);
|
||||||
tmp.y = tmp.y * T(0.5) + T(0.5);
|
tmp.y = tmp.y * static_cast<T>(0.5) + static_cast<T>(0.5);
|
||||||
# else
|
# else
|
||||||
tmp = tmp * T(0.5) + T(0.5);
|
tmp = tmp * static_cast<T>(0.5) + static_cast<T>(0.5);
|
||||||
# endif
|
# endif
|
||||||
tmp[0] = tmp[0] * T(viewport[2]) + T(viewport[0]);
|
tmp[0] = tmp[0] * T(viewport[2]) + T(viewport[0]);
|
||||||
tmp[1] = tmp[1] * T(viewport[3]) + T(viewport[1]);
|
tmp[1] = tmp[1] * T(viewport[3]) + T(viewport[1]);
|
||||||
@ -555,10 +476,10 @@ namespace glm
|
|||||||
tmp.x = (tmp.x - T(viewport[0])) / T(viewport[2]);
|
tmp.x = (tmp.x - T(viewport[0])) / T(viewport[2]);
|
||||||
tmp.y = (tmp.y - T(viewport[1])) / T(viewport[3]);
|
tmp.y = (tmp.y - T(viewport[1])) / T(viewport[3]);
|
||||||
# if GLM_DEPTH_CLIP_SPACE == GLM_DEPTH_ZERO_TO_ONE
|
# if GLM_DEPTH_CLIP_SPACE == GLM_DEPTH_ZERO_TO_ONE
|
||||||
tmp.x = tmp.x * T(2) - T(1);
|
tmp.x = tmp.x * static_cast<T>(2) - static_cast<T>(1);
|
||||||
tmp.y = tmp.y * T(2) - T(1);
|
tmp.y = tmp.y * static_cast<T>(2) - static_cast<T>(1);
|
||||||
# else
|
# else
|
||||||
tmp = tmp * T(2) - T(1);
|
tmp = tmp * static_cast<T>(2) - static_cast<T>(1);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
tvec4<T, P> obj = Inverse * tmp;
|
tvec4<T, P> obj = Inverse * tmp;
|
||||||
@ -568,36 +489,26 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P, typename U>
|
template <typename T, precision P, typename U>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> pickMatrix
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> pickMatrix(tvec2<T, P> const & center, tvec2<T, P> const & delta, tvec4<U, P> const & viewport)
|
||||||
(
|
|
||||||
tvec2<T, P> const & center,
|
|
||||||
tvec2<T, P> const & delta,
|
|
||||||
tvec4<U, P> const & viewport
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
assert(delta.x > T(0) && delta.y > T(0));
|
assert(delta.x > static_cast<T>(0) && delta.y > static_cast<T>(0));
|
||||||
tmat4x4<T, P> Result(1.0f);
|
tmat4x4<T, P> Result(static_cast<T>(1));
|
||||||
|
|
||||||
if(!(delta.x > T(0) && delta.y > T(0)))
|
if(!(delta.x > static_cast<T>(0) && delta.y > static_cast<T>(0)))
|
||||||
return Result; // Error
|
return Result; // Error
|
||||||
|
|
||||||
tvec3<T, P> Temp(
|
tvec3<T, P> Temp(
|
||||||
(T(viewport[2]) - T(2) * (center.x - T(viewport[0]))) / delta.x,
|
(static_cast<T>(viewport[2]) - static_cast<T>(2) * (center.x - static_cast<T>(viewport[0]))) / delta.x,
|
||||||
(T(viewport[3]) - T(2) * (center.y - T(viewport[1]))) / delta.y,
|
(static_cast<T>(viewport[3]) - static_cast<T>(2) * (center.y - static_cast<T>(viewport[1]))) / delta.y,
|
||||||
T(0));
|
static_cast<T>(0));
|
||||||
|
|
||||||
// Translate and scale the picked region to the entire window
|
// Translate and scale the picked region to the entire window
|
||||||
Result = translate(Result, Temp);
|
Result = translate(Result, Temp);
|
||||||
return scale(Result, tvec3<T, P>(T(viewport[2]) / delta.x, T(viewport[3]) / delta.y, T(1)));
|
return scale(Result, tvec3<T, P>(static_cast<T>(viewport[2]) / delta.x, static_cast<T>(viewport[3]) / delta.y, static_cast<T>(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> lookAt
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> lookAt(tvec3<T, P> const & eye, tvec3<T, P> const & center, tvec3<T, P> const & up)
|
||||||
(
|
|
||||||
tvec3<T, P> const & eye,
|
|
||||||
tvec3<T, P> const & center,
|
|
||||||
tvec3<T, P> const & up
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
# if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED
|
# if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED
|
||||||
return lookAtLH(eye, center, up);
|
return lookAtLH(eye, center, up);
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include "../vec3.hpp"
|
#include "../vec3.hpp"
|
||||||
#include "../vec4.hpp"
|
#include "../vec4.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTC_noise extension included")
|
# pragma message("GLM: GLM_GTC_noise extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "type_precision.hpp"
|
#include "type_precision.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTC_packing extension included")
|
# pragma message("GLM: GLM_GTC_packing extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include "../vec4.hpp"
|
#include "../vec4.hpp"
|
||||||
#include "../gtc/constants.hpp"
|
#include "../gtc/constants.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTC_quaternion extension included")
|
# pragma message("GLM: GLM_GTC_quaternion extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include "../vec2.hpp"
|
#include "../vec2.hpp"
|
||||||
#include "../vec3.hpp"
|
#include "../vec3.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTC_random extension included")
|
# pragma message("GLM: GLM_GTC_random extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
// Dependencies
|
// Dependencies
|
||||||
#include "../detail/setup.hpp"
|
#include "../detail/setup.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTC_reciprocal extension included")
|
# pragma message("GLM: GLM_GTC_reciprocal extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include "../common.hpp"
|
#include "../common.hpp"
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTC_integer extension included")
|
# pragma message("GLM: GLM_GTC_integer extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -9,15 +9,15 @@
|
|||||||
/// @brief Aligned types.
|
/// @brief Aligned types.
|
||||||
/// <glm/gtc/type_aligned.hpp> need to be included to use these features.
|
/// <glm/gtc/type_aligned.hpp> need to be included to use these features.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#if !GLM_HAS_ALIGNED_TYPE
|
#if !GLM_HAS_ALIGNED_TYPE
|
||||||
# error "GLM: Aligned types are not supported on this platform"
|
# error "GLM: Aligned types are not supported on this platform"
|
||||||
#endif
|
#endif
|
||||||
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTC_type_aligned extension included")
|
# pragma message("GLM: GLM_GTC_type_aligned extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "../vec2.hpp"
|
#include "../vec2.hpp"
|
||||||
#include "../vec3.hpp"
|
#include "../vec3.hpp"
|
||||||
#include "../vec4.hpp"
|
#include "../vec4.hpp"
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include "../mat4x3.hpp"
|
#include "../mat4x3.hpp"
|
||||||
#include "../mat4x4.hpp"
|
#include "../mat4x4.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTC_type_precision extension included")
|
# pragma message("GLM: GLM_GTC_type_precision extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
#include "../mat4x4.hpp"
|
#include "../mat4x4.hpp"
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTC_type_ptr extension included")
|
# pragma message("GLM: GLM_GTC_type_ptr extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include "../detail/precision.hpp"
|
#include "../detail/precision.hpp"
|
||||||
#include "../detail/type_int.hpp"
|
#include "../detail/type_int.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTC_ulp extension included")
|
# pragma message("GLM: GLM_GTC_ulp extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
#include "../detail/type_vec1.hpp"
|
#include "../detail/type_vec1.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTC_vec1 extension included")
|
# pragma message("GLM: GLM_GTC_vec1 extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_associated_min_max extension included")
|
# pragma message("GLM: GLM_GTX_associated_min_max extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
// Dependencies
|
// Dependencies
|
||||||
#include "../gtc/bitfield.hpp"
|
#include "../gtc/bitfield.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_bit extension is deprecated, include GLM_GTC_bitfield and GLM_GTC_integer instead")
|
# pragma message("GLM: GLM_GTX_bit extension is deprecated, include GLM_GTC_bitfield and GLM_GTC_integer instead")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_closest_point extension included")
|
# pragma message("GLM: GLM_GTX_closest_point extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_color_space extension included")
|
# pragma message("GLM: GLM_GTX_color_space extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_color_space_YCoCg extension included")
|
# pragma message("GLM: GLM_GTX_color_space_YCoCg extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include "../vec4.hpp"
|
#include "../vec4.hpp"
|
||||||
#include "../gtc/vec1.hpp"
|
#include "../gtc/vec1.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_common extension included")
|
# pragma message("GLM: GLM_GTX_common extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -17,13 +17,13 @@
|
|||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
#include "../gtc/quaternion.hpp"
|
#include "../gtc/quaternion.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_compatibility extension included")
|
# pragma message("GLM: GLM_GTX_compatibility extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if(GLM_COMPILER & GLM_COMPILER_VC)
|
#if GLM_COMPILER & GLM_COMPILER_VC
|
||||||
# include <cfloat>
|
# include <cfloat>
|
||||||
#elif(GLM_COMPILER & GLM_COMPILER_GCC)
|
#elif GLM_COMPILER & GLM_COMPILER_GCC
|
||||||
# include <cmath>
|
# include <cmath>
|
||||||
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
|
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
|
||||||
# undef isfinite
|
# undef isfinite
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include "../detail/setup.hpp"
|
#include "../detail/setup.hpp"
|
||||||
#include "../detail/precision.hpp"
|
#include "../detail/precision.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_component_wise extension included")
|
# pragma message("GLM: GLM_GTX_component_wise extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include "../gtc/constants.hpp"
|
#include "../gtc/constants.hpp"
|
||||||
#include "../gtc/quaternion.hpp"
|
#include "../gtc/quaternion.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_dual_quaternion extension included")
|
# pragma message("GLM: GLM_GTX_dual_quaternion extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_euler_angles extension included")
|
# pragma message("GLM: GLM_GTX_euler_angles extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_extend extension included")
|
# pragma message("GLM: GLM_GTX_extend extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_extented_min_max extension included")
|
# pragma message("GLM: GLM_GTX_extented_min_max extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_fast_exponential extension included")
|
# pragma message("GLM: GLM_GTX_fast_exponential extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include "../exponential.hpp"
|
#include "../exponential.hpp"
|
||||||
#include "../geometric.hpp"
|
#include "../geometric.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_fast_square_root extension included")
|
# pragma message("GLM: GLM_GTX_fast_square_root extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../gtc/constants.hpp"
|
#include "../gtc/constants.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_fast_trigonometry extension included")
|
# pragma message("GLM: GLM_GTX_fast_trigonometry extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
#include "../gtx/optimum_pow.hpp"
|
#include "../gtx/optimum_pow.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_gradient_paint extension included")
|
# pragma message("GLM: GLM_GTX_gradient_paint extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_handed_coordinate_space extension included")
|
# pragma message("GLM: GLM_GTX_handed_coordinate_space extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
#include "../gtc/integer.hpp"
|
#include "../gtc/integer.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_integer extension included")
|
# pragma message("GLM: GLM_GTX_integer extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include "../gtx/closest_point.hpp"
|
#include "../gtx/closest_point.hpp"
|
||||||
#include "../gtx/vector_query.hpp"
|
#include "../gtx/vector_query.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_closest_point extension included")
|
# pragma message("GLM: GLM_GTX_closest_point extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
#include "../gtx/quaternion.hpp"
|
#include "../gtx/quaternion.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_io extension included")
|
# pragma message("GLM: GLM_GTX_io extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_log_base extension included")
|
# pragma message("GLM: GLM_GTX_log_base extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_matrix_cross_product extension included")
|
# pragma message("GLM: GLM_GTX_matrix_cross_product extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include "../gtc/quaternion.hpp"
|
#include "../gtc/quaternion.hpp"
|
||||||
#include "../gtc/matrix_transform.hpp"
|
#include "../gtc/matrix_transform.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_matrix_decompose extension included")
|
# pragma message("GLM: GLM_GTX_matrix_decompose extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_matrix_interpolation extension included")
|
# pragma message("GLM: GLM_GTX_matrix_interpolation extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_matrix_major_storage extension included")
|
# pragma message("GLM: GLM_GTX_matrix_major_storage extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_matrix_operation extension included")
|
# pragma message("GLM: GLM_GTX_matrix_operation extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include "../gtx/vector_query.hpp"
|
#include "../gtx/vector_query.hpp"
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_matrix_query extension included")
|
# pragma message("GLM: GLM_GTX_matrix_query extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include "../vec2.hpp"
|
#include "../vec2.hpp"
|
||||||
|
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_matrix_transform_2d extension included")
|
# pragma message("GLM: GLM_GTX_matrix_transform_2d extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_mixed_product extension included")
|
# pragma message("GLM: GLM_GTX_mixed_product extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include "../detail/func_geometric.hpp"
|
#include "../detail/func_geometric.hpp"
|
||||||
#include "../gtx/quaternion.hpp"
|
#include "../gtx/quaternion.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_norm extension included")
|
# pragma message("GLM: GLM_GTX_norm extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_normal extension included")
|
# pragma message("GLM: GLM_GTX_normal extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../gtx/fast_square_root.hpp"
|
#include "../gtx/fast_square_root.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_normalize_dot extension included")
|
# pragma message("GLM: GLM_GTX_normalize_dot extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
#include "../gtc/type_precision.hpp"
|
#include "../gtc/type_precision.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_number_precision extension included")
|
# pragma message("GLM: GLM_GTX_number_precision extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_optimum_pow extension included")
|
# pragma message("GLM: GLM_GTX_optimum_pow extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
#include "../mat3x3.hpp"
|
#include "../mat3x3.hpp"
|
||||||
#include "../geometric.hpp"
|
#include "../geometric.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_orthonormalize extension included")
|
# pragma message("GLM: GLM_GTX_orthonormalize extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
#include "../gtx/projection.hpp"
|
#include "../gtx/projection.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_perpendicular extension included")
|
# pragma message("GLM: GLM_GTX_perpendicular extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_polar_coordinates extension included")
|
# pragma message("GLM: GLM_GTX_polar_coordinates extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../geometric.hpp"
|
#include "../geometric.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_projection extension included")
|
# pragma message("GLM: GLM_GTX_projection extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include "../gtc/quaternion.hpp"
|
#include "../gtc/quaternion.hpp"
|
||||||
#include "../gtx/norm.hpp"
|
#include "../gtx/norm.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_quaternion extension included")
|
# pragma message("GLM: GLM_GTX_quaternion extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -7,21 +7,13 @@
|
|||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> cross
|
GLM_FUNC_QUALIFIER tvec3<T, P> cross(tvec3<T, P> const& v, tquat<T, P> const& q)
|
||||||
(
|
|
||||||
tvec3<T, P> const & v,
|
|
||||||
tquat<T, P> const & q
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
return inverse(q) * v;
|
return inverse(q) * v;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> cross
|
GLM_FUNC_QUALIFIER tvec3<T, P> cross(tquat<T, P> const& q, tvec3<T, P> const& v)
|
||||||
(
|
|
||||||
tquat<T, P> const & q,
|
|
||||||
tvec3<T, P> const & v
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
return q * v;
|
return q * v;
|
||||||
}
|
}
|
||||||
@ -51,25 +43,19 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tquat<T, P> exp
|
GLM_FUNC_QUALIFIER tquat<T, P> exp(tquat<T, P> const& q)
|
||||||
(
|
|
||||||
tquat<T, P> const & q
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
tvec3<T, P> u(q.x, q.y, q.z);
|
tvec3<T, P> u(q.x, q.y, q.z);
|
||||||
T Angle = glm::length(u);
|
T const Angle = glm::length(u);
|
||||||
if (Angle < epsilon<T>())
|
if (Angle < epsilon<T>())
|
||||||
return tquat<T, P>();
|
return tquat<T, P>();
|
||||||
|
|
||||||
tvec3<T, P> v(u / Angle);
|
tvec3<T, P> const v(u / Angle);
|
||||||
return tquat<T, P>(cos(Angle), sin(Angle) * v);
|
return tquat<T, P>(cos(Angle), sin(Angle) * v);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tquat<T, P> log
|
GLM_FUNC_QUALIFIER tquat<T, P> log(tquat<T, P> const& q)
|
||||||
(
|
|
||||||
tquat<T, P> const & q
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
tvec3<T, P> u(q.x, q.y, q.z);
|
tvec3<T, P> u(q.x, q.y, q.z);
|
||||||
T Vec3Len = length(u);
|
T Vec3Len = length(u);
|
||||||
@ -110,36 +96,25 @@ namespace glm
|
|||||||
T Angle = acos(x.w / magnitude);
|
T Angle = acos(x.w / magnitude);
|
||||||
T NewAngle = Angle * y;
|
T NewAngle = Angle * y;
|
||||||
T Div = sin(NewAngle) / sin(Angle);
|
T Div = sin(NewAngle) / sin(Angle);
|
||||||
T Mag = pow(magnitude, y-1);
|
T Mag = pow(magnitude, y - static_cast<T>(1));
|
||||||
|
|
||||||
return tquat<T, P>(cos(NewAngle) * magnitude * Mag, x.x * Div * Mag, x.y * Div * Mag, x.z * Div * Mag);
|
return tquat<T, P>(cos(NewAngle) * magnitude * Mag, x.x * Div * Mag, x.y * Div * Mag, x.z * Div * Mag);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P> rotate
|
GLM_FUNC_QUALIFIER tvec3<T, P> rotate(tquat<T, P> const& q, tvec3<T, P> const& v)
|
||||||
(
|
|
||||||
tquat<T, P> const & q,
|
|
||||||
tvec3<T, P> const & v
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
return q * v;
|
return q * v;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<T, P> rotate
|
GLM_FUNC_QUALIFIER tvec4<T, P> rotate(tquat<T, P> const& q, tvec4<T, P> const& v)
|
||||||
(
|
|
||||||
tquat<T, P> const & q,
|
|
||||||
tvec4<T, P> const & v
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
return q * v;
|
return q * v;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER T extractRealComponent
|
GLM_FUNC_QUALIFIER T extractRealComponent(tquat<T, P> const& q)
|
||||||
(
|
|
||||||
tquat<T, P> const & q
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
T w = static_cast<T>(1) - q.x * q.x - q.y * q.y - q.z * q.z;
|
T w = static_cast<T>(1) - q.x * q.x - q.y * q.y - q.z * q.z;
|
||||||
if(w < T(0))
|
if(w < T(0))
|
||||||
@ -149,21 +124,13 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER T length2
|
GLM_FUNC_QUALIFIER T length2(tquat<T, P> const& q)
|
||||||
(
|
|
||||||
tquat<T, P> const & q
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
return q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w;
|
return q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tquat<T, P> shortMix
|
GLM_FUNC_QUALIFIER tquat<T, P> shortMix(tquat<T, P> const& x, tquat<T, P> const& y, T const& a)
|
||||||
(
|
|
||||||
tquat<T, P> const & x,
|
|
||||||
tquat<T, P> const & y,
|
|
||||||
T const & a
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
if(a <= static_cast<T>(0)) return x;
|
if(a <= static_cast<T>(0)) return x;
|
||||||
if(a >= static_cast<T>(1)) return y;
|
if(a >= static_cast<T>(1)) return y;
|
||||||
@ -200,22 +167,13 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tquat<T, P> fastMix
|
GLM_FUNC_QUALIFIER tquat<T, P> fastMix(tquat<T, P> const& x, tquat<T, P> const& y, T const & a)
|
||||||
(
|
|
||||||
tquat<T, P> const & x,
|
|
||||||
tquat<T, P> const & y,
|
|
||||||
T const & a
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
return glm::normalize(x * (static_cast<T>(1) - a) + (y * a));
|
return glm::normalize(x * (static_cast<T>(1) - a) + (y * a));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tquat<T, P> rotation
|
GLM_FUNC_QUALIFIER tquat<T, P> rotation(tvec3<T, P> const& orig, tvec3<T, P> const& dest)
|
||||||
(
|
|
||||||
tvec3<T, P> const & orig,
|
|
||||||
tvec3<T, P> const & dest
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
T cosTheta = dot(orig, dest);
|
T cosTheta = dot(orig, dest);
|
||||||
tvec3<T, P> rotationAxis;
|
tvec3<T, P> rotationAxis;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include "../detail/setup.hpp"
|
#include "../detail/setup.hpp"
|
||||||
#include "../detail/type_int.hpp"
|
#include "../detail/type_int.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_raw_data extension included")
|
# pragma message("GLM: GLM_GTX_raw_data extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include "../gtc/epsilon.hpp"
|
#include "../gtc/epsilon.hpp"
|
||||||
#include "../gtc/quaternion.hpp"
|
#include "../gtc/quaternion.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_rotate_normalized_axis extension included")
|
# pragma message("GLM: GLM_GTX_rotate_normalized_axis extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
#include "../gtx/transform.hpp"
|
#include "../gtx/transform.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_rotate_vector extension included")
|
# pragma message("GLM: GLM_GTX_rotate_vector extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_extend extension included")
|
# pragma message("GLM: GLM_GTX_extend extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
#include "../gtx/optimum_pow.hpp"
|
#include "../gtx/optimum_pow.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_spline extension included")
|
# pragma message("GLM: GLM_GTX_spline extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_std_based_type extension included")
|
# pragma message("GLM: GLM_GTX_std_based_type extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# error "GLM_GTX_string_cast is not supported on CUDA compiler"
|
# error "GLM_GTX_string_cast is not supported on CUDA compiler"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_string_cast extension included")
|
# pragma message("GLM: GLM_GTX_string_cast extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
#include "../gtc/matrix_transform.hpp"
|
#include "../gtc/matrix_transform.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_transform extension included")
|
# pragma message("GLM: GLM_GTX_transform extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -4,28 +4,21 @@
|
|||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> translate(
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> translate(tvec3<T, P> const & v)
|
||||||
tvec3<T, P> const & v)
|
|
||||||
{
|
{
|
||||||
return translate(
|
return translate(tmat4x4<T, P>(static_cast<T>(1)), v);
|
||||||
tmat4x4<T, P>(1.0f), v);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate(
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate(T angle, tvec3<T, P> const & v)
|
||||||
T angle,
|
|
||||||
tvec3<T, P> const & v)
|
|
||||||
{
|
{
|
||||||
return rotate(
|
return rotate(tmat4x4<T, P>(static_cast<T>(1)), angle, v);
|
||||||
tmat4x4<T, P>(1), angle, v);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> scale(
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> scale(tvec3<T, P> const & v)
|
||||||
tvec3<T, P> const & v)
|
|
||||||
{
|
{
|
||||||
return scale(
|
return scale(tmat4x4<T, P>(static_cast<T>(1)), v);
|
||||||
tmat4x4<T, P>(1.0f), v);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
#include "../gtx/transform.hpp"
|
#include "../gtx/transform.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_transform2 extension included")
|
# pragma message("GLM: GLM_GTX_transform2 extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -4,9 +4,7 @@
|
|||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat3x3<T, P> shearX2D(
|
GLM_FUNC_QUALIFIER tmat3x3<T, P> shearX2D(tmat3x3<T, P> const& m, T s)
|
||||||
const tmat3x3<T, P>& m,
|
|
||||||
T s)
|
|
||||||
{
|
{
|
||||||
tmat3x3<T, P> r(1);
|
tmat3x3<T, P> r(1);
|
||||||
r[0][1] = s;
|
r[0][1] = s;
|
||||||
@ -14,9 +12,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat3x3<T, P> shearY2D(
|
GLM_FUNC_QUALIFIER tmat3x3<T, P> shearY2D(tmat3x3<T, P> const& m, T s)
|
||||||
const tmat3x3<T, P>& m,
|
|
||||||
T s)
|
|
||||||
{
|
{
|
||||||
tmat3x3<T, P> r(1);
|
tmat3x3<T, P> r(1);
|
||||||
r[1][0] = s;
|
r[1][0] = s;
|
||||||
@ -24,10 +20,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> shearX3D(
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> shearX3D(tmat4x4<T, P> const& m, T s, T t)
|
||||||
const tmat4x4<T, P>& m,
|
|
||||||
T s,
|
|
||||||
T t)
|
|
||||||
{
|
{
|
||||||
tmat4x4<T, P> r(1);
|
tmat4x4<T, P> r(1);
|
||||||
r[1][0] = s;
|
r[1][0] = s;
|
||||||
@ -36,10 +29,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> shearY3D(
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> shearY3D(tmat4x4<T, P> const& m, T s, T t)
|
||||||
const tmat4x4<T, P>& m,
|
|
||||||
T s,
|
|
||||||
T t)
|
|
||||||
{
|
{
|
||||||
tmat4x4<T, P> r(1);
|
tmat4x4<T, P> r(1);
|
||||||
r[0][1] = s;
|
r[0][1] = s;
|
||||||
@ -48,10 +38,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> shearZ3D(
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> shearZ3D(tmat4x4<T, P> const& m, T s, T t)
|
||||||
const tmat4x4<T, P>& m,
|
|
||||||
T s,
|
|
||||||
T t)
|
|
||||||
{
|
{
|
||||||
tmat4x4<T, P> r(1);
|
tmat4x4<T, P> r(1);
|
||||||
r[0][2] = s;
|
r[0][2] = s;
|
||||||
@ -60,35 +47,31 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat3x3<T, P> reflect2D(
|
GLM_FUNC_QUALIFIER tmat3x3<T, P> reflect2D(tmat3x3<T, P> const& m, tvec3<T, P> const& normal)
|
||||||
const tmat3x3<T, P>& m,
|
|
||||||
const tvec3<T, P>& normal)
|
|
||||||
{
|
{
|
||||||
tmat3x3<T, P> r(1);
|
tmat3x3<T, P> r(static_cast<T>(1));
|
||||||
r[0][0] = 1 - 2 * normal.x * normal.x;
|
r[0][0] = static_cast<T>(1) - static_cast<T>(2) * normal.x * normal.x;
|
||||||
r[0][1] = -2 * normal.x * normal.y;
|
r[0][1] = -static_cast<T>(2) * normal.x * normal.y;
|
||||||
r[1][0] = -2 * normal.x * normal.y;
|
r[1][0] = -static_cast<T>(2) * normal.x * normal.y;
|
||||||
r[1][1] = 1 - 2 * normal.y * normal.y;
|
r[1][1] = static_cast<T>(1) - static_cast<T>(2) * normal.y * normal.y;
|
||||||
return m * r;
|
return m * r;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> reflect3D(
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> reflect3D(tmat4x4<T, P> const& m, tvec3<T, P> const& normal)
|
||||||
const tmat4x4<T, P>& m,
|
|
||||||
const tvec3<T, P>& normal)
|
|
||||||
{
|
{
|
||||||
tmat4x4<T, P> r(1);
|
tmat4x4<T, P> r(static_cast<T>(1));
|
||||||
r[0][0] = 1 - 2 * normal.x * normal.x;
|
r[0][0] = static_cast<T>(1) - static_cast<T>(2) * normal.x * normal.x;
|
||||||
r[0][1] = -2 * normal.x * normal.y;
|
r[0][1] = -static_cast<T>(2) * normal.x * normal.y;
|
||||||
r[0][2] = -2 * normal.x * normal.z;
|
r[0][2] = -static_cast<T>(2) * normal.x * normal.z;
|
||||||
|
|
||||||
r[1][0] = -2 * normal.x * normal.y;
|
r[1][0] = -static_cast<T>(2) * normal.x * normal.y;
|
||||||
r[1][1] = 1 - 2 * normal.y * normal.y;
|
r[1][1] = static_cast<T>(1) - static_cast<T>(2) * normal.y * normal.y;
|
||||||
r[1][2] = -2 * normal.y * normal.z;
|
r[1][2] = -static_cast<T>(2) * normal.y * normal.z;
|
||||||
|
|
||||||
r[2][0] = -2 * normal.x * normal.z;
|
r[2][0] = -static_cast<T>(2) * normal.x * normal.z;
|
||||||
r[2][1] = -2 * normal.y * normal.z;
|
r[2][1] = -static_cast<T>(2) * normal.y * normal.z;
|
||||||
r[2][2] = 1 - 2 * normal.z * normal.z;
|
r[2][2] = static_cast<T>(1) - static_cast<T>(2) * normal.z * normal.z;
|
||||||
return m * r;
|
return m * r;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,11 +80,11 @@ namespace glm
|
|||||||
const tmat3x3<T, P>& m,
|
const tmat3x3<T, P>& m,
|
||||||
const tvec3<T, P>& normal)
|
const tvec3<T, P>& normal)
|
||||||
{
|
{
|
||||||
tmat3x3<T, P> r(1);
|
tmat3x3<T, P> r(static_cast<T>(1));
|
||||||
r[0][0] = 1 - normal.x * normal.x;
|
r[0][0] = static_cast<T>(1) - normal.x * normal.x;
|
||||||
r[0][1] = - normal.x * normal.y;
|
r[0][1] = - normal.x * normal.y;
|
||||||
r[1][0] = - normal.x * normal.y;
|
r[1][0] = - normal.x * normal.y;
|
||||||
r[1][1] = 1 - normal.y * normal.y;
|
r[1][1] = static_cast<T>(1) - normal.y * normal.y;
|
||||||
return m * r;
|
return m * r;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,26 +93,24 @@ namespace glm
|
|||||||
const tmat4x4<T, P>& m,
|
const tmat4x4<T, P>& m,
|
||||||
const tvec3<T, P>& normal)
|
const tvec3<T, P>& normal)
|
||||||
{
|
{
|
||||||
tmat4x4<T, P> r(1);
|
tmat4x4<T, P> r(static_cast<T>(1));
|
||||||
r[0][0] = 1 - normal.x * normal.x;
|
r[0][0] = static_cast<T>(1) - normal.x * normal.x;
|
||||||
r[0][1] = - normal.x * normal.y;
|
r[0][1] = - normal.x * normal.y;
|
||||||
r[0][2] = - normal.x * normal.z;
|
r[0][2] = - normal.x * normal.z;
|
||||||
r[1][0] = - normal.x * normal.y;
|
r[1][0] = - normal.x * normal.y;
|
||||||
r[1][1] = 1 - normal.y * normal.y;
|
r[1][1] = static_cast<T>(1) - normal.y * normal.y;
|
||||||
r[1][2] = - normal.y * normal.z;
|
r[1][2] = - normal.y * normal.z;
|
||||||
r[2][0] = - normal.x * normal.z;
|
r[2][0] = - normal.x * normal.z;
|
||||||
r[2][1] = - normal.y * normal.z;
|
r[2][1] = - normal.y * normal.z;
|
||||||
r[2][2] = 1 - normal.z * normal.z;
|
r[2][2] = static_cast<T>(1) - normal.z * normal.z;
|
||||||
return m * r;
|
return m * r;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> scaleBias(
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> scaleBias(T scale, T bias)
|
||||||
T scale,
|
|
||||||
T bias)
|
|
||||||
{
|
{
|
||||||
tmat4x4<T, P> result;
|
tmat4x4<T, P> result;
|
||||||
result[3] = tvec4<T, P>(tvec3<T, P>(bias), T(1));
|
result[3] = tvec4<T, P>(tvec3<T, P>(bias), static_cast<T>(1));
|
||||||
result[0][0] = scale;
|
result[0][0] = scale;
|
||||||
result[1][1] = scale;
|
result[1][1] = scale;
|
||||||
result[2][2] = scale;
|
result[2][2] = scale;
|
||||||
@ -137,10 +118,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P> scaleBias(
|
GLM_FUNC_QUALIFIER tmat4x4<T, P> scaleBias(tmat4x4<T, P> const& m, T scale, T bias)
|
||||||
const tmat4x4<T, P>& m,
|
|
||||||
T scale,
|
|
||||||
T bias)
|
|
||||||
{
|
{
|
||||||
return m * scaleBias(scale, bias);
|
return m * scaleBias(scale, bias);
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
// Dependency:
|
// Dependency:
|
||||||
#include "../gtc/type_precision.hpp"
|
#include "../gtc/type_precision.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_type_aligned extension included")
|
# pragma message("GLM: GLM_GTX_type_aligned extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include "../gtc/quaternion.hpp"
|
#include "../gtc/quaternion.hpp"
|
||||||
#include "../gtx/dual_quaternion.hpp"
|
#include "../gtx/dual_quaternion.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_type_trait extension included")
|
# pragma message("GLM: GLM_GTX_type_trait extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include "../gtx/quaternion.hpp"
|
#include "../gtx/quaternion.hpp"
|
||||||
#include "../gtx/rotate_vector.hpp"
|
#include "../gtx/rotate_vector.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_vector_angle extension included")
|
# pragma message("GLM: GLM_GTX_vector_angle extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
#include <cfloat>
|
#include <cfloat>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_vector_query extension included")
|
# pragma message("GLM: GLM_GTX_vector_query extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#include "../glm.hpp"
|
#include "../glm.hpp"
|
||||||
#include "../gtc/vec1.hpp"
|
#include "../gtc/vec1.hpp"
|
||||||
|
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
|
||||||
# pragma message("GLM: GLM_GTX_wrap extension included")
|
# pragma message("GLM: GLM_GTX_wrap extension included")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
#endif//
|
#endif//
|
||||||
|
|
||||||
// Report platform detection
|
// Report platform detection
|
||||||
#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_PLATFORM_DISPLAYED))
|
#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_PLATFORM_DISPLAYED)
|
||||||
# define GLM_MESSAGE_PLATFORM_DISPLAYED
|
# define GLM_MESSAGE_PLATFORM_DISPLAYED
|
||||||
# if(GLM_PLATFORM & GLM_PLATFORM_QNXNTO)
|
# if(GLM_PLATFORM & GLM_PLATFORM_QNXNTO)
|
||||||
# pragma message("GLM: QNX platform detected")
|
# pragma message("GLM: QNX platform detected")
|
||||||
|
@ -80,6 +80,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
|
|||||||
- Added GTC_functions extension
|
- Added GTC_functions extension
|
||||||
- Added quaternion version of isnan and isinf #521
|
- Added quaternion version of isnan and isinf #521
|
||||||
- Added lowestBitValue to GTX_bit #536
|
- Added lowestBitValue to GTX_bit #536
|
||||||
|
- Added GLM_FORCE_UNRESTRICTED_GENTYPE allowing non basic genType #543
|
||||||
|
|
||||||
##### Improvements:
|
##### Improvements:
|
||||||
- Improved SIMD and swizzle operators interactions with GCC and Clang #474
|
- Improved SIMD and swizzle operators interactions with GCC and Clang #474
|
||||||
@ -95,6 +96,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
|
|||||||
- Use Cuda built-in function for abs function implementation with Cuda compiler
|
- Use Cuda built-in function for abs function implementation with Cuda compiler
|
||||||
- Factorized GLM_COMPILER_LLVM and GLM_COMPILER_APPLE_CLANG into GLM_COMPILER_CLANG
|
- Factorized GLM_COMPILER_LLVM and GLM_COMPILER_APPLE_CLANG into GLM_COMPILER_CLANG
|
||||||
- No more warnings for use of long long
|
- No more warnings for use of long long
|
||||||
|
- Added more information to build messages
|
||||||
|
|
||||||
##### Fixes:
|
##### Fixes:
|
||||||
- Fixed GTX_extended_min_max filename typo #386
|
- Fixed GTX_extended_min_max filename typo #386
|
||||||
@ -111,6 +113,8 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
|
|||||||
- Deprecated GLM_GTX_simd_vec4 extension
|
- Deprecated GLM_GTX_simd_vec4 extension
|
||||||
- Deprecated GLM_GTX_simd_mat4 extension
|
- Deprecated GLM_GTX_simd_mat4 extension
|
||||||
- Deprecated GLM_GTX_simd_quat extension
|
- Deprecated GLM_GTX_simd_quat extension
|
||||||
|
- Deprecated GLM_SWIZZLE, use GLM_FORCE_SWIZZLE instead
|
||||||
|
- Deprecated GLM_MESSAGES, use GLM_FORCE_MESSAGES instead
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
#### [GLM 0.9.7.6](https://github.com/g-truc/glm/releases/tag/0.9.7.6) - 2016-07-16
|
#### [GLM 0.9.7.6](https://github.com/g-truc/glm/releases/tag/0.9.7.6) - 2016-07-16
|
||||||
|
@ -529,8 +529,8 @@ namespace bitfieldReverse
|
|||||||
{
|
{
|
||||||
int Error = 0;
|
int Error = 0;
|
||||||
|
|
||||||
Error += perf32(Samples);
|
Error += perf32(static_cast<glm::uint32>(Samples));
|
||||||
Error += perf64(Samples);
|
Error += perf64(static_cast<glm::uint64>(Samples));
|
||||||
|
|
||||||
return Error;
|
return Error;
|
||||||
}
|
}
|
||||||
@ -1459,7 +1459,7 @@ namespace bitCount
|
|||||||
// bitCount - TimeIf
|
// bitCount - TimeIf
|
||||||
{
|
{
|
||||||
for(std::size_t i = 0, n = v.size(); i < n; ++i)
|
for(std::size_t i = 0, n = v.size(); i < n; ++i)
|
||||||
v[i] = bitCount_if(i);
|
v[i] = bitCount_if(static_cast<int>(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::clock_t TimestampsB = std::clock();
|
std::clock_t TimestampsB = std::clock();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#define GLM_MESSAGES
|
#define GLM_FORCE_MESSAGES
|
||||||
#define GLM_SWIZZLE
|
#define GLM_FORCE_SWIZZLE
|
||||||
#include <glm/glm.hpp>
|
#include <glm/glm.hpp>
|
||||||
|
|
||||||
int test_ivec2_swizzle()
|
int test_ivec2_swizzle()
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#define GLM_MESSAGES
|
#define GLM_FORCE_MESSAGES
|
||||||
#include <glm/vec3.hpp>
|
#include <glm/vec3.hpp>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#define GLM_SWIZZLE
|
#define GLM_FORCE_SWIZZLE
|
||||||
#include <glm/vector_relational.hpp>
|
#include <glm/vector_relational.hpp>
|
||||||
#include <glm/gtc/vec1.hpp>
|
#include <glm/gtc/vec1.hpp>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -65,7 +65,7 @@ int test_vec1_ctor()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
*/
|
*/
|
||||||
#if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)
|
#if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE)
|
||||||
{
|
{
|
||||||
glm::vec2 A = glm::vec2(1.0f, 2.0f);
|
glm::vec2 A = glm::vec2(1.0f, 2.0f);
|
||||||
glm::vec2 B = A.xy;
|
glm::vec2 B = A.xy;
|
||||||
@ -76,7 +76,7 @@ int test_vec1_ctor()
|
|||||||
Error += glm::all(glm::equal(A, C)) ? 0 : 1;
|
Error += glm::all(glm::equal(A, C)) ? 0 : 1;
|
||||||
Error += glm::all(glm::equal(A, D)) ? 0 : 1;
|
Error += glm::all(glm::equal(A, D)) ? 0 : 1;
|
||||||
}
|
}
|
||||||
#endif//GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)
|
#endif//GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE)
|
||||||
|
|
||||||
{
|
{
|
||||||
glm::vec2 A = glm::vec2(2.0f);
|
glm::vec2 A = glm::vec2(2.0f);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#define GLM_SWIZZLE
|
#define GLM_FORCE_SWIZZLE
|
||||||
#include <glm/vector_relational.hpp>
|
#include <glm/vector_relational.hpp>
|
||||||
#include <glm/vec2.hpp>
|
#include <glm/vec2.hpp>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -230,7 +230,7 @@ int test_vec2_ctor()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)
|
#if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE)
|
||||||
{
|
{
|
||||||
glm::vec2 A = glm::vec2(1.0f, 2.0f);
|
glm::vec2 A = glm::vec2(1.0f, 2.0f);
|
||||||
glm::vec2 B = A.xy;
|
glm::vec2 B = A.xy;
|
||||||
@ -241,7 +241,7 @@ int test_vec2_ctor()
|
|||||||
Error += glm::all(glm::equal(A, C)) ? 0 : 1;
|
Error += glm::all(glm::equal(A, C)) ? 0 : 1;
|
||||||
Error += glm::all(glm::equal(A, D)) ? 0 : 1;
|
Error += glm::all(glm::equal(A, D)) ? 0 : 1;
|
||||||
}
|
}
|
||||||
#endif//GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)
|
#endif//GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE)
|
||||||
|
|
||||||
{
|
{
|
||||||
glm::vec2 A = glm::vec2(2.0f);
|
glm::vec2 A = glm::vec2(2.0f);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#define GLM_SWIZZLE
|
#define GLM_FORCE_SWIZZLE
|
||||||
#include <glm/vector_relational.hpp>
|
#include <glm/vector_relational.hpp>
|
||||||
#include <glm/geometric.hpp>
|
#include <glm/geometric.hpp>
|
||||||
#include <glm/vec2.hpp>
|
#include <glm/vec2.hpp>
|
||||||
@ -40,7 +40,7 @@ int test_vec3_ctor()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if(GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE))
|
#if(GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE))
|
||||||
{
|
{
|
||||||
glm::vec3 A = glm::vec3(1.0f, 2.0f, 3.0f);
|
glm::vec3 A = glm::vec3(1.0f, 2.0f, 3.0f);
|
||||||
glm::vec3 B = A.xyz;
|
glm::vec3 B = A.xyz;
|
||||||
@ -59,7 +59,7 @@ int test_vec3_ctor()
|
|||||||
Error += glm::all(glm::equal(A, G)) ? 0 : 1;
|
Error += glm::all(glm::equal(A, G)) ? 0 : 1;
|
||||||
Error += glm::all(glm::equal(A, H)) ? 0 : 1;
|
Error += glm::all(glm::equal(A, H)) ? 0 : 1;
|
||||||
}
|
}
|
||||||
#endif//(GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE))
|
#endif//(GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE))
|
||||||
|
|
||||||
{
|
{
|
||||||
glm::vec3 A(1);
|
glm::vec3 A(1);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#define GLM_FORCE_ALIGNED
|
#define GLM_FORCE_ALIGNED
|
||||||
#define GLM_SWIZZLE
|
#define GLM_FORCE_SWIZZLE
|
||||||
#include <glm/vector_relational.hpp>
|
#include <glm/vector_relational.hpp>
|
||||||
#include <glm/vec2.hpp>
|
#include <glm/vec2.hpp>
|
||||||
#include <glm/vec3.hpp>
|
#include <glm/vec3.hpp>
|
||||||
@ -68,7 +68,7 @@ int test_vec4_ctor()
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)
|
#if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE)
|
||||||
{
|
{
|
||||||
glm::vec4 A = glm::vec4(1.0f, 2.0f, 3.0f, 4.0f);
|
glm::vec4 A = glm::vec4(1.0f, 2.0f, 3.0f, 4.0f);
|
||||||
glm::vec4 B = A.xyzw;
|
glm::vec4 B = A.xyzw;
|
||||||
@ -97,7 +97,7 @@ int test_vec4_ctor()
|
|||||||
Error += glm::all(glm::equal(A, L)) ? 0 : 1;
|
Error += glm::all(glm::equal(A, L)) ? 0 : 1;
|
||||||
Error += glm::all(glm::equal(A, M)) ? 0 : 1;
|
Error += glm::all(glm::equal(A, M)) ? 0 : 1;
|
||||||
}
|
}
|
||||||
#endif// GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)
|
#endif// GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE)
|
||||||
|
|
||||||
{
|
{
|
||||||
glm::vec4 A(1);
|
glm::vec4 A(1);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#define GLM_MESSAGES
|
#define GLM_FORCE_MESSAGES
|
||||||
#include <glm/glm.hpp>
|
#include <glm/glm.hpp>
|
||||||
|
|
||||||
#if GLM_HAS_ALIGNED_TYPE
|
#if GLM_HAS_ALIGNED_TYPE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user