diff --git a/CMakeLists.txt b/CMakeLists.txt index 5eb2be93c45c65031e20bf77a4f37c5bea0ac0c0..4bb722ba2afdf5b8dc0e0200e260b8b10f043d6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,6 +84,7 @@ ENDIF (WITH_GLEWMX) add_definitions(-DSHADERPATH="${CGoGN_ROOT_DIR}/lib/Shaders/") +add_definitions(-DGLM_FORCE_RADIANS) # define includes of external libs SET (CGoGN_EXT_INCLUDES diff --git a/SCHNApps/CMakeLists.txt b/SCHNApps/CMakeLists.txt index 7d3e2d13199cb80d9b5c13e696cc3cd56c84eb17..aabcec28b18aa86230e51758f9330bc7886d7250 100644 --- a/SCHNApps/CMakeLists.txt +++ b/SCHNApps/CMakeLists.txt @@ -39,6 +39,7 @@ SET( QT_USE_QTSVG TRUE ) INCLUDE(${QT_USE_FILE}) ADD_DEFINITIONS(${QT_DEFINITIONS}) +add_definitions(-DGLM_FORCE_RADIANS) #MESSAGE HERE FOR MORE EASY READING (MESSAGE AT THE END) MESSAGE("Build type = " ${CMAKE_BUILD_TYPE} " (for change -DCMAKE_BUILD_TYPE=Release|Debug)" ) diff --git a/ThirdParty/include/glm/CMakeLists.txt b/ThirdParty/include/glm/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..5037421ee1a9b9a43b7ebdcb9fbafbafb4b6ec8c --- /dev/null +++ b/ThirdParty/include/glm/CMakeLists.txt @@ -0,0 +1,42 @@ +set(NAME glm_dummy) + +file(GLOB ROOT_SOURCE *.cpp) +file(GLOB ROOT_INLINE *.inl) +file(GLOB ROOT_HEADER *.hpp) +file(GLOB ROOT_TEXT ../*.txt) + +file(GLOB_RECURSE CORE_SOURCE ./detail/*.cpp) +file(GLOB_RECURSE CORE_INLINE ./detail/*.inl) +file(GLOB_RECURSE CORE_HEADER ./detail/*.hpp) + +file(GLOB_RECURSE GTC_SOURCE ./gtc/*.cpp) +file(GLOB_RECURSE GTC_INLINE ./gtc/*.inl) +file(GLOB_RECURSE GTC_HEADER ./gtc/*.hpp) + +file(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp) +file(GLOB_RECURSE GTX_INLINE ./gtx/*.inl) +file(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp) + +source_group("Text Files" FILES ${ROOT_TEXT}) +source_group("Core Files" FILES ${CORE_SOURCE}) +source_group("Core Files" FILES ${CORE_INLINE}) +source_group("Core Files" FILES ${CORE_HEADER}) +source_group("GTC Files" FILES ${GTC_SOURCE}) +source_group("GTC Files" FILES ${GTC_INLINE}) +source_group("GTC Files" FILES ${GTC_HEADER}) +source_group("GTX Files" FILES ${GTX_SOURCE}) +source_group("GTX Files" FILES ${GTX_INLINE}) +source_group("GTX Files" FILES ${GTX_HEADER}) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) + +if(GLM_TEST_ENABLE) + add_executable(${NAME} ${ROOT_TEXT} + ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} + ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} + ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER} + ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER}) +endif(GLM_TEST_ENABLE) + +#add_library(glm STATIC glm.cpp) +#add_library(glm_shared SHARED glm.cpp) diff --git a/ThirdParty/include/glm/common.hpp b/ThirdParty/include/glm/common.hpp new file mode 100644 index 0000000000000000000000000000000000000000..b8bb14e72de3e1d87753f8204e2b9ce154fd2470 --- /dev/null +++ b/ThirdParty/include/glm/common.hpp @@ -0,0 +1,34 @@ +/////////////////////////////////////////////////////////////////////////////////// +/// OpenGL Mathematics (glm.g-truc.net) +/// +/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) +/// Permission is hereby granted, free of charge, to any person obtaining a copy +/// of this software and associated documentation files (the "Software"), to deal +/// in the Software without restriction, including without limitation the rights +/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +/// copies of the Software, and to permit persons to whom the Software is +/// furnished to do so, subject to the following conditions: +/// +/// The above copyright notice and this permission notice shall be included in +/// all copies or substantial portions of the Software. +/// +/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +/// THE SOFTWARE. +/// +/// @ref core +/// @file glm/common.hpp +/// @date 2013-12-24 / 2013-12-24 +/// @author Christophe Riccio +/////////////////////////////////////////////////////////////////////////////////// + +#ifndef GLM_COMMON_INCLUDED +#define GLM_COMMON_INCLUDED + +#include "detail/func_common.hpp" + +#endif//GLM_COMMON_INCLUDED diff --git a/ThirdParty/include/glm/core/_detail.hpp b/ThirdParty/include/glm/core/_detail.hpp deleted file mode 100644 index 0665e56d20b9cae793c1942941f8a16c15142f7a..0000000000000000000000000000000000000000 --- a/ThirdParty/include/glm/core/_detail.hpp +++ /dev/null @@ -1,323 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2008-07-24 -// Updated : 2008-08-31 -// Licence : This source is under MIT License -// File : glm/core/_detail.hpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_detail -#define glm_core_detail - -#include "../setup.hpp" -#include - -namespace glm{ -namespace detail{ - - class thalf; - -#if(defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_VC)) - typedef signed __int64 sint64; - typedef unsigned __int64 uint64; -#elif(defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_GCC)) - __extension__ typedef signed long long sint64; - __extension__ typedef unsigned long long uint64; -#else//unknown compiler - typedef signed long sint64; - typedef unsigned long uint64; -#endif//GLM_COMPILER - - template - struct If - { - template - static inline T apply(F functor, const T& val) - { - return functor(val); - } - }; - - template<> - struct If - { - template - static inline T apply(F, const T& val) - { - return val; - } - }; - - //template - //struct traits - //{ - // static const bool is_signed = false; - // static const bool is_float = false; - // static const bool is_vector = false; - // static const bool is_matrix = false; - // static const bool is_genType = false; - // static const bool is_genIType = false; - // static const bool is_genUType = false; - //}; - - //template <> - //struct traits - //{ - // static const bool is_float = true; - // static const bool is_genType = true; - //}; - - //template <> - //struct traits - //{ - // static const bool is_float = true; - // static const bool is_genType = true; - //}; - - //template <> - //struct traits - //{ - // static const bool is_float = true; - // static const bool is_genType = true; - //}; - - //template - //struct desc - //{ - // typedef genType type; - // typedef genType * pointer; - // typedef genType const* const_pointer; - // typedef genType const *const const_pointer_const; - // typedef genType *const pointer_const; - // typedef genType & reference; - // typedef genType const& const_reference; - // typedef genType const& param_type; - - // typedef typename genType::value_type value_type; - // typedef typename genType::size_type size_type; - // static const typename size_type value_size; - //}; - - //template - //const typename desc::size_type desc::value_size = genType::value_size(); - - union uif32 - { - uif32() : - i(0) - {} - - uif32(float f) : - f(f) - {} - - uif32(unsigned int i) : - i(i) - {} - - float f; - unsigned int i; - }; - - union uif64 - { - uif64() : - i(0) - {} - - uif64(double f) : - f(f) - {} - - uif64(uint64 i) : - i(i) - {} - - double f; - uint64 i; - }; - - typedef uif32 uif; - - ////////////////// - // int - - template - struct is_int - { - enum is_int_enum - { - _YES = 0, - _NO = 1 - }; - }; - -#define GLM_DETAIL_IS_INT(T) \ - template <> \ - struct is_int \ - { \ - enum is_int_enum \ - { \ - _YES = 1, \ - _NO = 0 \ - }; \ - } - - ////////////////// - // uint - - template - struct is_uint - { - enum is_uint_enum - { - _YES = 0, - _NO = 1 - }; - }; - -#define GLM_DETAIL_IS_UINT(T) \ - template <> \ - struct is_uint \ - { \ - enum is_uint_enum \ - { \ - _YES = 1, \ - _NO = 0 \ - }; \ - } - - //GLM_DETAIL_IS_UINT(unsigned long long) - - ////////////////// - // float - - template - struct is_float - { - enum is_float_enum - { - _YES = 0, - _NO = 1 - }; - }; - -#define GLM_DETAIL_IS_FLOAT(T) \ - template <> \ - struct is_float \ - { \ - enum is_float_enum \ - { \ - _YES = 1, \ - _NO = 0 \ - }; \ - } - - ////////////////// - // bool - - template - struct is_bool - { - enum is_bool_enum - { - _YES = 0, - _NO = 1 - }; - }; - - template <> - struct is_bool - { - enum is_bool_enum - { - _YES = 1, - _NO = 0 - }; - }; - - ////////////////// - // vector - - template - struct is_vector - { - enum is_vector_enum - { - _YES = 0, - _NO = 1 - }; - }; - -#define GLM_DETAIL_IS_VECTOR(T) \ - template <> \ - struct is_vector \ - { \ - enum is_vector_enum \ - { \ - _YES = 1, \ - _NO = 0 \ - }; \ - } - - ////////////////// - // matrix - - template - struct is_matrix - { - enum is_matrix_enum - { - _YES = 0, - _NO = 1 - }; - }; - -#define GLM_DETAIL_IS_MATRIX(T) \ - template <> \ - struct is_matrix \ - { \ - enum is_matrix_enum \ - { \ - _YES = 1, \ - _NO = 0 \ - }; \ - } - - ////////////////// - // type - - template - struct type - { - enum type_enum - { - is_float = is_float::_YES, - is_int = is_int::_YES, - is_uint = is_uint::_YES, - is_bool = is_bool::_YES - }; - }; - - ////////////////// - // type - - typedef signed char int8; - typedef signed short int16; - typedef signed int int32; - typedef detail::sint64 int64; - - typedef unsigned char uint8; - typedef unsigned short uint16; - typedef unsigned int uint32; - typedef detail::uint64 uint64; - - typedef detail::thalf float16; - typedef float float32; - typedef double float64; - -}//namespace detail -}//namespace glm - -#endif//glm_core_detail diff --git a/ThirdParty/include/glm/core/_swizzle.hpp b/ThirdParty/include/glm/core/_swizzle.hpp deleted file mode 100644 index 6c5ec005674bf010fed26f86848547dce83af820..0000000000000000000000000000000000000000 --- a/ThirdParty/include/glm/core/_swizzle.hpp +++ /dev/null @@ -1,1085 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2006-04-20 -// Updated : 2008-08-22 -// Licence : This source is under MIT License -// File : glm/core/_swizzle.hpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_swizzle -#define glm_core_swizzle - -namespace glm -{ - enum comp - { - X = 0, - R = 0, - S = 0, - Y = 1, - G = 1, - T = 1, - Z = 2, - B = 2, - P = 2, - W = 3, - A = 3, - Q = 3 - }; -}//namespace glm - -#if defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_XYZW) - -#define xx swizzle(glm::X, glm::X) -#define yx swizzle(glm::Y, glm::X) -#define zx swizzle(glm::Z, glm::X) -#define wx swizzle(glm::W, glm::X) -#define xy swizzle(glm::X, glm::Y) -#define yy swizzle(glm::Y, glm::Y) -#define zy swizzle(glm::Z, glm::Y) -#define wy swizzle(glm::W, glm::Y) -#define xz swizzle(glm::X, glm::Z) -#define yz swizzle(glm::Y, glm::Z) -#define zz swizzle(glm::Z, glm::Z) -#define wz swizzle(glm::W, glm::Z) -#define xw swizzle(glm::X, glm::W) -#define yw swizzle(glm::Y, glm::W) -#define zw swizzle(glm::Z, glm::W) -#define ww swizzle(glm::W, glm::W) - -#endif// defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_XYZW) - -#if defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_RGBA) - -#define rr swizzle(glm::X, glm::X) -#define gr swizzle(glm::Y, glm::X) -#define br swizzle(glm::Z, glm::X) -#define ar swizzle(glm::W, glm::X) -#define rg swizzle(glm::X, glm::Y) -#define gg swizzle(glm::Y, glm::Y) -#define bg swizzle(glm::Z, glm::Y) -#define ag swizzle(glm::W, glm::Y) -#define rb swizzle(glm::X, glm::Z) -#define gb swizzle(glm::Y, glm::Z) -#define bb swizzle(glm::Z, glm::Z) -#define ab swizzle(glm::W, glm::Z) -#define ra swizzle(glm::X, glm::W) -#define ga swizzle(glm::Y, glm::W) -#define ba swizzle(glm::Z, glm::W) -#define aa swizzle(glm::W, glm::W) - -#endif// defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_RGBA) - -#if defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_STPQ) - -#define ss swizzle(glm::X, glm::X) -#define ts swizzle(glm::Y, glm::X) -#define ps swizzle(glm::Z, glm::X) -#define qs swizzle(glm::W, glm::X) -#define st swizzle(glm::X, glm::Y) -#define tt swizzle(glm::Y, glm::Y) -#define pt swizzle(glm::Z, glm::Y) -#define qt swizzle(glm::W, glm::Y) -#define sp swizzle(glm::X, glm::Z) -#define tp swizzle(glm::Y, glm::Z) -#define pp swizzle(glm::Z, glm::Z) -#define qp swizzle(glm::W, glm::Z) -#define sq swizzle(glm::X, glm::W) -#define tq swizzle(glm::Y, glm::W) -#define pq swizzle(glm::Z, glm::W) -#define qq swizzle(glm::W, glm::W) - -#endif// defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_STPQ) - -#if defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_XYZW) - -#define xxx swizzle(glm::X, glm::X, glm::X) -#define yxx swizzle(glm::Y, glm::X, glm::X) -#define zxx swizzle(glm::Z, glm::X, glm::X) -#define wxx swizzle(glm::W, glm::X, glm::X) -#define xyx swizzle(glm::X, glm::Y, glm::X) -#define yyx swizzle(glm::Y, glm::Y, glm::X) -#define zyx swizzle(glm::Z, glm::Y, glm::X) -#define wyx swizzle(glm::W, glm::Y, glm::X) -#define xzx swizzle(glm::X, glm::Z, glm::X) -#define yzx swizzle(glm::Y, glm::Z, glm::X) -#define zzx swizzle(glm::Z, glm::Z, glm::X) -#define wzx swizzle(glm::W, glm::Z, glm::X) -#define xwx swizzle(glm::X, glm::W, glm::X) -#define ywx swizzle(glm::Y, glm::W, glm::X) -#define zwx swizzle(glm::Z, glm::W, glm::X) -#define wwx swizzle(glm::W, glm::W, glm::X) -#define xxy swizzle(glm::X, glm::X, glm::Y) -#define yxy swizzle(glm::Y, glm::X, glm::Y) -#define zxy swizzle(glm::Z, glm::X, glm::Y) -#define wxy swizzle(glm::W, glm::X, glm::Y) -#define xyy swizzle(glm::X, glm::Y, glm::Y) -#define yyy swizzle(glm::Y, glm::Y, glm::Y) -#define zyy swizzle(glm::Z, glm::Y, glm::Y) -#define wyy swizzle(glm::W, glm::Y, glm::Y) -#define xzy swizzle(glm::X, glm::Z, glm::Y) -#define yzy swizzle(glm::Y, glm::Z, glm::Y) -#define zzy swizzle(glm::Z, glm::Z, glm::Y) -#define wzy swizzle(glm::W, glm::Z, glm::Y) -#define xwy swizzle(glm::X, glm::W, glm::Y) -#define ywy swizzle(glm::Y, glm::W, glm::Y) -#define zwy swizzle(glm::Z, glm::W, glm::Y) -#define wwy swizzle(glm::W, glm::W, glm::Y) -#define xxz swizzle(glm::X, glm::X, glm::Z) -#define yxz swizzle(glm::Y, glm::X, glm::Z) -#define zxz swizzle(glm::Z, glm::X, glm::Z) -#define wxz swizzle(glm::W, glm::X, glm::Z) -#define xyz swizzle(glm::X, glm::Y, glm::Z) -#define yyz swizzle(glm::Y, glm::Y, glm::Z) -#define zyz swizzle(glm::Z, glm::Y, glm::Z) -#define wyz swizzle(glm::W, glm::Y, glm::Z) -#define xzz swizzle(glm::X, glm::Z, glm::Z) -#define yzz swizzle(glm::Y, glm::Z, glm::Z) -#define zzz swizzle(glm::Z, glm::Z, glm::Z) -#define wzz swizzle(glm::W, glm::Z, glm::Z) -#define xwz swizzle(glm::X, glm::W, glm::Z) -#define ywz swizzle(glm::Y, glm::W, glm::Z) -#define zwz swizzle(glm::Z, glm::W, glm::Z) -#define wwz swizzle(glm::W, glm::W, glm::Z) -#define xxw swizzle(glm::X, glm::X, glm::W) -#define yxw swizzle(glm::Y, glm::X, glm::W) -#define zxw swizzle(glm::Z, glm::X, glm::W) -#define wxw swizzle(glm::W, glm::X, glm::W) -#define xyw swizzle(glm::X, glm::Y, glm::W) -#define yyw swizzle(glm::Y, glm::Y, glm::W) -#define zyw swizzle(glm::Z, glm::Y, glm::W) -#define wyw swizzle(glm::W, glm::Y, glm::W) -#define xzw swizzle(glm::X, glm::Z, glm::W) -#define yzw swizzle(glm::Y, glm::Z, glm::W) -#define zzw swizzle(glm::Z, glm::Z, glm::W) -#define wzw swizzle(glm::W, glm::Z, glm::W) -#define xww swizzle(glm::X, glm::W, glm::W) -#define yww swizzle(glm::Y, glm::W, glm::W) -#define zww swizzle(glm::Z, glm::W, glm::W) -#define www swizzle(glm::W, glm::W, glm::W) - -#endif// defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_XYZW) - -#if defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_RGBA) - -#define rrr swizzle(glm::X, glm::X, glm::X) -#define grr swizzle(glm::Y, glm::X, glm::X) -#define brr swizzle(glm::Z, glm::X, glm::X) -#define arr swizzle(glm::W, glm::X, glm::X) -#define rgr swizzle(glm::X, glm::Y, glm::X) -#define ggr swizzle(glm::Y, glm::Y, glm::X) -#define bgr swizzle(glm::Z, glm::Y, glm::X) -#define agr swizzle(glm::W, glm::Y, glm::X) -#define rbr swizzle(glm::X, glm::Z, glm::X) -#define gbr swizzle(glm::Y, glm::Z, glm::X) -#define bbr swizzle(glm::Z, glm::Z, glm::X) -#define abr swizzle(glm::W, glm::Z, glm::X) -#define rar swizzle(glm::X, glm::W, glm::X) -#define gar swizzle(glm::Y, glm::W, glm::X) -#define bar swizzle(glm::Z, glm::W, glm::X) -#define aar swizzle(glm::W, glm::W, glm::X) -#define rrg swizzle(glm::X, glm::X, glm::Y) -#define grg swizzle(glm::Y, glm::X, glm::Y) -#define brg swizzle(glm::Z, glm::X, glm::Y) -#define arg swizzle(glm::W, glm::X, glm::Y) -#define rgg swizzle(glm::X, glm::Y, glm::Y) -#define ggg swizzle(glm::Y, glm::Y, glm::Y) -#define bgg swizzle(glm::Z, glm::Y, glm::Y) -#define agg swizzle(glm::W, glm::Y, glm::Y) -#define rbg swizzle(glm::X, glm::Z, glm::Y) -#define gbg swizzle(glm::Y, glm::Z, glm::Y) -#define bbg swizzle(glm::Z, glm::Z, glm::Y) -#define abg swizzle(glm::W, glm::Z, glm::Y) -#define rag swizzle(glm::X, glm::W, glm::Y) -#define gag swizzle(glm::Y, glm::W, glm::Y) -#define bag swizzle(glm::Z, glm::W, glm::Y) -#define aag swizzle(glm::W, glm::W, glm::Y) -#define rrb swizzle(glm::X, glm::X, glm::Z) -#define grb swizzle(glm::Y, glm::X, glm::Z) -#define brb swizzle(glm::Z, glm::X, glm::Z) -#define arb swizzle(glm::W, glm::X, glm::Z) -#define rgb swizzle(glm::X, glm::Y, glm::Z) -#define ggb swizzle(glm::Y, glm::Y, glm::Z) -#define bgb swizzle(glm::Z, glm::Y, glm::Z) -#define agb swizzle(glm::W, glm::Y, glm::Z) -#define rbb swizzle(glm::X, glm::Z, glm::Z) -#define gbb swizzle(glm::Y, glm::Z, glm::Z) -#define bbb swizzle(glm::Z, glm::Z, glm::Z) -#define abb swizzle(glm::W, glm::Z, glm::Z) -#define rab swizzle(glm::X, glm::W, glm::Z) -#define gab swizzle(glm::Y, glm::W, glm::Z) -#define bab swizzle(glm::Z, glm::W, glm::Z) -#define aab swizzle(glm::W, glm::W, glm::Z) -#define rra swizzle(glm::X, glm::X, glm::W) -#define gra swizzle(glm::Y, glm::X, glm::W) -#define bra swizzle(glm::Z, glm::X, glm::W) -#define ara swizzle(glm::W, glm::X, glm::W) -#define rga swizzle(glm::X, glm::Y, glm::W) -#define gga swizzle(glm::Y, glm::Y, glm::W) -#define bga swizzle(glm::Z, glm::Y, glm::W) -#define aga swizzle(glm::W, glm::Y, glm::W) -#define rba swizzle(glm::X, glm::Z, glm::W) -#define gba swizzle(glm::Y, glm::Z, glm::W) -#define bba swizzle(glm::Z, glm::Z, glm::W) -#define aba swizzle(glm::W, glm::Z, glm::W) -#define raa swizzle(glm::X, glm::W, glm::W) -#define gaa swizzle(glm::Y, glm::W, glm::W) -#define baa swizzle(glm::Z, glm::W, glm::W) -#define aaa swizzle(glm::W, glm::W, glm::W) - -#endif//defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_RGBA) - -#if defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_STPQ) - -#define sss swizzle(glm::X, glm::X, glm::X) -#define tss swizzle(glm::Y, glm::X, glm::X) -#define pss swizzle(glm::Z, glm::X, glm::X) -#define qss swizzle(glm::W, glm::X, glm::X) -#define sts swizzle(glm::X, glm::Y, glm::X) -#define tts swizzle(glm::Y, glm::Y, glm::X) -#define pts swizzle(glm::Z, glm::Y, glm::X) -#define qts swizzle(glm::W, glm::Y, glm::X) -#define sps swizzle(glm::X, glm::Z, glm::X) -#define tps swizzle(glm::Y, glm::Z, glm::X) -#define pps swizzle(glm::Z, glm::Z, glm::X) -#define qps swizzle(glm::W, glm::Z, glm::X) -#define sqs swizzle(glm::X, glm::W, glm::X) -#define tqs swizzle(glm::Y, glm::W, glm::X) -#define pqs swizzle(glm::Z, glm::W, glm::X) -#define qqs swizzle(glm::W, glm::W, glm::X) -#define sst swizzle(glm::X, glm::X, glm::Y) -#define tst swizzle(glm::Y, glm::X, glm::Y) -#define pst swizzle(glm::Z, glm::X, glm::Y) -#define qst swizzle(glm::W, glm::X, glm::Y) -#define stt swizzle(glm::X, glm::Y, glm::Y) -#define ttt swizzle(glm::Y, glm::Y, glm::Y) -#define ptt swizzle(glm::Z, glm::Y, glm::Y) -#define qtt swizzle(glm::W, glm::Y, glm::Y) -#define spt swizzle(glm::X, glm::Z, glm::Y) -#define tpt swizzle(glm::Y, glm::Z, glm::Y) -#define ppt swizzle(glm::Z, glm::Z, glm::Y) -#define qpt swizzle(glm::W, glm::Z, glm::Y) -#define sqt swizzle(glm::X, glm::W, glm::Y) -#define tqt swizzle(glm::Y, glm::W, glm::Y) -#define pqt swizzle(glm::Z, glm::W, glm::Y) -#define qqt swizzle(glm::W, glm::W, glm::Y) -#define ssp swizzle(glm::X, glm::X, glm::Z) -#define tsp swizzle(glm::Y, glm::X, glm::Z) -#define psp swizzle(glm::Z, glm::X, glm::Z) -#define qsp swizzle(glm::W, glm::X, glm::Z) -#define stp swizzle(glm::X, glm::Y, glm::Z) -#define ttp swizzle(glm::Y, glm::Y, glm::Z) -#define ptp swizzle(glm::Z, glm::Y, glm::Z) -#define qtp swizzle(glm::W, glm::Y, glm::Z) -#define spp swizzle(glm::X, glm::Z, glm::Z) -#define tpp swizzle(glm::Y, glm::Z, glm::Z) -#define ppp swizzle(glm::Z, glm::Z, glm::Z) -#define qpp swizzle(glm::W, glm::Z, glm::Z) -#define sqp swizzle(glm::X, glm::W, glm::Z) -#define tqp swizzle(glm::Y, glm::W, glm::Z) -#define pqp swizzle(glm::Z, glm::W, glm::Z) -#define qqp swizzle(glm::W, glm::W, glm::Z) -#define ssq swizzle(glm::X, glm::X, glm::W) -#define tsq swizzle(glm::Y, glm::X, glm::W) -#define psq swizzle(glm::Z, glm::X, glm::W) -#define qsq swizzle(glm::W, glm::X, glm::W) -#define stq swizzle(glm::X, glm::Y, glm::W) -#define ttq swizzle(glm::Y, glm::Y, glm::W) -#define ptq swizzle(glm::Z, glm::Y, glm::W) -#define qtq swizzle(glm::W, glm::Y, glm::W) -#define spq swizzle(glm::X, glm::Z, glm::W) -#define tpq swizzle(glm::Y, glm::Z, glm::W) -#define ppq swizzle(glm::Z, glm::Z, glm::W) -#define qpq swizzle(glm::W, glm::Z, glm::W) -#define sqq swizzle(glm::X, glm::W, glm::W) -#define tqq swizzle(glm::Y, glm::W, glm::W) -#define pqq swizzle(glm::Z, glm::W, glm::W) -#define qqq swizzle(glm::W, glm::W, glm::W) - -#endif//defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_STPQ) - -#if defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_XYZW) - -#define xxxx swizzle(glm::X, glm::X, glm::X, glm::X) -#define yxxx swizzle(glm::Y, glm::X, glm::X, glm::X) -#define zxxx swizzle(glm::Z, glm::X, glm::X, glm::X) -#define wxxx swizzle(glm::W, glm::X, glm::X, glm::X) -#define xyxx swizzle(glm::X, glm::Y, glm::X, glm::X) -#define yyxx swizzle(glm::Y, glm::Y, glm::X, glm::X) -#define zyxx swizzle(glm::Z, glm::Y, glm::X, glm::X) -#define wyxx swizzle(glm::W, glm::Y, glm::X, glm::X) -#define xzxx swizzle(glm::X, glm::Z, glm::X, glm::X) -#define yzxx swizzle(glm::Y, glm::Z, glm::X, glm::X) -#define zzxx swizzle(glm::Z, glm::Z, glm::X, glm::X) -#define wzxx swizzle(glm::W, glm::Z, glm::X, glm::X) -#define xwxx swizzle(glm::X, glm::W, glm::X, glm::X) -#define ywxx swizzle(glm::Y, glm::W, glm::X, glm::X) -#define zwxx swizzle(glm::Z, glm::W, glm::X, glm::X) -#define wwxx swizzle(glm::W, glm::W, glm::X, glm::X) -#define xxyx swizzle(glm::X, glm::X, glm::Y, glm::X) -#define yxyx swizzle(glm::Y, glm::X, glm::Y, glm::X) -#define zxyx swizzle(glm::Z, glm::X, glm::Y, glm::X) -#define wxyx swizzle(glm::W, glm::X, glm::Y, glm::X) -#define xyyx swizzle(glm::X, glm::Y, glm::Y, glm::X) -#define yyyx swizzle(glm::Y, glm::Y, glm::Y, glm::X) -#define zyyx swizzle(glm::Z, glm::Y, glm::Y, glm::X) -#define wyyx swizzle(glm::W, glm::Y, glm::Y, glm::X) -#define xzyx swizzle(glm::X, glm::Z, glm::Y, glm::X) -#define yzyx swizzle(glm::Y, glm::Z, glm::Y, glm::X) -#define zzyx swizzle(glm::Z, glm::Z, glm::Y, glm::X) -#define wzyx swizzle(glm::W, glm::Z, glm::Y, glm::X) -#define xwyx swizzle(glm::X, glm::W, glm::Y, glm::X) -#define ywyx swizzle(glm::Y, glm::W, glm::Y, glm::X) -#define zwyx swizzle(glm::Z, glm::W, glm::Y, glm::X) -#define wwyx swizzle(glm::W, glm::W, glm::Y, glm::X) -#define xxzx swizzle(glm::X, glm::X, glm::Z, glm::X) -#define yxzx swizzle(glm::Y, glm::X, glm::Z, glm::X) -#define zxzx swizzle(glm::Z, glm::X, glm::Z, glm::X) -#define wxzx swizzle(glm::W, glm::X, glm::Z, glm::X) -#define xyzx swizzle(glm::X, glm::Y, glm::Z, glm::X) -#define yyzx swizzle(glm::Y, glm::Y, glm::Z, glm::X) -#define zyzx swizzle(glm::Z, glm::Y, glm::Z, glm::X) -#define wyzx swizzle(glm::W, glm::Y, glm::Z, glm::X) -#define xzzx swizzle(glm::X, glm::Z, glm::Z, glm::X) -#define yzzx swizzle(glm::Y, glm::Z, glm::Z, glm::X) -#define zzzx swizzle(glm::Z, glm::Z, glm::Z, glm::X) -#define wzzx swizzle(glm::W, glm::Z, glm::Z, glm::X) -#define xwzx swizzle(glm::X, glm::W, glm::Z, glm::X) -#define ywzx swizzle(glm::Y, glm::W, glm::Z, glm::X) -#define zwzx swizzle(glm::Z, glm::W, glm::Z, glm::X) -#define wwzx swizzle(glm::W, glm::W, glm::Z, glm::X) -#define xxwx swizzle(glm::X, glm::X, glm::W, glm::X) -#define yxwx swizzle(glm::Y, glm::X, glm::W, glm::X) -#define zxwx swizzle(glm::Z, glm::X, glm::W, glm::X) -#define wxwx swizzle(glm::W, glm::X, glm::W, glm::X) -#define xywx swizzle(glm::X, glm::Y, glm::W, glm::X) -#define yywx swizzle(glm::Y, glm::Y, glm::W, glm::X) -#define zywx swizzle(glm::Z, glm::Y, glm::W, glm::X) -#define wywx swizzle(glm::W, glm::Y, glm::W, glm::X) -#define xzwx swizzle(glm::X, glm::Z, glm::W, glm::X) -#define yzwx swizzle(glm::Y, glm::Z, glm::W, glm::X) -#define zzwx swizzle(glm::Z, glm::Z, glm::W, glm::X) -#define wzwx swizzle(glm::W, glm::Z, glm::W, glm::X) -#define xwwx swizzle(glm::X, glm::W, glm::W, glm::X) -#define ywwx swizzle(glm::Y, glm::W, glm::W, glm::X) -#define zwwx swizzle(glm::Z, glm::W, glm::W, glm::X) -#define wwwx swizzle(glm::W, glm::W, glm::W, glm::X) -#define xxxy swizzle(glm::X, glm::X, glm::X, glm::Y) -#define yxxy swizzle(glm::Y, glm::X, glm::X, glm::Y) -#define zxxy swizzle(glm::Z, glm::X, glm::X, glm::Y) -#define wxxy swizzle(glm::W, glm::X, glm::X, glm::Y) -#define xyxy swizzle(glm::X, glm::Y, glm::X, glm::Y) -#define yyxy swizzle(glm::Y, glm::Y, glm::X, glm::Y) -#define zyxy swizzle(glm::Z, glm::Y, glm::X, glm::Y) -#define wyxy swizzle(glm::W, glm::Y, glm::X, glm::Y) -#define xzxy swizzle(glm::X, glm::Z, glm::X, glm::Y) -#define yzxy swizzle(glm::Y, glm::Z, glm::X, glm::Y) -#define zzxy swizzle(glm::Z, glm::Z, glm::X, glm::Y) -#define wzxy swizzle(glm::W, glm::Z, glm::X, glm::Y) -#define xwxy swizzle(glm::X, glm::W, glm::X, glm::Y) -#define ywxy swizzle(glm::Y, glm::W, glm::X, glm::Y) -#define zwxy swizzle(glm::Z, glm::W, glm::X, glm::Y) -#define wwxy swizzle(glm::W, glm::W, glm::X, glm::Y) -#define xxyy swizzle(glm::X, glm::X, glm::Y, glm::Y) -#define yxyy swizzle(glm::Y, glm::X, glm::Y, glm::Y) -#define zxyy swizzle(glm::Z, glm::X, glm::Y, glm::Y) -#define wxyy swizzle(glm::W, glm::X, glm::Y, glm::Y) -#define xyyy swizzle(glm::X, glm::Y, glm::Y, glm::Y) -#define yyyy swizzle(glm::Y, glm::Y, glm::Y, glm::Y) -#define zyyy swizzle(glm::Z, glm::Y, glm::Y, glm::Y) -#define wyyy swizzle(glm::W, glm::Y, glm::Y, glm::Y) -#define xzyy swizzle(glm::X, glm::Z, glm::Y, glm::Y) -#define yzyy swizzle(glm::Y, glm::Z, glm::Y, glm::Y) -#define zzyy swizzle(glm::Z, glm::Z, glm::Y, glm::Y) -#define wzyy swizzle(glm::W, glm::Z, glm::Y, glm::Y) -#define xwyy swizzle(glm::X, glm::W, glm::Y, glm::Y) -#define ywyy swizzle(glm::Y, glm::W, glm::Y, glm::Y) -#define zwyy swizzle(glm::Z, glm::W, glm::Y, glm::Y) -#define wwyy swizzle(glm::W, glm::W, glm::Y, glm::Y) -#define xxzy swizzle(glm::X, glm::X, glm::Z, glm::Y) -#define yxzy swizzle(glm::Y, glm::X, glm::Z, glm::Y) -#define zxzy swizzle(glm::Z, glm::X, glm::Z, glm::Y) -#define wxzy swizzle(glm::W, glm::X, glm::Z, glm::Y) -#define xyzy swizzle(glm::X, glm::Y, glm::Z, glm::Y) -#define yyzy swizzle(glm::Y, glm::Y, glm::Z, glm::Y) -#define zyzy swizzle(glm::Z, glm::Y, glm::Z, glm::Y) -#define wyzy swizzle(glm::W, glm::Y, glm::Z, glm::Y) -#define xzzy swizzle(glm::X, glm::Z, glm::Z, glm::Y) -#define yzzy swizzle(glm::Y, glm::Z, glm::Z, glm::Y) -#define zzzy swizzle(glm::Z, glm::Z, glm::Z, glm::Y) -#define wzzy swizzle(glm::W, glm::Z, glm::Z, glm::Y) -#define xwzy swizzle(glm::X, glm::W, glm::Z, glm::Y) -#define ywzy swizzle(glm::Y, glm::W, glm::Z, glm::Y) -#define zwzy swizzle(glm::Z, glm::W, glm::Z, glm::Y) -#define wwzy swizzle(glm::W, glm::W, glm::Z, glm::Y) -#define xxwy swizzle(glm::X, glm::X, glm::W, glm::Y) -#define yxwy swizzle(glm::Y, glm::X, glm::W, glm::Y) -#define zxwy swizzle(glm::Z, glm::X, glm::W, glm::Y) -#define wxwy swizzle(glm::W, glm::X, glm::W, glm::Y) -#define xywy swizzle(glm::X, glm::Y, glm::W, glm::Y) -#define yywy swizzle(glm::Y, glm::Y, glm::W, glm::Y) -#define zywy swizzle(glm::Z, glm::Y, glm::W, glm::Y) -#define wywy swizzle(glm::W, glm::Y, glm::W, glm::Y) -#define xzwy swizzle(glm::X, glm::Z, glm::W, glm::Y) -#define yzwy swizzle(glm::Y, glm::Z, glm::W, glm::Y) -#define zzwy swizzle(glm::Z, glm::Z, glm::W, glm::Y) -#define wzwy swizzle(glm::W, glm::Z, glm::W, glm::Y) -#define xwwy swizzle(glm::X, glm::W, glm::W, glm::Y) -#define ywwy swizzle(glm::Y, glm::W, glm::W, glm::Y) -#define zwwy swizzle(glm::Z, glm::W, glm::W, glm::Y) -#define wwwy swizzle(glm::W, glm::W, glm::W, glm::Y) -#define xxxz swizzle(glm::X, glm::X, glm::X, glm::Z) -#define yxxz swizzle(glm::Y, glm::X, glm::X, glm::Z) -#define zxxz swizzle(glm::Z, glm::X, glm::X, glm::Z) -#define wxxz swizzle(glm::W, glm::X, glm::X, glm::Z) -#define xyxz swizzle(glm::X, glm::Y, glm::X, glm::Z) -#define yyxz swizzle(glm::Y, glm::Y, glm::X, glm::Z) -#define zyxz swizzle(glm::Z, glm::Y, glm::X, glm::Z) -#define wyxz swizzle(glm::W, glm::Y, glm::X, glm::Z) -#define xzxz swizzle(glm::X, glm::Z, glm::X, glm::Z) -#define yzxz swizzle(glm::Y, glm::Z, glm::X, glm::Z) -#define zzxz swizzle(glm::Z, glm::Z, glm::X, glm::Z) -#define wzxz swizzle(glm::W, glm::Z, glm::X, glm::Z) -#define xwxz swizzle(glm::X, glm::W, glm::X, glm::Z) -#define ywxz swizzle(glm::Y, glm::W, glm::X, glm::Z) -#define zwxz swizzle(glm::Z, glm::W, glm::X, glm::Z) -#define wwxz swizzle(glm::W, glm::W, glm::X, glm::Z) -#define xxyz swizzle(glm::X, glm::X, glm::Y, glm::Z) -#define yxyz swizzle(glm::Y, glm::X, glm::Y, glm::Z) -#define zxyz swizzle(glm::Z, glm::X, glm::Y, glm::Z) -#define wxyz swizzle(glm::W, glm::X, glm::Y, glm::Z) -#define xyyz swizzle(glm::X, glm::Y, glm::Y, glm::Z) -#define yyyz swizzle(glm::Y, glm::Y, glm::Y, glm::Z) -#define zyyz swizzle(glm::Z, glm::Y, glm::Y, glm::Z) -#define wyyz swizzle(glm::W, glm::Y, glm::Y, glm::Z) -#define xzyz swizzle(glm::X, glm::Z, glm::Y, glm::Z) -#define yzyz swizzle(glm::Y, glm::Z, glm::Y, glm::Z) -#define zzyz swizzle(glm::Z, glm::Z, glm::Y, glm::Z) -#define wzyz swizzle(glm::W, glm::Z, glm::Y, glm::Z) -#define xwyz swizzle(glm::X, glm::W, glm::Y, glm::Z) -#define ywyz swizzle(glm::Y, glm::W, glm::Y, glm::Z) -#define zwyz swizzle(glm::Z, glm::W, glm::Y, glm::Z) -#define wwyz swizzle(glm::W, glm::W, glm::Y, glm::Z) -#define xxzz swizzle(glm::X, glm::X, glm::Z, glm::Z) -#define yxzz swizzle(glm::Y, glm::X, glm::Z, glm::Z) -#define zxzz swizzle(glm::Z, glm::X, glm::Z, glm::Z) -#define wxzz swizzle(glm::W, glm::X, glm::Z, glm::Z) -#define xyzz swizzle(glm::X, glm::Y, glm::Z, glm::Z) -#define yyzz swizzle(glm::Y, glm::Y, glm::Z, glm::Z) -#define zyzz swizzle(glm::Z, glm::Y, glm::Z, glm::Z) -#define wyzz swizzle(glm::W, glm::Y, glm::Z, glm::Z) -#define xzzz swizzle(glm::X, glm::Z, glm::Z, glm::Z) -#define yzzz swizzle(glm::Y, glm::Z, glm::Z, glm::Z) -#define zzzz swizzle(glm::Z, glm::Z, glm::Z, glm::Z) -#define wzzz swizzle(glm::W, glm::Z, glm::Z, glm::Z) -#define xwzz swizzle(glm::X, glm::W, glm::Z, glm::Z) -#define ywzz swizzle(glm::Y, glm::W, glm::Z, glm::Z) -#define zwzz swizzle(glm::Z, glm::W, glm::Z, glm::Z) -#define wwzz swizzle(glm::W, glm::W, glm::Z, glm::Z) -#define xxwz swizzle(glm::X, glm::X, glm::W, glm::Z) -#define yxwz swizzle(glm::Y, glm::X, glm::W, glm::Z) -#define zxwz swizzle(glm::Z, glm::X, glm::W, glm::Z) -#define wxwz swizzle(glm::W, glm::X, glm::W, glm::Z) -#define xywz swizzle(glm::X, glm::Y, glm::W, glm::Z) -#define yywz swizzle(glm::Y, glm::Y, glm::W, glm::Z) -#define zywz swizzle(glm::Z, glm::Y, glm::W, glm::Z) -#define wywz swizzle(glm::W, glm::Y, glm::W, glm::Z) -#define xzwz swizzle(glm::X, glm::Z, glm::W, glm::Z) -#define yzwz swizzle(glm::Y, glm::Z, glm::W, glm::Z) -#define zzwz swizzle(glm::Z, glm::Z, glm::W, glm::Z) -#define wzwz swizzle(glm::W, glm::Z, glm::W, glm::Z) -#define xwwz swizzle(glm::X, glm::W, glm::W, glm::Z) -#define ywwz swizzle(glm::Y, glm::W, glm::W, glm::Z) -#define zwwz swizzle(glm::Z, glm::W, glm::W, glm::Z) -#define wwwz swizzle(glm::W, glm::W, glm::W, glm::Z) -#define xxxw swizzle(glm::X, glm::X, glm::X, glm::W) -#define yxxw swizzle(glm::Y, glm::X, glm::X, glm::W) -#define zxxw swizzle(glm::Z, glm::X, glm::X, glm::W) -#define wxxw swizzle(glm::W, glm::X, glm::X, glm::W) -#define xyxw swizzle(glm::X, glm::Y, glm::X, glm::W) -#define yyxw swizzle(glm::Y, glm::Y, glm::X, glm::W) -#define zyxw swizzle(glm::Z, glm::Y, glm::X, glm::W) -#define wyxw swizzle(glm::W, glm::Y, glm::X, glm::W) -#define xzxw swizzle(glm::X, glm::Z, glm::X, glm::W) -#define yzxw swizzle(glm::Y, glm::Z, glm::X, glm::W) -#define zzxw swizzle(glm::Z, glm::Z, glm::X, glm::W) -#define wzxw swizzle(glm::W, glm::Z, glm::X, glm::W) -#define xwxw swizzle(glm::X, glm::W, glm::X, glm::W) -#define ywxw swizzle(glm::Y, glm::W, glm::X, glm::W) -#define zwxw swizzle(glm::Z, glm::W, glm::X, glm::W) -#define wwxw swizzle(glm::W, glm::W, glm::X, glm::W) -#define xxyw swizzle(glm::X, glm::X, glm::Y, glm::W) -#define yxyw swizzle(glm::Y, glm::X, glm::Y, glm::W) -#define zxyw swizzle(glm::Z, glm::X, glm::Y, glm::W) -#define wxyw swizzle(glm::W, glm::X, glm::Y, glm::W) -#define xyyw swizzle(glm::X, glm::Y, glm::Y, glm::W) -#define yyyw swizzle(glm::Y, glm::Y, glm::Y, glm::W) -#define zyyw swizzle(glm::Z, glm::Y, glm::Y, glm::W) -#define wyyw swizzle(glm::W, glm::Y, glm::Y, glm::W) -#define xzyw swizzle(glm::X, glm::Z, glm::Y, glm::W) -#define yzyw swizzle(glm::Y, glm::Z, glm::Y, glm::W) -#define zzyw swizzle(glm::Z, glm::Z, glm::Y, glm::W) -#define wzyw swizzle(glm::W, glm::Z, glm::Y, glm::W) -#define xwyw swizzle(glm::X, glm::W, glm::Y, glm::W) -#define ywyw swizzle(glm::Y, glm::W, glm::Y, glm::W) -#define zwyw swizzle(glm::Z, glm::W, glm::Y, glm::W) -#define wwyw swizzle(glm::W, glm::W, glm::Y, glm::W) -#define xxzw swizzle(glm::X, glm::X, glm::Z, glm::W) -#define yxzw swizzle(glm::Y, glm::X, glm::Z, glm::W) -#define zxzw swizzle(glm::Z, glm::X, glm::Z, glm::W) -#define wxzw swizzle(glm::W, glm::X, glm::Z, glm::W) -#define xyzw swizzle(glm::X, glm::Y, glm::Z, glm::W) -#define yyzw swizzle(glm::Y, glm::Y, glm::Z, glm::W) -#define zyzw swizzle(glm::Z, glm::Y, glm::Z, glm::W) -#define wyzw swizzle(glm::W, glm::Y, glm::Z, glm::W) -#define xzzw swizzle(glm::X, glm::Z, glm::Z, glm::W) -#define yzzw swizzle(glm::Y, glm::Z, glm::Z, glm::W) -#define zzzw swizzle(glm::Z, glm::Z, glm::Z, glm::W) -#define wzzw swizzle(glm::W, glm::Z, glm::Z, glm::W) -#define xwzw swizzle(glm::X, glm::W, glm::Z, glm::W) -#define ywzw swizzle(glm::Y, glm::W, glm::Z, glm::W) -#define zwzw swizzle(glm::Z, glm::W, glm::Z, glm::W) -#define wwzw swizzle(glm::W, glm::W, glm::Z, glm::W) -#define xxww swizzle(glm::X, glm::X, glm::W, glm::W) -#define yxww swizzle(glm::Y, glm::X, glm::W, glm::W) -#define zxww swizzle(glm::Z, glm::X, glm::W, glm::W) -#define wxww swizzle(glm::W, glm::X, glm::W, glm::W) -#define xyww swizzle(glm::X, glm::Y, glm::W, glm::W) -#define yyww swizzle(glm::Y, glm::Y, glm::W, glm::W) -#define zyww swizzle(glm::Z, glm::Y, glm::W, glm::W) -#define wyww swizzle(glm::W, glm::Y, glm::W, glm::W) -#define xzww swizzle(glm::X, glm::Z, glm::W, glm::W) -#define yzww swizzle(glm::Y, glm::Z, glm::W, glm::W) -#define zzww swizzle(glm::Z, glm::Z, glm::W, glm::W) -#define wzww swizzle(glm::W, glm::Z, glm::W, glm::W) -#define xwww swizzle(glm::X, glm::W, glm::W, glm::W) -#define ywww swizzle(glm::Y, glm::W, glm::W, glm::W) -#define zwww swizzle(glm::Z, glm::W, glm::W, glm::W) -#define wwww swizzle(glm::W, glm::W, glm::W, glm::W) - -#endif//defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_XYZW) - -#if defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_RGBA) - -#define rrrr swizzle(glm::X, glm::X, glm::X, glm::X) -#define grrr swizzle(glm::Y, glm::X, glm::X, glm::X) -#define brrr swizzle(glm::Z, glm::X, glm::X, glm::X) -#define arrr swizzle(glm::W, glm::X, glm::X, glm::X) -#define rgrr swizzle(glm::X, glm::Y, glm::X, glm::X) -#define ggrr swizzle(glm::Y, glm::Y, glm::X, glm::X) -#define bgrr swizzle(glm::Z, glm::Y, glm::X, glm::X) -#define agrr swizzle(glm::W, glm::Y, glm::X, glm::X) -#define rbrr swizzle(glm::X, glm::Z, glm::X, glm::X) -#define gbrr swizzle(glm::Y, glm::Z, glm::X, glm::X) -#define bbrr swizzle(glm::Z, glm::Z, glm::X, glm::X) -#define abrr swizzle(glm::W, glm::Z, glm::X, glm::X) -#define rarr swizzle(glm::X, glm::W, glm::X, glm::X) -#define garr swizzle(glm::Y, glm::W, glm::X, glm::X) -#define barr swizzle(glm::Z, glm::W, glm::X, glm::X) -#define aarr swizzle(glm::W, glm::W, glm::X, glm::X) -#define rrgr swizzle(glm::X, glm::X, glm::Y, glm::X) -#define grgr swizzle(glm::Y, glm::X, glm::Y, glm::X) -#define brgr swizzle(glm::Z, glm::X, glm::Y, glm::X) -#define argr swizzle(glm::W, glm::X, glm::Y, glm::X) -#define rggr swizzle(glm::X, glm::Y, glm::Y, glm::X) -#define gggr swizzle(glm::Y, glm::Y, glm::Y, glm::X) -#define bggr swizzle(glm::Z, glm::Y, glm::Y, glm::X) -#define aggr swizzle(glm::W, glm::Y, glm::Y, glm::X) -#define rbgr swizzle(glm::X, glm::Z, glm::Y, glm::X) -#define gbgr swizzle(glm::Y, glm::Z, glm::Y, glm::X) -#define bbgr swizzle(glm::Z, glm::Z, glm::Y, glm::X) -#define abgr swizzle(glm::W, glm::Z, glm::Y, glm::X) -#define ragr swizzle(glm::X, glm::W, glm::Y, glm::X) -#define gagr swizzle(glm::Y, glm::W, glm::Y, glm::X) -#define bagr swizzle(glm::Z, glm::W, glm::Y, glm::X) -#define aagr swizzle(glm::W, glm::W, glm::Y, glm::X) -#define rrbr swizzle(glm::X, glm::X, glm::Z, glm::X) -#define grbr swizzle(glm::Y, glm::X, glm::Z, glm::X) -#define brbr swizzle(glm::Z, glm::X, glm::Z, glm::X) -#define arbr swizzle(glm::W, glm::X, glm::Z, glm::X) -#define rgbr swizzle(glm::X, glm::Y, glm::Z, glm::X) -#define ggbr swizzle(glm::Y, glm::Y, glm::Z, glm::X) -#define bgbr swizzle(glm::Z, glm::Y, glm::Z, glm::X) -#define agbr swizzle(glm::W, glm::Y, glm::Z, glm::X) -#define rbbr swizzle(glm::X, glm::Z, glm::Z, glm::X) -#define gbbr swizzle(glm::Y, glm::Z, glm::Z, glm::X) -#define bbbr swizzle(glm::Z, glm::Z, glm::Z, glm::X) -#define abbr swizzle(glm::W, glm::Z, glm::Z, glm::X) -#define rabr swizzle(glm::X, glm::W, glm::Z, glm::X) -#define gabr swizzle(glm::Y, glm::W, glm::Z, glm::X) -#define babr swizzle(glm::Z, glm::W, glm::Z, glm::X) -#define aabr swizzle(glm::W, glm::W, glm::Z, glm::X) -#define rrar swizzle(glm::X, glm::X, glm::W, glm::X) -#define grar swizzle(glm::Y, glm::X, glm::W, glm::X) -#define brar swizzle(glm::Z, glm::X, glm::W, glm::X) -#define arar swizzle(glm::W, glm::X, glm::W, glm::X) -#define rgar swizzle(glm::X, glm::Y, glm::W, glm::X) -#define ggar swizzle(glm::Y, glm::Y, glm::W, glm::X) -#define bgar swizzle(glm::Z, glm::Y, glm::W, glm::X) -#define agar swizzle(glm::W, glm::Y, glm::W, glm::X) -#define rbar swizzle(glm::X, glm::Z, glm::W, glm::X) -#define gbar swizzle(glm::Y, glm::Z, glm::W, glm::X) -#define bbar swizzle(glm::Z, glm::Z, glm::W, glm::X) -#define abar swizzle(glm::W, glm::Z, glm::W, glm::X) -#define raar swizzle(glm::X, glm::W, glm::W, glm::X) -#define gaar swizzle(glm::Y, glm::W, glm::W, glm::X) -#define baar swizzle(glm::Z, glm::W, glm::W, glm::X) -#define aaar swizzle(glm::W, glm::W, glm::W, glm::X) -#define rrrg swizzle(glm::X, glm::X, glm::X, glm::Y) -#define grrg swizzle(glm::Y, glm::X, glm::X, glm::Y) -#define brrg swizzle(glm::Z, glm::X, glm::X, glm::Y) -#define arrg swizzle(glm::W, glm::X, glm::X, glm::Y) -#define rgrg swizzle(glm::X, glm::Y, glm::X, glm::Y) -#define ggrg swizzle(glm::Y, glm::Y, glm::X, glm::Y) -#define bgrg swizzle(glm::Z, glm::Y, glm::X, glm::Y) -#define agrg swizzle(glm::W, glm::Y, glm::X, glm::Y) -#define rbrg swizzle(glm::X, glm::Z, glm::X, glm::Y) -#define gbrg swizzle(glm::Y, glm::Z, glm::X, glm::Y) -#define bbrg swizzle(glm::Z, glm::Z, glm::X, glm::Y) -#define abrg swizzle(glm::W, glm::Z, glm::X, glm::Y) -#define rarg swizzle(glm::X, glm::W, glm::X, glm::Y) -#define garg swizzle(glm::Y, glm::W, glm::X, glm::Y) -#define barg swizzle(glm::Z, glm::W, glm::X, glm::Y) -#define aarg swizzle(glm::W, glm::W, glm::X, glm::Y) -#define rrgg swizzle(glm::X, glm::X, glm::Y, glm::Y) -#define grgg swizzle(glm::Y, glm::X, glm::Y, glm::Y) -#define brgg swizzle(glm::Z, glm::X, glm::Y, glm::Y) -#define argg swizzle(glm::W, glm::X, glm::Y, glm::Y) -#define rggg swizzle(glm::X, glm::Y, glm::Y, glm::Y) -#define gggg swizzle(glm::Y, glm::Y, glm::Y, glm::Y) -#define bggg swizzle(glm::Z, glm::Y, glm::Y, glm::Y) -#define aggg swizzle(glm::W, glm::Y, glm::Y, glm::Y) -#define rbgg swizzle(glm::X, glm::Z, glm::Y, glm::Y) -#define gbgg swizzle(glm::Y, glm::Z, glm::Y, glm::Y) -#define bbgg swizzle(glm::Z, glm::Z, glm::Y, glm::Y) -#define abgg swizzle(glm::W, glm::Z, glm::Y, glm::Y) -#define ragg swizzle(glm::X, glm::W, glm::Y, glm::Y) -#define gagg swizzle(glm::Y, glm::W, glm::Y, glm::Y) -#define bagg swizzle(glm::Z, glm::W, glm::Y, glm::Y) -#define aagg swizzle(glm::W, glm::W, glm::Y, glm::Y) -#define rrbg swizzle(glm::X, glm::X, glm::Z, glm::Y) -#define grbg swizzle(glm::Y, glm::X, glm::Z, glm::Y) -#define brbg swizzle(glm::Z, glm::X, glm::Z, glm::Y) -#define arbg swizzle(glm::W, glm::X, glm::Z, glm::Y) -#define rgbg swizzle(glm::X, glm::Y, glm::Z, glm::Y) -#define ggbg swizzle(glm::Y, glm::Y, glm::Z, glm::Y) -#define bgbg swizzle(glm::Z, glm::Y, glm::Z, glm::Y) -#define agbg swizzle(glm::W, glm::Y, glm::Z, glm::Y) -#define rbbg swizzle(glm::X, glm::Z, glm::Z, glm::Y) -#define gbbg swizzle(glm::Y, glm::Z, glm::Z, glm::Y) -#define bbbg swizzle(glm::Z, glm::Z, glm::Z, glm::Y) -#define abbg swizzle(glm::W, glm::Z, glm::Z, glm::Y) -#define rabg swizzle(glm::X, glm::W, glm::Z, glm::Y) -#define gabg swizzle(glm::Y, glm::W, glm::Z, glm::Y) -#define babg swizzle(glm::Z, glm::W, glm::Z, glm::Y) -#define aabg swizzle(glm::W, glm::W, glm::Z, glm::Y) -#define rrag swizzle(glm::X, glm::X, glm::W, glm::Y) -#define grag swizzle(glm::Y, glm::X, glm::W, glm::Y) -#define brag swizzle(glm::Z, glm::X, glm::W, glm::Y) -#define arag swizzle(glm::W, glm::X, glm::W, glm::Y) -#define rgag swizzle(glm::X, glm::Y, glm::W, glm::Y) -#define ggag swizzle(glm::Y, glm::Y, glm::W, glm::Y) -#define bgag swizzle(glm::Z, glm::Y, glm::W, glm::Y) -#define agag swizzle(glm::W, glm::Y, glm::W, glm::Y) -#define rbag swizzle(glm::X, glm::Z, glm::W, glm::Y) -#define gbag swizzle(glm::Y, glm::Z, glm::W, glm::Y) -#define bbag swizzle(glm::Z, glm::Z, glm::W, glm::Y) -#define abag swizzle(glm::W, glm::Z, glm::W, glm::Y) -#define raag swizzle(glm::X, glm::W, glm::W, glm::Y) -#define gaag swizzle(glm::Y, glm::W, glm::W, glm::Y) -#define baag swizzle(glm::Z, glm::W, glm::W, glm::Y) -#define aaag swizzle(glm::W, glm::W, glm::W, glm::Y) -#define rrrb swizzle(glm::X, glm::X, glm::X, glm::Z) -#define grrb swizzle(glm::Y, glm::X, glm::X, glm::Z) -#define brrb swizzle(glm::Z, glm::X, glm::X, glm::Z) -#define arrb swizzle(glm::W, glm::X, glm::X, glm::Z) -#define rgrb swizzle(glm::X, glm::Y, glm::X, glm::Z) -#define ggrb swizzle(glm::Y, glm::Y, glm::X, glm::Z) -#define bgrb swizzle(glm::Z, glm::Y, glm::X, glm::Z) -#define agrb swizzle(glm::W, glm::Y, glm::X, glm::Z) -#define rbrb swizzle(glm::X, glm::Z, glm::X, glm::Z) -#define gbrb swizzle(glm::Y, glm::Z, glm::X, glm::Z) -#define bbrb swizzle(glm::Z, glm::Z, glm::X, glm::Z) -#define abrb swizzle(glm::W, glm::Z, glm::X, glm::Z) -#define rarb swizzle(glm::X, glm::W, glm::X, glm::Z) -#define garb swizzle(glm::Y, glm::W, glm::X, glm::Z) -#define barb swizzle(glm::Z, glm::W, glm::X, glm::Z) -#define aarb swizzle(glm::W, glm::W, glm::X, glm::Z) -#define rrgb swizzle(glm::X, glm::X, glm::Y, glm::Z) -#define grgb swizzle(glm::Y, glm::X, glm::Y, glm::Z) -#define brgb swizzle(glm::Z, glm::X, glm::Y, glm::Z) -#define argb swizzle(glm::W, glm::X, glm::Y, glm::Z) -#define rggb swizzle(glm::X, glm::Y, glm::Y, glm::Z) -#define gggb swizzle(glm::Y, glm::Y, glm::Y, glm::Z) -#define bggb swizzle(glm::Z, glm::Y, glm::Y, glm::Z) -#define aggb swizzle(glm::W, glm::Y, glm::Y, glm::Z) -#define rbgb swizzle(glm::X, glm::Z, glm::Y, glm::Z) -#define gbgb swizzle(glm::Y, glm::Z, glm::Y, glm::Z) -#define bbgb swizzle(glm::Z, glm::Z, glm::Y, glm::Z) -#define abgb swizzle(glm::W, glm::Z, glm::Y, glm::Z) -#define ragb swizzle(glm::X, glm::W, glm::Y, glm::Z) -#define gagb swizzle(glm::Y, glm::W, glm::Y, glm::Z) -#define bagb swizzle(glm::Z, glm::W, glm::Y, glm::Z) -#define aagb swizzle(glm::W, glm::W, glm::Y, glm::Z) -#define rrbb swizzle(glm::X, glm::X, glm::Z, glm::Z) -#define grbb swizzle(glm::Y, glm::X, glm::Z, glm::Z) -#define brbb swizzle(glm::Z, glm::X, glm::Z, glm::Z) -#define arbb swizzle(glm::W, glm::X, glm::Z, glm::Z) -#define rgbb swizzle(glm::X, glm::Y, glm::Z, glm::Z) -#define ggbb swizzle(glm::Y, glm::Y, glm::Z, glm::Z) -#define bgbb swizzle(glm::Z, glm::Y, glm::Z, glm::Z) -#define agbb swizzle(glm::W, glm::Y, glm::Z, glm::Z) -#define rbbb swizzle(glm::X, glm::Z, glm::Z, glm::Z) -#define gbbb swizzle(glm::Y, glm::Z, glm::Z, glm::Z) -#define bbbb swizzle(glm::Z, glm::Z, glm::Z, glm::Z) -#define abbb swizzle(glm::W, glm::Z, glm::Z, glm::Z) -#define rabb swizzle(glm::X, glm::W, glm::Z, glm::Z) -#define gabb swizzle(glm::Y, glm::W, glm::Z, glm::Z) -#define babb swizzle(glm::Z, glm::W, glm::Z, glm::Z) -#define aabb swizzle(glm::W, glm::W, glm::Z, glm::Z) -#define rrab swizzle(glm::X, glm::X, glm::W, glm::Z) -#define grab swizzle(glm::Y, glm::X, glm::W, glm::Z) -#define brab swizzle(glm::Z, glm::X, glm::W, glm::Z) -#define arab swizzle(glm::W, glm::X, glm::W, glm::Z) -#define rgab swizzle(glm::X, glm::Y, glm::W, glm::Z) -#define ggab swizzle(glm::Y, glm::Y, glm::W, glm::Z) -#define bgab swizzle(glm::Z, glm::Y, glm::W, glm::Z) -#define agab swizzle(glm::W, glm::Y, glm::W, glm::Z) -#define rbab swizzle(glm::X, glm::Z, glm::W, glm::Z) -#define gbab swizzle(glm::Y, glm::Z, glm::W, glm::Z) -#define bbab swizzle(glm::Z, glm::Z, glm::W, glm::Z) -#define abab swizzle(glm::W, glm::Z, glm::W, glm::Z) -#define raab swizzle(glm::X, glm::W, glm::W, glm::Z) -#define gaab swizzle(glm::Y, glm::W, glm::W, glm::Z) -#define baab swizzle(glm::Z, glm::W, glm::W, glm::Z) -#define aaab swizzle(glm::W, glm::W, glm::W, glm::Z) -#define rrra swizzle(glm::X, glm::X, glm::X, glm::W) -#define grra swizzle(glm::Y, glm::X, glm::X, glm::W) -#define brra swizzle(glm::Z, glm::X, glm::X, glm::W) -#define arra swizzle(glm::W, glm::X, glm::X, glm::W) -#define rgra swizzle(glm::X, glm::Y, glm::X, glm::W) -#define ggra swizzle(glm::Y, glm::Y, glm::X, glm::W) -#define bgra swizzle(glm::Z, glm::Y, glm::X, glm::W) -#define agra swizzle(glm::W, glm::Y, glm::X, glm::W) -#define rbra swizzle(glm::X, glm::Z, glm::X, glm::W) -#define gbra swizzle(glm::Y, glm::Z, glm::X, glm::W) -#define bbra swizzle(glm::Z, glm::Z, glm::X, glm::W) -#define abra swizzle(glm::W, glm::Z, glm::X, glm::W) -#define rara swizzle(glm::X, glm::W, glm::X, glm::W) -#define gara swizzle(glm::Y, glm::W, glm::X, glm::W) -#define bara swizzle(glm::Z, glm::W, glm::X, glm::W) -#define aara swizzle(glm::W, glm::W, glm::X, glm::W) -#define rrga swizzle(glm::X, glm::X, glm::Y, glm::W) -#define grga swizzle(glm::Y, glm::X, glm::Y, glm::W) -#define brga swizzle(glm::Z, glm::X, glm::Y, glm::W) -#define arga swizzle(glm::W, glm::X, glm::Y, glm::W) -#define rgga swizzle(glm::X, glm::Y, glm::Y, glm::W) -#define ggga swizzle(glm::Y, glm::Y, glm::Y, glm::W) -#define bgga swizzle(glm::Z, glm::Y, glm::Y, glm::W) -#define agga swizzle(glm::W, glm::Y, glm::Y, glm::W) -#define rbga swizzle(glm::X, glm::Z, glm::Y, glm::W) -#define gbga swizzle(glm::Y, glm::Z, glm::Y, glm::W) -#define bbga swizzle(glm::Z, glm::Z, glm::Y, glm::W) -#define abga swizzle(glm::W, glm::Z, glm::Y, glm::W) -#define raga swizzle(glm::X, glm::W, glm::Y, glm::W) -#define gaga swizzle(glm::Y, glm::W, glm::Y, glm::W) -#define baga swizzle(glm::Z, glm::W, glm::Y, glm::W) -#define aaga swizzle(glm::W, glm::W, glm::Y, glm::W) -#define rrba swizzle(glm::X, glm::X, glm::Z, glm::W) -#define grba swizzle(glm::Y, glm::X, glm::Z, glm::W) -#define brba swizzle(glm::Z, glm::X, glm::Z, glm::W) -#define arba swizzle(glm::W, glm::X, glm::Z, glm::W) -#define rgba swizzle(glm::X, glm::Y, glm::Z, glm::W) -#define ggba swizzle(glm::Y, glm::Y, glm::Z, glm::W) -#define bgba swizzle(glm::Z, glm::Y, glm::Z, glm::W) -#define agba swizzle(glm::W, glm::Y, glm::Z, glm::W) -#define rbba swizzle(glm::X, glm::Z, glm::Z, glm::W) -#define gbba swizzle(glm::Y, glm::Z, glm::Z, glm::W) -#define bbba swizzle(glm::Z, glm::Z, glm::Z, glm::W) -#define abba swizzle(glm::W, glm::Z, glm::Z, glm::W) -#define raba swizzle(glm::X, glm::W, glm::Z, glm::W) -#define gaba swizzle(glm::Y, glm::W, glm::Z, glm::W) -#define baba swizzle(glm::Z, glm::W, glm::Z, glm::W) -#define aaba swizzle(glm::W, glm::W, glm::Z, glm::W) -#define rraa swizzle(glm::X, glm::X, glm::W, glm::W) -#define graa swizzle(glm::Y, glm::X, glm::W, glm::W) -#define braa swizzle(glm::Z, glm::X, glm::W, glm::W) -#define araa swizzle(glm::W, glm::X, glm::W, glm::W) -#define rgaa swizzle(glm::X, glm::Y, glm::W, glm::W) -#define ggaa swizzle(glm::Y, glm::Y, glm::W, glm::W) -#define bgaa swizzle(glm::Z, glm::Y, glm::W, glm::W) -#define agaa swizzle(glm::W, glm::Y, glm::W, glm::W) -#define rbaa swizzle(glm::X, glm::Z, glm::W, glm::W) -#define gbaa swizzle(glm::Y, glm::Z, glm::W, glm::W) -#define bbaa swizzle(glm::Z, glm::Z, glm::W, glm::W) -#define abaa swizzle(glm::W, glm::Z, glm::W, glm::W) -#define raaa swizzle(glm::X, glm::W, glm::W, glm::W) -#define gaaa swizzle(glm::Y, glm::W, glm::W, glm::W) -#define baaa swizzle(glm::Z, glm::W, glm::W, glm::W) -#define aaaa swizzle(glm::W, glm::W, glm::W, glm::W) - -#endif//defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_RGBA) - -#if defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_STPQ) - -#define ssss swizzle(glm::X, glm::X, glm::X, glm::X) -#define tsss swizzle(glm::Y, glm::X, glm::X, glm::X) -#define psss swizzle(glm::Z, glm::X, glm::X, glm::X) -#define qsss swizzle(glm::W, glm::X, glm::X, glm::X) -#define stss swizzle(glm::X, glm::Y, glm::X, glm::X) -#define ttss swizzle(glm::Y, glm::Y, glm::X, glm::X) -#define ptss swizzle(glm::Z, glm::Y, glm::X, glm::X) -#define qtss swizzle(glm::W, glm::Y, glm::X, glm::X) -#define spss swizzle(glm::X, glm::Z, glm::X, glm::X) -#define tpss swizzle(glm::Y, glm::Z, glm::X, glm::X) -#define ppss swizzle(glm::Z, glm::Z, glm::X, glm::X) -#define qpss swizzle(glm::W, glm::Z, glm::X, glm::X) -#define sqss swizzle(glm::X, glm::W, glm::X, glm::X) -#define tqss swizzle(glm::Y, glm::W, glm::X, glm::X) -#define pqss swizzle(glm::Z, glm::W, glm::X, glm::X) -#define qqss swizzle(glm::W, glm::W, glm::X, glm::X) -#define ssts swizzle(glm::X, glm::X, glm::Y, glm::X) -#define tsts swizzle(glm::Y, glm::X, glm::Y, glm::X) -#define psts swizzle(glm::Z, glm::X, glm::Y, glm::X) -#define qsts swizzle(glm::W, glm::X, glm::Y, glm::X) -#define stts swizzle(glm::X, glm::Y, glm::Y, glm::X) -#define ttts swizzle(glm::Y, glm::Y, glm::Y, glm::X) -#define ptts swizzle(glm::Z, glm::Y, glm::Y, glm::X) -#define qtts swizzle(glm::W, glm::Y, glm::Y, glm::X) -#define spts swizzle(glm::X, glm::Z, glm::Y, glm::X) -#define tpts swizzle(glm::Y, glm::Z, glm::Y, glm::X) -#define ppts swizzle(glm::Z, glm::Z, glm::Y, glm::X) -#define qpts swizzle(glm::W, glm::Z, glm::Y, glm::X) -#define sqts swizzle(glm::X, glm::W, glm::Y, glm::X) -#define tqts swizzle(glm::Y, glm::W, glm::Y, glm::X) -#define pqts swizzle(glm::Z, glm::W, glm::Y, glm::X) -#define qqts swizzle(glm::W, glm::W, glm::Y, glm::X) -#define ssps swizzle(glm::X, glm::X, glm::Z, glm::X) -#define tsps swizzle(glm::Y, glm::X, glm::Z, glm::X) -#define psps swizzle(glm::Z, glm::X, glm::Z, glm::X) -#define qsps swizzle(glm::W, glm::X, glm::Z, glm::X) -#define stps swizzle(glm::X, glm::Y, glm::Z, glm::X) -#define ttps swizzle(glm::Y, glm::Y, glm::Z, glm::X) -#define ptps swizzle(glm::Z, glm::Y, glm::Z, glm::X) -#define qtps swizzle(glm::W, glm::Y, glm::Z, glm::X) -#define spps swizzle(glm::X, glm::Z, glm::Z, glm::X) -#define tpps swizzle(glm::Y, glm::Z, glm::Z, glm::X) -#define ppps swizzle(glm::Z, glm::Z, glm::Z, glm::X) -#define qpps swizzle(glm::W, glm::Z, glm::Z, glm::X) -#define sqps swizzle(glm::X, glm::W, glm::Z, glm::X) -#define tqps swizzle(glm::Y, glm::W, glm::Z, glm::X) -#define pqps swizzle(glm::Z, glm::W, glm::Z, glm::X) -#define qqps swizzle(glm::W, glm::W, glm::Z, glm::X) -#define ssqs swizzle(glm::X, glm::X, glm::W, glm::X) -#define tsqs swizzle(glm::Y, glm::X, glm::W, glm::X) -#define psqs swizzle(glm::Z, glm::X, glm::W, glm::X) -#define qsqs swizzle(glm::W, glm::X, glm::W, glm::X) -#define stqs swizzle(glm::X, glm::Y, glm::W, glm::X) -#define ttqs swizzle(glm::Y, glm::Y, glm::W, glm::X) -#define ptqs swizzle(glm::Z, glm::Y, glm::W, glm::X) -#define qtqs swizzle(glm::W, glm::Y, glm::W, glm::X) -#define spqs swizzle(glm::X, glm::Z, glm::W, glm::X) -#define tpqs swizzle(glm::Y, glm::Z, glm::W, glm::X) -#define ppqs swizzle(glm::Z, glm::Z, glm::W, glm::X) -#define qpqs swizzle(glm::W, glm::Z, glm::W, glm::X) -#define sqqs swizzle(glm::X, glm::W, glm::W, glm::X) -#define tqqs swizzle(glm::Y, glm::W, glm::W, glm::X) -#define pqqs swizzle(glm::Z, glm::W, glm::W, glm::X) -#define qqqs swizzle(glm::W, glm::W, glm::W, glm::X) -#define ssst swizzle(glm::X, glm::X, glm::X, glm::Y) -#define tsst swizzle(glm::Y, glm::X, glm::X, glm::Y) -#define psst swizzle(glm::Z, glm::X, glm::X, glm::Y) -#define qsst swizzle(glm::W, glm::X, glm::X, glm::Y) -#define stst swizzle(glm::X, glm::Y, glm::X, glm::Y) -#define ttst swizzle(glm::Y, glm::Y, glm::X, glm::Y) -#define ptst swizzle(glm::Z, glm::Y, glm::X, glm::Y) -#define qtst swizzle(glm::W, glm::Y, glm::X, glm::Y) -#define spst swizzle(glm::X, glm::Z, glm::X, glm::Y) -#define tpst swizzle(glm::Y, glm::Z, glm::X, glm::Y) -#define ppst swizzle(glm::Z, glm::Z, glm::X, glm::Y) -#define qpst swizzle(glm::W, glm::Z, glm::X, glm::Y) -#define sqst swizzle(glm::X, glm::W, glm::X, glm::Y) -#define tqst swizzle(glm::Y, glm::W, glm::X, glm::Y) -#define pqst swizzle(glm::Z, glm::W, glm::X, glm::Y) -#define qqst swizzle(glm::W, glm::W, glm::X, glm::Y) -#define sstt swizzle(glm::X, glm::X, glm::Y, glm::Y) -#define tstt swizzle(glm::Y, glm::X, glm::Y, glm::Y) -#define pstt swizzle(glm::Z, glm::X, glm::Y, glm::Y) -#define qstt swizzle(glm::W, glm::X, glm::Y, glm::Y) -#define sttt swizzle(glm::X, glm::Y, glm::Y, glm::Y) -#define tttt swizzle(glm::Y, glm::Y, glm::Y, glm::Y) -#define pttt swizzle(glm::Z, glm::Y, glm::Y, glm::Y) -#define qttt swizzle(glm::W, glm::Y, glm::Y, glm::Y) -#define sptt swizzle(glm::X, glm::Z, glm::Y, glm::Y) -#define tptt swizzle(glm::Y, glm::Z, glm::Y, glm::Y) -#define pptt swizzle(glm::Z, glm::Z, glm::Y, glm::Y) -#define qptt swizzle(glm::W, glm::Z, glm::Y, glm::Y) -#define sqtt swizzle(glm::X, glm::W, glm::Y, glm::Y) -#define tqtt swizzle(glm::Y, glm::W, glm::Y, glm::Y) -#define pqtt swizzle(glm::Z, glm::W, glm::Y, glm::Y) -#define qqtt swizzle(glm::W, glm::W, glm::Y, glm::Y) -#define sspt swizzle(glm::X, glm::X, glm::Z, glm::Y) -#define tspt swizzle(glm::Y, glm::X, glm::Z, glm::Y) -#define pspt swizzle(glm::Z, glm::X, glm::Z, glm::Y) -#define qspt swizzle(glm::W, glm::X, glm::Z, glm::Y) -#define stpt swizzle(glm::X, glm::Y, glm::Z, glm::Y) -#define ttpt swizzle(glm::Y, glm::Y, glm::Z, glm::Y) -#define ptpt swizzle(glm::Z, glm::Y, glm::Z, glm::Y) -#define qtpt swizzle(glm::W, glm::Y, glm::Z, glm::Y) -#define sppt swizzle(glm::X, glm::Z, glm::Z, glm::Y) -#define tppt swizzle(glm::Y, glm::Z, glm::Z, glm::Y) -#define pppt swizzle(glm::Z, glm::Z, glm::Z, glm::Y) -#define qppt swizzle(glm::W, glm::Z, glm::Z, glm::Y) -#define sqpt swizzle(glm::X, glm::W, glm::Z, glm::Y) -#define tqpt swizzle(glm::Y, glm::W, glm::Z, glm::Y) -#define pqpt swizzle(glm::Z, glm::W, glm::Z, glm::Y) -#define qqpt swizzle(glm::W, glm::W, glm::Z, glm::Y) -#define ssqt swizzle(glm::X, glm::X, glm::W, glm::Y) -#define tsqt swizzle(glm::Y, glm::X, glm::W, glm::Y) -#define psqt swizzle(glm::Z, glm::X, glm::W, glm::Y) -#define qsqt swizzle(glm::W, glm::X, glm::W, glm::Y) -#define stqt swizzle(glm::X, glm::Y, glm::W, glm::Y) -#define ttqt swizzle(glm::Y, glm::Y, glm::W, glm::Y) -#define ptqt swizzle(glm::Z, glm::Y, glm::W, glm::Y) -#define qtqt swizzle(glm::W, glm::Y, glm::W, glm::Y) -#define spqt swizzle(glm::X, glm::Z, glm::W, glm::Y) -#define tpqt swizzle(glm::Y, glm::Z, glm::W, glm::Y) -#define ppqt swizzle(glm::Z, glm::Z, glm::W, glm::Y) -#define qpqt swizzle(glm::W, glm::Z, glm::W, glm::Y) -#define sqqt swizzle(glm::X, glm::W, glm::W, glm::Y) -#define tqqt swizzle(glm::Y, glm::W, glm::W, glm::Y) -#define pqqt swizzle(glm::Z, glm::W, glm::W, glm::Y) -#define qqqt swizzle(glm::W, glm::W, glm::W, glm::Y) -#define sssp swizzle(glm::X, glm::X, glm::X, glm::Z) -#define tssp swizzle(glm::Y, glm::X, glm::X, glm::Z) -#define pssp swizzle(glm::Z, glm::X, glm::X, glm::Z) -#define qssp swizzle(glm::W, glm::X, glm::X, glm::Z) -#define stsp swizzle(glm::X, glm::Y, glm::X, glm::Z) -#define ttsp swizzle(glm::Y, glm::Y, glm::X, glm::Z) -#define ptsp swizzle(glm::Z, glm::Y, glm::X, glm::Z) -#define qtsp swizzle(glm::W, glm::Y, glm::X, glm::Z) -#define spsp swizzle(glm::X, glm::Z, glm::X, glm::Z) -#define tpsp swizzle(glm::Y, glm::Z, glm::X, glm::Z) -#define ppsp swizzle(glm::Z, glm::Z, glm::X, glm::Z) -#define qpsp swizzle(glm::W, glm::Z, glm::X, glm::Z) -#define sqsp swizzle(glm::X, glm::W, glm::X, glm::Z) -#define tqsp swizzle(glm::Y, glm::W, glm::X, glm::Z) -#define pqsp swizzle(glm::Z, glm::W, glm::X, glm::Z) -#define qqsp swizzle(glm::W, glm::W, glm::X, glm::Z) -#define sstp swizzle(glm::X, glm::X, glm::Y, glm::Z) -#define tstp swizzle(glm::Y, glm::X, glm::Y, glm::Z) -#define pstp swizzle(glm::Z, glm::X, glm::Y, glm::Z) -#define qstp swizzle(glm::W, glm::X, glm::Y, glm::Z) -#define sttp swizzle(glm::X, glm::Y, glm::Y, glm::Z) -#define tttp swizzle(glm::Y, glm::Y, glm::Y, glm::Z) -#define pttp swizzle(glm::Z, glm::Y, glm::Y, glm::Z) -#define qttp swizzle(glm::W, glm::Y, glm::Y, glm::Z) -#define sptp swizzle(glm::X, glm::Z, glm::Y, glm::Z) -#define tptp swizzle(glm::Y, glm::Z, glm::Y, glm::Z) -#define pptp swizzle(glm::Z, glm::Z, glm::Y, glm::Z) -#define qptp swizzle(glm::W, glm::Z, glm::Y, glm::Z) -#define sqtp swizzle(glm::X, glm::W, glm::Y, glm::Z) -#define tqtp swizzle(glm::Y, glm::W, glm::Y, glm::Z) -#define pqtp swizzle(glm::Z, glm::W, glm::Y, glm::Z) -#define qqtp swizzle(glm::W, glm::W, glm::Y, glm::Z) -#define sspp swizzle(glm::X, glm::X, glm::Z, glm::Z) -#define tspp swizzle(glm::Y, glm::X, glm::Z, glm::Z) -#define pspp swizzle(glm::Z, glm::X, glm::Z, glm::Z) -#define qspp swizzle(glm::W, glm::X, glm::Z, glm::Z) -#define stpp swizzle(glm::X, glm::Y, glm::Z, glm::Z) -#define ttpp swizzle(glm::Y, glm::Y, glm::Z, glm::Z) -#define ptpp swizzle(glm::Z, glm::Y, glm::Z, glm::Z) -#define qtpp swizzle(glm::W, glm::Y, glm::Z, glm::Z) -#define sppp swizzle(glm::X, glm::Z, glm::Z, glm::Z) -#define tppp swizzle(glm::Y, glm::Z, glm::Z, glm::Z) -#define pppp swizzle(glm::Z, glm::Z, glm::Z, glm::Z) -#define qppp swizzle(glm::W, glm::Z, glm::Z, glm::Z) -#define sqpp swizzle(glm::X, glm::W, glm::Z, glm::Z) -#define tqpp swizzle(glm::Y, glm::W, glm::Z, glm::Z) -#define pqpp swizzle(glm::Z, glm::W, glm::Z, glm::Z) -#define qqpp swizzle(glm::W, glm::W, glm::Z, glm::Z) -#define ssqp swizzle(glm::X, glm::X, glm::W, glm::Z) -#define tsqp swizzle(glm::Y, glm::X, glm::W, glm::Z) -#define psqp swizzle(glm::Z, glm::X, glm::W, glm::Z) -#define qsqp swizzle(glm::W, glm::X, glm::W, glm::Z) -#define stqp swizzle(glm::X, glm::Y, glm::W, glm::Z) -#define ttqp swizzle(glm::Y, glm::Y, glm::W, glm::Z) -#define ptqp swizzle(glm::Z, glm::Y, glm::W, glm::Z) -#define qtqp swizzle(glm::W, glm::Y, glm::W, glm::Z) -#define spqp swizzle(glm::X, glm::Z, glm::W, glm::Z) -#define tpqp swizzle(glm::Y, glm::Z, glm::W, glm::Z) -#define ppqp swizzle(glm::Z, glm::Z, glm::W, glm::Z) -#define qpqp swizzle(glm::W, glm::Z, glm::W, glm::Z) -#define sqqp swizzle(glm::X, glm::W, glm::W, glm::Z) -#define tqqp swizzle(glm::Y, glm::W, glm::W, glm::Z) -#define pqqp swizzle(glm::Z, glm::W, glm::W, glm::Z) -#define qqqp swizzle(glm::W, glm::W, glm::W, glm::Z) -#define sssq swizzle(glm::X, glm::X, glm::X, glm::W) -#define tssq swizzle(glm::Y, glm::X, glm::X, glm::W) -#define pssq swizzle(glm::Z, glm::X, glm::X, glm::W) -#define qssq swizzle(glm::W, glm::X, glm::X, glm::W) -#define stsq swizzle(glm::X, glm::Y, glm::X, glm::W) -#define ttsq swizzle(glm::Y, glm::Y, glm::X, glm::W) -#define ptsq swizzle(glm::Z, glm::Y, glm::X, glm::W) -#define qtsq swizzle(glm::W, glm::Y, glm::X, glm::W) -#define spsq swizzle(glm::X, glm::Z, glm::X, glm::W) -#define tpsq swizzle(glm::Y, glm::Z, glm::X, glm::W) -#define ppsq swizzle(glm::Z, glm::Z, glm::X, glm::W) -#define qpsq swizzle(glm::W, glm::Z, glm::X, glm::W) -#define sqsq swizzle(glm::X, glm::W, glm::X, glm::W) -#define tqsq swizzle(glm::Y, glm::W, glm::X, glm::W) -#define pqsq swizzle(glm::Z, glm::W, glm::X, glm::W) -#define qqsq swizzle(glm::W, glm::W, glm::X, glm::W) -#define sstq swizzle(glm::X, glm::X, glm::Y, glm::W) -#define tstq swizzle(glm::Y, glm::X, glm::Y, glm::W) -#define pstq swizzle(glm::Z, glm::X, glm::Y, glm::W) -#define qstq swizzle(glm::W, glm::X, glm::Y, glm::W) -#define sttq swizzle(glm::X, glm::Y, glm::Y, glm::W) -#define tttq swizzle(glm::Y, glm::Y, glm::Y, glm::W) -#define pttq swizzle(glm::Z, glm::Y, glm::Y, glm::W) -#define qttq swizzle(glm::W, glm::Y, glm::Y, glm::W) -#define sptq swizzle(glm::X, glm::Z, glm::Y, glm::W) -#define tptq swizzle(glm::Y, glm::Z, glm::Y, glm::W) -#define pptq swizzle(glm::Z, glm::Z, glm::Y, glm::W) -#define qptq swizzle(glm::W, glm::Z, glm::Y, glm::W) -#define sqtq swizzle(glm::X, glm::W, glm::Y, glm::W) -#define tqtq swizzle(glm::Y, glm::W, glm::Y, glm::W) -#define pqtq swizzle(glm::Z, glm::W, glm::Y, glm::W) -#define qqtq swizzle(glm::W, glm::W, glm::Y, glm::W) -#define sspq swizzle(glm::X, glm::X, glm::Z, glm::W) -#define tspq swizzle(glm::Y, glm::X, glm::Z, glm::W) -#define pspq swizzle(glm::Z, glm::X, glm::Z, glm::W) -#define qspq swizzle(glm::W, glm::X, glm::Z, glm::W) -#define stpq swizzle(glm::X, glm::Y, glm::Z, glm::W) -#define ttpq swizzle(glm::Y, glm::Y, glm::Z, glm::W) -#define ptpq swizzle(glm::Z, glm::Y, glm::Z, glm::W) -#define qtpq swizzle(glm::W, glm::Y, glm::Z, glm::W) -#define sppq swizzle(glm::X, glm::Z, glm::Z, glm::W) -#define tppq swizzle(glm::Y, glm::Z, glm::Z, glm::W) -#define pppq swizzle(glm::Z, glm::Z, glm::Z, glm::W) -#define qppq swizzle(glm::W, glm::Z, glm::Z, glm::W) -#define sqpq swizzle(glm::X, glm::W, glm::Z, glm::W) -#define tqpq swizzle(glm::Y, glm::W, glm::Z, glm::W) -#define pqpq swizzle(glm::Z, glm::W, glm::Z, glm::W) -#define qqpq swizzle(glm::W, glm::W, glm::Z, glm::W) -#define ssqq swizzle(glm::X, glm::X, glm::W, glm::W) -#define tsqq swizzle(glm::Y, glm::X, glm::W, glm::W) -#define psqq swizzle(glm::Z, glm::X, glm::W, glm::W) -#define qsqq swizzle(glm::W, glm::X, glm::W, glm::W) -#define stqq swizzle(glm::X, glm::Y, glm::W, glm::W) -#define ttqq swizzle(glm::Y, glm::Y, glm::W, glm::W) -#define ptqq swizzle(glm::Z, glm::Y, glm::W, glm::W) -#define qtqq swizzle(glm::W, glm::Y, glm::W, glm::W) -#define spqq swizzle(glm::X, glm::Z, glm::W, glm::W) -#define tpqq swizzle(glm::Y, glm::Z, glm::W, glm::W) -#define ppqq swizzle(glm::Z, glm::Z, glm::W, glm::W) -#define qpqq swizzle(glm::W, glm::Z, glm::W, glm::W) -#define sqqq swizzle(glm::X, glm::W, glm::W, glm::W) -#define tqqq swizzle(glm::Y, glm::W, glm::W, glm::W) -#define pqqq swizzle(glm::Z, glm::W, glm::W, glm::W) -#define qqqq swizzle(glm::W, glm::W, glm::W, glm::W) - -#endif//defined(GLM_SWIZZLE) && (GLM_SWIZZLE & GLM_SWIZZLE_STPQ) - -#endif//glm_core_swizzle diff --git a/ThirdParty/include/glm/core/_swizzle.inl b/ThirdParty/include/glm/core/_swizzle.inl deleted file mode 100644 index dda8b2cae6bd85adee5ddeedede72b49c91521f2..0000000000000000000000000000000000000000 --- a/ThirdParty/include/glm/core/_swizzle.inl +++ /dev/null @@ -1,20 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2006-04-27 -// Updated : 2006-04-27 -// Licence : This source is under MIT License -// File : _swizzle.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#ifndef __swizzle_inl__ -#define __swizzle_inl__ - -#include "./_swizzle.h" - -namespace glm -{ - -} - -#endif//__swizzle_inl__ diff --git a/ThirdParty/include/glm/core/dummy.cpp b/ThirdParty/include/glm/core/dummy.cpp deleted file mode 100644 index 227a99216b8b817781cdc97a0dd54682c1e2cf48..0000000000000000000000000000000000000000 --- a/ThirdParty/include/glm/core/dummy.cpp +++ /dev/null @@ -1,17 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2011-01-19 -// Updated : 2011-01-19 -// Licence : This source is under MIT License -// File : glm/setup.hpp -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Dummy file, GLM is a header only library - -#include "../glm.hpp" -#include "../ext.hpp" - -int main() -{ - -} diff --git a/ThirdParty/include/glm/core/func_common.hpp b/ThirdParty/include/glm/core/func_common.hpp deleted file mode 100644 index a0a4d08fd5083b6bfa916de847ab2875d5393ed0..0000000000000000000000000000000000000000 --- a/ThirdParty/include/glm/core/func_common.hpp +++ /dev/null @@ -1,274 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2008-03-08 -// Updated : 2010-01-26 -// Licence : This source is under MIT License -// File : glm/core/func_common.hpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_func_common -#define glm_core_func_common - -namespace glm -{ - namespace test{ - void main_core_func_common(); - }//namespace test - - namespace core{ - namespace function{ - //! Define common functions from Section 8.3 of GLSL 1.30.8 specification. Included in glm namespace. - namespace common{ - - //! Returns x if x >= 0; otherwise, it returns -x. - //! (From GLSL 1.30.08 specification, section 8.3) - template - genFIType abs(genFIType const & x); - - //! Returns 1.0 if x > 0, 0.0 if x = 0, or -1.0 if x < 0. - //! (From GLSL 1.30.08 specification, section 8.3) - template - genFIType sign(genFIType const & x); - - //! Returns a value equal to the nearest integer that is less then or equal to x. - //! (From GLSL 1.30.08 specification, section 8.3) - template - genType floor(genType const & x); - - //! Returns a value equal to the nearest integer to x - //! whose absolute value is not larger than the absolute value of x. - //! (From GLSL 1.30.08 specification, section 8.3) - template - genType trunc(genType const & x); - - //! Returns a value equal to the nearest integer to x. - //! The fraction 0.5 will round in a direction chosen by the - //! implementation, presumably the direction that is fastest. - //! This includes the possibility that round(x) returns the - //! same value as roundEven(x) for all values of x. - //! (From GLSL 1.30.08 specification, section 8.3) - template - genType round(genType const & x); - - //! Returns a value equal to the nearest integer to x. - //! A fractional part of 0.5 will round toward the nearest even - //! integer. (Both 3.5 and 4.5 for x will return 4.0.) - //! (From GLSL 1.30.08 specification, section 8.3) - template - genType roundEven(genType const & x); - - //! Returns a value equal to the nearest integer - //! that is greater than or equal to x. - //! (From GLSL 1.30.08 specification, section 8.3) - template - genType ceil(genType const & x); - - //! Return x - floor(x). - //! (From GLSL 1.30.08 specification, section 8.3) - template - genType fract(genType const & x); - - //! Modulus. Returns x - y * floor(x / y) - //! for each component in x using the floating point value y. - //! (From GLSL 1.30.08 specification, section 8.3) - template - genType mod( - genType const & x, - genType const & y); - - //! Modulus. Returns x - y * floor(x / y) - //! for each component in x using the floating point value y. - //! (From GLSL 1.30.08 specification, section 8.3) - template - genType mod( - genType const & x, - typename genType::value_type const & y); - - //! Returns the fractional part of x and sets i to the integer - //! part (as a whole number floating point value). Both the - //! return value and the output parameter will have the same - //! sign as x. - //! (From GLSL 1.30.08 specification, section 8.3) - template - genType modf( - genType const & x, - genType & i); - - //! Returns y if y < x; otherwise, it returns x. - //! (From GLSL 1.30.08 specification, section 8.3) - template - genType min( - genType const & x, - genType const & y); - - template - genType min( - genType const & x, - typename genType::value_type const & y); - - //! Returns y if x < y; otherwise, it returns x. - //! (From GLSL 1.30.08 specification, section 8.3) - template - genType max( - genType const & x, - genType const & y); - - template - genType max( - genType const & x, - typename genType::value_type const & y); - - //! Returns min(max(x, minVal), maxVal) for each component in x - //! using the floating-point values minVal and maxVal. - //! (From GLSL 1.30.08 specification, section 8.3) - template - genType clamp( - genType const & x, - genType const & minVal, - genType const & maxVal); - - template - genType clamp( - genType const & x, - typename genType::value_type const & minVal, - typename genType::value_type const & maxVal); - - //! \return If genTypeU is a floating scalar or vector: - //! Returns x * (1.0 - a) + y * a, i.e., the linear blend of - //! x and y using the floating-point value a. - //! The value for a is not restricted to the range [0, 1]. - //! - //! \return If genTypeU is a boolean scalar or vector: - //! Selects which vector each returned component comes - //! from. For a component of a that is false, the - //! corresponding component of x is returned. For a - //! component of a that is true, the corresponding - //! component of y is returned. Components of x and y that - //! are not selected are allowed to be invalid floating point - //! values and will have no effect on the results. Thus, this - //! provides different functionality than - //! genType mix(genType x, genType y, genType(a)) - //! where a is a Boolean vector. - //! - //! From GLSL 1.30.08 specification, section 8.3 - //! - //! \param[in] x Floating point scalar or vector. - //! \param[in] y Floating point scalar or vector. - //! \param[in] a Floating point or boolean scalar or vector. - //! - // \todo Test when 'a' is a boolean. - template - genTypeT mix(genTypeT const & x, genTypeT const & y, genTypeU const & a); - - //! Returns 0.0 if x < edge, otherwise it returns 1.0. - //! (From GLSL 1.30.08 specification, section 8.3) - template - genType step( - genType const & edge, - genType const & x); - - template - genType step( - typename genType::value_type const & edge, - genType const & x); - - //! Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and - //! performs smooth Hermite interpolation between 0 and 1 - //! when edge0 < x < edge1. This is useful in cases where - //! you would want a threshold function with a smooth - //! transition. This is equivalent to: - //! genType t; - //! t = clamp ((x – edge0) / (edge1 – edge0), 0, 1); - //! return t * t * (3 – 2 * t); - //! Results are undefined if edge0 >= edge1. - //! (From GLSL 1.30.08 specification, section 8.3) - template - genType smoothstep( - genType const & edge0, - genType const & edge1, - genType const & x); - - template - genType smoothstep( - typename genType::value_type const & edge0, - typename genType::value_type const & edge1, - genType const & x); - - //! Returns true if x holds a NaN (not a number) - //! representation in the underlying implementation's set of - //! floating point representations. Returns false otherwise, - //! including for implementations with no NaN - //! representations. - //! (From GLSL 1.30.08 specification, section 8.3) - template - typename genType::bool_type isnan(genType const & x); - - //! Returns true if x holds a positive infinity or negative - //! infinity representation in the underlying implementation's - //! set of floating point representations. Returns false - //! otherwise, including for implementations with no infinity - //! representations. - //! (From GLSL 1.30.08 specification, section 8.3) - template - typename genType::bool_type isinf(genType const & x); - - //! Returns a signed or unsigned integer value representing - //! the encoding of a floating-point value. The floatingpoint - //! value's bit-level representation is preserved. - //! (From GLSL 4.00.08 specification, section 8.3) - template - genIType floatBitsToInt(genType const & value); - - //! Returns a signed or unsigned integer value representing - //! the encoding of a floating-point value. The floatingpoint - //! value's bit-level representation is preserved. - //! (From GLSL 4.00.08 specification, section 8.3) - template - genUType floatBitsToInt(genType const & value); - - //! Returns a floating-point value corresponding to a signed - //! or unsigned integer encoding of a floating-point value. - //! If an inf or NaN is passed in, it will not signal, and the - //! resulting floating point value is unspecified. Otherwise, - //! the bit-level representation is preserved. - //! (From GLSL 4.00.08 specification, section 8.3) - template - genType intBitsToFloat(genIUType const & value); - - //! Computes and returns a * b + c. - //! (From GLSL 4.00.08 specification, section 8.3) - template - genType fma(genType const & a, genType const & b, genType const & c); - - //! Splits x into a floating-point significand in the range - //! [0.5, 1.0) and an integral exponent of two, such that: - //! x = significand * exp(2, exponent) - //! The significand is returned by the function and the - //! exponent is returned in the parameter exp. For a - //! floating-point value of zero, the significant and exponent - //! are both zero. For a floating-point value that is an - //! infinity or is not a number, the results are undefined. - //! (From GLSL 4.00.08 specification, section 8.3) - template - genType frexp(genType const & x, genIType & exp); - - //! Builds a floating-point number from x and the - //! corresponding integral exponent of two in exp, returning: - //! significand * exp(2, exponent) - //! If this product is too large to be represented in the - //! floating-point type, the result is undefined. - //! (From GLSL 4.00.08 specification, section 8.3) - template - genType ldexp(genType const & x, genIType const & exp); - - }//namespace common - }//namespace function - }//namespace core - - using namespace core::function::common; -}//namespace glm - -#include "func_common.inl" - -#endif//glm_core_func_common diff --git a/ThirdParty/include/glm/core/func_common.inl b/ThirdParty/include/glm/core/func_common.inl deleted file mode 100644 index 7038be31814cefb356f4d5130a00eb9503a48b82..0000000000000000000000000000000000000000 --- a/ThirdParty/include/glm/core/func_common.inl +++ /dev/null @@ -1,1542 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2008-08-03 -// Updated : 2010-01-26 -// Licence : This source is under MIT License -// File : glm/core/func_common.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - namespace detail - { - template - struct Abs_ - { - }; - - template - struct Abs_ - { - static genFIType get(genFIType const & x) - { - GLM_STATIC_ASSERT( - detail::type::is_float || - detail::type::is_int); - return x >= genFIType(0) ? x : -x; - } - }; - - template - struct Abs_ - { - static genFIType get(genFIType const & x) - { - GLM_STATIC_ASSERT( - detail::type::is_uint); - - return x; - } - }; - }//namespace detail - - namespace core{ - namespace function{ - namespace common{ - - // abs - template - inline genFIType abs( - genFIType const & x) - { - return detail::Abs_::is_signed>::get(x); - } - - //template - //inline detail::tvec1 abs( - // detail::tvec1 const & v) - //{ - // return detail::tvec1( - // abs(v.x)); - //} - - template - inline detail::tvec2 abs( - detail::tvec2 const & v) - { - return detail::tvec2( - abs(v.x), - abs(v.y)); - } - - template - inline detail::tvec3 abs( - detail::tvec3 const & v) - { - return detail::tvec3( - abs(v.x), - abs(v.y), - abs(v.z)); - } - - template - inline detail::tvec4 abs( - detail::tvec4 const & v) - { - return detail::tvec4( - abs(v.x), - abs(v.y), - abs(v.z), - abs(v.w)); - } - - // sign - - //Try something like based on x >> 31 to get the sign bit - template - inline genFIType sign( - genFIType const & x) - { - GLM_STATIC_ASSERT( - detail::type::is_float || - detail::type::is_int); - - genFIType result; - if(x > genFIType(0)) - result = genFIType(1); - else if(x < genFIType(0)) - result = genFIType(-1); - else - result = genFIType(0); - return result; - } - - template - inline detail::tvec2 sign( - detail::tvec2 const & x) - { - return detail::tvec2( - sign(x.x), - sign(x.y)); - } - - template - inline detail::tvec3 sign( - detail::tvec3 const & x) - { - return detail::tvec3( - sign(x.x), - sign(x.y), - sign(x.z)); - } - - template - inline detail::tvec4 sign( - detail::tvec4 const & x) - { - return detail::tvec4( - sign(x.x), - sign(x.y), - sign(x.z), - sign(x.w)); - } - - // floor - template <> - inline detail::thalf floor(detail::thalf const& x) - { - return detail::thalf(::std::floor(float(x))); - } - - template - inline genType floor(genType const& x) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return ::std::floor(x); - } - - template - inline detail::tvec2 floor(detail::tvec2 const& x) - { - return detail::tvec2( - floor(x.x), - floor(x.y)); - } - - template - inline detail::tvec3 floor(detail::tvec3 const& x) - { - return detail::tvec3( - floor(x.x), - floor(x.y), - floor(x.z)); - } - - template - inline detail::tvec4 floor(detail::tvec4 const& x) - { - return detail::tvec4( - floor(x.x), - floor(x.y), - floor(x.z), - floor(x.w)); - } - - // trunc - template - inline genType trunc(genType const & x) - { - GLM_STATIC_ASSERT(detail::type::is_float); - return floor(abs(x)); - } - - template - inline detail::tvec2 trunc(detail::tvec2 const & x) - { - return detail::tvec2( - trunc(x.x), - trunc(x.y)); - } - - template - inline detail::tvec3 trunc(detail::tvec3 const & x) - { - return detail::tvec3( - trunc(x.x), - trunc(x.y), - trunc(x.z)); - } - - template - inline detail::tvec4 trunc(detail::tvec4 const & x) - { - return detail::tvec4( - trunc(x.x), - trunc(x.y), - trunc(x.z), - trunc(x.w)); - } - - // round - template - inline genType round(genType const& x) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return genType(int(x + genType(0.5))); - } - - template - inline detail::tvec2 round(detail::tvec2 const& x) - { - return detail::tvec2( - round(x.x), - round(x.y)); - } - - template - inline detail::tvec3 round(detail::tvec3 const& x) - { - return detail::tvec3( - round(x.x), - round(x.y), - round(x.z)); - } - - template - inline detail::tvec4 round(detail::tvec4 const& x) - { - return detail::tvec4( - round(x.x), - round(x.y), - round(x.z), - round(x.w)); - } - - // roundEven - template - inline genType roundEven(genType const& x) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return genType(int(x + genType(int(x) % 2))); - } - - template - inline detail::tvec2 roundEven(detail::tvec2 const& x) - { - return detail::tvec2( - roundEven(x.x), - roundEven(x.y)); - } - - template - inline detail::tvec3 roundEven(detail::tvec3 const& x) - { - return detail::tvec3( - roundEven(x.x), - roundEven(x.y), - roundEven(x.z)); - } - - template - inline detail::tvec4 roundEven(detail::tvec4 const& x) - { - return detail::tvec4( - roundEven(x.x), - roundEven(x.y), - roundEven(x.z), - roundEven(x.w)); - } - - // ceil - template - inline genType ceil(genType const & x) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return ::std::ceil(x); - } - - template - inline detail::tvec2 ceil(detail::tvec2 const & x) - { - return detail::tvec2( - ceil(x.x), - ceil(x.y)); - } - - template - inline detail::tvec3 ceil(detail::tvec3 const & x) - { - return detail::tvec3( - ceil(x.x), - ceil(x.y), - ceil(x.z)); - } - - template - inline detail::tvec4 ceil(detail::tvec4 const & x) - { - return detail::tvec4( - ceil(x.x), - ceil(x.y), - ceil(x.z), - ceil(x.w)); - } - - // fract - template - inline genType fract - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return x - ::std::floor(x); - } - - template - inline detail::tvec2 fract - ( - detail::tvec2 const & x - ) - { - return detail::tvec2( - fract(x.x), - fract(x.y)); - } - - template - inline detail::tvec3 fract - ( - detail::tvec3 const & x - ) - { - return detail::tvec3( - fract(x.x), - fract(x.y), - fract(x.z)); - } - - template - inline detail::tvec4 fract - ( - detail::tvec4 const & x - ) - { - return detail::tvec4( - fract(x.x), - fract(x.y), - fract(x.z), - fract(x.w)); - } - - // mod - template - inline genType mod - ( - genType const & x, - genType const & y - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return x - y * floor(x / y); - } - - template - inline detail::tvec2 mod - ( - detail::tvec2 const & x, - typename detail::tvec2::value_type const & y - ) - { - return detail::tvec2( - mod(x.x, y), - mod(x.y, y)); - } - - template - inline detail::tvec3 mod - ( - detail::tvec3 const & x, - typename detail::tvec3::value_type const & y - ) - { - return detail::tvec3( - mod(x.x, y), - mod(x.y, y), - mod(x.z, y)); - } - - template - inline detail::tvec4 mod - ( - detail::tvec4 const & x, - typename detail::tvec4::value_type const & y - ) - { - return detail::tvec4( - mod(x.x, y), - mod(x.y, y), - mod(x.z, y), - mod(x.w, y)); - } - - template - inline detail::tvec2 mod - ( - detail::tvec2 const & x, - detail::tvec2 const & y - ) - { - return detail::tvec2( - mod(x.x, y.x), - mod(x.y, y.y)); - } - - template - inline detail::tvec3 mod - ( - detail::tvec3 const & x, - detail::tvec3 const & y - ) - { - return detail::tvec3( - mod(x.x, y.x), - mod(x.y, y.y), - mod(x.z, y.z)); - } - - template - inline detail::tvec4 mod - ( - detail::tvec4 const & x, - detail::tvec4 const & y - ) - { - return detail::tvec4( - mod(x.x, y.x), - mod(x.y, y.y), - mod(x.z, y.z), - mod(x.w, y.w)); - } - - // modf - template - inline genType modf - ( - genType const & x, - genType & i - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - i = glm::floor(x); - - return x - i; - } - - template - inline detail::tvec2 modf - ( - detail::tvec2 const & x, - detail::tvec2 const & y - ) - { - return detail::tvec2( - modf(x.x, y.x), - modf(x.y, y.y)); - } - - template - inline detail::tvec3 modf - ( - detail::tvec3 const & x, - detail::tvec3 const & y - ) - { - return detail::tvec3( - modf(x.x, y.x), - modf(x.y, y.y), - modf(x.z, y.z)); - } - - template - inline detail::tvec4 modf - ( - detail::tvec4 const & x, - detail::tvec4 const & y - ) - { - return detail::tvec4( - modf(x.x, y.x), - modf(x.y, y.y), - modf(x.z, y.z), - modf(x.w, y.w)); - } - - //// Only valid if (INT_MIN <= x-y <= INT_MAX) - //// min(x,y) - //r = y + ((x - y) & ((x - y) >> (sizeof(int) * - //CHAR_BIT – 1))); - //// max(x,y) - //r = x - ((x - y) & ((x - y) >> (sizeof(int) * - //CHAR_BIT - 1))); - - // min - template - inline genType min - ( - genType const & x, - genType const & y - ) - { - GLM_STATIC_ASSERT( - detail::type::is_float || - detail::type::is_int || - detail::type::is_uint); - - return x < y ? x : y; - } - - template - inline detail::tvec2 min - ( - detail::tvec2 const & x, - typename detail::tvec2::value_type const & y - ) - { - return detail::tvec2( - min(x.x, y), - min(x.y, y)); - } - - template - inline detail::tvec3 min - ( - detail::tvec3 const & x, - typename detail::tvec3::value_type const & y - ) - { - return detail::tvec3( - min(x.x, y), - min(x.y, y), - min(x.z, y)); - } - - template - inline detail::tvec4 min - ( - detail::tvec4 const & x, - typename detail::tvec4::value_type const & y - ) - { - return detail::tvec4( - min(x.x, y), - min(x.y, y), - min(x.z, y), - min(x.w, y)); - } - - template - inline detail::tvec2 min - ( - detail::tvec2 const & x, - detail::tvec2 const & y - ) - { - return detail::tvec2( - min(x.x, y.x), - min(x.y, y.y)); - } - - template - inline detail::tvec3 min - ( - detail::tvec3 const & x, - detail::tvec3 const & y - ) - { - return detail::tvec3( - min(x.x, y.x), - min(x.y, y.y), - min(x.z, y.z)); - } - - template - inline detail::tvec4 min - ( - detail::tvec4 const & x, - detail::tvec4 const & y - ) - { - return detail::tvec4( - min(x.x, y.x), - min(x.y, y.y), - min(x.z, y.z), - min(x.w, y.w)); - } - - // max - template - inline genType max - ( - genType const & x, - genType const & y - ) - { - GLM_STATIC_ASSERT( - detail::type::is_float || - detail::type::is_int || - detail::type::is_uint); - - return x > y ? x : y; - } - - template - inline detail::tvec2 max - ( - detail::tvec2 const & x, - typename detail::tvec2::value_type y - ) - { - return detail::tvec2( - max(x.x, y), - max(x.y, y)); - } - - template - inline detail::tvec3 max - ( - detail::tvec3 const & x, - typename detail::tvec3::value_type y - ) - { - return detail::tvec3( - max(x.x, y), - max(x.y, y), - max(x.z, y)); - } - - template - inline detail::tvec4 max - ( - detail::tvec4 const & x, - typename detail::tvec4::value_type y - ) - { - return detail::tvec4( - max(x.x, y), - max(x.y, y), - max(x.z, y), - max(x.w, y)); - } - - template - inline detail::tvec2 max - ( - detail::tvec2 const & x, - detail::tvec2 const & y - ) - { - return detail::tvec2( - max(x.x, y.x), - max(x.y, y.y)); - } - - template - inline detail::tvec3 max - ( - detail::tvec3 const & x, - detail::tvec3 const & y - ) - { - return detail::tvec3( - max(x.x, y.x), - max(x.y, y.y), - max(x.z, y.z)); - } - - template - inline detail::tvec4 max - ( - detail::tvec4 const & x, - detail::tvec4 const & y) - { - return detail::tvec4( - max(x.x, y.x), - max(x.y, y.y), - max(x.z, y.z), - max(x.w, y.w)); - } - - // clamp - template - inline valType clamp - ( - valType const & x, - valType const & minVal, - valType const & maxVal - ) - { - GLM_STATIC_ASSERT( - detail::type::is_float || - detail::type::is_int || - detail::type::is_uint); - - if(x >= maxVal) return maxVal; - if(x <= minVal) return minVal; - return x; - } - - template - inline detail::tvec2 clamp - ( - detail::tvec2 const & x, - typename detail::tvec2::value_type const & minVal, - typename detail::tvec2::value_type const & maxVal - ) - { - return detail::tvec2( - clamp(x.x, minVal, maxVal), - clamp(x.y, minVal, maxVal)); - } - - template - inline detail::tvec3 clamp - ( - detail::tvec3 const & x, - typename detail::tvec3::value_type const & minVal, - typename detail::tvec3::value_type const & maxVal - ) - { - return detail::tvec3( - clamp(x.x, minVal, maxVal), - clamp(x.y, minVal, maxVal), - clamp(x.z, minVal, maxVal)); - } - - template - inline detail::tvec4 clamp - ( - detail::tvec4 const & x, - typename detail::tvec4::value_type const & minVal, - typename detail::tvec4::value_type const & maxVal - ) - { - return detail::tvec4( - clamp(x.x, minVal, maxVal), - clamp(x.y, minVal, maxVal), - clamp(x.z, minVal, maxVal), - clamp(x.w, minVal, maxVal)); - } - - template - inline detail::tvec2 clamp - ( - detail::tvec2 const & x, - detail::tvec2 const & minVal, - detail::tvec2 const & maxVal - ) - { - return detail::tvec2( - clamp(x.x, minVal.x, maxVal.x), - clamp(x.y, minVal.y, maxVal.y)); - } - - template - inline detail::tvec3 clamp - ( - detail::tvec3 const & x, - detail::tvec3 const & minVal, - detail::tvec3 const & maxVal - ) - { - return detail::tvec3( - clamp(x.x, minVal.x, maxVal.x), - clamp(x.y, minVal.y, maxVal.y), - clamp(x.z, minVal.z, maxVal.z)); - } - - template - inline detail::tvec4 clamp - ( - detail::tvec4 const & x, - detail::tvec4 const & minVal, - detail::tvec4 const & maxVal - ) - { - return detail::tvec4( - clamp(x.x, minVal.x, maxVal.x), - clamp(x.y, minVal.y, maxVal.y), - clamp(x.z, minVal.z, maxVal.z), - clamp(x.w, minVal.w, maxVal.w)); - } - - // mix - template - inline genTypeT mix - ( - genTypeT const & x, - genTypeT const & y, - genTypeU const & a - ) - { - // It could be a vector too - //GLM_STATIC_ASSERT( - // detail::type::is_float && - // detail::type::is_float); - - //return x + a * (y - x); - return genTypeT(genTypeU(x) + a * genTypeU(y - x)); - } - - template - inline detail::tvec2 mix - ( - detail::tvec2 const & x, - detail::tvec2 const & y, - valTypeB const & a - ) - { - return detail::tvec2( - detail::tvec2(x) + a * detail::tvec2(y - x)); - } - - template - inline detail::tvec3 mix - ( - detail::tvec3 const & x, - detail::tvec3 const & y, - valTypeB const & a - ) - { - return detail::tvec3( - detail::tvec3(x) + a * detail::tvec3(y - x)); - } - - template - inline detail::tvec4 mix - ( - detail::tvec4 const & x, - detail::tvec4 const & y, - valTypeB const & a - ) - { - return detail::tvec4( - detail::tvec4(x) + a * detail::tvec4(y - x)); - } - - template - inline detail::tvec2 mix - ( - detail::tvec2 const & x, - detail::tvec2 const & y, - detail::tvec2 const & a - ) - { - return detail::tvec2( - detail::tvec2(x) + a * detail::tvec2(y - x)); - } - - template - inline detail::tvec3 mix - ( - detail::tvec3 const & x, - detail::tvec3 const & y, - detail::tvec3 const & a - ) - { - return detail::tvec3( - detail::tvec3(x) + a * detail::tvec3(y - x)); - } - - template - inline detail::tvec4 mix - ( - detail::tvec4 const & x, - detail::tvec4 const & y, - detail::tvec4 const & a - ) - { - return detail::tvec4( - detail::tvec4(x) + a * detail::tvec4(y - x)); - } - - //template - //inline genTypeT mix - //( - // genTypeT const & x, - // genTypeT const & y, - // float const & a - //) - //{ - // // It could be a vector too - // //GLM_STATIC_ASSERT( - // // detail::type::is_float && - // // detail::type::is_float); - - // return x + a * (y - x); - //} - - template - inline genType mix - ( - genType const & x, - genType const & y, - bool a - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return a ? x : y; - } - - template - inline detail::tvec2 mix - ( - detail::tvec2 const & x, - detail::tvec2 const & y, - typename detail::tvec2::bool_type a - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - detail::tvec2 result; - for - ( - typename detail::tvec2::size_type i = 0; - i < detail::tvec2::value_size(); - ++i - ) - { - result[i] = a[i] ? x[i] : y[i]; - } - return result; - } - - template - inline detail::tvec3 mix - ( - detail::tvec3 const & x, - detail::tvec3 const & y, - typename detail::tvec3::bool_type a - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - detail::tvec3 result; - for - ( - typename detail::tvec3::size_type i = 0; - i < detail::tvec3::value_size(); - ++i - ) - { - result[i] = a[i] ? x[i] : y[i]; - } - return result; - } - - template - inline detail::tvec4 mix - ( - detail::tvec4 const & x, - detail::tvec4 const & y, - typename detail::tvec4::bool_type a - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - detail::tvec4 result; - for - ( - typename detail::tvec4::size_type i = 0; - i < detail::tvec4::value_size(); - ++i - ) - { - result[i] = a[i] ? x[i] : y[i]; - } - return result; - } - - // step - template - inline genType step - ( - genType const & edge, - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return x <= edge ? genType(0) : genType(1); - } - - template - inline detail::tvec2 step - ( - typename detail::tvec2::value_type const & edge, - detail::tvec2 const & x - ) - { - return detail::tvec2( - x.x <= edge ? T(0) : T(1), - x.y <= edge ? T(0) : T(1)); - } - - template - inline detail::tvec3 step - ( - typename detail::tvec3::value_type const & edge, - detail::tvec3 const & x - ) - { - return detail::tvec3( - x.x <= edge ? T(0) : T(1), - x.y <= edge ? T(0) : T(1), - x.z <= edge ? T(0) : T(1)); - } - - template - inline detail::tvec4 step - ( - typename detail::tvec4::value_type const & edge, - detail::tvec4 const & x - ) - { - return detail::tvec4( - x.x <= edge ? T(0) : T(1), - x.y <= edge ? T(0) : T(1), - x.z <= edge ? T(0) : T(1), - x.w <= edge ? T(0) : T(1)); - } - - template - inline detail::tvec2 step - ( - detail::tvec2 const & edge, - detail::tvec2 const & x - ) - { - return detail::tvec2( - x.x <= edge.x ? T(0) : T(1), - x.y <= edge.y ? T(0) : T(1)); - } - - template - inline detail::tvec3 step - ( - detail::tvec3 const & edge, - detail::tvec3 const & x - ) - { - return detail::tvec3( - x.x <= edge.x ? T(0) : T(1), - x.y <= edge.y ? T(0) : T(1), - x.z <= edge.z ? T(0) : T(1)); - } - - template - inline detail::tvec4 step - ( - detail::tvec4 const & edge, - detail::tvec4 const & x - ) - { - return detail::tvec4( - x.x <= edge.x ? T(0) : T(1), - x.y <= edge.y ? T(0) : T(1), - x.z <= edge.z ? T(0) : T(1), - x.w <= edge.w ? T(0) : T(1)); - } - - // smoothstep - template - inline genType smoothstep - ( - genType const & edge0, - genType const & edge1, - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - genType tmp = clamp((x - edge0) / (edge1 - edge0), genType(0), genType(1)); - return tmp * tmp * (genType(3) - genType(2) * tmp); - } - - template - inline detail::tvec2 smoothstep - ( - typename detail::tvec2::value_type const & edge0, - typename detail::tvec2::value_type const & edge1, - detail::tvec2 const & x - ) - { - return detail::tvec2( - smoothstep(edge0, edge1, x.x), - smoothstep(edge0, edge1, x.y)); - } - - template - inline detail::tvec3 smoothstep - ( - typename detail::tvec3::value_type const & edge0, - typename detail::tvec3::value_type const & edge1, - detail::tvec3 const & x - ) - { - return detail::tvec3( - smoothstep(edge0, edge1, x.x), - smoothstep(edge0, edge1, x.y), - smoothstep(edge0, edge1, x.z)); - } - - template - inline detail::tvec4 smoothstep - ( - typename detail::tvec4::value_type const & edge0, - typename detail::tvec4::value_type const & edge1, - detail::tvec4 const & x - ) - { - return detail::tvec4( - smoothstep(edge0, edge1, x.x), - smoothstep(edge0, edge1, x.y), - smoothstep(edge0, edge1, x.z), - smoothstep(edge0, edge1, x.w)); - } - - template - inline detail::tvec2 smoothstep - ( - detail::tvec2 const & edge0, - detail::tvec2 const & edge1, - detail::tvec2 const & x - ) - { - return detail::tvec2( - smoothstep(edge0.x, edge1.x, x.x), - smoothstep(edge0.y, edge1.y, x.y)); - } - - template - inline detail::tvec3 smoothstep - ( - detail::tvec3 const & edge0, - detail::tvec3 const & edge1, - detail::tvec3 const & x - ) - { - return detail::tvec3( - smoothstep(edge0.x, edge1.x, x.x), - smoothstep(edge0.y, edge1.y, x.y), - smoothstep(edge0.z, edge1.z, x.z)); - } - - template - inline detail::tvec4 smoothstep - ( - detail::tvec4 const & edge0, - detail::tvec4 const & edge1, - detail::tvec4 const & x - ) - { - return detail::tvec4( - smoothstep(edge0.x, edge1.x, x.x), - smoothstep(edge0.y, edge1.y, x.y), - smoothstep(edge0.z, edge1.z, x.z), - smoothstep(edge0.w, edge1.w, x.w)); - } - - template - inline typename genType::bool_type isnan - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - -#if(defined(GLM_COMPILER) && GLM_COMPILER & GLM_COMPILER_VC) - return typename genType::bool_type(_isnan(x)); -#else - return typename genType::bool_type(std::isnan(x)); -#endif - } - - template - inline typename detail::tvec2::bool_type isnan - ( - detail::tvec2 const & x - ) - { - return typename detail::tvec2::bool_type( - isnan(x.x), - isnan(x.y)); - } - - template - inline typename detail::tvec3::bool_type isnan - ( - detail::tvec3 const & x - ) - { - return typename detail::tvec3::bool_type( - isnan(x.x), - isnan(x.y), - isnan(x.z)); - } - - template - inline typename detail::tvec4::bool_type isnan - ( - detail::tvec4 const & x - ) - { - return typename detail::tvec4::bool_type( - isnan(x.x), - isnan(x.y), - isnan(x.z), - isnan(x.w)); - } - - template - inline typename genType::bool_type isinf - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - -#if(defined(GLM_COMPILER) && GLM_COMPILER & GLM_COMPILER_VC) - return typename genType::bool_type(_fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF); -#else - return typename genType::bool_type(std::isinf(x)); -#endif - } - - template - inline typename detail::tvec2::bool_type isinf - ( - detail::tvec2 const & x - ) - { - return typename detail::tvec2::bool_type( - isnan(x.x), - isnan(x.y)); - } - - template - inline typename detail::tvec3::bool_type isinf - ( - detail::tvec3 const & x - ) - { - return typename detail::tvec3::bool_type( - isnan(x.x), - isnan(x.y), - isnan(x.z)); - } - - template - inline typename detail::tvec4::bool_type isinf - ( - detail::tvec4 const & x - ) - { - return typename detail::tvec4::bool_type( - isnan(x.x), - isnan(x.y), - isnan(x.z), - isnan(x.w)); - } - - inline int floatBitsToInt(float const & value) - { - union - { - float f; - int i; - } fi; - - fi.f = value; - return fi.i; - } - - template - inline detail::tvec2 floatBitsToInt - ( - detail::tvec2 const & value - ) - { - return detail::tvec2( - floatBitsToInt(value.x), - floatBitsToInt(value.y)); - } - - template - inline detail::tvec3 floatBitsToInt - ( - detail::tvec3 const & value - ) - { - return detail::tvec3( - floatBitsToInt(value.x), - floatBitsToInt(value.y)); - } - - template - inline detail::tvec4 floatBitsToInt - ( - detail::tvec4 const & value - ) - { - return detail::tvec4( - floatBitsToInt(value.x), - floatBitsToInt(value.y)); - } - - inline uint floatBitsToUint(float const & value) - { - union - { - float f; - uint u; - } fu; - - fu.f = value; - return fu.u; - } - - template - inline detail::tvec2 floatBitsToUint - ( - detail::tvec2 const & value - ) - { - return detail::tvec2( - floatBitsToUint(value.x), - floatBitsToUint(value.y)); - } - - template - inline detail::tvec3 floatBitsToUint - ( - detail::tvec3 const & value - ) - { - return detail::tvec3( - floatBitsToUint(value.x), - floatBitsToUint(value.y)); - } - - template - inline detail::tvec4 floatBitsToUint - ( - detail::tvec4 const & value - ) - { - return detail::tvec4( - floatBitsToUint(value.x), - floatBitsToUint(value.y)); - } - - inline float intBitsToFloat(int const & value) - { - union - { - float f; - int i; - } fi; - - fi.i = value; - return fi.f; - } - - inline float intBitsToFloat(uint const & value) - { - union - { - float f; - uint u; - } fu; - - fu.u = value; - return fu.f; - } - - template - inline detail::tvec2 intBitsToFloat - ( - detail::tvec2 const & value - ) - { - return detail::tvec2( - intBitsToFloat(value.x), - intBitsToFloat(value.y)); - } - - template - inline detail::tvec3 intBitsToFloat - ( - detail::tvec3 const & value - ) - { - return detail::tvec3( - intBitsToFloat(value.x), - intBitsToFloat(value.y)); - } - - template - inline detail::tvec4 intBitsToFloat - ( - detail::tvec4 const & value - ) - { - return detail::tvec4( - intBitsToFloat(value.x), - intBitsToFloat(value.y)); - } - - template - inline genType fma - ( - genType const & a, - genType const & b, - genType const & c - ) - { - return a * b + c; - } - - template - genType frexp - ( - genType const & x, - int & exp - ) - { - return std::frexp(x, exp); - } - - template - detail::tvec2 frexp - ( - detail::tvec2 const & x, - detail::tvec2 & exp - ) - { - return std::frexp(x, exp); - } - - template - detail::tvec3 frexp - ( - detail::tvec3 const & x, - detail::tvec3 & exp - ) - { - return std::frexp(x, exp); - } - - template - detail::tvec4 frexp - ( - detail::tvec4 const & x, - detail::tvec4 & exp - ) - { - return std::frexp(x, exp); - } - - template - genType ldexp - ( - genType const & x, - int const & exp - ) - { - return std::frexp(x, exp); - } - - template - detail::tvec2 ldexp - ( - detail::tvec2 const & x, - detail::tvec2 const & exp - ) - { - return std::frexp(x, exp); - } - - template - detail::tvec3 ldexp - ( - detail::tvec3 const & x, - detail::tvec3 const & exp - ) - { - return std::frexp(x, exp); - } - - template - detail::tvec4 ldexp - ( - detail::tvec4 const & x, - detail::tvec4 const & exp - ) - { - return std::frexp(x, exp); - } - - }//namespace common - }//namespace function - }//namespace core -}//namespace glm diff --git a/ThirdParty/include/glm/core/func_exponential.hpp b/ThirdParty/include/glm/core/func_exponential.hpp deleted file mode 100644 index c23f4f328281416597d00de76a393515b7caf11c..0000000000000000000000000000000000000000 --- a/ThirdParty/include/glm/core/func_exponential.hpp +++ /dev/null @@ -1,71 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2008-08-08 -// Updated : 2010-02-04 -// Licence : This source is under MIT License -// File : glm/core/func_exponential.hpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_func_exponential -#define glm_core_func_exponential - -namespace glm -{ - namespace test{ - void main_core_func_exponential(); - }//namespace test - - namespace core{ - namespace function{ - //! Define all exponential functions from Section 8.2 of GLSL 1.30.8 specification. Included in glm namespace. - namespace exponential{ - - //! Returns x raised to the y power. - //! (From GLSL 1.30.08 specification, section 8.2) - template - genType pow(genType const & x, genType const & y); - - //! Returns the natural exponentiation of x, i.e., e^x. - //! (From GLSL 1.30.08 specification, section 8.2) - template - genType exp(genType const & x); - - //! Returns the natural logarithm of x, i.e., - //! returns the value y which satisfies the equation x = e^y. - //! Results are undefined if x <= 0. - //! (From GLSL 1.30.08 specification, section 8.2) - template - genType log(genType const & x); - - //! Returns 2 raised to the x power. - //! (From GLSL 1.30.08 specification, section 8.2) - template - genType exp2(genType const & x); - - //! Returns the base 2 log of x, i.e., returns the value y, - //! which satisfies the equation x = 2 ^ y. - //! (From GLSL 1.30.08 specification, section 8.2) - template - genType log2(genType const & x); - - //! Returns the positive square root of x. - //! (From GLSL 1.30.08 specification, section 8.2) - template - genType sqrt(genType const & x); - - //! Returns the reciprocal of the positive square root of x. - //! (From GLSL 1.30.08 specification, section 8.2) - template - genType inversesqrt(genType const & x); - - }//namespace exponential - }//namespace function - }//namespace core - - using namespace core::function::exponential; -}//namespace glm - -#include "func_exponential.inl" - -#endif//glm_core_func_exponential diff --git a/ThirdParty/include/glm/core/func_exponential.inl b/ThirdParty/include/glm/core/func_exponential.inl deleted file mode 100644 index 2088243629803f748bf879e03fd39b36f94e0962..0000000000000000000000000000000000000000 --- a/ThirdParty/include/glm/core/func_exponential.inl +++ /dev/null @@ -1,358 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2008-08-03 -// Updated : 2010-02-04 -// Licence : This source is under MIT License -// File : glm/core/func_exponential.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - namespace core{ - namespace function{ - namespace exponential{ - - // pow - template - inline genType pow - ( - genType const & x, - genType const & y - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return ::std::pow(x, y); - } - - template - inline detail::tvec2 pow - ( - detail::tvec2 const & x, - detail::tvec2 const & y - ) - { - return detail::tvec2( - pow(x.x, y.x), - pow(x.y, y.y)); - } - - template - inline detail::tvec3 pow - ( - detail::tvec3 const & x, - detail::tvec3 const & y - ) - { - return detail::tvec3( - pow(x.x, y.x), - pow(x.y, y.y), - pow(x.z, y.z)); - } - - template - inline detail::tvec4 pow - ( - detail::tvec4 const & x, - detail::tvec4 const & y - ) - { - return detail::tvec4( - pow(x.x, y.x), - pow(x.y, y.y), - pow(x.z, y.z), - pow(x.w, y.w)); - } - - // exp - template - inline genType exp - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return ::std::exp(x); - } - - template - inline detail::tvec2 exp - ( - detail::tvec2 const & x - ) - { - return detail::tvec2( - exp(x.x), - exp(x.y)); - } - - template - inline detail::tvec3 exp - ( - detail::tvec3 const & x - ) - { - return detail::tvec3( - exp(x.x), - exp(x.y), - exp(x.z)); - } - - template - inline detail::tvec4 exp - ( - detail::tvec4 const & x - ) - { - return detail::tvec4( - exp(x.x), - exp(x.y), - exp(x.z), - exp(x.w)); - } - - // log - template - inline genType log - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return ::std::log(x); - } - - template - inline detail::tvec2 log - ( - detail::tvec2 const & x - ) - { - return detail::tvec2( - log(x.x), - log(x.y)); - } - - template - inline detail::tvec3 log - ( - detail::tvec3 const & x - ) - { - return detail::tvec3( - log(x.x), - log(x.y), - log(x.z)); - } - - template - inline detail::tvec4 log - ( - detail::tvec4 const & x - ) - { - return detail::tvec4( - log(x.x), - log(x.y), - log(x.z), - log(x.w)); - } - - //exp2, ln2 = 0.69314718055994530941723212145818f - template - inline genType exp2 - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return ::std::exp(genType(0.69314718055994530941723212145818) * x); - } - - template - inline detail::tvec2 exp2 - ( - detail::tvec2 const & x - ) - { - return detail::tvec2( - exp2(x.x), - exp2(x.y)); - } - - template - inline detail::tvec3 exp2 - ( - detail::tvec3 const & x - ) - { - return detail::tvec3( - exp2(x.x), - exp2(x.y), - exp2(x.z)); - } - - template - inline detail::tvec4 exp2 - ( - detail::tvec4 const & x - ) - { - return detail::tvec4( - exp2(x.x), - exp2(x.y), - exp2(x.z), - exp2(x.w)); - } - - // log2, ln2 = 0.69314718055994530941723212145818f - template - inline genType log2 - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return ::std::log(x) / genType(0.69314718055994530941723212145818); - } - - template - inline detail::tvec2 log2 - ( - detail::tvec2 const & x - ) - { - return detail::tvec2( - log2(x.x), - log2(x.y)); - } - - template - inline detail::tvec3 log2 - ( - detail::tvec3 const & x - ) - { - return detail::tvec3( - log2(x.x), - log2(x.y), - log2(x.z)); - } - - template - inline detail::tvec4 log2 - ( - detail::tvec4 const & x - ) - { - return detail::tvec4( - log2(x.x), - log2(x.y), - log2(x.z), - log2(x.w)); - } - - // sqrt - template - inline genType sqrt - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return genType(::std::sqrt(double(x))); - } - - template - inline detail::tvec2 sqrt - ( - detail::tvec2 const & x - ) - { - return detail::tvec2( - sqrt(x.x), - sqrt(x.y)); - } - - template - inline detail::tvec3 sqrt - ( - detail::tvec3 const & x - ) - { - return detail::tvec3( - sqrt(x.x), - sqrt(x.y), - sqrt(x.z)); - } - - template - inline detail::tvec4 sqrt - ( - detail::tvec4 const & x - ) - { - return detail::tvec4( - sqrt(x.x), - sqrt(x.y), - sqrt(x.z), - sqrt(x.w)); - } - - template - inline genType inversesqrt - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return genType(1) / ::std::sqrt(x); - } - - template - inline detail::tvec2 inversesqrt - ( - detail::tvec2 const & x - ) - { - return detail::tvec2( - inversesqrt(x.x), - inversesqrt(x.y)); - } - - template - inline detail::tvec3 inversesqrt - ( - detail::tvec3 const & x - ) - { - return detail::tvec3( - inversesqrt(x.x), - inversesqrt(x.y), - inversesqrt(x.z)); - } - - template - inline detail::tvec4 inversesqrt - ( - detail::tvec4 const & x - ) - { - return detail::tvec4( - inversesqrt(x.x), - inversesqrt(x.y), - inversesqrt(x.z), - inversesqrt(x.w)); - } - - }//namespace exponential - }//namespace function - }//namespace core -}//namespace glm diff --git a/ThirdParty/include/glm/core/func_geometric.hpp b/ThirdParty/include/glm/core/func_geometric.hpp deleted file mode 100644 index e3a8eeec29f34013633ca06f43d33222f1044d86..0000000000000000000000000000000000000000 --- a/ThirdParty/include/glm/core/func_geometric.hpp +++ /dev/null @@ -1,92 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2008-08-03 -// Updated : 2010-02-04 -// Licence : This source is under MIT License -// File : glm/core/func_geometric.hpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_func_geometric -#define glm_core_func_geometric - -namespace glm -{ - namespace test{ - void main_core_func_geometric(); - }//namespace test - - namespace core{ - namespace function{ - //! Define all geometric functions from Section 8.4 of GLSL 1.30.8 specification. Included in glm namespace. - namespace geometric{ - - //! Returns the length of x, i.e., sqrt(x * x). - //! (From GLSL 1.30.08 specification, section 8.4) - template - typename genType::value_type length( - genType const & x); - - //! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). - //! (From GLSL 1.30.08 specification, section 8.4) - template - typename genType::value_type distance( - genType const & p0, - genType const & p1); - - //! Returns the dot product of x and y, i.e., result = x * y. - //! (From GLSL 1.30.08 specification, section 8.4) - template - typename genType::value_type dot( - genType const & x, - genType const & y); - - //! Returns the cross product of x and y. - //! (From GLSL 1.30.08 specification, section 8.4) - template - detail::tvec3 cross( - detail::tvec3 const & x, - detail::tvec3 const & y); - - //! Returns a vector in the same direction as x but with length of 1. - //! (From GLSL 1.30.08 specification, section 8.4) - template - genType normalize( - genType const & x); - - //! If dot(Nref, I) < 0.0, return N, otherwise, return -N. - //! (From GLSL 1.30.08 specification, section 8.4) - template - genType faceforward( - genType const & N, - genType const & I, - genType const & Nref); - - //! For the incident vector I and surface orientation N, - //! returns the reflection direction : result = I - 2.0 * dot(N, I) * N. - //! (From GLSL 1.30.08 specification, section 8.4) - template - genType reflect( - genType const & I, - genType const & N); - - //! For the incident vector I and surface normal N, - //! and the ratio of indices of refraction eta, - //! return the refraction vector. - //! (From GLSL 1.30.08 specification, section 8.4) - template - genType refract( - genType const & I, - genType const & N, - typename genType::value_type const & eta); - - }//namespace geometric - }//namespace function - }//namespace core - - using namespace core::function::geometric; -}//namespace glm - -#include "func_geometric.inl" - -#endif//glm_core_func_geometric diff --git a/ThirdParty/include/glm/core/func_geometric.inl b/ThirdParty/include/glm/core/func_geometric.inl deleted file mode 100644 index ff8f382de66c98f6ec9181a6c04755b47747aa02..0000000000000000000000000000000000000000 --- a/ThirdParty/include/glm/core/func_geometric.inl +++ /dev/null @@ -1,290 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2008-08-03 -// Updated : 2010-02-04 -// Licence : This source is under MIT License -// File : glm/core/func_geometric.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - namespace core{ - namespace function{ - namespace geometric{ - - // length - template - inline genType length - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - genType sqr = x * x; - return sqrt(sqr); - } - - template - inline typename detail::tvec2::value_type length - ( - detail::tvec2 const & v - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - typename detail::tvec2::value_type sqr = v.x * v.x + v.y * v.y; - return sqrt(sqr); - } - - template - inline typename detail::tvec3::value_type length - ( - detail::tvec3 const & v - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - typename detail::tvec3::value_type sqr = v.x * v.x + v.y * v.y + v.z * v.z; - return sqrt(sqr); - } - - template - inline typename detail::tvec4::value_type length - ( - detail::tvec4 const & v - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - typename detail::tvec4::value_type sqr = v.x * v.x + v.y * v.y + v.z * v.z + v.w * v.w; - return sqrt(sqr); - } - - // distance - template - inline genType distance - ( - genType const & p0, - genType const & p1 - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return length(p1 - p0); - } - - template - inline typename detail::tvec2::value_type distance - ( - detail::tvec2 const & p0, - detail::tvec2 const & p1 - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return length(p1 - p0); - } - - template - inline typename detail::tvec3::value_type distance - ( - detail::tvec3 const & p0, - detail::tvec3 const & p1 - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return length(p1 - p0); - } - - template - inline typename detail::tvec4::value_type distance - ( - detail::tvec4 const & p0, - detail::tvec4 const & p1 - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return length(p1 - p0); - } - - // dot - template - inline genType dot - ( - genType const & x, - genType const & y - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return x * y; - } - - template - inline typename detail::tvec2::value_type dot - ( - detail::tvec2 const & x, - detail::tvec2 const & y - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return x.x * y.x + x.y * y.y; - } - - template - inline T dot - ( - detail::tvec3 const & x, - detail::tvec3 const & y - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return x.x * y.x + x.y * y.y + x.z * y.z; - } -/* // SSE3 - inline float dot(const tvec4& x, const tvec4& y) - { - float Result; - __asm - { - mov esi, x - mov edi, y - movaps xmm0, [esi] - mulps xmm0, [edi] - haddps( _xmm0, _xmm0 ) - haddps( _xmm0, _xmm0 ) - movss Result, xmm0 - } - return Result; - } -*/ - template - inline T dot - ( - detail::tvec4 const & x, - detail::tvec4 const & y - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return x.x * y.x + x.y * y.y + x.z * y.z + x.w * y.w; - } - - // cross - template - inline detail::tvec3 cross - ( - detail::tvec3 const & x, - detail::tvec3 const & y - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return detail::tvec3( - x.y * y.z - y.y * x.z, - x.z * y.x - y.z * x.x, - x.x * y.y - y.x * x.y); - } - - // normalize - template - inline genType normalize - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return x < genType(0) ? genType(-1) : genType(1); - } - - // According to issue 10 GLSL 1.10 specification, if length(x) == 0 then result is undefine and generate an error - template - inline detail::tvec2 normalize - ( - detail::tvec2 const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - typename detail::tvec2::value_type sqr = x.x * x.x + x.y * x.y; - return x * inversesqrt(sqr); - } - - template - inline detail::tvec3 normalize - ( - detail::tvec3 const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - typename detail::tvec3::value_type sqr = x.x * x.x + x.y * x.y + x.z * x.z; - return x * inversesqrt(sqr); - } - - template - inline detail::tvec4 normalize - ( - detail::tvec4 const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - typename detail::tvec4::value_type sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w; - return x * inversesqrt(sqr); - } - - // faceforward - template - inline genType faceforward - ( - genType const & N, - genType const & I, - genType const & Nref - ) - { - return dot(Nref, I) < 0 ? N : -N; - } - - // reflect - template - genType reflect - ( - genType const & I, - genType const & N - ) - { - return I - N * dot(N, I) * float(2); - } - - // refract - template - inline genType refract - ( - genType const & I, - genType const & N, - typename genType::value_type const & eta - ) - { - //It could be a vector - //GLM_STATIC_ASSERT(detail::type::is_float); - - typename genType::value_type dotValue = dot(N, I); - typename genType::value_type k = typename genType::value_type(1) - eta * eta * (typename genType::value_type(1) - dotValue * dotValue); - if(k < typename genType::value_type(0)) - return genType(0); - else - return eta * I - (eta * dotValue + sqrt(k)) * N; - } - - }//namespace geometric - }//namespace function - }//namespace core -}//namespace glm diff --git a/ThirdParty/include/glm/core/func_integer.hpp b/ThirdParty/include/glm/core/func_integer.hpp deleted file mode 100644 index 06455aff79cfab7fbbd2d4bad6d50e19343f9dd6..0000000000000000000000000000000000000000 --- a/ThirdParty/include/glm/core/func_integer.hpp +++ /dev/null @@ -1,142 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2010-03-17 -// Updated : 2010-03-31 -// Licence : This source is under MIT License -// File : glm/core/func_integer.hpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_func_integer -#define glm_core_func_integer - -namespace glm -{ - namespace test{ - void main_core_func_integer(); - }//namespace test - - namespace core{ - namespace function{ - //! Define integer functions from Section 8.8 of GLSL 4.00.8 specification. - namespace integer{ - - //! Adds 32-bit unsigned integer x and y, returning the sum - //! modulo pow(2, 32). The value carry is set to 0 if the sum was - //! less than pow(2, 32), or to 1 otherwise. - //! - //! (From GLSL 4.00.08 specification, section 8.8) - template - genUType uaddCarry( - genUType const & x, - genUType const & y, - genUType & carry); - - //! Subtracts the 32-bit unsigned integer y from x, returning - //! the difference if non-negative, or pow(2, 32) plus the difference - //! otherwise. The value borrow is set to 0 if x >= y, or to 1 otherwise. - //! - //! (From GLSL 4.00.08 specification, section 8.8) - template - genUType usubBorrow( - genUType const & x, - genUType const & y, - genUType & borrow); - - //! Multiplies 32-bit integers x and y, producing a 64-bit - //! result. The 32 least-significant bits are returned in lsb. - //! The 32 most-significant bits are returned in msb. - //! (From GLSL 4.00.08 specification, section 8.8) - template - void umulExtended( - genUType const & x, - genUType const & y, - genUType & msb, - genUType & lsb); - - //! Multiplies 32-bit integers x and y, producing a 64-bit - //! result. The 32 least-significant bits are returned in lsb. - //! The 32 most-significant bits are returned in msb. - //! (From GLSL 4.00.08 specification, section 8.8) - template - void imulExtended( - genIType const & x, - genIType const & y, - genIType & msb, - genIType & lsb); - - - //! Extracts bits [offset, offset + bits - 1] from value, - //! returning them in the least significant bits of the result. - //! For unsigned data types, the most significant bits of the - //! result will be set to zero. For signed data types, the - //! most significant bits will be set to the value of bit offset + base – 1. - //! - //! If bits is zero, the result will be zero. The result will be - //! undefined if offset or bits is negative, or if the sum of - //! offset and bits is greater than the number of bits used - //! to store the operand. - //! - //! (From GLSL 4.00.08 specification, section 8.8) - template - genIUType bitfieldExtract( - genIUType const & Value, - int const & Offset, - int const & Bits); - - //! Returns the insertion the bits least-significant bits of insert into base. - //! - //! The result will have bits [offset, offset + bits - 1] taken - //! from bits [0, bits – 1] of insert, and all other bits taken - //! directly from the corresponding bits of base. If bits is - //! zero, the result will simply be base. The result will be - //! undefined if offset or bits is negative, or if the sum of - //! offset and bits is greater than the number of bits used to - //! store the operand. - //! - //! (From GLSL 4.00.08 specification, section 8.8) - template - genIUType bitfieldInsert( - genIUType const & Base, - genIUType const & Insert, - int const & Offset, - int const & Bits); - - //! Returns the reversal of the bits of value. - //! The bit numbered n of the result will be taken from bit (bits - 1) - n of value, - //! where bits is the total number of bits used to represent value. - //! (From GLSL 4.00.08 specification, section 8.8) - template - genIUType bitfieldReverse(genIUType const & value); - - //! Returns the number of bits set to 1 in the binary representation of value. - //! (From GLSL 4.00.08 specification, section 8.8) - template class C> - typename C::signed_type bitCount(C const & Value); - - //! Returns the bit number of the least significant bit set to - //! 1 in the binary representation of value. - //! If value is zero, -1 will be returned. - //! (From GLSL 4.00.08 specification, section 8.8) - template class C> - typename C::signed_type findLSB(C const & Value); - - //! Returns the bit number of the most significant bit in the binary representation of value. - //! For positive integers, the result will be the bit number of the most significant bit set to 1. - //! For negative integers, the result will be the bit number of the most significant - //! bit set to 0. For a value of zero or negative one, -1 will be returned. - //! (From GLSL 4.00.08 specification, section 8.8) - template class C> - typename C::signed_type findMSB(C const & Value); - - }//namespace integer - }//namespace function - }//namespace core - - using namespace core::function::integer; -}//namespace glm - -#include "func_integer.inl" - -#endif//glm_core_func_integer - diff --git a/ThirdParty/include/glm/core/func_integer.inl b/ThirdParty/include/glm/core/func_integer.inl deleted file mode 100644 index eece73cfbb8bbeb25f6a48508e992e70c8a283b5..0000000000000000000000000000000000000000 --- a/ThirdParty/include/glm/core/func_integer.inl +++ /dev/null @@ -1,600 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2010-03-17 -// Updated : 2010-03-31 -// Licence : This source is under MIT License -// File : glm/core/func_integer.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - namespace detail - { - - }//namespace detail - - namespace core{ - namespace function{ - namespace integer - { - // uaddCarry - template - inline genUType uaddCarry - ( - genUType const & x, - genUType const & y, - genUType & Carry - ) - { - detail::highp_uint_t Value64 = detail::highp_uint_t(x) + detail::highp_uint_t(y); - genUType Result = genUType(Value64 % (detail::highp_uint_t(1) << detail::highp_uint_t(32))); - Carry = (Value64 % (detail::highp_uint_t(1) << detail::highp_uint_t(32))) > 1 ? 1 : 0; - return Result; - } - - template - inline detail::tvec2 uaddCarry - ( - detail::tvec2 const & x, - detail::tvec2 const & y, - detail::tvec2 & Carry - ) - { - return detail::tvec2( - uaddCarry(x[0], y[0], Carry[0]), - uaddCarry(x[1], y[1], Carry[1])); - } - - template - inline detail::tvec3 uaddCarry - ( - detail::tvec3 const & x, - detail::tvec3 const & y, - detail::tvec3 & Carry - ) - { - return detail::tvec3( - uaddCarry(x[0], y[0], Carry[0]), - uaddCarry(x[1], y[1], Carry[1]), - uaddCarry(x[2], y[2], Carry[2])); - } - - template - inline detail::tvec4 uaddCarry - ( - detail::tvec4 const & x, - detail::tvec4 const & y, - detail::tvec4 & Carry - ) - { - return detail::tvec4( - uaddCarry(x[0], y[0], Carry[0]), - uaddCarry(x[1], y[1], Carry[1]), - uaddCarry(x[2], y[2], Carry[2]), - uaddCarry(x[3], y[3], Carry[3])); - } - - // usubBorrow - template - inline genUType usubBorrow - ( - genUType const & x, - genUType const & y, - genUType & Borrow - ) - { - Borrow = x >= y ? 0 : 1; - if(x > y) - return genUType(detail::highp_int_t(x) - detail::highp_int_t(y)); - else - return genUType(detail::highp_int_t(1) << detail::highp_int_t(32) + detail::highp_int_t(x) - detail::highp_int_t(y)); - } - - template - inline detail::tvec2 usubBorrow - ( - detail::tvec2 const & x, - detail::tvec2 const & y, - detail::tvec2 & Borrow - ) - { - return detail::tvec2( - usubBorrow(x[0], y[0], Borrow[0]), - usubBorrow(x[1], y[1], Borrow[1])); - } - - template - inline detail::tvec3 usubBorrow - ( - detail::tvec3 const & x, - detail::tvec3 const & y, - detail::tvec3 & Borrow - ) - { - return detail::tvec3( - usubBorrow(x[0], y[0], Borrow[0]), - usubBorrow(x[1], y[1], Borrow[1]), - usubBorrow(x[2], y[2], Borrow[2])); - } - - template - inline detail::tvec4 usubBorrow - ( - detail::tvec4 const & x, - detail::tvec4 const & y, - detail::tvec4 & Borrow - ) - { - return detail::tvec4( - usubBorrow(x[0], y[0], Borrow[0]), - usubBorrow(x[1], y[1], Borrow[1]), - usubBorrow(x[2], y[2], Borrow[2]), - usubBorrow(x[3], y[3], Borrow[3])); - } - - // umulExtended - template - inline void umulExtended - ( - genUType const & x, - genUType const & y, - genUType & msb, - genUType & lsb - ) - { - detail::highp_uint_t ValueX64 = x; - detail::highp_uint_t ValueY64 = y; - detail::highp_uint_t Value64 = ValueX64 * ValueY64; - msb = *(genUType*)&genUType(Value64 & ((detail::highp_uint_t(1) << detail::highp_uint_t(32)) - detail::highp_uint_t(1))); - lsb = *(genUType*)&genUType(Value64 >> detail::highp_uint_t(32)); - } - - template - inline detail::tvec2 umulExtended - ( - detail::tvec2 const & x, - detail::tvec2 const & y, - detail::tvec2 & msb, - detail::tvec2 & lsb - ) - { - return detail::tvec2( - umulExtended(x[0], y[0], msb, lsb), - umulExtended(x[1], y[1], msb, lsb)); - } - - template - inline detail::tvec3 umulExtended - ( - detail::tvec3 const & x, - detail::tvec3 const & y, - detail::tvec3 & msb, - detail::tvec3 & lsb - ) - { - return detail::tvec3( - umulExtended(x[0], y[0], msb, lsb), - umulExtended(x[1], y[1], msb, lsb), - umulExtended(x[2], y[2], msb, lsb)); - } - - template - inline detail::tvec4 umulExtended - ( - detail::tvec4 const & x, - detail::tvec4 const & y, - detail::tvec4 & msb, - detail::tvec4 & lsb - ) - { - return detail::tvec4( - umulExtended(x[0], y[0], msb, lsb), - umulExtended(x[1], y[1], msb, lsb), - umulExtended(x[2], y[2], msb, lsb), - umulExtended(x[3], y[3], msb, lsb)); - } - - // imulExtended - template - void imulExtended - ( - genIType const & x, - genIType const & y, - genIType & msb, - genIType & lsb - ) - { - detail::highp_int_t ValueX64 = x; - detail::highp_int_t ValueY64 = y; - detail::highp_int_t Value64 = ValueX64 * ValueY64; - msb = *(genIType*)&genIType(Value64 & ((detail::highp_uint_t(1) << detail::highp_uint_t(32)) - detail::highp_uint_t(1))); - lsb = *(genIType*)&genIType(Value64 >> detail::highp_uint_t(32)); - } - - template - inline detail::tvec2 imulExtended - ( - detail::tvec2 const & x, - detail::tvec2 const & y, - detail::tvec2 & msb, - detail::tvec2 & lsb - ) - { - return detail::tvec2( - imulExtended(x[0], y[0], msb, lsb), - imulExtended(x[1], y[1], msb, lsb)); - } - - template - inline detail::tvec3 imulExtended - ( - detail::tvec3 const & x, - detail::tvec3 const & y, - detail::tvec3 & msb, - detail::tvec3 & lsb - ) - { - return detail::tvec3( - imulExtended(x[0], y[0], msb, lsb), - imulExtended(x[1], y[1], msb, lsb), - imulExtended(x[2], y[2], msb, lsb)); - } - - template - inline detail::tvec4 imulExtended - ( - detail::tvec4 const & x, - detail::tvec4 const & y, - detail::tvec4 & msb, - detail::tvec4 & lsb - ) - { - return detail::tvec4( - imulExtended(x[0], y[0], msb, lsb), - imulExtended(x[1], y[1], msb, lsb), - imulExtended(x[2], y[2], msb, lsb), - imulExtended(x[3], y[3], msb, lsb)); - } - - // bitfieldExtract - template - genIUType bitfieldExtract - ( - genIUType const & Value, - int const & Offset, - int const & Bits - ) - { - GLM_STATIC_ASSERT(std::numeric_limits::is_integer); - assert(Offset + Bits <= sizeof(genIUType)); - - genIUType Result = 0; - if(std::numeric_limits::is_signed) - Result |= (1 << (sizeof(genIUType) * 8 - 1)) & (1 << (Offset + Bits - 1)); - - genIUType Mask = 0; - for(std::size_t Bit = Offset; Bit < Bits; ++Bit) - Mask |= (1 << Bit); - - return Result | ((Mask & Value) >> Offset); - } - - template - inline detail::tvec2 bitfieldExtract - ( - detail::tvec2 const & Value, - int const & Offset, - int const & Bits - ) - { - return detail::tvec2( - bitfieldExtract(Value[0]), - bitfieldExtract(Value[1])); - } - - template - inline detail::tvec3 bitfieldExtract - ( - detail::tvec3 const & Value, - int const & Offset, - int const & Bits - ) - { - return detail::tvec3( - bitfieldExtract(Value[0]), - bitfieldExtract(Value[1]), - bitfieldExtract(Value[2])); - } - - template - inline detail::tvec4 bitfieldExtract - ( - detail::tvec4 const & Value, - int const & Offset, - int const & Bits - ) - { - return detail::tvec4( - bitfieldExtract(Value[0]), - bitfieldExtract(Value[1]), - bitfieldExtract(Value[2]), - bitfieldExtract(Value[3])); - } - - // bitfieldInsert - template - inline genIUType bitfieldInsert - ( - genIUType const & Base, - genIUType const & Insert, - int const & Offset, - int const & Bits - ) - { - GLM_STATIC_ASSERT(std::numeric_limits::is_integer); - assert(Offset + Bits <= sizeof(genIUType)); - - if(Bits == 0) - return Base; - - genIUType Mask = 0; - for(std::size_t Bit = Offset; Bit < Offset + Bits; ++Bit) - Mask |= (1 << Bit); - - return (Base & ~Mask) | (Insert & Mask); - } - - template - inline detail::tvec2 bitfieldInsert - ( - detail::tvec2 const & Base, - detail::tvec2 const & Insert, - int const & Offset, - int const & Bits - ) - { - return detail::tvec2( - bitfieldInsert(Base[0], Insert[0], Offset, Bits), - bitfieldInsert(Base[1], Insert[1], Offset, Bits)); - } - - template - inline detail::tvec3 bitfieldInsert - ( - detail::tvec3 const & Base, - detail::tvec3 const & Insert, - int const & Offset, - int const & Bits - ) - { - return detail::tvec3( - bitfieldInsert(Base[0], Insert[0], Offset, Bits), - bitfieldInsert(Base[1], Insert[1], Offset, Bits), - bitfieldInsert(Base[2], Insert[2], Offset, Bits)); - } - - template - inline detail::tvec4 bitfieldInsert - ( - detail::tvec4 const & Base, - detail::tvec4 const & Insert, - int const & Offset, - int const & Bits - ) - { - return detail::tvec4( - bitfieldInsert(Base[0], Insert[0], Offset, Bits), - bitfieldInsert(Base[1], Insert[1], Offset, Bits), - bitfieldInsert(Base[2], Insert[2], Offset, Bits), - bitfieldInsert(Base[3], Insert[3], Offset, Bits)); - } - - // bitfieldReverse - template - inline genIUType bitfieldReverse(genIUType const & Value) - { - GLM_STATIC_ASSERT(std::numeric_limits::is_integer); - - genIUType Result = 0; - for(std::size_t i = 0; i < sizeof(genIUType) * std::size_t(8); ++i) - if(Value & (1 << i)) - Result |= (genIUType(1) << (sizeof(genIUType) * std::size_t(8)) - genIUType(1) - i); - return Result; - } - - template - inline detail::tvec2 bitfieldReverse - ( - detail::tvec2 const & value - ) - { - return detail::tvec2( - bitfieldReverse(value[0]), - bitfieldReverse(value[1])); - } - - template - inline detail::tvec3 bitfieldReverse - ( - detail::tvec3 const & value - ) - { - return detail::tvec3( - bitfieldReverse(value[0]), - bitfieldReverse(value[1]), - bitfieldReverse(value[2])); - } - - template - inline detail::tvec4 bitfieldReverse - ( - detail::tvec4 const & value - ) - { - return detail::tvec4( - bitfieldReverse(value[0]), - bitfieldReverse(value[1]), - bitfieldReverse(value[2]), - bitfieldReverse(value[3])); - } - - // bitCount - template - int bitCount(genIUType const & Value) - { - GLM_STATIC_ASSERT(std::numeric_limits::is_integer); - - int Count = 0; - for(std::size_t i = 0; i < sizeof(genIUType) * std::size_t(8); ++i) - { - if(Value & (1 << i)) - ++Count; - } - return Count; - } - - template - inline detail::tvec2 bitCount - ( - detail::tvec2 const & value - ) - { - return detail::tvec2( - bitCount(value[0]), - bitCount(value[1])); - } - - template - inline detail::tvec3 bitCount - ( - detail::tvec3 const & value - ) - { - return detail::tvec3( - bitCount(value[0]), - bitCount(value[1]), - bitCount(value[2])); - } - - template - inline detail::tvec4 bitCount - ( - detail::tvec4 const & value - ) - { - return detail::tvec4( - bitCount(value[0]), - bitCount(value[1]), - bitCount(value[2]), - bitCount(value[3])); - } - - // findLSB - template - inline int findLSB - ( - genIUType const & Value - ) - { - GLM_STATIC_ASSERT(std::numeric_limits::is_integer); - if(Value == 0) - return -1; - - genIUType Bit; - for(Bit = genIUType(0); !(Value & (1 << Bit)); ++Bit){} - return Bit; - } - - template - inline detail::tvec2 findLSB - ( - detail::tvec2 const & value - ) - { - return detail::tvec2( - findLSB(value[0]), - findLSB(value[1])); - } - - template - inline detail::tvec3 findLSB - ( - detail::tvec3 const & value - ) - { - return detail::tvec3( - findLSB(value[0]), - findLSB(value[1]), - findLSB(value[2])); - } - - template - inline detail::tvec4 findLSB - ( - detail::tvec4 const & value - ) - { - return detail::tvec4( - findLSB(value[0]), - findLSB(value[1]), - findLSB(value[2]), - findLSB(value[3])); - } - - // findMSB - template - inline int findMSB - ( - genIUType const & Value - ) - { - GLM_STATIC_ASSERT(std::numeric_limits::is_integer); - if(Value == 0) - return -1; - - genIUType bit = genIUType(-1); - for(genIUType tmp = Value; tmp; tmp >>= 1, ++bit){} - return bit; - } - - template - inline detail::tvec2 findMSB - ( - detail::tvec2 const & value - ) - { - return detail::tvec2( - findMSB(value[0]), - findMSB(value[1])); - } - - template - inline detail::tvec3 findMSB - ( - detail::tvec3 const & value - ) - { - return detail::tvec3( - findMSB(value[0]), - findMSB(value[1]), - findMSB(value[2])); - } - - template - inline detail::tvec4 findMSB - ( - detail::tvec4 const & value - ) - { - return detail::tvec4( - findMSB(value[0]), - findMSB(value[1]), - findMSB(value[2]), - findMSB(value[3])); - } - - }//namespace integer - }//namespace function - }//namespace core -}//namespace glm diff --git a/ThirdParty/include/glm/core/func_matrix.hpp b/ThirdParty/include/glm/core/func_matrix.hpp deleted file mode 100644 index 0cc95dfdb1581b8ab779db98cc0c81fe7a191b33..0000000000000000000000000000000000000000 --- a/ThirdParty/include/glm/core/func_matrix.hpp +++ /dev/null @@ -1,92 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2008-08-03 -// Updated : 2010-02-04 -// Licence : This source is under MIT License -// File : glm/core/func_matrix.hpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_func_matrix -#define glm_core_func_matrix - -namespace glm -{ - namespace test{ - void main_core_func_matrix(); - }//namespace test - - namespace core{ - namespace function{ - //! Define all matrix functions from Section 8.5 of GLSL 1.30.8 specification. Included in glm namespace. - namespace matrix{ - - //! Multiply matrix x by matrix y component-wise, i.e., - //! result[i][j] is the scalar product of x[i][j] and y[i][j]. - //! (From GLSL 1.30.08 specification, section 8.5) - template - matType matrixCompMult( - matType const & x, - matType const & y); - - //! Treats the first parameter c as a column vector - //! and the second parameter r as a row vector - //! and does a linear algebraic matrix multiply c * r. - //! (From GLSL 1.30.08 specification, section 8.5) - template - matType outerProduct( - vecType const & c, - vecType const & r); - - //! Returns the transposed matrix of x - //! (From GLSL 1.30.08 specification, section 8.5) - template - typename matType::transpose_type transpose( - matType const & x); - - //! Return the determinant of a mat2 matrix. - //! (From GLSL 1.50.09 specification, section 8.5).. - template - typename detail::tmat2x2::value_type determinant( - detail::tmat2x2 const & m); - - //! Return the determinant of a mat3 matrix. - //! (From GLSL 1.50.09 specification, section 8.5). - template - typename detail::tmat3x3::value_type determinant( - detail::tmat3x3 const & m); - - //! Return the determinant of a mat4 matrix. - //! (From GLSL 1.50.09 specification, section 8.5). - template - typename detail::tmat4x4::value_type determinant( - detail::tmat4x4 const & m); - - //! Return the inverse of a mat2 matrix. - //! (From GLSL 1.40.07 specification, section 8.5). - template - detail::tmat2x2 inverse( - detail::tmat2x2 const & m); - - //! Return the inverse of a mat3 matrix. - //! (From GLSL 1.40.07 specification, section 8.5). - template - detail::tmat3x3 inverse( - detail::tmat3x3 const & m); - - //! Return the inverse of a mat4 matrix. - //! (From GLSL 1.40.07 specification, section 8.5). - template - detail::tmat4x4 inverse( - detail::tmat4x4 const & m); - - }//namespace matrix - }//namespace function - }//namespace core - - using namespace core::function::matrix; -}//namespace glm - -#include "func_matrix.inl" - -#endif//glm_core_func_matrix diff --git a/ThirdParty/include/glm/core/func_matrix.inl b/ThirdParty/include/glm/core/func_matrix.inl deleted file mode 100644 index 31eebb2ce53b5644c09ef2203b8f589170315d5d..0000000000000000000000000000000000000000 --- a/ThirdParty/include/glm/core/func_matrix.inl +++ /dev/null @@ -1,559 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2008-03-08 -// Updated : 2010-02-04 -// Licence : This source is under MIT License -// File : glm/core/func_matrix.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - namespace core{ - namespace function{ - namespace matrix{ - - // matrixCompMult - template - inline matType matrixCompMult - ( - matType const & x, - matType const & y - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - matType result(matType::null); - for(typename matType::size_type i = 0; i < matType::col_size(); ++i) - result[i] = x[i] * y[i]; - return result; - } - - // outerProduct - template - inline detail::tmat2x2 outerProduct - ( - detail::tvec2 const & c, - detail::tvec2 const & r - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - detail::tmat2x2 m(detail::tmat2x2::null); - m[0][0] = c[0] * r[0]; - m[0][1] = c[1] * r[0]; - m[1][0] = c[0] * r[1]; - m[1][1] = c[1] * r[1]; - return m; - } - - template - inline detail::tmat3x3 outerProduct - ( - detail::tvec3 const & c, - detail::tvec3 const & r - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - detail::tmat3x3 m(detail::tmat3x3::null); - for(typename detail::tmat3x3::size_type i = 0; i < detail::tmat3x3::col_size(); ++i) - m[i] = c * r[i]; - return m; - } - - template - inline detail::tmat4x4 outerProduct - ( - detail::tvec4 const & c, - detail::tvec4 const & r - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - detail::tmat4x4 m(detail::tmat4x4::null); - for(typename detail::tmat4x4::size_type i = 0; i < detail::tmat4x4::col_size(); ++i) - m[i] = c * r[i]; - return m; - } - - template - inline detail::tmat2x3 outerProduct - ( - detail::tvec3 const & c, - detail::tvec2 const & r - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - detail::tmat2x3 m(detail::tmat2x3::null); - m[0][0] = c.x * r.x; - m[0][1] = c.y * r.x; - m[0][2] = c.z * r.x; - m[1][0] = c.x * r.y; - m[1][1] = c.y * r.y; - m[1][2] = c.z * r.y; - return m; - } - - template - inline detail::tmat3x2 outerProduct - ( - detail::tvec2 const & c, - detail::tvec3 const & r - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - detail::tmat3x2 m(detail::tmat3x2::null); - m[0][0] = c.x * r.x; - m[0][1] = c.y * r.x; - m[1][0] = c.x * r.y; - m[1][1] = c.y * r.y; - m[2][0] = c.x * r.z; - m[2][1] = c.y * r.z; - return m; - } - - template - inline detail::tmat2x4 outerProduct - ( - detail::tvec2 const & c, - detail::tvec4 const & r - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - detail::tmat2x4 m(detail::tmat2x4::null); - m[0][0] = c.x * r.x; - m[0][1] = c.y * r.x; - m[0][2] = c.z * r.x; - m[0][3] = c.w * r.x; - m[1][0] = c.x * r.y; - m[1][1] = c.y * r.y; - m[1][2] = c.z * r.y; - m[1][3] = c.w * r.y; - return m; - } - - template - inline detail::tmat4x2 outerProduct - ( - detail::tvec4 const & c, - detail::tvec2 const & r - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - detail::tmat4x2 m(detail::tmat4x2::null); - m[0][0] = c.x * r.x; - m[0][1] = c.y * r.x; - m[1][0] = c.x * r.y; - m[1][1] = c.y * r.y; - m[2][0] = c.x * r.z; - m[2][1] = c.y * r.z; - m[3][0] = c.x * r.w; - m[3][1] = c.y * r.w; - return m; - } - - template - inline detail::tmat3x4 outerProduct - ( - detail::tvec4 const & c, - detail::tvec3 const & r - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - detail::tmat3x4 m(detail::tmat3x4::null); - m[0][0] = c.x * r.x; - m[0][1] = c.y * r.x; - m[0][2] = c.z * r.x; - m[0][3] = c.w * r.x; - m[1][0] = c.x * r.y; - m[1][1] = c.y * r.y; - m[1][2] = c.z * r.y; - m[1][3] = c.w * r.y; - m[2][0] = c.x * r.z; - m[2][1] = c.y * r.z; - m[2][2] = c.z * r.z; - m[2][3] = c.w * r.z; - return m; - } - - template - inline detail::tmat4x3 outerProduct - ( - detail::tvec3 const & c, - detail::tvec4 const & r - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - detail::tmat4x3 m(detail::tmat4x3::null); - m[0][0] = c.x * r.x; - m[0][1] = c.y * r.x; - m[0][2] = c.z * r.x; - m[1][0] = c.x * r.y; - m[1][1] = c.y * r.y; - m[1][2] = c.z * r.y; - m[2][0] = c.x * r.z; - m[2][1] = c.y * r.z; - m[2][2] = c.z * r.z; - m[3][0] = c.x * r.w; - m[3][1] = c.y * r.w; - m[3][2] = c.z * r.w; - return m; - } - - template - inline detail::tmat2x2 transpose - ( - detail::tmat2x2 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - detail::tmat2x2 result(detail::tmat2x2::null); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - return result; - } - - template - inline detail::tmat3x3 transpose - ( - detail::tmat3x3 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - detail::tmat3x3 result(detail::tmat3x3::null); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[0][2] = m[2][0]; - - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[1][2] = m[2][1]; - - result[2][0] = m[0][2]; - result[2][1] = m[1][2]; - result[2][2] = m[2][2]; - return result; - } - - template - inline detail::tmat4x4 transpose - ( - detail::tmat4x4 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - detail::tmat4x4 result(detail::tmat4x4::null); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[0][2] = m[2][0]; - result[0][3] = m[3][0]; - - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[1][2] = m[2][1]; - result[1][3] = m[3][1]; - - result[2][0] = m[0][2]; - result[2][1] = m[1][2]; - result[2][2] = m[2][2]; - result[2][3] = m[3][2]; - - result[3][0] = m[0][3]; - result[3][1] = m[1][3]; - result[3][2] = m[2][3]; - result[3][3] = m[3][3]; - return result; - } - - template - inline detail::tmat2x3 transpose - ( - detail::tmat3x2 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - detail::tmat2x3 result(detail::tmat2x3::null); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[0][2] = m[2][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[1][2] = m[2][1]; - return result; - } - - template - inline detail::tmat3x2 transpose - ( - detail::tmat2x3 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - detail::tmat3x2 result(detail::tmat3x2::null); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[2][0] = m[0][2]; - result[2][1] = m[1][2]; - return result; - } - - template - inline detail::tmat2x4 transpose - ( - detail::tmat4x2 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - detail::tmat2x4 result(detail::tmat2x4::null); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[0][2] = m[2][0]; - result[0][3] = m[3][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[1][2] = m[2][1]; - result[1][3] = m[3][1]; - return result; - } - - template - inline detail::tmat4x2 transpose - ( - detail::tmat2x4 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - detail::tmat4x2 result(detail::tmat4x2::null); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[2][0] = m[0][2]; - result[2][1] = m[1][2]; - result[3][0] = m[0][3]; - result[3][1] = m[1][3]; - return result; - } - - template - inline detail::tmat3x4 transpose - ( - detail::tmat4x3 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - detail::tmat3x4 result(detail::tmat3x4::null); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[0][2] = m[2][0]; - result[0][3] = m[3][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[1][2] = m[2][1]; - result[1][3] = m[3][1]; - result[2][0] = m[0][2]; - result[2][1] = m[1][2]; - result[2][2] = m[2][2]; - result[2][3] = m[3][2]; - return result; - } - - template - inline detail::tmat4x3 transpose - ( - detail::tmat3x4 const & m - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - detail::tmat4x3 result(detail::tmat4x3::null); - result[0][0] = m[0][0]; - result[0][1] = m[1][0]; - result[0][2] = m[2][0]; - result[1][0] = m[0][1]; - result[1][1] = m[1][1]; - result[1][2] = m[2][1]; - result[2][0] = m[0][2]; - result[2][1] = m[1][2]; - result[2][2] = m[2][2]; - result[3][0] = m[0][3]; - result[3][1] = m[1][3]; - result[3][2] = m[2][3]; - return result; - } - - template - inline typename detail::tmat2x2::value_type determinant - ( - detail::tmat2x2 const & m - ) - { - return m[0][0] * m[1][1] - m[1][0] * m[0][1]; - } - - template - inline typename detail::tmat3x3::value_type determinant - ( - detail::tmat3x3 const & m - ) - { - return - + m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2]) - - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2]) - + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]); - } - - template - inline typename detail::tmat4x4::value_type determinant - ( - detail::tmat4x4 const & m - ) - { - T SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3]; - T SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3]; - T SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2]; - T SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3]; - T SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2]; - T SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1]; - - detail::tvec4 DetCof( - + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02), - - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04), - + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05), - - (m[1][0] * SubFactor02 - m[1][1] * SubFactor04 + m[1][2] * SubFactor05)); - - return m[0][0] * DetCof[0] - + m[0][1] * DetCof[1] - + m[0][2] * DetCof[2] - + m[0][3] * DetCof[3]; - } - - template - inline detail::tmat2x2 inverse - ( - detail::tmat2x2 const & m - ) - { - //valType Determinant = m[0][0] * m[1][1] - m[1][0] * m[0][1]; - T Determinant = determinant(m); - - detail::tmat2x2 Inverse( - + m[1][1] / Determinant, - - m[1][0] / Determinant, - - m[0][1] / Determinant, - + m[0][0] / Determinant); - - return Inverse; - } - - template - inline detail::tmat3x3 inverse - ( - detail::tmat3x3 const & m - ) - { - //valType Determinant = m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2]) - // - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2]) - // + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]); - - T Determinant = determinant(m); - - detail::tmat3x3 Inverse(detail::tmat3x3::null); - Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]); - Inverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]); - Inverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]); - Inverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]); - Inverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]); - Inverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]); - Inverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]); - Inverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]); - Inverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]); - Inverse /= Determinant; - - return Inverse; - } - - template - inline detail::tmat4x4 inverse - ( - detail::tmat4x4 const & m - ) - { - T Coef00 = m[2][2] * m[3][3] - m[3][2] * m[2][3]; - T Coef02 = m[1][2] * m[3][3] - m[3][2] * m[1][3]; - T Coef03 = m[1][2] * m[2][3] - m[2][2] * m[1][3]; - - T Coef04 = m[2][1] * m[3][3] - m[3][1] * m[2][3]; - T Coef06 = m[1][1] * m[3][3] - m[3][1] * m[1][3]; - T Coef07 = m[1][1] * m[2][3] - m[2][1] * m[1][3]; - - T Coef08 = m[2][1] * m[3][2] - m[3][1] * m[2][2]; - T Coef10 = m[1][1] * m[3][2] - m[3][1] * m[1][2]; - T Coef11 = m[1][1] * m[2][2] - m[2][1] * m[1][2]; - - T Coef12 = m[2][0] * m[3][3] - m[3][0] * m[2][3]; - T Coef14 = m[1][0] * m[3][3] - m[3][0] * m[1][3]; - T Coef15 = m[1][0] * m[2][3] - m[2][0] * m[1][3]; - - T Coef16 = m[2][0] * m[3][2] - m[3][0] * m[2][2]; - T Coef18 = m[1][0] * m[3][2] - m[3][0] * m[1][2]; - T Coef19 = m[1][0] * m[2][2] - m[2][0] * m[1][2]; - - T Coef20 = m[2][0] * m[3][1] - m[3][0] * m[2][1]; - T Coef22 = m[1][0] * m[3][1] - m[3][0] * m[1][1]; - T Coef23 = m[1][0] * m[2][1] - m[2][0] * m[1][1]; - - detail::tvec4 const SignA(+1, -1, +1, -1); - detail::tvec4 const SignB(-1, +1, -1, +1); - - detail::tvec4 Fac0(Coef00, Coef00, Coef02, Coef03); - detail::tvec4 Fac1(Coef04, Coef04, Coef06, Coef07); - detail::tvec4 Fac2(Coef08, Coef08, Coef10, Coef11); - detail::tvec4 Fac3(Coef12, Coef12, Coef14, Coef15); - detail::tvec4 Fac4(Coef16, Coef16, Coef18, Coef19); - detail::tvec4 Fac5(Coef20, Coef20, Coef22, Coef23); - - detail::tvec4 Vec0(m[1][0], m[0][0], m[0][0], m[0][0]); - detail::tvec4 Vec1(m[1][1], m[0][1], m[0][1], m[0][1]); - detail::tvec4 Vec2(m[1][2], m[0][2], m[0][2], m[0][2]); - detail::tvec4 Vec3(m[1][3], m[0][3], m[0][3], m[0][3]); - - detail::tvec4 Inv0 = SignA * (Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2); - detail::tvec4 Inv1 = SignB * (Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4); - detail::tvec4 Inv2 = SignA * (Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5); - detail::tvec4 Inv3 = SignB * (Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5); - - detail::tmat4x4 Inverse(Inv0, Inv1, Inv2, Inv3); - - detail::tvec4 Row0(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]); - - T Determinant = glm::dot(m[0], Row0); - - Inverse /= Determinant; - - return Inverse; - } - - }//namespace matrix - }//namespace function - }//namespace core -}//namespace glm diff --git a/ThirdParty/include/glm/core/func_noise.hpp b/ThirdParty/include/glm/core/func_noise.hpp deleted file mode 100644 index f2ce847d60b3d98eefc9d9b8f0bb66f71038bb8e..0000000000000000000000000000000000000000 --- a/ThirdParty/include/glm/core/func_noise.hpp +++ /dev/null @@ -1,53 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2008-08-01 -// Updated : 2008-09-10 -// Licence : This source is under MIT License -// File : glm/core/func_noise.hpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_func_noise -#define glm_core_func_noise - -namespace glm -{ - namespace test{ - void main_core_func_noise(); - }//namespace test - - namespace core{ - namespace function{ - // Define all noise functions from Section 8.9 of GLSL 1.30.8 specification. Included in glm namespace. - namespace noise{ - - // Returns a 1D noise value based on the input value x. - // From GLSL 1.30.08 specification, section 8.9. - template - typename genType::value_type noise1(genType const & x); - - // Returns a 2D noise value based on the input value x. - // From GLSL 1.30.08 specification, section 8.9. - template - detail::tvec2 noise2(genType const & x); - - // Returns a 3D noise value based on the input value x. - // From GLSL 1.30.08 specification, section 8.9. - template - detail::tvec3 noise3(genType const & x); - - // Returns a 4D noise value based on the input value x. - // From GLSL 1.30.08 specification, section 8.9. - template - detail::tvec4 noise4(genType const & x); - - }//namespace noise - }//namespace function - }//namespace core - - using namespace core::function::noise; -}//namespace glm - -#include "func_noise.inl" - -#endif//glm_core_func_noise diff --git a/ThirdParty/include/glm/core/func_noise.inl b/ThirdParty/include/glm/core/func_noise.inl deleted file mode 100644 index cb160174e591ba9bd7fa277eafabf82958bdd72a..0000000000000000000000000000000000000000 --- a/ThirdParty/include/glm/core/func_noise.inl +++ /dev/null @@ -1,305 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2008-08-01 -// Updated : 2008-09-23 -// Licence : This source is under MIT License -// File : glm/core/func_noise.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - namespace core{ - namespace function{ - namespace noise{ - - // noise1 - template - inline genType noise1 - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - int iNbr = int(x + genType(3) / genType(2)) * 1103515245 + 12345; - return genType(int(iNbr / genType(65536)) % 32768) / genType(32767); - } - - template - inline typename detail::tvec2::value_type noise1 - ( - detail::tvec2 const & x - ) - { - T tmp(0); - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) - tmp += x[i]; - return noise1(tmp); - } - - template - inline typename detail::tvec3::value_type noise1 - ( - detail::tvec3 const & x - ) - { - T tmp(0); - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) - tmp += x[i]; - return noise1(tmp); - } - - template - inline typename detail::tvec4::value_type noise1 - ( - detail::tvec4 const & x - ) - { - T tmp(0); - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) - tmp += x[i]; - return noise1(tmp); - } - - // noise2 - template - inline detail::tvec2 noise2 - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - genType f1 = x * genType(1103515245) + genType(12345); - genType f2 = f1 * genType(1103515245) + genType(12345); - return detail::tvec2( - noise1(f1), - noise1(f2)); - } - - template - inline detail::tvec2 noise2 - ( - detail::tvec2 const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - T f0(0); - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) - f0 += x[i]; - - T f1 = f0 * T(1103515245) + T(12345); - T f2 = f1 * T(1103515245) + T(12345); - return detail::tvec2( - noise1(f1), - noise1(f2)); - } - - template - inline detail::tvec2 noise2 - ( - detail::tvec3 const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - T f0(0); - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) - f0 += x[i]; - - T f1 = f0 * T(1103515245) + T(12345); - T f2 = f1 * T(1103515245) + T(12345); - return detail::tvec2( - noise1(f1), - noise1(f2)); - } - - template - inline detail::tvec2 noise2 - ( - detail::tvec4 const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - T f0(0); - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) - f0 += x[i]; - - T f1 = f0 * T(1103515245) + T(12345); - T f2 = f1 * T(1103515245) + T(12345); - return detail::tvec2( - noise1(f1), - noise1(f2)); - } - - // noise3 - template - inline detail::tvec3 noise3 - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - genType f1 = x * genType(1103515245) + genType(12345); - genType f2 = f1 * genType(1103515245) + genType(12345); - genType f3 = f2 * genType(1103515245) + genType(12345); - return detail::tvec3( - noise1(f1), - noise1(f2), - noise1(f3)); - } - - template - inline detail::tvec3 noise3 - ( - detail::tvec2 const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - T f0(0); - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) - f0 += x[i]; - T f1 = f0 * T(1103515245) + T(12345); - T f2 = f1 * T(1103515245) + T(12345); - T f3 = f2 * T(1103515245) + T(12345); - return detail::tvec3( - noise1(f1), - noise1(f2), - noise1(f3)); - } - - template - inline detail::tvec3 noise3 - ( - detail::tvec3 const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - T f0(0); - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size(); ++i) - f0 += x[i]; - T f1 = f0 * T(1103515245) + T(12345); - T f2 = f1 * T(1103515245) + T(12345); - T f3 = f2 * T(1103515245) + T(12345); - return detail::tvec3( - noise1(f1), - noise1(f2), - noise1(f3)); - } - - template - inline detail::tvec3 noise3 - ( - detail::tvec4 const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - T f0(0); - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size(); ++i) - f0 += x[i]; - T f1 = f0 * T(1103515245) + T(12345); - T f2 = f1 * T(1103515245) + T(12345); - T f3 = f2 * T(1103515245) + T(12345); - return detail::tvec3( - noise1(f1), - noise1(f2), - noise1(f3)); - } - - // noise4 - template - inline detail::tvec4 noise4 - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - genType f1 = x * genType(1103515245) + genType(12345); - genType f2 = f1 * genType(1103515245) + genType(12345); - genType f3 = f2 * genType(1103515245) + genType(12345); - genType f4 = f3 * genType(1103515245) + genType(12345); - return detail::tvec4( - noise1(f1), - noise1(f2), - noise1(f3), - noise1(f4)); - } - - template - inline detail::tvec4 noise4 - ( - detail::tvec2 const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - T f0(0); - for(typename detail::tvec2::size_type i = 0; i < detail::tvec2::value_size(); ++i) - f0 += x[i]; - T f1 = f0 * T(1103515245) + T(12345); - T f2 = f1 * T(1103515245) + T(12345); - T f3 = f2 * T(1103515245) + T(12345); - T f4 = f3 * T(1103515245) + T(12345); - return detail::tvec4( - noise1(f1), - noise1(f2), - noise1(f3), - noise1(f4)); - } - - template - inline detail::tvec4 noise4 - ( - detail::tvec3 const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - T f0(0); - for(typename detail::tvec3::size_type i = 0; i < detail::tvec3::value_size()(); ++i) - f0 += x[i]; - T f1 = f0 * T(1103515245) + T(12345); - T f2 = f1 * T(1103515245) + T(12345); - T f3 = f2 * T(1103515245) + T(12345); - T f4 = f3 * T(1103515245) + T(12345); - return detail::tvec4( - noise1(f1), - noise1(f2), - noise1(f3), - noise1(f4)); - } - - template - inline detail::tvec4 noise4 - ( - detail::tvec4 const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - T f0(0); - for(typename detail::tvec4::size_type i = 0; i < detail::tvec4::value_size()(); ++i) - f0 += x[i]; - T f1 = f0 * T(1103515245) + T(12345); - T f2 = f1 * T(1103515245) + T(12345); - T f3 = f2 * T(1103515245) + T(12345); - T f4 = f3 * T(1103515245) + T(12345); - return detail::tvec4( - noise1(f1), - noise1(f2), - noise1(f3), - noise1(f4)); - } - - }//namespace noise - }//namespace function - }//namespace core -}//namespace glm diff --git a/ThirdParty/include/glm/core/func_packing.hpp b/ThirdParty/include/glm/core/func_packing.hpp deleted file mode 100644 index a0676d0cc0af0148b4a9c4f2934dd6ddeb083fdc..0000000000000000000000000000000000000000 --- a/ThirdParty/include/glm/core/func_packing.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2010-03-17 -// Updated : 2010-03-17 -// Licence : This source is under MIT License -// File : glm/core/func_packing.hpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_func_packing -#define glm_core_func_packing - -namespace glm -{ - namespace test{ - void main_core_func_packing(); - }//namespace test - - namespace core{ - namespace function{ - //! Define packing functions from section 8.4 floating-point pack and unpack functions of GLSL 4.00.8 specification - namespace packing - { - detail::uint32 packUnorm2x16(detail::tvec2 const & v); - detail::uint32 packUnorm4x8(detail::tvec4 const & v); - detail::uint32 packSnorm4x8(detail::tvec4 const & v); - - detail::tvec2 unpackUnorm2x16(detail::uint32 const & p); - detail::tvec4 unpackUnorm4x8(detail::uint32 const & p); - detail::tvec4 unpackSnorm4x8(detail::uint32 const & p); - - double packDouble2x32(detail::tvec2 const & v); - detail::tvec2 unpackDouble2x32(double const & v); - - }//namespace packing - }//namespace function - }//namespace core - - using namespace core::function::packing; -}//namespace glm - -#include "func_packing.inl" - -#endif//glm_core_func_packing - diff --git a/ThirdParty/include/glm/core/func_packing.inl b/ThirdParty/include/glm/core/func_packing.inl deleted file mode 100644 index 17907c57772282a58469d81c638e9f7886a21e64..0000000000000000000000000000000000000000 --- a/ThirdParty/include/glm/core/func_packing.inl +++ /dev/null @@ -1,94 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2010-03-17 -// Updated : 2010-03-17 -// Licence : This source is under MIT License -// File : glm/core/func_packing.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - namespace detail - { - - }//namespace detail - - namespace core{ - namespace function{ - namespace packing - { - inline detail::uint32 packUnorm2x16(detail::tvec2 const & v) - { - detail::uint16 A((detail::uint16)round(clamp(v.x, 0.0f, 1.0f) * 65535.0f)); - detail::uint16 B((detail::uint16)round(clamp(v.y, 0.0f, 1.0f) * 65535.0f)); - return detail::uint32((B << 16) | A); - } - - inline detail::uint32 packUnorm4x8(detail::tvec4 const & v) - { - detail::uint8 A((detail::uint8)round(clamp(v.x, 0.0f, 1.0f) * 255.0f)); - detail::uint8 B((detail::uint8)round(clamp(v.y, 0.0f, 1.0f) * 255.0f)); - detail::uint8 C((detail::uint8)round(clamp(v.z, 0.0f, 1.0f) * 255.0f)); - detail::uint8 D((detail::uint8)round(clamp(v.w, 0.0f, 1.0f) * 255.0f)); - return detail::uint32((D << 24) | (C << 16) | (B << 8) | A); - } - - inline detail::uint32 packSnorm4x8(detail::tvec4 const & v) - { - detail::uint8 A((detail::uint8)round(clamp(v.x,-1.0f, 1.0f) * 255.0f)); - detail::uint8 B((detail::uint8)round(clamp(v.y,-1.0f, 1.0f) * 255.0f)); - detail::uint8 C((detail::uint8)round(clamp(v.z,-1.0f, 1.0f) * 255.0f)); - detail::uint8 D((detail::uint8)round(clamp(v.w,-1.0f, 1.0f) * 255.0f)); - return detail::uint32((D << 24) | (C << 16) | (B << 8) | A); - } - - inline detail::tvec2 unpackUnorm2x16(detail::uint32 const & p) - { - detail::uint16 A(detail::uint16(p >> 0)); - detail::uint16 B(detail::uint16(p >> 16)); - return detail::tvec2( - A * 1.0f / 65535.0f, - B * 1.0f / 65535.0f); - } - - inline detail::tvec4 unpackUnorm4x8(detail::uint32 const & p) - { - detail::uint8 A(detail::uint8(p >> 0)); - detail::uint8 B(detail::uint8(p >> 8)); - detail::uint8 C(detail::uint8(p >> 16)); - detail::uint8 D(detail::uint8(p >> 24)); - return detail::tvec4( - A * 1.0f / 255.0f, - B * 1.0f / 255.0f, - C * 1.0f / 255.0f, - D * 1.0f / 255.0f); - } - - inline detail::tvec4 unpackSnorm4x8(detail::uint32 const & p) - { - detail::uint8 A(detail::uint8(p >> 0)); - detail::uint8 B(detail::uint8(p >> 8)); - detail::uint8 C(detail::uint8(p >> 16)); - detail::uint8 D(detail::uint8(p >> 24)); - return clamp(detail::tvec4( - A * 1.0f / 127.0f, - B * 1.0f / 127.0f, - C * 1.0f / 127.0f, - D * 1.0f / 127.0f), -1.0f, 1.0f); - } - - inline double packDouble2x32(detail::tvec2 const & v) - { - return *(double*)&v; - } - - inline detail::tvec2 unpackDouble2x32(double const & v) - { - return *(detail::tvec2*)&v; - } - - }//namespace packing - }//namespace function - }//namespace core -}//namespace glm diff --git a/ThirdParty/include/glm/core/func_trigonometric.hpp b/ThirdParty/include/glm/core/func_trigonometric.hpp deleted file mode 100644 index 877694b156d798d38b8ef56d34794a799a1cb5c6..0000000000000000000000000000000000000000 --- a/ThirdParty/include/glm/core/func_trigonometric.hpp +++ /dev/null @@ -1,125 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2008-08-01 -// Updated : 2008-09-10 -// Licence : This source is under MIT License -// File : glm/core/func_trigonometric.hpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_func_trigonometric -#define glm_core_func_trigonometric - -namespace glm -{ - namespace test{ - void main_core_func_trigonometric(); - }//namespace test - - namespace core{ - namespace function{ - //! Define Angle and trigonometry functions - //! from Section 8.1 of GLSL 1.30.8 specification. - //! Included in glm namespace. - namespace trigonometric{ - - //! Converts degrees to radians and returns the result. - //! (From GLSL 1.30.08 specification, section 8.1) - template - genType radians(genType const & degrees); - - //! Converts radians to degrees and returns the result. - //! (From GLSL 1.30.08 specification, section 8.1) - template - genType degrees(genType const & radians); - - //! The standard trigonometric sine function. - //! The values returned by this function will range from [-1, 1]. - //! (From GLSL 1.30.08 specification, section 8.1) - template - genType sin(genType const & angle); - - //! The standard trigonometric cosine function. - //! The values returned by this function will range from [-1, 1]. - //! (From GLSL 1.30.08 specification, section 8.1) - template - genType cos(genType const & angle); - - //! The standard trigonometric tangent function. - //! (From GLSL 1.30.08 specification, section 8.1) - template - genType tan(genType const & angle); - - //! Arc sine. Returns an angle whose sine is x. - //! The range of values returned by this function is [-PI/2, PI/2]. - //! Results are undefined if |x| > 1. - //! (From GLSL 1.30.08 specification, section 8.1) - template - genType asin(genType const & x); - - //! Arc cosine. Returns an angle whose sine is x. - //! The range of values returned by this function is [0, PI]. - //! Results are undefined if |x| > 1. - //! (From GLSL 1.30.08 specification, section 8.1) - template - genType acos(genType const & x); - - //! Arc tangent. Returns an angle whose tangent is y/x. - //! The signs of x and y are used to determine what - //! quadrant the angle is in. The range of values returned - //! by this function is [-PI, PI]. Results are undefined - //! if x and y are both 0. - //! (From GLSL 1.30.08 specification, section 8.1) - template - genType atan(genType const & y, genType const & x); - - //! Arc tangent. Returns an angle whose tangent is y_over_x. - //! The range of values returned by this function is [-PI/2, PI/2]. - //! (From GLSL 1.30.08 specification, section 8.1) - template - genType atan(genType const & y_over_x); - - //! Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2 - //! (From GLSL 1.30.08 specification, section 8.1) - template - genType sinh(genType const & angle); - - //! Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2 - //! (From GLSL 1.30.08 specification, section 8.1) - template - genType cosh(genType const & angle); - - //! Returns the hyperbolic tangent function, sinh(angle) / cosh(angle) - //! (From GLSL 1.30.08 specification, section 8.1) - template - genType tanh(genType const & angle); - - //! Arc hyperbolic sine; returns the inverse of sinh. - //! (From GLSL 1.30.08 specification, section 8.1) - template - genType asinh(genType const & x); - - //! Arc hyperbolic cosine; returns the non-negative inverse - //! of cosh. Results are undefined if x < 1. - //! (From GLSL 1.30.08 specification, section 8.1) - template - genType acosh(genType const & x); - - //! Arc hyperbolic tangent; returns the inverse of tanh. - //! Results are undefined if abs(x) >= 1. - //! (From GLSL 1.30.08 specification, section 8.1) - template - genType atanh(genType const & x); - - }//namespace trigonometric - }//namespace function - }//namespace core - - using namespace core::function::trigonometric; -}//namespace glm - -#include "func_trigonometric.inl" - -#endif//glm_core_func_trigonometric - - diff --git a/ThirdParty/include/glm/core/func_trigonometric.inl b/ThirdParty/include/glm/core/func_trigonometric.inl deleted file mode 100644 index aed1ae12fda97cb366312209a4b5bbfbc96815d8..0000000000000000000000000000000000000000 --- a/ThirdParty/include/glm/core/func_trigonometric.inl +++ /dev/null @@ -1,745 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2008-08-03 -// Updated : 2008-09-14 -// Licence : This source is under MIT License -// File : glm/core/func_trigonometric.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm -{ - namespace core{ - namespace function{ - namespace trigonometric{ - - // radians - template - inline genType radians - ( - genType const & degrees - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - const genType pi = genType(3.1415926535897932384626433832795); - return degrees * (pi / genType(180)); - } - - template - inline detail::tvec2 radians - ( - detail::tvec2 const & degrees - ) - { - return detail::tvec2( - radians(degrees.x), - radians(degrees.y)); - } - - template - inline detail::tvec3 radians - ( - detail::tvec3 const & degrees - ) - { - return detail::tvec3( - radians(degrees.x), - radians(degrees.y), - radians(degrees.z)); - } - - template - inline detail::tvec4 radians - ( - detail::tvec4 const & degrees - ) - { - return detail::tvec4( - radians(degrees.x), - radians(degrees.y), - radians(degrees.z), - radians(degrees.w)); - } - - // degrees - template - inline genType degrees - ( - genType const & radians - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - const genType pi = genType(3.1415926535897932384626433832795); - return radians * (genType(180) / pi); - } - - template - inline detail::tvec2 degrees - ( - detail::tvec2 const & radians - ) - { - return detail::tvec2( - degrees(radians.x), - degrees(radians.y)); - } - - template - inline detail::tvec3 degrees - ( - detail::tvec3 const & radians - ) - { - return detail::tvec3( - degrees(radians.x), - degrees(radians.y), - degrees(radians.z)); - } - - template - inline detail::tvec4 degrees - ( - detail::tvec4 const & radians - ) - { - return detail::tvec4( - degrees(radians.x), - degrees(radians.y), - degrees(radians.z), - degrees(radians.w)); - } - - // sin - template - inline genType sin - ( - genType const & angle - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return ::std::sin(angle); - } - - template - inline detail::tvec2 sin - ( - detail::tvec2 const & angle - ) - { - return detail::tvec2( - sin(angle.x), - sin(angle.y)); - } - - template - inline detail::tvec3 sin - ( - detail::tvec3 const & angle - ) - { - return detail::tvec3( - sin(angle.x), - sin(angle.y), - sin(angle.z)); - } - - template - inline detail::tvec4 sin - ( - detail::tvec4 const & angle - ) - { - return detail::tvec4( - sin(angle.x), - sin(angle.y), - sin(angle.z), - sin(angle.w)); - } - - // cos - template - inline genType cos(genType const & angle) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return ::std::cos(angle); - } - - template - inline detail::tvec2 cos - ( - detail::tvec2 const & angle - ) - { - return detail::tvec2( - cos(angle.x), - cos(angle.y)); - } - - template - inline detail::tvec3 cos - ( - detail::tvec3 const & angle - ) - { - return detail::tvec3( - cos(angle.x), - cos(angle.y), - cos(angle.z)); - } - - template - inline detail::tvec4 cos - ( - detail::tvec4 const & angle - ) - { - return detail::tvec4( - cos(angle.x), - cos(angle.y), - cos(angle.z), - cos(angle.w)); - } - - // tan - template - inline genType tan - ( - genType const & angle - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return ::std::tan(angle); - } - - template - inline detail::tvec2 tan - ( - detail::tvec2 const & angle - ) - { - return detail::tvec2( - tan(angle.x), - tan(angle.y)); - } - - template - inline detail::tvec3 tan - ( - detail::tvec3 const & angle - ) - { - return detail::tvec3( - tan(angle.x), - tan(angle.y), - tan(angle.z)); - } - - template - inline detail::tvec4 tan - ( - detail::tvec4 const & angle - ) - { - return detail::tvec4( - tan(angle.x), - tan(angle.y), - tan(angle.z), - tan(angle.w)); - } - - // asin - template - inline genType asin - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return ::std::asin(x); - } - - template - inline detail::tvec2 asin - ( - detail::tvec2 const & x - ) - { - return detail::tvec2( - asin(x.x), - asin(x.y)); - } - - template - inline detail::tvec3 asin - ( - detail::tvec3 const & x - ) - { - return detail::tvec3( - asin(x.x), - asin(x.y), - asin(x.z)); - } - - template - inline detail::tvec4 asin - ( - detail::tvec4 const & x - ) - { - return detail::tvec4( - asin(x.x), - asin(x.y), - asin(x.z), - asin(x.w)); - } - - // acos - template - inline genType acos - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return ::std::acos(x); - } - - template - inline detail::tvec2 acos - ( - detail::tvec2 const & x - ) - { - return detail::tvec2( - acos(x.x), - acos(x.y)); - } - - template - inline detail::tvec3 acos - ( - detail::tvec3 const & x - ) - { - return detail::tvec3( - acos(x.x), - acos(x.y), - acos(x.z)); - } - - template - inline detail::tvec4 acos - ( - detail::tvec4 const & x - ) - { - return detail::tvec4( - acos(x.x), - acos(x.y), - acos(x.z), - acos(x.w)); - } - - // atan - template - inline genType atan - ( - genType const & y, - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return ::std::atan2(y, x); - } - - template - inline detail::tvec2 atan - ( - detail::tvec2 const & y, - detail::tvec2 const & x - ) - { - return detail::tvec2( - atan(y.x, x.x), - atan(y.y, x.y)); - } - - template - inline detail::tvec3 atan - ( - detail::tvec3 const & y, - detail::tvec3 const & x - ) - { - return detail::tvec3( - atan(y.x, x.x), - atan(y.y, x.y), - atan(y.z, x.z)); - } - - template - inline detail::tvec4 atan - ( - detail::tvec4 const & y, - detail::tvec4 const & x - ) - { - return detail::tvec4( - atan(y.x, x.x), - atan(y.y, x.y), - atan(y.z, x.z), - atan(y.w, x.w)); - } - - template - inline genType atan - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return ::std::atan(x); - } - - template - inline detail::tvec2 atan - ( - detail::tvec2 const & x - ) - { - return detail::tvec2( - atan(x.x), - atan(x.y)); - } - - template - inline detail::tvec3 atan - ( - detail::tvec3 const & x - ) - { - return detail::tvec3( - atan(x.x), - atan(x.y), - atan(x.z)); - } - - template - inline detail::tvec4 atan - ( - detail::tvec4 const & x - ) - { - return detail::tvec4( - atan(x.x), - atan(x.y), - atan(x.z), - atan(x.w)); - } - - // sinh - template - inline genType sinh - ( - genType const & angle - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return std::sinh(angle); - } - - template - inline detail::tvec2 sinh - ( - detail::tvec2 const & angle - ) - { - return detail::tvec2( - sinh(angle.x), - sinh(angle.y)); - } - - template - inline detail::tvec3 sinh - ( - detail::tvec3 const & angle - ) - { - return detail::tvec3( - sinh(angle.x), - sinh(angle.y), - sinh(angle.z)); - } - - template - inline detail::tvec4 sinh - ( - detail::tvec4 const & angle - ) - { - return detail::tvec4( - sinh(angle.x), - sinh(angle.y), - sinh(angle.z), - sinh(angle.w)); - } - - // cosh - template - inline genType cosh - ( - genType const & angle - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return std::cosh(angle); - } - - template - inline detail::tvec2 cosh - ( - detail::tvec2 const & angle - ) - { - return detail::tvec2( - cosh(angle.x), - cosh(angle.y)); - } - - template - inline detail::tvec3 cosh - ( - detail::tvec3 const & angle - ) - { - return detail::tvec3( - cosh(angle.x), - cosh(angle.y), - cosh(angle.z)); - } - - template - inline detail::tvec4 cosh - ( - detail::tvec4 const & angle - ) - { - return detail::tvec4( - cosh(angle.x), - cosh(angle.y), - cosh(angle.z), - cosh(angle.w)); - } - - // tanh - template - inline genType tanh - ( - genType const & angle - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return std::tanh(angle); - } - - template - inline detail::tvec2 tanh - ( - detail::tvec2 const & angle - ) - { - return detail::tvec2( - tanh(angle.x), - tanh(angle.y)); - } - - template - inline detail::tvec3 tanh - ( - detail::tvec3 const & angle - ) - { - return detail::tvec3( - tanh(angle.x), - tanh(angle.y), - tanh(angle.z)); - } - - template - inline detail::tvec4 tanh - ( - detail::tvec4 const & angle - ) - { - return detail::tvec4( - tanh(angle.x), - tanh(angle.y), - tanh(angle.z), - tanh(angle.w)); - } - - // asinh - template - inline genType asinh - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - return (x < genType(0) ? genType(-1) : (x > genType(0) ? genType(1) : genType(0))) * log(abs(x) + sqrt(genType(1) + x * x)); - } - - template - inline detail::tvec2 asinh - ( - detail::tvec2 const & x - ) - { - return detail::tvec2( - asinh(x.x), - asinh(x.y)); - } - - template - inline detail::tvec3 asinh - ( - detail::tvec3 const & x - ) - { - return detail::tvec3( - asinh(x.x), - asinh(x.y), - asinh(x.z)); - } - - template - inline detail::tvec4 asinh - ( - detail::tvec4 const & x - ) - { - return detail::tvec4( - asinh(x.x), - asinh(x.y), - asinh(x.z), - asinh(x.w)); - } - - // acosh - template - inline genType acosh - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - if(x < genType(1)) - return genType(0); - return log(x + sqrt(x * x - genType(1))); - } - - template - inline detail::tvec2 acosh - ( - detail::tvec2 const & x - ) - { - return detail::tvec2( - acosh(x.x), - acosh(x.y)); - } - - template - inline detail::tvec3 acosh - ( - detail::tvec3 const & x - ) - { - return detail::tvec3( - acosh(x.x), - acosh(x.y), - acosh(x.z)); - } - - template - inline detail::tvec4 acosh - ( - detail::tvec4 const & x - ) - { - return detail::tvec4( - acosh(x.x), - acosh(x.y), - acosh(x.z), - acosh(x.w)); - } - - // atanh - template - inline genType atanh - ( - genType const & x - ) - { - GLM_STATIC_ASSERT(detail::type::is_float); - - if(abs(x) >= genType(1)) - return 0; - return genType(0.5) * log((genType(1) + x) / (genType(1) - x)); - } - - template - inline detail::tvec2 atanh - ( - detail::tvec2 const & x - ) - { - return detail::tvec2( - atanh(x.x), - atanh(x.y)); - } - - template - inline detail::tvec3 atanh - ( - detail::tvec3 const & x - ) - { - return detail::tvec3( - atanh(x.x), - atanh(x.y), - atanh(x.z)); - } - - template - inline detail::tvec4 atanh - ( - detail::tvec4 const & x - ) - { - return detail::tvec4( - atanh(x.x), - atanh(x.y), - atanh(x.z), - atanh(x.w)); - } - - }//namespace trigonometric - }//namespace function - }//namespace core -}//namespace glm diff --git a/ThirdParty/include/glm/core/func_vector_relational.hpp b/ThirdParty/include/glm/core/func_vector_relational.hpp deleted file mode 100644 index 68fffb92b125af44cf71f62573122b679db26460..0000000000000000000000000000000000000000 --- a/ThirdParty/include/glm/core/func_vector_relational.hpp +++ /dev/null @@ -1,189 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2008-08-03 -// Updated : 2008-09-09 -// Licence : This source is under MIT License -// File : glm/core/func_vector_relational.hpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#ifndef glm_core_func_vector_relational -#define glm_core_func_vector_relational - -namespace glm -{ - namespace test{ - void main_core_func_vector_relational(); - }//namespace test - - namespace core{ - namespace function{ - //! Define vector relational functions from Section 8.3 of GLSL 1.30.8 specification. - //! Included in glm namespace. - namespace vector_relational - { - //! Returns the component-wise comparison result of x < y. - //! (From GLSL 1.30.08 specification, section 8.6) - template class vecType> - inline typename vecType::bool_type lessThan - ( - vecType const & x, - vecType const & y - ) - { - GLM_STATIC_ASSERT( - detail::type::is_float || - detail::type::is_int || - detail::type::is_uint); - - typename vecType::bool_type Result(vecType::null); - for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) - Result[i] = x[i] < y[i]; - return Result; - } - - //! Returns the component-wise comparison of result x <= y. - //! (From GLSL 1.30.08 specification, section 8.6) - template class vecType> - inline typename vecType::bool_type lessThanEqual - ( - vecType const & x, - vecType const & y - ) - { - GLM_STATIC_ASSERT( - detail::type::is_float || - detail::type::is_int || - detail::type::is_uint); - - typename vecType::bool_type Result(vecType::null); - for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) - Result[i] = x[i] <= y[i]; - return Result; - } - - //! Returns the component-wise comparison of result x > y. - //! (From GLSL 1.30.08 specification, section 8.6) - template class vecType> - inline typename vecType::bool_type greaterThan - ( - vecType const & x, - vecType const & y - ) - { - GLM_STATIC_ASSERT( - detail::type::is_float || - detail::type::is_int || - detail::type::is_uint); - - typename vecType::bool_type Result(vecType::null); - for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) - Result[i] = x[i] > y[i]; - return Result; - } - - //! Returns the component-wise comparison of result x >= y. - //! (From GLSL 1.30.08 specification, section 8.6) - template class vecType> - inline typename vecType::bool_type greaterThanEqual - ( - vecType const & x, - vecType const & y - ) - { - GLM_STATIC_ASSERT( - detail::type::is_float || - detail::type::is_int || - detail::type::is_uint); - - typename vecType::bool_type Result(vecType::null); - for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) - Result[i] = x[i] >= y[i]; - return Result; - } - - //! Returns the component-wise comparison of result x == y. - //! (From GLSL 1.30.08 specification, section 8.6) - template class vecType> - inline typename vecType::bool_type equal - ( - vecType const & x, - vecType const & y - ) - { - GLM_STATIC_ASSERT( - detail::type::is_float || - detail::type::is_int || - detail::type::is_uint || - detail::type::is_bool); - - typename vecType::bool_type Result(vecType::null); - for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) - Result[i] = x[i] == y[i]; - return Result; - } - - //! Returns the component-wise comparison of result x != y. - //! (From GLSL 1.30.08 specification, section 8.6) - template class vecType> - inline typename vecType::bool_type notEqual - ( - vecType const & x, - vecType const & y - ) - { - GLM_STATIC_ASSERT( - detail::type::is_float || - detail::type::is_int || - detail::type::is_uint || - detail::type::is_bool); - - typename vecType::bool_type Result(vecType::null); - for(typename vecType::size_type i = 0; i < vecType::value_size(); ++i) - Result[i] = x[i] != y[i]; - return Result; - } - - //! Returns true if any component of x is true. - //! (From GLSL 1.30.08 specification, section 8.6) - template