diff options
364 files changed, 5383 insertions, 15544 deletions
diff --git a/3rdparty/glm/CMakeLists.txt b/3rdparty/glm/CMakeLists.txt index a11c561c4a8..bdb9f434523 100644 --- a/3rdparty/glm/CMakeLists.txt +++ b/3rdparty/glm/CMakeLists.txt @@ -5,7 +5,7 @@ if (NOT CMAKE_VERSION VERSION_LESS "3.1") endif() project(glm) -set(GLM_VERSION "0.9.8") +set(GLM_VERSION "0.9.9") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") @@ -31,6 +31,8 @@ if(NOT GLM_TEST_ENABLE) message(STATUS "GLM is a header only library, no need to build it. Set the option GLM_TEST_ENABLE with ON to build and run the test bench") endif() +option(GLM_TEST_ENABLE_FAST_MATH "Enable fast math optimizations" OFF) + if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") OR (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") AND UNIX)) option(GLM_TEST_ENABLE_CXX_98 "Enable C++ 98" OFF) option(GLM_TEST_ENABLE_CXX_0X "Enable C++ 0x" OFF) @@ -64,20 +66,26 @@ if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++") set(CMAKE_CXX_FLAGS "-std=c++98") if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - # GLM is using GCC 64 bits integer extension add_definitions(-Wno-long-long) - elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - add_definitions(-Wno-c++11-long-long) endif() endif() endif() -option(GLM_TEST_ENABLE_MS_EXTENSIONS "Enable MS extensions" OFF) +option(GLM_TEST_ENABLE_LANG_EXTENSIONS "Enable language extensions" OFF) + +if(GLM_TEST_ENABLE_LANG_EXTENSIONS) + if(GLM_TEST_ENABLE_FAST_MATH) + if(CMAKE_COMPILER_IS_GNUCXX) + add_definitions(-ffast-math) + endif() -if(GLM_TEST_ENABLE_MS_EXTENSIONS) - if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")) - add_definitions(-Wgnu-anonymous-struct) - add_definitions(-Wnested-anon-types) + if(MSVC) + add_definitions(/fp:fast) + endif() + elseif(NOT GLM_TEST_ENABLE_FAST_MATH) + if(MSVC) + add_definitions(/fp:precise) + endif() endif() else() if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") OR (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") AND WIN32)) @@ -133,21 +141,6 @@ elseif(GLM_TEST_ENABLE_SIMD_SSE2) endif() endif() -option(GLM_TEST_ENABLE_FAST_MATH "Enable fast math optimizations" OFF) -if(GLM_TEST_ENABLE_FAST_MATH) - if(CMAKE_COMPILER_IS_GNUCXX) - add_definitions(-ffast-math) - endif() - - if(MSVC) - add_definitions(/fp:fast) - endif() -elseif(NOT GLM_TEST_ENABLE_FAST_MATH) - if(MSVC) - add_definitions(/fp:precise) - endif() -endif() - if(CMAKE_COMPILER_IS_GNUCXX) #add_definitions(-S) #add_definitions(-s) @@ -157,6 +150,10 @@ if(CMAKE_COMPILER_IS_GNUCXX) #ctest_enable_coverage() endif() +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") + add_definitions(/FAs) +endif() + include_directories("${PROJECT_SOURCE_DIR}") include_directories("${PROJECT_SOURCE_DIR}/test/external") @@ -214,4 +211,17 @@ if (NOT CMAKE_VERSION VERSION_LESS "3.0") ) endif() +# build pkg-config file +configure_file( + "./cmake/glm.pc.in" + "glm.pc" + @ONLY +) + +# install pkg-config file +install( + FILES "${CMAKE_CURRENT_BINARY_DIR}/glm.pc" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" +) + export(PACKAGE glm) diff --git a/3rdparty/glm/cmake/glm.pc.in b/3rdparty/glm/cmake/glm.pc.in new file mode 100644 index 00000000000..fc5c7bb7f90 --- /dev/null +++ b/3rdparty/glm/cmake/glm.pc.in @@ -0,0 +1,7 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +includedir=${prefix}/include + +Name: GLM +Description: OpenGL Mathematics +Version: @GLM_VERSION@ +Cflags: -I${includedir} diff --git a/3rdparty/glm/doc/glm.docx b/3rdparty/glm/doc/glm.docx Binary files differindex 17e0be699d8..1da42593769 100644 --- a/3rdparty/glm/doc/glm.docx +++ b/3rdparty/glm/doc/glm.docx diff --git a/3rdparty/glm/doc/glm.pdf b/3rdparty/glm/doc/glm.pdf Binary files differindex 00c0b772652..79c34270047 100644 --- a/3rdparty/glm/doc/glm.pdf +++ b/3rdparty/glm/doc/glm.pdf diff --git a/3rdparty/glm/glm/CMakeLists.txt b/3rdparty/glm/glm/CMakeLists.txt index 2daf664aca5..d60a887712d 100644 --- a/3rdparty/glm/glm/CMakeLists.txt +++ b/3rdparty/glm/glm/CMakeLists.txt @@ -1,5 +1,3 @@ -set(NAME glm_dummy) - file(GLOB ROOT_SOURCE *.cpp) file(GLOB ROOT_INLINE *.inl) file(GLOB ROOT_HEADER *.hpp) @@ -39,29 +37,31 @@ source_group("SIMD Files" FILES ${SIMD_HEADER}) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) -if(GLM_TEST_ENABLE) - add_executable(${NAME} ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT} - ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} - ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} - ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER} - ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER} - ${SIMD_SOURCE} ${SIMD_INLINE} ${SIMD_HEADER}) -endif(GLM_TEST_ENABLE) +if(GLM_STATIC_LIBRARY_ENABLE OR GLM_DYNAMIC_LIBRARY_ENABLE) + if(GLM_STATIC_LIBRARY_ENABLE) + add_library(glm_static STATIC ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT} + ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} + ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} + ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER} + ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER} + ${SIMD_SOURCE} ${SIMD_INLINE} ${SIMD_HEADER}) + endif(GLM_STATIC_LIBRARY_ENABLE) -if(GLM_STATIC_LIBRARY_ENABLE) - add_library(glm_static STATIC ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT} - ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} - ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} - ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER} - ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER} - ${SIMD_SOURCE} ${SIMD_INLINE} ${SIMD_HEADER}) -endif(GLM_STATIC_LIBRARY_ENABLE) + if(GLM_DYNAMIC_LIBRARY_ENABLE) + add_library(glm_shared SHARED ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT} + ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} + ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} + ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER} + ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER} + ${SIMD_SOURCE} ${SIMD_INLINE} ${SIMD_HEADER}) + endif(GLM_DYNAMIC_LIBRARY_ENABLE) -if(GLM_DYNAMIC_LIBRARY_ENABLE) - add_library(glm_shared SHARED ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT} +else(GLM_STATIC_LIBRARY_ENABLE OR GLM_DYNAMIC_LIBRARY_ENABLE) + add_executable(glm_dummy ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT} ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER} ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER} ${SIMD_SOURCE} ${SIMD_INLINE} ${SIMD_HEADER}) -endif(GLM_DYNAMIC_LIBRARY_ENABLE) + +endif(GLM_STATIC_LIBRARY_ENABLE OR GLM_DYNAMIC_LIBRARY_ENABLE) diff --git a/3rdparty/glm/glm/common.hpp b/3rdparty/glm/glm/common.hpp index b2ff9da1532..f57e800ee09 100644 --- a/3rdparty/glm/glm/common.hpp +++ b/3rdparty/glm/glm/common.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/common.hpp -/// @date 2013-12-24 / 2013-12-24 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/detail/_features.hpp b/3rdparty/glm/glm/detail/_features.hpp index 5e86caa868a..97dd6330391 100644 --- a/3rdparty/glm/glm/detail/_features.hpp +++ b/3rdparty/glm/glm/detail/_features.hpp @@ -255,7 +255,7 @@ # define GLM_CXX11_STATIC_ASSERT # endif -#elif(GLM_COMPILER & GLM_COMPILER_LLVM) +#elif(GLM_COMPILER & GLM_COMPILER_CLANG) # if(__has_feature(cxx_exceptions)) # define GLM_CXX98_EXCEPTIONS # endif @@ -396,4 +396,4 @@ # define GLM_CXX11_VARIADIC_TEMPLATES # endif -#endif//(GLM_COMPILER & GLM_COMPILER_LLVM) +#endif//(GLM_COMPILER & GLM_COMPILER_CLANG) diff --git a/3rdparty/glm/glm/detail/_swizzle.hpp b/3rdparty/glm/glm/detail/_swizzle.hpp index b589a2be9b7..8e134d90ede 100644 --- a/3rdparty/glm/glm/detail/_swizzle.hpp +++ b/3rdparty/glm/glm/detail/_swizzle.hpp @@ -10,11 +10,9 @@ namespace detail template <typename T, int N> struct _swizzle_base0 { - typedef T value_type; - protected: - GLM_FUNC_QUALIFIER value_type& elem (size_t i) { return (reinterpret_cast<value_type*>(_buffer))[i]; } - GLM_FUNC_QUALIFIER const value_type& elem (size_t i) const { return (reinterpret_cast<const value_type*>(_buffer))[i]; } + GLM_FUNC_QUALIFIER T& elem(size_t i){ return (reinterpret_cast<T*>(_buffer))[i]; } + GLM_FUNC_QUALIFIER T const& elem(size_t i) const{ return (reinterpret_cast<const T*>(_buffer))[i]; } // Use an opaque buffer to *ensure* the compiler doesn't call a constructor. // The size 1 buffer is assumed to aligned to the actual members so that the @@ -22,27 +20,27 @@ namespace detail char _buffer[1]; }; - template <typename T, precision P, typename V, int E0, int E1, int E2, int E3, int N> + template <int N, typename T, precision P, template <typename, precision> class vecType, int E0, int E1, int E2, int E3, bool Aligned> struct _swizzle_base1 : public _swizzle_base0<T, N> { }; - template <typename T, precision P, typename V, int E0, int E1> - struct _swizzle_base1<T, P, V,E0,E1,-1,-2,2> : public _swizzle_base0<T, 2> + template <typename T, precision P, template <typename, precision> class vecType, int E0, int E1, bool Aligned> + struct _swizzle_base1<2, T, P, vecType, E0,E1,-1,-2, Aligned> : public _swizzle_base0<T, 2> { - GLM_FUNC_QUALIFIER V operator ()() const { return V(this->elem(E0), this->elem(E1)); } + GLM_FUNC_QUALIFIER vecType<T, P> operator ()() const { return vecType<T, P>(this->elem(E0), this->elem(E1)); } }; - template <typename T, precision P, typename V, int E0, int E1, int E2> - struct _swizzle_base1<T, P, V,E0,E1,E2,-1,3> : public _swizzle_base0<T, 3> + template <typename T, precision P, template <typename, precision> class vecType, int E0, int E1, int E2, bool Aligned> + struct _swizzle_base1<3, T, P, vecType, E0,E1,E2,-1, Aligned> : public _swizzle_base0<T, 3> { - GLM_FUNC_QUALIFIER V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2)); } + GLM_FUNC_QUALIFIER vecType<T, P> operator ()() const { return vecType<T, P>(this->elem(E0), this->elem(E1), this->elem(E2)); } }; - template <typename T, precision P, typename V, int E0, int E1, int E2, int E3> - struct _swizzle_base1<T, P, V,E0,E1,E2,E3,4> : public _swizzle_base0<T, 4> + template <typename T, precision P, template <typename, precision> class vecType, int E0, int E1, int E2, int E3, bool Aligned> + struct _swizzle_base1<4, T, P, vecType, E0,E1,E2,E3, Aligned> : public _swizzle_base0<T, 4> { - GLM_FUNC_QUALIFIER V operator ()() const { return V(this->elem(E0), this->elem(E1), this->elem(E2), this->elem(E3)); } + GLM_FUNC_QUALIFIER vecType<T, P> operator ()() const { return vecType<T, P>(this->elem(E0), this->elem(E1), this->elem(E2), this->elem(E3)); } }; // Internal class for implementing swizzle operators @@ -57,79 +55,76 @@ namespace detail DUPLICATE_ELEMENTS = 1 if there is a repeated element, 0 otherwise (used to specialize swizzles containing duplicate elements so that they cannot be used as r-values). */ - template <typename ValueType, precision P, typename VecType, int N, int E0, int E1, int E2, int E3, int DUPLICATE_ELEMENTS> - struct _swizzle_base2 : public _swizzle_base1<ValueType, P, VecType,E0,E1,E2,E3,N> + template <int N, typename T, precision P, template <typename, precision> class vecType, int E0, int E1, int E2, int E3, int DUPLICATE_ELEMENTS> + struct _swizzle_base2 : public _swizzle_base1<N, T, P, vecType, E0,E1,E2,E3, detail::is_aligned<P>::value> { - typedef VecType vec_type; - typedef ValueType value_type; - - GLM_FUNC_QUALIFIER _swizzle_base2& operator= (const ValueType& t) + GLM_FUNC_QUALIFIER _swizzle_base2& operator= (const T& t) { for (int i = 0; i < N; ++i) (*this)[i] = t; return *this; } - GLM_FUNC_QUALIFIER _swizzle_base2& operator= (const VecType& that) + GLM_FUNC_QUALIFIER _swizzle_base2& operator= (vecType<T, P> const& that) { struct op { - GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e = t; } + GLM_FUNC_QUALIFIER void operator() (T& e, T& t) { e = t; } }; _apply_op(that, op()); return *this; } - GLM_FUNC_QUALIFIER void operator -= (const VecType& that) + GLM_FUNC_QUALIFIER void operator -= (vecType<T, P> const& that) { struct op { - GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e -= t; } + GLM_FUNC_QUALIFIER void operator() (T& e, T& t) { e -= t; } }; _apply_op(that, op()); } - GLM_FUNC_QUALIFIER void operator += (const VecType& that) + GLM_FUNC_QUALIFIER void operator += (vecType<T, P> const& that) { struct op { - GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e += t; } + GLM_FUNC_QUALIFIER void operator() (T& e, T& t) { e += t; } }; _apply_op(that, op()); } - GLM_FUNC_QUALIFIER void operator *= (const VecType& that) + GLM_FUNC_QUALIFIER void operator *= (vecType<T, P> const& that) { struct op { - GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e *= t; } + GLM_FUNC_QUALIFIER void operator() (T& e, T& t) { e *= t; } }; _apply_op(that, op()); } - GLM_FUNC_QUALIFIER void operator /= (const VecType& that) + GLM_FUNC_QUALIFIER void operator /= (vecType<T, P> const& that) { struct op { - GLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e /= t; } + GLM_FUNC_QUALIFIER void operator() (T& e, T& t) { e /= t; } }; _apply_op(that, op()); } - GLM_FUNC_QUALIFIER value_type& operator[] (size_t i) + GLM_FUNC_QUALIFIER T& operator[](size_t i) { const int offset_dst[4] = { E0, E1, E2, E3 }; return this->elem(offset_dst[i]); } - GLM_FUNC_QUALIFIER value_type operator[] (size_t i) const + GLM_FUNC_QUALIFIER T operator[](size_t i) const { const int offset_dst[4] = { E0, E1, E2, E3 }; return this->elem(offset_dst[i]); } protected: - template <typename T> - GLM_FUNC_QUALIFIER void _apply_op(const VecType& that, T op) + template <typename U> + GLM_FUNC_QUALIFIER void _apply_op(vecType<T, P> const& that, U op) { // Make a copy of the data in this == &that. // The copier should optimize out the copy in cases where the function is // properly inlined and the copy is not necessary. - ValueType t[N]; + T t[N]; for (int i = 0; i < N; ++i) t[i] = that[i]; for (int i = 0; i < N; ++i) @@ -138,56 +133,54 @@ namespace detail }; // Specialization for swizzles containing duplicate elements. These cannot be modified. - template <typename ValueType, precision P, typename VecType, int N, int E0, int E1, int E2, int E3> - struct _swizzle_base2<ValueType, P, VecType,N,E0,E1,E2,E3,1> : public _swizzle_base1<ValueType, P, VecType,E0,E1,E2,E3,N> + template <int N, typename T, precision P, template <typename, precision> class vecType, int E0, int E1, int E2, int E3> + struct _swizzle_base2<N, T, P, vecType, E0,E1,E2,E3, 1> : public _swizzle_base1<N, T, P, vecType, E0,E1,E2,E3, detail::is_aligned<P>::value> { - typedef VecType vec_type; - typedef ValueType value_type; - struct Stub {}; + GLM_FUNC_QUALIFIER _swizzle_base2& operator= (Stub const &) { return *this; } - GLM_FUNC_QUALIFIER value_type operator[] (size_t i) const + GLM_FUNC_QUALIFIER T operator[] (size_t i) const { const int offset_dst[4] = { E0, E1, E2, E3 }; return this->elem(offset_dst[i]); } }; - template <int N,typename ValueType, precision P, typename VecType, int E0,int E1,int E2,int E3> - struct _swizzle : public _swizzle_base2<ValueType, P, VecType, N, E0, E1, E2, E3, (E0==E1||E0==E2||E0==E3||E1==E2||E1==E3||E2==E3)> + template <int N, typename T, precision P, template <typename, precision> class vecType, int E0, int E1, int E2, int E3> + struct _swizzle : public _swizzle_base2<N, T, P, vecType, E0, E1, E2, E3, (E0 == E1 || E0 == E2 || E0 == E3 || E1 == E2 || E1 == E3 || E2 == E3)> { - typedef _swizzle_base2<ValueType, P, VecType,N,E0,E1,E2,E3,(E0==E1||E0==E2||E0==E3||E1==E2||E1==E3||E2==E3)> base_type; + typedef _swizzle_base2<N, T, P, vecType, E0, E1, E2, E3, (E0 == E1 || E0 == E2 || E0 == E3 || E1 == E2 || E1 == E3 || E2 == E3)> base_type; using base_type::operator=; - GLM_FUNC_QUALIFIER operator VecType () const { return (*this)(); } + GLM_FUNC_QUALIFIER operator vecType<T, P> () const { return (*this)(); } }; // // To prevent the C++ syntax from getting entirely overwhelming, define some alias macros // -#define _GLM_SWIZZLE_TEMPLATE1 template <int N, typename T, precision P, typename V, int E0, int E1, int E2, int E3> -#define _GLM_SWIZZLE_TEMPLATE2 template <int N, typename T, precision P, typename V, int E0, int E1, int E2, int E3, int F0, int F1, int F2, int F3> -#define _GLM_SWIZZLE_TYPE1 _swizzle<N, T, P, V, E0, E1, E2, E3> -#define _GLM_SWIZZLE_TYPE2 _swizzle<N, T, P, V, F0, F1, F2, F3> +#define _GLM_SWIZZLE_TEMPLATE1 template <int N, typename T, precision P, template <typename, precision> class vecType, int E0, int E1, int E2, int E3> +#define _GLM_SWIZZLE_TEMPLATE2 template <int N, typename T, precision P, template <typename, precision> class vecType, int E0, int E1, int E2, int E3, int F0, int F1, int F2, int F3> +#define _GLM_SWIZZLE_TYPE1 _swizzle<N, T, P, vecType, E0, E1, E2, E3> +#define _GLM_SWIZZLE_TYPE2 _swizzle<N, T, P, vecType, F0, F1, F2, F3> // // Wrapper for a binary operator (e.g. u.yy + v.zy) // #define _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND) \ _GLM_SWIZZLE_TEMPLATE2 \ - GLM_FUNC_QUALIFIER V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \ + GLM_FUNC_QUALIFIER vecType<T, P> operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \ { \ return a() OPERAND b(); \ } \ _GLM_SWIZZLE_TEMPLATE1 \ - GLM_FUNC_QUALIFIER V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const V& b) \ + GLM_FUNC_QUALIFIER vecType<T, P> operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const vecType<T, P>& b) \ { \ return a() OPERAND b; \ } \ _GLM_SWIZZLE_TEMPLATE1 \ - GLM_FUNC_QUALIFIER V operator OPERAND ( const V& a, const _GLM_SWIZZLE_TYPE1& b) \ + GLM_FUNC_QUALIFIER vecType<T, P> operator OPERAND ( const vecType<T, P>& a, const _GLM_SWIZZLE_TYPE1& b) \ { \ return a OPERAND b(); \ } @@ -197,12 +190,12 @@ namespace detail // #define _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND) \ _GLM_SWIZZLE_TEMPLATE1 \ - GLM_FUNC_QUALIFIER V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const T& b) \ + GLM_FUNC_QUALIFIER vecType<T, P> operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const T& b) \ { \ return a() OPERAND b; \ } \ _GLM_SWIZZLE_TEMPLATE1 \ - GLM_FUNC_QUALIFIER V operator OPERAND ( const T& a, const _GLM_SWIZZLE_TYPE1& b) \ + GLM_FUNC_QUALIFIER vecType<T, P> operator OPERAND ( const T& a, const _GLM_SWIZZLE_TYPE1& b) \ { \ return a OPERAND b(); \ } @@ -305,500 +298,500 @@ namespace glm } #define _GLM_SWIZZLE2_2_MEMBERS(T, P, V, E0,E1) \ - struct { detail::_swizzle<2, T, P, V<T, P>, 0,0,-1,-2> E0 ## E0; }; \ - struct { detail::_swizzle<2, T, P, V<T, P>, 0,1,-1,-2> E0 ## E1; }; \ - struct { detail::_swizzle<2, T, P, V<T, P>, 1,0,-1,-2> E1 ## E0; }; \ - struct { detail::_swizzle<2, T, P, V<T, P>, 1,1,-1,-2> E1 ## E1; }; + struct { detail::_swizzle<2, T, P, V, 0,0,-1,-2> E0 ## E0; }; \ + struct { detail::_swizzle<2, T, P, V, 0,1,-1,-2> E0 ## E1; }; \ + struct { detail::_swizzle<2, T, P, V, 1,0,-1,-2> E1 ## E0; }; \ + struct { detail::_swizzle<2, T, P, V, 1,1,-1,-2> E1 ## E1; }; #define _GLM_SWIZZLE2_3_MEMBERS(T, P, V, E0,E1) \ - struct { detail::_swizzle<3,T, P, V<T, P>, 0,0,0,-1> E0 ## E0 ## E0; }; \ - struct { detail::_swizzle<3,T, P, V<T, P>, 0,0,1,-1> E0 ## E0 ## E1; }; \ - struct { detail::_swizzle<3,T, P, V<T, P>, 0,1,0,-1> E0 ## E1 ## E0; }; \ - struct { detail::_swizzle<3,T, P, V<T, P>, 0,1,1,-1> E0 ## E1 ## E1; }; \ - struct { detail::_swizzle<3,T, P, V<T, P>, 1,0,0,-1> E1 ## E0 ## E0; }; \ - struct { detail::_swizzle<3,T, P, V<T, P>, 1,0,1,-1> E1 ## E0 ## E1; }; \ - struct { detail::_swizzle<3,T, P, V<T, P>, 1,1,0,-1> E1 ## E1 ## E0; }; \ - struct { detail::_swizzle<3,T, P, V<T, P>, 1,1,1,-1> E1 ## E1 ## E1; }; + struct { detail::_swizzle<3,T, P, V, 0,0,0,-1> E0 ## E0 ## E0; }; \ + struct { detail::_swizzle<3,T, P, V, 0,0,1,-1> E0 ## E0 ## E1; }; \ + struct { detail::_swizzle<3,T, P, V, 0,1,0,-1> E0 ## E1 ## E0; }; \ + struct { detail::_swizzle<3,T, P, V, 0,1,1,-1> E0 ## E1 ## E1; }; \ + struct { detail::_swizzle<3,T, P, V, 1,0,0,-1> E1 ## E0 ## E0; }; \ + struct { detail::_swizzle<3,T, P, V, 1,0,1,-1> E1 ## E0 ## E1; }; \ + struct { detail::_swizzle<3,T, P, V, 1,1,0,-1> E1 ## E1 ## E0; }; \ + struct { detail::_swizzle<3,T, P, V, 1,1,1,-1> E1 ## E1 ## E1; }; #define _GLM_SWIZZLE2_4_MEMBERS(T, P, V, E0,E1) \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,1,1> E1 ## E1 ## E1 ## E1; }; + struct { detail::_swizzle<4,T, P, V, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 1,1,1,1> E1 ## E1 ## E1 ## E1; }; #define _GLM_SWIZZLE3_2_MEMBERS(T, P, V, E0,E1,E2) \ - struct { detail::_swizzle<2,T, P, V<T, P>, 0,0,-1,-2> E0 ## E0; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 0,1,-1,-2> E0 ## E1; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 0,2,-1,-2> E0 ## E2; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 1,0,-1,-2> E1 ## E0; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 1,1,-1,-2> E1 ## E1; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 1,2,-1,-2> E1 ## E2; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 2,0,-1,-2> E2 ## E0; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 2,1,-1,-2> E2 ## E1; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 2,2,-1,-2> E2 ## E2; }; + struct { detail::_swizzle<2,T, P, V, 0,0,-1,-2> E0 ## E0; }; \ + struct { detail::_swizzle<2,T, P, V, 0,1,-1,-2> E0 ## E1; }; \ + struct { detail::_swizzle<2,T, P, V, 0,2,-1,-2> E0 ## E2; }; \ + struct { detail::_swizzle<2,T, P, V, 1,0,-1,-2> E1 ## E0; }; \ + struct { detail::_swizzle<2,T, P, V, 1,1,-1,-2> E1 ## E1; }; \ + struct { detail::_swizzle<2,T, P, V, 1,2,-1,-2> E1 ## E2; }; \ + struct { detail::_swizzle<2,T, P, V, 2,0,-1,-2> E2 ## E0; }; \ + struct { detail::_swizzle<2,T, P, V, 2,1,-1,-2> E2 ## E1; }; \ + struct { detail::_swizzle<2,T, P, V, 2,2,-1,-2> E2 ## E2; }; #define _GLM_SWIZZLE3_3_MEMBERS(T, P, V ,E0,E1,E2) \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,0,0,-1> E0 ## E0 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,0,1,-1> E0 ## E0 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,0,2,-1> E0 ## E0 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,1,0,-1> E0 ## E1 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,1,1,-1> E0 ## E1 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,1,2,-1> E0 ## E1 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,2,0,-1> E0 ## E2 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,2,1,-1> E0 ## E2 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,2,2,-1> E0 ## E2 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,0,0,-1> E1 ## E0 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,0,1,-1> E1 ## E0 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,0,2,-1> E1 ## E0 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,1,0,-1> E1 ## E1 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,1,1,-1> E1 ## E1 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,1,2,-1> E1 ## E1 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,2,0,-1> E1 ## E2 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,2,1,-1> E1 ## E2 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,2,2,-1> E1 ## E2 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,0,0,-1> E2 ## E0 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,0,1,-1> E2 ## E0 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,0,2,-1> E2 ## E0 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,1,0,-1> E2 ## E1 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,1,1,-1> E2 ## E1 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,1,2,-1> E2 ## E1 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,2,0,-1> E2 ## E2 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,2,1,-1> E2 ## E2 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,2,2,-1> E2 ## E2 ## E2; }; + struct { detail::_swizzle<3, T, P, V, 0,0,0,-1> E0 ## E0 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 0,0,1,-1> E0 ## E0 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 0,0,2,-1> E0 ## E0 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 0,1,0,-1> E0 ## E1 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 0,1,1,-1> E0 ## E1 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 0,1,2,-1> E0 ## E1 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 0,2,0,-1> E0 ## E2 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 0,2,1,-1> E0 ## E2 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 0,2,2,-1> E0 ## E2 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 1,0,0,-1> E1 ## E0 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 1,0,1,-1> E1 ## E0 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 1,0,2,-1> E1 ## E0 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 1,1,0,-1> E1 ## E1 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 1,1,1,-1> E1 ## E1 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 1,1,2,-1> E1 ## E1 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 1,2,0,-1> E1 ## E2 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 1,2,1,-1> E1 ## E2 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 1,2,2,-1> E1 ## E2 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 2,0,0,-1> E2 ## E0 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 2,0,1,-1> E2 ## E0 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 2,0,2,-1> E2 ## E0 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 2,1,0,-1> E2 ## E1 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 2,1,1,-1> E2 ## E1 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 2,1,2,-1> E2 ## E1 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 2,2,0,-1> E2 ## E2 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 2,2,1,-1> E2 ## E2 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 2,2,2,-1> E2 ## E2 ## E2; }; #define _GLM_SWIZZLE3_4_MEMBERS(T, P, V, E0,E1,E2) \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,0,2> E0 ## E0 ## E0 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,1,2> E0 ## E0 ## E1 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,2,0> E0 ## E0 ## E2 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,2,1> E0 ## E0 ## E2 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,0,2,2> E0 ## E0 ## E2 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,0,2> E0 ## E1 ## E0 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,1,2> E0 ## E1 ## E1 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,2,0> E0 ## E1 ## E2 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,2,1> E0 ## E1 ## E2 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,1,2,2> E0 ## E1 ## E2 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,2,0,0> E0 ## E2 ## E0 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,2,0,1> E0 ## E2 ## E0 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,2,0,2> E0 ## E2 ## E0 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,2,1,0> E0 ## E2 ## E1 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,2,1,1> E0 ## E2 ## E1 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,2,1,2> E0 ## E2 ## E1 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,2,2,0> E0 ## E2 ## E2 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,2,2,1> E0 ## E2 ## E2 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 0,2,2,2> E0 ## E2 ## E2 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,0,2> E1 ## E0 ## E0 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,1,2> E1 ## E0 ## E1 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,2,0> E1 ## E0 ## E2 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,2,1> E1 ## E0 ## E2 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,0,2,2> E1 ## E0 ## E2 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,0,2> E1 ## E1 ## E0 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,1,1> E1 ## E1 ## E1 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,1,2> E1 ## E1 ## E1 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,2,0> E1 ## E1 ## E2 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,2,1> E1 ## E1 ## E2 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,1,2,2> E1 ## E1 ## E2 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,2,0,0> E1 ## E2 ## E0 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,2,0,1> E1 ## E2 ## E0 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,2,0,2> E1 ## E2 ## E0 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,2,1,0> E1 ## E2 ## E1 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,2,1,1> E1 ## E2 ## E1 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,2,1,2> E1 ## E2 ## E1 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,2,2,0> E1 ## E2 ## E2 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,2,2,1> E1 ## E2 ## E2 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 1,2,2,2> E1 ## E2 ## E2 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,0,0,0> E2 ## E0 ## E0 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,0,0,1> E2 ## E0 ## E0 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,0,0,2> E2 ## E0 ## E0 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,0,1,0> E2 ## E0 ## E1 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,0,1,1> E2 ## E0 ## E1 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,0,1,2> E2 ## E0 ## E1 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,0,2,0> E2 ## E0 ## E2 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,0,2,1> E2 ## E0 ## E2 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,0,2,2> E2 ## E0 ## E2 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,1,0,0> E2 ## E1 ## E0 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,1,0,1> E2 ## E1 ## E0 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,1,0,2> E2 ## E1 ## E0 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,1,1,0> E2 ## E1 ## E1 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,1,1,1> E2 ## E1 ## E1 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,1,1,2> E2 ## E1 ## E1 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,1,2,0> E2 ## E1 ## E2 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,1,2,1> E2 ## E1 ## E2 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,1,2,2> E2 ## E1 ## E2 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,2,0,0> E2 ## E2 ## E0 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,2,0,1> E2 ## E2 ## E0 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,2,0,2> E2 ## E2 ## E0 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,2,1,0> E2 ## E2 ## E1 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,2,1,1> E2 ## E2 ## E1 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,2,1,2> E2 ## E2 ## E1 ## E2; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,2,2,0> E2 ## E2 ## E2 ## E0; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,2,2,1> E2 ## E2 ## E2 ## E1; }; \ - struct { detail::_swizzle<4,T, P, V<T, P>, 2,2,2,2> E2 ## E2 ## E2 ## E2; }; + struct { detail::_swizzle<4,T, P, V, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 0,0,0,2> E0 ## E0 ## E0 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 0,0,1,2> E0 ## E0 ## E1 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 0,0,2,0> E0 ## E0 ## E2 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 0,0,2,1> E0 ## E0 ## E2 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 0,0,2,2> E0 ## E0 ## E2 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 0,1,0,2> E0 ## E1 ## E0 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 0,1,1,2> E0 ## E1 ## E1 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 0,1,2,0> E0 ## E1 ## E2 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 0,1,2,1> E0 ## E1 ## E2 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 0,1,2,2> E0 ## E1 ## E2 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 0,2,0,0> E0 ## E2 ## E0 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 0,2,0,1> E0 ## E2 ## E0 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 0,2,0,2> E0 ## E2 ## E0 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 0,2,1,0> E0 ## E2 ## E1 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 0,2,1,1> E0 ## E2 ## E1 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 0,2,1,2> E0 ## E2 ## E1 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 0,2,2,0> E0 ## E2 ## E2 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 0,2,2,1> E0 ## E2 ## E2 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 0,2,2,2> E0 ## E2 ## E2 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 1,0,0,2> E1 ## E0 ## E0 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 1,0,1,2> E1 ## E0 ## E1 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 1,0,2,0> E1 ## E0 ## E2 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 1,0,2,1> E1 ## E0 ## E2 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 1,0,2,2> E1 ## E0 ## E2 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 1,1,0,2> E1 ## E1 ## E0 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 1,1,1,1> E1 ## E1 ## E1 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 1,1,1,2> E1 ## E1 ## E1 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 1,1,2,0> E1 ## E1 ## E2 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 1,1,2,1> E1 ## E1 ## E2 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 1,1,2,2> E1 ## E1 ## E2 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 1,2,0,0> E1 ## E2 ## E0 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 1,2,0,1> E1 ## E2 ## E0 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 1,2,0,2> E1 ## E2 ## E0 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 1,2,1,0> E1 ## E2 ## E1 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 1,2,1,1> E1 ## E2 ## E1 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 1,2,1,2> E1 ## E2 ## E1 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 1,2,2,0> E1 ## E2 ## E2 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 1,2,2,1> E1 ## E2 ## E2 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 1,2,2,2> E1 ## E2 ## E2 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 2,0,0,0> E2 ## E0 ## E0 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 2,0,0,1> E2 ## E0 ## E0 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 2,0,0,2> E2 ## E0 ## E0 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 2,0,1,0> E2 ## E0 ## E1 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 2,0,1,1> E2 ## E0 ## E1 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 2,0,1,2> E2 ## E0 ## E1 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 2,0,2,0> E2 ## E0 ## E2 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 2,0,2,1> E2 ## E0 ## E2 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 2,0,2,2> E2 ## E0 ## E2 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 2,1,0,0> E2 ## E1 ## E0 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 2,1,0,1> E2 ## E1 ## E0 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 2,1,0,2> E2 ## E1 ## E0 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 2,1,1,0> E2 ## E1 ## E1 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 2,1,1,1> E2 ## E1 ## E1 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 2,1,1,2> E2 ## E1 ## E1 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 2,1,2,0> E2 ## E1 ## E2 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 2,1,2,1> E2 ## E1 ## E2 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 2,1,2,2> E2 ## E1 ## E2 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 2,2,0,0> E2 ## E2 ## E0 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 2,2,0,1> E2 ## E2 ## E0 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 2,2,0,2> E2 ## E2 ## E0 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 2,2,1,0> E2 ## E2 ## E1 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 2,2,1,1> E2 ## E2 ## E1 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 2,2,1,2> E2 ## E2 ## E1 ## E2; }; \ + struct { detail::_swizzle<4,T, P, V, 2,2,2,0> E2 ## E2 ## E2 ## E0; }; \ + struct { detail::_swizzle<4,T, P, V, 2,2,2,1> E2 ## E2 ## E2 ## E1; }; \ + struct { detail::_swizzle<4,T, P, V, 2,2,2,2> E2 ## E2 ## E2 ## E2; }; #define _GLM_SWIZZLE4_2_MEMBERS(T, P, V, E0,E1,E2,E3) \ - struct { detail::_swizzle<2,T, P, V<T, P>, 0,0,-1,-2> E0 ## E0; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 0,1,-1,-2> E0 ## E1; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 0,2,-1,-2> E0 ## E2; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 0,3,-1,-2> E0 ## E3; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 1,0,-1,-2> E1 ## E0; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 1,1,-1,-2> E1 ## E1; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 1,2,-1,-2> E1 ## E2; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 1,3,-1,-2> E1 ## E3; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 2,0,-1,-2> E2 ## E0; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 2,1,-1,-2> E2 ## E1; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 2,2,-1,-2> E2 ## E2; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 2,3,-1,-2> E2 ## E3; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 3,0,-1,-2> E3 ## E0; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 3,1,-1,-2> E3 ## E1; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 3,2,-1,-2> E3 ## E2; }; \ - struct { detail::_swizzle<2,T, P, V<T, P>, 3,3,-1,-2> E3 ## E3; }; - -#define _GLM_SWIZZLE4_3_MEMBERS(T,P, V, E0,E1,E2,E3) \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,0,0,-1> E0 ## E0 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,0,1,-1> E0 ## E0 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,0,2,-1> E0 ## E0 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,0,3,-1> E0 ## E0 ## E3; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,1,0,-1> E0 ## E1 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,1,1,-1> E0 ## E1 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,1,2,-1> E0 ## E1 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,1,3,-1> E0 ## E1 ## E3; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,2,0,-1> E0 ## E2 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,2,1,-1> E0 ## E2 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,2,2,-1> E0 ## E2 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,2,3,-1> E0 ## E2 ## E3; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,3,0,-1> E0 ## E3 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,3,1,-1> E0 ## E3 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,3,2,-1> E0 ## E3 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 0,3,3,-1> E0 ## E3 ## E3; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,0,0,-1> E1 ## E0 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,0,1,-1> E1 ## E0 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,0,2,-1> E1 ## E0 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,0,3,-1> E1 ## E0 ## E3; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,1,0,-1> E1 ## E1 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,1,1,-1> E1 ## E1 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,1,2,-1> E1 ## E1 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,1,3,-1> E1 ## E1 ## E3; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,2,0,-1> E1 ## E2 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,2,1,-1> E1 ## E2 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,2,2,-1> E1 ## E2 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,2,3,-1> E1 ## E2 ## E3; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,3,0,-1> E1 ## E3 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,3,1,-1> E1 ## E3 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,3,2,-1> E1 ## E3 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 1,3,3,-1> E1 ## E3 ## E3; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,0,0,-1> E2 ## E0 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,0,1,-1> E2 ## E0 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,0,2,-1> E2 ## E0 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,0,3,-1> E2 ## E0 ## E3; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,1,0,-1> E2 ## E1 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,1,1,-1> E2 ## E1 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,1,2,-1> E2 ## E1 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,1,3,-1> E2 ## E1 ## E3; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,2,0,-1> E2 ## E2 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,2,1,-1> E2 ## E2 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,2,2,-1> E2 ## E2 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,2,3,-1> E2 ## E2 ## E3; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,3,0,-1> E2 ## E3 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,3,1,-1> E2 ## E3 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,3,2,-1> E2 ## E3 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 2,3,3,-1> E2 ## E3 ## E3; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 3,0,0,-1> E3 ## E0 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 3,0,1,-1> E3 ## E0 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 3,0,2,-1> E3 ## E0 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 3,0,3,-1> E3 ## E0 ## E3; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 3,1,0,-1> E3 ## E1 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 3,1,1,-1> E3 ## E1 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 3,1,2,-1> E3 ## E1 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 3,1,3,-1> E3 ## E1 ## E3; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 3,2,0,-1> E3 ## E2 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 3,2,1,-1> E3 ## E2 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 3,2,2,-1> E3 ## E2 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 3,2,3,-1> E3 ## E2 ## E3; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 3,3,0,-1> E3 ## E3 ## E0; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 3,3,1,-1> E3 ## E3 ## E1; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 3,3,2,-1> E3 ## E3 ## E2; }; \ - struct { detail::_swizzle<3,T,P, V<T, P>, 3,3,3,-1> E3 ## E3 ## E3; }; + struct { detail::_swizzle<2,T, P, V, 0,0,-1,-2> E0 ## E0; }; \ + struct { detail::_swizzle<2,T, P, V, 0,1,-1,-2> E0 ## E1; }; \ + struct { detail::_swizzle<2,T, P, V, 0,2,-1,-2> E0 ## E2; }; \ + struct { detail::_swizzle<2,T, P, V, 0,3,-1,-2> E0 ## E3; }; \ + struct { detail::_swizzle<2,T, P, V, 1,0,-1,-2> E1 ## E0; }; \ + struct { detail::_swizzle<2,T, P, V, 1,1,-1,-2> E1 ## E1; }; \ + struct { detail::_swizzle<2,T, P, V, 1,2,-1,-2> E1 ## E2; }; \ + struct { detail::_swizzle<2,T, P, V, 1,3,-1,-2> E1 ## E3; }; \ + struct { detail::_swizzle<2,T, P, V, 2,0,-1,-2> E2 ## E0; }; \ + struct { detail::_swizzle<2,T, P, V, 2,1,-1,-2> E2 ## E1; }; \ + struct { detail::_swizzle<2,T, P, V, 2,2,-1,-2> E2 ## E2; }; \ + struct { detail::_swizzle<2,T, P, V, 2,3,-1,-2> E2 ## E3; }; \ + struct { detail::_swizzle<2,T, P, V, 3,0,-1,-2> E3 ## E0; }; \ + struct { detail::_swizzle<2,T, P, V, 3,1,-1,-2> E3 ## E1; }; \ + struct { detail::_swizzle<2,T, P, V, 3,2,-1,-2> E3 ## E2; }; \ + struct { detail::_swizzle<2,T, P, V, 3,3,-1,-2> E3 ## E3; }; + +#define _GLM_SWIZZLE4_3_MEMBERS(T, P, V, E0,E1,E2,E3) \ + struct { detail::_swizzle<3, T, P, V, 0,0,0,-1> E0 ## E0 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 0,0,1,-1> E0 ## E0 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 0,0,2,-1> E0 ## E0 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 0,0,3,-1> E0 ## E0 ## E3; }; \ + struct { detail::_swizzle<3, T, P, V, 0,1,0,-1> E0 ## E1 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 0,1,1,-1> E0 ## E1 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 0,1,2,-1> E0 ## E1 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 0,1,3,-1> E0 ## E1 ## E3; }; \ + struct { detail::_swizzle<3, T, P, V, 0,2,0,-1> E0 ## E2 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 0,2,1,-1> E0 ## E2 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 0,2,2,-1> E0 ## E2 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 0,2,3,-1> E0 ## E2 ## E3; }; \ + struct { detail::_swizzle<3, T, P, V, 0,3,0,-1> E0 ## E3 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 0,3,1,-1> E0 ## E3 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 0,3,2,-1> E0 ## E3 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 0,3,3,-1> E0 ## E3 ## E3; }; \ + struct { detail::_swizzle<3, T, P, V, 1,0,0,-1> E1 ## E0 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 1,0,1,-1> E1 ## E0 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 1,0,2,-1> E1 ## E0 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 1,0,3,-1> E1 ## E0 ## E3; }; \ + struct { detail::_swizzle<3, T, P, V, 1,1,0,-1> E1 ## E1 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 1,1,1,-1> E1 ## E1 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 1,1,2,-1> E1 ## E1 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 1,1,3,-1> E1 ## E1 ## E3; }; \ + struct { detail::_swizzle<3, T, P, V, 1,2,0,-1> E1 ## E2 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 1,2,1,-1> E1 ## E2 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 1,2,2,-1> E1 ## E2 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 1,2,3,-1> E1 ## E2 ## E3; }; \ + struct { detail::_swizzle<3, T, P, V, 1,3,0,-1> E1 ## E3 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 1,3,1,-1> E1 ## E3 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 1,3,2,-1> E1 ## E3 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 1,3,3,-1> E1 ## E3 ## E3; }; \ + struct { detail::_swizzle<3, T, P, V, 2,0,0,-1> E2 ## E0 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 2,0,1,-1> E2 ## E0 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 2,0,2,-1> E2 ## E0 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 2,0,3,-1> E2 ## E0 ## E3; }; \ + struct { detail::_swizzle<3, T, P, V, 2,1,0,-1> E2 ## E1 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 2,1,1,-1> E2 ## E1 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 2,1,2,-1> E2 ## E1 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 2,1,3,-1> E2 ## E1 ## E3; }; \ + struct { detail::_swizzle<3, T, P, V, 2,2,0,-1> E2 ## E2 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 2,2,1,-1> E2 ## E2 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 2,2,2,-1> E2 ## E2 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 2,2,3,-1> E2 ## E2 ## E3; }; \ + struct { detail::_swizzle<3, T, P, V, 2,3,0,-1> E2 ## E3 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 2,3,1,-1> E2 ## E3 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 2,3,2,-1> E2 ## E3 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 2,3,3,-1> E2 ## E3 ## E3; }; \ + struct { detail::_swizzle<3, T, P, V, 3,0,0,-1> E3 ## E0 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 3,0,1,-1> E3 ## E0 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 3,0,2,-1> E3 ## E0 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 3,0,3,-1> E3 ## E0 ## E3; }; \ + struct { detail::_swizzle<3, T, P, V, 3,1,0,-1> E3 ## E1 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 3,1,1,-1> E3 ## E1 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 3,1,2,-1> E3 ## E1 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 3,1,3,-1> E3 ## E1 ## E3; }; \ + struct { detail::_swizzle<3, T, P, V, 3,2,0,-1> E3 ## E2 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 3,2,1,-1> E3 ## E2 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 3,2,2,-1> E3 ## E2 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 3,2,3,-1> E3 ## E2 ## E3; }; \ + struct { detail::_swizzle<3, T, P, V, 3,3,0,-1> E3 ## E3 ## E0; }; \ + struct { detail::_swizzle<3, T, P, V, 3,3,1,-1> E3 ## E3 ## E1; }; \ + struct { detail::_swizzle<3, T, P, V, 3,3,2,-1> E3 ## E3 ## E2; }; \ + struct { detail::_swizzle<3, T, P, V, 3,3,3,-1> E3 ## E3 ## E3; }; #define _GLM_SWIZZLE4_4_MEMBERS(T, P, V, E0,E1,E2,E3) \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,0,2> E0 ## E0 ## E0 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,0,3> E0 ## E0 ## E0 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,1,2> E0 ## E0 ## E1 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,1,3> E0 ## E0 ## E1 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,2,0> E0 ## E0 ## E2 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,2,1> E0 ## E0 ## E2 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,2,2> E0 ## E0 ## E2 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,2,3> E0 ## E0 ## E2 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,3,0> E0 ## E0 ## E3 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,3,1> E0 ## E0 ## E3 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,3,2> E0 ## E0 ## E3 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,0,3,3> E0 ## E0 ## E3 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,0,2> E0 ## E1 ## E0 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,0,3> E0 ## E1 ## E0 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,1,2> E0 ## E1 ## E1 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,1,3> E0 ## E1 ## E1 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,2,0> E0 ## E1 ## E2 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,2,1> E0 ## E1 ## E2 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,2,2> E0 ## E1 ## E2 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,2,3> E0 ## E1 ## E2 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,3,0> E0 ## E1 ## E3 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,3,1> E0 ## E1 ## E3 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,3,2> E0 ## E1 ## E3 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,1,3,3> E0 ## E1 ## E3 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,0,0> E0 ## E2 ## E0 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,0,1> E0 ## E2 ## E0 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,0,2> E0 ## E2 ## E0 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,0,3> E0 ## E2 ## E0 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,1,0> E0 ## E2 ## E1 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,1,1> E0 ## E2 ## E1 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,1,2> E0 ## E2 ## E1 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,1,3> E0 ## E2 ## E1 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,2,0> E0 ## E2 ## E2 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,2,1> E0 ## E2 ## E2 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,2,2> E0 ## E2 ## E2 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,2,3> E0 ## E2 ## E2 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,3,0> E0 ## E2 ## E3 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,3,1> E0 ## E2 ## E3 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,3,2> E0 ## E2 ## E3 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,2,3,3> E0 ## E2 ## E3 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,0,0> E0 ## E3 ## E0 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,0,1> E0 ## E3 ## E0 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,0,2> E0 ## E3 ## E0 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,0,3> E0 ## E3 ## E0 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,1,0> E0 ## E3 ## E1 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,1,1> E0 ## E3 ## E1 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,1,2> E0 ## E3 ## E1 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,1,3> E0 ## E3 ## E1 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,2,0> E0 ## E3 ## E2 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,2,1> E0 ## E3 ## E2 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,2,2> E0 ## E3 ## E2 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,2,3> E0 ## E3 ## E2 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,3,0> E0 ## E3 ## E3 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,3,1> E0 ## E3 ## E3 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,3,2> E0 ## E3 ## E3 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 0,3,3,3> E0 ## E3 ## E3 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,0,2> E1 ## E0 ## E0 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,0,3> E1 ## E0 ## E0 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,1,2> E1 ## E0 ## E1 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,1,3> E1 ## E0 ## E1 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,2,0> E1 ## E0 ## E2 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,2,1> E1 ## E0 ## E2 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,2,2> E1 ## E0 ## E2 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,2,3> E1 ## E0 ## E2 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,3,0> E1 ## E0 ## E3 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,3,1> E1 ## E0 ## E3 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,3,2> E1 ## E0 ## E3 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,0,3,3> E1 ## E0 ## E3 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,0,2> E1 ## E1 ## E0 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,0,3> E1 ## E1 ## E0 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,1,1> E1 ## E1 ## E1 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,1,2> E1 ## E1 ## E1 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,1,3> E1 ## E1 ## E1 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,2,0> E1 ## E1 ## E2 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,2,1> E1 ## E1 ## E2 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,2,2> E1 ## E1 ## E2 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,2,3> E1 ## E1 ## E2 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,3,0> E1 ## E1 ## E3 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,3,1> E1 ## E1 ## E3 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,3,2> E1 ## E1 ## E3 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,1,3,3> E1 ## E1 ## E3 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,0,0> E1 ## E2 ## E0 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,0,1> E1 ## E2 ## E0 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,0,2> E1 ## E2 ## E0 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,0,3> E1 ## E2 ## E0 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,1,0> E1 ## E2 ## E1 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,1,1> E1 ## E2 ## E1 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,1,2> E1 ## E2 ## E1 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,1,3> E1 ## E2 ## E1 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,2,0> E1 ## E2 ## E2 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,2,1> E1 ## E2 ## E2 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,2,2> E1 ## E2 ## E2 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,2,3> E1 ## E2 ## E2 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,3,0> E1 ## E2 ## E3 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,3,1> E1 ## E2 ## E3 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,3,2> E1 ## E2 ## E3 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,2,3,3> E1 ## E2 ## E3 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,0,0> E1 ## E3 ## E0 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,0,1> E1 ## E3 ## E0 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,0,2> E1 ## E3 ## E0 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,0,3> E1 ## E3 ## E0 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,1,0> E1 ## E3 ## E1 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,1,1> E1 ## E3 ## E1 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,1,2> E1 ## E3 ## E1 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,1,3> E1 ## E3 ## E1 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,2,0> E1 ## E3 ## E2 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,2,1> E1 ## E3 ## E2 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,2,2> E1 ## E3 ## E2 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,2,3> E1 ## E3 ## E2 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,3,0> E1 ## E3 ## E3 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,3,1> E1 ## E3 ## E3 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,3,2> E1 ## E3 ## E3 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 1,3,3,3> E1 ## E3 ## E3 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,0,0> E2 ## E0 ## E0 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,0,1> E2 ## E0 ## E0 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,0,2> E2 ## E0 ## E0 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,0,3> E2 ## E0 ## E0 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,1,0> E2 ## E0 ## E1 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,1,1> E2 ## E0 ## E1 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,1,2> E2 ## E0 ## E1 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,1,3> E2 ## E0 ## E1 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,2,0> E2 ## E0 ## E2 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,2,1> E2 ## E0 ## E2 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,2,2> E2 ## E0 ## E2 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,2,3> E2 ## E0 ## E2 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,3,0> E2 ## E0 ## E3 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,3,1> E2 ## E0 ## E3 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,3,2> E2 ## E0 ## E3 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,0,3,3> E2 ## E0 ## E3 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,0,0> E2 ## E1 ## E0 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,0,1> E2 ## E1 ## E0 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,0,2> E2 ## E1 ## E0 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,0,3> E2 ## E1 ## E0 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,1,0> E2 ## E1 ## E1 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,1,1> E2 ## E1 ## E1 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,1,2> E2 ## E1 ## E1 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,1,3> E2 ## E1 ## E1 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,2,0> E2 ## E1 ## E2 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,2,1> E2 ## E1 ## E2 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,2,2> E2 ## E1 ## E2 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,2,3> E2 ## E1 ## E2 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,3,0> E2 ## E1 ## E3 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,3,1> E2 ## E1 ## E3 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,3,2> E2 ## E1 ## E3 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,1,3,3> E2 ## E1 ## E3 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,0,0> E2 ## E2 ## E0 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,0,1> E2 ## E2 ## E0 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,0,2> E2 ## E2 ## E0 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,0,3> E2 ## E2 ## E0 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,1,0> E2 ## E2 ## E1 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,1,1> E2 ## E2 ## E1 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,1,2> E2 ## E2 ## E1 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,1,3> E2 ## E2 ## E1 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,2,0> E2 ## E2 ## E2 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,2,1> E2 ## E2 ## E2 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,2,2> E2 ## E2 ## E2 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,2,3> E2 ## E2 ## E2 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,3,0> E2 ## E2 ## E3 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,3,1> E2 ## E2 ## E3 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,3,2> E2 ## E2 ## E3 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,2,3,3> E2 ## E2 ## E3 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,0,0> E2 ## E3 ## E0 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,0,1> E2 ## E3 ## E0 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,0,2> E2 ## E3 ## E0 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,0,3> E2 ## E3 ## E0 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,1,0> E2 ## E3 ## E1 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,1,1> E2 ## E3 ## E1 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,1,2> E2 ## E3 ## E1 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,1,3> E2 ## E3 ## E1 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,2,0> E2 ## E3 ## E2 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,2,1> E2 ## E3 ## E2 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,2,2> E2 ## E3 ## E2 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,2,3> E2 ## E3 ## E2 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,3,0> E2 ## E3 ## E3 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,3,1> E2 ## E3 ## E3 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,3,2> E2 ## E3 ## E3 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 2,3,3,3> E2 ## E3 ## E3 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,0,0> E3 ## E0 ## E0 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,0,1> E3 ## E0 ## E0 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,0,2> E3 ## E0 ## E0 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,0,3> E3 ## E0 ## E0 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,1,0> E3 ## E0 ## E1 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,1,1> E3 ## E0 ## E1 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,1,2> E3 ## E0 ## E1 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,1,3> E3 ## E0 ## E1 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,2,0> E3 ## E0 ## E2 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,2,1> E3 ## E0 ## E2 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,2,2> E3 ## E0 ## E2 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,2,3> E3 ## E0 ## E2 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,3,0> E3 ## E0 ## E3 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,3,1> E3 ## E0 ## E3 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,3,2> E3 ## E0 ## E3 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,0,3,3> E3 ## E0 ## E3 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,0,0> E3 ## E1 ## E0 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,0,1> E3 ## E1 ## E0 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,0,2> E3 ## E1 ## E0 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,0,3> E3 ## E1 ## E0 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,1,0> E3 ## E1 ## E1 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,1,1> E3 ## E1 ## E1 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,1,2> E3 ## E1 ## E1 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,1,3> E3 ## E1 ## E1 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,2,0> E3 ## E1 ## E2 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,2,1> E3 ## E1 ## E2 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,2,2> E3 ## E1 ## E2 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,2,3> E3 ## E1 ## E2 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,3,0> E3 ## E1 ## E3 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,3,1> E3 ## E1 ## E3 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,3,2> E3 ## E1 ## E3 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,1,3,3> E3 ## E1 ## E3 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,0,0> E3 ## E2 ## E0 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,0,1> E3 ## E2 ## E0 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,0,2> E3 ## E2 ## E0 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,0,3> E3 ## E2 ## E0 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,1,0> E3 ## E2 ## E1 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,1,1> E3 ## E2 ## E1 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,1,2> E3 ## E2 ## E1 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,1,3> E3 ## E2 ## E1 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,2,0> E3 ## E2 ## E2 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,2,1> E3 ## E2 ## E2 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,2,2> E3 ## E2 ## E2 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,2,3> E3 ## E2 ## E2 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,3,0> E3 ## E2 ## E3 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,3,1> E3 ## E2 ## E3 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,3,2> E3 ## E2 ## E3 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,2,3,3> E3 ## E2 ## E3 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,0,0> E3 ## E3 ## E0 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,0,1> E3 ## E3 ## E0 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,0,2> E3 ## E3 ## E0 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,0,3> E3 ## E3 ## E0 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,1,0> E3 ## E3 ## E1 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,1,1> E3 ## E3 ## E1 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,1,2> E3 ## E3 ## E1 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,1,3> E3 ## E3 ## E1 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,2,0> E3 ## E3 ## E2 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,2,1> E3 ## E3 ## E2 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,2,2> E3 ## E3 ## E2 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,2,3> E3 ## E3 ## E2 ## E3; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,3,0> E3 ## E3 ## E3 ## E0; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,3,1> E3 ## E3 ## E3 ## E1; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,3,2> E3 ## E3 ## E3 ## E2; }; \ - struct { detail::_swizzle<4, T, P, V<T, P>, 3,3,3,3> E3 ## E3 ## E3 ## E3; }; + struct { detail::_swizzle<4, T, P, V, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 0,0,0,2> E0 ## E0 ## E0 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 0,0,0,3> E0 ## E0 ## E0 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 0,0,1,2> E0 ## E0 ## E1 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 0,0,1,3> E0 ## E0 ## E1 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 0,0,2,0> E0 ## E0 ## E2 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 0,0,2,1> E0 ## E0 ## E2 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 0,0,2,2> E0 ## E0 ## E2 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 0,0,2,3> E0 ## E0 ## E2 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 0,0,3,0> E0 ## E0 ## E3 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 0,0,3,1> E0 ## E0 ## E3 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 0,0,3,2> E0 ## E0 ## E3 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 0,0,3,3> E0 ## E0 ## E3 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 0,1,0,2> E0 ## E1 ## E0 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 0,1,0,3> E0 ## E1 ## E0 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 0,1,1,2> E0 ## E1 ## E1 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 0,1,1,3> E0 ## E1 ## E1 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 0,1,2,0> E0 ## E1 ## E2 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 0,1,2,1> E0 ## E1 ## E2 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 0,1,2,2> E0 ## E1 ## E2 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 0,1,2,3> E0 ## E1 ## E2 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 0,1,3,0> E0 ## E1 ## E3 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 0,1,3,1> E0 ## E1 ## E3 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 0,1,3,2> E0 ## E1 ## E3 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 0,1,3,3> E0 ## E1 ## E3 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 0,2,0,0> E0 ## E2 ## E0 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 0,2,0,1> E0 ## E2 ## E0 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 0,2,0,2> E0 ## E2 ## E0 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 0,2,0,3> E0 ## E2 ## E0 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 0,2,1,0> E0 ## E2 ## E1 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 0,2,1,1> E0 ## E2 ## E1 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 0,2,1,2> E0 ## E2 ## E1 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 0,2,1,3> E0 ## E2 ## E1 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 0,2,2,0> E0 ## E2 ## E2 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 0,2,2,1> E0 ## E2 ## E2 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 0,2,2,2> E0 ## E2 ## E2 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 0,2,2,3> E0 ## E2 ## E2 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 0,2,3,0> E0 ## E2 ## E3 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 0,2,3,1> E0 ## E2 ## E3 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 0,2,3,2> E0 ## E2 ## E3 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 0,2,3,3> E0 ## E2 ## E3 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 0,3,0,0> E0 ## E3 ## E0 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 0,3,0,1> E0 ## E3 ## E0 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 0,3,0,2> E0 ## E3 ## E0 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 0,3,0,3> E0 ## E3 ## E0 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 0,3,1,0> E0 ## E3 ## E1 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 0,3,1,1> E0 ## E3 ## E1 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 0,3,1,2> E0 ## E3 ## E1 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 0,3,1,3> E0 ## E3 ## E1 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 0,3,2,0> E0 ## E3 ## E2 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 0,3,2,1> E0 ## E3 ## E2 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 0,3,2,2> E0 ## E3 ## E2 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 0,3,2,3> E0 ## E3 ## E2 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 0,3,3,0> E0 ## E3 ## E3 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 0,3,3,1> E0 ## E3 ## E3 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 0,3,3,2> E0 ## E3 ## E3 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 0,3,3,3> E0 ## E3 ## E3 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 1,0,0,2> E1 ## E0 ## E0 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 1,0,0,3> E1 ## E0 ## E0 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 1,0,1,2> E1 ## E0 ## E1 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 1,0,1,3> E1 ## E0 ## E1 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 1,0,2,0> E1 ## E0 ## E2 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 1,0,2,1> E1 ## E0 ## E2 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 1,0,2,2> E1 ## E0 ## E2 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 1,0,2,3> E1 ## E0 ## E2 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 1,0,3,0> E1 ## E0 ## E3 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 1,0,3,1> E1 ## E0 ## E3 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 1,0,3,2> E1 ## E0 ## E3 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 1,0,3,3> E1 ## E0 ## E3 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 1,1,0,2> E1 ## E1 ## E0 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 1,1,0,3> E1 ## E1 ## E0 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 1,1,1,1> E1 ## E1 ## E1 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 1,1,1,2> E1 ## E1 ## E1 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 1,1,1,3> E1 ## E1 ## E1 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 1,1,2,0> E1 ## E1 ## E2 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 1,1,2,1> E1 ## E1 ## E2 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 1,1,2,2> E1 ## E1 ## E2 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 1,1,2,3> E1 ## E1 ## E2 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 1,1,3,0> E1 ## E1 ## E3 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 1,1,3,1> E1 ## E1 ## E3 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 1,1,3,2> E1 ## E1 ## E3 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 1,1,3,3> E1 ## E1 ## E3 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 1,2,0,0> E1 ## E2 ## E0 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 1,2,0,1> E1 ## E2 ## E0 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 1,2,0,2> E1 ## E2 ## E0 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 1,2,0,3> E1 ## E2 ## E0 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 1,2,1,0> E1 ## E2 ## E1 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 1,2,1,1> E1 ## E2 ## E1 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 1,2,1,2> E1 ## E2 ## E1 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 1,2,1,3> E1 ## E2 ## E1 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 1,2,2,0> E1 ## E2 ## E2 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 1,2,2,1> E1 ## E2 ## E2 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 1,2,2,2> E1 ## E2 ## E2 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 1,2,2,3> E1 ## E2 ## E2 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 1,2,3,0> E1 ## E2 ## E3 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 1,2,3,1> E1 ## E2 ## E3 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 1,2,3,2> E1 ## E2 ## E3 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 1,2,3,3> E1 ## E2 ## E3 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 1,3,0,0> E1 ## E3 ## E0 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 1,3,0,1> E1 ## E3 ## E0 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 1,3,0,2> E1 ## E3 ## E0 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 1,3,0,3> E1 ## E3 ## E0 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 1,3,1,0> E1 ## E3 ## E1 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 1,3,1,1> E1 ## E3 ## E1 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 1,3,1,2> E1 ## E3 ## E1 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 1,3,1,3> E1 ## E3 ## E1 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 1,3,2,0> E1 ## E3 ## E2 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 1,3,2,1> E1 ## E3 ## E2 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 1,3,2,2> E1 ## E3 ## E2 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 1,3,2,3> E1 ## E3 ## E2 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 1,3,3,0> E1 ## E3 ## E3 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 1,3,3,1> E1 ## E3 ## E3 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 1,3,3,2> E1 ## E3 ## E3 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 1,3,3,3> E1 ## E3 ## E3 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 2,0,0,0> E2 ## E0 ## E0 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 2,0,0,1> E2 ## E0 ## E0 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 2,0,0,2> E2 ## E0 ## E0 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 2,0,0,3> E2 ## E0 ## E0 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 2,0,1,0> E2 ## E0 ## E1 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 2,0,1,1> E2 ## E0 ## E1 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 2,0,1,2> E2 ## E0 ## E1 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 2,0,1,3> E2 ## E0 ## E1 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 2,0,2,0> E2 ## E0 ## E2 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 2,0,2,1> E2 ## E0 ## E2 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 2,0,2,2> E2 ## E0 ## E2 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 2,0,2,3> E2 ## E0 ## E2 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 2,0,3,0> E2 ## E0 ## E3 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 2,0,3,1> E2 ## E0 ## E3 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 2,0,3,2> E2 ## E0 ## E3 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 2,0,3,3> E2 ## E0 ## E3 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 2,1,0,0> E2 ## E1 ## E0 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 2,1,0,1> E2 ## E1 ## E0 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 2,1,0,2> E2 ## E1 ## E0 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 2,1,0,3> E2 ## E1 ## E0 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 2,1,1,0> E2 ## E1 ## E1 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 2,1,1,1> E2 ## E1 ## E1 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 2,1,1,2> E2 ## E1 ## E1 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 2,1,1,3> E2 ## E1 ## E1 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 2,1,2,0> E2 ## E1 ## E2 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 2,1,2,1> E2 ## E1 ## E2 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 2,1,2,2> E2 ## E1 ## E2 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 2,1,2,3> E2 ## E1 ## E2 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 2,1,3,0> E2 ## E1 ## E3 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 2,1,3,1> E2 ## E1 ## E3 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 2,1,3,2> E2 ## E1 ## E3 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 2,1,3,3> E2 ## E1 ## E3 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 2,2,0,0> E2 ## E2 ## E0 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 2,2,0,1> E2 ## E2 ## E0 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 2,2,0,2> E2 ## E2 ## E0 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 2,2,0,3> E2 ## E2 ## E0 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 2,2,1,0> E2 ## E2 ## E1 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 2,2,1,1> E2 ## E2 ## E1 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 2,2,1,2> E2 ## E2 ## E1 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 2,2,1,3> E2 ## E2 ## E1 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 2,2,2,0> E2 ## E2 ## E2 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 2,2,2,1> E2 ## E2 ## E2 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 2,2,2,2> E2 ## E2 ## E2 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 2,2,2,3> E2 ## E2 ## E2 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 2,2,3,0> E2 ## E2 ## E3 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 2,2,3,1> E2 ## E2 ## E3 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 2,2,3,2> E2 ## E2 ## E3 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 2,2,3,3> E2 ## E2 ## E3 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 2,3,0,0> E2 ## E3 ## E0 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 2,3,0,1> E2 ## E3 ## E0 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 2,3,0,2> E2 ## E3 ## E0 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 2,3,0,3> E2 ## E3 ## E0 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 2,3,1,0> E2 ## E3 ## E1 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 2,3,1,1> E2 ## E3 ## E1 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 2,3,1,2> E2 ## E3 ## E1 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 2,3,1,3> E2 ## E3 ## E1 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 2,3,2,0> E2 ## E3 ## E2 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 2,3,2,1> E2 ## E3 ## E2 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 2,3,2,2> E2 ## E3 ## E2 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 2,3,2,3> E2 ## E3 ## E2 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 2,3,3,0> E2 ## E3 ## E3 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 2,3,3,1> E2 ## E3 ## E3 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 2,3,3,2> E2 ## E3 ## E3 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 2,3,3,3> E2 ## E3 ## E3 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 3,0,0,0> E3 ## E0 ## E0 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 3,0,0,1> E3 ## E0 ## E0 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 3,0,0,2> E3 ## E0 ## E0 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 3,0,0,3> E3 ## E0 ## E0 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 3,0,1,0> E3 ## E0 ## E1 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 3,0,1,1> E3 ## E0 ## E1 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 3,0,1,2> E3 ## E0 ## E1 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 3,0,1,3> E3 ## E0 ## E1 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 3,0,2,0> E3 ## E0 ## E2 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 3,0,2,1> E3 ## E0 ## E2 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 3,0,2,2> E3 ## E0 ## E2 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 3,0,2,3> E3 ## E0 ## E2 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 3,0,3,0> E3 ## E0 ## E3 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 3,0,3,1> E3 ## E0 ## E3 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 3,0,3,2> E3 ## E0 ## E3 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 3,0,3,3> E3 ## E0 ## E3 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 3,1,0,0> E3 ## E1 ## E0 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 3,1,0,1> E3 ## E1 ## E0 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 3,1,0,2> E3 ## E1 ## E0 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 3,1,0,3> E3 ## E1 ## E0 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 3,1,1,0> E3 ## E1 ## E1 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 3,1,1,1> E3 ## E1 ## E1 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 3,1,1,2> E3 ## E1 ## E1 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 3,1,1,3> E3 ## E1 ## E1 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 3,1,2,0> E3 ## E1 ## E2 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 3,1,2,1> E3 ## E1 ## E2 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 3,1,2,2> E3 ## E1 ## E2 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 3,1,2,3> E3 ## E1 ## E2 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 3,1,3,0> E3 ## E1 ## E3 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 3,1,3,1> E3 ## E1 ## E3 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 3,1,3,2> E3 ## E1 ## E3 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 3,1,3,3> E3 ## E1 ## E3 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 3,2,0,0> E3 ## E2 ## E0 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 3,2,0,1> E3 ## E2 ## E0 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 3,2,0,2> E3 ## E2 ## E0 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 3,2,0,3> E3 ## E2 ## E0 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 3,2,1,0> E3 ## E2 ## E1 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 3,2,1,1> E3 ## E2 ## E1 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 3,2,1,2> E3 ## E2 ## E1 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 3,2,1,3> E3 ## E2 ## E1 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 3,2,2,0> E3 ## E2 ## E2 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 3,2,2,1> E3 ## E2 ## E2 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 3,2,2,2> E3 ## E2 ## E2 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 3,2,2,3> E3 ## E2 ## E2 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 3,2,3,0> E3 ## E2 ## E3 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 3,2,3,1> E3 ## E2 ## E3 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 3,2,3,2> E3 ## E2 ## E3 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 3,2,3,3> E3 ## E2 ## E3 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 3,3,0,0> E3 ## E3 ## E0 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 3,3,0,1> E3 ## E3 ## E0 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 3,3,0,2> E3 ## E3 ## E0 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 3,3,0,3> E3 ## E3 ## E0 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 3,3,1,0> E3 ## E3 ## E1 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 3,3,1,1> E3 ## E3 ## E1 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 3,3,1,2> E3 ## E3 ## E1 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 3,3,1,3> E3 ## E3 ## E1 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 3,3,2,0> E3 ## E3 ## E2 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 3,3,2,1> E3 ## E3 ## E2 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 3,3,2,2> E3 ## E3 ## E2 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 3,3,2,3> E3 ## E3 ## E2 ## E3; }; \ + struct { detail::_swizzle<4, T, P, V, 3,3,3,0> E3 ## E3 ## E3 ## E0; }; \ + struct { detail::_swizzle<4, T, P, V, 3,3,3,1> E3 ## E3 ## E3 ## E1; }; \ + struct { detail::_swizzle<4, T, P, V, 3,3,3,2> E3 ## E3 ## E3 ## E2; }; \ + struct { detail::_swizzle<4, T, P, V, 3,3,3,3> E3 ## E3 ## E3 ## E3; }; diff --git a/3rdparty/glm/glm/detail/dummy.cpp b/3rdparty/glm/glm/detail/dummy.cpp index af163db8602..a519a6dc24d 100644 --- a/3rdparty/glm/glm/detail/dummy.cpp +++ b/3rdparty/glm/glm/detail/dummy.cpp @@ -3,7 +3,6 @@ /// /// GLM is a header only library. There is nothing to compile. /// dummy.cpp exist only a wordaround for CMake file. -/////////////////////////////////////////////////////////////////////////////////// /* #define GLM_MESSAGES diff --git a/3rdparty/glm/glm/detail/func_common.inl b/3rdparty/glm/glm/detail/func_common.inl index 5dbcb72a54b..6c39092ef91 100644 --- a/3rdparty/glm/glm/detail/func_common.inl +++ b/3rdparty/glm/glm/detail/func_common.inl @@ -8,6 +8,61 @@ #include "_vectorize.hpp" #include <limits> +namespace glm +{ + // min + template <typename genType> + GLM_FUNC_QUALIFIER genType min(genType x, genType y) + { + GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559 || std::numeric_limits<genType>::is_integer, "'min' only accept floating-point or integer inputs"); + return x < y ? x : y; + } + + // max + template <typename genType> + GLM_FUNC_QUALIFIER genType max(genType x, genType y) + { + GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559 || std::numeric_limits<genType>::is_integer, "'max' only accept floating-point or integer inputs"); + + return x > y ? x : y; + } + + // abs + template <> + GLM_FUNC_QUALIFIER int32 abs(int32 x) + { + int32 const y = x >> 31; + return (x ^ y) - y; + } + + // round +# if GLM_HAS_CXX11_STL + using ::std::round; +# else + template <typename genType> + GLM_FUNC_QUALIFIER genType round(genType x) + { + GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'round' only accept floating-point inputs"); + + return x < static_cast<genType>(0) ? static_cast<genType>(int(x - static_cast<genType>(0.5))) : static_cast<genType>(int(x + static_cast<genType>(0.5))); + } +# endif + + // trunc +# if GLM_HAS_CXX11_STL + using ::std::trunc; +# else + template <typename genType> + GLM_FUNC_QUALIFIER genType trunc(genType x) + { + GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'trunc' only accept floating-point inputs"); + + return x < static_cast<genType>(0) ? -std::floor(-x) : std::floor(x); + } +# endif + +}//namespace glm + namespace glm{ namespace detail { @@ -29,6 +84,17 @@ namespace detail } }; + #if GLM_COMPILER & GLM_COMPILER_CUDA + template <> + struct compute_abs<float, true> + { + GLM_FUNC_QUALIFIER static float call(float x) + { + return fabsf(x); + } + }; + #endif + template <typename genFIType> struct compute_abs<genFIType, false> { @@ -41,7 +107,16 @@ namespace detail } }; - template <typename T, typename U, precision P, template <class, precision> class vecType> + template <typename T, precision P, template <typename, precision> class vecType, bool Aligned> + struct compute_abs_vector + { + GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x) + { + return detail::functor1<T, T, P, vecType>::call(abs, x); + } + }; + + template <typename T, typename U, precision P, template <typename, precision> class vecType, bool Aligned> struct compute_mix_vector { GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, vecType<U, P> const & a) @@ -52,8 +127,8 @@ namespace detail } }; - template <typename T, precision P, template <class, precision> class vecType> - struct compute_mix_vector<T, bool, P, vecType> + template <typename T, precision P, template <typename, precision> class vecType, bool Aligned> + struct compute_mix_vector<T, bool, P, vecType, Aligned> { GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, vecType<bool, P> const & a) { @@ -64,7 +139,7 @@ namespace detail } }; - template <typename T, typename U, precision P, template <class, precision> class vecType> + template <typename T, typename U, precision P, template <typename, precision> class vecType, bool Aligned> struct compute_mix_scalar { GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, U const & a) @@ -75,8 +150,8 @@ namespace detail } }; - template <typename T, precision P, template <class, precision> class vecType> - struct compute_mix_scalar<T, bool, P, vecType> + template <typename T, precision P, template <typename, precision> class vecType, bool Aligned> + struct compute_mix_scalar<T, bool, P, vecType, Aligned> { GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, bool const & a) { @@ -104,7 +179,7 @@ namespace detail } }; - template <typename T, precision P, template <class, precision> class vecType, bool isFloat = true, bool isSigned = true> + template <typename T, precision P, template <typename, precision> class vecType, bool isFloat, bool Aligned> struct compute_sign { GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x) @@ -113,45 +188,122 @@ namespace detail } }; - template <typename T, precision P, template <class, precision> class vecType> - struct compute_sign<T, P, vecType, false, false> +# if GLM_ARCH == GLM_ARCH_X86 + template <typename T, precision P, template <typename, precision> class vecType, bool Aligned> + struct compute_sign<T, P, vecType, false, Aligned> + { + GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x) + { + T const Shift(static_cast<T>(sizeof(T) * 8 - 1)); + vecType<T, P> const y(vecType<typename make_unsigned<T>::type, P>(-x) >> typename make_unsigned<T>::type(Shift)); + + return (x >> Shift) | y; + } + }; +# endif + + template <typename T, precision P, template <typename, precision> class vecType, bool Aligned> + struct compute_floor { GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x) { - return vecType<T, P>(glm::greaterThan(x , vecType<T, P>(0))); + return detail::functor1<T, T, P, vecType>::call(std::floor, x); } }; - template <typename T, precision P, template <class, precision> class vecType> - struct compute_sign<T, P, vecType, false, true> + template <typename T, precision P, template <typename, precision> class vecType, bool Aligned> + struct compute_ceil { GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x) { - T const Shift(static_cast<T>(sizeof(T) * 8 - 1)); - vecType<T, P> const y(vecType<typename make_unsigned<T>::type, P>(-x) >> typename make_unsigned<T>::type(Shift)); + return detail::functor1<T, T, P, vecType>::call(std::ceil, x); + } + }; - return (x >> Shift) | y; + template <typename T, precision P, template <typename, precision> class vecType, bool Aligned> + struct compute_fract + { + GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x) + { + return x - floor(x); + } + }; + + template <typename T, precision P, template <typename, precision> class vecType, bool Aligned> + struct compute_trunc + { + GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x) + { + return detail::functor1<T, T, P, vecType>::call(trunc, x); + } + }; + + template <typename T, precision P, template <typename, precision> class vecType, bool Aligned> + struct compute_round + { + GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x) + { + return detail::functor1<T, T, P, vecType>::call(round, x); } }; - template <typename T, precision P, template <class, precision> class vecType, typename genType, bool isFloat = true> + template <typename T, precision P, template <typename, precision> class vecType, bool Aligned> struct compute_mod { - GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & a, genType const & b) + GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & a, vecType<T, P> const & b) { GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'mod' only accept floating-point inputs. Include <glm/gtc/integer.hpp> for integer inputs."); return a - b * floor(a / b); } }; -}//namespace detail - // abs - template <> - GLM_FUNC_QUALIFIER int32 abs(int32 x) + template <typename T, precision P, template <typename, precision> class vecType, bool Aligned> + struct compute_min_vector { - int32 const y = x >> 31; - return (x ^ y) - y; - } + GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y) + { + return detail::functor2<T, P, vecType>::call(min, x, y); + } + }; + + template <typename T, precision P, template <typename, precision> class vecType, bool Aligned> + struct compute_max_vector + { + GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y) + { + return detail::functor2<T, P, vecType>::call(max, x, y); + } + }; + + template <typename T, precision P, template <typename, precision> class vecType, bool Aligned> + struct compute_clamp_vector + { + GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & minVal, vecType<T, P> const & maxVal) + { + return min(max(x, minVal), maxVal); + } + }; + + template <typename T, precision P, template <typename, precision> class vecType, bool Aligned> + struct compute_step_vector + { + GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & edge, vecType<T, P> const & x) + { + return mix(vecType<T, P>(1), vecType<T, P>(0), glm::lessThan(x, edge)); + } + }; + + template <typename T, precision P, template <typename, precision> class vecType, bool Aligned> + struct compute_smoothstep_vector + { + GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & edge0, vecType<T, P> const & edge1, vecType<T, P> const & x) + { + GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'step' only accept floating-point inputs"); + vecType<T, P> const tmp(clamp((x - edge0) / (edge1 - edge0), static_cast<T>(0), static_cast<T>(1))); + return tmp * tmp * (static_cast<T>(3) - static_cast<T>(2) * tmp); + } + }; +}//namespace detail template <typename genFIType> GLM_FUNC_QUALIFIER genFIType abs(genFIType x) @@ -162,7 +314,7 @@ namespace detail template <typename T, precision P, template <typename, precision> class vecType> GLM_FUNC_QUALIFIER vecType<T, P> abs(vecType<T, P> const & x) { - return detail::functor1<T, T, P, vecType>::call(abs, x); + return detail::compute_abs_vector<T, P, vecType, detail::is_aligned<P>::value>::call(x); } // sign @@ -174,7 +326,7 @@ namespace detail std::numeric_limits<genFIType>::is_iec559 || (std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer), "'sign' only accept signed inputs"); - return detail::compute_sign<genFIType, defaultp, tvec1, std::numeric_limits<genFIType>::is_iec559>::call(tvec1<genFIType>(x)).x; + return detail::compute_sign<genFIType, defaultp, tvec1, std::numeric_limits<genFIType>::is_iec559, highp>::call(tvec1<genFIType>(x)).x; } template <typename T, precision P, template <typename, precision> class vecType> @@ -184,7 +336,7 @@ namespace detail std::numeric_limits<T>::is_iec559 || (std::numeric_limits<T>::is_signed && std::numeric_limits<T>::is_integer), "'sign' only accept signed inputs"); - return detail::compute_sign<T, P, vecType, std::numeric_limits<T>::is_iec559>::call(x); + return detail::compute_sign<T, P, vecType, std::numeric_limits<T>::is_iec559, detail::is_aligned<P>::value>::call(x); } // floor @@ -192,45 +344,22 @@ namespace detail template <typename T, precision P, template <typename, precision> class vecType> GLM_FUNC_QUALIFIER vecType<T, P> floor(vecType<T, P> const & x) { - return detail::functor1<T, T, P, vecType>::call(floor, x); + GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'floor' only accept floating-point inputs."); + return detail::compute_floor<T, P, vecType, detail::is_aligned<P>::value>::call(x); } - // trunc -# if GLM_HAS_CXX11_STL - using ::std::trunc; -# else - template <typename genType> - GLM_FUNC_QUALIFIER genType trunc(genType x) - { - GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'trunc' only accept floating-point inputs"); - - return x < static_cast<genType>(0) ? -floor(-x) : floor(x); - } -# endif - template <typename T, precision P, template <typename, precision> class vecType> GLM_FUNC_QUALIFIER vecType<T, P> trunc(vecType<T, P> const & x) { - return detail::functor1<T, T, P, vecType>::call(trunc, x); + GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'trunc' only accept floating-point inputs"); + return detail::compute_trunc<T, P, vecType, detail::is_aligned<P>::value>::call(x); } - // round -# if GLM_HAS_CXX11_STL - using ::std::round; -# else - template <typename genType> - GLM_FUNC_QUALIFIER genType round(genType x) - { - GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'round' only accept floating-point inputs"); - - return x < static_cast<genType>(0) ? static_cast<genType>(int(x - static_cast<genType>(0.5))) : static_cast<genType>(int(x + static_cast<genType>(0.5))); - } -# endif - template <typename T, precision P, template <typename, precision> class vecType> GLM_FUNC_QUALIFIER vecType<T, P> round(vecType<T, P> const & x) { - return detail::functor1<T, T, P, vecType>::call(round, x); + GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'round' only accept floating-point inputs"); + return detail::compute_round<T, P, vecType, detail::is_aligned<P>::value>::call(x); } /* @@ -279,6 +408,7 @@ namespace detail template <typename T, precision P, template <typename, precision> class vecType> GLM_FUNC_QUALIFIER vecType<T, P> roundEven(vecType<T, P> const & x) { + GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'roundEven' only accept floating-point inputs"); return detail::functor1<T, T, P, vecType>::call(roundEven, x); } @@ -287,41 +417,47 @@ namespace detail template <typename T, precision P, template <typename, precision> class vecType> GLM_FUNC_QUALIFIER vecType<T, P> ceil(vecType<T, P> const & x) { - return detail::functor1<T, T, P, vecType>::call(ceil, x); + GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'ceil' only accept floating-point inputs"); + return detail::compute_ceil<T, P, vecType, detail::is_aligned<P>::value>::call(x); } // fract template <typename genType> GLM_FUNC_QUALIFIER genType fract(genType x) { - GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'fract' only accept floating-point inputs"); - return fract(tvec1<genType>(x)).x; } template <typename T, precision P, template <typename, precision> class vecType> GLM_FUNC_QUALIFIER vecType<T, P> fract(vecType<T, P> const & x) { - return x - floor(x); + GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'fract' only accept floating-point inputs"); + return detail::compute_fract<T, P, vecType, detail::is_aligned<P>::value>::call(x); } // mod template <typename genType> GLM_FUNC_QUALIFIER genType mod(genType x, genType y) { - return mod(tvec1<genType>(x), y).x; +# if GLM_COMPILER & GLM_COMPILER_CUDA + // Another Cuda compiler bug https://github.com/g-truc/glm/issues/530 + tvec1<genType, defaultp> Result(mod(tvec1<genType, defaultp>(x), y)); + return Result.x; +# else + return mod(tvec1<genType, defaultp>(x), y).x; +# endif } template <typename T, precision P, template <typename, precision> class vecType> GLM_FUNC_QUALIFIER vecType<T, P> mod(vecType<T, P> const & x, T y) { - return detail::compute_mod<T, P, vecType, T, std::numeric_limits<T>::is_iec559>::call(x, y); + return detail::compute_mod<T, P, vecType, detail::is_aligned<P>::value>::call(x, vecType<T, P>(y)); } template <typename T, precision P, template <typename, precision> class vecType> GLM_FUNC_QUALIFIER vecType<T, P> mod(vecType<T, P> const & x, vecType<T, P> const & y) { - return detail::compute_mod<T, P, vecType, vecType<T, P>, std::numeric_limits<T>::is_iec559>::call(x, y); + return detail::compute_mod<T, P, vecType, detail::is_aligned<P>::value>::call(x, y); } // modf @@ -329,7 +465,6 @@ namespace detail GLM_FUNC_QUALIFIER genType modf(genType x, genType & i) { GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'modf' only accept floating-point inputs"); - return std::modf(x, &i); } @@ -376,45 +511,30 @@ namespace detail //CHAR_BIT - 1))); // min - template <typename genType> - GLM_FUNC_QUALIFIER genType min(genType x, genType y) - { - GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559 || std::numeric_limits<genType>::is_integer, "'min' only accept floating-point or integer inputs"); - - return x < y ? x : y; - } - template <typename T, precision P, template <typename, precision> class vecType> GLM_FUNC_QUALIFIER vecType<T, P> min(vecType<T, P> const & a, T b) { - return detail::functor2_vec_sca<T, P, vecType>::call(min, a, b); + GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'min' only accept floating-point inputs for the interpolator a"); + return detail::compute_min_vector<T, P, vecType, detail::is_aligned<P>::value>::call(a, vecType<T, P>(b)); } template <typename T, precision P, template <typename, precision> class vecType> GLM_FUNC_QUALIFIER vecType<T, P> min(vecType<T, P> const & a, vecType<T, P> const & b) { - return detail::functor2<T, P, vecType>::call(min, a, b); + return detail::compute_min_vector<T, P, vecType, detail::is_aligned<P>::value>::call(a, b); } // max - template <typename genType> - GLM_FUNC_QUALIFIER genType max(genType x, genType y) - { - GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559 || std::numeric_limits<genType>::is_integer, "'max' only accept floating-point or integer inputs"); - - return x > y ? x : y; - } - template <typename T, precision P, template <typename, precision> class vecType> GLM_FUNC_QUALIFIER vecType<T, P> max(vecType<T, P> const & a, T b) { - return detail::functor2_vec_sca<T, P, vecType>::call(max, a, b); + return detail::compute_max_vector<T, P, vecType, detail::is_aligned<P>::value>::call(a, vecType<T, P>(b)); } template <typename T, precision P, template <typename, precision> class vecType> GLM_FUNC_QUALIFIER vecType<T, P> max(vecType<T, P> const & a, vecType<T, P> const & b) { - return detail::functor2<T, P, vecType>::call(max, a, b); + return detail::compute_max_vector<T, P, vecType, detail::is_aligned<P>::value>::call(a, b); } // clamp @@ -422,7 +542,6 @@ namespace detail GLM_FUNC_QUALIFIER genType clamp(genType x, genType minVal, genType maxVal) { GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559 || std::numeric_limits<genType>::is_integer, "'clamp' only accept floating-point or integer inputs"); - return min(max(x, minVal), maxVal); } @@ -430,16 +549,14 @@ namespace detail GLM_FUNC_QUALIFIER vecType<T, P> clamp(vecType<T, P> const & x, T minVal, T maxVal) { GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer, "'clamp' only accept floating-point or integer inputs"); - - return min(max(x, minVal), maxVal); + return detail::compute_clamp_vector<T, P, vecType, detail::is_aligned<P>::value>::call(x, vecType<T, P>(minVal), vecType<T, P>(maxVal)); } template <typename T, precision P, template <typename, precision> class vecType> GLM_FUNC_QUALIFIER vecType<T, P> clamp(vecType<T, P> const & x, vecType<T, P> const & minVal, vecType<T, P> const & maxVal) { GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer, "'clamp' only accept floating-point or integer inputs"); - - return min(max(x, minVal), maxVal); + return detail::compute_clamp_vector<T, P, vecType, detail::is_aligned<P>::value>::call(x, minVal, maxVal); } template <typename genTypeT, typename genTypeU> @@ -451,13 +568,13 @@ namespace detail template <typename T, typename U, precision P, template <typename, precision> class vecType> GLM_FUNC_QUALIFIER vecType<T, P> mix(vecType<T, P> const & x, vecType<T, P> const & y, U a) { - return detail::compute_mix_scalar<T, U, P, vecType>::call(x, y, a); + return detail::compute_mix_scalar<T, U, P, vecType, detail::is_aligned<P>::value>::call(x, y, a); } template <typename T, typename U, precision P, template <typename, precision> class vecType> GLM_FUNC_QUALIFIER vecType<T, P> mix(vecType<T, P> const & x, vecType<T, P> const & y, vecType<U, P> const & a) { - return detail::compute_mix_vector<T, U, P, vecType>::call(x, y, a); + return detail::compute_mix_vector<T, U, P, vecType, detail::is_aligned<P>::value>::call(x, y, a); } // step @@ -470,15 +587,13 @@ namespace detail template <template <typename, precision> class vecType, typename T, precision P> GLM_FUNC_QUALIFIER vecType<T, P> step(T edge, vecType<T, P> const & x) { - GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'step' only accept floating-point inputs"); - - return mix(vecType<T, P>(1), vecType<T, P>(0), glm::lessThan(x, vecType<T, P>(edge))); + return detail::compute_step_vector<T, P, vecType, detail::is_aligned<P>::value>::call(vecType<T, P>(edge), x); } template <template <typename, precision> class vecType, typename T, precision P> GLM_FUNC_QUALIFIER vecType<T, P> step(vecType<T, P> const & edge, vecType<T, P> const & x) { - return mix(vecType<T, P>(1), vecType<T, P>(0), glm::lessThan(x, edge)); + return detail::compute_step_vector<T, P, vecType, detail::is_aligned<P>::value>::call(edge, x); } // smoothstep @@ -494,19 +609,13 @@ namespace detail template <typename T, precision P, template <typename, precision> class vecType> GLM_FUNC_QUALIFIER vecType<T, P> smoothstep(T edge0, T edge1, vecType<T, P> const & x) { - GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'smoothstep' only accept floating-point inputs"); - - vecType<T, P> const tmp(clamp((x - edge0) / (edge1 - edge0), static_cast<T>(0), static_cast<T>(1))); - return tmp * tmp * (static_cast<T>(3) - static_cast<T>(2) * tmp); + return detail::compute_smoothstep_vector<T, P, vecType, detail::is_aligned<P>::value>::call(vecType<T, P>(edge0), vecType<T, P>(edge1), x); } template <typename T, precision P, template <typename, precision> class vecType> GLM_FUNC_QUALIFIER vecType<T, P> smoothstep(vecType<T, P> const & edge0, vecType<T, P> const & edge1, vecType<T, P> const & x) { - GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'smoothstep' only accept floating-point inputs"); - - vecType<T, P> const tmp(clamp((x - edge0) / (edge1 - edge0), static_cast<T>(0), static_cast<T>(1))); - return tmp * tmp * (static_cast<T>(3) - static_cast<T>(2) * tmp); + return detail::compute_smoothstep_vector<T, P, vecType, detail::is_aligned<P>::value>::call(edge0, edge1, x); } # if GLM_HAS_CXX11_STL @@ -527,7 +636,7 @@ namespace detail # else return ::isnan(x) != 0; # endif -# elif (GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM)) && (GLM_PLATFORM & GLM_PLATFORM_ANDROID) && __cplusplus < 201103L +# elif (GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG)) && (GLM_PLATFORM & GLM_PLATFORM_ANDROID) && __cplusplus < 201103L return _isnan(x) != 0; # elif GLM_COMPILER & GLM_COMPILER_CUDA return isnan(x) != 0; @@ -561,7 +670,7 @@ namespace detail # else return ::isinf(x); # endif -# elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM) +# elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG) # if(GLM_PLATFORM & GLM_PLATFORM_ANDROID && __cplusplus < 201103L) return _isinf(x) != 0; # else @@ -734,6 +843,6 @@ namespace detail } }//namespace glm -#if GLM_ARCH != GLM_ARCH_PURE +#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_UNRESTRICTED_UNIONS # include "func_common_simd.inl" #endif diff --git a/3rdparty/glm/glm/detail/func_common_simd.inl b/3rdparty/glm/glm/detail/func_common_simd.inl index c7abee2511d..c76f1802070 100644 --- a/3rdparty/glm/glm/detail/func_common_simd.inl +++ b/3rdparty/glm/glm/detail/func_common_simd.inl @@ -1,109 +1,231 @@ +/// @ref core +/// @file glm/detail/func_common_simd.inl + +#if GLM_ARCH & GLM_ARCH_SSE2_BIT + +#include "../simd/common.h" + +#include <immintrin.h> + namespace glm{ namespace detail { -/* - static const __m128 GLM_VAR_USED zero = _mm_setzero_ps(); - static const __m128 GLM_VAR_USED one = _mm_set_ps1(1.0f); - static const __m128 GLM_VAR_USED minus_one = _mm_set_ps1(-1.0f); - static const __m128 GLM_VAR_USED two = _mm_set_ps1(2.0f); - static const __m128 GLM_VAR_USED three = _mm_set_ps1(3.0f); - static const __m128 GLM_VAR_USED pi = _mm_set_ps1(3.1415926535897932384626433832795f); - static const __m128 GLM_VAR_USED hundred_eighty = _mm_set_ps1(180.f); - static const __m128 GLM_VAR_USED pi_over_hundred_eighty = _mm_set_ps1(0.017453292519943295769236907684886f); - static const __m128 GLM_VAR_USED hundred_eighty_over_pi = _mm_set_ps1(57.295779513082320876798154814105f); - - static const ieee754_QNAN absMask; - static const __m128 GLM_VAR_USED abs4Mask = _mm_set_ps1(absMask.f); - - static const __m128 GLM_VAR_USED _epi32_sign_mask = _mm_castsi128_ps(_mm_set1_epi32(static_cast<int>(0x80000000))); - //static const __m128 GLM_VAR_USED _epi32_inv_sign_mask = _mm_castsi128_ps(_mm_set1_epi32(0x7FFFFFFF)); - //static const __m128 GLM_VAR_USED _epi32_mant_mask = _mm_castsi128_ps(_mm_set1_epi32(0x7F800000)); - //static const __m128 GLM_VAR_USED _epi32_inv_mant_mask = _mm_castsi128_ps(_mm_set1_epi32(0x807FFFFF)); - //static const __m128 GLM_VAR_USED _epi32_min_norm_pos = _mm_castsi128_ps(_mm_set1_epi32(0x00800000)); - static const __m128 GLM_VAR_USED _epi32_0 = _mm_set_ps1(0); - static const __m128 GLM_VAR_USED _epi32_1 = _mm_set_ps1(1); - static const __m128 GLM_VAR_USED _epi32_2 = _mm_set_ps1(2); - static const __m128 GLM_VAR_USED _epi32_3 = _mm_set_ps1(3); - static const __m128 GLM_VAR_USED _epi32_4 = _mm_set_ps1(4); - static const __m128 GLM_VAR_USED _epi32_5 = _mm_set_ps1(5); - static const __m128 GLM_VAR_USED _epi32_6 = _mm_set_ps1(6); - static const __m128 GLM_VAR_USED _epi32_7 = _mm_set_ps1(7); - static const __m128 GLM_VAR_USED _epi32_8 = _mm_set_ps1(8); - static const __m128 GLM_VAR_USED _epi32_9 = _mm_set_ps1(9); - static const __m128 GLM_VAR_USED _epi32_127 = _mm_set_ps1(127); - //static const __m128 GLM_VAR_USED _epi32_ninf = _mm_castsi128_ps(_mm_set1_epi32(0xFF800000)); - //static const __m128 GLM_VAR_USED _epi32_pinf = _mm_castsi128_ps(_mm_set1_epi32(0x7F800000)); - - static const __m128 GLM_VAR_USED _ps_1_3 = _mm_set_ps1(0.33333333333333333333333333333333f); - static const __m128 GLM_VAR_USED _ps_0p5 = _mm_set_ps1(0.5f); - static const __m128 GLM_VAR_USED _ps_1 = _mm_set_ps1(1.0f); - static const __m128 GLM_VAR_USED _ps_m1 = _mm_set_ps1(-1.0f); - static const __m128 GLM_VAR_USED _ps_2 = _mm_set_ps1(2.0f); - static const __m128 GLM_VAR_USED _ps_3 = _mm_set_ps1(3.0f); - static const __m128 GLM_VAR_USED _ps_127 = _mm_set_ps1(127.0f); - static const __m128 GLM_VAR_USED _ps_255 = _mm_set_ps1(255.0f); - static const __m128 GLM_VAR_USED _ps_2pow23 = _mm_set_ps1(8388608.0f); - - static const __m128 GLM_VAR_USED _ps_1_0_0_0 = _mm_set_ps(1.0f, 0.0f, 0.0f, 0.0f); - static const __m128 GLM_VAR_USED _ps_0_1_0_0 = _mm_set_ps(0.0f, 1.0f, 0.0f, 0.0f); - static const __m128 GLM_VAR_USED _ps_0_0_1_0 = _mm_set_ps(0.0f, 0.0f, 1.0f, 0.0f); - static const __m128 GLM_VAR_USED _ps_0_0_0_1 = _mm_set_ps(0.0f, 0.0f, 0.0f, 1.0f); - - static const __m128 GLM_VAR_USED _ps_pi = _mm_set_ps1(3.1415926535897932384626433832795f); - static const __m128 GLM_VAR_USED _ps_pi2 = _mm_set_ps1(6.283185307179586476925286766560f); - static const __m128 GLM_VAR_USED _ps_2_pi = _mm_set_ps1(0.63661977236758134307553505349006f); - static const __m128 GLM_VAR_USED _ps_pi_2 = _mm_set_ps1(1.5707963267948966192313216916398f); - static const __m128 GLM_VAR_USED _ps_4_pi = _mm_set_ps1(1.2732395447351626861510701069801f); - static const __m128 GLM_VAR_USED _ps_pi_4 = _mm_set_ps1(0.78539816339744830961566084581988f); - - static const __m128 GLM_VAR_USED _ps_sincos_p0 = _mm_set_ps1(0.15707963267948963959e1f); - static const __m128 GLM_VAR_USED _ps_sincos_p1 = _mm_set_ps1(-0.64596409750621907082e0f); - static const __m128 GLM_VAR_USED _ps_sincos_p2 = _mm_set_ps1(0.7969262624561800806e-1f); - static const __m128 GLM_VAR_USED _ps_sincos_p3 = _mm_set_ps1(-0.468175413106023168e-2f); - static const __m128 GLM_VAR_USED _ps_tan_p0 = _mm_set_ps1(-1.79565251976484877988e7f); - static const __m128 GLM_VAR_USED _ps_tan_p1 = _mm_set_ps1(1.15351664838587416140e6f); - static const __m128 GLM_VAR_USED _ps_tan_p2 = _mm_set_ps1(-1.30936939181383777646e4f); - static const __m128 GLM_VAR_USED _ps_tan_q0 = _mm_set_ps1(-5.38695755929454629881e7f); - static const __m128 GLM_VAR_USED _ps_tan_q1 = _mm_set_ps1(2.50083801823357915839e7f); - static const __m128 GLM_VAR_USED _ps_tan_q2 = _mm_set_ps1(-1.32089234440210967447e6f); - static const __m128 GLM_VAR_USED _ps_tan_q3 = _mm_set_ps1(1.36812963470692954678e4f); - static const __m128 GLM_VAR_USED _ps_tan_poleval = _mm_set_ps1(3.68935e19f); - static const __m128 GLM_VAR_USED _ps_atan_t0 = _mm_set_ps1(-0.91646118527267623468e-1f); - static const __m128 GLM_VAR_USED _ps_atan_t1 = _mm_set_ps1(-0.13956945682312098640e1f); - static const __m128 GLM_VAR_USED _ps_atan_t2 = _mm_set_ps1(-0.94393926122725531747e2f); - static const __m128 GLM_VAR_USED _ps_atan_t3 = _mm_set_ps1(0.12888383034157279340e2f); - static const __m128 GLM_VAR_USED _ps_atan_s0 = _mm_set_ps1(0.12797564625607904396e1f); - static const __m128 GLM_VAR_USED _ps_atan_s1 = _mm_set_ps1(0.21972168858277355914e1f); - static const __m128 GLM_VAR_USED _ps_atan_s2 = _mm_set_ps1(0.68193064729268275701e1f); - static const __m128 GLM_VAR_USED _ps_atan_s3 = _mm_set_ps1(0.28205206687035841409e2f); - - static const __m128 GLM_VAR_USED _ps_exp_hi = _mm_set_ps1(88.3762626647949f); - static const __m128 GLM_VAR_USED _ps_exp_lo = _mm_set_ps1(-88.3762626647949f); - static const __m128 GLM_VAR_USED _ps_exp_rln2 = _mm_set_ps1(1.4426950408889634073599f); - static const __m128 GLM_VAR_USED _ps_exp_p0 = _mm_set_ps1(1.26177193074810590878e-4f); - static const __m128 GLM_VAR_USED _ps_exp_p1 = _mm_set_ps1(3.02994407707441961300e-2f); - static const __m128 GLM_VAR_USED _ps_exp_q0 = _mm_set_ps1(3.00198505138664455042e-6f); - static const __m128 GLM_VAR_USED _ps_exp_q1 = _mm_set_ps1(2.52448340349684104192e-3f); - static const __m128 GLM_VAR_USED _ps_exp_q2 = _mm_set_ps1(2.27265548208155028766e-1f); - static const __m128 GLM_VAR_USED _ps_exp_q3 = _mm_set_ps1(2.00000000000000000009e0f); - static const __m128 GLM_VAR_USED _ps_exp_c1 = _mm_set_ps1(6.93145751953125e-1f); - static const __m128 GLM_VAR_USED _ps_exp_c2 = _mm_set_ps1(1.42860682030941723212e-6f); - static const __m128 GLM_VAR_USED _ps_exp2_hi = _mm_set_ps1(127.4999961853f); - static const __m128 GLM_VAR_USED _ps_exp2_lo = _mm_set_ps1(-127.4999961853f); - static const __m128 GLM_VAR_USED _ps_exp2_p0 = _mm_set_ps1(2.30933477057345225087e-2f); - static const __m128 GLM_VAR_USED _ps_exp2_p1 = _mm_set_ps1(2.02020656693165307700e1f); - static const __m128 GLM_VAR_USED _ps_exp2_p2 = _mm_set_ps1(1.51390680115615096133e3f); - static const __m128 GLM_VAR_USED _ps_exp2_q0 = _mm_set_ps1(2.33184211722314911771e2f); - static const __m128 GLM_VAR_USED _ps_exp2_q1 = _mm_set_ps1(4.36821166879210612817e3f); - static const __m128 GLM_VAR_USED _ps_log_p0 = _mm_set_ps1(-7.89580278884799154124e-1f); - static const __m128 GLM_VAR_USED _ps_log_p1 = _mm_set_ps1(1.63866645699558079767e1f); - static const __m128 GLM_VAR_USED _ps_log_p2 = _mm_set_ps1(-6.41409952958715622951e1f); - static const __m128 GLM_VAR_USED _ps_log_q0 = _mm_set_ps1(-3.56722798256324312549e1f); - static const __m128 GLM_VAR_USED _ps_log_q1 = _mm_set_ps1(3.12093766372244180303e2f); - static const __m128 GLM_VAR_USED _ps_log_q2 = _mm_set_ps1(-7.69691943550460008604e2f); - static const __m128 GLM_VAR_USED _ps_log_c0 = _mm_set_ps1(0.693147180559945f); - static const __m128 GLM_VAR_USED _ps_log2_c0 = _mm_set_ps1(1.44269504088896340735992f); -*/ + template <precision P> + struct compute_abs_vector<float, P, tvec4, true> + { + GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & v) + { + tvec4<float, P> result(uninitialize); + result.data = glm_vec4_abs(v.data); + return result; + } + }; + + template <precision P> + struct compute_abs_vector<int, P, tvec4, true> + { + GLM_FUNC_QUALIFIER static tvec4<int, P> call(tvec4<int, P> const & v) + { + tvec4<int, P> result(uninitialize); + result.data = glm_ivec4_abs(v.data); + return result; + } + }; + + template <precision P> + struct compute_floor<float, P, tvec4, true> + { + GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & v) + { + tvec4<float, P> result(uninitialize); + result.data = glm_vec4_floor(v.data); + return result; + } + }; + + template <precision P> + struct compute_ceil<float, P, tvec4, true> + { + GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & v) + { + tvec4<float, P> result(uninitialize); + result.data = glm_vec4_ceil(v.data); + return result; + } + }; + + template <precision P> + struct compute_fract<float, P, tvec4, true> + { + GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & v) + { + tvec4<float, P> result(uninitialize); + result.data = glm_vec4_fract(v.data); + return result; + } + }; + + template <precision P> + struct compute_round<float, P, tvec4, true> + { + GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & v) + { + tvec4<float, P> result(uninitialize); + result.data = glm_vec4_round(v.data); + return result; + } + }; + + template <precision P> + struct compute_mod<float, P, tvec4, true> + { + GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & x, tvec4<float, P> const & y) + { + tvec4<float, P> result(uninitialize); + result.data = glm_vec4_mod(x.data, y.data); + return result; + } + }; + + template <precision P> + struct compute_min_vector<float, P, tvec4, true> + { + GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & v1, tvec4<float, P> const & v2) + { + tvec4<float, P> result(uninitialize); + result.data = _mm_min_ps(v1.data, v2.data); + return result; + } + }; + template <precision P> + struct compute_min_vector<int32, P, tvec4, true> + { + GLM_FUNC_QUALIFIER static tvec4<int32, P> call(tvec4<int32, P> const & v1, tvec4<int32, P> const & v2) + { + tvec4<int32, P> result(uninitialize); + result.data = _mm_min_epi32(v1.data, v2.data); + return result; + } + }; + + template <precision P> + struct compute_min_vector<uint32, P, tvec4, true> + { + GLM_FUNC_QUALIFIER static tvec4<int32, P> call(tvec4<uint32, P> const & v1, tvec4<uint32, P> const & v2) + { + tvec4<uint32, P> result(uninitialize); + result.data = _mm_min_epu32(v1.data, v2.data); + return result; + } + }; + + template <precision P> + struct compute_max_vector<float, P, tvec4, true> + { + GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & v1, tvec4<float, P> const & v2) + { + tvec4<float, P> result(uninitialize); + result.data = _mm_max_ps(v1.data, v2.data); + return result; + } + }; + + template <precision P> + struct compute_max_vector<int32, P, tvec4, true> + { + GLM_FUNC_QUALIFIER static tvec4<int32, P> call(tvec4<int32, P> const & v1, tvec4<int32, P> const & v2) + { + tvec4<int32, P> result(uninitialize); + result.data = _mm_max_epi32(v1.data, v2.data); + return result; + } + }; + + template <precision P> + struct compute_max_vector<uint32, P, tvec4, true> + { + GLM_FUNC_QUALIFIER static tvec4<uint32, P> call(tvec4<uint32, P> const & v1, tvec4<uint32, P> const & v2) + { + tvec4<uint32, P> result(uninitialize); + result.data = _mm_max_epu32(v1.data, v2.data); + return result; + } + }; + + template <precision P> + struct compute_clamp_vector<float, P, tvec4, true> + { + GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & x, tvec4<float, P> const & minVal, tvec4<float, P> const & maxVal) + { + tvec4<float, P> result(uninitialize); + result.data = _mm_min_ps(_mm_max_ps(x.data, minVal.data), maxVal.data); + return result; + } + }; + + template <precision P> + struct compute_clamp_vector<int32, P, tvec4, true> + { + GLM_FUNC_QUALIFIER static tvec4<int32, P> call(tvec4<int32, P> const & x, tvec4<int32, P> const & minVal, tvec4<int32, P> const & maxVal) + { + tvec4<int32, P> result(uninitialize); + result.data = _mm_min_epi32(_mm_max_epi32(x.data, minVal.data), maxVal.data); + return result; + } + }; + + template <precision P> + struct compute_clamp_vector<uint32, P, tvec4, true> + { + GLM_FUNC_QUALIFIER static tvec4<uint32, P> call(tvec4<uint32, P> const & x, tvec4<uint32, P> const & minVal, tvec4<uint32, P> const & maxVal) + { + tvec4<uint32, P> result(uninitialize); + result.data = _mm_min_epu32(_mm_max_epu32(x.data, minVal.data), maxVal.data); + return result; + } + }; + + template <precision P> + struct compute_mix_vector<float, bool, P, tvec4, true> + { + GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & x, tvec4<float, P> const & y, tvec4<bool, P> const & a) + { + __m128i const Load = _mm_set_epi32(-(int)a.w, -(int)a.z, -(int)a.y, -(int)a.x); + __m128 const Mask = _mm_castsi128_ps(Load); + + tvec4<float, P> Result(uninitialize); +# if 0 && GLM_ARCH & GLM_ARCH_AVX + Result.data = _mm_blendv_ps(x.data, y.data, Mask); +# else + Result.data = _mm_or_ps(_mm_and_ps(Mask, y.data), _mm_andnot_ps(Mask, x.data)); +# endif + return Result; + } + }; +/* FIXME + template <precision P> + struct compute_step_vector<float, P, tvec4> + { + GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const& edge, tvec4<float, P> const& x) + { + tvec4<float, P> result(uninitialize); + result.data = glm_vec4_step(edge.data, x.data); + return result; + } + }; +*/ + template <precision P> + struct compute_smoothstep_vector<float, P, tvec4, true> + { + GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const& edge0, tvec4<float, P> const& edge1, tvec4<float, P> const& x) + { + tvec4<float, P> result(uninitialize); + result.data = glm_vec4_smoothstep(edge0.data, edge1.data, x.data); + return result; + } + }; }//namespace detail }//namespace glm + +#endif//GLM_ARCH & GLM_ARCH_SSE2_BIT diff --git a/3rdparty/glm/glm/detail/func_exponential.inl b/3rdparty/glm/glm/detail/func_exponential.inl index 20d1141fdb1..227fe91a266 100644 --- a/3rdparty/glm/glm/detail/func_exponential.inl +++ b/3rdparty/glm/glm/detail/func_exponential.inl @@ -20,7 +20,7 @@ namespace detail } # endif - template <typename T, precision P, template <class, precision> class vecType, bool isFloat = true> + template <typename T, precision P, template <class, precision> class vecType, bool isFloat, bool Aligned> struct compute_log2 { GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & vec) @@ -29,7 +29,16 @@ namespace detail } }; - template <template <class, precision> class vecType, typename T, precision P> + template <template <class, precision> class vecType, typename T, precision P, bool Aligned> + struct compute_sqrt + { + GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x) + { + return detail::functor1<T, T, P, vecType>::call(std::sqrt, x); + } + }; + + template <template <class, precision> class vecType, typename T, precision P, bool Aligned> struct compute_inversesqrt { GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x) @@ -38,8 +47,8 @@ namespace detail } }; - template <template <class, precision> class vecType> - struct compute_inversesqrt<vecType, float, lowp> + template <template <class, precision> class vecType, bool Aligned> + struct compute_inversesqrt<vecType, float, lowp, Aligned> { GLM_FUNC_QUALIFIER static vecType<float, lowp> call(vecType<float, lowp> const & x) { @@ -104,7 +113,7 @@ namespace detail template <typename T, precision P, template <typename, precision> class vecType> GLM_FUNC_QUALIFIER vecType<T, P> log2(vecType<T, P> const & x) { - return detail::compute_log2<T, P, vecType, std::numeric_limits<T>::is_iec559>::call(x); + return detail::compute_log2<T, P, vecType, std::numeric_limits<T>::is_iec559, detail::is_aligned<P>::value>::call(x); } // sqrt @@ -113,7 +122,7 @@ namespace detail GLM_FUNC_QUALIFIER vecType<T, P> sqrt(vecType<T, P> const & x) { GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'sqrt' only accept floating-point inputs"); - return detail::functor1<T, T, P, vecType>::call(sqrt, x); + return detail::compute_sqrt<vecType, T, P, detail::is_aligned<P>::value>::call(x); } // inversesqrt @@ -127,6 +136,11 @@ namespace detail GLM_FUNC_QUALIFIER vecType<T, P> inversesqrt(vecType<T, P> const & x) { GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'inversesqrt' only accept floating-point inputs"); - return detail::compute_inversesqrt<vecType, T, P>::call(x); + return detail::compute_inversesqrt<vecType, T, P, detail::is_aligned<P>::value>::call(x); } }//namespace glm + +#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_UNRESTRICTED_UNIONS +# include "func_exponential_simd.inl" +#endif + diff --git a/3rdparty/glm/glm/detail/func_exponential_simd.inl b/3rdparty/glm/glm/detail/func_exponential_simd.inl new file mode 100644 index 00000000000..d7529ba35a7 --- /dev/null +++ b/3rdparty/glm/glm/detail/func_exponential_simd.inl @@ -0,0 +1,35 @@ +/// @ref core +/// @file glm/detail/func_exponential_simd.inl + +#include "../simd/exponential.h" + +#if GLM_ARCH & GLM_ARCH_SSE2_BIT + +namespace glm{ +namespace detail +{ + template <precision P> + struct compute_sqrt<tvec4, float, P, true> + { + GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & v) + { + tvec4<float, P> result(uninitialize); + result.data = _mm_sqrt_ps(v.data); + return result; + } + }; + + template <> + struct compute_sqrt<tvec4, float, aligned_lowp, true> + { + GLM_FUNC_QUALIFIER static tvec4<float, aligned_lowp> call(tvec4<float, aligned_lowp> const & v) + { + tvec4<float, aligned_lowp> result(uninitialize); + result.data = glm_vec4_sqrt_lowp(v.data); + return result; + } + }; +}//namespace detail +}//namespace glm + +#endif//GLM_ARCH & GLM_ARCH_SSE2_BIT diff --git a/3rdparty/glm/glm/detail/func_geometric.inl b/3rdparty/glm/glm/detail/func_geometric.inl index 5cd51dd6b72..07137c3aa8f 100644 --- a/3rdparty/glm/glm/detail/func_geometric.inl +++ b/3rdparty/glm/glm/detail/func_geometric.inl @@ -10,11 +10,29 @@ namespace glm{ namespace detail { - template <template <class, precision> class vecType, typename T, precision P> + template <template <typename, precision> class vecType, typename T, precision P, bool Aligned> + struct compute_length + { + GLM_FUNC_QUALIFIER static T call(vecType<T, P> const & v) + { + return sqrt(dot(v, v)); + } + }; + + template <template <typename, precision> class vecType, typename T, precision P, bool Aligned> + struct compute_distance + { + GLM_FUNC_QUALIFIER static T call(vecType<T, P> const & p0, vecType<T, P> const & p1) + { + return length(p1 - p0); + } + }; + + template <template <class, precision> class vecType, typename T, precision P, bool Aligned> struct compute_dot{}; - template <typename T, precision P> - struct compute_dot<tvec1, T, P> + template <typename T, precision P, bool Aligned> + struct compute_dot<tvec1, T, P, Aligned> { GLM_FUNC_QUALIFIER static T call(tvec1<T, P> const & a, tvec1<T, P> const & b) { @@ -22,8 +40,8 @@ namespace detail } }; - template <typename T, precision P> - struct compute_dot<tvec2, T, P> + template <typename T, precision P, bool Aligned> + struct compute_dot<tvec2, T, P, Aligned> { GLM_FUNC_QUALIFIER static T call(tvec2<T, P> const & x, tvec2<T, P> const & y) { @@ -32,8 +50,8 @@ namespace detail } }; - template <typename T, precision P> - struct compute_dot<tvec3, T, P> + template <typename T, precision P, bool Aligned> + struct compute_dot<tvec3, T, P, Aligned> { GLM_FUNC_QUALIFIER static T call(tvec3<T, P> const & x, tvec3<T, P> const & y) { @@ -42,8 +60,8 @@ namespace detail } }; - template <typename T, precision P> - struct compute_dot<tvec4, T, P> + template <typename T, precision P, bool Aligned> + struct compute_dot<tvec4, T, P, Aligned> { GLM_FUNC_QUALIFIER static T call(tvec4<T, P> const & x, tvec4<T, P> const & y) { @@ -51,6 +69,62 @@ namespace detail return (tmp.x + tmp.y) + (tmp.z + tmp.w); } }; + + template <typename T, precision P, bool Aligned> + struct compute_cross + { + GLM_FUNC_QUALIFIER static tvec3<T, P> call(tvec3<T, P> const & x, tvec3<T, P> const & y) + { + GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'cross' accepts only floating-point inputs"); + + return tvec3<T, P>( + x.y * y.z - y.y * x.z, + x.z * y.x - y.z * x.x, + x.x * y.y - y.x * x.y); + } + }; + + template <typename T, precision P, template <typename, precision> class vecType, bool Aligned> + struct compute_normalize + { + GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & v) + { + GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'normalize' accepts only floating-point inputs"); + + return v * inversesqrt(dot(v, v)); + } + }; + + template <typename T, precision P, template <typename, precision> class vecType, bool Aligned> + struct compute_faceforward + { + GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & N, vecType<T, P> const & I, vecType<T, P> const & Nref) + { + GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'normalize' accepts only floating-point inputs"); + + return dot(Nref, I) < static_cast<T>(0) ? N : -N; + } + }; + + template <typename T, precision P, template <typename, precision> class vecType, bool Aligned> + struct compute_reflect + { + GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & I, vecType<T, P> const & N) + { + return I - N * dot(N, I) * static_cast<T>(2); + } + }; + + template <typename T, precision P, template <typename, precision> class vecType, bool Aligned> + struct compute_refract + { + GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & I, vecType<T, P> const & N, T eta) + { + T const dotValue(dot(N, I)); + T const k(static_cast<T>(1) - eta * eta * (static_cast<T>(1) - dotValue * dotValue)); + return (eta * I - (eta * dotValue + std::sqrt(k)) * N) * static_cast<T>(k >= static_cast<T>(0)); + } + }; }//namespace detail // length @@ -67,7 +141,7 @@ namespace detail { GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'length' accepts only floating-point inputs"); - return sqrt(dot(v, v)); + return detail::compute_length<vecType, T, P, detail::is_aligned<P>::value>::call(v); } // distance @@ -82,7 +156,7 @@ namespace detail template <typename T, precision P, template <typename, precision> class vecType> GLM_FUNC_QUALIFIER T distance(vecType<T, P> const & p0, vecType<T, P> const & p1) { - return length(p1 - p0); + return detail::compute_distance<vecType, T, P, detail::is_aligned<P>::value>::call(p0, p1); } // dot @@ -97,19 +171,14 @@ namespace detail GLM_FUNC_QUALIFIER T dot(vecType<T, P> const & x, vecType<T, P> const & y) { GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'dot' accepts only floating-point inputs"); - return detail::compute_dot<vecType, T, P>::call(x, y); + return detail::compute_dot<vecType, T, P, detail::is_aligned<P>::value>::call(x, y); } // cross template <typename T, precision P> GLM_FUNC_QUALIFIER tvec3<T, P> cross(tvec3<T, P> const & x, tvec3<T, P> const & y) { - GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'cross' accepts only floating-point inputs"); - - return tvec3<T, P>( - x.y * y.z - y.y * x.z, - x.z * y.x - y.z * x.x, - x.x * y.y - y.x * x.y); + return detail::compute_cross<T, P, detail::is_aligned<P>::value>::call(x, y); } // normalize @@ -126,7 +195,7 @@ namespace detail { GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'normalize' accepts only floating-point inputs"); - return x * inversesqrt(dot(x, x)); + return detail::compute_normalize<T, P, vecType, detail::is_aligned<P>::value>::call(x); } // faceforward @@ -139,22 +208,27 @@ namespace detail template <typename T, precision P, template <typename, precision> class vecType> GLM_FUNC_QUALIFIER vecType<T, P> faceforward(vecType<T, P> const & N, vecType<T, P> const & I, vecType<T, P> const & Nref) { - return dot(Nref, I) < static_cast<T>(0) ? N : -N; + return detail::compute_faceforward<T, P, vecType, detail::is_aligned<P>::value>::call(N, I, Nref); } // reflect template <typename genType> GLM_FUNC_QUALIFIER genType reflect(genType const & I, genType const & N) { - return I - N * dot(N, I) * static_cast<genType>(2); + return I - N * dot(N, I) * genType(2); + } + + template <typename T, precision P, template <typename, precision> class vecType> + GLM_FUNC_QUALIFIER vecType<T, P> reflect(vecType<T, P> const & I, vecType<T, P> const & N) + { + return detail::compute_reflect<T, P, vecType, detail::is_aligned<P>::value>::call(I, N); } // refract template <typename genType> - GLM_FUNC_QUALIFIER genType refract(genType const & I, genType const & N, genType const & eta) + GLM_FUNC_QUALIFIER genType refract(genType const & I, genType const & N, genType eta) { GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'refract' accepts only floating-point inputs"); - genType const dotValue(dot(N, I)); genType const k(static_cast<genType>(1) - eta * eta * (static_cast<genType>(1) - dotValue * dotValue)); return (eta * I - (eta * dotValue + sqrt(k)) * N) * static_cast<genType>(k >= static_cast<genType>(0)); @@ -164,13 +238,10 @@ namespace detail GLM_FUNC_QUALIFIER vecType<T, P> refract(vecType<T, P> const & I, vecType<T, P> const & N, T eta) { GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'refract' accepts only floating-point inputs"); - - T const dotValue(dot(N, I)); - T const k(static_cast<T>(1) - eta * eta * (static_cast<T>(1) - dotValue * dotValue)); - return (eta * I - (eta * dotValue + std::sqrt(k)) * N) * static_cast<T>(k >= static_cast<T>(0)); + return detail::compute_refract<T, P, vecType, detail::is_aligned<P>::value>::call(I, N, eta); } }//namespace glm -#if GLM_ARCH != GLM_ARCH_PURE +#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_UNRESTRICTED_UNIONS # include "func_geometric_simd.inl" #endif diff --git a/3rdparty/glm/glm/detail/func_geometric_simd.inl b/3rdparty/glm/glm/detail/func_geometric_simd.inl index eed4643492f..225487284ac 100644 --- a/3rdparty/glm/glm/detail/func_geometric_simd.inl +++ b/3rdparty/glm/glm/detail/func_geometric_simd.inl @@ -1,22 +1,99 @@ +/// @ref core +/// @file glm/detail/func_geometric_simd.inl + #include "../simd/geometric.h" +#if GLM_ARCH & GLM_ARCH_SSE2_BIT + namespace glm{ namespace detail { -# if GLM_HAS_UNRESTRICTED_UNIONS - template <> - struct compute_dot<tvec4, float, simd> - { - GLM_FUNC_QUALIFIER static float call(tvec4<float, simd> const& x, tvec4<float, simd> const& y) - { - __m128 const dot0 = glm_dot_ss(x.data, y.data); - - float Result = 0; - _mm_store_ss(&Result, dot0); - return Result; - } - }; -# endif//GLM_HAS_UNRESTRICTED_UNIONS + template <precision P> + struct compute_length<tvec4, float, P, true> + { + GLM_FUNC_QUALIFIER static float call(tvec4<float, P> const & v) + { + return _mm_cvtss_f32(glm_vec4_length(v.data)); + } + }; + + template <precision P> + struct compute_distance<tvec4, float, P, true> + { + GLM_FUNC_QUALIFIER static float call(tvec4<float, P> const & p0, tvec4<float, P> const & p1) + { + return _mm_cvtss_f32(glm_vec4_distance(p0.data, p1.data)); + } + }; + + template <precision P> + struct compute_dot<tvec4, float, P, true> + { + GLM_FUNC_QUALIFIER static float call(tvec4<float, P> const& x, tvec4<float, P> const& y) + { + return _mm_cvtss_f32(glm_vec1_dot(x.data, y.data)); + } + }; + + template <precision P> + struct compute_cross<float, P, true> + { + GLM_FUNC_QUALIFIER static tvec3<float, P> call(tvec3<float, P> const & a, tvec3<float, P> const & b) + { + __m128 const set0 = _mm_set_ps(0.0f, a.z, a.y, a.x); + __m128 const set1 = _mm_set_ps(0.0f, b.z, b.y, b.x); + __m128 const xpd0 = glm_vec4_cross(set0, set1); + + tvec4<float, P> result(uninitialize); + result.data = xpd0; + return tvec3<float, P>(result); + } + }; + + template <precision P> + struct compute_normalize<float, P, tvec4, true> + { + GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const & v) + { + tvec4<float, P> result(uninitialize); + result.data = glm_vec4_normalize(v.data); + return result; + } + }; + + template <precision P> + struct compute_faceforward<float, P, tvec4, true> + { + GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const& N, tvec4<float, P> const& I, tvec4<float, P> const& Nref) + { + tvec4<float, P> result(uninitialize); + result.data = glm_vec4_faceforward(N.data. I.data, Nref.data); + return result; + } + }; + + template <precision P> + struct compute_reflect<float, P, tvec4, true> + { + GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const& I, tvec4<float, P> const& N) + { + tvec4<float, P> result(uninitialize); + result.data = glm_vec4_reflect(I.data, N.data); + return result; + } + }; + + template <precision P> + struct compute_refract<float, P, tvec4, true> + { + GLM_FUNC_QUALIFIER static tvec4<float, P> call(tvec4<float, P> const& I, tvec4<float, P> const& N, float eta) + { + tvec4<float, P> result(uninitialize); + result.data = glm_vec4_refract(I.data, N.data, _mm_set1_ps(eta)); + return result; + } + }; }//namespace detail }//namespace glm +#endif//GLM_ARCH & GLM_ARCH_SSE2_BIT diff --git a/3rdparty/glm/glm/detail/func_integer.inl b/3rdparty/glm/glm/detail/func_integer.inl index 204450349a0..25910eb067b 100644 --- a/3rdparty/glm/glm/detail/func_integer.inl +++ b/3rdparty/glm/glm/detail/func_integer.inl @@ -6,14 +6,21 @@ #include "type_vec4.hpp" #include "type_int.hpp" #include "_vectorize.hpp" -#if(GLM_ARCH != GLM_ARCH_PURE) -#if(GLM_COMPILER & GLM_COMPILER_VC) +#if(GLM_ARCH & GLM_ARCH_X86 && GLM_COMPILER & GLM_COMPILER_VC) # include <intrin.h> # pragma intrinsic(_BitScanReverse) -#endif//(GLM_COMPILER & GLM_COMPILER_VC) -#endif//(GLM_ARCH != GLM_ARCH_PURE) +#endif//(GLM_ARCH & GLM_ARCH_X86 && GLM_COMPILER & GLM_COMPILER_VC) #include <limits> +#if !GLM_HAS_EXTENDED_INTEGER_TYPE +# if GLM_COMPILER & GLM_COMPILER_GCC +# pragma GCC diagnostic ignored "-Wlong-long" +# endif +# if (GLM_COMPILER & GLM_COMPILER_CLANG) +# pragma clang diagnostic ignored "-Wc++11-long-long" +# endif +#endif + namespace glm{ namespace detail { @@ -23,40 +30,36 @@ namespace detail return Bits >= sizeof(T) * 8 ? ~static_cast<T>(0) : (static_cast<T>(1) << Bits) - static_cast<T>(1); } - template <bool EXEC = false> + template <typename T, glm::precision P, template <typename, glm::precision> class vecType, bool Aligned, bool EXEC> struct compute_bitfieldReverseStep { - template <typename T, glm::precision P, template <class, glm::precision> class vecType> GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & v, T, T) { return v; } }; - template <> - struct compute_bitfieldReverseStep<true> + template <typename T, glm::precision P, template <typename, glm::precision> class vecType, bool Aligned> + struct compute_bitfieldReverseStep<T, P, vecType, Aligned, true> { - template <typename T, glm::precision P, template <class, glm::precision> class vecType> GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & v, T Mask, T Shift) { return (v & Mask) << Shift | (v & (~Mask)) >> Shift; } }; - template <bool EXEC = false> + template <typename T, glm::precision P, template <typename, glm::precision> class vecType, bool Aligned, bool EXEC> struct compute_bitfieldBitCountStep { - template <typename T, glm::precision P, template <class, glm::precision> class vecType> GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & v, T, T) { return v; } }; - template <> - struct compute_bitfieldBitCountStep<true> + template <typename T, glm::precision P, template <typename, glm::precision> class vecType, bool Aligned> + struct compute_bitfieldBitCountStep<T, P, vecType, Aligned, true> { - template <typename T, glm::precision P, template <class, glm::precision> class vecType> GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & v, T Mask, T Shift) { return (v & Mask) + ((v >> Shift) & Mask); @@ -144,7 +147,7 @@ namespace detail return IsNotNull ? int(Result) : -1; } - template <typename T, glm::precision P, template <class, glm::precision> class vecType> + template <typename T, glm::precision P, template<typename, glm::precision> class vecType> struct compute_findMSB_vec<T, P, vecType, 32> { GLM_FUNC_QUALIFIER static vecType<int, P> call(vecType<T, P> const & x) @@ -295,12 +298,12 @@ namespace detail GLM_FUNC_QUALIFIER vecType<T, P> bitfieldReverse(vecType<T, P> const & v) { vecType<T, P> x(v); - x = detail::compute_bitfieldReverseStep<sizeof(T) * 8 >= 2>::call(x, T(0x5555555555555555ull), static_cast<T>( 1)); - x = detail::compute_bitfieldReverseStep<sizeof(T) * 8 >= 4>::call(x, T(0x3333333333333333ull), static_cast<T>( 2)); - x = detail::compute_bitfieldReverseStep<sizeof(T) * 8 >= 8>::call(x, T(0x0F0F0F0F0F0F0F0Full), static_cast<T>( 4)); - x = detail::compute_bitfieldReverseStep<sizeof(T) * 8 >= 16>::call(x, T(0x00FF00FF00FF00FFull), static_cast<T>( 8)); - x = detail::compute_bitfieldReverseStep<sizeof(T) * 8 >= 32>::call(x, T(0x0000FFFF0000FFFFull), static_cast<T>(16)); - x = detail::compute_bitfieldReverseStep<sizeof(T) * 8 >= 64>::call(x, T(0x00000000FFFFFFFFull), static_cast<T>(32)); + x = detail::compute_bitfieldReverseStep<T, P, vecType, detail::is_aligned<P>::value, sizeof(T) * 8>= 2>::call(x, T(0x5555555555555555ull), static_cast<T>( 1)); + x = detail::compute_bitfieldReverseStep<T, P, vecType, detail::is_aligned<P>::value, sizeof(T) * 8>= 4>::call(x, T(0x3333333333333333ull), static_cast<T>( 2)); + x = detail::compute_bitfieldReverseStep<T, P, vecType, detail::is_aligned<P>::value, sizeof(T) * 8>= 8>::call(x, T(0x0F0F0F0F0F0F0F0Full), static_cast<T>( 4)); + x = detail::compute_bitfieldReverseStep<T, P, vecType, detail::is_aligned<P>::value, sizeof(T) * 8>= 16>::call(x, T(0x00FF00FF00FF00FFull), static_cast<T>( 8)); + x = detail::compute_bitfieldReverseStep<T, P, vecType, detail::is_aligned<P>::value, sizeof(T) * 8>= 32>::call(x, T(0x0000FFFF0000FFFFull), static_cast<T>(16)); + x = detail::compute_bitfieldReverseStep<T, P, vecType, detail::is_aligned<P>::value, sizeof(T) * 8>= 64>::call(x, T(0x00000000FFFFFFFFull), static_cast<T>(32)); return x; } @@ -315,12 +318,12 @@ namespace detail GLM_FUNC_QUALIFIER vecType<int, P> bitCount(vecType<T, P> const & v) { vecType<typename detail::make_unsigned<T>::type, P> x(*reinterpret_cast<vecType<typename detail::make_unsigned<T>::type, P> const *>(&v)); - x = detail::compute_bitfieldBitCountStep<sizeof(T) * 8 >= 2>::call(x, typename detail::make_unsigned<T>::type(0x5555555555555555ull), typename detail::make_unsigned<T>::type( 1)); - x = detail::compute_bitfieldBitCountStep<sizeof(T) * 8 >= 4>::call(x, typename detail::make_unsigned<T>::type(0x3333333333333333ull), typename detail::make_unsigned<T>::type( 2)); - x = detail::compute_bitfieldBitCountStep<sizeof(T) * 8 >= 8>::call(x, typename detail::make_unsigned<T>::type(0x0F0F0F0F0F0F0F0Full), typename detail::make_unsigned<T>::type( 4)); - x = detail::compute_bitfieldBitCountStep<sizeof(T) * 8 >= 16>::call(x, typename detail::make_unsigned<T>::type(0x00FF00FF00FF00FFull), typename detail::make_unsigned<T>::type( 8)); - x = detail::compute_bitfieldBitCountStep<sizeof(T) * 8 >= 32>::call(x, typename detail::make_unsigned<T>::type(0x0000FFFF0000FFFFull), typename detail::make_unsigned<T>::type(16)); - x = detail::compute_bitfieldBitCountStep<sizeof(T) * 8 >= 64>::call(x, typename detail::make_unsigned<T>::type(0x00000000FFFFFFFFull), typename detail::make_unsigned<T>::type(32)); + x = detail::compute_bitfieldBitCountStep<typename detail::make_unsigned<T>::type, P, vecType, detail::is_aligned<P>::value, sizeof(T) * 8>= 2>::call(x, typename detail::make_unsigned<T>::type(0x5555555555555555ull), typename detail::make_unsigned<T>::type( 1)); + x = detail::compute_bitfieldBitCountStep<typename detail::make_unsigned<T>::type, P, vecType, detail::is_aligned<P>::value, sizeof(T) * 8>= 4>::call(x, typename detail::make_unsigned<T>::type(0x3333333333333333ull), typename detail::make_unsigned<T>::type( 2)); + x = detail::compute_bitfieldBitCountStep<typename detail::make_unsigned<T>::type, P, vecType, detail::is_aligned<P>::value, sizeof(T) * 8>= 8>::call(x, typename detail::make_unsigned<T>::type(0x0F0F0F0F0F0F0F0Full), typename detail::make_unsigned<T>::type( 4)); + x = detail::compute_bitfieldBitCountStep<typename detail::make_unsigned<T>::type, P, vecType, detail::is_aligned<P>::value, sizeof(T) * 8>= 16>::call(x, typename detail::make_unsigned<T>::type(0x00FF00FF00FF00FFull), typename detail::make_unsigned<T>::type( 8)); + x = detail::compute_bitfieldBitCountStep<typename detail::make_unsigned<T>::type, P, vecType, detail::is_aligned<P>::value, sizeof(T) * 8>= 32>::call(x, typename detail::make_unsigned<T>::type(0x0000FFFF0000FFFFull), typename detail::make_unsigned<T>::type(16)); + x = detail::compute_bitfieldBitCountStep<typename detail::make_unsigned<T>::type, P, vecType, detail::is_aligned<P>::value, sizeof(T) * 8>= 64>::call(x, typename detail::make_unsigned<T>::type(0x00000000FFFFFFFFull), typename detail::make_unsigned<T>::type(32)); return vecType<int, P>(x); } @@ -359,7 +362,7 @@ namespace detail } }//namespace glm -#if GLM_ARCH != GLM_ARCH_PURE +#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_UNRESTRICTED_UNIONS # include "func_integer_simd.inl" #endif diff --git a/3rdparty/glm/glm/detail/func_integer_simd.inl b/3rdparty/glm/glm/detail/func_integer_simd.inl index 6fab1146a73..c79e8618b2d 100644 --- a/3rdparty/glm/glm/detail/func_integer_simd.inl +++ b/3rdparty/glm/glm/detail/func_integer_simd.inl @@ -1,114 +1,66 @@ /// @ref core /// @file glm/detail/func_integer_simd.inl +#include "../simd/integer.h" + +#if GLM_ARCH & GLM_ARCH_SSE2_BIT + namespace glm{ namespace detail { - inline __m128i _mm_bit_interleave_si128(__m128i x) + template <glm::precision P> + struct compute_bitfieldReverseStep<uint32, P, tvec4, true, true> { - __m128i const Mask4 = _mm_set1_epi32(0x0000FFFF); - __m128i const Mask3 = _mm_set1_epi32(0x00FF00FF); - __m128i const Mask2 = _mm_set1_epi32(0x0F0F0F0F); - __m128i const Mask1 = _mm_set1_epi32(0x33333333); - __m128i const Mask0 = _mm_set1_epi32(0x55555555); - - __m128i Reg1; - __m128i Reg2; - - // REG1 = x; - // REG2 = y; - //Reg1 = _mm_unpacklo_epi64(x, y); - Reg1 = x; - - //REG1 = ((REG1 << 16) | REG1) & glm::uint64(0x0000FFFF0000FFFF); - //REG2 = ((REG2 << 16) | REG2) & glm::uint64(0x0000FFFF0000FFFF); - Reg2 = _mm_slli_si128(Reg1, 2); - Reg1 = _mm_or_si128(Reg2, Reg1); - Reg1 = _mm_and_si128(Reg1, Mask4); - - //REG1 = ((REG1 << 8) | REG1) & glm::uint64(0x00FF00FF00FF00FF); - //REG2 = ((REG2 << 8) | REG2) & glm::uint64(0x00FF00FF00FF00FF); - Reg2 = _mm_slli_si128(Reg1, 1); - Reg1 = _mm_or_si128(Reg2, Reg1); - Reg1 = _mm_and_si128(Reg1, Mask3); - - //REG1 = ((REG1 << 4) | REG1) & glm::uint64(0x0F0F0F0F0F0F0F0F); - //REG2 = ((REG2 << 4) | REG2) & glm::uint64(0x0F0F0F0F0F0F0F0F); - Reg2 = _mm_slli_epi32(Reg1, 4); - Reg1 = _mm_or_si128(Reg2, Reg1); - Reg1 = _mm_and_si128(Reg1, Mask2); - - //REG1 = ((REG1 << 2) | REG1) & glm::uint64(0x3333333333333333); - //REG2 = ((REG2 << 2) | REG2) & glm::uint64(0x3333333333333333); - Reg2 = _mm_slli_epi32(Reg1, 2); - Reg1 = _mm_or_si128(Reg2, Reg1); - Reg1 = _mm_and_si128(Reg1, Mask1); - - //REG1 = ((REG1 << 1) | REG1) & glm::uint64(0x5555555555555555); - //REG2 = ((REG2 << 1) | REG2) & glm::uint64(0x5555555555555555); - Reg2 = _mm_slli_epi32(Reg1, 1); - Reg1 = _mm_or_si128(Reg2, Reg1); - Reg1 = _mm_and_si128(Reg1, Mask0); + GLM_FUNC_QUALIFIER static tvec4<uint32, P> call(tvec4<uint32, P> const & v, uint32 Mask, uint32 Shift) + { + __m128i const set0 = v.data; + + __m128i const set1 = _mm_set1_epi32(Mask); + __m128i const and1 = _mm_and_si128(set0, set1); + __m128i const sft1 = _mm_slli_epi32(and1, Shift); + + __m128i const set2 = _mm_andnot_si128(set0, _mm_set1_epi32(-1)); + __m128i const and2 = _mm_and_si128(set0, set2); + __m128i const sft2 = _mm_srai_epi32(and2, Shift); + + __m128i const or0 = _mm_or_si128(sft1, sft2); + + return or0; + } + }; + + template <glm::precision P> + struct compute_bitfieldBitCountStep<uint32, P, tvec4, true, true> + { + GLM_FUNC_QUALIFIER static tvec4<uint32, P> call(tvec4<uint32, P> const & v, uint32 Mask, uint32 Shift) + { + __m128i const set0 = v.data; + + __m128i const set1 = _mm_set1_epi32(Mask); + __m128i const and0 = _mm_and_si128(set0, set1); + __m128i const sft0 = _mm_slli_epi32(set0, Shift); + __m128i const and1 = _mm_and_si128(sft0, set1); + __m128i const add0 = _mm_add_epi32(and0, and1); + + return add0; + } + }; +}//namespace detail - //return REG1 | (REG2 << 1); - Reg2 = _mm_slli_epi32(Reg1, 1); - Reg2 = _mm_srli_si128(Reg2, 8); - Reg1 = _mm_or_si128(Reg1, Reg2); - - return Reg1; +# if GLM_ARCH & GLM_ARCH_AVX_BIT + template <> + GLM_FUNC_QUALIFIER int bitCount(uint32 x) + { + return _mm_popcnt_u32(x); } - inline __m128i _mm_bit_interleave_si128(__m128i x, __m128i y) + template <> + GLM_FUNC_QUALIFIER int bitCount(uint64 x) { - __m128i const Mask4 = _mm_set1_epi32(0x0000FFFF); - __m128i const Mask3 = _mm_set1_epi32(0x00FF00FF); - __m128i const Mask2 = _mm_set1_epi32(0x0F0F0F0F); - __m128i const Mask1 = _mm_set1_epi32(0x33333333); - __m128i const Mask0 = _mm_set1_epi32(0x55555555); - - __m128i Reg1; - __m128i Reg2; - - // REG1 = x; - // REG2 = y; - Reg1 = _mm_unpacklo_epi64(x, y); - - //REG1 = ((REG1 << 16) | REG1) & glm::uint64(0x0000FFFF0000FFFF); - //REG2 = ((REG2 << 16) | REG2) & glm::uint64(0x0000FFFF0000FFFF); - Reg2 = _mm_slli_si128(Reg1, 2); - Reg1 = _mm_or_si128(Reg2, Reg1); - Reg1 = _mm_and_si128(Reg1, Mask4); - - //REG1 = ((REG1 << 8) | REG1) & glm::uint64(0x00FF00FF00FF00FF); - //REG2 = ((REG2 << 8) | REG2) & glm::uint64(0x00FF00FF00FF00FF); - Reg2 = _mm_slli_si128(Reg1, 1); - Reg1 = _mm_or_si128(Reg2, Reg1); - Reg1 = _mm_and_si128(Reg1, Mask3); - - //REG1 = ((REG1 << 4) | REG1) & glm::uint64(0x0F0F0F0F0F0F0F0F); - //REG2 = ((REG2 << 4) | REG2) & glm::uint64(0x0F0F0F0F0F0F0F0F); - Reg2 = _mm_slli_epi32(Reg1, 4); - Reg1 = _mm_or_si128(Reg2, Reg1); - Reg1 = _mm_and_si128(Reg1, Mask2); - - //REG1 = ((REG1 << 2) | REG1) & glm::uint64(0x3333333333333333); - //REG2 = ((REG2 << 2) | REG2) & glm::uint64(0x3333333333333333); - Reg2 = _mm_slli_epi32(Reg1, 2); - Reg1 = _mm_or_si128(Reg2, Reg1); - Reg1 = _mm_and_si128(Reg1, Mask1); - - //REG1 = ((REG1 << 1) | REG1) & glm::uint64(0x5555555555555555); - //REG2 = ((REG2 << 1) | REG2) & glm::uint64(0x5555555555555555); - Reg2 = _mm_slli_epi32(Reg1, 1); - Reg1 = _mm_or_si128(Reg2, Reg1); - Reg1 = _mm_and_si128(Reg1, Mask0); - - //return REG1 | (REG2 << 1); - Reg2 = _mm_slli_epi32(Reg1, 1); - Reg2 = _mm_srli_si128(Reg2, 8); - Reg1 = _mm_or_si128(Reg1, Reg2); - - return Reg1; + return static_cast<int>(_mm_popcnt_u64(x)); } -}//namespace detail +# endif + }//namespace glm + +#endif//GLM_ARCH & GLM_ARCH_SSE2_BIT diff --git a/3rdparty/glm/glm/detail/func_matrix.hpp b/3rdparty/glm/glm/detail/func_matrix.hpp index 56d16d2b8ed..77fdb3fea77 100644 --- a/3rdparty/glm/glm/detail/func_matrix.hpp +++ b/3rdparty/glm/glm/detail/func_matrix.hpp @@ -1,33 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/func_matrix.hpp -/// @date 2008-08-03 / 2011-06-15 -/// @author Christophe Riccio /// /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a> /// @@ -39,7 +11,6 @@ /// are single precision, and a double-precision floating version, where all /// arguments and return values are double precision. Only the single-precision /// floating point version is shown. -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/detail/func_matrix.inl b/3rdparty/glm/glm/detail/func_matrix.inl index d1be5a584f7..fcd1de30e32 100644 --- a/3rdparty/glm/glm/detail/func_matrix.inl +++ b/3rdparty/glm/glm/detail/func_matrix.inl @@ -7,11 +7,23 @@ namespace glm{ namespace detail { - template <template <class, precision> class matType, typename T, precision P> + template <template <typename, precision> class matType, typename T, precision P, bool Aligned> + struct compute_matrixCompMult + { + GLM_FUNC_QUALIFIER static matType<T, P> call(matType<T, P> const& x, matType<T, P> const& y) + { + matType<T, P> result(uninitialize); + for(length_t i = 0; i < result.length(); ++i) + result[i] = x[i] * y[i]; + return result; + } + }; + + template <template <class, precision> class matType, typename T, precision P, bool Aligned> struct compute_transpose{}; - template <typename T, precision P> - struct compute_transpose<tmat2x2, T, P> + template <typename T, precision P, bool Aligned> + struct compute_transpose<tmat2x2, T, P, Aligned> { GLM_FUNC_QUALIFIER static tmat2x2<T, P> call(tmat2x2<T, P> const & m) { @@ -24,8 +36,8 @@ namespace detail } }; - template <typename T, precision P> - struct compute_transpose<tmat2x3, T, P> + template <typename T, precision P, bool Aligned> + struct compute_transpose<tmat2x3, T, P, Aligned> { GLM_FUNC_QUALIFIER static tmat3x2<T, P> call(tmat2x3<T, P> const & m) { @@ -40,8 +52,8 @@ namespace detail } }; - template <typename T, precision P> - struct compute_transpose<tmat2x4, T, P> + template <typename T, precision P, bool Aligned> + struct compute_transpose<tmat2x4, T, P, Aligned> { GLM_FUNC_QUALIFIER static tmat4x2<T, P> call(tmat2x4<T, P> const & m) { @@ -58,8 +70,8 @@ namespace detail } }; - template <typename T, precision P> - struct compute_transpose<tmat3x2, T, P> + template <typename T, precision P, bool Aligned> + struct compute_transpose<tmat3x2, T, P, Aligned> { GLM_FUNC_QUALIFIER static tmat2x3<T, P> call(tmat3x2<T, P> const & m) { @@ -74,8 +86,8 @@ namespace detail } }; - template <typename T, precision P> - struct compute_transpose<tmat3x3, T, P> + template <typename T, precision P, bool Aligned> + struct compute_transpose<tmat3x3, T, P, Aligned> { GLM_FUNC_QUALIFIER static tmat3x3<T, P> call(tmat3x3<T, P> const & m) { @@ -95,8 +107,8 @@ namespace detail } }; - template <typename T, precision P> - struct compute_transpose<tmat3x4, T, P> + template <typename T, precision P, bool Aligned> + struct compute_transpose<tmat3x4, T, P, Aligned> { GLM_FUNC_QUALIFIER static tmat4x3<T, P> call(tmat3x4<T, P> const & m) { @@ -117,8 +129,8 @@ namespace detail } }; - template <typename T, precision P> - struct compute_transpose<tmat4x2, T, P> + template <typename T, precision P, bool Aligned> + struct compute_transpose<tmat4x2, T, P, Aligned> { GLM_FUNC_QUALIFIER static tmat2x4<T, P> call(tmat4x2<T, P> const & m) { @@ -135,8 +147,8 @@ namespace detail } }; - template <typename T, precision P> - struct compute_transpose<tmat4x3, T, P> + template <typename T, precision P, bool Aligned> + struct compute_transpose<tmat4x3, T, P, Aligned> { GLM_FUNC_QUALIFIER static tmat3x4<T, P> call(tmat4x3<T, P> const & m) { @@ -157,8 +169,8 @@ namespace detail } }; - template <typename T, precision P> - struct compute_transpose<tmat4x4, T, P> + template <typename T, precision P, bool Aligned> + struct compute_transpose<tmat4x4, T, P, Aligned> { GLM_FUNC_QUALIFIER static tmat4x4<T, P> call(tmat4x4<T, P> const & m) { @@ -186,11 +198,11 @@ namespace detail } }; - template <template <class, precision> class matType, typename T, precision P> + template <template <typename, precision> class matType, typename T, precision P, bool Aligned> struct compute_determinant{}; - template <typename T, precision P> - struct compute_determinant<tmat2x2, T, P> + template <typename T, precision P, bool Aligned> + struct compute_determinant<tmat2x2, T, P, Aligned> { GLM_FUNC_QUALIFIER static T call(tmat2x2<T, P> const & m) { @@ -198,8 +210,8 @@ namespace detail } }; - template <typename T, precision P> - struct compute_determinant<tmat3x3, T, P> + template <typename T, precision P, bool Aligned> + struct compute_determinant<tmat3x3, T, P, Aligned> { GLM_FUNC_QUALIFIER static T call(tmat3x3<T, P> const & m) { @@ -210,8 +222,8 @@ namespace detail } }; - template <typename T, precision P> - struct compute_determinant<tmat4x4, T, P> + template <typename T, precision P, bool Aligned> + struct compute_determinant<tmat4x4, T, P, Aligned> { GLM_FUNC_QUALIFIER static T call(tmat4x4<T, P> const & m) { @@ -233,17 +245,121 @@ namespace detail m[0][2] * DetCof[2] + m[0][3] * DetCof[3]; } }; + + template <template <typename, precision> class matType, typename T, precision P, bool Aligned> + struct compute_inverse{}; + + template <typename T, precision P, bool Aligned> + struct compute_inverse<tmat2x2, T, P, Aligned> + { + GLM_FUNC_QUALIFIER static tmat2x2<T, P> call(tmat2x2<T, P> const& m) + { + T OneOverDeterminant = static_cast<T>(1) / ( + + m[0][0] * m[1][1] + - m[1][0] * m[0][1]); + + tmat2x2<T, P> Inverse( + + m[1][1] * OneOverDeterminant, + - m[0][1] * OneOverDeterminant, + - m[1][0] * OneOverDeterminant, + + m[0][0] * OneOverDeterminant); + + return Inverse; + } + }; + + template <typename T, precision P, bool Aligned> + struct compute_inverse<tmat3x3, T, P, Aligned> + { + GLM_FUNC_QUALIFIER static tmat3x3<T, P> call(tmat3x3<T, P> const& m) + { + T OneOverDeterminant = static_cast<T>(1) / ( + + m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2]) + - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2]) + + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2])); + + tmat3x3<T, P> Inverse(uninitialize); + Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]) * OneOverDeterminant; + Inverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]) * OneOverDeterminant; + Inverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]) * OneOverDeterminant; + Inverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]) * OneOverDeterminant; + Inverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]) * OneOverDeterminant; + Inverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]) * OneOverDeterminant; + Inverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]) * OneOverDeterminant; + Inverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]) * OneOverDeterminant; + Inverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]) * OneOverDeterminant; + + return Inverse; + } + }; + + template <typename T, precision P, bool Aligned> + struct compute_inverse<tmat4x4, T, P, Aligned> + { + GLM_FUNC_QUALIFIER static tmat4x4<T, P> call(tmat4x4<T, P> 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]; + + tvec4<T, P> Fac0(Coef00, Coef00, Coef02, Coef03); + tvec4<T, P> Fac1(Coef04, Coef04, Coef06, Coef07); + tvec4<T, P> Fac2(Coef08, Coef08, Coef10, Coef11); + tvec4<T, P> Fac3(Coef12, Coef12, Coef14, Coef15); + tvec4<T, P> Fac4(Coef16, Coef16, Coef18, Coef19); + tvec4<T, P> Fac5(Coef20, Coef20, Coef22, Coef23); + + tvec4<T, P> Vec0(m[1][0], m[0][0], m[0][0], m[0][0]); + tvec4<T, P> Vec1(m[1][1], m[0][1], m[0][1], m[0][1]); + tvec4<T, P> Vec2(m[1][2], m[0][2], m[0][2], m[0][2]); + tvec4<T, P> Vec3(m[1][3], m[0][3], m[0][3], m[0][3]); + + tvec4<T, P> Inv0(Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2); + tvec4<T, P> Inv1(Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4); + tvec4<T, P> Inv2(Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5); + tvec4<T, P> Inv3(Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5); + + tvec4<T, P> SignA(+1, -1, +1, -1); + tvec4<T, P> SignB(-1, +1, -1, +1); + tmat4x4<T, P> Inverse(Inv0 * SignA, Inv1 * SignB, Inv2 * SignA, Inv3 * SignB); + + tvec4<T, P> Row0(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]); + + tvec4<T, P> Dot0(m[0] * Row0); + T Dot1 = (Dot0.x + Dot0.y) + (Dot0.z + Dot0.w); + + T OneOverDeterminant = static_cast<T>(1) / Dot1; + + return Inverse * OneOverDeterminant; + } + }; }//namespace detail template <typename T, precision P, template <typename, precision> class matType> GLM_FUNC_QUALIFIER matType<T, P> matrixCompMult(matType<T, P> const & x, matType<T, P> const & y) { GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'matrixCompMult' only accept floating-point inputs"); - - matType<T, P> result(uninitialize); - for(length_t i = 0; i < result.length(); ++i) - result[i] = x[i] * y[i]; - return result; + return detail::compute_matrixCompMult<matType, T, P, detail::is_aligned<P>::value>::call(x, y); } template<typename T, precision P, template <typename, precision> class vecTypeA, template <typename, precision> class vecTypeB> @@ -261,25 +377,25 @@ namespace detail GLM_FUNC_QUALIFIER typename matType<T, P>::transpose_type transpose(matType<T, P> const & m) { GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'transpose' only accept floating-point inputs"); - return detail::compute_transpose<matType, T, P>::call(m); + return detail::compute_transpose<matType, T, P, detail::is_aligned<P>::value>::call(m); } template <typename T, precision P, template <typename, precision> class matType> GLM_FUNC_QUALIFIER T determinant(matType<T, P> const & m) { GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'determinant' only accept floating-point inputs"); - return detail::compute_determinant<matType, T, P>::call(m); + return detail::compute_determinant<matType, T, P, detail::is_aligned<P>::value>::call(m); } template <typename T, precision P, template <typename, precision> class matType> GLM_FUNC_QUALIFIER matType<T, P> inverse(matType<T, P> const & m) { GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'inverse' only accept floating-point inputs"); - return detail::compute_inverse(m); + return detail::compute_inverse<matType, T, P, detail::is_aligned<P>::value>::call(m); } }//namespace glm -#if GLM_ARCH != GLM_ARCH_PURE +#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_UNRESTRICTED_UNIONS # include "func_matrix_simd.inl" #endif diff --git a/3rdparty/glm/glm/detail/func_matrix_simd.inl b/3rdparty/glm/glm/detail/func_matrix_simd.inl index 2d73e795d67..61b0a5ba9d5 100644 --- a/3rdparty/glm/glm/detail/func_matrix_simd.inl +++ b/3rdparty/glm/glm/detail/func_matrix_simd.inl @@ -1,21 +1,88 @@ /// @ref core /// @file glm/detail/func_matrix_simd.inl +#if GLM_ARCH & GLM_ARCH_SSE2_BIT + #include "type_mat4x4.hpp" #include "func_geometric.hpp" #include "../simd/matrix.h" -namespace glm +namespace glm{ +namespace detail { -# if GLM_HAS_UNRESTRICTED_UNIONS - template <> - GLM_FUNC_QUALIFIER tmat4x4<float, simd> inverse(tmat4x4<float, simd> const& m) + template <precision P> + struct compute_matrixCompMult<tmat4x4, float, P, true> + { + GLM_STATIC_ASSERT(detail::is_aligned<P>::value, "Specialization requires aligned"); + + GLM_FUNC_QUALIFIER static tmat4x4<float, P> call(tmat4x4<float, P> const & x, tmat4x4<float, P> const & y) + { + tmat4x4<float, P> result(uninitialize); + glm_mat4_matrixCompMult( + *(glm_vec4 const (*)[4])&x[0].data, + *(glm_vec4 const (*)[4])&y[0].data, + *(glm_vec4(*)[4])&result[0].data); + return result; + } + }; + + template <precision P> + struct compute_transpose<tmat4x4, float, P, true> + { + GLM_FUNC_QUALIFIER static tmat4x4<float, P> call(tmat4x4<float, P> const & m) + { + tmat4x4<float, P> result(uninitialize); + glm_mat4_transpose( + *(glm_vec4 const (*)[4])&m[0].data, + *(glm_vec4(*)[4])&result[0].data); + return result; + } + }; + + template <precision P> + struct compute_determinant<tmat4x4, float, P, true> + { + GLM_FUNC_QUALIFIER static float call(tmat4x4<float, P> const& m) { - tmat4x4<float, simd> Result(uninitialize); - glm_inverse_ps( - *reinterpret_cast<__m128 const(*)[4]>(&m[0].data), - *reinterpret_cast<__m128(*)[4]>(&Result[0].data)); + return _mm_cvtss_f32(glm_mat4_determinant(*reinterpret_cast<__m128 const(*)[4]>(&m[0].data))); + } + }; + + template <precision P> + struct compute_inverse<tmat4x4, float, P, true> + { + GLM_FUNC_QUALIFIER static tmat4x4<float, P> call(tmat4x4<float, P> const& m) + { + tmat4x4<float, P> Result(uninitialize); + glm_mat4_inverse(*reinterpret_cast<__m128 const(*)[4]>(&m[0].data), *reinterpret_cast<__m128(*)[4]>(&Result[0].data)); return Result; } -# endif// GLM_HAS_UNRESTRICTED_UNIONS + }; +}//namespace detail + + template<> + GLM_FUNC_QUALIFIER tmat4x4<float, aligned_lowp> outerProduct<float, aligned_lowp, tvec4, tvec4>(tvec4<float, aligned_lowp> const & c, tvec4<float, aligned_lowp> const & r) + { + tmat4x4<float, aligned_lowp> m(uninitialize); + glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data)); + return m; + } + + template<> + GLM_FUNC_QUALIFIER tmat4x4<float, aligned_mediump> outerProduct<float, aligned_mediump, tvec4, tvec4>(tvec4<float, aligned_mediump> const & c, tvec4<float, aligned_mediump> const & r) + { + tmat4x4<float, aligned_mediump> m(uninitialize); + glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data)); + return m; + } + + template<> + GLM_FUNC_QUALIFIER tmat4x4<float, aligned_highp> outerProduct<float, aligned_highp, tvec4, tvec4>(tvec4<float, aligned_highp> const & c, tvec4<float, aligned_highp> const & r) + { + tmat4x4<float, aligned_highp> m(uninitialize); + glm_mat4_outerProduct(c.data, r.data, *reinterpret_cast<__m128(*)[4]>(&m[0].data)); + return m; + } }//namespace glm + +#endif diff --git a/3rdparty/glm/glm/detail/func_packing.hpp b/3rdparty/glm/glm/detail/func_packing.hpp index bce0fe523b5..47e074b4179 100644 --- a/3rdparty/glm/glm/detail/func_packing.hpp +++ b/3rdparty/glm/glm/detail/func_packing.hpp @@ -1,42 +1,13 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/func_packing.hpp -/// @date 2010-03-17 / 2011-06-15 -/// @author Christophe Riccio /// /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.4 Floating-Point Pack and Unpack Functions</a> /// @see gtc_packing -/// +/// /// @defgroup core_func_packing Floating-Point Pack and Unpack Functions /// @ingroup core -/// +/// /// These functions do not operate component-wise, rather as described in each case. -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/detail/func_packing.inl b/3rdparty/glm/glm/detail/func_packing.inl index 34953fdf5a5..505c80a1c80 100644 --- a/3rdparty/glm/glm/detail/func_packing.inl +++ b/3rdparty/glm/glm/detail/func_packing.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/func_packing.inl -/// @date 2010-03-17 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #include "func_common.hpp" #include "type_half.hpp" @@ -213,3 +184,7 @@ namespace glm } }//namespace glm +#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_UNRESTRICTED_UNIONS +# include "func_packing_simd.inl" +#endif + diff --git a/3rdparty/glm/glm/detail/func_packing_simd.inl b/3rdparty/glm/glm/detail/func_packing_simd.inl new file mode 100644 index 00000000000..1d4a5225d79 --- /dev/null +++ b/3rdparty/glm/glm/detail/func_packing_simd.inl @@ -0,0 +1,9 @@ +/// @ref core +/// @file glm/detail/func_packing_simd.inl + +namespace glm{ +namespace detail +{ + +}//namespace detail +}//namespace glm diff --git a/3rdparty/glm/glm/detail/func_trigonometric.hpp b/3rdparty/glm/glm/detail/func_trigonometric.hpp index 244349775db..719cff0bd93 100644 --- a/3rdparty/glm/glm/detail/func_trigonometric.hpp +++ b/3rdparty/glm/glm/detail/func_trigonometric.hpp @@ -1,33 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/func_trigonometric.hpp -/// @date 2008-08-01 / 2011-06-15 -/// @author Christophe Riccio /// /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a> /// @@ -39,7 +11,6 @@ /// the divisor of a ratio is 0, then results will be undefined. /// /// These all operate component-wise. The description is per component. -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/detail/func_trigonometric.inl b/3rdparty/glm/glm/detail/func_trigonometric.inl index e350ba7a2c8..29866734146 100644 --- a/3rdparty/glm/glm/detail/func_trigonometric.inl +++ b/3rdparty/glm/glm/detail/func_trigonometric.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/func_trigonometric.inl -/// @date 2008-08-03 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #include "_vectorize.hpp" #include <cmath> @@ -113,7 +84,7 @@ namespace glm // atan template <typename genType> - GLM_FUNC_QUALIFIER genType atan(genType const & y, genType const & x) + GLM_FUNC_QUALIFIER genType atan(genType y, genType x) { GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'atan' only accept floating-point input"); @@ -165,8 +136,8 @@ namespace glm # if GLM_HAS_CXX11_STL using std::asinh; # else - template <typename genType> - GLM_FUNC_QUALIFIER genType asinh(genType const & x) + template <typename genType> + GLM_FUNC_QUALIFIER genType asinh(genType x) { GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'asinh' only accept floating-point input"); @@ -185,7 +156,7 @@ namespace glm using std::acosh; # else template <typename genType> - GLM_FUNC_QUALIFIER genType acosh(genType const & x) + GLM_FUNC_QUALIFIER genType acosh(genType x) { GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'acosh' only accept floating-point input"); @@ -206,7 +177,7 @@ namespace glm using std::atanh; # else template <typename genType> - GLM_FUNC_QUALIFIER genType atanh(genType const & x) + GLM_FUNC_QUALIFIER genType atanh(genType x) { GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'atanh' only accept floating-point input"); @@ -222,3 +193,8 @@ namespace glm return detail::functor1<T, T, P, vecType>::call(atanh, v); } }//namespace glm + +#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_UNRESTRICTED_UNIONS +# include "func_trigonometric_simd.inl" +#endif + diff --git a/3rdparty/glm/glm/detail/func_trigonometric_simd.inl b/3rdparty/glm/glm/detail/func_trigonometric_simd.inl new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/3rdparty/glm/glm/detail/func_trigonometric_simd.inl diff --git a/3rdparty/glm/glm/detail/func_vector_relational.hpp b/3rdparty/glm/glm/detail/func_vector_relational.hpp index 9252fcd5ab2..ec0f68a75f8 100644 --- a/3rdparty/glm/glm/detail/func_vector_relational.hpp +++ b/3rdparty/glm/glm/detail/func_vector_relational.hpp @@ -1,33 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/func_vector_relational.hpp -/// @date 2008-08-03 / 2011-06-15 -/// @author Christophe Riccio /// /// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a> /// @@ -40,7 +12,6 @@ /// /// In all cases, the sizes of all the input and return vectors for any particular /// call must match. -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/detail/func_vector_relational.inl b/3rdparty/glm/glm/detail/func_vector_relational.inl index a511ee8dabf..3d8d2b7ec34 100644 --- a/3rdparty/glm/glm/detail/func_vector_relational.inl +++ b/3rdparty/glm/glm/detail/func_vector_relational.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/func_vector_relational.inl -/// @date 2008-08-03 / 2011-09-09 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #include <limits> @@ -129,3 +100,6 @@ namespace glm } }//namespace glm +#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_UNRESTRICTED_UNIONS +# include "func_vector_relational_simd.inl" +#endif diff --git a/3rdparty/glm/glm/detail/func_vector_relational_simd.inl b/3rdparty/glm/glm/detail/func_vector_relational_simd.inl new file mode 100644 index 00000000000..faab59b82ab --- /dev/null +++ b/3rdparty/glm/glm/detail/func_vector_relational_simd.inl @@ -0,0 +1,9 @@ +/// @ref core +/// @file glm/detail/func_vector_relational_simd.inl + +namespace glm{ +namespace detail +{ + +}//namespace detail +}//namespace glm diff --git a/3rdparty/glm/glm/detail/glm.cpp b/3rdparty/glm/glm/detail/glm.cpp index d48b47c2005..da3be4e0518 100644 --- a/3rdparty/glm/glm/detail/glm.cpp +++ b/3rdparty/glm/glm/detail/glm.cpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/glm.cpp -/// @date 2013-04-22 / 2013-04-22 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #include <glm/glm.hpp> #include <glm/gtc/quaternion.hpp> diff --git a/3rdparty/glm/glm/detail/precision.hpp b/3rdparty/glm/glm/detail/precision.hpp index c657d031c15..7c54437cd6c 100644 --- a/3rdparty/glm/glm/detail/precision.hpp +++ b/3rdparty/glm/glm/detail/precision.hpp @@ -1,45 +1,63 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/precision.hpp -/// @date 2013-04-01 / 2013-04-01 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once +#include "setup.hpp" + namespace glm { enum precision { - highp, - mediump, - lowp, - simd, - defaultp = highp + packed_highp, + packed_mediump, + packed_lowp, + +# if GLM_HAS_ALIGNED_TYPE + aligned_highp, + aligned_mediump, + aligned_lowp, + aligned = aligned_highp, +# endif + + highp = packed_highp, + mediump = packed_mediump, + lowp = packed_lowp, + packed = packed_highp, + +# if GLM_HAS_ALIGNED_TYPE && defined(GLM_FORCE_ALIGNED) + defaultp = aligned_highp +# else + defaultp = highp +# endif + }; + +namespace detail +{ + template <glm::precision P> + struct is_aligned + { + static const bool value = false; }; + +# if GLM_HAS_ALIGNED_TYPE + template<> + struct is_aligned<glm::aligned_lowp> + { + static const bool value = true; + }; + + template<> + struct is_aligned<glm::aligned_mediump> + { + static const bool value = true; + }; + + template<> + struct is_aligned<glm::aligned_highp> + { + static const bool value = true; + }; +# endif +}//namespace detail }//namespace glm diff --git a/3rdparty/glm/glm/detail/setup.hpp b/3rdparty/glm/glm/detail/setup.hpp index 43083743b31..8ad7eb9b261 100644 --- a/3rdparty/glm/glm/detail/setup.hpp +++ b/3rdparty/glm/glm/detail/setup.hpp @@ -3,6 +3,22 @@ #pragma once +#if defined(GLM_FORCE_SWIZZLE) && defined(GLM_FORCE_UNRESTRICTED_GENTYPE) +# error "Both GLM_FORCE_SWIZZLE and GLM_FORCE_UNRESTRICTED_GENTYPE can't be defined at the same time" +#endif + +/////////////////////////////////////////////////////////////////////////////////// +// Messages + +#define GLM_MESSAGES_ENABLED 1 +#define GLM_MESSAGES_DISABLE 0 + +#if defined(GLM_FORCE_MESSAGES) +# define GLM_MESSAGES GLM_MESSAGES_ENABLED +#else +# define GLM_MESSAGES GLM_MESSAGES_DISABLE +#endif + #include <cassert> #include <cstddef> #include "../simd/platform.h" @@ -10,25 +26,25 @@ /////////////////////////////////////////////////////////////////////////////////// // Version -#define GLM_VERSION 98 +#define GLM_VERSION 99 #define GLM_VERSION_MAJOR 0 #define GLM_VERSION_MINOR 9 -#define GLM_VERSION_PATCH 8 +#define GLM_VERSION_PATCH 9 #define GLM_VERSION_REVISION 0 -#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_VERSION_DISPLAYED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_VERSION_DISPLAYED) # define GLM_MESSAGE_VERSION_DISPLAYED -# pragma message ("GLM: version 0.9.8.0") -#endif//GLM_MESSAGE +# pragma message ("GLM: version 0.9.9.0") +#endif//GLM_MESSAGES // Report compiler detection -#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_COMPILER_DISPLAYED) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_COMPILER_DISPLAYED) # define GLM_MESSAGE_COMPILER_DISPLAYED # if GLM_COMPILER & GLM_COMPILER_CUDA # pragma message("GLM: CUDA compiler detected") # elif GLM_COMPILER & GLM_COMPILER_VC # pragma message("GLM: Visual C++ compiler detected") -# elif GLM_COMPILER & GLM_COMPILER_LLVM +# elif GLM_COMPILER & GLM_COMPILER_CLANG # pragma message("GLM: Clang compiler detected") # elif GLM_COMPILER & GLM_COMPILER_INTEL # pragma message("GLM: Intel Compiler detected") @@ -37,7 +53,7 @@ # else # pragma message("GLM: Compiler not detected") # endif -#endif//GLM_MESSAGE +#endif//GLM_MESSAGES /////////////////////////////////////////////////////////////////////////////////// // Build model @@ -54,134 +70,45 @@ # error "GLM_MODEL undefined, your compiler may not be supported by GLM. Add #define GLM_MODEL 0 to ignore this message." #endif//GLM_MODEL -#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_MODEL_DISPLAYED) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_MODEL_DISPLAYED) # define GLM_MESSAGE_MODEL_DISPLAYED # if(GLM_MODEL == GLM_MODEL_64) # pragma message("GLM: 64 bits model") # elif(GLM_MODEL == GLM_MODEL_32) # pragma message("GLM: 32 bits model") # endif//GLM_MODEL -#endif//GLM_MESSAGE - -/////////////////////////////////////////////////////////////////////////////////// -// Instruction sets - -// User defines: GLM_FORCE_PURE GLM_FORCE_SSE2 GLM_FORCE_SSE3 GLM_FORCE_AVX GLM_FORCE_AVX2 GLM_FORCE_AVX2 - -#define GLM_ARCH_PURE 0x0000 -#define GLM_ARCH_ARM 0x0001 -#define GLM_ARCH_X86 0x0002 -#define GLM_ARCH_SSE2 0x0004 -#define GLM_ARCH_SSE3 0x0008 -#define GLM_ARCH_SSE4 0x0010 -#define GLM_ARCH_AVX 0x0020 -#define GLM_ARCH_AVX2 0x0040 -#define GLM_ARCH_AVX512 0x0080 // Skylake set - -#if defined(GLM_FORCE_PURE) -# define GLM_ARCH GLM_ARCH_PURE -#elif defined(GLM_FORCE_AVX512) -# define GLM_ARCH (GLM_ARCH_AVX512 | GLM_ARCH_AVX2 | GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2) -#elif defined(GLM_FORCE_AVX2) -# define GLM_ARCH (GLM_ARCH_AVX2 | GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2) -#elif defined(GLM_FORCE_AVX) -# define GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2) -#elif defined(GLM_FORCE_SSE4) -# define GLM_ARCH (GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2) -#elif defined(GLM_FORCE_SSE3) -# define GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2) -#elif defined(GLM_FORCE_SSE2) -# define GLM_ARCH (GLM_ARCH_SSE2) -#elif (GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_GCC)) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_LINUX)) -// This is Skylake set of instruction set -# if defined(__AVX512BW__) && defined(__AVX512F__) && defined(__AVX512CD__) && defined(__AVX512VL__) && defined(__AVX512DQ__) -# define GLM_ARCH (GLM_ARCH_AVX512 | GLM_ARCH_AVX2 | GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2) -# elif defined(__AVX2__) -# define GLM_ARCH (GLM_ARCH_AVX2 | GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2) -# elif defined(__AVX__) -# define GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2) -# elif defined(__SSE3__) -# define GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2) -# elif defined(__SSE2__) -# define GLM_ARCH (GLM_ARCH_SSE2) -# else -# define GLM_ARCH GLM_ARCH_PURE -# endif -#elif (GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS)) -# if defined(_M_ARM_FP) -# define GLM_ARCH (GLM_ARCH_ARM) -# elif defined(__AVX2__) -# define GLM_ARCH (GLM_ARCH_AVX2 | GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2) -# elif defined(__AVX__) -# define GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2) -# elif defined(_M_X64) -# define GLM_ARCH (GLM_ARCH_SSE2) -# elif defined(_M_IX86_FP) -# if _M_IX86_FP >= 2 -# define GLM_ARCH (GLM_ARCH_SSE2) -# else -# define GLM_ARCH (GLM_ARCH_PURE) -# endif -# else -# define GLM_ARCH (GLM_ARCH_PURE) -# endif -#elif (GLM_COMPILER & GLM_COMPILER_GCC) && (defined(__i386__) || defined(__x86_64__)) -# if defined(__AVX2__) -# define GLM_ARCH (GLM_ARCH_AVX2 | GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2) -# elif defined(__AVX__) -# define GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2) -# elif defined(__SSE4_1__ ) -# define GLM_ARCH (GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2) -# elif defined(__SSE3__) -# define GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2) -# elif defined(__SSE2__) -# define GLM_ARCH (GLM_ARCH_SSE2) -# else -# define GLM_ARCH (GLM_ARCH_PURE) -# endif -#else -# define GLM_ARCH GLM_ARCH_PURE -#endif - -// With MinGW-W64, including intrinsic headers before intrin.h will produce some errors. The problem is -// that windows.h (and maybe other headers) will silently include intrin.h, which of course causes problems. -// To fix, we just explicitly include intrin.h here. -#if defined(__MINGW64__) && (GLM_ARCH != GLM_ARCH_PURE) -# include <intrin.h> -#endif +#endif//GLM_MESSAGES -#if GLM_ARCH & GLM_ARCH_AVX2 -# include <immintrin.h> -#endif//GLM_ARCH -#if GLM_ARCH & GLM_ARCH_AVX -# include <immintrin.h> -#endif//GLM_ARCH -#if GLM_ARCH & GLM_ARCH_SSE4 -# include <smmintrin.h> -#endif//GLM_ARCH -#if GLM_ARCH & GLM_ARCH_SSE3 -# include <pmmintrin.h> -#endif//GLM_ARCH -#if GLM_ARCH & GLM_ARCH_SSE2 -# include <emmintrin.h> -#endif//GLM_ARCH - -#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_ARCH_DISPLAYED) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_ARCH_DISPLAYED) # define GLM_MESSAGE_ARCH_DISPLAYED # if(GLM_ARCH == GLM_ARCH_PURE) # pragma message("GLM: Platform independent code") -# elif(GLM_ARCH & GLM_ARCH_ARM) -# pragma message("GLM: ARM instruction set") -# elif(GLM_ARCH & GLM_ARCH_AVX2) +# elif(GLM_ARCH == GLM_ARCH_AVX2) # pragma message("GLM: AVX2 instruction set") -# elif(GLM_ARCH & GLM_ARCH_AVX) +# elif(GLM_ARCH == GLM_ARCH_AVX) # pragma message("GLM: AVX instruction set") -# elif(GLM_ARCH & GLM_ARCH_SSE3) +# elif(GLM_ARCH == GLM_ARCH_SSE42) +# pragma message("GLM: SSE4.2 instruction set") +# elif(GLM_ARCH == GLM_ARCH_SSE41) +# pragma message("GLM: SSE4.1 instruction set") +# elif(GLM_ARCH == GLM_ARCH_SSSE3) +# pragma message("GLM: SSSE3 instruction set") +# elif(GLM_ARCH == GLM_ARCH_SSE3) # pragma message("GLM: SSE3 instruction set") -# elif(GLM_ARCH & GLM_ARCH_SSE2) +# elif(GLM_ARCH == GLM_ARCH_SSE2) # pragma message("GLM: SSE2 instruction set") +# elif(GLM_ARCH == GLM_ARCH_X86) +# pragma message("GLM: x86 instruction set") +# elif(GLM_ARCH == GLM_ARCH_NEON) +# pragma message("GLM: NEON instruction set") +# elif(GLM_ARCH == GLM_ARCH_ARM) +# pragma message("GLM: ARM instruction set") +# elif(GLM_ARCH == GLM_ARCH_MIPS) +# pragma message("GLM: MIPS instruction set") +# elif(GLM_ARCH == GLM_ARCH_PPC) +# pragma message("GLM: PowerPC architechture") # endif//GLM_ARCH -#endif//GLM_MESSAGE +#endif//GLM_MESSAGES /////////////////////////////////////////////////////////////////////////////////// // C++ Version @@ -223,14 +150,14 @@ #elif defined(GLM_FORCE_CXX98) # define GLM_LANG GLM_LANG_CXX98 #else -# if GLM_COMPILER & GLM_COMPILER_LLVM -# if __cplusplus >= 201402L // GLM_COMPILER_LLVM34 + -std=c++14 +# if GLM_COMPILER & GLM_COMPILER_CLANG +# if __cplusplus >= 201402L // GLM_COMPILER_CLANG34 + -std=c++14 # define GLM_LANG GLM_LANG_CXX14 -# elif __has_feature(cxx_decltype_auto) && __has_feature(cxx_aggregate_nsdmi) // GLM_COMPILER_LLVM33 + -std=c++1y +# elif __has_feature(cxx_decltype_auto) && __has_feature(cxx_aggregate_nsdmi) // GLM_COMPILER_CLANG33 + -std=c++1y # define GLM_LANG GLM_LANG_CXX1Y -# elif __cplusplus >= 201103L // GLM_COMPILER_LLVM33 + -std=c++11 +# elif __cplusplus >= 201103L // GLM_COMPILER_CLANG33 + -std=c++11 # define GLM_LANG GLM_LANG_CXX11 -# elif __has_feature(cxx_static_assert) // GLM_COMPILER_LLVM29 + -std=c++11 +# elif __has_feature(cxx_static_assert) // GLM_COMPILER_CLANG29 + -std=c++11 # define GLM_LANG GLM_LANG_CXX0X # elif __cplusplus >= 199711L # define GLM_LANG GLM_LANG_CXX98 @@ -265,8 +192,6 @@ # else # if __cplusplus >= 201402L # define GLM_LANG GLM_LANG_CXX14 -//# elif GLM_COMPILER >= GLM_COMPILER_VC2015 -//# define GLM_LANG GLM_LANG_CXX1Y # elif __cplusplus >= 201103L # define GLM_LANG GLM_LANG_CXX11 # elif GLM_COMPILER >= GLM_COMPILER_VC2010 @@ -321,7 +246,7 @@ # endif #endif -#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_LANG_DISPLAYED) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_LANG_DISPLAYED) # define GLM_MESSAGE_LANG_DISPLAYED # if GLM_LANG & GLM_LANG_CXX1Z_FLAG @@ -345,7 +270,7 @@ # if GLM_LANG & (GLM_LANG_CXXGNU_FLAG | GLM_LANG_CXXMS_FLAG) # pragma message("GLM: Language extensions enabled") # endif//GLM_LANG -#endif//GLM_MESSAGE +#endif//GLM_MESSAGES /////////////////////////////////////////////////////////////////////////////////// // Has of C++ features @@ -354,28 +279,21 @@ // http://gcc.gnu.org/projects/cxx0x.html // http://msdn.microsoft.com/en-us/library/vstudio/hh567368(v=vs.120).aspx -#if GLM_PLATFORM == GLM_PLATFORM_ANDROID || GLM_PLATFORM == GLM_PLATFORM_CYGWIN -# define GLM_HAS_CXX11_STL 0 -#elif GLM_COMPILER & GLM_COMPILER_LLVM -# if __has_include(<__config>) // libc++ -# include <__config> -//# else // libstdc++ -//# include <bits/c++config.h> -# endif -# if defined(_LIBCPP_VERSION)// || defined(__GLIBCXX__) +#if GLM_COMPILER & GLM_COMPILER_CLANG +# if defined(_LIBCPP_VERSION) && GLM_LANG & GLM_LANG_CXX11_FLAG # define GLM_HAS_CXX11_STL 1 # else # define GLM_HAS_CXX11_STL 0 # endif #else -# define GLM_HAS_CXX11_STL ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && \ +# define GLM_HAS_CXX11_STL ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\ ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48)) || \ ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)) || \ - ((GLM_PLATFORM != GLM_PLATFORM_WINDOWS) && (GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL15))) + ((GLM_PLATFORM != GLM_PLATFORM_WINDOWS) && (GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL15)))) #endif // N1720 -#if GLM_COMPILER & GLM_COMPILER_LLVM +#if GLM_COMPILER & GLM_COMPILER_CLANG # define GLM_HAS_STATIC_ASSERT __has_feature(cxx_static_assert) #elif GLM_LANG & GLM_LANG_CXX11_FLAG # define GLM_HAS_STATIC_ASSERT 1 @@ -394,11 +312,11 @@ ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012)) || \ ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_CUDA)) || \ ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \ - ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_LLVM) && (GLM_COMPILER >= GLM_COMPILER_LLVM30))) + ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_CLANG) && (GLM_COMPILER >= GLM_COMPILER_CLANG30))) #endif // N2235 -#if GLM_COMPILER & GLM_COMPILER_LLVM +#if GLM_COMPILER & GLM_COMPILER_CLANG # define GLM_HAS_CONSTEXPR __has_feature(cxx_constexpr) # define GLM_HAS_CONSTEXPR_PARTIAL GLM_HAS_CONSTEXPR #elif GLM_LANG & GLM_LANG_CXX11_FLAG @@ -406,12 +324,12 @@ # define GLM_HAS_CONSTEXPR_PARTIAL GLM_HAS_CONSTEXPR #else # define GLM_HAS_CONSTEXPR ((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\ - ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)))) + ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC48)))) // GCC 4.6 support constexpr but there is a compiler bug causing a crash # define GLM_HAS_CONSTEXPR_PARTIAL (GLM_HAS_CONSTEXPR || ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2015))) #endif // N2672 -#if GLM_COMPILER & GLM_COMPILER_LLVM +#if GLM_COMPILER & GLM_COMPILER_CLANG # define GLM_HAS_INITIALIZER_LISTS __has_feature(cxx_generalized_initializers) #elif GLM_LANG & GLM_LANG_CXX11_FLAG # define GLM_HAS_INITIALIZER_LISTS 1 @@ -423,23 +341,21 @@ #endif // N2544 Unrestricted unions http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf - -#define GLM_NOT_BUGGY_VC32BITS (!(GLM_MODEL == GLM_MODEL_32 && (GLM_COMPILER & GLM_COMPILER_VC) && GLM_COMPILER < GLM_COMPILER_VC2013)) - -#if GLM_COMPILER & GLM_COMPILER_LLVM +#if GLM_COMPILER & GLM_COMPILER_CLANG # define GLM_HAS_UNRESTRICTED_UNIONS __has_feature(cxx_unrestricted_unions) #elif GLM_LANG & (GLM_LANG_CXX11_FLAG | GLM_LANG_CXXMS_FLAG) # define GLM_HAS_UNRESTRICTED_UNIONS 1 #else # define GLM_HAS_UNRESTRICTED_UNIONS (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\ ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_LANG & GLM_LANG_CXXMS_FLAG)) || \ - ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2015)) || \ ((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA75)) || \ ((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46))) #endif // N2346 -#if GLM_COMPILER & GLM_COMPILER_LLVM +#if defined(GLM_FORCE_UNRESTRICTED_GENTYPE) +# define GLM_HAS_DEFAULTED_FUNCTIONS 0 +#elif GLM_COMPILER & GLM_COMPILER_CLANG # define GLM_HAS_DEFAULTED_FUNCTIONS __has_feature(cxx_defaulted_functions) #elif GLM_LANG & GLM_LANG_CXX11_FLAG # define GLM_HAS_DEFAULTED_FUNCTIONS 1 @@ -452,7 +368,7 @@ #endif // N2118 -#if GLM_COMPILER & GLM_COMPILER_LLVM +#if GLM_COMPILER & GLM_COMPILER_CLANG # define GLM_HAS_RVALUE_REFERENCES __has_feature(cxx_rvalue_references) #elif GLM_LANG & GLM_LANG_CXX11_FLAG # define GLM_HAS_RVALUE_REFERENCES 1 @@ -464,7 +380,7 @@ #endif // N2437 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf -#if GLM_COMPILER & GLM_COMPILER_LLVM +#if GLM_COMPILER & GLM_COMPILER_CLANG # define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS __has_feature(cxx_explicit_conversions) #elif GLM_LANG & GLM_LANG_CXX11_FLAG # define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS 1 @@ -477,7 +393,7 @@ #endif // N2258 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf -#if GLM_COMPILER & GLM_COMPILER_LLVM +#if GLM_COMPILER & GLM_COMPILER_CLANG # define GLM_HAS_TEMPLATE_ALIASES __has_feature(cxx_alias_templates) #elif GLM_LANG & GLM_LANG_CXX11_FLAG # define GLM_HAS_TEMPLATE_ALIASES 1 @@ -490,7 +406,7 @@ #endif // N2930 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2930.html -#if GLM_COMPILER & GLM_COMPILER_LLVM +#if GLM_COMPILER & GLM_COMPILER_CLANG # define GLM_HAS_RANGE_FOR __has_feature(cxx_range_for) #elif GLM_LANG & GLM_LANG_CXX11_FLAG # define GLM_HAS_RANGE_FOR 1 @@ -545,8 +461,8 @@ # else # define GLM_HAS_OPENMP 0 # endif -# elif GLM_COMPILER & GLM_COMPILER_LLVM -# if GLM_COMPILER >= GLM_COMPILER_LLVM38 +# elif GLM_COMPILER & GLM_COMPILER_CLANG +# if GLM_COMPILER >= GLM_COMPILER_CLANG38 # define GLM_HAS_OPENMP 31 # else # define GLM_HAS_OPENMP 0 @@ -605,7 +521,7 @@ # if GLM_COMPILER & GLM_COMPILER_VC # define GLM_INLINE __forceinline # define GLM_NEVER_INLINE __declspec((noinline)) -# elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM) +# elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG) # define GLM_INLINE inline __attribute__((__always_inline__)) # define GLM_NEVER_INLINE __attribute__((__noinline__)) # elif GLM_COMPILER & GLM_COMPILER_CUDA @@ -626,23 +542,40 @@ /////////////////////////////////////////////////////////////////////////////////// // Swizzle operators -// User defines: GLM_SWIZZLE +// User defines: GLM_FORCE_SWIZZLE + +#define GLM_SWIZZLE_ENABLED 1 +#define GLM_SWIZZLE_DISABLE 0 -#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_SWIZZLE_DISPLAYED) +#if defined(GLM_FORCE_SWIZZLE) +# define GLM_SWIZZLE GLM_SWIZZLE_ENABLED +#else +# define GLM_SWIZZLE GLM_SWIZZLE_DISABLE +#endif + +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_SWIZZLE_DISPLAYED) # define GLM_MESSAGE_SWIZZLE_DISPLAYED -# if defined(GLM_SWIZZLE) +# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED # pragma message("GLM: Swizzling operators enabled") # else # pragma message("GLM: Swizzling operators disabled, #define GLM_SWIZZLE to enable swizzle operators") # endif -#endif//GLM_MESSAGE +#endif//GLM_MESSAGES /////////////////////////////////////////////////////////////////////////////////// -// Clip control +// Allows using not basic types as genType -#ifdef GLM_DEPTH_ZERO_TO_ONE // Legacy 0.9.8 development -# error Define GLM_FORCE_DEPTH_ZERO_TO_ONE instead of GLM_DEPTH_ZERO_TO_ONE to use 0 to 1 clip space. -#endif +// #define GLM_FORCE_UNRESTRICTED_GENTYPE + +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_UNRESTRICTED_GENTYPE_DISPLAYED) +# define GLM_MESSAGE_UNRESTRICTED_GENTYPE_DISPLAYED +# ifdef GLM_FORCE_UNRESTRICTED_GENTYPE +# pragma message("GLM: Use unrestricted genType") +# endif +#endif//GLM_MESSAGES + +/////////////////////////////////////////////////////////////////////////////////// +// Clip control #define GLM_DEPTH_ZERO_TO_ONE 0x00000001 #define GLM_DEPTH_NEGATIVE_ONE_TO_ONE 0x00000002 @@ -653,14 +586,19 @@ # define GLM_DEPTH_CLIP_SPACE GLM_DEPTH_NEGATIVE_ONE_TO_ONE #endif +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_DEPTH_DISPLAYED) +# define GLM_MESSAGE_DEPTH_DISPLAYED +# if GLM_DEPTH_CLIP_SPACE == GLM_DEPTH_ZERO_TO_ONE +# pragma message("GLM: Depth clip space: Zero to one") +# else +# pragma message("GLM: Depth clip space: negative one to one") +# endif +#endif//GLM_MESSAGES + /////////////////////////////////////////////////////////////////////////////////// // Coordinate system, define GLM_FORCE_LEFT_HANDED before including GLM // to use left handed coordinate system by default. -#ifdef GLM_LEFT_HANDED // Legacy 0.9.8 development -# error Define GLM_FORCE_LEFT_HANDED instead of GLM_LEFT_HANDED left handed coordinate system by default. -#endif - #define GLM_LEFT_HANDED 0x00000001 // For DirectX, Metal, Vulkan #define GLM_RIGHT_HANDED 0x00000002 // For OpenGL, default in GLM @@ -668,7 +606,16 @@ # define GLM_COORDINATE_SYSTEM GLM_LEFT_HANDED #else # define GLM_COORDINATE_SYSTEM GLM_RIGHT_HANDED -#endif +#endif + +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_HANDED_DISPLAYED) +# define GLM_MESSAGE_HANDED_DISPLAYED +# if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED +# pragma message("GLM: Coordinate system: left handed") +# else +# pragma message("GLM: Coordinate system: right handed") +# endif +#endif//GLM_MESSAGES /////////////////////////////////////////////////////////////////////////////////// // Qualifiers @@ -685,15 +632,15 @@ # else # define GLM_VECTOR_CALL # endif -#elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM | GLM_COMPILER_CUDA | GLM_COMPILER_INTEL) +#elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG | GLM_COMPILER_INTEL) # define GLM_DEPRECATED __attribute__((__deprecated__)) # define GLM_ALIGN(x) __attribute__((aligned(x))) # define GLM_ALIGNED_STRUCT(x) struct __attribute__((aligned(x))) # define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef type name __attribute__((aligned(alignment))) # define GLM_RESTRICT_FUNC __restrict__ # define GLM_RESTRICT __restrict__ -# if GLM_COMPILER & GLM_COMPILER_LLVM -# if GLM_COMPILER >= GLM_COMPILER_LLVM37 +# if GLM_COMPILER & GLM_COMPILER_CLANG +# if GLM_COMPILER >= GLM_COMPILER_CLANG37 # define GLM_VECTOR_CALL __vectorcall # else # define GLM_VECTOR_CALL @@ -701,6 +648,14 @@ # else # define GLM_VECTOR_CALL # endif +#elif GLM_COMPILER & GLM_COMPILER_CUDA +# define GLM_DEPRECATED +# define GLM_ALIGN(x) __align__(x) +# define GLM_ALIGNED_STRUCT(x) struct __align__(x) +# define GLM_ALIGNED_TYPEDEF(type, name, alignment) typedef type name __align__(x) +# define GLM_RESTRICT_FUNC __restrict__ +# define GLM_RESTRICT __restrict__ +# define GLM_VECTOR_CALL #else # define GLM_DEPRECATED # define GLM_ALIGN @@ -743,13 +698,6 @@ # define GLM_CONSTEXPR_SIMD #endif -// GCC 4.6 has a bug causing a compiler crash -#if GLM_COMPILER & GLM_COMPILER_GCC -# define GLM_CONSTEXPR_GCC -#else -# define GLM_CONSTEXPR_GCC GLM_CONSTEXPR -#endif - #ifdef GLM_FORCE_EXPLICIT_CTOR # define GLM_EXPLICIT explicit #else @@ -757,6 +705,10 @@ #endif /////////////////////////////////////////////////////////////////////////////////// + +#define GLM_HAS_ALIGNED_TYPE GLM_HAS_UNRESTRICTED_UNIONS + +/////////////////////////////////////////////////////////////////////////////////// // Length type // User defines: GLM_FORCE_SIZE_T_LENGTH GLM_FORCE_SIZE_FUNC @@ -771,14 +723,14 @@ namespace glm # endif }//namespace glm -#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_FORCE_SIZE_T_LENGTH) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_FORCE_SIZE_T_LENGTH) # define GLM_MESSAGE_FORCE_SIZE_T_LENGTH # if defined GLM_FORCE_SIZE_T_LENGTH # pragma message("GLM: .length() returns glm::length_t, a typedef of std::size_t") # else # pragma message("GLM: .length() returns glm::length_t, a typedef of int following the GLSL specification") # endif -#endif//GLM_MESSAGE +#endif//GLM_MESSAGES /////////////////////////////////////////////////////////////////////////////////// // countof diff --git a/3rdparty/glm/glm/detail/type_float.hpp b/3rdparty/glm/glm/detail/type_float.hpp index 81d00b6003c..900a3fbc8a8 100644 --- a/3rdparty/glm/glm/detail/type_float.hpp +++ b/3rdparty/glm/glm/detail/type_float.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_float.hpp -/// @date 2008-08-22 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/detail/type_gentype.hpp b/3rdparty/glm/glm/detail/type_gentype.hpp index cfa638677cd..8fd202e2eac 100644 --- a/3rdparty/glm/glm/detail/type_gentype.hpp +++ b/3rdparty/glm/glm/detail/type_gentype.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_gentype.hpp -/// @date 2008-10-05 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/detail/type_gentype.inl b/3rdparty/glm/glm/detail/type_gentype.inl index e46e7743211..6a90288eb31 100644 --- a/3rdparty/glm/glm/detail/type_gentype.inl +++ b/3rdparty/glm/glm/detail/type_gentype.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_gentype.inl -/// @date 2008-10-05 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm{ namespace detail{ diff --git a/3rdparty/glm/glm/detail/type_half.hpp b/3rdparty/glm/glm/detail/type_half.hpp index 6f6fae213d3..c3ef6176471 100644 --- a/3rdparty/glm/glm/detail/type_half.hpp +++ b/3rdparty/glm/glm/detail/type_half.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_half.hpp -/// @date 2008-08-17 / 2011-09-20 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/detail/type_half.inl b/3rdparty/glm/glm/detail/type_half.inl index b9f9f0ed972..78d3e26101c 100644 --- a/3rdparty/glm/glm/detail/type_half.inl +++ b/3rdparty/glm/glm/detail/type_half.inl @@ -1,38 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// -/// This half implementation is based on OpenEXR which is Copyright (c) 2002, -/// Industrial Light & Magic, a division of Lucas Digital Ltd. LLC -/// -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_half.inl -/// @date 2008-08-17 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm{ namespace detail diff --git a/3rdparty/glm/glm/detail/type_int.hpp b/3rdparty/glm/glm/detail/type_int.hpp index 361f6c11c9b..764a32cf9f4 100644 --- a/3rdparty/glm/glm/detail/type_int.hpp +++ b/3rdparty/glm/glm/detail/type_int.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_int.hpp -/// @date 2008-08-22 / 2013-03-30 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -58,12 +29,21 @@ namespace detail # if(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) // C99 detected, 64 bit types available typedef int64_t sint64; typedef uint64_t uint64; + # elif GLM_COMPILER & GLM_COMPILER_VC typedef signed __int64 sint64; typedef unsigned __int64 uint64; + # elif GLM_COMPILER & GLM_COMPILER_GCC +# pragma GCC diagnostic ignored "-Wlong-long" __extension__ typedef signed long long sint64; __extension__ typedef unsigned long long uint64; + +# elif (GLM_COMPILER & GLM_COMPILER_CLANG) +# pragma clang diagnostic ignored "-Wc++11-long-long" + typedef signed long long sint64; + typedef unsigned long long uint64; + # else//unknown compiler typedef signed long long sint64; typedef unsigned long long uint64; @@ -120,13 +100,7 @@ namespace detail { typedef long type; }; - - template <> - struct make_signed<long long> - { - typedef long long type; - }; - + template <> struct make_signed<unsigned char> { @@ -151,12 +125,6 @@ namespace detail typedef long type; }; - template <> - struct make_signed<unsigned long long> - { - typedef long long type; - }; - template <typename genType> struct make_unsigned {}; @@ -186,12 +154,6 @@ namespace detail }; template <> - struct make_unsigned<long long> - { - typedef unsigned long long type; - }; - - template <> struct make_unsigned<unsigned char> { typedef unsigned char type; @@ -216,6 +178,24 @@ namespace detail }; template <> + struct make_signed<long long> + { + typedef long long type; + }; + + template <> + struct make_signed<unsigned long long> + { + typedef long long type; + }; + + template <> + struct make_unsigned<long long> + { + typedef unsigned long long type; + }; + + template <> struct make_unsigned<unsigned long long> { typedef unsigned long long type; diff --git a/3rdparty/glm/glm/detail/type_mat.hpp b/3rdparty/glm/glm/detail/type_mat.hpp index 2e4f5113bdf..aad74e5b466 100644 --- a/3rdparty/glm/glm/detail/type_mat.hpp +++ b/3rdparty/glm/glm/detail/type_mat.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_mat.hpp -/// @date 2010-01-26 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -54,6 +25,9 @@ namespace detail template <typename T, precision P> struct tmat4x3; template <typename T, precision P> struct tmat4x4; + template <typename T, precision P, template <typename, precision> class matType> + GLM_FUNC_DECL matType<T, P> inverse(matType<T, P> const & m); + /// @addtogroup core_precision /// @{ diff --git a/3rdparty/glm/glm/detail/type_mat.inl b/3rdparty/glm/glm/detail/type_mat.inl index d6f43abc6d5..57149954171 100644 --- a/3rdparty/glm/glm/detail/type_mat.inl +++ b/3rdparty/glm/glm/detail/type_mat.inl @@ -1,32 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_mat.inl -/// @date 2011-06-15 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// diff --git a/3rdparty/glm/glm/detail/type_mat2x2.hpp b/3rdparty/glm/glm/detail/type_mat2x2.hpp index f188b4d0d95..d51389b1325 100644 --- a/3rdparty/glm/glm/detail/type_mat2x2.hpp +++ b/3rdparty/glm/glm/detail/type_mat2x2.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_mat2x2.hpp -/// @date 2005-01-27 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/detail/type_mat2x2.inl b/3rdparty/glm/glm/detail/type_mat2x2.inl index c1eb176acc1..92940eff97f 100644 --- a/3rdparty/glm/glm/detail/type_mat2x2.inl +++ b/3rdparty/glm/glm/detail/type_mat2x2.inl @@ -1,55 +1,10 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_mat2x2.inl -/// @date 2005-01-16 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// -namespace glm{ -namespace detail -{ - template <typename T, precision P> - GLM_FUNC_QUALIFIER tmat2x2<T, P> compute_inverse(tmat2x2<T, P> const & m) - { - T OneOverDeterminant = static_cast<T>(1) / ( - + m[0][0] * m[1][1] - - m[1][0] * m[0][1]); - - tmat2x2<T, P> Inverse( - + m[1][1] * OneOverDeterminant, - - m[0][1] * OneOverDeterminant, - - m[1][0] * OneOverDeterminant, - + m[0][0] * OneOverDeterminant); - - return Inverse; - } -}//namespace detail +#include "func_matrix.hpp" +namespace glm +{ // -- Constructors -- # if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) @@ -305,7 +260,7 @@ namespace detail template <typename U> GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator/=(tmat2x2<U, P> const & m) { - return (*this = *this * detail::compute_inverse<T, P>(m)); + return *this *= inverse(m); } // -- Increment and decrement operators -- @@ -503,13 +458,13 @@ namespace detail template <typename T, precision P> GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type operator/(tmat2x2<T, P> const & m, typename tmat2x2<T, P>::row_type const & v) { - return detail::compute_inverse<T, P>(m) * v; + return inverse(m) * v; } template <typename T, precision P> GLM_FUNC_QUALIFIER typename tmat2x2<T, P>::row_type operator/(typename tmat2x2<T, P>::col_type const & v, tmat2x2<T, P> const & m) { - return v * detail::compute_inverse<T, P>(m); + return v * inverse(m); } template <typename T, precision P> diff --git a/3rdparty/glm/glm/detail/type_mat2x3.hpp b/3rdparty/glm/glm/detail/type_mat2x3.hpp index 0eaf454b2f8..0b48727a8c0 100644 --- a/3rdparty/glm/glm/detail/type_mat2x3.hpp +++ b/3rdparty/glm/glm/detail/type_mat2x3.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_mat2x3.hpp -/// @date 2006-10-01 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/detail/type_mat2x3.inl b/3rdparty/glm/glm/detail/type_mat2x3.inl index 3af09be1888..8b13f8ba349 100644 --- a/3rdparty/glm/glm/detail/type_mat2x3.inl +++ b/3rdparty/glm/glm/detail/type_mat2x3.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_mat2x3.inl -/// @date 2006-08-05 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/detail/type_mat2x4.hpp b/3rdparty/glm/glm/detail/type_mat2x4.hpp index ef8f4af962e..741968e39bf 100644 --- a/3rdparty/glm/glm/detail/type_mat2x4.hpp +++ b/3rdparty/glm/glm/detail/type_mat2x4.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_mat2x4.hpp -/// @date 2006-08-05 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/detail/type_mat2x4.inl b/3rdparty/glm/glm/detail/type_mat2x4.inl index 3542443de34..47fd9fad127 100644 --- a/3rdparty/glm/glm/detail/type_mat2x4.inl +++ b/3rdparty/glm/glm/detail/type_mat2x4.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_mat2x4.inl -/// @date 2006-08-05 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/detail/type_mat3x2.hpp b/3rdparty/glm/glm/detail/type_mat3x2.hpp index 8158f77622a..5d20fd8efbc 100644 --- a/3rdparty/glm/glm/detail/type_mat3x2.hpp +++ b/3rdparty/glm/glm/detail/type_mat3x2.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_mat3x2.hpp -/// @date 2006-08-05 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/detail/type_mat3x2.inl b/3rdparty/glm/glm/detail/type_mat3x2.inl index a64bfc5199a..af0c768af27 100644 --- a/3rdparty/glm/glm/detail/type_mat3x2.inl +++ b/3rdparty/glm/glm/detail/type_mat3x2.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_mat3x2.inl -/// @date 2006-08-05 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/detail/type_mat3x3.hpp b/3rdparty/glm/glm/detail/type_mat3x3.hpp index 4eb5cd778b7..25e3a49a019 100644 --- a/3rdparty/glm/glm/detail/type_mat3x3.hpp +++ b/3rdparty/glm/glm/detail/type_mat3x3.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_mat3x3.hpp -/// @date 2005-01-27 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/detail/type_mat3x3.inl b/3rdparty/glm/glm/detail/type_mat3x3.inl index 917d6a88527..aec8e19662d 100644 --- a/3rdparty/glm/glm/detail/type_mat3x3.inl +++ b/3rdparty/glm/glm/detail/type_mat3x3.inl @@ -1,61 +1,10 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_mat3x3.inl -/// @date 2005-01-27 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// -namespace glm{ -namespace detail -{ - template <typename T, precision P> - GLM_FUNC_QUALIFIER tmat3x3<T, P> compute_inverse(tmat3x3<T, P> const & m) - { - T OneOverDeterminant = static_cast<T>(1) / ( - + m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2]) - - m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2]) - + m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2])); - - tmat3x3<T, P> Inverse(uninitialize); - Inverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]) * OneOverDeterminant; - Inverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]) * OneOverDeterminant; - Inverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]) * OneOverDeterminant; - Inverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]) * OneOverDeterminant; - Inverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]) * OneOverDeterminant; - Inverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]) * OneOverDeterminant; - Inverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]) * OneOverDeterminant; - Inverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]) * OneOverDeterminant; - Inverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]) * OneOverDeterminant; - - return Inverse; - } -}//namespace detail +#include "func_matrix.hpp" +namespace glm +{ // -- Constructors -- # if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) @@ -351,7 +300,7 @@ namespace detail template <typename U> GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator/=(tmat3x3<U, P> const & m) { - return (*this = *this * detail::compute_inverse<T, P>(m)); + return *this *= inverse(m); } // -- Increment and decrement operators -- @@ -586,13 +535,13 @@ namespace detail template <typename T, precision P> GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type operator/(tmat3x3<T, P> const & m, typename tmat3x3<T, P>::row_type const & v) { - return detail::compute_inverse<T, P>(m) * v; + return inverse(m) * v; } template <typename T, precision P> GLM_FUNC_QUALIFIER typename tmat3x3<T, P>::row_type operator/(typename tmat3x3<T, P>::col_type const & v, tmat3x3<T, P> const & m) { - return v * detail::compute_inverse<T, P>(m); + return v * inverse(m); } template <typename T, precision P> diff --git a/3rdparty/glm/glm/detail/type_mat3x4.hpp b/3rdparty/glm/glm/detail/type_mat3x4.hpp index 4778b8fc4af..76e71694608 100644 --- a/3rdparty/glm/glm/detail/type_mat3x4.hpp +++ b/3rdparty/glm/glm/detail/type_mat3x4.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_mat3x4.hpp -/// @date 2006-08-05 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/detail/type_mat3x4.inl b/3rdparty/glm/glm/detail/type_mat3x4.inl index 827c327c016..7f55e9a5b5c 100644 --- a/3rdparty/glm/glm/detail/type_mat3x4.inl +++ b/3rdparty/glm/glm/detail/type_mat3x4.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_mat3x4.inl -/// @date 2006-08-05 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/detail/type_mat4x2.hpp b/3rdparty/glm/glm/detail/type_mat4x2.hpp index a8cd0f3004a..53a5d078f15 100644 --- a/3rdparty/glm/glm/detail/type_mat4x2.hpp +++ b/3rdparty/glm/glm/detail/type_mat4x2.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_mat4x2.hpp -/// @date 2006-10-01 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/detail/type_mat4x2.inl b/3rdparty/glm/glm/detail/type_mat4x2.inl index f374984e197..cbf1b348a47 100644 --- a/3rdparty/glm/glm/detail/type_mat4x2.inl +++ b/3rdparty/glm/glm/detail/type_mat4x2.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_mat4x2.inl -/// @date 2006-10-01 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/detail/type_mat4x3.hpp b/3rdparty/glm/glm/detail/type_mat4x3.hpp index 7aae7bdd359..15c328e60ce 100644 --- a/3rdparty/glm/glm/detail/type_mat4x3.hpp +++ b/3rdparty/glm/glm/detail/type_mat4x3.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_mat4x3.hpp -/// @date 2006-08-04 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/detail/type_mat4x3.inl b/3rdparty/glm/glm/detail/type_mat4x3.inl index da118ff1a01..2aa8289cefe 100644 --- a/3rdparty/glm/glm/detail/type_mat4x3.inl +++ b/3rdparty/glm/glm/detail/type_mat4x3.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_mat4x3.inl -/// @date 2006-04-17 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/detail/type_mat4x4.hpp b/3rdparty/glm/glm/detail/type_mat4x4.hpp index 84362fa073e..d0043944b68 100644 --- a/3rdparty/glm/glm/detail/type_mat4x4.hpp +++ b/3rdparty/glm/glm/detail/type_mat4x4.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_mat4x4.hpp -/// @date 2005-01-27 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -60,7 +31,7 @@ namespace glm template <precision Q> GLM_FUNC_DECL tmat4x4(tmat4x4<T, Q> const & m); - GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tmat4x4(ctor); + GLM_FUNC_DECL explicit tmat4x4(ctor); GLM_FUNC_DECL explicit tmat4x4(T const & x); GLM_FUNC_DECL tmat4x4( T const & x0, T const & y0, T const & z0, T const & w0, diff --git a/3rdparty/glm/glm/detail/type_mat4x4.inl b/3rdparty/glm/glm/detail/type_mat4x4.inl index 27231863371..81b27503844 100644 --- a/3rdparty/glm/glm/detail/type_mat4x4.inl +++ b/3rdparty/glm/glm/detail/type_mat4x4.inl @@ -1,97 +1,10 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_mat4x4.inl -/// @date 2005-01-27 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// -namespace glm{ -namespace detail -{ - template <typename T, precision P> - GLM_FUNC_QUALIFIER tmat4x4<T, P> compute_inverse(tmat4x4<T, P> 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]; - - tvec4<T, P> Fac0(Coef00, Coef00, Coef02, Coef03); - tvec4<T, P> Fac1(Coef04, Coef04, Coef06, Coef07); - tvec4<T, P> Fac2(Coef08, Coef08, Coef10, Coef11); - tvec4<T, P> Fac3(Coef12, Coef12, Coef14, Coef15); - tvec4<T, P> Fac4(Coef16, Coef16, Coef18, Coef19); - tvec4<T, P> Fac5(Coef20, Coef20, Coef22, Coef23); - - tvec4<T, P> Vec0(m[1][0], m[0][0], m[0][0], m[0][0]); - tvec4<T, P> Vec1(m[1][1], m[0][1], m[0][1], m[0][1]); - tvec4<T, P> Vec2(m[1][2], m[0][2], m[0][2], m[0][2]); - tvec4<T, P> Vec3(m[1][3], m[0][3], m[0][3], m[0][3]); - - tvec4<T, P> Inv0(Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2); - tvec4<T, P> Inv1(Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4); - tvec4<T, P> Inv2(Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5); - tvec4<T, P> Inv3(Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5); - - tvec4<T, P> SignA(+1, -1, +1, -1); - tvec4<T, P> SignB(-1, +1, -1, +1); - tmat4x4<T, P> Inverse(Inv0 * SignA, Inv1 * SignB, Inv2 * SignA, Inv3 * SignB); - - tvec4<T, P> Row0(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]); - - tvec4<T, P> Dot0(m[0] * Row0); - T Dot1 = (Dot0.x + Dot0.y) + (Dot0.z + Dot0.w); - - T OneOverDeterminant = static_cast<T>(1) / Dot1; - - return Inverse * OneOverDeterminant; - } -}//namespace detail +#include "func_matrix.hpp" +namespace glm +{ // -- Constructors -- # if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) @@ -129,7 +42,7 @@ namespace detail } template <typename T, precision P> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tmat4x4<T, P>::tmat4x4(ctor) + GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(ctor) {} template <typename T, precision P> @@ -449,7 +362,7 @@ namespace detail template <typename U> GLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator/=(tmat4x4<U, P> const & m) { - return (*this = *this * detail::compute_inverse<T, P>(m)); + return *this *= inverse(m); } // -- Increment and decrement operators -- @@ -728,13 +641,13 @@ namespace detail template <typename T, precision P> GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type operator/(tmat4x4<T, P> const & m, typename tmat4x4<T, P>::row_type const & v) { - return detail::compute_inverse<T, P>(m) * v; + return inverse(m) * v; } template <typename T, precision P> GLM_FUNC_QUALIFIER typename tmat4x4<T, P>::row_type operator/(typename tmat4x4<T, P>::col_type const & v, tmat4x4<T, P> const & m) { - return v * detail::compute_inverse<T, P>(m); + return v * inverse(m); } template <typename T, precision P> diff --git a/3rdparty/glm/glm/detail/type_vec.hpp b/3rdparty/glm/glm/detail/type_vec.hpp index ee0e2b307d4..23e463e7f03 100644 --- a/3rdparty/glm/glm/detail/type_vec.hpp +++ b/3rdparty/glm/glm/detail/type_vec.hpp @@ -1,42 +1,108 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_vec.hpp -/// @date 2010-01-26 / 2014-10-05 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once #include "precision.hpp" #include "type_int.hpp" -namespace glm +namespace glm{ +namespace detail { + template<std::size_t N> struct aligned {}; + template<> GLM_ALIGNED_STRUCT(1) aligned<1>{}; + template<> GLM_ALIGNED_STRUCT(2) aligned<2>{}; + template<> GLM_ALIGNED_STRUCT(4) aligned<4>{}; + template<> GLM_ALIGNED_STRUCT(8) aligned<8>{}; + template<> GLM_ALIGNED_STRUCT(16) aligned<16>{}; + template<> GLM_ALIGNED_STRUCT(32) aligned<32>{}; + template<> GLM_ALIGNED_STRUCT(64) aligned<64>{}; + + template <typename T, std::size_t size, bool aligned> + struct storage + { + typedef struct type { + uint8 data[size]; + } type; + }; + + template <typename T, std::size_t size> + struct storage<T, size, true> + { + struct type : aligned<size> + { + uint8 data[size]; + }; + }; + +# if GLM_ARCH & GLM_ARCH_SSE2_BIT + template <> + struct storage<float, 16, true> + { + typedef glm_vec4 type; + }; + + template <> + struct storage<int, 16, true> + { + typedef glm_ivec4 type; + }; + + template <> + struct storage<unsigned int, 16, true> + { + typedef glm_uvec4 type; + }; +/* +# else + typedef union __declspec(align(16)) glm_128 + { + unsigned __int8 data[16]; + } glm_128; + + template <> + struct storage<float, 16, true> + { + typedef glm_128 type; + }; + + template <> + struct storage<int, 16, true> + { + typedef glm_128 type; + }; + + template <> + struct storage<unsigned int, 16, true> + { + typedef glm_128 type; + }; +*/ +# endif + +# if (GLM_ARCH & GLM_ARCH_AVX_BIT) + template <> + struct storage<double, 32, true> + { + typedef glm_dvec4 type; + }; +# endif + +# if (GLM_ARCH & GLM_ARCH_AVX2_BIT) + template <> + struct storage<int64, 32, true> + { + typedef glm_i64vec4 type; + }; + + template <> + struct storage<uint64, 32, true> + { + typedef glm_u64vec4 type; + }; +# endif +}//namespace detail + template <typename T, precision P> struct tvec1; template <typename T, precision P> struct tvec2; template <typename T, precision P> struct tvec3; diff --git a/3rdparty/glm/glm/detail/type_vec.inl b/3rdparty/glm/glm/detail/type_vec.inl index 20219806534..2238a1bc6b3 100644 --- a/3rdparty/glm/glm/detail/type_vec.inl +++ b/3rdparty/glm/glm/detail/type_vec.inl @@ -1,31 +1,2 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_vec.inl -/// @date 2011-06-15 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// diff --git a/3rdparty/glm/glm/detail/type_vec1.hpp b/3rdparty/glm/glm/detail/type_vec1.hpp index 472c89bd951..dd673a7ca4e 100644 --- a/3rdparty/glm/glm/detail/type_vec1.hpp +++ b/3rdparty/glm/glm/detail/type_vec1.hpp @@ -1,40 +1,11 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_vec1.hpp -/// @date 2008-08-25 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once #include "../fwd.hpp" #include "type_vec.hpp" -#ifdef GLM_SWIZZLE +#if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED # if GLM_HAS_UNRESTRICTED_UNIONS # include "_swizzle.hpp" # else @@ -50,20 +21,30 @@ namespace glm { // -- Implementation detail -- + typedef T value_type; typedef tvec1<T, P> type; typedef tvec1<bool, P> bool_type; - typedef T value_type; // -- Data -- -# if GLM_HAS_UNRESTRICTED_UNIONS +# if GLM_HAS_ALIGNED_TYPE +# if GLM_COMPILER & GLM_COMPILER_GCC +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wpedantic" +# endif +# if GLM_COMPILER & GLM_COMPILER_CLANG +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wgnu-anonymous-struct" +# pragma clang diagnostic ignored "-Wnested-anon-types" +# endif + union { T x; T r; T s; /* -# ifdef GLM_SWIZZLE +# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED _GLM_SWIZZLE1_2_MEMBERS(T, P, tvec2, x) _GLM_SWIZZLE1_2_MEMBERS(T, P, tvec2, r) _GLM_SWIZZLE1_2_MEMBERS(T, P, tvec2, s) @@ -75,10 +56,17 @@ namespace glm _GLM_SWIZZLE1_4_MEMBERS(T, P, tvec4, s) # endif//GLM_SWIZZLE*/ }; + +# if GLM_COMPILER & GLM_COMPILER_CLANG +# pragma clang diagnostic pop +# endif +# if GLM_COMPILER & GLM_COMPILER_GCC +# pragma GCC diagnostic pop +# endif # else union {T x, r, s;}; /* -# ifdef GLM_SWIZZLE +# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED GLM_SWIZZLE_GEN_VEC_FROM_VEC1(T, P, tvec2, tvec2, tvec3, tvec4) # endif//GLM_SWIZZLE*/ # endif @@ -102,7 +90,7 @@ namespace glm // -- Explicit basic constructors -- GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tvec1(ctor); - GLM_FUNC_DECL GLM_CONSTEXPR_GCC explicit tvec1(T scalar); + GLM_FUNC_DECL GLM_CONSTEXPR explicit tvec1(T scalar); // -- Conversion vector constructors -- @@ -121,15 +109,15 @@ namespace glm GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tvec1(tvec1<U, Q> const & v); // -- Swizzle constructors -- - -# if(GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)) +/* +# if(GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED)) template <int E0> - GLM_FUNC_DECL tvec1(detail::_swizzle<1, T, P, tvec1<T, P>, E0, -1,-2,-3> const & that) + GLM_FUNC_DECL tvec1(detail::_swizzle<1, T, P, tvec1, E0, -1,-2,-3> const & that) { *this = that(); } -# endif//(GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)) - +# endif//(GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED)) +*/ // -- Unary arithmetic operators -- GLM_FUNC_DECL tvec1<T, P> & operator=(tvec1<T, P> const & v) GLM_DEFAULT; diff --git a/3rdparty/glm/glm/detail/type_vec1.inl b/3rdparty/glm/glm/detail/type_vec1.inl index 364327619aa..56f6b25bb6f 100644 --- a/3rdparty/glm/glm/detail/type_vec1.inl +++ b/3rdparty/glm/glm/detail/type_vec1.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_vec1.inl -/// @date 2008-08-25 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { @@ -63,7 +34,7 @@ namespace glm {} template <typename T, precision P> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_GCC tvec1<T, P>::tvec1(T scalar) + GLM_FUNC_QUALIFIER GLM_CONSTEXPR tvec1<T, P>::tvec1(T scalar) : x(scalar) {} diff --git a/3rdparty/glm/glm/detail/type_vec2.hpp b/3rdparty/glm/glm/detail/type_vec2.hpp index 24d05e22111..9a9ef42d7c1 100644 --- a/3rdparty/glm/glm/detail/type_vec2.hpp +++ b/3rdparty/glm/glm/detail/type_vec2.hpp @@ -1,39 +1,10 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_vec2.hpp -/// @date 2008-08-18 / 2013-08-27 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once #include "type_vec.hpp" -#ifdef GLM_SWIZZLE +#if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED # if GLM_HAS_UNRESTRICTED_UNIONS # include "_swizzle.hpp" # else @@ -55,30 +26,48 @@ namespace glm // -- Data -- -# if GLM_HAS_UNRESTRICTED_UNIONS +# if GLM_HAS_ALIGNED_TYPE +# if GLM_COMPILER & GLM_COMPILER_GCC +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wpedantic" +# endif +# if GLM_COMPILER & GLM_COMPILER_CLANG +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wgnu-anonymous-struct" +# pragma clang diagnostic ignored "-Wnested-anon-types" +# endif + union { struct{ T x, y; }; struct{ T r, g; }; struct{ T s, t; }; -# ifdef GLM_SWIZZLE - _GLM_SWIZZLE2_2_MEMBERS(T, P, tvec2, x, y) - _GLM_SWIZZLE2_2_MEMBERS(T, P, tvec2, r, g) - _GLM_SWIZZLE2_2_MEMBERS(T, P, tvec2, s, t) - _GLM_SWIZZLE2_3_MEMBERS(T, P, tvec3, x, y) - _GLM_SWIZZLE2_3_MEMBERS(T, P, tvec3, r, g) - _GLM_SWIZZLE2_3_MEMBERS(T, P, tvec3, s, t) - _GLM_SWIZZLE2_4_MEMBERS(T, P, tvec4, x, y) - _GLM_SWIZZLE2_4_MEMBERS(T, P, tvec4, r, g) - _GLM_SWIZZLE2_4_MEMBERS(T, P, tvec4, s, t) +# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED + _GLM_SWIZZLE2_2_MEMBERS(T, P, glm::tvec2, x, y) + _GLM_SWIZZLE2_2_MEMBERS(T, P, glm::tvec2, r, g) + _GLM_SWIZZLE2_2_MEMBERS(T, P, glm::tvec2, s, t) + _GLM_SWIZZLE2_3_MEMBERS(T, P, glm::tvec3, x, y) + _GLM_SWIZZLE2_3_MEMBERS(T, P, glm::tvec3, r, g) + _GLM_SWIZZLE2_3_MEMBERS(T, P, glm::tvec3, s, t) + _GLM_SWIZZLE2_4_MEMBERS(T, P, glm::tvec4, x, y) + _GLM_SWIZZLE2_4_MEMBERS(T, P, glm::tvec4, r, g) + _GLM_SWIZZLE2_4_MEMBERS(T, P, glm::tvec4, s, t) # endif//GLM_SWIZZLE + }; + +# if GLM_COMPILER & GLM_COMPILER_CLANG +# pragma clang diagnostic pop +# endif +# if GLM_COMPILER & GLM_COMPILER_GCC +# pragma GCC diagnostic pop +# endif # else union {T x, r, s;}; union {T y, g, t;}; -# ifdef GLM_SWIZZLE +# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED GLM_SWIZZLE_GEN_VEC_FROM_VEC2(T, P, tvec2, tvec2, tvec3, tvec4) # endif//GLM_SWIZZLE # endif @@ -102,7 +91,7 @@ namespace glm // -- Explicit basic constructors -- GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tvec2(ctor); - GLM_FUNC_DECL GLM_CONSTEXPR_GCC explicit tvec2(T scalar); + GLM_FUNC_DECL GLM_CONSTEXPR explicit tvec2(T scalar); GLM_FUNC_DECL GLM_CONSTEXPR tvec2(T s1, T s2); // -- Conversion constructors -- @@ -127,14 +116,13 @@ namespace glm GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tvec2(tvec2<U, Q> const & v); // -- Swizzle constructors -- - -# if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +# if GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED) template <int E0, int E1> - GLM_FUNC_DECL tvec2(detail::_swizzle<2, T, P, tvec2<T, P>, E0, E1,-1,-2> const & that) + GLM_FUNC_DECL tvec2(detail::_swizzle<2, T, P, glm::tvec2, E0, E1,-1,-2> const& that) { *this = that(); } -# endif// GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +# endif// GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED) // -- Unary arithmetic operators -- diff --git a/3rdparty/glm/glm/detail/type_vec2.inl b/3rdparty/glm/glm/detail/type_vec2.inl index 4daccbea4f8..d10f96e6ab0 100644 --- a/3rdparty/glm/glm/detail/type_vec2.inl +++ b/3rdparty/glm/glm/detail/type_vec2.inl @@ -1,30 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// 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/core/type_tvec2.inl -/// @date 2008-08-18 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { @@ -72,7 +47,7 @@ namespace glm {} template <typename T, precision P> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_GCC tvec2<T, P>::tvec2(T scalar) + GLM_FUNC_QUALIFIER GLM_CONSTEXPR tvec2<T, P>::tvec2(T scalar) : x(scalar), y(scalar) {} diff --git a/3rdparty/glm/glm/detail/type_vec3.hpp b/3rdparty/glm/glm/detail/type_vec3.hpp index d77834e1d93..ebd135d62f5 100644 --- a/3rdparty/glm/glm/detail/type_vec3.hpp +++ b/3rdparty/glm/glm/detail/type_vec3.hpp @@ -1,45 +1,16 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_vec3.hpp -/// @date 2008-08-22 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once #include "type_vec.hpp" -#ifdef GLM_SWIZZLE +#if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED # if GLM_HAS_UNRESTRICTED_UNIONS # include "_swizzle.hpp" # else # include "_swizzle_func.hpp" # endif -#endif //GLM_SWIZZLE +#endif //GLM_SWIZZLE == GLM_SWIZZLE_ENABLED #include <cstddef> namespace glm @@ -49,37 +20,54 @@ namespace glm { // -- Implementation detail -- + typedef T value_type; typedef tvec3<T, P> type; typedef tvec3<bool, P> bool_type; - typedef T value_type; // -- Data -- -# if GLM_HAS_UNRESTRICTED_UNIONS +# if GLM_HAS_ALIGNED_TYPE +# if GLM_COMPILER & GLM_COMPILER_GCC +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wpedantic" +# endif +# if GLM_COMPILER & GLM_COMPILER_CLANG +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wgnu-anonymous-struct" +# pragma clang diagnostic ignored "-Wnested-anon-types" +# endif + union { struct{ T x, y, z; }; struct{ T r, g, b; }; struct{ T s, t, p; }; -# ifdef GLM_SWIZZLE - _GLM_SWIZZLE3_2_MEMBERS(T, P, tvec2, x, y, z) - _GLM_SWIZZLE3_2_MEMBERS(T, P, tvec2, r, g, b) - _GLM_SWIZZLE3_2_MEMBERS(T, P, tvec2, s, t, p) - _GLM_SWIZZLE3_3_MEMBERS(T, P, tvec3, x, y, z) - _GLM_SWIZZLE3_3_MEMBERS(T, P, tvec3, r, g, b) - _GLM_SWIZZLE3_3_MEMBERS(T, P, tvec3, s, t, p) - _GLM_SWIZZLE3_4_MEMBERS(T, P, tvec4, x, y, z) - _GLM_SWIZZLE3_4_MEMBERS(T, P, tvec4, r, g, b) - _GLM_SWIZZLE3_4_MEMBERS(T, P, tvec4, s, t, p) +# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED + _GLM_SWIZZLE3_2_MEMBERS(T, P, glm::tvec2, x, y, z) + _GLM_SWIZZLE3_2_MEMBERS(T, P, glm::tvec2, r, g, b) + _GLM_SWIZZLE3_2_MEMBERS(T, P, glm::tvec2, s, t, p) + _GLM_SWIZZLE3_3_MEMBERS(T, P, glm::tvec3, x, y, z) + _GLM_SWIZZLE3_3_MEMBERS(T, P, glm::tvec3, r, g, b) + _GLM_SWIZZLE3_3_MEMBERS(T, P, glm::tvec3, s, t, p) + _GLM_SWIZZLE3_4_MEMBERS(T, P, glm::tvec4, x, y, z) + _GLM_SWIZZLE3_4_MEMBERS(T, P, glm::tvec4, r, g, b) + _GLM_SWIZZLE3_4_MEMBERS(T, P, glm::tvec4, s, t, p) # endif//GLM_SWIZZLE }; + +# if GLM_COMPILER & GLM_COMPILER_CLANG +# pragma clang diagnostic pop +# endif +# if GLM_COMPILER & GLM_COMPILER_GCC +# pragma GCC diagnostic pop +# endif # else union { T x, r, s; }; union { T y, g, t; }; union { T z, b, p; }; -# ifdef GLM_SWIZZLE +# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED GLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, P, tvec3, tvec2, tvec3, tvec4) # endif//GLM_SWIZZLE # endif//GLM_LANG @@ -103,7 +91,7 @@ namespace glm // -- Explicit basic constructors -- GLM_FUNC_DECL GLM_CONSTEXPR_CTOR explicit tvec3(ctor); - GLM_FUNC_DECL GLM_CONSTEXPR_GCC explicit tvec3(T scalar); + GLM_FUNC_DECL GLM_CONSTEXPR explicit tvec3(T scalar); GLM_FUNC_DECL GLM_CONSTEXPR tvec3(T a, T b, T c); // -- Conversion scalar constructors -- @@ -137,26 +125,25 @@ namespace glm GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tvec3(tvec3<U, Q> const & v); // -- Swizzle constructors -- - -# if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +# if GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED) template <int E0, int E1, int E2> - GLM_FUNC_DECL tvec3(detail::_swizzle<3, T, P, tvec3<T, P>, E0, E1, E2, -1> const & that) + GLM_FUNC_DECL tvec3(detail::_swizzle<3, T, P, glm::tvec3, E0, E1, E2, -1> const & that) { *this = that(); } template <int E0, int E1> - GLM_FUNC_DECL tvec3(detail::_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, T const & scalar) + GLM_FUNC_DECL tvec3(detail::_swizzle<2, T, P, glm::tvec2, E0, E1, -1, -2> const & v, T const & scalar) { *this = tvec3<T, P>(v(), scalar); } template <int E0, int E1> - GLM_FUNC_DECL tvec3(T const & scalar, detail::_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v) + GLM_FUNC_DECL tvec3(T const & scalar, detail::_swizzle<2, T, P, glm::tvec2, E0, E1, -1, -2> const & v) { *this = tvec3<T, P>(scalar, v()); } -# endif// GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +# endif// GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED) // -- Unary arithmetic operators -- diff --git a/3rdparty/glm/glm/detail/type_vec3.inl b/3rdparty/glm/glm/detail/type_vec3.inl index 574e56069f5..cc0424fb03a 100644 --- a/3rdparty/glm/glm/detail/type_vec3.inl +++ b/3rdparty/glm/glm/detail/type_vec3.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_tvec3.inl -/// @date 2008-08-22 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { @@ -89,7 +60,7 @@ namespace glm {} template <typename T, precision P> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_GCC tvec3<T, P>::tvec3(T scalar) + GLM_FUNC_QUALIFIER GLM_CONSTEXPR tvec3<T, P>::tvec3(T scalar) : x(scalar), y(scalar), z(scalar) {} diff --git a/3rdparty/glm/glm/detail/type_vec4.hpp b/3rdparty/glm/glm/detail/type_vec4.hpp index d54c45c4792..4cd69dcd00a 100644 --- a/3rdparty/glm/glm/detail/type_vec4.hpp +++ b/3rdparty/glm/glm/detail/type_vec4.hpp @@ -1,41 +1,11 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_vec4.hpp -/// @date 2008-08-22 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once -#include "setup.hpp" #include "type_vec.hpp" -#ifdef GLM_SWIZZLE -# if GLM_HAS_ANONYMOUS_UNION +#if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED +# if GLM_HAS_UNRESTRICTED_UNIONS # include "_swizzle.hpp" # else # include "_swizzle_func.hpp" @@ -43,60 +13,9 @@ #endif //GLM_SWIZZLE #include <cstddef> -namespace glm{ -namespace detail +namespace glm { template <typename T, precision P = defaultp> - struct simd_data - { - typedef T type[4]; - }; - -# if (GLM_ARCH & GLM_ARCH_SSE2) - template <> - struct simd_data<float, simd> - { - typedef __m128 type; - }; - - template <> - struct simd_data<int, simd> - { - typedef __m128i type; - }; - - template <> - struct simd_data<unsigned int, simd> - { - typedef __m128i type; - }; -# endif - -# if (GLM_ARCH & GLM_ARCH_AVX) - template <> - struct simd_data<double, simd> - { - typedef __m256d type; - }; -# endif - -# if (GLM_ARCH & GLM_ARCH_AVX2) - template <> - struct simd_data<int64, simd> - { - typedef __m256i type; - }; - - template <> - struct simd_data<uint64, simd> - { - typedef __m256i type; - }; -# endif - -}//namespace detail - - template <typename T, precision P = defaultp> struct tvec4 { // -- Implementation detail -- @@ -107,37 +26,54 @@ namespace detail // -- Data -- -# if GLM_HAS_UNRESTRICTED_UNIONS +# if GLM_HAS_ALIGNED_TYPE +# if GLM_COMPILER & GLM_COMPILER_GCC +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wpedantic" +# endif +# if GLM_COMPILER & GLM_COMPILER_CLANG +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wgnu-anonymous-struct" +# pragma clang diagnostic ignored "-Wnested-anon-types" +# endif + union { struct { T x, y, z, w;}; struct { T r, g, b, a; }; struct { T s, t, p, q; }; - typename detail::simd_data<T, P>::type data; - -# ifdef GLM_SWIZZLE - _GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, x, y, z, w) - _GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, r, g, b, a) - _GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, s, t, p, q) - _GLM_SWIZZLE4_3_MEMBERS(T, P, tvec3, x, y, z, w) - _GLM_SWIZZLE4_3_MEMBERS(T, P, tvec3, r, g, b, a) - _GLM_SWIZZLE4_3_MEMBERS(T, P, tvec3, s, t, p, q) - _GLM_SWIZZLE4_4_MEMBERS(T, P, tvec4, x, y, z, w) - _GLM_SWIZZLE4_4_MEMBERS(T, P, tvec4, r, g, b, a) - _GLM_SWIZZLE4_4_MEMBERS(T, P, tvec4, s, t, p, q) + typename detail::storage<T, sizeof(T) * 4, detail::is_aligned<P>::value>::type data; + +# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED + _GLM_SWIZZLE4_2_MEMBERS(T, P, glm::tvec2, x, y, z, w) + _GLM_SWIZZLE4_2_MEMBERS(T, P, glm::tvec2, r, g, b, a) + _GLM_SWIZZLE4_2_MEMBERS(T, P, glm::tvec2, s, t, p, q) + _GLM_SWIZZLE4_3_MEMBERS(T, P, glm::tvec3, x, y, z, w) + _GLM_SWIZZLE4_3_MEMBERS(T, P, glm::tvec3, r, g, b, a) + _GLM_SWIZZLE4_3_MEMBERS(T, P, glm::tvec3, s, t, p, q) + _GLM_SWIZZLE4_4_MEMBERS(T, P, glm::tvec4, x, y, z, w) + _GLM_SWIZZLE4_4_MEMBERS(T, P, glm::tvec4, r, g, b, a) + _GLM_SWIZZLE4_4_MEMBERS(T, P, glm::tvec4, s, t, p, q) # endif//GLM_SWIZZLE }; + +# if GLM_COMPILER & GLM_COMPILER_CLANG +# pragma clang diagnostic pop +# endif +# if GLM_COMPILER & GLM_COMPILER_GCC +# pragma GCC diagnostic pop +# endif # else union { T x, r, s; }; union { T y, g, t; }; union { T z, b, p; }; union { T w, a, q; }; -# ifdef GLM_SWIZZLE +# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED GLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, P, tvec4, tvec2, tvec3, tvec4) # endif//GLM_SWIZZLE -# endif//GLM_LANG +# endif // -- Component accesses -- @@ -210,50 +146,49 @@ namespace detail GLM_FUNC_DECL GLM_CONSTEXPR GLM_EXPLICIT tvec4(tvec4<U, Q> const& v); // -- Swizzle constructors -- - -# if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +# if GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED) template <int E0, int E1, int E2, int E3> - GLM_FUNC_DECL tvec4(detail::_swizzle<4, T, P, tvec4<T, P>, E0, E1, E2, E3> const & that) + GLM_FUNC_DECL tvec4(detail::_swizzle<4, T, P, glm::tvec4, E0, E1, E2, E3> const & that) { *this = that(); } template <int E0, int E1, int F0, int F1> - GLM_FUNC_DECL tvec4(detail::_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, detail::_swizzle<2, T, P, tvec2<T, P>, F0, F1, -1, -2> const & u) + GLM_FUNC_DECL tvec4(detail::_swizzle<2, T, P, glm::tvec2, E0, E1, -1, -2> const & v, detail::_swizzle<2, T, P, glm::tvec2, F0, F1, -1, -2> const & u) { *this = tvec4<T, P>(v(), u()); } template <int E0, int E1> - GLM_FUNC_DECL tvec4(T const & x, T const & y, detail::_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v) + GLM_FUNC_DECL tvec4(T const & x, T const & y, detail::_swizzle<2, T, P, glm::tvec2, E0, E1, -1, -2> const & v) { *this = tvec4<T, P>(x, y, v()); } template <int E0, int E1> - GLM_FUNC_DECL tvec4(T const & x, detail::_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, T const & w) + GLM_FUNC_DECL tvec4(T const & x, detail::_swizzle<2, T, P, glm::tvec2, E0, E1, -1, -2> const & v, T const & w) { *this = tvec4<T, P>(x, v(), w); } template <int E0, int E1> - GLM_FUNC_DECL tvec4(detail::_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, T const & z, T const & w) + GLM_FUNC_DECL tvec4(detail::_swizzle<2, T, P, glm::tvec2, E0, E1, -1, -2> const & v, T const & z, T const & w) { *this = tvec4<T, P>(v(), z, w); } template <int E0, int E1, int E2> - GLM_FUNC_DECL tvec4(detail::_swizzle<3, T, P, tvec3<T, P>, E0, E1, E2, -1> const & v, T const & w) + GLM_FUNC_DECL tvec4(detail::_swizzle<3, T, P, glm::tvec3, E0, E1, E2, -1> const & v, T const & w) { *this = tvec4<T, P>(v(), w); } template <int E0, int E1, int E2> - GLM_FUNC_DECL tvec4(T const & x, detail::_swizzle<3, T, P, tvec3<T, P>, E0, E1, E2, -1> const & v) + GLM_FUNC_DECL tvec4(T const & x, detail::_swizzle<3, T, P, glm::tvec3, E0, E1, E2, -1> const & v) { *this = tvec4<T, P>(x, v()); } -# endif// GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +# endif// GLM_HAS_UNRESTRICTED_UNIONS && (GLM_SWIZZLE == GLM_SWIZZLE_ENABLED) // -- Unary arithmetic operators -- diff --git a/3rdparty/glm/glm/detail/type_vec4.inl b/3rdparty/glm/glm/detail/type_vec4.inl index 20f2b43cfb2..d891e0387fd 100644 --- a/3rdparty/glm/glm/detail/type_vec4.inl +++ b/3rdparty/glm/glm/detail/type_vec4.inl @@ -1,37 +1,157 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/detail/type_tvec4.inl -/// @date 2008-08-23 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// -namespace glm +namespace glm{ +namespace detail { + template <typename T> + struct is_int + { + enum test {value = 0}; + }; + + template <> + struct is_int<uint32> + { + enum test {value = ~0}; + }; + + template <> + struct is_int<int32> + { + enum test {value = ~0}; + }; + + template <> + struct is_int<uint64> + { + enum test {value = ~0}; + }; + + template <> + struct is_int<int64> + { + enum test {value = ~0}; + }; + + template <typename T, precision P, bool Aligned> + struct compute_vec4_add + { + static tvec4<T, P> call(tvec4<T, P> const & a, tvec4<T, P> const & b) + { + return tvec4<T, P>(a.x + b.x, a.y + b.y, a.z + b.z, a.w + b.w); + } + }; + + template <typename T, precision P, bool Aligned> + struct compute_vec4_sub + { + static tvec4<T, P> call(tvec4<T, P> const & a, tvec4<T, P> const & b) + { + return tvec4<T, P>(a.x - b.x, a.y - b.y, a.z - b.z, a.w - b.w); + } + }; + + template <typename T, precision P, bool Aligned> + struct compute_vec4_mul + { + static tvec4<T, P> call(tvec4<T, P> const & a, tvec4<T, P> const & b) + { + return tvec4<T, P>(a.x * b.x, a.y * b.y, a.z * b.z, a.w * b.w); + } + }; + + template <typename T, precision P, bool Aligned> + struct compute_vec4_div + { + static tvec4<T, P> call(tvec4<T, P> const & a, tvec4<T, P> const & b) + { + return tvec4<T, P>(a.x / b.x, a.y / b.y, a.z / b.z, a.w / b.w); + } + }; + + template <typename T, precision P, bool Aligned> + struct compute_vec4_mod + { + static tvec4<T, P> call(tvec4<T, P> const & a, tvec4<T, P> const & b) + { + return tvec4<T, P>(a.x % b.x, a.y % b.y, a.z % b.z, a.w % b.w); + } + }; + + template <typename T, precision P, int IsInt, std::size_t Size, bool Aligned> + struct compute_vec4_and + { + static tvec4<T, P> call(tvec4<T, P> const & a, tvec4<T, P> const & b) + { + return tvec4<T, P>(a.x & b.x, a.y & b.y, a.z & b.z, a.w & b.w); + } + }; + + template <typename T, precision P, int IsInt, std::size_t Size, bool Aligned> + struct compute_vec4_or + { + static tvec4<T, P> call(tvec4<T, P> const & a, tvec4<T, P> const & b) + { + return tvec4<T, P>(a.x | b.x, a.y | b.y, a.z | b.z, a.w | b.w); + } + }; + + template <typename T, precision P, int IsInt, std::size_t Size, bool Aligned> + struct compute_vec4_xor + { + static tvec4<T, P> call(tvec4<T, P> const & a, tvec4<T, P> const & b) + { + return tvec4<T, P>(a.x ^ b.x, a.y ^ b.y, a.z ^ b.z, a.w ^ b.w); + } + }; + + template <typename T, precision P, int IsInt, std::size_t Size, bool Aligned> + struct compute_vec4_shift_left + { + static tvec4<T, P> call(tvec4<T, P> const & a, tvec4<T, P> const & b) + { + return tvec4<T, P>(a.x << b.x, a.y << b.y, a.z << b.z, a.w << b.w); + } + }; + + template <typename T, precision P, int IsInt, std::size_t Size, bool Aligned> + struct compute_vec4_shift_right + { + static tvec4<T, P> call(tvec4<T, P> const & a, tvec4<T, P> const & b) + { + return tvec4<T, P>(a.x >> b.x, a.y >> b.y, a.z >> b.z, a.w >> b.w); + } + }; + + template <typename T, precision P, int IsInt, std::size_t Size, bool Aligned> + struct compute_vec4_equal + { + static bool call(tvec4<T, P> const & v1, tvec4<T, P> const & v2) + { + return (v1.x == v2.x) && (v1.y == v2.y) && (v1.z == v2.z) && (v1.w == v2.w); + } + }; + + template <typename T, precision P, int IsInt, std::size_t Size, bool Aligned> + struct compute_vec4_nequal + { + static bool call(tvec4<T, P> const & v1, tvec4<T, P> const & v2) + { + return (v1.x != v2.x) || (v1.y != v2.y) || (v1.z != v2.z) || (v1.w != v2.w); + } + }; + + template <typename T, precision P, int IsInt, std::size_t Size, bool Aligned> + struct compute_vec4_bitwise_not + { + static tvec4<T, P> call(tvec4<T, P> const & v) + { + return tvec4<T, P>(~v.x, ~v.y, ~v.z, ~v.w); + } + }; +}//namespace detail + // -- Implicit basic constructors -- # if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) @@ -253,134 +373,84 @@ namespace glm template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator+=(U scalar) { - this->x += static_cast<T>(scalar); - this->y += static_cast<T>(scalar); - this->z += static_cast<T>(scalar); - this->w += static_cast<T>(scalar); - return *this; + return (*this = detail::compute_vec4_add<T, P, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(scalar))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator+=(tvec1<U, P> const & v) { - T const scalar = static_cast<T>(v.x); - this->x += scalar; - this->y += scalar; - this->z += scalar; - this->w += scalar; - return *this; + return (*this = detail::compute_vec4_add<T, P, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(v.x))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator+=(tvec4<U, P> const & v) { - this->x += static_cast<T>(v.x); - this->y += static_cast<T>(v.y); - this->z += static_cast<T>(v.z); - this->w += static_cast<T>(v.w); - return *this; + return (*this = detail::compute_vec4_add<T, P, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(v))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator-=(U scalar) { - this->x -= static_cast<T>(scalar); - this->y -= static_cast<T>(scalar); - this->z -= static_cast<T>(scalar); - this->w -= static_cast<T>(scalar); - return *this; + return (*this = detail::compute_vec4_sub<T, P, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(scalar))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator-=(tvec1<U, P> const & v) { - T const scalar = static_cast<T>(v.x); - this->x -= scalar; - this->y -= scalar; - this->z -= scalar; - this->w -= scalar; - return *this; + return (*this = detail::compute_vec4_sub<T, P, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(v.x))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator-=(tvec4<U, P> const & v) { - this->x -= static_cast<T>(v.x); - this->y -= static_cast<T>(v.y); - this->z -= static_cast<T>(v.z); - this->w -= static_cast<T>(v.w); - return *this; + return (*this = detail::compute_vec4_sub<T, P, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(v))); } template <typename T, precision P> template <typename U> - GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator*=(U v) + GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator*=(U scalar) { - this->x *= static_cast<T>(v); - this->y *= static_cast<T>(v); - this->z *= static_cast<T>(v); - this->w *= static_cast<T>(v); - return *this; + return (*this = detail::compute_vec4_mul<T, P, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(scalar))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator*=(tvec1<U, P> const & v) { - this->x *= static_cast<T>(v.x); - this->y *= static_cast<T>(v.x); - this->z *= static_cast<T>(v.x); - this->w *= static_cast<T>(v.x); - return *this; + return (*this = detail::compute_vec4_mul<T, P, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(v.x))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator*=(tvec4<U, P> const & v) { - this->x *= static_cast<T>(v.x); - this->y *= static_cast<T>(v.y); - this->z *= static_cast<T>(v.z); - this->w *= static_cast<T>(v.w); - return *this; + return (*this = detail::compute_vec4_mul<T, P, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(v))); } template <typename T, precision P> template <typename U> - GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator/=(U v) + GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator/=(U scalar) { - this->x /= static_cast<T>(v); - this->y /= static_cast<T>(v); - this->z /= static_cast<T>(v); - this->w /= static_cast<T>(v); - return *this; + return (*this = detail::compute_vec4_div<T, P, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(scalar))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator/=(tvec1<U, P> const & v) { - this->x /= static_cast<T>(v.x); - this->y /= static_cast<T>(v.x); - this->z /= static_cast<T>(v.x); - this->w /= static_cast<T>(v.x); - return *this; + return (*this = detail::compute_vec4_div<T, P, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(v.x))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator/=(tvec4<U, P> const & v) { - this->x /= static_cast<T>(v.x); - this->y /= static_cast<T>(v.y); - this->z /= static_cast<T>(v.z); - this->w /= static_cast<T>(v.w); - return *this; + return (*this = detail::compute_vec4_div<T, P, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(v))); } // -- Increment and decrement operators -- @@ -427,198 +497,126 @@ namespace glm template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator%=(U scalar) { - this->x %= static_cast<T>(scalar); - this->y %= static_cast<T>(scalar); - this->z %= static_cast<T>(scalar); - this->w %= static_cast<T>(scalar); - return *this; + return (*this = detail::compute_vec4_mod<T, P, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(scalar))); } template <typename T, precision P> template <typename U> - GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator%=(tvec1<U, P> const & v) + GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator%=(tvec1<U, P> const& v) { - this->x %= static_cast<T>(v.x); - this->y %= static_cast<T>(v.x); - this->z %= static_cast<T>(v.x); - this->w %= static_cast<T>(v.x); - return *this; + return (*this = detail::compute_vec4_mod<T, P, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(v))); } template <typename T, precision P> template <typename U> - GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator%=(tvec4<U, P> const & v) + GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator%=(tvec4<U, P> const& v) { - this->x %= static_cast<T>(v.x); - this->y %= static_cast<T>(v.y); - this->z %= static_cast<T>(v.z); - this->w %= static_cast<T>(v.w); - return *this; + return (*this = detail::compute_vec4_mod<T, P, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(v))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator&=(U scalar) { - this->x &= static_cast<T>(scalar); - this->y &= static_cast<T>(scalar); - this->z &= static_cast<T>(scalar); - this->w &= static_cast<T>(scalar); - return *this; + return (*this = detail::compute_vec4_and<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(scalar))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator&=(tvec1<U, P> const & v) { - this->x &= static_cast<T>(v.x); - this->y &= static_cast<T>(v.x); - this->z &= static_cast<T>(v.x); - this->w &= static_cast<T>(v.x); - return *this; + return (*this = detail::compute_vec4_and<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(v))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator&=(tvec4<U, P> const & v) { - this->x &= static_cast<T>(v.x); - this->y &= static_cast<T>(v.y); - this->z &= static_cast<T>(v.z); - this->w &= static_cast<T>(v.w); - return *this; + return (*this = detail::compute_vec4_and<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(v))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator|=(U scalar) { - this->x |= static_cast<T>(scalar); - this->y |= static_cast<T>(scalar); - this->z |= static_cast<T>(scalar); - this->w |= static_cast<T>(scalar); - return *this; + return (*this = detail::compute_vec4_or<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(scalar))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator|=(tvec1<U, P> const & v) { - this->x |= static_cast<T>(v.x); - this->y |= static_cast<T>(v.x); - this->z |= static_cast<T>(v.x); - this->w |= static_cast<T>(v.x); - return *this; + return (*this = detail::compute_vec4_or<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(v))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator|=(tvec4<U, P> const & v) { - this->x |= static_cast<T>(v.x); - this->y |= static_cast<T>(v.y); - this->z |= static_cast<T>(v.z); - this->w |= static_cast<T>(v.w); - return *this; + return (*this = detail::compute_vec4_or<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(v))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator^=(U scalar) { - this->x ^= static_cast<T>(scalar); - this->y ^= static_cast<T>(scalar); - this->z ^= static_cast<T>(scalar); - this->w ^= static_cast<T>(scalar); - return *this; + return (*this = detail::compute_vec4_xor<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(scalar))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator^=(tvec1<U, P> const & v) { - this->x ^= static_cast<T>(v.x); - this->y ^= static_cast<T>(v.x); - this->z ^= static_cast<T>(v.x); - this->w ^= static_cast<T>(v.x); - return *this; + return (*this = detail::compute_vec4_xor<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(v))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator^=(tvec4<U, P> const & v) { - this->x ^= static_cast<T>(v.x); - this->y ^= static_cast<T>(v.y); - this->z ^= static_cast<T>(v.z); - this->w ^= static_cast<T>(v.w); - return *this; + return (*this = detail::compute_vec4_xor<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(v))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator<<=(U scalar) { - this->x <<= static_cast<T>(scalar); - this->y <<= static_cast<T>(scalar); - this->z <<= static_cast<T>(scalar); - this->w <<= static_cast<T>(scalar); - return *this; + return (*this = detail::compute_vec4_shift_left<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(scalar))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator<<=(tvec1<U, P> const & v) { - this->x <<= static_cast<T>(v.x); - this->y <<= static_cast<T>(v.x); - this->z <<= static_cast<T>(v.x); - this->w <<= static_cast<T>(v.x); - return *this; + return (*this = detail::compute_vec4_shift_left<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(v))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator<<=(tvec4<U, P> const & v) { - this->x <<= static_cast<T>(v.x); - this->y <<= static_cast<T>(v.y); - this->z <<= static_cast<T>(v.z); - this->w <<= static_cast<T>(v.w); - return *this; + return (*this = detail::compute_vec4_shift_left<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(v))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator>>=(U scalar) { - this->x >>= static_cast<T>(scalar); - this->y >>= static_cast<T>(scalar); - this->z >>= static_cast<T>(scalar); - this->w >>= static_cast<T>(scalar); - return *this; + return (*this = detail::compute_vec4_shift_right<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(scalar))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator>>=(tvec1<U, P> const & v) { - this->x >>= static_cast<T>(v.x); - this->y >>= static_cast<T>(v.y); - this->z >>= static_cast<T>(v.z); - this->w >>= static_cast<T>(v.w); - return *this; + return (*this = detail::compute_vec4_shift_right<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(v))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator>>=(tvec4<U, P> const & v) { - this->x >>= static_cast<T>(v.x); - this->y >>= static_cast<T>(v.y); - this->z >>= static_cast<T>(v.z); - this->w >>= static_cast<T>(v.w); - return *this; + return (*this = detail::compute_vec4_shift_right<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(*this, tvec4<T, P>(v))); } // -- Unary constant operators -- @@ -632,11 +630,7 @@ namespace glm template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator-(tvec4<T, P> const & v) { - return tvec4<T, P>( - -v.x, - -v.y, - -v.z, - -v.w); + return tvec4<T, P>(0) -= v; } // -- Binary arithmetic operators -- @@ -644,201 +638,121 @@ namespace glm template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator+(tvec4<T, P> const & v, T scalar) { - return tvec4<T, P>( - v.x + scalar, - v.y + scalar, - v.z + scalar, - v.w + scalar); + return tvec4<T, P>(v) += scalar; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator+(tvec4<T, P> const & v1, tvec1<T, P> const & v2) { - return tvec4<T, P>( - v1.x + v2.x, - v1.y + v2.x, - v1.z + v2.x, - v1.w + v2.x); + return tvec4<T, P>(v1) += v2; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator+(T scalar, tvec4<T, P> const & v) { - return tvec4<T, P>( - scalar + v.x, - scalar + v.y, - scalar + v.z, - scalar + v.w); + return tvec4<T, P>(v) += scalar; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator+(tvec1<T, P> const & v1, tvec4<T, P> const & v2) { - return tvec4<T, P>( - v1.x + v2.x, - v1.x + v2.y, - v1.x + v2.z, - v1.x + v2.w); + return tvec4<T, P>(v2) += v1; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator+(tvec4<T, P> const & v1, tvec4<T, P> const & v2) { - return tvec4<T, P>( - v1.x + v2.x, - v1.y + v2.y, - v1.z + v2.z, - v1.w + v2.w); + return tvec4<T, P>(v1) += v2; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator-(tvec4<T, P> const & v, T scalar) { - return tvec4<T, P>( - v.x - scalar, - v.y - scalar, - v.z - scalar, - v.w - scalar); + return tvec4<T, P>(v) -= scalar; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator-(tvec4<T, P> const & v1, tvec1<T, P> const & v2) { - return tvec4<T, P>( - v1.x - v2.x, - v1.y - v2.x, - v1.z - v2.x, - v1.w - v2.x); + return tvec4<T, P>(v1) -= v2; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator-(T scalar, tvec4<T, P> const & v) { - return tvec4<T, P>( - scalar - v.x, - scalar - v.y, - scalar - v.z, - scalar - v.w); + return tvec4<T, P>(scalar) -= v; } template <typename T, precision P> - GLM_FUNC_DECL tvec4<T, P> operator-(tvec1<T, P> const & v1, tvec4<T, P> const & v2) + GLM_FUNC_QUALIFIER tvec4<T, P> operator-(tvec1<T, P> const & v1, tvec4<T, P> const & v2) { - return tvec4<T, P>( - v1.x - v2.x, - v1.x - v2.y, - v1.x - v2.z, - v1.x - v2.w); + return tvec4<T, P>(v1.x) -= v2; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator-(tvec4<T, P> const & v1, tvec4<T, P> const & v2) { - return tvec4<T, P>( - v1.x - v2.x, - v1.y - v2.y, - v1.z - v2.z, - v1.w - v2.w); + return tvec4<T, P>(v1) -= v2; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tvec4<T, P> const & v, T scalar) { - return tvec4<T, P>( - v.x * scalar, - v.y * scalar, - v.z * scalar, - v.w * scalar); + return tvec4<T, P>(v) *= scalar; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tvec4<T, P> const & v1, tvec1<T, P> const & v2) { - return tvec4<T, P>( - v1.x * v2.x, - v1.y * v2.x, - v1.z * v2.x, - v1.w * v2.x); + return tvec4<T, P>(v1) *= v2; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator*(T scalar, tvec4<T, P> const & v) { - return tvec4<T, P>( - scalar * v.x, - scalar * v.y, - scalar * v.z, - scalar * v.w); + return tvec4<T, P>(v) *= scalar; } template <typename T, precision P> - GLM_FUNC_DECL tvec4<T, P> operator*(tvec1<T, P> const & v1, tvec4<T, P> const & v2) + GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tvec1<T, P> const & v1, tvec4<T, P> const & v2) { - return tvec4<T, P>( - v1.x * v2.x, - v1.x * v2.y, - v1.x * v2.z, - v1.x * v2.w); + return tvec4<T, P>(v2) *= v1; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tvec4<T, P> const & v1, tvec4<T, P> const & v2) { - return tvec4<T, P>( - v1.x * v2.x, - v1.y * v2.y, - v1.z * v2.z, - v1.w * v2.w); + return tvec4<T, P>(v1) *= v2; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator/(tvec4<T, P> const & v, T scalar) { - return tvec4<T, P>( - v.x / scalar, - v.y / scalar, - v.z / scalar, - v.w / scalar); + return tvec4<T, P>(v) /= scalar; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator/(tvec4<T, P> const & v1, tvec1<T, P> const & v2) { - return tvec4<T, P>( - v1.x / v2.x, - v1.y / v2.x, - v1.z / v2.x, - v1.w / v2.x); + return tvec4<T, P>(v1) /= v2; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator/(T scalar, tvec4<T, P> const & v) { - return tvec4<T, P>( - scalar / v.x, - scalar / v.y, - scalar / v.z, - scalar / v.w); + return tvec4<T, P>(scalar) /= v; } template <typename T, precision P> - GLM_FUNC_DECL tvec4<T, P> operator/(tvec1<T, P> const & v1, tvec4<T, P> const & v2) + GLM_FUNC_QUALIFIER tvec4<T, P> operator/(tvec1<T, P> const & v1, tvec4<T, P> const & v2) { - return tvec4<T, P>( - v1.x / v2.x, - v1.x / v2.y, - v1.x / v2.z, - v1.x / v2.w); + return tvec4<T, P>(v1.x) /= v2; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator/(tvec4<T, P> const & v1, tvec4<T, P> const & v2) { - return tvec4<T, P>( - v1.x / v2.x, - v1.y / v2.y, - v1.z / v2.z, - v1.w / v2.w); + return tvec4<T, P>(v1) /= v2; } // -- Binary bit operators -- @@ -846,311 +760,187 @@ namespace glm template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator%(tvec4<T, P> const & v, T scalar) { - return tvec4<T, P>( - v.x % scalar, - v.y % scalar, - v.z % scalar, - v.w % scalar); + return tvec4<T, P>(v) %= scalar; } template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec4<T, P> operator%(tvec4<T, P> const & v, tvec1<T, P> const & scalar) + GLM_FUNC_QUALIFIER tvec4<T, P> operator%(tvec4<T, P> const & v1, tvec1<T, P> const & v2) { - return tvec4<T, P>( - v.x % scalar.x, - v.y % scalar.x, - v.z % scalar.x, - v.w % scalar.x); + return tvec4<T, P>(v1) %= v2.x; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator%(T scalar, tvec4<T, P> const & v) { - return tvec4<T, P>( - scalar % v.x, - scalar % v.y, - scalar % v.z, - scalar % v.w); + return tvec4<T, P>(scalar) %= v; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator%(tvec1<T, P> const & scalar, tvec4<T, P> const & v) { - return tvec4<T, P>( - scalar.x % v.x, - scalar.x % v.y, - scalar.x % v.z, - scalar.x % v.w); + return tvec4<T, P>(scalar.x) %= v; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator%(tvec4<T, P> const & v1, tvec4<T, P> const & v2) { - return tvec4<T, P>( - v1.x % v2.x, - v1.y % v2.y, - v1.z % v2.z, - v1.w % v2.w); + return tvec4<T, P>(v1) %= v2; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator&(tvec4<T, P> const & v, T scalar) { - return tvec4<T, P>( - v.x & scalar, - v.y & scalar, - v.z & scalar, - v.w & scalar); + return tvec4<T, P>(v) &= scalar; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator&(tvec4<T, P> const & v, tvec1<T, P> const & scalar) { - return tvec4<T, P>( - v.x & scalar.x, - v.y & scalar.x, - v.z & scalar.x, - v.w & scalar.x); + return tvec4<T, P>(v) &= scalar; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator&(T scalar, tvec4<T, P> const & v) { - return tvec4<T, P>( - scalar & v.x, - scalar & v.y, - scalar & v.z, - scalar & v.w); + return tvec4<T, P>(scalar) &= v; } template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec4<T, P> operator&(tvec1<T, P> const & scalar, tvec4<T, P> const & v) + GLM_FUNC_QUALIFIER tvec4<T, P> operator&(tvec1<T, P> const & v1, tvec4<T, P> const & v2) { - return tvec4<T, P>( - scalar.x & v.x, - scalar.x & v.y, - scalar.x & v.z, - scalar.x & v.w); + return tvec4<T, P>(v1.x) &= v2; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator&(tvec4<T, P> const & v1, tvec4<T, P> const & v2) { - return tvec4<T, P>( - v1.x & v2.x, - v1.y & v2.y, - v1.z & v2.z, - v1.w & v2.w); + return tvec4<T, P>(v1) &= v2; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator|(tvec4<T, P> const & v, T scalar) { - return tvec4<T, P>( - v.x | scalar, - v.y | scalar, - v.z | scalar, - v.w | scalar); + return tvec4<T, P>(v) |= scalar; } template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec4<T, P> operator|(tvec4<T, P> const & v, tvec1<T, P> const & scalar) + GLM_FUNC_QUALIFIER tvec4<T, P> operator|(tvec4<T, P> const & v1, tvec1<T, P> const & v2) { - return tvec4<T, P>( - v.x | scalar.x, - v.y | scalar.x, - v.z | scalar.x, - v.w | scalar.x); + return tvec4<T, P>(v1) |= v2.x; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator|(T scalar, tvec4<T, P> const & v) { - return tvec4<T, P>( - scalar | v.x, - scalar | v.y, - scalar | v.z, - scalar | v.w); + return tvec4<T, P>(scalar) |= v; } template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec4<T, P> operator|(tvec1<T, P> const & scalar, tvec4<T, P> const & v) + GLM_FUNC_QUALIFIER tvec4<T, P> operator|(tvec1<T, P> const & v1, tvec4<T, P> const & v2) { - return tvec4<T, P>( - scalar.x | v.x, - scalar.x | v.y, - scalar.x | v.z, - scalar.x | v.w); + return tvec4<T, P>(v1.x) |= v2; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator|(tvec4<T, P> const & v1, tvec4<T, P> const & v2) { - return tvec4<T, P>( - v1.x | v2.x, - v1.y | v2.y, - v1.z | v2.z, - v1.w | v2.w); + return tvec4<T, P>(v1) |= v2; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator^(tvec4<T, P> const & v, T scalar) { - return tvec4<T, P>( - v.x ^ scalar, - v.y ^ scalar, - v.z ^ scalar, - v.w ^ scalar); + return tvec4<T, P>(v) ^= scalar; } template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec4<T, P> operator^(tvec4<T, P> const & v, tvec1<T, P> const & scalar) + GLM_FUNC_QUALIFIER tvec4<T, P> operator^(tvec4<T, P> const & v1, tvec1<T, P> const & v2) { - return tvec4<T, P>( - v.x ^ scalar.x, - v.y ^ scalar.x, - v.z ^ scalar.x, - v.w ^ scalar.x); + return tvec4<T, P>(v1) ^= v2.x; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator^(T scalar, tvec4<T, P> const & v) { - return tvec4<T, P>( - scalar ^ v.x, - scalar ^ v.y, - scalar ^ v.z, - scalar ^ v.w); + return tvec4<T, P>(scalar) ^= v; } template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec4<T, P> operator^(tvec1<T, P> const & scalar, tvec4<T, P> const & v) + GLM_FUNC_QUALIFIER tvec4<T, P> operator^(tvec1<T, P> const & v1, tvec4<T, P> const & v2) { - return tvec4<T, P>( - scalar.x ^ v.x, - scalar.x ^ v.y, - scalar.x ^ v.z, - scalar.x ^ v.w); + return tvec4<T, P>(v1.x) ^= v2; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator^(tvec4<T, P> const & v1, tvec4<T, P> const & v2) { - return tvec4<T, P>( - v1.x ^ v2.x, - v1.y ^ v2.y, - v1.z ^ v2.z, - v1.w ^ v2.w); + return tvec4<T, P>(v1) ^= v2; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator<<(tvec4<T, P> const & v, T scalar) { - return tvec4<T, P>( - v.x << scalar, - v.y << scalar, - v.z << scalar, - v.w << scalar); + return tvec4<T, P>(v) <<= scalar; } template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec4<T, P> operator<<(tvec4<T, P> const & v, tvec1<T, P> const & scalar) + GLM_FUNC_QUALIFIER tvec4<T, P> operator<<(tvec4<T, P> const & v1, tvec1<T, P> const & v2) { - return tvec4<T, P>( - v.x << scalar.x, - v.y << scalar.x, - v.z << scalar.x, - v.w << scalar.x); + return tvec4<T, P>(v1) <<= v2.x; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator<<(T scalar, tvec4<T, P> const & v) { - return tvec4<T, P>( - scalar << v.x, - scalar << v.y, - scalar << v.z, - scalar << v.w); + return tvec4<T, P>(scalar) <<= v; } template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec4<T, P> operator<<(tvec1<T, P> const & scalar, tvec4<T, P> const & v) + GLM_FUNC_QUALIFIER tvec4<T, P> operator<<(tvec1<T, P> const & v1, tvec4<T, P> const & v2) { - return tvec4<T, P>( - scalar.x << v.x, - scalar.x << v.y, - scalar.x << v.z, - scalar.x << v.w); + return tvec4<T, P>(v1.x) <<= v2; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator<<(tvec4<T, P> const & v1, tvec4<T, P> const & v2) { - return tvec4<T, P>( - v1.x << v2.x, - v1.y << v2.y, - v1.z << v2.z, - v1.w << v2.w); + return tvec4<T, P>(v1) <<= v2; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator>>(tvec4<T, P> const & v, T scalar) { - return tvec4<T, P>( - v.x >> scalar, - v.y >> scalar, - v.z >> scalar, - v.w >> scalar); + return tvec4<T, P>(v) >>= scalar; } template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec4<T, P> operator>>(tvec4<T, P> const & v, tvec1<T, P> const & scalar) + GLM_FUNC_QUALIFIER tvec4<T, P> operator>>(tvec4<T, P> const & v1, tvec1<T, P> const & v2) { - return tvec4<T, P>( - v.x >> scalar.x, - v.y >> scalar.x, - v.z >> scalar.x, - v.w >> scalar.x); + return tvec4<T, P>(v1) >>= v2.x; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator>>(T scalar, tvec4<T, P> const & v) { - return tvec4<T, P>( - scalar >> v.x, - scalar >> v.y, - scalar >> v.z, - scalar >> v.w); + return tvec4<T, P>(scalar) >>= v; } template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec4<T, P> operator>>(tvec1<T, P> const & scalar, tvec4<T, P> const & v) + GLM_FUNC_QUALIFIER tvec4<T, P> operator>>(tvec1<T, P> const & v1, tvec4<T, P> const & v2) { - return tvec4<T, P>( - scalar.x >> v.x, - scalar.x >> v.y, - scalar.x >> v.z, - scalar.x >> v.w); + return tvec4<T, P>(v1.x) >>= v2; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator>>(tvec4<T, P> const & v1, tvec4<T, P> const & v2) { - return tvec4<T, P>( - v1.x >> v2.x, - v1.y >> v2.y, - v1.z >> v2.z, - v1.w >> v2.w); + return tvec4<T, P>(v1) >>= v2; } template <typename T, precision P> GLM_FUNC_QUALIFIER tvec4<T, P> operator~(tvec4<T, P> const & v) { - return tvec4<T, P>( - ~v.x, - ~v.y, - ~v.z, - ~v.w); + return detail::compute_vec4_bitwise_not<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(v); } // -- Boolean operators -- @@ -1158,13 +948,13 @@ namespace glm template <typename T, precision P> GLM_FUNC_QUALIFIER bool operator==(tvec4<T, P> const & v1, tvec4<T, P> const & v2) { - return (v1.x == v2.x) && (v1.y == v2.y) && (v1.z == v2.z) && (v1.w == v2.w); + return detail::compute_vec4_equal<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(v1, v2); } template <typename T, precision P> GLM_FUNC_QUALIFIER bool operator!=(tvec4<T, P> const & v1, tvec4<T, P> const & v2) { - return (v1.x != v2.x) || (v1.y != v2.y) || (v1.z != v2.z) || (v1.w != v2.w); + return detail::compute_vec4_nequal<T, P, detail::is_int<T>::value, sizeof(T) * 8, detail::is_aligned<P>::value>::call(v1, v2); } template <precision P> @@ -1180,6 +970,6 @@ namespace glm } }//namespace glm -#if GLM_ARCH != GLM_ARCH_PURE +#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_ALIGNED_TYPE # include "type_vec4_simd.inl" #endif diff --git a/3rdparty/glm/glm/detail/type_vec4_simd.inl b/3rdparty/glm/glm/detail/type_vec4_simd.inl index 099c35eab83..6ae818f5378 100644 --- a/3rdparty/glm/glm/detail/type_vec4_simd.inl +++ b/3rdparty/glm/glm/detail/type_vec4_simd.inl @@ -1,96 +1,482 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core -/// @file glm/detail/type_tvec4_sse2.inl -/// @date 2014-12-01 / 2014-12-01 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// +/// @file glm/detail/type_tvec4_simd.inl -namespace glm +#if GLM_ARCH & GLM_ARCH_SSE2_BIT + +namespace glm{ +namespace detail { -# if GLM_HAS_UNRESTRICTED_UNIONS +# if GLM_SWIZZLE == GLM_SWIZZLE_ENABLED + template <precision P, int E0, int E1, int E2, int E3> + struct _swizzle_base1<4, float, P, glm::tvec4, E0,E1,E2,E3, true> : public _swizzle_base0<float, 4> + { + GLM_FUNC_QUALIFIER tvec4<float, P> operator ()() const + { + __m128 data = *reinterpret_cast<__m128 const*>(&this->_buffer); + + tvec4<float, P> Result(uninitialize); +# if GLM_ARCH & GLM_ARCH_AVX_BIT + Result.data = _mm_permute_ps(data, _MM_SHUFFLE(E3, E2, E1, E0)); +# else + Result.data = _mm_shuffle_ps(data, data, _MM_SHUFFLE(E3, E2, E1, E0)); +# endif + return Result; + } + }; + + template <precision P, int E0, int E1, int E2, int E3> + struct _swizzle_base1<4, int32, P, glm::tvec4, E0,E1,E2,E3, true> : public _swizzle_base0<int32, 4> + { + GLM_FUNC_QUALIFIER tvec4<int32, P> operator ()() const + { + __m128i data = *reinterpret_cast<__m128i const*>(&this->_buffer); + + tvec4<int32, P> Result(uninitialize); + Result.data = _mm_shuffle_epi32(data, _MM_SHUFFLE(E3, E2, E1, E0)); + return Result; + } + }; + + template <precision P, int E0, int E1, int E2, int E3> + struct _swizzle_base1<4, uint32, P, glm::tvec4, E0,E1,E2,E3, true> : public _swizzle_base0<uint32, 4> + { + GLM_FUNC_QUALIFIER tvec4<uint32, P> operator ()() const + { + __m128i data = *reinterpret_cast<__m128i const*>(&this->_buffer); + + tvec4<uint32, P> Result(uninitialize); + Result.data = _mm_shuffle_epi32(data, _MM_SHUFFLE(E3, E2, E1, E0)); + return Result; + } + }; +# endif// GLM_SWIZZLE == GLM_SWIZZLE_ENABLED + + template <precision P> + struct compute_vec4_add<float, P, true> + { + static tvec4<float, P> call(tvec4<float, P> const & a, tvec4<float, P> const & b) + { + tvec4<float, P> Result(uninitialize); + Result.data = _mm_add_ps(a.data, b.data); + return Result; + } + }; + +# if GLM_ARCH & GLM_ARCH_AVX_BIT + template <precision P> + struct compute_vec4_add<double, P, true> + { + static tvec4<double, P> call(tvec4<double, P> const & a, tvec4<double, P> const & b) + { + tvec4<double, P> Result(uninitialize); + Result.data = _mm256_add_pd(a.data, b.data); + return Result; + } + }; +# endif + + template <precision P> + struct compute_vec4_sub<float, P, true> + { + static tvec4<float, P> call(tvec4<float, P> const & a, tvec4<float, P> const & b) + { + tvec4<float, P> Result(uninitialize); + Result.data = _mm_sub_ps(a.data, b.data); + return Result; + } + }; + +# if GLM_ARCH & GLM_ARCH_AVX_BIT + template <precision P> + struct compute_vec4_sub<double, P, true> + { + static tvec4<double, P> call(tvec4<double, P> const & a, tvec4<double, P> const & b) + { + tvec4<double, P> Result(uninitialize); + Result.data = _mm256_sub_pd(a.data, b.data); + return Result; + } + }; +# endif + + template <precision P> + struct compute_vec4_mul<float, P, true> + { + static tvec4<float, P> call(tvec4<float, P> const & a, tvec4<float, P> const & b) + { + tvec4<float, P> Result(uninitialize); + Result.data = _mm_mul_ps(a.data, b.data); + return Result; + } + }; + +# if GLM_ARCH & GLM_ARCH_AVX_BIT + template <precision P> + struct compute_vec4_mul<double, P, true> + { + static tvec4<double, P> call(tvec4<double, P> const & a, tvec4<double, P> const & b) + { + tvec4<double, P> Result(uninitialize); + Result.data = _mm256_mul_pd(a.data, b.data); + return Result; + } + }; +# endif + + template <precision P> + struct compute_vec4_div<float, P, true> + { + static tvec4<float, P> call(tvec4<float, P> const & a, tvec4<float, P> const & b) + { + tvec4<float, P> Result(uninitialize); + Result.data = _mm_div_ps(a.data, b.data); + return Result; + } + }; + + # if GLM_ARCH & GLM_ARCH_AVX_BIT + template <precision P> + struct compute_vec4_div<double, P, true> + { + static tvec4<double, P> call(tvec4<double, P> const & a, tvec4<double, P> const & b) + { + tvec4<double, P> Result(uninitialize); + Result.data = _mm256_div_pd(a.data, b.data); + return Result; + } + }; +# endif + + template <> + struct compute_vec4_div<float, aligned_lowp, true> + { + static tvec4<float, aligned_lowp> call(tvec4<float, aligned_lowp> const & a, tvec4<float, aligned_lowp> const & b) + { + tvec4<float, aligned_lowp> Result(uninitialize); + Result.data = _mm_mul_ps(a.data, _mm_rcp_ps(b.data)); + return Result; + } + }; + + template <typename T, precision P> + struct compute_vec4_and<T, P, true, 32, true> + { + static tvec4<T, P> call(tvec4<T, P> const& a, tvec4<T, P> const& b) + { + tvec4<T, P> Result(uninitialize); + Result.data = _mm_and_si128(a.data, b.data); + return Result; + } + }; + +# if GLM_ARCH & GLM_ARCH_AVX2_BIT + template <typename T, precision P> + struct compute_vec4_and<T, P, true, 64, true> + { + static tvec4<T, P> call(tvec4<T, P> const& a, tvec4<T, P> const& b) + { + tvec4<T, P> Result(uninitialize); + Result.data = _mm256_and_si256(a.data, b.data); + return Result; + } + }; +# endif + + template <typename T, precision P> + struct compute_vec4_or<T, P, true, 32, true> + { + static tvec4<T, P> call(tvec4<T, P> const& a, tvec4<T, P> const& b) + { + tvec4<T, P> Result(uninitialize); + Result.data = _mm_or_si128(a.data, b.data); + return Result; + } + }; + +# if GLM_ARCH & GLM_ARCH_AVX2_BIT + template <typename T, precision P> + struct compute_vec4_or<T, P, true, 64, true> + { + static tvec4<T, P> call(tvec4<T, P> const& a, tvec4<T, P> const& b) + { + tvec4<T, P> Result(uninitialize); + Result.data = _mm256_or_si256(a.data, b.data); + return Result; + } + }; +# endif + + template <typename T, precision P> + struct compute_vec4_xor<T, P, true, 32, true> + { + static tvec4<T, P> call(tvec4<T, P> const& a, tvec4<T, P> const& b) + { + tvec4<T, P> Result(uninitialize); + Result.data = _mm_xor_si128(a.data, b.data); + return Result; + } + }; + +# if GLM_ARCH & GLM_ARCH_AVX2_BIT + template <typename T, precision P> + struct compute_vec4_xor<T, P, true, 64, true> + { + static tvec4<T, P> call(tvec4<T, P> const& a, tvec4<T, P> const& b) + { + tvec4<T, P> Result(uninitialize); + Result.data = _mm256_xor_si256(a.data, b.data); + return Result; + } + }; +# endif + + template <typename T, precision P> + struct compute_vec4_shift_left<T, P, true, 32, true> + { + static tvec4<T, P> call(tvec4<T, P> const& a, tvec4<T, P> const& b) + { + tvec4<T, P> Result(uninitialize); + Result.data = _mm_sll_epi32(a.data, b.data); + return Result; + } + }; + +# if GLM_ARCH & GLM_ARCH_AVX2_BIT + template <typename T, precision P> + struct compute_vec4_shift_left<T, P, true, 64, true> + { + static tvec4<T, P> call(tvec4<T, P> const& a, tvec4<T, P> const& b) + { + tvec4<T, P> Result(uninitialize); + Result.data = _mm256_sll_epi64(a.data, b.data); + return Result; + } + }; +# endif + + template <typename T, precision P> + struct compute_vec4_shift_right<T, P, true, 32, true> + { + static tvec4<T, P> call(tvec4<T, P> const& a, tvec4<T, P> const& b) + { + tvec4<T, P> Result(uninitialize); + Result.data = _mm_srl_epi32(a.data, b.data); + return Result; + } + }; + +# if GLM_ARCH & GLM_ARCH_AVX2_BIT + template <typename T, precision P> + struct compute_vec4_shift_right<T, P, true, 64, true> + { + static tvec4<T, P> call(tvec4<T, P> const& a, tvec4<T, P> const& b) + { + tvec4<T, P> Result(uninitialize); + Result.data = _mm256_srl_epi64(a.data, b.data); + return Result; + } + }; +# endif + + template <typename T, precision P> + struct compute_vec4_bitwise_not<T, P, true, 32, true> + { + static tvec4<T, P> call(tvec4<T, P> const & v) + { + tvec4<T, P> Result(uninitialize); + Result.data = _mm_xor_si128(v.data, _mm_set1_epi32(-1)); + return Result; + } + }; + +# if GLM_ARCH & GLM_ARCH_AVX2_BIT + template <typename T, precision P> + struct compute_vec4_bitwise_not<T, P, true, 64, true> + { + static tvec4<T, P> call(tvec4<T, P> const & v) + { + tvec4<T, P> Result(uninitialize); + Result.data = _mm256_xor_si256(v.data, _mm_set1_epi32(-1)); + return Result; + } + }; +# endif + + template <precision P> + struct compute_vec4_equal<float, P, false, 32, true> + { + static bool call(tvec4<float, P> const & v1, tvec4<float, P> const & v2) + { + return _mm_movemask_ps(_mm_cmpeq_ps(v1.data, v2.data)) != 0; + } + }; + + template <precision P> + struct compute_vec4_equal<int32, P, true, 32, true> + { + static bool call(tvec4<int32, P> const & v1, tvec4<int32, P> const & v2) + { + return _mm_movemask_epi8(_mm_cmpeq_epi32(v1.data, v2.data)) != 0; + } + }; + + template <precision P> + struct compute_vec4_nequal<float, P, false, 32, true> + { + static bool call(tvec4<float, P> const & v1, tvec4<float, P> const & v2) + { + return _mm_movemask_ps(_mm_cmpneq_ps(v1.data, v2.data)) != 0; + } + }; + + template <precision P> + struct compute_vec4_nequal<int32, P, true, 32, true> + { + static bool call(tvec4<int32, P> const & v1, tvec4<int32, P> const & v2) + { + return _mm_movemask_epi8(_mm_cmpneq_epi32(v1.data, v2.data)) != 0; + } + }; +}//namespace detail # if !GLM_HAS_DEFAULTED_FUNCTIONS template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<float, simd>::tvec4() + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<float, aligned_lowp>::tvec4() # ifndef GLM_FORCE_NO_CTOR_INIT : data(_mm_setzero_ps()) # endif {} + + template <> + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<float, aligned_mediump>::tvec4() +# ifndef GLM_FORCE_NO_CTOR_INIT + : data(_mm_setzero_ps()) +# endif + {} + + template <> + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_CTOR tvec4<float, aligned_highp>::tvec4() +# ifndef GLM_FORCE_NO_CTOR_INIT + : data(_mm_setzero_ps()) +# endif + {} # endif//!GLM_HAS_DEFAULTED_FUNCTIONS template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, simd>::tvec4(float s) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_lowp>::tvec4(float s) : + data(_mm_set1_ps(s)) + {} + + template <> + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_mediump>::tvec4(float s) : + data(_mm_set1_ps(s)) + {} + + template <> + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_highp>::tvec4(float s) : data(_mm_set1_ps(s)) {} +# if GLM_ARCH & GLM_ARCH_AVX_BIT + template <> + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<double, aligned_lowp>::tvec4(double s) : + data(_mm256_set1_pd(s)) + {} + + template <> + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<double, aligned_mediump>::tvec4(double s) : + data(_mm256_set1_pd(s)) + {} + + template <> + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<double, aligned_highp>::tvec4(double s) : + data(_mm256_set1_pd(s)) + {} +# endif + + template <> + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_lowp>::tvec4(int32 s) : + data(_mm_set1_epi32(s)) + {} + + template <> + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_mediump>::tvec4(int32 s) : + data(_mm_set1_epi32(s)) + {} + + template <> + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_highp>::tvec4(int32 s) : + data(_mm_set1_epi32(s)) + {} + +# if GLM_ARCH & GLM_ARCH_AVX2_BIT + template <> + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int64, aligned_lowp>::tvec4(int64 s) : + data(_mm256_set1_epi64x(s)) + {} + template <> - GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, simd>::tvec4(float a, float b, float c, float d) : + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int64, aligned_mediump>::tvec4(int64 s) : + data(_mm256_set1_epi64x(s)) + {} + + template <> + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int64, aligned_highp>::tvec4(int64 s) : + data(_mm256_set1_epi64x(s)) + {} +# endif + + template <> + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_lowp>::tvec4(float a, float b, float c, float d) : data(_mm_set_ps(d, c, b, a)) {} template <> - template <typename U> - GLM_FUNC_QUALIFIER tvec4<float, simd> & tvec4<float, simd>::operator+=(U scalar) - { - this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast<float>(scalar))); - return *this; - } + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_mediump>::tvec4(float a, float b, float c, float d) : + data(_mm_set_ps(d, c, b, a)) + {} + + template <> + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_highp>::tvec4(float a, float b, float c, float d) : + data(_mm_set_ps(d, c, b, a)) + {} template <> template <> - GLM_FUNC_QUALIFIER tvec4<float, simd> & tvec4<float, simd>::operator+=<float>(float scalar) - { - this->data = _mm_add_ps(this->data, _mm_set_ps1(scalar)); - return *this; - } + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_lowp>::tvec4(int32 a, int32 b, int32 c, int32 d) : + data(_mm_set_epi32(d, c, b, a)) + {} template <> - template <typename U> - GLM_FUNC_QUALIFIER tvec4<float, simd> & tvec4<float, simd>::operator+=(tvec1<U, simd> const & v) - { - this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast<float>(v.x))); - return *this; - } + template <> + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_mediump>::tvec4(int32 a, int32 b, int32 c, int32 d) : + data(_mm_set_epi32(d, c, b, a)) + {} template <> - GLM_FUNC_QUALIFIER tvec4<float, simd> operator+(tvec4<float, simd> const & v1, tvec4<float, simd> const & v2) - { - tvec4<float, glm::simd> Result(uninitialize); - Result.data = _mm_add_ps(v1.data, v2.data); - return Result; - } + template <> + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<int32, aligned_highp>::tvec4(int32 a, int32 b, int32 c, int32 d) : + data(_mm_set_epi32(d, c, b, a)) + {} +/* + template <> + template <> + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_lowp>::tvec4(int32 a, int32 b, int32 c, int32 d) : + data(_mm_castsi128_ps(_mm_set_epi32(d, c, b, a))) + {} template <> - GLM_FUNC_QUALIFIER tvec4<float, simd> operator*(tvec4<float, simd> const & v1, tvec4<float, simd> const & v2) - { - tvec4<float, glm::simd> Result(uninitialize); - Result.data = _mm_mul_ps(v1.data, v2.data); - return Result; - } -#endif//GLM_HAS_UNRESTRICTED_UNIONS + template <> + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_mediump>::tvec4(int32 a, int32 b, int32 c, int32 d) : + data(_mm_castsi128_ps(_mm_set_epi32(d, c, b, a))) + {} + + template <> + template <> + GLM_FUNC_QUALIFIER GLM_CONSTEXPR_SIMD tvec4<float, aligned_highp>::tvec4(int32 a, int32 b, int32 c, int32 d) : + data(_mm_castsi128_ps(_mm_set_epi32(d, c, b, a))) + {} +*/ }//namespace glm + +#endif//GLM_ARCH & GLM_ARCH_SSE2_BIT diff --git a/3rdparty/glm/glm/exponential.hpp b/3rdparty/glm/glm/exponential.hpp index dfba58a5528..f3a7842cfbf 100644 --- a/3rdparty/glm/glm/exponential.hpp +++ b/3rdparty/glm/glm/exponential.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/exponential.hpp -/// @date 2013-12-24 / 2013-12-24 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/ext.hpp b/3rdparty/glm/glm/ext.hpp index 59476b0a7aa..ca2e9e82406 100644 --- a/3rdparty/glm/glm/ext.hpp +++ b/3rdparty/glm/glm/ext.hpp @@ -27,7 +27,9 @@ #pragma once -#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_EXT_INCLUDED_DISPLAYED)) +#include "glm.hpp" + +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_EXT_INCLUDED_DISPLAYED) # define GLM_MESSAGE_EXT_INCLUDED_DISPLAYED # pragma message("GLM: All extensions included (not recommanded)") #endif//GLM_MESSAGES @@ -50,6 +52,9 @@ #include "./gtc/type_ptr.hpp" #include "./gtc/ulp.hpp" #include "./gtc/vec1.hpp" +#if GLM_HAS_ALIGNED_TYPE +# include "./gtc/type_aligned.hpp" +#endif #include "./gtx/associated_min_max.hpp" #include "./gtx/bit.hpp" @@ -95,7 +100,6 @@ #endif #include "./gtx/transform.hpp" #include "./gtx/transform2.hpp" -#include "./gtx/type_aligned.hpp" #include "./gtx/vector_angle.hpp" #include "./gtx/vector_query.hpp" #include "./gtx/wrap.hpp" diff --git a/3rdparty/glm/glm/fwd.hpp b/3rdparty/glm/glm/fwd.hpp index eacb73f365b..f90c4d04d44 100644 --- a/3rdparty/glm/glm/fwd.hpp +++ b/3rdparty/glm/glm/fwd.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/fwd.hpp -/// @date 2013-03-30 / 2013-03-31 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/geometric.hpp b/3rdparty/glm/glm/geometric.hpp index 12d9f39df5d..eea45b12a3e 100644 --- a/3rdparty/glm/glm/geometric.hpp +++ b/3rdparty/glm/glm/geometric.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/geometric.hpp -/// @date 2013-12-24 / 2013-12-24 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/glm.hpp b/3rdparty/glm/glm/glm.hpp index 2da82396e51..021a3609f95 100644 --- a/3rdparty/glm/glm/glm.hpp +++ b/3rdparty/glm/glm/glm.hpp @@ -1,33 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/glm.hpp -/// @date 2005-01-14 / 2011-10-24 -/// @author Christophe Riccio /// /// @defgroup core GLM Core /// @@ -37,46 +9,45 @@ /// C++ functions that mirror the GLSL functions. It also includes /// @ref core_precision "a set of precision-based types" that can be used in the appropriate /// functions. The C++ types are all based on a basic set of @ref core_template "template types". -/// +/// /// The best documentation for GLM Core is the current GLSL specification, /// <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.clean.pdf">version 4.2 /// (pdf file)</a>. -/// +/// /// GLM core functionnalities require <glm/glm.hpp> to be included to be used. -/// +/// /// @defgroup core_types Types -/// +/// /// @brief The standard types defined by the specification. -/// +/// /// These types are all typedefs of more generalized, template types. To see the definition /// of these template types, go to @ref core_template. -/// +/// /// @ingroup core -/// +/// /// @defgroup core_precision Precision types -/// +/// /// @brief Non-GLSL types that are used to define precision-based types. -/// +/// /// The GLSL language allows the user to define the precision of a particular variable. /// In OpenGL's GLSL, these precision qualifiers have no effect; they are there for compatibility /// with OpenGL ES's precision qualifiers, where they @em do have an effect. -/// +/// /// C++ has no language equivalent to precision qualifiers. So GLM provides the next-best thing: /// a number of typedefs of the @ref core_template that use a particular precision. -/// +/// /// None of these types make any guarantees about the actual precision used. -/// +/// /// @ingroup core -/// +/// /// @defgroup core_template Template types -/// +/// /// @brief The generic template types used as the basis for the core types. -/// +/// /// These types are all templates used to define the actual @ref core_types. /// These templetes are implementation details of GLM types and should not be used explicitly. -/// +/// /// @ingroup core -/////////////////////////////////////////////////////////////////////////////////// #include "detail/_fixes.hpp" @@ -89,10 +60,10 @@ #include <cassert> #include "fwd.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_CORE_INCLUDED_DISPLAYED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_CORE_INCLUDED_DISPLAYED) # define GLM_MESSAGE_CORE_INCLUDED_DISPLAYED # pragma message("GLM: Core library included") -#endif//GLM_MESSAGE +#endif//GLM_MESSAGES #include "vec2.hpp" #include "vec3.hpp" diff --git a/3rdparty/glm/glm/gtc/bitfield.hpp b/3rdparty/glm/glm/gtc/bitfield.hpp index c875d033cec..38a38b695ce 100644 --- a/3rdparty/glm/glm/gtc/bitfield.hpp +++ b/3rdparty/glm/glm/gtc/bitfield.hpp @@ -1,33 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_bitfield /// @file glm/gtc/bitfield.hpp -/// @date 2014-10-25 / 2014-10-25 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtc_bitfield (dependence) @@ -38,7 +10,6 @@ /// @brief Allow to perform bit operations on integer values /// /// <glm/gtc/bitfield.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -49,7 +20,7 @@ #include "../detail/_vectorize.hpp" #include <limits> -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_bitfield extension included") #endif diff --git a/3rdparty/glm/glm/gtc/bitfield.inl b/3rdparty/glm/glm/gtc/bitfield.inl index a5ef69be7a9..490cfb321eb 100644 --- a/3rdparty/glm/glm/gtc/bitfield.inl +++ b/3rdparty/glm/glm/gtc/bitfield.inl @@ -1,34 +1,7 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_bitfield /// @file glm/gtc/bitfield.inl -/// @date 2011-10-14 / 2012-01-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// + +#include "../simd/integer.h" namespace glm{ namespace detail @@ -258,7 +231,7 @@ namespace detail } template <typename T, precision P, template <typename, precision> class vecIUType> - GLM_FUNC_QUALIFIER vecIUType<T, P> mask(vecIUType<T, P> const & v) + GLM_FUNC_QUALIFIER vecIUType<T, P> mask(vecIUType<T, P> const& v) { GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'mask' accepts only integer values"); @@ -293,7 +266,7 @@ namespace detail } template <typename T, precision P, template <typename, precision> class vecType> - GLM_FUNC_QUALIFIER vecType<T, P> bitfieldRotateLeft(vecType<T, P> const & In, int Shift) + GLM_FUNC_QUALIFIER vecType<T, P> bitfieldRotateLeft(vecType<T, P> const& In, int Shift) { GLM_STATIC_ASSERT(std::numeric_limits<T>::is_integer, "'bitfieldRotateLeft' accepts only integer values"); @@ -308,7 +281,7 @@ namespace detail } template <typename T, precision P, template <typename, precision> class vecType> - GLM_FUNC_QUALIFIER vecType<T, P> bitfieldFillOne(vecType<T, P> const & Value, int FirstBit, int BitCount) + GLM_FUNC_QUALIFIER vecType<T, P> bitfieldFillOne(vecType<T, P> const& Value, int FirstBit, int BitCount) { return Value | static_cast<T>(mask(BitCount) << FirstBit); } @@ -320,7 +293,7 @@ namespace detail } template <typename T, precision P, template <typename, precision> class vecType> - GLM_FUNC_QUALIFIER vecType<T, P> bitfieldFillZero(vecType<T, P> const & Value, int FirstBit, int BitCount) + GLM_FUNC_QUALIFIER vecType<T, P> bitfieldFillZero(vecType<T, P> const& Value, int FirstBit, int BitCount) { return Value & static_cast<T>(~(mask(BitCount) << FirstBit)); } diff --git a/3rdparty/glm/glm/gtc/color_space.hpp b/3rdparty/glm/glm/gtc/color_space.hpp index 8a35a4e6322..636e5ed8f22 100644 --- a/3rdparty/glm/glm/gtc/color_space.hpp +++ b/3rdparty/glm/glm/gtc/color_space.hpp @@ -1,44 +1,15 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_color_space /// @file glm/gtc/color_space.hpp -/// @date 2015-02-10 / 2015-08-02 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtc_color_space (dependence) /// /// @defgroup gtc_color_space GLM_GTC_color_space /// @ingroup gtc -/// +/// /// @brief Allow to perform bit operations on integer values -/// +/// /// <glm/gtc/color.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -50,7 +21,7 @@ #include "../vec4.hpp" #include <limits> -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_color_space extension included") #endif diff --git a/3rdparty/glm/glm/gtc/color_space.inl b/3rdparty/glm/glm/gtc/color_space.inl index 3561045d929..3fe293b0039 100644 --- a/3rdparty/glm/glm/gtc/color_space.inl +++ b/3rdparty/glm/glm/gtc/color_space.inl @@ -1,34 +1,5 @@ -///////////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_color_space /// @file glm/gtc/color_space.inl -/// @date 2015-02-10 / 2015-08-02 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////////////////////// namespace glm{ namespace detail @@ -36,7 +7,7 @@ namespace detail template <typename T, precision P, template <typename, precision> class vecType> struct compute_rgbToSrgb { - GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & ColorRGB, T GammaCorrection) + GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const& ColorRGB, T GammaCorrection) { vecType<T, P> const ClampedColor(clamp(ColorRGB, static_cast<T>(0), static_cast<T>(1))); @@ -50,7 +21,7 @@ namespace detail template <typename T, precision P> struct compute_rgbToSrgb<T, P, tvec4> { - GLM_FUNC_QUALIFIER static tvec4<T, P> call(tvec4<T, P> const & ColorRGB, T GammaCorrection) + GLM_FUNC_QUALIFIER static tvec4<T, P> call(tvec4<T, P> const& ColorRGB, T GammaCorrection) { return tvec4<T, P>(compute_rgbToSrgb<T, P, tvec3>::call(tvec3<T, P>(ColorRGB), GammaCorrection), ColorRGB.a); } @@ -59,7 +30,7 @@ namespace detail template <typename T, precision P, template <typename, precision> class vecType> struct compute_srgbToRgb { - GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & ColorSRGB, T Gamma) + GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const& ColorSRGB, T Gamma) { return mix( pow((ColorSRGB + static_cast<T>(0.055)) * static_cast<T>(0.94786729857819905213270142180095), vecType<T, P>(Gamma)), @@ -71,7 +42,7 @@ namespace detail template <typename T, precision P> struct compute_srgbToRgb<T, P, tvec4> { - GLM_FUNC_QUALIFIER static tvec4<T, P> call(tvec4<T, P> const & ColorSRGB, T Gamma) + GLM_FUNC_QUALIFIER static tvec4<T, P> call(tvec4<T, P> const& ColorSRGB, T Gamma) { return tvec4<T, P>(compute_srgbToRgb<T, P, tvec3>::call(tvec3<T, P>(ColorSRGB), Gamma), ColorSRGB.a); } @@ -79,25 +50,25 @@ namespace detail }//namespace detail template <typename T, precision P, template <typename, precision> class vecType> - GLM_FUNC_QUALIFIER vecType<T, P> convertLinearToSRGB(vecType<T, P> const & ColorLinear) + GLM_FUNC_QUALIFIER vecType<T, P> convertLinearToSRGB(vecType<T, P> const& ColorLinear) { return detail::compute_rgbToSrgb<T, P, vecType>::call(ColorLinear, static_cast<T>(0.41666)); } template <typename T, precision P, template <typename, precision> class vecType> - GLM_FUNC_QUALIFIER vecType<T, P> convertLinearToSRGB(vecType<T, P> const & ColorLinear, T Gamma) + GLM_FUNC_QUALIFIER vecType<T, P> convertLinearToSRGB(vecType<T, P> const& ColorLinear, T Gamma) { return detail::compute_rgbToSrgb<T, P, vecType>::call(ColorLinear, static_cast<T>(1) / Gamma); } template <typename T, precision P, template <typename, precision> class vecType> - GLM_FUNC_QUALIFIER vecType<T, P> convertSRGBToLinear(vecType<T, P> const & ColorSRGB) + GLM_FUNC_QUALIFIER vecType<T, P> convertSRGBToLinear(vecType<T, P> const& ColorSRGB) { return detail::compute_srgbToRgb<T, P, vecType>::call(ColorSRGB, static_cast<T>(2.4)); } template <typename T, precision P, template <typename, precision> class vecType> - GLM_FUNC_QUALIFIER vecType<T, P> convertSRGBToLinear(vecType<T, P> const & ColorSRGB, T Gamma) + GLM_FUNC_QUALIFIER vecType<T, P> convertSRGBToLinear(vecType<T, P> const& ColorSRGB, T Gamma) { return detail::compute_srgbToRgb<T, P, vecType>::call(ColorSRGB, Gamma); } diff --git a/3rdparty/glm/glm/gtc/constants.hpp b/3rdparty/glm/glm/gtc/constants.hpp index 786467ada08..d3358c7616a 100644 --- a/3rdparty/glm/glm/gtc/constants.hpp +++ b/3rdparty/glm/glm/gtc/constants.hpp @@ -1,33 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_constants /// @file glm/gtc/constants.hpp -/// @date 2011-09-30 / 2012-01-25 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtc_half_float (dependence) @@ -38,14 +10,13 @@ /// @brief Provide a list of constants and precomputed useful values. /// /// <glm/gtc/constants.hpp> need to be included to use these features. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependencies #include "../detail/setup.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_constants extension included") #endif diff --git a/3rdparty/glm/glm/gtc/constants.inl b/3rdparty/glm/glm/gtc/constants.inl index 8214f606352..cb451d0dc71 100644 --- a/3rdparty/glm/glm/gtc/constants.inl +++ b/3rdparty/glm/glm/gtc/constants.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_constants /// @file glm/gtc/constants.inl -/// @date 2011-10-14 / 2014-10-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #include <limits> diff --git a/3rdparty/glm/glm/gtc/epsilon.hpp b/3rdparty/glm/glm/gtc/epsilon.hpp index a76aaaf7257..289f5b74a86 100644 --- a/3rdparty/glm/glm/gtc/epsilon.hpp +++ b/3rdparty/glm/glm/gtc/epsilon.hpp @@ -18,7 +18,7 @@ #include "../detail/setup.hpp" #include "../detail/precision.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_epsilon extension included") #endif diff --git a/3rdparty/glm/glm/gtc/epsilon.inl b/3rdparty/glm/glm/gtc/epsilon.inl index 8e65e97402b..b5577d933d7 100644 --- a/3rdparty/glm/glm/gtc/epsilon.inl +++ b/3rdparty/glm/glm/gtc/epsilon.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_epsilon /// @file glm/gtc/epsilon.inl -/// @date 2012-04-07 / 2012-04-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// // Dependency: #include "quaternion.hpp" diff --git a/3rdparty/glm/glm/gtc/functions.hpp b/3rdparty/glm/glm/gtc/functions.hpp new file mode 100644 index 00000000000..ab1590b4984 --- /dev/null +++ b/3rdparty/glm/glm/gtc/functions.hpp @@ -0,0 +1,53 @@ +/// @ref gtc_functions +/// @file glm/gtc/functions.hpp +/// +/// @see core (dependence) +/// @see gtc_half_float (dependence) +/// @see gtc_quaternion (dependence) +/// +/// @defgroup gtc_functions GLM_GTC_functions +/// @ingroup gtc +/// +/// @brief List of useful common functions. +/// +/// <glm/gtc/functions.hpp> need to be included to use these functionalities. + +#pragma once + +// Dependencies +#include "../detail/setup.hpp" +#include "../detail/precision.hpp" +#include "../detail/type_vec2.hpp" + +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) +# pragma message("GLM: GLM_GTC_functions extension included") +#endif + +namespace glm +{ + /// @addtogroup gtc_functions + /// @{ + + /// 1D gauss function + /// + /// @see gtc_epsilon + template <typename T> + GLM_FUNC_DECL T gauss( + T x, + T ExpectedValue, + T StandardDeviation); + + /// 2D gauss function + /// + /// @see gtc_epsilon + template <typename T, precision P> + GLM_FUNC_DECL T gauss( + tvec2<T, P> const& Coord, + tvec2<T, P> const& ExpectedValue, + tvec2<T, P> const& StandardDeviation); + + /// @} +}//namespace glm + +#include "functions.inl" + diff --git a/3rdparty/glm/glm/gtc/functions.inl b/3rdparty/glm/glm/gtc/functions.inl new file mode 100644 index 00000000000..1dbc4967b97 --- /dev/null +++ b/3rdparty/glm/glm/gtc/functions.inl @@ -0,0 +1,31 @@ +/// @ref gtc_functions +/// @file glm/gtc/functions.inl + +#include "../detail/func_exponential.hpp" + +namespace glm +{ + template <typename T> + GLM_FUNC_QUALIFIER T gauss + ( + T x, + T ExpectedValue, + T StandardDeviation + ) + { + return exp(-((x - ExpectedValue) * (x - ExpectedValue)) / (static_cast<T>(2) * StandardDeviation * StandardDeviation)) / (StandardDeviation * sqrt(static_cast<T>(6.28318530717958647692528676655900576))); + } + + template <typename T, precision P> + GLM_FUNC_QUALIFIER T gauss + ( + tvec2<T, P> const& Coord, + tvec2<T, P> const& ExpectedValue, + tvec2<T, P> const& StandardDeviation + ) + { + tvec2<T, P> const Squared = ((Coord - ExpectedValue) * (Coord - ExpectedValue)) / (static_cast<T>(2) * StandardDeviation * StandardDeviation); + return exp(-(Squared.x + Squared.y)); + } +}//namespace glm + diff --git a/3rdparty/glm/glm/gtc/integer.hpp b/3rdparty/glm/glm/gtc/integer.hpp index 714e4c5ae42..69ffb1d3ba3 100644 --- a/3rdparty/glm/glm/gtc/integer.hpp +++ b/3rdparty/glm/glm/gtc/integer.hpp @@ -1,44 +1,15 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_integer /// @file glm/gtc/integer.hpp -/// @date 2014-11-17 / 2014-11-17 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtc_integer (dependence) /// /// @defgroup gtc_integer GLM_GTC_integer /// @ingroup gtc -/// +/// /// @brief Allow to perform bit operations on integer values -/// +/// /// <glm/gtc/integer.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -50,7 +21,7 @@ #include "../detail/func_exponential.hpp" #include <limits> -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_integer extension included") #endif diff --git a/3rdparty/glm/glm/gtc/integer.inl b/3rdparty/glm/glm/gtc/integer.inl index 2c4d7c40af1..7ce2918a88a 100644 --- a/3rdparty/glm/glm/gtc/integer.inl +++ b/3rdparty/glm/glm/gtc/integer.inl @@ -1,40 +1,11 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_integer /// @file glm/gtc/integer.inl -/// @date 2014-11-17 / 2014-11-17 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm{ namespace detail { - template <typename T, precision P, template <class, precision> class vecType> - struct compute_log2<T, P, vecType, false> + template <typename T, precision P, template <typename, precision> class vecType, bool Aligned> + struct compute_log2<T, P, vecType, false, Aligned> { GLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & vec) { @@ -45,8 +16,8 @@ namespace detail }; # if GLM_HAS_BITSCAN_WINDOWS - template <precision P> - struct compute_log2<int, P, tvec4, false> + template <precision P, bool Aligned> + struct compute_log2<int, P, tvec4, false, Aligned> { GLM_FUNC_QUALIFIER static tvec4<int, P> call(tvec4<int, P> const & vec) { diff --git a/3rdparty/glm/glm/gtc/matrix_access.hpp b/3rdparty/glm/glm/gtc/matrix_access.hpp index 6a684412ccc..e4156ef4441 100644 --- a/3rdparty/glm/glm/gtc/matrix_access.hpp +++ b/3rdparty/glm/glm/gtc/matrix_access.hpp @@ -1,49 +1,20 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_matrix_access /// @file glm/gtc/matrix_access.hpp -/// @date 2005-12-27 / 2011-05-16 -/// @author Christophe Riccio -/// +/// /// @see core (dependence) -/// +/// /// @defgroup gtc_matrix_access GLM_GTC_matrix_access /// @ingroup gtc /// /// Defines functions to access rows or columns of a matrix easily. /// <glm/gtc/matrix_access.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../detail/setup.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_matrix_access extension included") #endif diff --git a/3rdparty/glm/glm/gtc/matrix_access.inl b/3rdparty/glm/glm/gtc/matrix_access.inl index 2df23173220..831b94056e0 100644 --- a/3rdparty/glm/glm/gtc/matrix_access.inl +++ b/3rdparty/glm/glm/gtc/matrix_access.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_matrix_access /// @file glm/gtc/matrix_access.inl -/// @date 2005-12-27 / 2011-06-05 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtc/matrix_integer.hpp b/3rdparty/glm/glm/gtc/matrix_integer.hpp index 13fc3781d7c..fdc816d5f24 100644 --- a/3rdparty/glm/glm/gtc/matrix_integer.hpp +++ b/3rdparty/glm/glm/gtc/matrix_integer.hpp @@ -1,42 +1,13 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_matrix_integer /// @file glm/gtc/matrix_integer.hpp -/// @date 2011-01-20 / 2011-06-05 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtc_matrix_integer GLM_GTC_matrix_integer /// @ingroup gtc -/// +/// /// Defines a number of matrices with integer types. /// <glm/gtc/matrix_integer.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -51,7 +22,7 @@ #include "../mat4x3.hpp" #include "../mat4x4.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_matrix_integer extension included") #endif diff --git a/3rdparty/glm/glm/gtc/matrix_inverse.hpp b/3rdparty/glm/glm/gtc/matrix_inverse.hpp index 9d9bd845f1e..589381d4728 100644 --- a/3rdparty/glm/glm/gtc/matrix_inverse.hpp +++ b/3rdparty/glm/glm/gtc/matrix_inverse.hpp @@ -1,42 +1,13 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_matrix_inverse /// @file glm/gtc/matrix_inverse.hpp -/// @date 2005-12-21 / 2011-06-05 -/// @author Christophe Riccio /// /// @see core (dependence) -/// +/// /// @defgroup gtc_matrix_inverse GLM_GTC_matrix_inverse /// @ingroup gtc -/// +/// /// Defines additional matrix inverting functions. /// <glm/gtc/matrix_inverse.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -47,7 +18,7 @@ #include "../mat3x3.hpp" #include "../mat4x4.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_matrix_inverse extension included") #endif diff --git a/3rdparty/glm/glm/gtc/matrix_inverse.inl b/3rdparty/glm/glm/gtc/matrix_inverse.inl index d2437d5decb..36c9bf7c7f4 100644 --- a/3rdparty/glm/glm/gtc/matrix_inverse.inl +++ b/3rdparty/glm/glm/gtc/matrix_inverse.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_matrix_inverse /// @file glm/gtc/matrix_inverse.inl -/// @date 2005-12-21 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtc/matrix_transform.hpp b/3rdparty/glm/glm/gtc/matrix_transform.hpp index ebaf5e1f0c8..c97b89a6d9e 100644 --- a/3rdparty/glm/glm/gtc/matrix_transform.hpp +++ b/3rdparty/glm/glm/gtc/matrix_transform.hpp @@ -1,33 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_matrix_transform /// @file glm/gtc/matrix_transform.hpp -/// @date 2009-04-29 / 2011-05-16 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtx_transform @@ -35,17 +7,16 @@ /// /// @defgroup gtc_matrix_transform GLM_GTC_matrix_transform /// @ingroup gtc -/// +/// /// @brief Defines functions that generate common transformation matrices. -/// +/// /// The matrices generated by this extension use standard OpenGL fixed-function /// conventions. For example, the lookAt function generates a transform from world /// space into the specific eye space that the projective matrix functions /// (perspective, ortho, etc) are designed to expect. The OpenGL compatibility /// specifications defines the particular layout of this eye space. -/// +/// /// <glm/gtc/matrix_transform.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -56,7 +27,7 @@ #include "../vec4.hpp" #include "../gtc/constants.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_matrix_transform extension included") #endif diff --git a/3rdparty/glm/glm/gtc/matrix_transform.inl b/3rdparty/glm/glm/gtc/matrix_transform.inl index d8929c81201..dac55a4a96f 100644 --- a/3rdparty/glm/glm/gtc/matrix_transform.inl +++ b/3rdparty/glm/glm/gtc/matrix_transform.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_matrix_transform /// @file glm/gtc/matrix_transform.inl -/// @date 2009-04-29 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #include "../geometric.hpp" #include "../trigonometric.hpp" @@ -37,11 +8,7 @@ namespace glm { template <typename T, precision P> - GLM_FUNC_QUALIFIER tmat4x4<T, P> translate - ( - tmat4x4<T, P> const & m, - tvec3<T, P> const & v - ) + GLM_FUNC_QUALIFIER tmat4x4<T, P> translate(tmat4x4<T, P> const & m, tvec3<T, P> const & v) { tmat4x4<T, P> Result(m); Result[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3]; @@ -49,12 +16,7 @@ namespace glm } template <typename T, precision P> - GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate - ( - tmat4x4<T, P> const & m, - T angle, - tvec3<T, P> const & v - ) + GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate(tmat4x4<T, P> const & m, T angle, tvec3<T, P> const & v) { T const a = angle; T const c = cos(a); @@ -65,15 +27,15 @@ namespace glm tmat4x4<T, P> Rotate(uninitialize); Rotate[0][0] = c + temp[0] * axis[0]; - Rotate[0][1] = 0 + temp[0] * axis[1] + s * axis[2]; - Rotate[0][2] = 0 + temp[0] * axis[2] - s * axis[1]; + Rotate[0][1] = temp[0] * axis[1] + s * axis[2]; + Rotate[0][2] = temp[0] * axis[2] - s * axis[1]; - Rotate[1][0] = 0 + temp[1] * axis[0] - s * axis[2]; + Rotate[1][0] = temp[1] * axis[0] - s * axis[2]; Rotate[1][1] = c + temp[1] * axis[1]; - Rotate[1][2] = 0 + temp[1] * axis[2] + s * axis[0]; + Rotate[1][2] = temp[1] * axis[2] + s * axis[0]; - Rotate[2][0] = 0 + temp[2] * axis[0] + s * axis[1]; - Rotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0]; + Rotate[2][0] = temp[2] * axis[0] + s * axis[1]; + Rotate[2][1] = temp[2] * axis[1] - s * axis[0]; Rotate[2][2] = c + temp[2] * axis[2]; tmat4x4<T, P> Result(uninitialize); @@ -85,12 +47,7 @@ namespace glm } template <typename T, precision P> - GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate_slow - ( - tmat4x4<T, P> const & m, - T angle, - tvec3<T, P> const & v - ) + GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate_slow(tmat4x4<T, P> const & m, T angle, tvec3<T, P> const & v) { T const a = angle; T const c = cos(a); @@ -99,31 +56,27 @@ namespace glm tvec3<T, P> axis = normalize(v); - Result[0][0] = c + (1 - c) * axis.x * axis.x; - Result[0][1] = (1 - c) * axis.x * axis.y + s * axis.z; - Result[0][2] = (1 - c) * axis.x * axis.z - s * axis.y; - Result[0][3] = 0; + Result[0][0] = c + (static_cast<T>(1) - c) * axis.x * axis.x; + Result[0][1] = (static_cast<T>(1) - c) * axis.x * axis.y + s * axis.z; + Result[0][2] = (static_cast<T>(1) - c) * axis.x * axis.z - s * axis.y; + Result[0][3] = static_cast<T>(0); - Result[1][0] = (1 - c) * axis.y * axis.x - s * axis.z; - Result[1][1] = c + (1 - c) * axis.y * axis.y; - Result[1][2] = (1 - c) * axis.y * axis.z + s * axis.x; - Result[1][3] = 0; + Result[1][0] = (static_cast<T>(1) - c) * axis.y * axis.x - s * axis.z; + Result[1][1] = c + (static_cast<T>(1) - c) * axis.y * axis.y; + Result[1][2] = (static_cast<T>(1) - c) * axis.y * axis.z + s * axis.x; + Result[1][3] = static_cast<T>(0); - Result[2][0] = (1 - c) * axis.z * axis.x + s * axis.y; - Result[2][1] = (1 - c) * axis.z * axis.y - s * axis.x; - Result[2][2] = c + (1 - c) * axis.z * axis.z; - Result[2][3] = 0; + Result[2][0] = (static_cast<T>(1) - c) * axis.z * axis.x + s * axis.y; + Result[2][1] = (static_cast<T>(1) - c) * axis.z * axis.y - s * axis.x; + Result[2][2] = c + (static_cast<T>(1) - c) * axis.z * axis.z; + Result[2][3] = static_cast<T>(0); Result[3] = tvec4<T, P>(0, 0, 0, 1); return m * Result; } template <typename T, precision P> - GLM_FUNC_QUALIFIER tmat4x4<T, P> scale - ( - tmat4x4<T, P> const & m, - tvec3<T, P> const & v - ) + GLM_FUNC_QUALIFIER tmat4x4<T, P> scale(tmat4x4<T, P> const & m, tvec3<T, P> const & v) { tmat4x4<T, P> Result(uninitialize); Result[0] = m[0] * v[0]; @@ -134,11 +87,7 @@ namespace glm } template <typename T, precision P> - GLM_FUNC_QUALIFIER tmat4x4<T, P> scale_slow - ( - tmat4x4<T, P> const & m, - tvec3<T, P> const & v - ) + GLM_FUNC_QUALIFIER tmat4x4<T, P> scale_slow(tmat4x4<T, P> const & m, tvec3<T, P> const & v) { tmat4x4<T, P> Result(T(1)); Result[0][0] = v.x; @@ -296,13 +245,7 @@ namespace glm } template <typename T> - GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspective - ( - T fovy, - T aspect, - T zNear, - T zFar - ) + GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspective(T fovy, T aspect, T zNear, T zFar) { # if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED return perspectiveLH(fovy, aspect, zNear, zFar); @@ -312,12 +255,7 @@ namespace glm } template <typename T> - GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveRH - ( - T fovy, - T aspect, - T zNear, T zFar - ) + GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveRH(T fovy, T aspect, T zNear, T zFar) { assert(abs(aspect - std::numeric_limits<T>::epsilon()) > static_cast<T>(0)); @@ -340,12 +278,7 @@ namespace glm } template <typename T> - GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveLH - ( - T fovy, - T aspect, - T zNear, T zFar - ) + GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveLH(T fovy, T aspect, T zNear, T zFar) { assert(abs(aspect - std::numeric_limits<T>::epsilon()) > static_cast<T>(0)); @@ -368,12 +301,7 @@ namespace glm } template <typename T> - GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveFov - ( - T fov, - T width, T height, - T zNear, T zFar - ) + GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveFov(T fov, T width, T height, T zNear, T zFar) { # if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED return perspectiveFovLH(fov, width, height, zNear, zFar); @@ -383,12 +311,7 @@ namespace glm } template <typename T> - GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveFovRH - ( - T fov, - T width, T height, - T zNear, T zFar - ) + GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveFovRH(T fov, T width, T height, T zNear, T zFar) { assert(width > static_cast<T>(0)); assert(height > static_cast<T>(0)); @@ -415,12 +338,7 @@ namespace glm } template <typename T> - GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveFovLH - ( - T fov, - T width, T height, - T zNear, T zFar - ) + GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> perspectiveFovLH(T fov, T width, T height, T zNear, T zFar) { assert(width > static_cast<T>(0)); assert(height > static_cast<T>(0)); @@ -447,12 +365,7 @@ namespace glm } template <typename T> - GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> infinitePerspective - ( - T fovy, - T aspect, - T zNear - ) + GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> infinitePerspective(T fovy, T aspect, T zNear) { # if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED return infinitePerspectiveLH(fovy, aspect, zNear); @@ -462,68 +375,52 @@ namespace glm } template <typename T> - GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> infinitePerspectiveRH - ( - T fovy, - T aspect, - T zNear - ) + GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> infinitePerspectiveRH(T fovy, T aspect, T zNear) { - T const range = tan(fovy / T(2)) * zNear; + T const range = tan(fovy / static_cast<T>(2)) * zNear; T const left = -range * aspect; T const right = range * aspect; T const bottom = -range; T const top = range; - tmat4x4<T, defaultp> Result(T(0)); - Result[0][0] = (T(2) * zNear) / (right - left); - Result[1][1] = (T(2) * zNear) / (top - bottom); - Result[2][2] = - T(1); - Result[2][3] = - T(1); - Result[3][2] = - T(2) * zNear; + tmat4x4<T, defaultp> Result(static_cast<T>(0)); + Result[0][0] = (static_cast<T>(2) * zNear) / (right - left); + Result[1][1] = (static_cast<T>(2) * zNear) / (top - bottom); + Result[2][2] = - static_cast<T>(1); + Result[2][3] = - static_cast<T>(1); + Result[3][2] = - static_cast<T>(2) * zNear; return Result; } template <typename T> - GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> infinitePerspectiveLH - ( - T fovy, - T aspect, - T zNear - ) + GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> infinitePerspectiveLH(T fovy, T aspect, T zNear) { - T const range = tan(fovy / T(2)) * zNear; + T const range = tan(fovy / static_cast<T>(2)) * zNear; T const left = -range * aspect; T const right = range * aspect; T const bottom = -range; T const top = range; tmat4x4<T, defaultp> Result(T(0)); - Result[0][0] = (T(2) * zNear) / (right - left); - Result[1][1] = (T(2) * zNear) / (top - bottom); - Result[2][2] = T(1); - Result[2][3] = T(1); - Result[3][2] = - T(2) * zNear; + Result[0][0] = (static_cast<T>(2) * zNear) / (right - left); + Result[1][1] = (static_cast<T>(2) * zNear) / (top - bottom); + Result[2][2] = static_cast<T>(1); + Result[2][3] = static_cast<T>(1); + Result[3][2] = - static_cast<T>(2) * zNear; return Result; } // Infinite projection matrix: http://www.terathon.com/gdc07_lengyel.pdf template <typename T> - GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> tweakedInfinitePerspective - ( - T fovy, - T aspect, - T zNear, - T ep - ) + GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> tweakedInfinitePerspective(T fovy, T aspect, T zNear, T ep) { - T const range = tan(fovy / T(2)) * zNear; + T const range = tan(fovy / static_cast<T>(2)) * zNear; T const left = -range * aspect; T const right = range * aspect; T const bottom = -range; T const top = range; - tmat4x4<T, defaultp> Result(T(0)); + tmat4x4<T, defaultp> Result(static_cast<T>(0)); Result[0][0] = (static_cast<T>(2) * zNear) / (right - left); Result[1][1] = (static_cast<T>(2) * zNear) / (top - bottom); Result[2][2] = ep - static_cast<T>(1); @@ -533,12 +430,7 @@ namespace glm } template <typename T> - GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> tweakedInfinitePerspective - ( - T fovy, - T aspect, - T zNear - ) + GLM_FUNC_QUALIFIER tmat4x4<T, defaultp> tweakedInfinitePerspective(T fovy, T aspect, T zNear) { return tweakedInfinitePerspective(fovy, aspect, zNear, epsilon<T>()); } @@ -552,16 +444,16 @@ namespace glm tvec4<U, P> const & viewport ) { - tvec4<T, P> tmp = tvec4<T, P>(obj, T(1)); + tvec4<T, P> tmp = tvec4<T, P>(obj, static_cast<T>(1)); tmp = model * tmp; tmp = proj * tmp; tmp /= tmp.w; # if GLM_DEPTH_CLIP_SPACE == GLM_DEPTH_ZERO_TO_ONE - tmp.x = tmp.x * T(0.5) + T(0.5); - tmp.y = tmp.y * T(0.5) + T(0.5); + tmp.x = tmp.x * static_cast<T>(0.5) + static_cast<T>(0.5); + tmp.y = tmp.y * static_cast<T>(0.5) + static_cast<T>(0.5); # else - tmp = tmp * T(0.5) + T(0.5); + tmp = tmp * static_cast<T>(0.5) + static_cast<T>(0.5); # endif tmp[0] = tmp[0] * T(viewport[2]) + T(viewport[0]); tmp[1] = tmp[1] * T(viewport[3]) + T(viewport[1]); @@ -584,10 +476,10 @@ namespace glm tmp.x = (tmp.x - T(viewport[0])) / T(viewport[2]); tmp.y = (tmp.y - T(viewport[1])) / T(viewport[3]); # if GLM_DEPTH_CLIP_SPACE == GLM_DEPTH_ZERO_TO_ONE - tmp.x = tmp.x * T(2) - T(1); - tmp.y = tmp.y * T(2) - T(1); + tmp.x = tmp.x * static_cast<T>(2) - static_cast<T>(1); + tmp.y = tmp.y * static_cast<T>(2) - static_cast<T>(1); # else - tmp = tmp * T(2) - T(1); + tmp = tmp * static_cast<T>(2) - static_cast<T>(1); # endif tvec4<T, P> obj = Inverse * tmp; @@ -597,36 +489,26 @@ namespace glm } template <typename T, precision P, typename U> - GLM_FUNC_QUALIFIER tmat4x4<T, P> pickMatrix - ( - tvec2<T, P> const & center, - tvec2<T, P> const & delta, - tvec4<U, P> const & viewport - ) + GLM_FUNC_QUALIFIER tmat4x4<T, P> pickMatrix(tvec2<T, P> const & center, tvec2<T, P> const & delta, tvec4<U, P> const & viewport) { - assert(delta.x > T(0) && delta.y > T(0)); - tmat4x4<T, P> Result(1.0f); + assert(delta.x > static_cast<T>(0) && delta.y > static_cast<T>(0)); + tmat4x4<T, P> Result(static_cast<T>(1)); - if(!(delta.x > T(0) && delta.y > T(0))) + if(!(delta.x > static_cast<T>(0) && delta.y > static_cast<T>(0))) return Result; // Error tvec3<T, P> Temp( - (T(viewport[2]) - T(2) * (center.x - T(viewport[0]))) / delta.x, - (T(viewport[3]) - T(2) * (center.y - T(viewport[1]))) / delta.y, - T(0)); + (static_cast<T>(viewport[2]) - static_cast<T>(2) * (center.x - static_cast<T>(viewport[0]))) / delta.x, + (static_cast<T>(viewport[3]) - static_cast<T>(2) * (center.y - static_cast<T>(viewport[1]))) / delta.y, + static_cast<T>(0)); // Translate and scale the picked region to the entire window Result = translate(Result, Temp); - return scale(Result, tvec3<T, P>(T(viewport[2]) / delta.x, T(viewport[3]) / delta.y, T(1))); + return scale(Result, tvec3<T, P>(static_cast<T>(viewport[2]) / delta.x, static_cast<T>(viewport[3]) / delta.y, static_cast<T>(1))); } template <typename T, precision P> - GLM_FUNC_QUALIFIER tmat4x4<T, P> lookAt - ( - tvec3<T, P> const & eye, - tvec3<T, P> const & center, - tvec3<T, P> const & up - ) + GLM_FUNC_QUALIFIER tmat4x4<T, P> lookAt(tvec3<T, P> const & eye, tvec3<T, P> const & center, tvec3<T, P> const & up) { # if GLM_COORDINATE_SYSTEM == GLM_LEFT_HANDED return lookAtLH(eye, center, up); diff --git a/3rdparty/glm/glm/gtc/noise.hpp b/3rdparty/glm/glm/gtc/noise.hpp index 9bab7ba6a5c..aec4f18dd22 100644 --- a/3rdparty/glm/glm/gtc/noise.hpp +++ b/3rdparty/glm/glm/gtc/noise.hpp @@ -1,46 +1,17 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_noise /// @file glm/gtc/noise.hpp -/// @date 2011-04-21 / 2011-09-27 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtc_noise GLM_GTC_noise /// @ingroup gtc -/// +/// /// Defines 2D, 3D and 4D procedural noise functions /// Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise": /// https://github.com/ashima/webgl-noise /// Following Stefan Gustavson's paper "Simplex noise demystified": /// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf /// <glm/gtc/noise.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -55,7 +26,7 @@ #include "../vec3.hpp" #include "../vec4.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_noise extension included") #endif diff --git a/3rdparty/glm/glm/gtc/noise.inl b/3rdparty/glm/glm/gtc/noise.inl index 126c7dcc23a..4f2731c4d41 100644 --- a/3rdparty/glm/glm/gtc/noise.inl +++ b/3rdparty/glm/glm/gtc/noise.inl @@ -1,39 +1,10 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_noise /// @file glm/gtc/noise.inl -/// @date 2011-04-21 / 2012-04-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// +/// // Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise": // https://github.com/ashima/webgl-noise // Following Stefan Gustavson's paper "Simplex noise demystified": // http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf -/////////////////////////////////////////////////////////////////////////////////// namespace glm{ namespace gtc diff --git a/3rdparty/glm/glm/gtc/packing.hpp b/3rdparty/glm/glm/gtc/packing.hpp index b016eb154a6..1389d9595f0 100644 --- a/3rdparty/glm/glm/gtc/packing.hpp +++ b/3rdparty/glm/glm/gtc/packing.hpp @@ -1,51 +1,22 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_packing /// @file glm/gtc/packing.hpp -/// @date 2013-08-08 / 2013-08-08 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtc_packing GLM_GTC_packing /// @ingroup gtc -/// +/// /// @brief This extension provides a set of function to convert vertors to packed /// formats. -/// +/// /// <glm/gtc/packing.hpp> need to be included to use these features. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "type_precision.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_packing extension included") #endif diff --git a/3rdparty/glm/glm/gtc/packing.inl b/3rdparty/glm/glm/gtc/packing.inl index 935ce08e04a..b3c7c4e05d1 100644 --- a/3rdparty/glm/glm/gtc/packing.inl +++ b/3rdparty/glm/glm/gtc/packing.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_packing /// @file glm/gtc/packing.inl -/// @date 2013-08-08 / 2013-08-08 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #include "../common.hpp" #include "../vec2.hpp" @@ -151,13 +122,8 @@ namespace detail else if(glm::isinf(x)) return 0x1Fu << 6u; -# if(GLM_COMPILER & GLM_COMPILER_GCC || GLM_COMPILER & GLM_COMPILER_LLVM) - uint Pack = 0u; - memcpy(&Pack, &x, sizeof(Pack)); -# else - uint Pack = reinterpret_cast<uint&>(x); -# endif - + uint Pack = 0u; + memcpy(&Pack, &x, sizeof(Pack)); return float2packed11(Pack); } @@ -172,13 +138,9 @@ namespace detail uint Result = packed11ToFloat(x); -# if(GLM_COMPILER & GLM_COMPILER_GCC || GLM_COMPILER & GLM_COMPILER_LLVM) - float Temp = 0; - memcpy(&Temp, &Result, sizeof(Temp)); - return Temp; -# else - return reinterpret_cast<float&>(Result); -# endif + float Temp = 0; + memcpy(&Temp, &Result, sizeof(Temp)); + return Temp; } GLM_FUNC_QUALIFIER glm::uint floatTo10bit(float x) @@ -190,13 +152,8 @@ namespace detail else if(glm::isinf(x)) return 0x1Fu << 5u; -# if(GLM_COMPILER & GLM_COMPILER_GCC || GLM_COMPILER & GLM_COMPILER_LLVM) - uint Pack = 0; - memcpy(&Pack, &x, sizeof(Pack)); -# else - uint Pack = reinterpret_cast<uint&>(x); -# endif - + uint Pack = 0; + memcpy(&Pack, &x, sizeof(Pack)); return float2packed10(Pack); } @@ -211,13 +168,9 @@ namespace detail uint Result = packed10ToFloat(x); -# if(GLM_COMPILER & GLM_COMPILER_GCC || GLM_COMPILER & GLM_COMPILER_LLVM) - float Temp = 0; - memcpy(&Temp, &Result, sizeof(Temp)); - return Temp; -# else - return reinterpret_cast<float&>(Result); -# endif + float Temp = 0; + memcpy(&Temp, &Result, sizeof(Temp)); + return Temp; } // GLM_FUNC_QUALIFIER glm::uint f11_f11_f10(float x, float y, float z) @@ -326,13 +279,17 @@ namespace detail { GLM_FUNC_QUALIFIER static tvec1<uint16, P> pack(tvec1<float, P> const & v) { - int16 const Unpacked(detail::toFloat16(v.x)); - return tvec1<uint16, P>(reinterpret_cast<uint16 const &>(Unpacked)); + int16 const Unpack(detail::toFloat16(v.x)); + u16vec1 Packed(uninitialize); + memcpy(&Packed, &Unpack, sizeof(Packed)); + return Packed; } GLM_FUNC_QUALIFIER static tvec1<float, P> unpack(tvec1<uint16, P> const & v) { - return tvec1<float, P>(detail::toFloat32(reinterpret_cast<int16 const &>(v.x))); + i16vec1 Unpack(uninitialize); + memcpy(&Unpack, &v, sizeof(Unpack)); + return tvec1<float, P>(detail::toFloat32(v.x)); } }; @@ -341,17 +298,17 @@ namespace detail { GLM_FUNC_QUALIFIER static tvec2<uint16, P> pack(tvec2<float, P> const & v) { - tvec2<int16, P> const Unpacked(detail::toFloat16(v.x), detail::toFloat16(v.y)); - return tvec2<uint16, P>( - reinterpret_cast<uint16 const &>(Unpacked.x), - reinterpret_cast<uint16 const &>(Unpacked.y)); + tvec2<int16, P> const Unpack(detail::toFloat16(v.x), detail::toFloat16(v.y)); + u16vec2 Packed(uninitialize); + memcpy(&Packed, &Unpack, sizeof(Packed)); + return Packed; } GLM_FUNC_QUALIFIER static tvec2<float, P> unpack(tvec2<uint16, P> const & v) { - return tvec2<float, P>( - detail::toFloat32(reinterpret_cast<int16 const &>(v.x)), - detail::toFloat32(reinterpret_cast<int16 const &>(v.y))); + i16vec2 Unpack(uninitialize); + memcpy(&Unpack, &v, sizeof(Unpack)); + return tvec2<float, P>(detail::toFloat32(v.x), detail::toFloat32(v.y)); } }; @@ -360,19 +317,17 @@ namespace detail { GLM_FUNC_QUALIFIER static tvec3<uint16, P> pack(tvec3<float, P> const & v) { - tvec3<int16, P> const Unpacked(detail::toFloat16(v.x), detail::toFloat16(v.y), detail::toFloat16(v.z)); - return tvec3<uint16, P>( - reinterpret_cast<uint16 const &>(Unpacked.x), - reinterpret_cast<uint16 const &>(Unpacked.y), - reinterpret_cast<uint16 const &>(Unpacked.z)); + tvec3<int16, P> const Unpack(detail::toFloat16(v.x), detail::toFloat16(v.y), detail::toFloat16(v.z)); + u16vec3 Packed(uninitialize); + memcpy(&Packed, &Unpack, sizeof(Packed)); + return Packed; } GLM_FUNC_QUALIFIER static tvec3<float, P> unpack(tvec3<uint16, P> const & v) { - return tvec3<float, P>( - detail::toFloat32(reinterpret_cast<int16 const &>(v.x)), - detail::toFloat32(reinterpret_cast<int16 const &>(v.y)), - detail::toFloat32(reinterpret_cast<int16 const &>(v.z))); + i16vec3 Unpack(uninitialize); + memcpy(&Unpack, &v, sizeof(Unpack)); + return tvec3<float, P>(detail::toFloat32(v.x), detail::toFloat32(v.y), detail::toFloat32(v.z)); } }; @@ -381,21 +336,17 @@ namespace detail { GLM_FUNC_QUALIFIER static tvec4<uint16, P> pack(tvec4<float, P> const & v) { - tvec4<int16, P> const Unpacked(detail::toFloat16(v.x), detail::toFloat16(v.y), detail::toFloat16(v.z), detail::toFloat16(v.w)); - return tvec4<uint16, P>( - reinterpret_cast<uint16 const &>(Unpacked.x), - reinterpret_cast<uint16 const &>(Unpacked.y), - reinterpret_cast<uint16 const &>(Unpacked.z), - reinterpret_cast<uint16 const &>(Unpacked.w)); + tvec4<int16, P> const Unpack(detail::toFloat16(v.x), detail::toFloat16(v.y), detail::toFloat16(v.z), detail::toFloat16(v.w)); + u16vec4 Packed(uninitialize); + memcpy(&Packed, &Unpack, sizeof(Packed)); + return Packed; } GLM_FUNC_QUALIFIER static tvec4<float, P> unpack(tvec4<uint16, P> const & v) { - return tvec4<float, P>( - detail::toFloat32(reinterpret_cast<int16 const &>(v.x)), - detail::toFloat32(reinterpret_cast<int16 const &>(v.y)), - detail::toFloat32(reinterpret_cast<int16 const &>(v.z)), - detail::toFloat32(reinterpret_cast<int16 const &>(v.w))); + i16vec4 Unpack(uninitialize); + memcpy(&Unpack, &v, sizeof(Unpack)); + return tvec4<float, P>(detail::toFloat32(v.x), detail::toFloat32(v.y), detail::toFloat32(v.z), detail::toFloat32(v.w)); } }; }//namespace detail @@ -414,40 +365,50 @@ namespace detail GLM_FUNC_QUALIFIER uint16 packUnorm2x8(vec2 const & v) { u8vec2 const Topack(round(clamp(v, 0.0f, 1.0f) * 255.0f)); - return reinterpret_cast<uint16 const &>(Topack); + + uint16 Unpack = 0; + memcpy(&Unpack, &Topack, sizeof(Unpack)); + return Unpack; } GLM_FUNC_QUALIFIER vec2 unpackUnorm2x8(uint16 p) { - vec2 const Unpack(reinterpret_cast<u8vec2 const &>(p)); - return Unpack * float(0.0039215686274509803921568627451); // 1 / 255 + u8vec2 Unpack(uninitialize); + memcpy(&Unpack, &p, sizeof(Unpack)); + return vec2(Unpack) * float(0.0039215686274509803921568627451); // 1 / 255 } GLM_FUNC_QUALIFIER uint8 packSnorm1x8(float v) { int8 const Topack(static_cast<int8>(round(clamp(v ,-1.0f, 1.0f) * 127.0f))); - return reinterpret_cast<uint8 const &>(Topack); + uint8 Packed = 0; + memcpy(&Packed, &Topack, sizeof(Packed)); + return Packed; } GLM_FUNC_QUALIFIER float unpackSnorm1x8(uint8 p) { - float const Unpack(reinterpret_cast<int8 const &>(p)); + int8 Unpack = 0; + memcpy(&Unpack, &p, sizeof(Unpack)); return clamp( - Unpack * 0.00787401574803149606299212598425f, // 1.0f / 127.0f + static_cast<float>(Unpack) * 0.00787401574803149606299212598425f, // 1.0f / 127.0f -1.0f, 1.0f); } GLM_FUNC_QUALIFIER uint16 packSnorm2x8(vec2 const & v) { i8vec2 const Topack(round(clamp(v, -1.0f, 1.0f) * 127.0f)); - return reinterpret_cast<uint16 const &>(Topack); + uint16 Packed = 0; + memcpy(&Packed, &Topack, sizeof(Packed)); + return Packed; } GLM_FUNC_QUALIFIER vec2 unpackSnorm2x8(uint16 p) { - vec2 const Unpack(reinterpret_cast<i8vec2 const &>(p)); + i8vec2 Unpack(uninitialize); + memcpy(&Unpack, &p, sizeof(Unpack)); return clamp( - Unpack * 0.00787401574803149606299212598425f, // 1.0f / 127.0f + vec2(Unpack) * 0.00787401574803149606299212598425f, // 1.0f / 127.0f -1.0f, 1.0f); } @@ -465,69 +426,83 @@ namespace detail GLM_FUNC_QUALIFIER uint64 packUnorm4x16(vec4 const & v) { u16vec4 const Topack(round(clamp(v , 0.0f, 1.0f) * 65535.0f)); - return reinterpret_cast<uint64 const &>(Topack); + uint64 Packed = 0; + memcpy(&Packed, &Topack, sizeof(Packed)); + return Packed; } GLM_FUNC_QUALIFIER vec4 unpackUnorm4x16(uint64 p) { - vec4 const Unpack(reinterpret_cast<u16vec4 const &>(p)); - return Unpack * 1.5259021896696421759365224689097e-5f; // 1.0 / 65535.0 + u16vec4 Unpack(uninitialize); + memcpy(&Unpack, &p, sizeof(Unpack)); + return vec4(Unpack) * 1.5259021896696421759365224689097e-5f; // 1.0 / 65535.0 } GLM_FUNC_QUALIFIER uint16 packSnorm1x16(float v) { int16 const Topack = static_cast<int16>(round(clamp(v ,-1.0f, 1.0f) * 32767.0f)); - return reinterpret_cast<uint16 const &>(Topack); + uint16 Packed = 0; + memcpy(&Packed, &Topack, sizeof(Packed)); + return Packed; } GLM_FUNC_QUALIFIER float unpackSnorm1x16(uint16 p) { - float const Unpack(reinterpret_cast<int16 const &>(p)); + int16 Unpack = 0; + memcpy(&Unpack, &p, sizeof(Unpack)); return clamp( - Unpack * 3.0518509475997192297128208258309e-5f, //1.0f / 32767.0f, + static_cast<float>(Unpack) * 3.0518509475997192297128208258309e-5f, //1.0f / 32767.0f, -1.0f, 1.0f); } GLM_FUNC_QUALIFIER uint64 packSnorm4x16(vec4 const & v) { i16vec4 const Topack(round(clamp(v ,-1.0f, 1.0f) * 32767.0f)); - return reinterpret_cast<uint64 const &>(Topack); + uint64 Packed = 0; + memcpy(&Packed, &Topack, sizeof(Packed)); + return Packed; } GLM_FUNC_QUALIFIER vec4 unpackSnorm4x16(uint64 p) { - vec4 const Unpack(reinterpret_cast<i16vec4 const &>(p)); + i16vec4 Unpack(uninitialize); + memcpy(&Unpack, &p, sizeof(Unpack)); return clamp( - Unpack * 3.0518509475997192297128208258309e-5f, //1.0f / 32767.0f, + vec4(Unpack) * 3.0518509475997192297128208258309e-5f, //1.0f / 32767.0f, -1.0f, 1.0f); } GLM_FUNC_QUALIFIER uint16 packHalf1x16(float v) { int16 const Topack(detail::toFloat16(v)); - return reinterpret_cast<uint16 const &>(Topack); + uint16 Packed = 0; + memcpy(&Packed, &Topack, sizeof(Packed)); + return Packed; } GLM_FUNC_QUALIFIER float unpackHalf1x16(uint16 v) { - return detail::toFloat32(reinterpret_cast<int16 const &>(v)); + int16 Unpack = 0; + memcpy(&Unpack, &v, sizeof(Unpack)); + return detail::toFloat32(Unpack); } GLM_FUNC_QUALIFIER uint64 packHalf4x16(glm::vec4 const & v) { - i16vec4 Unpack( + i16vec4 const Unpack( detail::toFloat16(v.x), detail::toFloat16(v.y), detail::toFloat16(v.z), detail::toFloat16(v.w)); - - return reinterpret_cast<uint64 const &>(Unpack); + uint64 Packed = 0; + memcpy(&Packed, &Unpack, sizeof(Packed)); + return Packed; } GLM_FUNC_QUALIFIER glm::vec4 unpackHalf4x16(uint64 v) { - i16vec4 Unpack(reinterpret_cast<i16vec4 const &>(v)); - + i16vec4 Unpack(uninitialize); + memcpy(&Unpack, &v, sizeof(Unpack)); return vec4( detail::toFloat32(Unpack.x), detail::toFloat32(Unpack.y), diff --git a/3rdparty/glm/glm/gtc/quaternion.hpp b/3rdparty/glm/glm/gtc/quaternion.hpp index c839752f1ad..72d06037730 100644 --- a/3rdparty/glm/glm/gtc/quaternion.hpp +++ b/3rdparty/glm/glm/gtc/quaternion.hpp @@ -1,33 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_quaternion /// @file glm/gtc/quaternion.hpp -/// @date 2009-05-21 / 2012-12-20 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtc_half_float (dependence) @@ -35,11 +7,10 @@ /// /// @defgroup gtc_quaternion GLM_GTC_quaternion /// @ingroup gtc -/// +/// /// @brief Defines a templated quaternion type and several quaternion operations. -/// +/// /// <glm/gtc/quaternion.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -50,7 +21,7 @@ #include "../vec4.hpp" #include "../gtc/constants.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_quaternion extension included") #endif @@ -69,7 +40,32 @@ namespace glm // -- Data -- - T x, y, z, w; +# if GLM_HAS_ALIGNED_TYPE +# if GLM_COMPILER & GLM_COMPILER_GCC +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wpedantic" +# endif +# if GLM_COMPILER & GLM_COMPILER_CLANG +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wgnu-anonymous-struct" +# pragma clang diagnostic ignored "-Wnested-anon-types" +# endif + + union + { + struct { T x, y, z, w;}; + typename detail::storage<T, sizeof(T) * 4, detail::is_aligned<P>::value>::type data; + }; + +# if GLM_COMPILER & GLM_COMPILER_CLANG +# pragma clang diagnostic pop +# endif +# if GLM_COMPILER & GLM_COMPILER_GCC +# pragma GCC diagnostic pop +# endif +# else + T x, y, z, w; +# endif // -- Component accesses -- @@ -126,6 +122,8 @@ namespace glm template <typename U> GLM_FUNC_DECL tquat<T, P> & operator+=(tquat<U, P> const & q); template <typename U> + GLM_FUNC_DECL tquat<T, P> & operator-=(tquat<U, P> const & q); + template <typename U> GLM_FUNC_DECL tquat<T, P> & operator*=(tquat<U, P> const & q); template <typename U> GLM_FUNC_DECL tquat<T, P> & operator*=(U s); @@ -370,6 +368,29 @@ namespace glm /// @see gtc_quaternion template <typename T, precision P> GLM_FUNC_DECL tvec4<bool, P> notEqual(tquat<T, P> const & x, tquat<T, P> const & y); + + /// 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. + /// + /// /!\ When using compiler fast math, this function may fail. + /// + /// @tparam genType Floating-point scalar or vector types. + template <typename T, precision P> + GLM_FUNC_DECL tvec4<bool, P> isnan(tquat<T, P> 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. + /// + /// @tparam genType Floating-point scalar or vector types. + template <typename T, precision P> + GLM_FUNC_DECL tvec4<bool, P> isinf(tquat<T, P> const & x); + /// @} } //namespace glm diff --git a/3rdparty/glm/glm/gtc/quaternion.inl b/3rdparty/glm/glm/gtc/quaternion.inl index 581b672e05a..f062b0a6362 100644 --- a/3rdparty/glm/glm/gtc/quaternion.inl +++ b/3rdparty/glm/glm/gtc/quaternion.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_quaternion /// @file glm/gtc/quaternion.inl -/// @date 2009-05-21 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #include "../trigonometric.hpp" #include "../geometric.hpp" @@ -38,15 +9,60 @@ namespace glm{ namespace detail { - template <typename T, precision P> - struct compute_dot<tquat, T, P> + template <typename T, precision P, bool Aligned> + struct compute_dot<tquat, T, P, Aligned> { - static GLM_FUNC_QUALIFIER T call(tquat<T, P> const & x, tquat<T, P> const & y) + static GLM_FUNC_QUALIFIER T call(tquat<T, P> const& x, tquat<T, P> const& y) { tvec4<T, P> tmp(x.x * y.x, x.y * y.y, x.z * y.z, x.w * y.w); return (tmp.x + tmp.y) + (tmp.z + tmp.w); } }; + + template <typename T, precision P, bool Aligned> + struct compute_quat_add + { + static tquat<T, P> call(tquat<T, P> const& q, tquat<T, P> const& p) + { + return tquat<T, P>(q.w + p.w, q.x + p.x, q.y + p.y, q.z + p.z); + } + }; + + template <typename T, precision P, bool Aligned> + struct compute_quat_sub + { + static tquat<T, P> call(tquat<T, P> const& q, tquat<T, P> const& p) + { + return tquat<T, P>(q.w - p.w, q.x - p.x, q.y - p.y, q.z - p.z); + } + }; + + template <typename T, precision P, bool Aligned> + struct compute_quat_mul_scalar + { + static tquat<T, P> call(tquat<T, P> const& q, T s) + { + return tquat<T, P>(q.w * s, q.x * s, q.y * s, q.z * s); + } + }; + + template <typename T, precision P, bool Aligned> + struct compute_quat_div_scalar + { + static tquat<T, P> call(tquat<T, P> const& q, T s) + { + return tquat<T, P>(q.w / s, q.x / s, q.y / s, q.z / s); + } + }; + + template <typename T, precision P, bool Aligned> + struct compute_quat_mul_vec4 + { + static tvec4<T, P> call(tquat<T, P> const & q, tvec4<T, P> const & v) + { + return tvec4<T, P>(q * tvec3<T, P>(v), v.w); + } + }; }//namespace detail // -- Component accesses -- @@ -144,7 +160,7 @@ namespace detail GLM_FUNC_QUALIFIER tquat<T, P>::tquat(tvec3<T, P> const & u, tvec3<T, P> const & v) { tvec3<T, P> const LocalW(cross(u, v)); - T Dot = detail::compute_dot<tvec3, T, P>::call(u, v); + T Dot = detail::compute_dot<tvec3, T, P, detail::is_aligned<P>::value>::call(u, v); tquat<T, P> q(T(1) + Dot, LocalW.x, LocalW.y, LocalW.z); *this = normalize(q); @@ -227,13 +243,16 @@ namespace detail template <typename T, precision P> template <typename U> - GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator+=(tquat<U, P> const & q) + GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator+=(tquat<U, P> const& q) { - this->w += static_cast<T>(q.w); - this->x += static_cast<T>(q.x); - this->y += static_cast<T>(q.y); - this->z += static_cast<T>(q.z); - return *this; + return (*this = detail::compute_quat_add<T, P, detail::is_aligned<P>::value>::call(*this, tquat<T, P>(q))); + } + + template <typename T, precision P> + template <typename U> + GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator-=(tquat<U, P> const& q) + { + return (*this = detail::compute_quat_sub<T, P, detail::is_aligned<P>::value>::call(*this, tquat<T, P>(q))); } template <typename T, precision P> @@ -254,22 +273,14 @@ namespace detail template <typename U> GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator*=(U s) { - this->w *= static_cast<U>(s); - this->x *= static_cast<U>(s); - this->y *= static_cast<U>(s); - this->z *= static_cast<U>(s); - return *this; + return (*this = detail::compute_quat_mul_scalar<T, P, detail::is_aligned<P>::value>::call(*this, static_cast<U>(s))); } template <typename T, precision P> template <typename U> GLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator/=(U s) { - this->w /= static_cast<U>(s); - this->x /= static_cast<U>(s); - this->y /= static_cast<U>(s); - this->z /= static_cast<U>(s); - return *this; + return (*this = detail::compute_quat_div_scalar<T, P, detail::is_aligned<P>::value>::call(*this, static_cast<U>(s))); } // -- Unary bit operators -- @@ -317,9 +328,9 @@ namespace detail } template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tquat<T, P> const & q, tvec4<T, P> const & v) + GLM_FUNC_QUALIFIER tvec4<T, P> operator*(tquat<T, P> const& q, tvec4<T, P> const& v) { - return tvec4<T, P>(q * tvec3<T, P>(v), v.w); + return detail::compute_quat_mul_vec4<T, P, detail::is_aligned<P>::value>::call(q, v); } template <typename T, precision P> @@ -592,17 +603,17 @@ namespace detail T qwy(q.w * q.y); T qwz(q.w * q.z); - Result[0][0] = 1 - 2 * (qyy + qzz); - Result[0][1] = 2 * (qxy + qwz); - Result[0][2] = 2 * (qxz - qwy); + Result[0][0] = T(1) - T(2) * (qyy + qzz); + Result[0][1] = T(2) * (qxy + qwz); + Result[0][2] = T(2) * (qxz - qwy); - Result[1][0] = 2 * (qxy - qwz); - Result[1][1] = 1 - 2 * (qxx + qzz); - Result[1][2] = 2 * (qyz + qwx); + Result[1][0] = T(2) * (qxy - qwz); + Result[1][1] = T(1) - T(2) * (qxx + qzz); + Result[1][2] = T(2) * (qyz + qwx); - Result[2][0] = 2 * (qxz + qwy); - Result[2][1] = 2 * (qyz - qwx); - Result[2][2] = 1 - 2 * (qxx + qyy); + Result[2][0] = T(2) * (qxz + qwy); + Result[2][1] = T(2) * (qyz - qwx); + Result[2][2] = T(1) - T(2) * (qxx + qyy); return Result; } @@ -766,4 +777,25 @@ namespace detail Result[i] = x[i] != y[i]; return Result; } + + template <typename T, precision P> + GLM_FUNC_QUALIFIER tvec4<bool, P> isnan(tquat<T, P> const& q) + { + GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isnan' only accept floating-point inputs"); + + return tvec4<bool, P>(isnan(q.x), isnan(q.y), isnan(q.z), isnan(q.w)); + } + + template <typename T, precision P> + GLM_FUNC_QUALIFIER tvec4<bool, P> isinf(tquat<T, P> const& q) + { + GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'isinf' only accept floating-point inputs"); + + return tvec4<bool, P>(isinf(q.x), isinf(q.y), isinf(q.z), isinf(q.w)); + } }//namespace glm + +#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_ALIGNED_TYPE +# include "quaternion_simd.inl" +#endif + diff --git a/3rdparty/glm/glm/gtc/quaternion_simd.inl b/3rdparty/glm/glm/gtc/quaternion_simd.inl new file mode 100644 index 00000000000..cca874bb552 --- /dev/null +++ b/3rdparty/glm/glm/gtc/quaternion_simd.inl @@ -0,0 +1,198 @@ +/// @ref core +/// @file glm/gtc/quaternion_simd.inl + +#if GLM_ARCH & GLM_ARCH_SSE2_BIT + +namespace glm{ +namespace detail +{ +/* + template <precision P> + struct compute_quat_mul<float, P, true> + { + static tquat<float, P> call(tquat<float, P> const& q1, tquat<float, P> const& q2) + { + // SSE2 STATS: 11 shuffle, 8 mul, 8 add + // SSE4 STATS: 3 shuffle, 4 mul, 4 dpps + + __m128 const mul0 = _mm_mul_ps(q1.Data, _mm_shuffle_ps(q2.Data, q2.Data, _MM_SHUFFLE(0, 1, 2, 3))); + __m128 const mul1 = _mm_mul_ps(q1.Data, _mm_shuffle_ps(q2.Data, q2.Data, _MM_SHUFFLE(1, 0, 3, 2))); + __m128 const mul2 = _mm_mul_ps(q1.Data, _mm_shuffle_ps(q2.Data, q2.Data, _MM_SHUFFLE(2, 3, 0, 1))); + __m128 const mul3 = _mm_mul_ps(q1.Data, q2.Data); + +# if GLM_ARCH & GLM_ARCH_SSE41_BIT + __m128 const add0 = _mm_dp_ps(mul0, _mm_set_ps(1.0f, -1.0f, 1.0f, 1.0f), 0xff); + __m128 const add1 = _mm_dp_ps(mul1, _mm_set_ps(1.0f, 1.0f, 1.0f, -1.0f), 0xff); + __m128 const add2 = _mm_dp_ps(mul2, _mm_set_ps(1.0f, 1.0f, -1.0f, 1.0f), 0xff); + __m128 const add3 = _mm_dp_ps(mul3, _mm_set_ps(1.0f, -1.0f, -1.0f, -1.0f), 0xff); +# else + __m128 const mul4 = _mm_mul_ps(mul0, _mm_set_ps(1.0f, -1.0f, 1.0f, 1.0f)); + __m128 const add0 = _mm_add_ps(mul0, _mm_movehl_ps(mul4, mul4)); + __m128 const add4 = _mm_add_ss(add0, _mm_shuffle_ps(add0, add0, 1)); + + __m128 const mul5 = _mm_mul_ps(mul1, _mm_set_ps(1.0f, 1.0f, 1.0f, -1.0f)); + __m128 const add1 = _mm_add_ps(mul1, _mm_movehl_ps(mul5, mul5)); + __m128 const add5 = _mm_add_ss(add1, _mm_shuffle_ps(add1, add1, 1)); + + __m128 const mul6 = _mm_mul_ps(mul2, _mm_set_ps(1.0f, 1.0f, -1.0f, 1.0f)); + __m128 const add2 = _mm_add_ps(mul6, _mm_movehl_ps(mul6, mul6)); + __m128 const add6 = _mm_add_ss(add2, _mm_shuffle_ps(add2, add2, 1)); + + __m128 const mul7 = _mm_mul_ps(mul3, _mm_set_ps(1.0f, -1.0f, -1.0f, -1.0f)); + __m128 const add3 = _mm_add_ps(mul3, _mm_movehl_ps(mul7, mul7)); + __m128 const add7 = _mm_add_ss(add3, _mm_shuffle_ps(add3, add3, 1)); + #endif + + // This SIMD code is a politically correct way of doing this, but in every test I've tried it has been slower than + // the final code below. I'll keep this here for reference - maybe somebody else can do something better... + // + //__m128 xxyy = _mm_shuffle_ps(add4, add5, _MM_SHUFFLE(0, 0, 0, 0)); + //__m128 zzww = _mm_shuffle_ps(add6, add7, _MM_SHUFFLE(0, 0, 0, 0)); + // + //return _mm_shuffle_ps(xxyy, zzww, _MM_SHUFFLE(2, 0, 2, 0)); + + tquat<float, P> Result(uninitialize); + _mm_store_ss(&Result.x, add4); + _mm_store_ss(&Result.y, add5); + _mm_store_ss(&Result.z, add6); + _mm_store_ss(&Result.w, add7); + return Result; + } + }; +*/ + + template <precision P> + struct compute_dot<tquat, float, P, true> + { + static GLM_FUNC_QUALIFIER float call(tquat<float, P> const& x, tquat<float, P> const& y) + { + return _mm_cvtss_f32(glm_vec1_dot(x.data, y.data)); + } + }; + + template <precision P> + struct compute_quat_add<float, P, true> + { + static tquat<float, P> call(tquat<float, P> const& q, tquat<float, P> const& p) + { + tquat<float, P> Result(uninitialize); + Result.data = _mm_add_ps(q.data, p.data); + return Result; + } + }; + +# if GLM_ARCH & GLM_ARCH_AVX_BIT + template <precision P> + struct compute_quat_add<double, P, true> + { + static tquat<double, P> call(tquat<double, P> const & a, tquat<double, P> const & b) + { + tquat<double, P> Result(uninitialize); + Result.data = _mm256_add_pd(a.data, b.data); + return Result; + } + }; +# endif + + template <precision P> + struct compute_quat_sub<float, P, true> + { + static tquat<float, P> call(tquat<float, P> const& q, tquat<float, P> const& p) + { + tvec4<float, P> Result(uninitialize); + Result.data = _mm_sub_ps(q.data, p.data); + return Result; + } + }; + +# if GLM_ARCH & GLM_ARCH_AVX_BIT + template <precision P> + struct compute_quat_sub<double, P, true> + { + static tquat<double, P> call(tquat<double, P> const & a, tquat<double, P> const & b) + { + tquat<double, P> Result(uninitialize); + Result.data = _mm256_sub_pd(a.data, b.data); + return Result; + } + }; +# endif + + template <precision P> + struct compute_quat_mul_scalar<float, P, true> + { + static tquat<float, P> call(tquat<float, P> const& q, float s) + { + tvec4<float, P> Result(uninitialize); + Result.data = _mm_mul_ps(q.data, _mm_set_ps1(s)); + return Result; + } + }; + +# if GLM_ARCH & GLM_ARCH_AVX_BIT + template <precision P> + struct compute_quat_mul_scalar<double, P, true> + { + static tquat<double, P> call(tquat<double, P> const& q, double s) + { + tquat<double, P> Result(uninitialize); + Result.data = _mm256_mul_pd(q.data, _mm_set_ps1(s)); + return Result; + } + }; +# endif + + template <precision P> + struct compute_quat_div_scalar<float, P, true> + { + static tquat<float, P> call(tquat<float, P> const& q, float s) + { + tvec4<float, P> Result(uninitialize); + Result.data = _mm_div_ps(q.data, _mm_set_ps1(s)); + return Result; + } + }; + +# if GLM_ARCH & GLM_ARCH_AVX_BIT + template <precision P> + struct compute_quat_div_scalar<double, P, true> + { + static tquat<double, P> call(tquat<double, P> const& q, double s) + { + tquat<double, P> Result(uninitialize); + Result.data = _mm256_div_pd(q.data, _mm_set_ps1(s)); + return Result; + } + }; +# endif + + template <precision P> + struct compute_quat_mul_vec4<float, P, true> + { + static tvec4<float, P> call(tquat<float, P> const& q, tvec4<float, P> const& v) + { + __m128 const q_wwww = _mm_shuffle_ps(q.data, q.data, _MM_SHUFFLE(3, 3, 3, 3)); + __m128 const q_swp0 = _mm_shuffle_ps(q.data, q.data, _MM_SHUFFLE(3, 0, 2, 1)); + __m128 const q_swp1 = _mm_shuffle_ps(q.data, q.data, _MM_SHUFFLE(3, 1, 0, 2)); + __m128 const v_swp0 = _mm_shuffle_ps(v.data, v.data, _MM_SHUFFLE(3, 0, 2, 1)); + __m128 const v_swp1 = _mm_shuffle_ps(v.data, v.data, _MM_SHUFFLE(3, 1, 0, 2)); + + __m128 uv = _mm_sub_ps(_mm_mul_ps(q_swp0, v_swp1), _mm_mul_ps(q_swp1, v_swp0)); + __m128 uv_swp0 = _mm_shuffle_ps(uv, uv, _MM_SHUFFLE(3, 0, 2, 1)); + __m128 uv_swp1 = _mm_shuffle_ps(uv, uv, _MM_SHUFFLE(3, 1, 0, 2)); + __m128 uuv = _mm_sub_ps(_mm_mul_ps(q_swp0, uv_swp1), _mm_mul_ps(q_swp1, uv_swp0)); + + __m128 const two = _mm_set1_ps(2.0f); + uv = _mm_mul_ps(uv, _mm_mul_ps(q_wwww, two)); + uuv = _mm_mul_ps(uuv, two); + + tvec4<float, P> Result(uninitialize); + Result.data = _mm_add_ps(v.Data, _mm_add_ps(uv, uuv)); + return Result; + } + }; +}//namespace detail +}//namespace glm + +#endif//GLM_ARCH & GLM_ARCH_SSE2_BIT + diff --git a/3rdparty/glm/glm/gtc/random.hpp b/3rdparty/glm/glm/gtc/random.hpp index 7e77202e4b5..fa3956e52c5 100644 --- a/3rdparty/glm/glm/gtc/random.hpp +++ b/3rdparty/glm/glm/gtc/random.hpp @@ -1,33 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_random /// @file glm/gtc/random.hpp -/// @date 2011-09-18 / 2011-09-18 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtc_half_float (dependence) @@ -35,11 +7,10 @@ /// /// @defgroup gtc_random GLM_GTC_random /// @ingroup gtc -/// +/// /// @brief Generate random number from various distribution methods. -/// +/// /// <glm/gtc/random.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -47,7 +18,7 @@ #include "../vec2.hpp" #include "../vec3.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_random extension included") #endif diff --git a/3rdparty/glm/glm/gtc/random.inl b/3rdparty/glm/glm/gtc/random.inl index d299af2f941..7dc5e83625c 100644 --- a/3rdparty/glm/glm/gtc/random.inl +++ b/3rdparty/glm/glm/gtc/random.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_random /// @file glm/gtc/random.inl -/// @date 2011-09-19 / 2012-04-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #include "../geometric.hpp" #include "../exponential.hpp" diff --git a/3rdparty/glm/glm/gtc/reciprocal.hpp b/3rdparty/glm/glm/gtc/reciprocal.hpp index 916dfb40999..c14a4fece42 100644 --- a/3rdparty/glm/glm/gtc/reciprocal.hpp +++ b/3rdparty/glm/glm/gtc/reciprocal.hpp @@ -1,50 +1,21 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_reciprocal /// @file glm/gtc/reciprocal.hpp -/// @date 2008-10-09 / 2012-01-25 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtc_reciprocal GLM_GTC_reciprocal /// @ingroup gtc -/// +/// /// @brief Define secant, cosecant and cotangent functions. -/// +/// /// <glm/gtc/reciprocal.hpp> need to be included to use these features. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependencies #include "../detail/setup.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_reciprocal extension included") #endif @@ -53,16 +24,16 @@ namespace glm /// @addtogroup gtc_reciprocal /// @{ - /// Secant function. + /// Secant function. /// hypotenuse / adjacent or 1 / cos(x) /// /// @tparam genType Floating-point scalar or vector types. /// /// @see gtc_reciprocal - template <typename genType> + template <typename genType> GLM_FUNC_DECL genType sec(genType angle); - /// Cosecant function. + /// Cosecant function. /// hypotenuse / opposite or 1 / sin(x) /// /// @tparam genType Floating-point scalar or vector types. @@ -71,91 +42,91 @@ namespace glm template <typename genType> GLM_FUNC_DECL genType csc(genType angle); - /// Cotangent function. + /// Cotangent function. /// adjacent / opposite or 1 / tan(x) /// /// @tparam genType Floating-point scalar or vector types. /// /// @see gtc_reciprocal - template <typename genType> + template <typename genType> GLM_FUNC_DECL genType cot(genType angle); - /// Inverse secant function. + /// Inverse secant function. /// /// @return Return an angle expressed in radians. /// @tparam genType Floating-point scalar or vector types. /// /// @see gtc_reciprocal - template <typename genType> + template <typename genType> GLM_FUNC_DECL genType asec(genType x); - /// Inverse cosecant function. + /// Inverse cosecant function. /// /// @return Return an angle expressed in radians. /// @tparam genType Floating-point scalar or vector types. /// /// @see gtc_reciprocal - template <typename genType> + template <typename genType> GLM_FUNC_DECL genType acsc(genType x); - /// Inverse cotangent function. + /// Inverse cotangent function. /// /// @return Return an angle expressed in radians. /// @tparam genType Floating-point scalar or vector types. /// /// @see gtc_reciprocal - template <typename genType> + template <typename genType> GLM_FUNC_DECL genType acot(genType x); - /// Secant hyperbolic function. + /// Secant hyperbolic function. /// /// @tparam genType Floating-point scalar or vector types. /// /// @see gtc_reciprocal - template <typename genType> + template <typename genType> GLM_FUNC_DECL genType sech(genType angle); - /// Cosecant hyperbolic function. + /// Cosecant hyperbolic function. /// /// @tparam genType Floating-point scalar or vector types. /// /// @see gtc_reciprocal - template <typename genType> + template <typename genType> GLM_FUNC_DECL genType csch(genType angle); - /// Cotangent hyperbolic function. + /// Cotangent hyperbolic function. /// /// @tparam genType Floating-point scalar or vector types. /// /// @see gtc_reciprocal - template <typename genType> + template <typename genType> GLM_FUNC_DECL genType coth(genType angle); - /// Inverse secant hyperbolic function. + /// Inverse secant hyperbolic function. /// /// @return Return an angle expressed in radians. /// @tparam genType Floating-point scalar or vector types. /// /// @see gtc_reciprocal - template <typename genType> + template <typename genType> GLM_FUNC_DECL genType asech(genType x); - /// Inverse cosecant hyperbolic function. + /// Inverse cosecant hyperbolic function. /// /// @return Return an angle expressed in radians. /// @tparam genType Floating-point scalar or vector types. /// /// @see gtc_reciprocal - template <typename genType> + template <typename genType> GLM_FUNC_DECL genType acsch(genType x); - /// Inverse cotangent hyperbolic function. + /// Inverse cotangent hyperbolic function. /// /// @return Return an angle expressed in radians. /// @tparam genType Floating-point scalar or vector types. /// /// @see gtc_reciprocal - template <typename genType> + template <typename genType> GLM_FUNC_DECL genType acoth(genType x); /// @} diff --git a/3rdparty/glm/glm/gtc/reciprocal.inl b/3rdparty/glm/glm/gtc/reciprocal.inl index b86c347b7f0..c625ac90bda 100644 --- a/3rdparty/glm/glm/gtc/reciprocal.inl +++ b/3rdparty/glm/glm/gtc/reciprocal.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_reciprocal /// @file glm/gtc/reciprocal.inl -/// @date 2008-10-09 / 2012-04-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #include "../trigonometric.hpp" #include <limits> diff --git a/3rdparty/glm/glm/gtc/round.hpp b/3rdparty/glm/glm/gtc/round.hpp index 270849e7d78..a583592181b 100644 --- a/3rdparty/glm/glm/gtc/round.hpp +++ b/3rdparty/glm/glm/gtc/round.hpp @@ -1,44 +1,15 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_round /// @file glm/gtc/round.hpp -/// @date 2014-11-03 / 2014-11-03 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtc_round (dependence) /// /// @defgroup gtc_round GLM_GTC_round /// @ingroup gtc -/// +/// /// @brief rounding value to specific boundings -/// +/// /// <glm/gtc/round.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -50,7 +21,7 @@ #include "../common.hpp" #include <limits> -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_integer extension included") #endif diff --git a/3rdparty/glm/glm/gtc/round.inl b/3rdparty/glm/glm/gtc/round.inl index 988c64a197f..f583c403573 100644 --- a/3rdparty/glm/glm/gtc/round.inl +++ b/3rdparty/glm/glm/gtc/round.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_round /// @file glm/gtc/round.inl -/// @date 2014-11-03 / 2014-11-03 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #include "../detail/func_integer.hpp" diff --git a/3rdparty/glm/glm/gtc/type_aligned.hpp b/3rdparty/glm/glm/gtc/type_aligned.hpp new file mode 100644 index 00000000000..2e4503c3a81 --- /dev/null +++ b/3rdparty/glm/glm/gtc/type_aligned.hpp @@ -0,0 +1,362 @@ +/// @ref gtc_type_aligned +/// @file glm/gtc/type_aligned.hpp +/// +/// @see core (dependence) +/// +/// @defgroup gtc_type_aligned GLM_GTC_type_aligned +/// @ingroup gtc +/// +/// @brief Aligned types. +/// <glm/gtc/type_aligned.hpp> need to be included to use these features. + +#pragma once + +#if !GLM_HAS_ALIGNED_TYPE +# error "GLM: Aligned types are not supported on this platform" +#endif +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) +# pragma message("GLM: GLM_GTC_type_aligned extension included") +#endif + +#include "../vec2.hpp" +#include "../vec3.hpp" +#include "../vec4.hpp" +#include "../gtc/vec1.hpp" + +namespace glm +{ + template <typename T, precision P> struct tvec1; + template <typename T, precision P> struct tvec2; + template <typename T, precision P> struct tvec3; + template <typename T, precision P> struct tvec4; + /// @addtogroup gtc_type_aligned + /// @{ + + // -- *vec1 -- + + typedef tvec1<float, aligned_highp> aligned_highp_vec1; + typedef tvec1<float, aligned_mediump> aligned_mediump_vec1; + typedef tvec1<float, aligned_lowp> aligned_lowp_vec1; + typedef tvec1<double, aligned_highp> aligned_highp_dvec1; + typedef tvec1<double, aligned_mediump> aligned_mediump_dvec1; + typedef tvec1<double, aligned_lowp> aligned_lowp_dvec1; + typedef tvec1<int, aligned_highp> aligned_highp_ivec1; + typedef tvec1<int, aligned_mediump> aligned_mediump_ivec1; + typedef tvec1<int, aligned_lowp> aligned_lowp_ivec1; + typedef tvec1<uint, aligned_highp> aligned_highp_uvec1; + typedef tvec1<uint, aligned_mediump> aligned_mediump_uvec1; + typedef tvec1<uint, aligned_lowp> aligned_lowp_uvec1; + typedef tvec1<bool, aligned_highp> aligned_highp_bvec1; + typedef tvec1<bool, aligned_mediump> aligned_mediump_bvec1; + typedef tvec1<bool, aligned_lowp> aligned_lowp_bvec1; + + typedef tvec1<float, packed_highp> packed_highp_vec1; + typedef tvec1<float, packed_mediump> packed_mediump_vec1; + typedef tvec1<float, packed_lowp> packed_lowp_vec1; + typedef tvec1<double, packed_highp> packed_highp_dvec1; + typedef tvec1<double, packed_mediump> packed_mediump_dvec1; + typedef tvec1<double, packed_lowp> packed_lowp_dvec1; + typedef tvec1<int, packed_highp> packed_highp_ivec1; + typedef tvec1<int, packed_mediump> packed_mediump_ivec1; + typedef tvec1<int, packed_lowp> packed_lowp_ivec1; + typedef tvec1<uint, packed_highp> packed_highp_uvec1; + typedef tvec1<uint, packed_mediump> packed_mediump_uvec1; + typedef tvec1<uint, packed_lowp> packed_lowp_uvec1; + typedef tvec1<bool, packed_highp> packed_highp_bvec1; + typedef tvec1<bool, packed_mediump> packed_mediump_bvec1; + typedef tvec1<bool, packed_lowp> packed_lowp_bvec1; + + // -- *vec2 -- + + /// 2 components vector of high single-precision floating-point numbers. + /// There is no guarantee on the actual precision. + typedef tvec2<float, aligned_highp> aligned_highp_vec2; + + /// 2 components vector of medium single-precision floating-point numbers. + /// There is no guarantee on the actual precision. + typedef tvec2<float, aligned_mediump> aligned_mediump_vec2; + + /// 2 components vector of low single-precision floating-point numbers. + /// There is no guarantee on the actual precision. + typedef tvec2<float, aligned_lowp> aligned_lowp_vec2; + + /// 2 components vector of high double-precision floating-point numbers. + /// There is no guarantee on the actual precision. + typedef tvec2<double, aligned_highp> aligned_highp_dvec2; + + /// 2 components vector of medium double-precision floating-point numbers. + /// There is no guarantee on the actual precision. + typedef tvec2<double, aligned_mediump> aligned_mediump_dvec2; + + /// 2 components vector of low double-precision floating-point numbers. + /// There is no guarantee on the actual precision. + typedef tvec2<double, aligned_lowp> aligned_lowp_dvec2; + + /// 2 components vector of high precision signed integer numbers. + /// There is no guarantee on the actual precision. + typedef tvec2<int, aligned_highp> aligned_highp_ivec2; + + /// 2 components vector of medium precision signed integer numbers. + /// There is no guarantee on the actual precision. + typedef tvec2<int, aligned_mediump> aligned_mediump_ivec2; + + /// 2 components vector of low precision signed integer numbers. + /// There is no guarantee on the actual precision. + typedef tvec2<int, aligned_lowp> aligned_lowp_ivec2; + + /// 2 components vector of high precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + typedef tvec2<uint, aligned_highp> aligned_highp_uvec2; + + /// 2 components vector of medium precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + typedef tvec2<uint, aligned_mediump> aligned_mediump_uvec2; + + /// 2 components vector of low precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + typedef tvec2<uint, aligned_lowp> aligned_lowp_uvec2; + + /// 2 components vector of high precision bool numbers. + /// There is no guarantee on the actual precision. + typedef tvec2<bool, aligned_highp> aligned_highp_bvec2; + + /// 2 components vector of medium precision bool numbers. + /// There is no guarantee on the actual precision. + typedef tvec2<bool, aligned_mediump> aligned_mediump_bvec2; + + /// 2 components vector of low precision bool numbers. + /// There is no guarantee on the actual precision. + typedef tvec2<bool, aligned_lowp> aligned_lowp_bvec2; + + // -- *vec3 -- + + /// 3 components vector of high single-precision floating-point numbers. + /// There is no guarantee on the actual precision. + typedef tvec3<float, aligned_highp> aligned_highp_vec3; + + /// 3 components vector of medium single-precision floating-point numbers. + /// There is no guarantee on the actual precision. + typedef tvec3<float, aligned_mediump> aligned_mediump_vec3; + + /// 3 components vector of low single-precision floating-point numbers. + /// There is no guarantee on the actual precision. + typedef tvec3<float, aligned_lowp> aligned_lowp_vec3; + + /// 3 components vector of high double-precision floating-point numbers. + /// There is no guarantee on the actual precision. + typedef tvec3<double, aligned_highp> aligned_highp_dvec3; + + /// 3 components vector of medium double-precision floating-point numbers. + /// There is no guarantee on the actual precision. + typedef tvec3<double, aligned_mediump> aligned_mediump_dvec3; + + /// 3 components vector of low double-precision floating-point numbers. + /// There is no guarantee on the actual precision. + typedef tvec3<double, aligned_lowp> aligned_lowp_dvec3; + + /// 3 components vector of high precision signed integer numbers. + /// There is no guarantee on the actual precision. + typedef tvec3<int, aligned_highp> aligned_highp_ivec3; + + /// 3 components vector of medium precision signed integer numbers. + /// There is no guarantee on the actual precision. + typedef tvec3<int, aligned_mediump> aligned_mediump_ivec3; + + /// 3 components vector of low precision signed integer numbers. + /// There is no guarantee on the actual precision. + typedef tvec3<int, aligned_lowp> aligned_lowp_ivec3; + + /// 3 components vector of high precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + typedef tvec3<uint, aligned_highp> aligned_highp_uvec3; + + /// 3 components vector of medium precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + typedef tvec3<uint, aligned_mediump> aligned_mediump_uvec3; + + /// 3 components vector of low precision unsigned integer numbers. + /// There is no guarantee on the actual precision. + typedef tvec3<uint, aligned_lowp> aligned_lowp_uvec3; + + /// 3 components vector of high precision bool numbers. + typedef tvec3<bool, aligned_highp> aligned_highp_bvec3; + + /// 3 components vector of medium precision bool numbers. + typedef tvec3<bool, aligned_mediump> aligned_mediump_bvec3; + + /// 3 components vector of low precision bool numbers. + typedef tvec3<bool, aligned_lowp> aligned_lowp_bvec3; + + // -- *vec4 -- + + /// 4 components vector of high single-precision floating-point numbers. + typedef tvec4<float, aligned_highp> aligned_highp_vec4; + + /// 4 components vector of medium single-precision floating-point numbers. + typedef tvec4<float, aligned_mediump> aligned_mediump_vec4; + + /// 4 components vector of low single-precision floating-point numbers. + typedef tvec4<float, aligned_lowp> aligned_lowp_vec4; + + /// 4 components vector of high double-precision floating-point numbers. + typedef tvec4<double, aligned_highp> aligned_highp_dvec4; + + /// 4 components vector of medium double-precision floating-point numbers. + typedef tvec4<double, aligned_mediump> aligned_mediump_dvec4; + + /// 4 components vector of low double-precision floating-point numbers. + typedef tvec4<double, aligned_lowp> aligned_lowp_dvec4; + + /// 4 components vector of high precision signed integer numbers. + typedef tvec4<int, aligned_highp> aligned_highp_ivec4; + + /// 4 components vector of medium precision signed integer numbers. + typedef tvec4<int, aligned_mediump> aligned_mediump_ivec4; + + /// 4 components vector of low precision signed integer numbers. + typedef tvec4<int, aligned_lowp> aligned_lowp_ivec4; + + /// 4 components vector of high precision unsigned integer numbers. + typedef tvec4<uint, aligned_highp> aligned_highp_uvec4; + + /// 4 components vector of medium precision unsigned integer numbers. + typedef tvec4<uint, aligned_mediump> aligned_mediump_uvec4; + + /// 4 components vector of low precision unsigned integer numbers. + typedef tvec4<uint, aligned_lowp> aligned_lowp_uvec4; + + /// 4 components vector of high precision bool numbers. + typedef tvec4<bool, aligned_highp> aligned_highp_bvec4; + + /// 4 components vector of medium precision bool numbers. + typedef tvec4<bool, aligned_mediump> aligned_mediump_bvec4; + + /// 4 components vector of low precision bool numbers. + typedef tvec4<bool, aligned_lowp> aligned_lowp_bvec4; + + // -- default -- + +#if(defined(GLM_PRECISION_LOWP_FLOAT)) + typedef aligned_lowp_vec1 aligned_vec1; + typedef aligned_lowp_vec2 aligned_vec2; + typedef aligned_lowp_vec3 aligned_vec3; + typedef aligned_lowp_vec4 aligned_vec4; +#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT)) + typedef aligned_mediump_vec1 aligned_vec1; + typedef aligned_mediump_vec2 aligned_vec2; + typedef aligned_mediump_vec3 aligned_vec3; + typedef aligned_mediump_vec4 aligned_vec4; +#else //defined(GLM_PRECISION_HIGHP_FLOAT) + /// 1 component vector of floating-point numbers. + typedef aligned_highp_vec1 aligned_vec1; + + /// 2 components vector of floating-point numbers. + typedef aligned_highp_vec2 aligned_vec2; + + /// 3 components vector of floating-point numbers. + typedef aligned_highp_vec3 aligned_vec3; + + /// 4 components vector of floating-point numbers. + typedef aligned_highp_vec4 aligned_vec4; +#endif//GLM_PRECISION + +#if(defined(GLM_PRECISION_LOWP_DOUBLE)) + typedef aligned_lowp_dvec1 aligned_dvec1; + typedef aligned_lowp_dvec2 aligned_dvec2; + typedef aligned_lowp_dvec3 aligned_dvec3; + typedef aligned_lowp_dvec4 aligned_dvec4; +#elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE)) + typedef aligned_mediump_dvec1 aligned_dvec1; + typedef aligned_mediump_dvec2 aligned_dvec2; + typedef aligned_mediump_dvec3 aligned_dvec3; + typedef aligned_mediump_dvec4 aligned_dvec4; +#else //defined(GLM_PRECISION_HIGHP_DOUBLE) + /// 1 component vector of double-precision floating-point numbers. + typedef aligned_highp_dvec1 aligned_dvec1; + + /// 2 components vector of double-precision floating-point numbers. + typedef aligned_highp_dvec2 aligned_dvec2; + + /// 3 components vector of double-precision floating-point numbers. + typedef aligned_highp_dvec3 aligned_dvec3; + + /// 4 components vector of double-precision floating-point numbers. + typedef aligned_highp_dvec4 aligned_dvec4; +#endif//GLM_PRECISION + +#if(defined(GLM_PRECISION_LOWP_INT)) + typedef aligned_lowp_ivec1 aligned_ivec1; + typedef aligned_lowp_ivec2 aligned_ivec2; + typedef aligned_lowp_ivec3 aligned_ivec3; + typedef aligned_lowp_ivec4 aligned_ivec4; +#elif(defined(GLM_PRECISION_MEDIUMP_INT)) + typedef aligned_mediump_ivec1 aligned_ivec1; + typedef aligned_mediump_ivec2 aligned_ivec2; + typedef aligned_mediump_ivec3 aligned_ivec3; + typedef aligned_mediump_ivec4 aligned_ivec4; +#else //defined(GLM_PRECISION_HIGHP_INT) + /// 1 component vector of signed integer numbers. + typedef aligned_highp_ivec1 aligned_ivec1; + + /// 2 components vector of signed integer numbers. + typedef aligned_highp_ivec2 aligned_ivec2; + + /// 3 components vector of signed integer numbers. + typedef aligned_highp_ivec3 aligned_ivec3; + + /// 4 components vector of signed integer numbers. + typedef aligned_highp_ivec4 aligned_ivec4; +#endif//GLM_PRECISION + + // -- Unsigned integer definition -- + +#if(defined(GLM_PRECISION_LOWP_UINT)) + typedef aligned_lowp_uvec1 aligned_uvec1; + typedef aligned_lowp_uvec2 aligned_uvec2; + typedef aligned_lowp_uvec3 aligned_uvec3; + typedef aligned_lowp_uvec4 aligned_uvec4; +#elif(defined(GLM_PRECISION_MEDIUMP_UINT)) + typedef aligned_mediump_uvec1 aligned_uvec1; + typedef aligned_mediump_uvec2 aligned_uvec2; + typedef aligned_mediump_uvec3 aligned_uvec3; + typedef aligned_mediump_uvec4 aligned_uvec4; +#else //defined(GLM_PRECISION_HIGHP_UINT) + /// 1 component vector of unsigned integer numbers. + typedef aligned_highp_uvec1 aligned_uvec1; + + /// 2 components vector of unsigned integer numbers. + typedef aligned_highp_uvec2 aligned_uvec2; + + /// 3 components vector of unsigned integer numbers. + typedef aligned_highp_uvec3 aligned_uvec3; + + /// 4 components vector of unsigned integer numbers. + typedef aligned_highp_uvec4 aligned_uvec4; +#endif//GLM_PRECISION + +#if(defined(GLM_PRECISION_LOWP_BOOL)) + typedef aligned_lowp_bvec1 aligned_bvec1; + typedef aligned_lowp_bvec2 aligned_bvec2; + typedef aligned_lowp_bvec3 aligned_bvec3; + typedef aligned_lowp_bvec4 aligned_bvec4; +#elif(defined(GLM_PRECISION_MEDIUMP_BOOL)) + typedef aligned_mediump_bvec1 aligned_bvec1; + typedef aligned_mediump_bvec2 aligned_bvec2; + typedef aligned_mediump_bvec3 aligned_bvec3; + typedef aligned_mediump_bvec4 aligned_bvec4; +#else //defined(GLM_PRECISION_HIGHP_BOOL) + /// 1 component vector of boolean. + typedef aligned_highp_bvec1 aligned_bvec1; + + /// 2 components vector of boolean. + typedef aligned_highp_bvec2 aligned_bvec2; + + /// 3 components vector of boolean. + typedef aligned_highp_bvec3 aligned_bvec3; + + /// 4 components vector of boolean. + typedef aligned_highp_bvec4 aligned_bvec4; +#endif//GLM_PRECISION + + /// @} +}//namespace glm diff --git a/3rdparty/glm/glm/gtc/type_precision.hpp b/3rdparty/glm/glm/gtc/type_precision.hpp index 4716af8c7c8..a2dbb66a003 100644 --- a/3rdparty/glm/glm/gtc/type_precision.hpp +++ b/3rdparty/glm/glm/gtc/type_precision.hpp @@ -1,48 +1,19 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_type_precision /// @file glm/gtc/type_precision.hpp -/// @date 2009-06-04 / 2011-12-07 -/// @author Christophe Riccio -/// +/// /// @see core (dependence) /// @see gtc_half_float (dependence) /// @see gtc_quaternion (dependence) -/// +/// /// @defgroup gtc_type_precision GLM_GTC_type_precision /// @ingroup gtc -/// +/// /// @brief Defines specific C++-based precision types. /// /// @ref core_precision defines types based on GLSL's precision qualifiers. This /// extension defines types based on explicitly-sized C++ data types. -/// +/// /// <glm/gtc/type_precision.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -62,7 +33,7 @@ #include "../mat4x3.hpp" #include "../mat4x4.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_type_precision extension included") #endif diff --git a/3rdparty/glm/glm/gtc/type_precision.inl b/3rdparty/glm/glm/gtc/type_precision.inl index 0107db83ecd..cbfd4d859e2 100644 --- a/3rdparty/glm/glm/gtc/type_precision.inl +++ b/3rdparty/glm/glm/gtc/type_precision.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_swizzle /// @file glm/gtc/swizzle.inl -/// @date 2009-06-14 / 2011-06-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtc/type_ptr.hpp b/3rdparty/glm/glm/gtc/type_ptr.hpp index 302d8273369..008665e2c6a 100644 --- a/3rdparty/glm/glm/gtc/type_ptr.hpp +++ b/3rdparty/glm/glm/gtc/type_ptr.hpp @@ -1,33 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_type_ptr /// @file glm/gtc/type_ptr.hpp -/// @date 2009-05-06 / 2011-06-05 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtc_half_float (dependence) @@ -37,7 +9,7 @@ /// @ingroup gtc /// /// @brief Handles the interaction between pointers and vector, matrix types. -/// +/// /// This extension defines an overloaded function, glm::value_ptr, which /// takes any of the \ref core_template "core template types". It returns /// a pointer to the memory layout of the object. Matrix types store their values @@ -49,16 +21,15 @@ /// @code /// #include <glm/glm.hpp> /// #include <glm/gtc/type_ptr.hpp> -/// +/// /// glm::vec3 aVector(3); /// glm::mat4 someMatrix(1.0); -/// +/// /// glUniform3fv(uniformLoc, 1, glm::value_ptr(aVector)); /// glUniformMatrix4fv(uniformMatrixLoc, 1, GL_FALSE, glm::value_ptr(someMatrix)); /// @endcode -/// +/// /// <glm/gtc/type_ptr.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -78,7 +49,7 @@ #include "../mat4x4.hpp" #include <cstring> -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_type_ptr extension included") #endif diff --git a/3rdparty/glm/glm/gtc/type_ptr.inl b/3rdparty/glm/glm/gtc/type_ptr.inl index 0e1cd312c7b..3aa6ae6cc70 100644 --- a/3rdparty/glm/glm/gtc/type_ptr.inl +++ b/3rdparty/glm/glm/gtc/type_ptr.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_type_ptr /// @file glm/gtc/type_ptr.inl -/// @date 2011-06-15 / 2011-12-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #include <cstring> diff --git a/3rdparty/glm/glm/gtc/ulp.hpp b/3rdparty/glm/glm/gtc/ulp.hpp index b0f8859dac9..a82fa4e73fa 100644 --- a/3rdparty/glm/glm/gtc/ulp.hpp +++ b/3rdparty/glm/glm/gtc/ulp.hpp @@ -1,44 +1,15 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_ulp /// @file glm/gtc/ulp.hpp -/// @date 2011-02-21 / 2011-12-12 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtc_ulp GLM_GTC_ulp /// @ingroup gtc -/// +/// /// @brief Allow the measurement of the accuracy of a function against a reference /// implementation. This extension works on floating-point data and provide results /// in ULP. /// <glm/gtc/ulp.hpp> need to be included to use these features. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -47,7 +18,7 @@ #include "../detail/precision.hpp" #include "../detail/type_int.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_ulp extension included") #endif diff --git a/3rdparty/glm/glm/gtc/ulp.inl b/3rdparty/glm/glm/gtc/ulp.inl index e5db24f9bb0..54c914ab60f 100644 --- a/3rdparty/glm/glm/gtc/ulp.inl +++ b/3rdparty/glm/glm/gtc/ulp.inl @@ -1,41 +1,12 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_ulp /// @file glm/gtc/ulp.inl -/// @date 2011-03-07 / 2012-04-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// +/// /// Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. /// /// Developed at SunPro, a Sun Microsystems, Inc. business. /// Permission to use, copy, modify, and distribute this /// software is freely granted, provided that this notice /// is preserved. -/////////////////////////////////////////////////////////////////////////////////// #include "../detail/type_int.hpp" #include <cmath> diff --git a/3rdparty/glm/glm/gtc/vec1.hpp b/3rdparty/glm/glm/gtc/vec1.hpp index fefcbb1fb91..f84ff97ce71 100644 --- a/3rdparty/glm/glm/gtc/vec1.hpp +++ b/3rdparty/glm/glm/gtc/vec1.hpp @@ -1,33 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_vec1 /// @file glm/gtc/vec1.hpp -/// @date 2010-02-08 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @@ -36,7 +8,6 @@ /// /// @brief Add vec1, ivec1, uvec1 and bvec1 types. /// <glm/gtc/vec1.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -44,7 +15,7 @@ #include "../glm.hpp" #include "../detail/type_vec1.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_vec1 extension included") #endif diff --git a/3rdparty/glm/glm/gtc/vec1.inl b/3rdparty/glm/glm/gtc/vec1.inl index 4a7c88dc591..5a6627c1725 100644 --- a/3rdparty/glm/glm/gtc/vec1.inl +++ b/3rdparty/glm/glm/gtc/vec1.inl @@ -1,31 +1,2 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_vec1 /// @file glm/gtc/vec1.inl -/// @date 2013-03-16 / 2013-03-16 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// diff --git a/3rdparty/glm/glm/gtx/associated_min_max.hpp b/3rdparty/glm/glm/gtx/associated_min_max.hpp index 84c132224b6..eb9d7210513 100644 --- a/3rdparty/glm/glm/gtx/associated_min_max.hpp +++ b/3rdparty/glm/glm/gtx/associated_min_max.hpp @@ -1,33 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_associated_min_max /// @file glm/gtx/associated_min_max.hpp -/// @date 2008-03-10 / 2014-10-11 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtx_extented_min_max (dependence) @@ -37,14 +9,13 @@ /// /// @brief Min and max functions that return associated values not the compared onces. /// <glm/gtx/associated_min_max.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_associated_min_max extension included") #endif diff --git a/3rdparty/glm/glm/gtx/associated_min_max.inl b/3rdparty/glm/glm/gtx/associated_min_max.inl index f2a63f8f444..6a57d480dbb 100644 --- a/3rdparty/glm/glm/gtx/associated_min_max.inl +++ b/3rdparty/glm/glm/gtx/associated_min_max.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_associated_min_max /// @file glm/gtx/associated_min_max.inl -/// @date 2008-03-10 / 2014-10-11 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////////////////////// namespace glm{ diff --git a/3rdparty/glm/glm/gtx/bit.hpp b/3rdparty/glm/glm/gtx/bit.hpp index 126fc2232b4..17378f35c15 100644 --- a/3rdparty/glm/glm/gtx/bit.hpp +++ b/3rdparty/glm/glm/gtx/bit.hpp @@ -1,33 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_bit /// @file glm/gtx/bit.hpp -/// @date 2007-03-14 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtc_half_float (dependence) @@ -38,14 +10,13 @@ /// @brief Allow to perform bit operations on integer values /// /// <glm/gtx/bit.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependencies #include "../gtc/bitfield.hpp" -#if(defined(GLM_MESSAGES)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_bit extension is deprecated, include GLM_GTC_bitfield and GLM_GTC_integer instead") #endif @@ -58,6 +29,10 @@ namespace glm template <typename genIUType> GLM_FUNC_DECL genIUType highestBitValue(genIUType Value); + /// @see gtx_bit + template <typename genIUType> + GLM_FUNC_DECL genIUType lowestBitValue(genIUType Value); + /// Find the highest bit set to 1 in a integer variable and return its value. /// /// @see gtx_bit diff --git a/3rdparty/glm/glm/gtx/bit.inl b/3rdparty/glm/glm/gtx/bit.inl index 5178a123e28..10d5f7fa020 100644 --- a/3rdparty/glm/glm/gtx/bit.inl +++ b/3rdparty/glm/glm/gtx/bit.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_bit /// @file glm/gtx/bit.inl -/// @date 2014-11-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { @@ -55,6 +26,21 @@ namespace glm } /////////////////// + // lowestBitValue + + template <typename genIUType> + GLM_FUNC_QUALIFIER genIUType lowestBitValue(genIUType Value) + { + return (Value & (~Value + 1)); + } + + template <typename T, precision P, template <typename, precision> class vecType> + GLM_FUNC_QUALIFIER vecType<T, P> lowestBitValue(vecType<T, P> const & v) + { + return detail::functor1<T, T, P, vecType>::call(lowestBitValue, v); + } + + /////////////////// // powerOfTwoAbove template <typename genType> diff --git a/3rdparty/glm/glm/gtx/closest_point.hpp b/3rdparty/glm/glm/gtx/closest_point.hpp index 0e5a187491d..8d435b8190c 100644 --- a/3rdparty/glm/glm/gtx/closest_point.hpp +++ b/3rdparty/glm/glm/gtx/closest_point.hpp @@ -1,33 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_closest_point /// @file glm/gtx/closest_point.hpp -/// @date 2005-12-30 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @@ -35,16 +7,15 @@ /// @ingroup gtx /// /// @brief Find the point on a straight line which is the closet of a point. -/// +/// /// <glm/gtx/closest_point.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_closest_point extension included") #endif diff --git a/3rdparty/glm/glm/gtx/closest_point.inl b/3rdparty/glm/glm/gtx/closest_point.inl index 89bb1a88ebf..5c6a87937a3 100644 --- a/3rdparty/glm/glm/gtx/closest_point.inl +++ b/3rdparty/glm/glm/gtx/closest_point.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_closest_point /// @file glm/gtx/closest_point.inl -/// @date 2005-12-30 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/color_space.hpp b/3rdparty/glm/glm/gtx/color_space.hpp index 16b9d894263..9ff08dced8c 100644 --- a/3rdparty/glm/glm/gtx/color_space.hpp +++ b/3rdparty/glm/glm/gtx/color_space.hpp @@ -1,50 +1,21 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_color_space /// @file glm/gtx/color_space.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtx_color_space GLM_GTX_color_space /// @ingroup gtx -/// +/// /// @brief Related to RGB to HSV conversions and operations. -/// +/// /// <glm/gtx/color_space.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_color_space extension included") #endif diff --git a/3rdparty/glm/glm/gtx/color_space.inl b/3rdparty/glm/glm/gtx/color_space.inl index 76333b76696..43f66415905 100644 --- a/3rdparty/glm/glm/gtx/color_space.inl +++ b/3rdparty/glm/glm/gtx/color_space.inl @@ -1,34 +1,5 @@ -///////////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_color_space /// @file glm/gtx/color_space.inl -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/color_space_YCoCg.hpp b/3rdparty/glm/glm/gtx/color_space_YCoCg.hpp index 4fbbf820150..428ca6d2936 100644 --- a/3rdparty/glm/glm/gtx/color_space_YCoCg.hpp +++ b/3rdparty/glm/glm/gtx/color_space_YCoCg.hpp @@ -1,33 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_color_space_YCoCg /// @file glm/gtx/color_space_YCoCg.hpp -/// @date 2008-10-28 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @@ -35,16 +7,15 @@ /// @ingroup gtx /// /// @brief RGB to YCoCg conversions and operations -/// +/// /// <glm/gtx/color_space_YCoCg.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_color_space_YCoCg extension included") #endif diff --git a/3rdparty/glm/glm/gtx/color_space_YCoCg.inl b/3rdparty/glm/glm/gtx/color_space_YCoCg.inl index 45e41671913..1ca2e5beb3b 100644 --- a/3rdparty/glm/glm/gtx/color_space_YCoCg.inl +++ b/3rdparty/glm/glm/gtx/color_space_YCoCg.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_color_space_YCoCg /// @file glm/gtx/color_space_YCoCg.inl -/// @date 2008-10-28 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/common.hpp b/3rdparty/glm/glm/gtx/common.hpp index 25f43cd21f8..6533a54e919 100644 --- a/3rdparty/glm/glm/gtx/common.hpp +++ b/3rdparty/glm/glm/gtx/common.hpp @@ -1,44 +1,15 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_common /// @file glm/gtx/common.hpp -/// @date 2014-09-08 / 2014-09-08 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtc_half_float (dependence) /// /// @defgroup gtx_common GLM_GTX_common /// @ingroup gtx -/// +/// /// @brief Provide functions to increase the compatibility with Cg and HLSL languages -/// +/// /// <glm/gtx/common.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -48,7 +19,7 @@ #include "../vec4.hpp" #include "../gtc/vec1.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_common extension included") #endif diff --git a/3rdparty/glm/glm/gtx/common.inl b/3rdparty/glm/glm/gtx/common.inl index 337abfeba48..6c9cb651660 100644 --- a/3rdparty/glm/glm/gtx/common.inl +++ b/3rdparty/glm/glm/gtx/common.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_common /// @file glm/gtx/common.inl -/// @date 2014-09-08 / 2014-09-08 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #include <cmath> diff --git a/3rdparty/glm/glm/gtx/compatibility.hpp b/3rdparty/glm/glm/gtx/compatibility.hpp index 5b3f05135be..9f4819aef3c 100644 --- a/3rdparty/glm/glm/gtx/compatibility.hpp +++ b/3rdparty/glm/glm/gtx/compatibility.hpp @@ -1,44 +1,15 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_compatibility /// @file glm/gtx/compatibility.hpp -/// @date 2007-01-24 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtc_half_float (dependence) /// /// @defgroup gtx_compatibility GLM_GTX_compatibility /// @ingroup gtx -/// +/// /// @brief Provide functions to increase the compatibility with Cg and HLSL languages -/// +/// /// <glm/gtx/compatibility.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -46,13 +17,13 @@ #include "../glm.hpp" #include "../gtc/quaternion.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_compatibility extension included") #endif -#if(GLM_COMPILER & GLM_COMPILER_VC) +#if GLM_COMPILER & GLM_COMPILER_VC # include <cfloat> -#elif(GLM_COMPILER & GLM_COMPILER_GCC) +#elif GLM_COMPILER & GLM_COMPILER_GCC # include <cmath> # if(GLM_PLATFORM & GLM_PLATFORM_ANDROID) # undef isfinite diff --git a/3rdparty/glm/glm/gtx/compatibility.inl b/3rdparty/glm/glm/gtx/compatibility.inl index 77f99d13eeb..368527accd6 100644 --- a/3rdparty/glm/glm/gtx/compatibility.inl +++ b/3rdparty/glm/glm/gtx/compatibility.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_compatibility /// @file glm/gtx/compatibility.inl -/// @date 2007-01-24 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////////////////////// #include <limits> diff --git a/3rdparty/glm/glm/gtx/component_wise.hpp b/3rdparty/glm/glm/gtx/component_wise.hpp index 4f90c4ffba4..c316f9e27ae 100644 --- a/3rdparty/glm/glm/gtx/component_wise.hpp +++ b/3rdparty/glm/glm/gtx/component_wise.hpp @@ -1,29 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_component_wise /// @file glm/gtx/component_wise.hpp /// @date 2007-05-21 / 2011-06-07 @@ -33,11 +7,10 @@ /// /// @defgroup gtx_component_wise GLM_GTX_component_wise /// @ingroup gtx -/// +/// /// @brief Operations between components of a type -/// +/// /// <glm/gtx/component_wise.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -45,7 +18,7 @@ #include "../detail/setup.hpp" #include "../detail/precision.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_component_wise extension included") #endif diff --git a/3rdparty/glm/glm/gtx/component_wise.inl b/3rdparty/glm/glm/gtx/component_wise.inl index 3cb17d2812b..add3969e6b6 100644 --- a/3rdparty/glm/glm/gtx/component_wise.inl +++ b/3rdparty/glm/glm/gtx/component_wise.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_component_wise /// @file glm/gtx/component_wise.inl -/// @date 2007-05-21 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////////////////////// #include <limits> diff --git a/3rdparty/glm/glm/gtx/dual_quaternion.hpp b/3rdparty/glm/glm/gtx/dual_quaternion.hpp index 4228a499981..a64c7df76fd 100644 --- a/3rdparty/glm/glm/gtx/dual_quaternion.hpp +++ b/3rdparty/glm/glm/gtx/dual_quaternion.hpp @@ -1,32 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_dual_quaternion /// @file glm/gtx/dual_quaternion.hpp -/// @date 2013-02-10 / 2013-02-20 /// @author Maksim Vorobiev (msomeone@gmail.com) /// /// @see core (dependence) @@ -40,7 +13,6 @@ /// @brief Defines a templated dual-quaternion type and several dual-quaternion operations. /// /// <glm/gtx/dual_quaternion.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -49,7 +21,7 @@ #include "../gtc/constants.hpp" #include "../gtc/quaternion.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_dual_quaternion extension included") #endif diff --git a/3rdparty/glm/glm/gtx/dual_quaternion.inl b/3rdparty/glm/glm/gtx/dual_quaternion.inl index 323c2b32dcc..c93c9691290 100644 --- a/3rdparty/glm/glm/gtx/dual_quaternion.inl +++ b/3rdparty/glm/glm/gtx/dual_quaternion.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_dual_quaternion /// @file glm/gtx/dual_quaternion.inl -/// @date 2013-02-10 / 2013-02-13 -/// @author Maksim Vorobiev (msomeone@gmail.com) -/////////////////////////////////////////////////////////////////////////////////// #include "../geometric.hpp" #include <limits> diff --git a/3rdparty/glm/glm/gtx/euler_angles.hpp b/3rdparty/glm/glm/gtx/euler_angles.hpp index c1d5683d627..fdc4f26cc2a 100644 --- a/3rdparty/glm/glm/gtx/euler_angles.hpp +++ b/3rdparty/glm/glm/gtx/euler_angles.hpp @@ -1,51 +1,22 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_euler_angles /// @file glm/gtx/euler_angles.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtc_half_float (dependence) /// /// @defgroup gtx_euler_angles GLM_GTX_euler_angles /// @ingroup gtx -/// +/// /// @brief Build matrices from Euler angles. -/// +/// /// <glm/gtx/euler_angles.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_euler_angles extension included") #endif diff --git a/3rdparty/glm/glm/gtx/euler_angles.inl b/3rdparty/glm/glm/gtx/euler_angles.inl index 0b41700044d..dbe0a48bb00 100644 --- a/3rdparty/glm/glm/gtx/euler_angles.inl +++ b/3rdparty/glm/glm/gtx/euler_angles.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_euler_angles /// @file glm/gtx/euler_angles.inl -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////////////////////// #include "compatibility.hpp" // glm::atan2 diff --git a/3rdparty/glm/glm/gtx/extend.hpp b/3rdparty/glm/glm/gtx/extend.hpp index ad3a50a44bd..26837a839d3 100644 --- a/3rdparty/glm/glm/gtx/extend.hpp +++ b/3rdparty/glm/glm/gtx/extend.hpp @@ -1,50 +1,21 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_extend /// @file glm/gtx/extend.hpp -/// @date 2006-01-07 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtx_extend GLM_GTX_extend /// @ingroup gtx -/// +/// /// @brief Extend a position from a source to a position at a defined length. -/// +/// /// <glm/gtx/extend.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_extend extension included") #endif diff --git a/3rdparty/glm/glm/gtx/extend.inl b/3rdparty/glm/glm/gtx/extend.inl index c8768e262a7..315558350af 100644 --- a/3rdparty/glm/glm/gtx/extend.inl +++ b/3rdparty/glm/glm/gtx/extend.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_extend /// @file glm/gtx/extend.inl -/// @date 2006-01-07 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/extended_min_max.hpp b/3rdparty/glm/glm/gtx/extended_min_max.hpp index dacf5d42dc0..f4d885953c1 100644 --- a/3rdparty/glm/glm/gtx/extended_min_max.hpp +++ b/3rdparty/glm/glm/gtx/extended_min_max.hpp @@ -1,51 +1,22 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_extended_min_max /// @file glm/gtx/extended_min_max.hpp -/// @date 2007-03-14 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtx_half_float (dependence) /// /// @defgroup gtx_extented_min_max GLM_GTX_extented_min_max /// @ingroup gtx -/// +/// /// Min and max functions for 3 to 4 parameters. -/// +/// /// <glm/gtx/extented_min_max.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_extented_min_max extension included") #endif diff --git a/3rdparty/glm/glm/gtx/extended_min_max.inl b/3rdparty/glm/glm/gtx/extended_min_max.inl index f8dd0e207af..64ea4452648 100644 --- a/3rdparty/glm/glm/gtx/extended_min_max.inl +++ b/3rdparty/glm/glm/gtx/extended_min_max.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_extended_min_max /// @file glm/gtx/extended_min_max.inl -/// @date 2007-03-14 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/fast_exponential.hpp b/3rdparty/glm/glm/gtx/fast_exponential.hpp index 15b7d1da7de..ed64a27d786 100644 --- a/3rdparty/glm/glm/gtx/fast_exponential.hpp +++ b/3rdparty/glm/glm/gtx/fast_exponential.hpp @@ -1,51 +1,22 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_fast_exponential /// @file glm/gtx/fast_exponential.hpp -/// @date 2006-01-09 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtx_half_float (dependence) /// /// @defgroup gtx_fast_exponential GLM_GTX_fast_exponential /// @ingroup gtx -/// +/// /// @brief Fast but less accurate implementations of exponential based functions. -/// +/// /// <glm/gtx/fast_exponential.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_fast_exponential extension included") #endif diff --git a/3rdparty/glm/glm/gtx/fast_exponential.inl b/3rdparty/glm/glm/gtx/fast_exponential.inl index 3a85fd22e65..72f9f8ff927 100644 --- a/3rdparty/glm/glm/gtx/fast_exponential.inl +++ b/3rdparty/glm/glm/gtx/fast_exponential.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_fast_exponential /// @file glm/gtx/fast_exponential.inl -/// @date 2006-01-09 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/fast_square_root.hpp b/3rdparty/glm/glm/gtx/fast_square_root.hpp index 2073df41359..35aa7f3b417 100644 --- a/3rdparty/glm/glm/gtx/fast_square_root.hpp +++ b/3rdparty/glm/glm/gtx/fast_square_root.hpp @@ -1,45 +1,16 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_fast_square_root /// @file glm/gtx/fast_square_root.hpp -/// @date 2006-01-04 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtx_fast_square_root GLM_GTX_fast_square_root /// @ingroup gtx -/// +/// /// @brief Fast but less accurate implementations of square root based functions. /// - Sqrt optimisation based on Newton's method, /// www.gamedev.net/community/forums/topic.asp?topic id=139956 -/// +/// /// <glm/gtx/fast_square_root.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -48,7 +19,7 @@ #include "../exponential.hpp" #include "../geometric.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_fast_square_root extension included") #endif diff --git a/3rdparty/glm/glm/gtx/fast_square_root.inl b/3rdparty/glm/glm/gtx/fast_square_root.inl index 9db769dda56..73950aeccb9 100644 --- a/3rdparty/glm/glm/gtx/fast_square_root.inl +++ b/3rdparty/glm/glm/gtx/fast_square_root.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_fast_square_root /// @file glm/gtx/fast_square_root.inl -/// @date 2006-01-04 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////////////////////// namespace glm { @@ -52,17 +23,17 @@ namespace glm GLM_FUNC_QUALIFIER genType fastInverseSqrt(genType x) { # ifdef __CUDACC__ // Wordaround for a CUDA compiler bug up to CUDA6 - tvec1<T, P> tmp(detail::compute_inversesqrt<tvec1, genType, lowp>::call(tvec1<genType, lowp>(x))); + tvec1<T, P> tmp(detail::compute_inversesqrt<tvec1, genType, lowp, detail::is_aligned<lowp>::value>::call(tvec1<genType, lowp>(x))); return tmp.x; # else - return detail::compute_inversesqrt<tvec1, genType, lowp>::call(tvec1<genType, lowp>(x)).x; + return detail::compute_inversesqrt<tvec1, genType, highp, detail::is_aligned<highp>::value>::call(tvec1<genType, lowp>(x)).x; # endif } template <typename T, precision P, template <typename, precision> class vecType> GLM_FUNC_QUALIFIER vecType<T, P> fastInverseSqrt(vecType<T, P> const & x) { - return detail::compute_inversesqrt<vecType, T, P>::call(x); + return detail::compute_inversesqrt<vecType, T, P, detail::is_aligned<P>::value>::call(x); } // fastLength diff --git a/3rdparty/glm/glm/gtx/fast_trigonometry.hpp b/3rdparty/glm/glm/gtx/fast_trigonometry.hpp index 93c38ab28f7..ccb1d227131 100644 --- a/3rdparty/glm/glm/gtx/fast_trigonometry.hpp +++ b/3rdparty/glm/glm/gtx/fast_trigonometry.hpp @@ -1,50 +1,21 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_fast_trigonometry /// @file glm/gtx/fast_trigonometry.hpp -/// @date 2006-01-08 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtx_fast_trigonometry GLM_GTX_fast_trigonometry /// @ingroup gtx -/// +/// /// @brief Fast but less accurate implementations of trigonometric functions. -/// +/// /// <glm/gtx/fast_trigonometry.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../gtc/constants.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_fast_trigonometry extension included") #endif diff --git a/3rdparty/glm/glm/gtx/fast_trigonometry.inl b/3rdparty/glm/glm/gtx/fast_trigonometry.inl index b8c65810e5c..f576c1720a3 100644 --- a/3rdparty/glm/glm/gtx/fast_trigonometry.inl +++ b/3rdparty/glm/glm/gtx/fast_trigonometry.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_fast_trigonometry /// @file glm/gtx/fast_trigonometry.inl -/// @date 2006-01-08 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////////////////////// namespace glm{ namespace detail diff --git a/3rdparty/glm/glm/gtx/float_notmalize.inl b/3rdparty/glm/glm/gtx/float_notmalize.inl index 361c88292ad..4dde025685a 100644 --- a/3rdparty/glm/glm/gtx/float_notmalize.inl +++ b/3rdparty/glm/glm/gtx/float_notmalize.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_float_normalize /// @file glm/gtx/float_normalize.inl -/// @date 2015-09-25 / 2015-09-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #include <limits> diff --git a/3rdparty/glm/glm/gtx/gradient_paint.hpp b/3rdparty/glm/glm/gtx/gradient_paint.hpp index 8e734294076..de1f18d3933 100644 --- a/3rdparty/glm/glm/gtx/gradient_paint.hpp +++ b/3rdparty/glm/glm/gtx/gradient_paint.hpp @@ -1,43 +1,14 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_gradient_paint /// @file glm/gtx/gradient_paint.hpp -/// @date 2009-03-06 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtx_optimum_pow (dependence) /// /// @defgroup gtx_gradient_paint GLM_GTX_gradient_paint /// @ingroup gtx -/// +/// /// @brief Functions that return the color of procedural gradient for specific coordinates. /// <glm/gtx/gradient_paint.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -45,7 +16,7 @@ #include "../glm.hpp" #include "../gtx/optimum_pow.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_gradient_paint extension included") #endif diff --git a/3rdparty/glm/glm/gtx/gradient_paint.inl b/3rdparty/glm/glm/gtx/gradient_paint.inl index 9a2305fe26e..aaa5ce1401c 100644 --- a/3rdparty/glm/glm/gtx/gradient_paint.inl +++ b/3rdparty/glm/glm/gtx/gradient_paint.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_gradient_paint /// @file glm/gtx/gradient_paint.inl -/// @date 2009-03-06 / 2013-04-09 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/handed_coordinate_space.hpp b/3rdparty/glm/glm/gtx/handed_coordinate_space.hpp index d4020af9181..2ee5175e86c 100644 --- a/3rdparty/glm/glm/gtx/handed_coordinate_space.hpp +++ b/3rdparty/glm/glm/gtx/handed_coordinate_space.hpp @@ -1,50 +1,21 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_handed_coordinate_space /// @file glm/gtx/handed_coordinate_space.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtx_handed_coordinate_space GLM_GTX_handed_coordinate_space /// @ingroup gtx -/// +/// /// @brief To know if a set of three basis vectors defines a right or left-handed coordinate system. -/// +/// /// <glm/gtx/handed_coordinate_system.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_handed_coordinate_space extension included") #endif diff --git a/3rdparty/glm/glm/gtx/handed_coordinate_space.inl b/3rdparty/glm/glm/gtx/handed_coordinate_space.inl index 86e9faff268..2e55653cb82 100644 --- a/3rdparty/glm/glm/gtx/handed_coordinate_space.inl +++ b/3rdparty/glm/glm/gtx/handed_coordinate_space.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_handed_coordinate_space /// @file glm/gtx/handed_coordinate_space.inl -/// @date 2005-12-21 / 2009-02-19 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/hash.hpp b/3rdparty/glm/glm/gtx/hash.hpp index 02030987f1a..22626188c2c 100644 --- a/3rdparty/glm/glm/gtx/hash.hpp +++ b/3rdparty/glm/glm/gtx/hash.hpp @@ -1,33 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_hash /// @file glm/gtx/hash.hpp -/// @date 2015-03-07 / 2015-03-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @@ -37,7 +9,6 @@ /// @brief Add std::hash support for glm types /// /// <glm/gtx/hash.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/gtx/hash.inl b/3rdparty/glm/glm/gtx/hash.inl index 8aa299e1735..c42f4f0a81b 100644 --- a/3rdparty/glm/glm/gtx/hash.inl +++ b/3rdparty/glm/glm/gtx/hash.inl @@ -1,43 +1,14 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_hash /// @file glm/gtx/hash.inl -/// @date 2015-03-07 / 2015-03-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtx_hash GLM_GTX_hash /// @ingroup gtx -/// +/// /// @brief Add std::hash support for glm types -/// +/// /// <glm/gtx/hash.inl> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// namespace glm { namespace detail diff --git a/3rdparty/glm/glm/gtx/integer.hpp b/3rdparty/glm/glm/gtx/integer.hpp index f22850a0221..1173a58e86c 100644 --- a/3rdparty/glm/glm/gtx/integer.hpp +++ b/3rdparty/glm/glm/gtx/integer.hpp @@ -1,43 +1,14 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_integer /// @file glm/gtx/integer.hpp -/// @date 2005-12-24 / 2011-10-13 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtx_integer GLM_GTX_integer /// @ingroup gtx -/// +/// /// @brief Add support for integer for core functions -/// +/// /// <glm/gtx/integer.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -45,7 +16,7 @@ #include "../glm.hpp" #include "../gtc/integer.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_integer extension included") #endif diff --git a/3rdparty/glm/glm/gtx/integer.inl b/3rdparty/glm/glm/gtx/integer.inl index 360818b1cd7..3a479e6c5bf 100644 --- a/3rdparty/glm/glm/gtx/integer.inl +++ b/3rdparty/glm/glm/gtx/integer.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_integer /// @file glm/gtx/integer.inl -/// @date 2005-12-24 / 2011-10-13 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/intersect.hpp b/3rdparty/glm/glm/gtx/intersect.hpp index 3bce7081742..33b6e99bac8 100644 --- a/3rdparty/glm/glm/gtx/intersect.hpp +++ b/3rdparty/glm/glm/gtx/intersect.hpp @@ -1,44 +1,15 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_intersect /// @file glm/gtx/intersect.hpp -/// @date 2007-04-03 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtx_closest_point (dependence) /// /// @defgroup gtx_intersect GLM_GTX_intersect /// @ingroup gtx -/// +/// /// @brief Add intersection functions -/// +/// /// <glm/gtx/intersect.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -50,7 +21,7 @@ #include "../gtx/closest_point.hpp" #include "../gtx/vector_query.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_closest_point extension included") #endif diff --git a/3rdparty/glm/glm/gtx/intersect.inl b/3rdparty/glm/glm/gtx/intersect.inl index ac6304e07ba..0bb7d7f819b 100644 --- a/3rdparty/glm/glm/gtx/intersect.inl +++ b/3rdparty/glm/glm/gtx/intersect.inl @@ -1,11 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2007-04-03 -// Updated : 2009-01-20 -// Licence : This source is under MIT licence -// File : glm/gtx/intersect.inl -/////////////////////////////////////////////////////////////////////////////////////////////////// +/// @ref gtx_intersect +/// @file glm/gtx/intersect.inl namespace glm { diff --git a/3rdparty/glm/glm/gtx/io.hpp b/3rdparty/glm/glm/gtx/io.hpp index 96632b2de1d..52b27a8feaa 100644 --- a/3rdparty/glm/glm/gtx/io.hpp +++ b/3rdparty/glm/glm/gtx/io.hpp @@ -1,32 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2016 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_io /// @file glm/gtx/io.hpp -/// @date 2013-11-22 / 2016-03-14 /// @author Jan P Springer (regnirpsj@gmail.com) /// /// @see core (dependence) @@ -38,12 +11,11 @@ /// /// @brief std::[w]ostream support for glm types /// -/// std::[w]ostream support for glm types + precision/width/etc. manipulators -/// based on howard hinnant's std::chrono io proposal -/// [http://home.roadrunner.com/~hinnant/bloomington/chrono_io.html] +/// std::[w]ostream support for glm types + precision/width/etc. manipulators +/// based on howard hinnant's std::chrono io proposal +/// [http://home.roadrunner.com/~hinnant/bloomington/chrono_io.html] /// -/// <glm/gtx/io.hpp> needs to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// +/// <glm/gtx/io.hpp> needs to be included to use these functionalities. #pragma once @@ -51,7 +23,7 @@ #include "../glm.hpp" #include "../gtx/quaternion.hpp" -#if(defined(GLM_MESSAGES) && !defined(glm_ext)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_io extension included") #endif diff --git a/3rdparty/glm/glm/gtx/io.inl b/3rdparty/glm/glm/gtx/io.inl index 5556e0ccafd..849c0ca5baf 100644 --- a/3rdparty/glm/glm/gtx/io.inl +++ b/3rdparty/glm/glm/gtx/io.inl @@ -1,34 +1,6 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2016 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_io /// @file glm/gtx/io.inl -/// @date 2013-11-22 / 2016-03-14 /// @author Jan P Springer (regnirpsj@gmail.com) -/////////////////////////////////////////////////////////////////////////////////////////////////// #include <iomanip> // std::fixed, std::setfill<>, std::setprecision, std::right, std::setw #include <ostream> // std::basic_ostream<> diff --git a/3rdparty/glm/glm/gtx/log_base.hpp b/3rdparty/glm/glm/gtx/log_base.hpp index e6c89ea2fa8..7958fc3ec13 100644 --- a/3rdparty/glm/glm/gtx/log_base.hpp +++ b/3rdparty/glm/glm/gtx/log_base.hpp @@ -1,50 +1,21 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_log_base /// @file glm/gtx/log_base.hpp -/// @date 2008-10-24 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtx_log_base GLM_GTX_log_base /// @ingroup gtx -/// +/// /// @brief Logarithm for any base. base can be a vector or a scalar. -/// +/// /// <glm/gtx/log_base.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_log_base extension included") #endif diff --git a/3rdparty/glm/glm/gtx/log_base.inl b/3rdparty/glm/glm/gtx/log_base.inl index 95b8dfaac9d..8005d1ba377 100644 --- a/3rdparty/glm/glm/gtx/log_base.inl +++ b/3rdparty/glm/glm/gtx/log_base.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_log_base /// @file glm/gtx/log_base.inl -/// @date 2008-10-24 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/matrix_cross_product.hpp b/3rdparty/glm/glm/gtx/matrix_cross_product.hpp index f4fd54fae16..d920f4ef022 100644 --- a/3rdparty/glm/glm/gtx/matrix_cross_product.hpp +++ b/3rdparty/glm/glm/gtx/matrix_cross_product.hpp @@ -1,51 +1,22 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_matrix_cross_product /// @file glm/gtx/matrix_cross_product.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtx_extented_min_max (dependence) /// /// @defgroup gtx_matrix_cross_product GLM_GTX_matrix_cross_product /// @ingroup gtx -/// +/// /// @brief Build cross product matrices -/// +/// /// <glm/gtx/matrix_cross_product.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_matrix_cross_product extension included") #endif diff --git a/3rdparty/glm/glm/gtx/matrix_cross_product.inl b/3rdparty/glm/glm/gtx/matrix_cross_product.inl index 9665b067fcb..16f07e9616a 100644 --- a/3rdparty/glm/glm/gtx/matrix_cross_product.inl +++ b/3rdparty/glm/glm/gtx/matrix_cross_product.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_matrix_cross_product /// @file glm/gtx/matrix_cross_product.inl -/// @date 2005-12-21 / 2005-12-21 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/matrix_decompose.hpp b/3rdparty/glm/glm/gtx/matrix_decompose.hpp index e68ab498fc6..e163f5a35ce 100644 --- a/3rdparty/glm/glm/gtx/matrix_decompose.hpp +++ b/3rdparty/glm/glm/gtx/matrix_decompose.hpp @@ -1,43 +1,14 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_matrix_decompose /// @file glm/gtx/matrix_decompose.hpp -/// @date 2014-08-29 / 2014-08-29 -/// @author Christophe Riccio -/// +/// /// @see core (dependence) /// /// @defgroup gtx_matrix_decompose GLM_GTX_matrix_decompose /// @ingroup gtx -/// +/// /// @brief Decomposes a model matrix to translations, rotation and scale components -/// +/// /// <glm/gtx/matrix_decompose.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -49,7 +20,7 @@ #include "../gtc/quaternion.hpp" #include "../gtc/matrix_transform.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_matrix_decompose extension included") #endif diff --git a/3rdparty/glm/glm/gtx/matrix_decompose.inl b/3rdparty/glm/glm/gtx/matrix_decompose.inl index 47986660bce..5bf576aca10 100644 --- a/3rdparty/glm/glm/gtx/matrix_decompose.inl +++ b/3rdparty/glm/glm/gtx/matrix_decompose.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_matrix_decompose /// @file glm/gtx/matrix_decompose.inl -/// @date 2014-08-29 / 2014-08-29 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm{ namespace detail diff --git a/3rdparty/glm/glm/gtx/matrix_interpolation.hpp b/3rdparty/glm/glm/gtx/matrix_interpolation.hpp index d00b722a51e..77a69eac60e 100644 --- a/3rdparty/glm/glm/gtx/matrix_interpolation.hpp +++ b/3rdparty/glm/glm/gtx/matrix_interpolation.hpp @@ -1,50 +1,22 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_matrix_interpolation /// @file glm/gtx/matrix_interpolation.hpp -/// @date 2011-03-05 / 2011-06-07 /// @author Ghenadii Ursachi (the.asteroth@gmail.com) /// /// @see core (dependence) /// /// @defgroup gtx_matrix_interpolation GLM_GTX_matrix_interpolation /// @ingroup gtx -/// +/// /// @brief Allows to directly interpolate two exiciting matrices. -/// +/// /// <glm/gtx/matrix_interpolation.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_matrix_interpolation extension included") #endif diff --git a/3rdparty/glm/glm/gtx/matrix_interpolation.inl b/3rdparty/glm/glm/gtx/matrix_interpolation.inl index 5112d1ac255..8645f967853 100644 --- a/3rdparty/glm/glm/gtx/matrix_interpolation.inl +++ b/3rdparty/glm/glm/gtx/matrix_interpolation.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_matrix_interpolation /// @file glm/gtx/matrix_interpolation.hpp -/// @date 2011-03-05 / 2011-03-05 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/matrix_major_storage.hpp b/3rdparty/glm/glm/gtx/matrix_major_storage.hpp index a098a55dea5..9402abee7b3 100644 --- a/3rdparty/glm/glm/gtx/matrix_major_storage.hpp +++ b/3rdparty/glm/glm/gtx/matrix_major_storage.hpp @@ -1,51 +1,22 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_matrix_major_storage /// @file glm/gtx/matrix_major_storage.hpp -/// @date 2006-04-19 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtx_extented_min_max (dependence) /// /// @defgroup gtx_matrix_major_storage GLM_GTX_matrix_major_storage /// @ingroup gtx -/// +/// /// @brief Build matrices with specific matrix order, row or column -/// +/// /// <glm/gtx/matrix_major_storage.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_matrix_major_storage extension included") #endif diff --git a/3rdparty/glm/glm/gtx/matrix_major_storage.inl b/3rdparty/glm/glm/gtx/matrix_major_storage.inl index 5166a667aca..709773903df 100644 --- a/3rdparty/glm/glm/gtx/matrix_major_storage.inl +++ b/3rdparty/glm/glm/gtx/matrix_major_storage.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_matrix_major_storage /// @file glm/gtx/matrix_major_storage.hpp -/// @date 2006-04-19 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/matrix_operation.hpp b/3rdparty/glm/glm/gtx/matrix_operation.hpp index 3c06b942092..3192ae54c6d 100644 --- a/3rdparty/glm/glm/gtx/matrix_operation.hpp +++ b/3rdparty/glm/glm/gtx/matrix_operation.hpp @@ -1,50 +1,21 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_matrix_operation /// @file glm/gtx/matrix_operation.hpp -/// @date 2009-08-29 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtx_matrix_operation GLM_GTX_matrix_operation /// @ingroup gtx -/// +/// /// @brief Build diagonal matrices from vectors. -/// +/// /// <glm/gtx/matrix_operation.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_matrix_operation extension included") #endif diff --git a/3rdparty/glm/glm/gtx/matrix_operation.inl b/3rdparty/glm/glm/gtx/matrix_operation.inl index 20c1496d10d..1553215604a 100644 --- a/3rdparty/glm/glm/gtx/matrix_operation.inl +++ b/3rdparty/glm/glm/gtx/matrix_operation.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_matrix_operation /// @file glm/gtx/matrix_operation.inl -/// @date 2009-08-29 / 2009-08-29 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/matrix_query.hpp b/3rdparty/glm/glm/gtx/matrix_query.hpp index 0be1e54f203..25182741760 100644 --- a/3rdparty/glm/glm/gtx/matrix_query.hpp +++ b/3rdparty/glm/glm/gtx/matrix_query.hpp @@ -1,44 +1,15 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_matrix_query /// @file glm/gtx/matrix_query.hpp -/// @date 2007-03-05 / 2011-08-28 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtx_vector_query (dependence) /// /// @defgroup gtx_matrix_query GLM_GTX_matrix_query /// @ingroup gtx -/// +/// /// @brief Query to evaluate matrix properties -/// +/// /// <glm/gtx/matrix_query.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -47,7 +18,7 @@ #include "../gtx/vector_query.hpp" #include <limits> -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_matrix_query extension included") #endif diff --git a/3rdparty/glm/glm/gtx/matrix_query.inl b/3rdparty/glm/glm/gtx/matrix_query.inl index 18f810dab07..491b7741ca2 100644 --- a/3rdparty/glm/glm/gtx/matrix_query.inl +++ b/3rdparty/glm/glm/gtx/matrix_query.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_matrix_query /// @file glm/gtx/matrix_query.inl -/// @date 2007-03-05 / 2007-03-05 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/matrix_transform_2d.hpp b/3rdparty/glm/glm/gtx/matrix_transform_2d.hpp index 010a437b0cd..91f4834e6bc 100644 --- a/3rdparty/glm/glm/gtx/matrix_transform_2d.hpp +++ b/3rdparty/glm/glm/gtx/matrix_transform_2d.hpp @@ -1,43 +1,15 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_matrix_transform_2d /// @file glm/gtx/matrix_transform_2d.hpp -/// @date 2014-02-20 /// @author Miguel Ángel Pérez Martínez /// /// @see core (dependence) /// /// @defgroup gtx_matrix_transform_2d GLM_GTX_matrix_transform_2d /// @ingroup gtx -/// +/// /// @brief Defines functions that generate common 2d transformation matrices. -/// +/// /// <glm/gtx/matrix_transform_2d.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -46,7 +18,7 @@ #include "../vec2.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_matrix_transform_2d extension included") #endif diff --git a/3rdparty/glm/glm/gtx/matrix_transform_2d.inl b/3rdparty/glm/glm/gtx/matrix_transform_2d.inl index 0c97161ba8b..bea5670ab9c 100644 --- a/3rdparty/glm/glm/gtx/matrix_transform_2d.inl +++ b/3rdparty/glm/glm/gtx/matrix_transform_2d.inl @@ -1,34 +1,6 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_matrix_transform_2d /// @file glm/gtc/matrix_transform_2d.inl -/// @date 2014-02-20 /// @author Miguel Ángel Pérez Martínez -/////////////////////////////////////////////////////////////////////////////////// #include "../trigonometric.hpp" diff --git a/3rdparty/glm/glm/gtx/mixed_product.hpp b/3rdparty/glm/glm/gtx/mixed_product.hpp index 91286408972..65861f72138 100644 --- a/3rdparty/glm/glm/gtx/mixed_product.hpp +++ b/3rdparty/glm/glm/gtx/mixed_product.hpp @@ -1,50 +1,21 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_mixed_product /// @file glm/gtx/mixed_product.hpp -/// @date 2007-04-03 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtx_mixed_product GLM_GTX_mixed_producte /// @ingroup gtx -/// +/// /// @brief Mixed product of 3 vectors. -/// +/// /// <glm/gtx/mixed_product.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_mixed_product extension included") #endif diff --git a/3rdparty/glm/glm/gtx/mixed_product.inl b/3rdparty/glm/glm/gtx/mixed_product.inl index 36ef8142c14..a6ede596f9d 100644 --- a/3rdparty/glm/glm/gtx/mixed_product.inl +++ b/3rdparty/glm/glm/gtx/mixed_product.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_mixed_product /// @file glm/gtx/mixed_product.inl -/// @date 2007-04-03 / 2008-09-17 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/norm.hpp b/3rdparty/glm/glm/gtx/norm.hpp index f1d8d1b2846..b3cb5283070 100644 --- a/3rdparty/glm/glm/gtx/norm.hpp +++ b/3rdparty/glm/glm/gtx/norm.hpp @@ -1,52 +1,23 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_norm /// @file glm/gtx/norm.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtx_quaternion (dependence) /// /// @defgroup gtx_norm GLM_GTX_norm /// @ingroup gtx -/// +/// /// @brief Various ways to compute vector norms. /// /// <glm/gtx/norm.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: -#include "../glm.hpp" +#include "../detail/func_geometric.hpp" #include "../gtx/quaternion.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_norm extension included") #endif @@ -55,31 +26,18 @@ namespace glm /// @addtogroup gtx_norm /// @{ - //! Returns the squared length of x. - //! From GLM_GTX_norm extension. - template <typename T> + /// Returns the squared length of x. + /// From GLM_GTX_norm extension. + template <typename T, precision P, template <typename, precision> class vecType> GLM_FUNC_DECL T length2( - T const & x); + vecType<T, P> const & x); - //! Returns the squared length of x. - //! From GLM_GTX_norm extension. - template <typename genType> - GLM_FUNC_DECL typename genType::value_type length2( - genType const & x); - - //! Returns the squared distance between p0 and p1, i.e., length2(p0 - p1). - //! From GLM_GTX_norm extension. - template <typename T> + /// Returns the squared distance between p0 and p1, i.e., length2(p0 - p1). + /// From GLM_GTX_norm extension. + template <typename T, precision P, template <typename, precision> class vecType> GLM_FUNC_DECL T distance2( - T const & p0, - T const & p1); - - //! Returns the squared distance between p0 and p1, i.e., length2(p0 - p1). - //! From GLM_GTX_norm extension. - template <typename genType> - GLM_FUNC_DECL typename genType::value_type distance2( - genType const & p0, - genType const & p1); + vecType<T, P> const & p0, + vecType<T, P> const & p1); //! Returns the L1 norm between x and y. //! From GLM_GTX_norm extension. diff --git a/3rdparty/glm/glm/gtx/norm.inl b/3rdparty/glm/glm/gtx/norm.inl index 2b8e98204a4..20954ec7cf4 100644 --- a/3rdparty/glm/glm/gtx/norm.inl +++ b/3rdparty/glm/glm/gtx/norm.inl @@ -1,110 +1,46 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_norm /// @file glm/gtx/norm.inl -/// @date 2005-12-21 / 2008-07-24 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// -namespace glm -{ - template <typename T> - GLM_FUNC_QUALIFIER T length2 - ( - T const & x - ) - { - return x * x; - } +#include "../detail/precision.hpp" - template <typename T, precision P> - GLM_FUNC_QUALIFIER T length2 - ( - tvec2<T, P> const & x - ) +namespace glm{ +namespace detail +{ + template <template <typename, precision> class vecType, typename T, precision P, bool Aligned> + struct compute_length2 { - return dot(x, x); - } + GLM_FUNC_QUALIFIER static T call(vecType<T, P> const & v) + { + return dot(v, v); + } + }; +}//namespace detail - template <typename T, precision P> - GLM_FUNC_QUALIFIER T length2 - ( - tvec3<T, P> const & x - ) + template <typename genType> + GLM_FUNC_QUALIFIER genType length2(genType x) { - return dot(x, x); + GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'length2' accepts only floating-point inputs"); + return x * x; } - template <typename T, precision P> - GLM_FUNC_QUALIFIER T length2 - ( - tvec4<T, P> const & x - ) + template <typename T, precision P, template <typename, precision> class vecType> + GLM_FUNC_QUALIFIER T length2(vecType<T, P> const & v) { - return dot(x, x); + GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'length2' accepts only floating-point inputs"); + return detail::compute_length2<vecType, T, P, detail::is_aligned<P>::value>::call(v); } template <typename T> - GLM_FUNC_QUALIFIER T distance2 - ( - T const & p0, - T const & p1 - ) - { - return length2(p1 - p0); - } - - template <typename T, precision P> - GLM_FUNC_QUALIFIER T distance2 - ( - tvec2<T, P> const & p0, - tvec2<T, P> const & p1 - ) + GLM_FUNC_QUALIFIER T distance2(T p0, T p1) { + GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'distance2' accepts only floating-point inputs"); return length2(p1 - p0); } - template <typename T, precision P> - GLM_FUNC_QUALIFIER T distance2 - ( - tvec3<T, P> const & p0, - tvec3<T, P> const & p1 - ) - { - return length2(p1 - p0); - } - - template <typename T, precision P> - GLM_FUNC_QUALIFIER T distance2 - ( - tvec4<T, P> const & p0, - tvec4<T, P> const & p1 - ) + template <typename T, precision P, template <typename, precision> class vecType> + GLM_FUNC_QUALIFIER T distance2(vecType<T, P> const & p0, vecType<T, P> const & p1) { + GLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, "'distance2' accepts only floating-point inputs"); return length2(p1 - p0); } diff --git a/3rdparty/glm/glm/gtx/normal.hpp b/3rdparty/glm/glm/gtx/normal.hpp index 7ddb002dec3..2e0044e37cc 100644 --- a/3rdparty/glm/glm/gtx/normal.hpp +++ b/3rdparty/glm/glm/gtx/normal.hpp @@ -1,51 +1,22 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_normal /// @file glm/gtx/normal.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtx_extented_min_max (dependence) /// /// @defgroup gtx_normal GLM_GTX_normal /// @ingroup gtx -/// +/// /// @brief Compute the normal of a triangle. -/// +/// /// <glm/gtx/normal.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_normal extension included") #endif diff --git a/3rdparty/glm/glm/gtx/normal.inl b/3rdparty/glm/glm/gtx/normal.inl index 153e9a47786..e4423176bcb 100644 --- a/3rdparty/glm/glm/gtx/normal.inl +++ b/3rdparty/glm/glm/gtx/normal.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_normal /// @file glm/gtx/normal.inl -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/normalize_dot.hpp b/3rdparty/glm/glm/gtx/normalize_dot.hpp index 1429c48d186..de650d30c28 100644 --- a/3rdparty/glm/glm/gtx/normalize_dot.hpp +++ b/3rdparty/glm/glm/gtx/normalize_dot.hpp @@ -1,51 +1,22 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_normalize_dot /// @file glm/gtx/normalize_dot.hpp -/// @date 2007-09-28 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtx_fast_square_root (dependence) /// /// @defgroup gtx_normalize_dot GLM_GTX_normalize_dot /// @ingroup gtx -/// +/// /// @brief Dot product of vectors that need to be normalize with a single square root. -/// +/// /// <glm/gtx/normalized_dot.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../gtx/fast_square_root.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_normalize_dot extension included") #endif diff --git a/3rdparty/glm/glm/gtx/normalize_dot.inl b/3rdparty/glm/glm/gtx/normalize_dot.inl index 80df8dd1527..0d01ffe2a2b 100644 --- a/3rdparty/glm/glm/gtx/normalize_dot.inl +++ b/3rdparty/glm/glm/gtx/normalize_dot.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_normalize_dot /// @file glm/gtx/normalize_dot.inl -/// @date 2007-09-28 / 2008-10-07 -/// @author Christophe Riccio -////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/number_precision.hpp b/3rdparty/glm/glm/gtx/number_precision.hpp index c4736f3296b..736d03510e3 100644 --- a/3rdparty/glm/glm/gtx/number_precision.hpp +++ b/3rdparty/glm/glm/gtx/number_precision.hpp @@ -1,33 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_number_precision /// @file glm/gtx/number_precision.hpp -/// @date 2007-05-10 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtc_type_precision (dependence) @@ -35,11 +7,10 @@ /// /// @defgroup gtx_number_precision GLM_GTX_number_precision /// @ingroup gtx -/// +/// /// @brief Defined size types. -/// +/// /// <glm/gtx/number_precision.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -47,7 +18,7 @@ #include "../glm.hpp" #include "../gtc/type_precision.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_number_precision extension included") #endif diff --git a/3rdparty/glm/glm/gtx/number_precision.inl b/3rdparty/glm/glm/gtx/number_precision.inl index cd93fe5aff4..b54cf66b307 100644 --- a/3rdparty/glm/glm/gtx/number_precision.inl +++ b/3rdparty/glm/glm/gtx/number_precision.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_number_precision /// @file glm/gtx/number_precision.inl -/// @date 2007-05-10 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/optimum_pow.hpp b/3rdparty/glm/glm/gtx/optimum_pow.hpp index e958de408b2..e9510c41d95 100644 --- a/3rdparty/glm/glm/gtx/optimum_pow.hpp +++ b/3rdparty/glm/glm/gtx/optimum_pow.hpp @@ -1,50 +1,21 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_optimum_pow /// @file glm/gtx/optimum_pow.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtx_optimum_pow GLM_GTX_optimum_pow /// @ingroup gtx -/// +/// /// @brief Integer exponentiation of power functions. -/// +/// /// <glm/gtx/optimum_pow.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_optimum_pow extension included") #endif diff --git a/3rdparty/glm/glm/gtx/optimum_pow.inl b/3rdparty/glm/glm/gtx/optimum_pow.inl index d0c22ab9085..2216a7430ed 100644 --- a/3rdparty/glm/glm/gtx/optimum_pow.inl +++ b/3rdparty/glm/glm/gtx/optimum_pow.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_optimum_pow /// @file glm/gtx/optimum_pow.inl -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/orthonormalize.hpp b/3rdparty/glm/glm/gtx/orthonormalize.hpp index d9f031d385d..4bea449705c 100644 --- a/3rdparty/glm/glm/gtx/orthonormalize.hpp +++ b/3rdparty/glm/glm/gtx/orthonormalize.hpp @@ -1,44 +1,15 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_orthonormalize /// @file glm/gtx/orthonormalize.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtx_extented_min_max (dependence) /// /// @defgroup gtx_orthonormalize GLM_GTX_orthonormalize /// @ingroup gtx -/// +/// /// @brief Orthonormalize matrices. -/// +/// /// <glm/gtx/orthonormalize.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -47,7 +18,7 @@ #include "../mat3x3.hpp" #include "../geometric.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_orthonormalize extension included") #endif diff --git a/3rdparty/glm/glm/gtx/orthonormalize.inl b/3rdparty/glm/glm/gtx/orthonormalize.inl index 07491a36d58..4796384ea47 100644 --- a/3rdparty/glm/glm/gtx/orthonormalize.inl +++ b/3rdparty/glm/glm/gtx/orthonormalize.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_orthonormalize /// @file glm/gtx/orthonormalize.inl -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/perpendicular.hpp b/3rdparty/glm/glm/gtx/perpendicular.hpp index e8c7fc0356b..8b6260a9b25 100644 --- a/3rdparty/glm/glm/gtx/perpendicular.hpp +++ b/3rdparty/glm/glm/gtx/perpendicular.hpp @@ -1,44 +1,15 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_perpendicular /// @file glm/gtx/perpendicular.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtx_projection (dependence) /// /// @defgroup gtx_perpendicular GLM_GTX_perpendicular /// @ingroup gtx -/// +/// /// @brief Perpendicular of a vector from other one -/// +/// /// <glm/gtx/perpendicular.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -46,7 +17,7 @@ #include "../glm.hpp" #include "../gtx/projection.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_perpendicular extension included") #endif diff --git a/3rdparty/glm/glm/gtx/perpendicular.inl b/3rdparty/glm/glm/gtx/perpendicular.inl index 4c321b74d76..08a7a815e15 100644 --- a/3rdparty/glm/glm/gtx/perpendicular.inl +++ b/3rdparty/glm/glm/gtx/perpendicular.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_perpendicular /// @file glm/gtx/perpendicular.inl -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/polar_coordinates.hpp b/3rdparty/glm/glm/gtx/polar_coordinates.hpp index c5e3d8f59bf..c647c0faa39 100644 --- a/3rdparty/glm/glm/gtx/polar_coordinates.hpp +++ b/3rdparty/glm/glm/gtx/polar_coordinates.hpp @@ -1,50 +1,21 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_polar_coordinates /// @file glm/gtx/polar_coordinates.hpp -/// @date 2007-03-06 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtx_polar_coordinates GLM_GTX_polar_coordinates /// @ingroup gtx -/// +/// /// @brief Conversion from Euclidean space to polar space and revert. -/// +/// /// <glm/gtx/polar_coordinates.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_polar_coordinates extension included") #endif diff --git a/3rdparty/glm/glm/gtx/polar_coordinates.inl b/3rdparty/glm/glm/gtx/polar_coordinates.inl index 9d7f6aeaff5..afc9d2bc1b4 100644 --- a/3rdparty/glm/glm/gtx/polar_coordinates.inl +++ b/3rdparty/glm/glm/gtx/polar_coordinates.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_polar_coordinates /// @file glm/gtx/polar_coordinates.inl -/// @date 2007-03-06 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/projection.hpp b/3rdparty/glm/glm/gtx/projection.hpp index e64065b6b5d..fcddae87034 100644 --- a/3rdparty/glm/glm/gtx/projection.hpp +++ b/3rdparty/glm/glm/gtx/projection.hpp @@ -1,50 +1,21 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_projection /// @file glm/gtx/projection.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtx_projection GLM_GTX_projection /// @ingroup gtx -/// +/// /// @brief Projection of a vector to other one -/// +/// /// <glm/gtx/projection.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../geometric.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_projection extension included") #endif diff --git a/3rdparty/glm/glm/gtx/projection.inl b/3rdparty/glm/glm/gtx/projection.inl index c46b96a2201..d21fe83d571 100644 --- a/3rdparty/glm/glm/gtx/projection.inl +++ b/3rdparty/glm/glm/gtx/projection.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_projection /// @file glm/gtx/projection.inl -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/quaternion.hpp b/3rdparty/glm/glm/gtx/quaternion.hpp index b34c3be8801..674d7e75568 100644 --- a/3rdparty/glm/glm/gtx/quaternion.hpp +++ b/3rdparty/glm/glm/gtx/quaternion.hpp @@ -1,44 +1,15 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_quaternion /// @file glm/gtx/quaternion.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtx_extented_min_max (dependence) /// /// @defgroup gtx_quaternion GLM_GTX_quaternion /// @ingroup gtx -/// +/// /// @brief Extented quaternion types and functions -/// +/// /// <glm/gtx/quaternion.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -48,7 +19,7 @@ #include "../gtc/quaternion.hpp" #include "../gtx/norm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_quaternion extension included") #endif diff --git a/3rdparty/glm/glm/gtx/quaternion.inl b/3rdparty/glm/glm/gtx/quaternion.inl index b405cc5ed0b..1a31e947685 100644 --- a/3rdparty/glm/glm/gtx/quaternion.inl +++ b/3rdparty/glm/glm/gtx/quaternion.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_quaternion /// @file glm/gtx/quaternion.inl -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #include <limits> #include "../gtc/constants.hpp" @@ -36,21 +7,13 @@ namespace glm { template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec3<T, P> cross - ( - tvec3<T, P> const & v, - tquat<T, P> const & q - ) + GLM_FUNC_QUALIFIER tvec3<T, P> cross(tvec3<T, P> const& v, tquat<T, P> const& q) { return inverse(q) * v; } template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec3<T, P> cross - ( - tquat<T, P> const & q, - tvec3<T, P> const & v - ) + GLM_FUNC_QUALIFIER tvec3<T, P> cross(tquat<T, P> const& q, tvec3<T, P> const& v) { return q * v; } @@ -80,25 +43,19 @@ namespace glm } template <typename T, precision P> - GLM_FUNC_QUALIFIER tquat<T, P> exp - ( - tquat<T, P> const & q - ) + GLM_FUNC_QUALIFIER tquat<T, P> exp(tquat<T, P> const& q) { tvec3<T, P> u(q.x, q.y, q.z); - T Angle = glm::length(u); + T const Angle = glm::length(u); if (Angle < epsilon<T>()) return tquat<T, P>(); - tvec3<T, P> v(u / Angle); + tvec3<T, P> const v(u / Angle); return tquat<T, P>(cos(Angle), sin(Angle) * v); } template <typename T, precision P> - GLM_FUNC_QUALIFIER tquat<T, P> log - ( - tquat<T, P> const & q - ) + GLM_FUNC_QUALIFIER tquat<T, P> log(tquat<T, P> const& q) { tvec3<T, P> u(q.x, q.y, q.z); T Vec3Len = length(u); @@ -139,36 +96,25 @@ namespace glm T Angle = acos(x.w / magnitude); T NewAngle = Angle * y; T Div = sin(NewAngle) / sin(Angle); - T Mag = pow(magnitude, y-1); + T Mag = pow(magnitude, y - static_cast<T>(1)); return tquat<T, P>(cos(NewAngle) * magnitude * Mag, x.x * Div * Mag, x.y * Div * Mag, x.z * Div * Mag); } template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec3<T, P> rotate - ( - tquat<T, P> const & q, - tvec3<T, P> const & v - ) + GLM_FUNC_QUALIFIER tvec3<T, P> rotate(tquat<T, P> const& q, tvec3<T, P> const& v) { return q * v; } template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec4<T, P> rotate - ( - tquat<T, P> const & q, - tvec4<T, P> const & v - ) + GLM_FUNC_QUALIFIER tvec4<T, P> rotate(tquat<T, P> const& q, tvec4<T, P> const& v) { return q * v; } template <typename T, precision P> - GLM_FUNC_QUALIFIER T extractRealComponent - ( - tquat<T, P> const & q - ) + GLM_FUNC_QUALIFIER T extractRealComponent(tquat<T, P> const& q) { T w = static_cast<T>(1) - q.x * q.x - q.y * q.y - q.z * q.z; if(w < T(0)) @@ -178,21 +124,13 @@ namespace glm } template <typename T, precision P> - GLM_FUNC_QUALIFIER T length2 - ( - tquat<T, P> const & q - ) + GLM_FUNC_QUALIFIER T length2(tquat<T, P> const& q) { return q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w; } template <typename T, precision P> - GLM_FUNC_QUALIFIER tquat<T, P> shortMix - ( - tquat<T, P> const & x, - tquat<T, P> const & y, - T const & a - ) + GLM_FUNC_QUALIFIER tquat<T, P> shortMix(tquat<T, P> const& x, tquat<T, P> const& y, T const& a) { if(a <= static_cast<T>(0)) return x; if(a >= static_cast<T>(1)) return y; @@ -229,22 +167,13 @@ namespace glm } template <typename T, precision P> - GLM_FUNC_QUALIFIER tquat<T, P> fastMix - ( - tquat<T, P> const & x, - tquat<T, P> const & y, - T const & a - ) + GLM_FUNC_QUALIFIER tquat<T, P> fastMix(tquat<T, P> const& x, tquat<T, P> const& y, T const & a) { return glm::normalize(x * (static_cast<T>(1) - a) + (y * a)); } template <typename T, precision P> - GLM_FUNC_QUALIFIER tquat<T, P> rotation - ( - tvec3<T, P> const & orig, - tvec3<T, P> const & dest - ) + GLM_FUNC_QUALIFIER tquat<T, P> rotation(tvec3<T, P> const& orig, tvec3<T, P> const& dest) { T cosTheta = dot(orig, dest); tvec3<T, P> rotationAxis; diff --git a/3rdparty/glm/glm/gtx/range.hpp b/3rdparty/glm/glm/gtx/range.hpp index 9fb2bb54c45..00d78b41406 100644 --- a/3rdparty/glm/glm/gtx/range.hpp +++ b/3rdparty/glm/glm/gtx/range.hpp @@ -1,32 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_range /// @file glm/gtx/range.hpp -/// @date 2014-09-19 / 2014-09-19 /// @author Joshua Moerman /// /// @defgroup gtx_range GLM_GTX_range @@ -36,7 +9,6 @@ /// The range is defined over the elements, not over columns or rows (e.g. mat4 has 16 elements). /// /// <glm/gtx/range.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/gtx/raw_data.hpp b/3rdparty/glm/glm/gtx/raw_data.hpp index b30c246af12..2625fd11e07 100644 --- a/3rdparty/glm/glm/gtx/raw_data.hpp +++ b/3rdparty/glm/glm/gtx/raw_data.hpp @@ -1,43 +1,14 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_raw_data /// @file glm/gtx/raw_data.hpp -/// @date 2008-11-19 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtx_raw_data GLM_GTX_raw_data /// @ingroup gtx -/// +/// /// @brief Projection of a vector to other one -/// +/// /// <glm/gtx/raw_data.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -45,7 +16,7 @@ #include "../detail/setup.hpp" #include "../detail/type_int.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_raw_data extension included") #endif diff --git a/3rdparty/glm/glm/gtx/raw_data.inl b/3rdparty/glm/glm/gtx/raw_data.inl index f573a720e93..29af1481e13 100644 --- a/3rdparty/glm/glm/gtx/raw_data.inl +++ b/3rdparty/glm/glm/gtx/raw_data.inl @@ -1,31 +1,2 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_raw_data /// @file glm/gtx/raw_data.inl -/// @date 2008-11-19 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// diff --git a/3rdparty/glm/glm/gtx/rotate_normalized_axis.hpp b/3rdparty/glm/glm/gtx/rotate_normalized_axis.hpp index 9deba38f79d..f1dfa7b8ce8 100644 --- a/3rdparty/glm/glm/gtx/rotate_normalized_axis.hpp +++ b/3rdparty/glm/glm/gtx/rotate_normalized_axis.hpp @@ -1,45 +1,16 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_rotate_normalized_axis /// @file glm/gtx/rotate_normalized_axis.hpp -/// @date 2012-12-13 / 2012-12-13 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtc_matrix_transform /// @see gtc_quaternion -/// +/// /// @defgroup gtx_rotate_normalized_axis GLM_GTX_rotate_normalized_axis /// @ingroup gtx -/// +/// /// @brief Quaternions and matrices rotations around normalized axis. -/// +/// /// <glm/gtx/rotate_normalized_axis.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -48,7 +19,7 @@ #include "../gtc/epsilon.hpp" #include "../gtc/quaternion.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_rotate_normalized_axis extension included") #endif diff --git a/3rdparty/glm/glm/gtx/rotate_normalized_axis.inl b/3rdparty/glm/glm/gtx/rotate_normalized_axis.inl index 9bb257ca86d..dc1b1a85003 100644 --- a/3rdparty/glm/glm/gtx/rotate_normalized_axis.inl +++ b/3rdparty/glm/glm/gtx/rotate_normalized_axis.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_rotate_normalized_axis /// @file glm/gtx/rotate_normalized_axis.inl -/// @date 2012-12-13 / 2012-12-13 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/rotate_vector.hpp b/3rdparty/glm/glm/gtx/rotate_vector.hpp index 36a45d5f0ec..91d1784d9a7 100644 --- a/3rdparty/glm/glm/gtx/rotate_vector.hpp +++ b/3rdparty/glm/glm/gtx/rotate_vector.hpp @@ -1,44 +1,15 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_rotate_vector /// @file glm/gtx/rotate_vector.hpp -/// @date 2006-11-02 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtx_transform (dependence) /// /// @defgroup gtx_rotate_vector GLM_GTX_rotate_vector /// @ingroup gtx -/// +/// /// @brief Function to directly rotate a vector -/// +/// /// <glm/gtx/rotate_vector.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -46,7 +17,7 @@ #include "../glm.hpp" #include "../gtx/transform.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_rotate_vector extension included") #endif diff --git a/3rdparty/glm/glm/gtx/rotate_vector.inl b/3rdparty/glm/glm/gtx/rotate_vector.inl index cdac5744bdb..5620e96c53b 100644 --- a/3rdparty/glm/glm/gtx/rotate_vector.inl +++ b/3rdparty/glm/glm/gtx/rotate_vector.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_rotate_vector /// @file glm/gtx/rotate_vector.inl -/// @date 2006-11-02 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/scalar_multiplication.hpp b/3rdparty/glm/glm/gtx/scalar_multiplication.hpp index 3b34d2b3b30..695e841c3a7 100644 --- a/3rdparty/glm/glm/gtx/scalar_multiplication.hpp +++ b/3rdparty/glm/glm/gtx/scalar_multiplication.hpp @@ -1,32 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx /// @file glm/gtx/scalar_multiplication.hpp -/// @date 2014-09-22 / 2014-09-22 /// @author Joshua Moerman /// /// @brief Enables scalar multiplication for all types @@ -36,8 +9,6 @@ /// int * vec4 /// vec4 / int /// So we'll fix that! Of course "float * vec4" should remain the same (hence the enable_if magic) -/// -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/gtx/scalar_relational.hpp b/3rdparty/glm/glm/gtx/scalar_relational.hpp index 8e855e60ce1..969571657cc 100644 --- a/3rdparty/glm/glm/gtx/scalar_relational.hpp +++ b/3rdparty/glm/glm/gtx/scalar_relational.hpp @@ -1,50 +1,21 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_scalar_relational /// @file glm/gtx/scalar_relational.hpp -/// @date 2013-02-04 / 2013-02-04 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtx_scalar_relational GLM_GTX_scalar_relational /// @ingroup gtx -/// +/// /// @brief Extend a position from a source to a position at a defined length. -/// +/// /// <glm/gtx/scalar_relational.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../glm.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_extend extension included") #endif diff --git a/3rdparty/glm/glm/gtx/scalar_relational.inl b/3rdparty/glm/glm/gtx/scalar_relational.inl index b28c8cfeeb1..709da04c9c1 100644 --- a/3rdparty/glm/glm/gtx/scalar_relational.inl +++ b/3rdparty/glm/glm/gtx/scalar_relational.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_scalar_relational /// @file glm/gtx/scalar_relational.inl -/// @date 2013-02-04 / 2013-02-04 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/simd_mat4.hpp b/3rdparty/glm/glm/gtx/simd_mat4.hpp deleted file mode 100644 index ae5790aec37..00000000000 --- a/3rdparty/glm/glm/gtx/simd_mat4.hpp +++ /dev/null @@ -1,210 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_simd_mat4 -/// @file glm/gtx/simd_mat4.hpp -/// @date 2009-05-07 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_simd_mat4 GLM_GTX_simd_mat4 -/// @ingroup gtx -/// -/// @brief SIMD implementation of mat4 type. -/// -/// <glm/gtx/simd_mat4.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#pragma once - -// Dependencies -#include "../detail/setup.hpp" - -#if(GLM_ARCH != GLM_ARCH_PURE) - -#if(GLM_ARCH & GLM_ARCH_SSE2) -# include "../detail/intrinsic_matrix.hpp" -# include "../gtx/simd_vec4.hpp" -#else -# error "GLM: GLM_GTX_simd_mat4 requires compiler support of SSE2 through intrinsics" -#endif - -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) -# pragma message("GLM: GLM_GTX_simd_mat4 extension included") -#endif - -namespace glm{ -namespace detail -{ - /// 4x4 Matrix implemented using SIMD SEE intrinsics. - /// \ingroup gtx_simd_mat4 - GLM_ALIGNED_STRUCT(16) fmat4x4SIMD - { - typedef float value_type; - typedef fvec4SIMD col_type; - typedef fvec4SIMD row_type; - typedef std::size_t size_type; - typedef fmat4x4SIMD type; - typedef fmat4x4SIMD transpose_type; - - typedef tmat4x4<float, defaultp> pure_type; - typedef tvec4<float, defaultp> pure_row_type; - typedef tvec4<float, defaultp> pure_col_type; - typedef tmat4x4<float, defaultp> pure_transpose_type; - - GLM_FUNC_DECL length_t length() const; - - fvec4SIMD Data[4]; - - ////////////////////////////////////// - // Constructors - - fmat4x4SIMD() GLM_DEFAULT_CTOR; - explicit fmat4x4SIMD(float const & s); - explicit fmat4x4SIMD( - float const & x0, float const & y0, float const & z0, float const & w0, - float const & x1, float const & y1, float const & z1, float const & w1, - float const & x2, float const & y2, float const & z2, float const & w2, - float const & x3, float const & y3, float const & z3, float const & w3); - explicit fmat4x4SIMD( - fvec4SIMD const & v0, - fvec4SIMD const & v1, - fvec4SIMD const & v2, - fvec4SIMD const & v3); - explicit fmat4x4SIMD( - mat4x4 const & m); - explicit fmat4x4SIMD( - __m128 const in[4]); - - // Conversions - //template <typename U> - //explicit tmat4x4(tmat4x4<U> const & m); - - //explicit tmat4x4(tmat2x2<T> const & x); - //explicit tmat4x4(tmat3x3<T> const & x); - //explicit tmat4x4(tmat2x3<T> const & x); - //explicit tmat4x4(tmat3x2<T> const & x); - //explicit tmat4x4(tmat2x4<T> const & x); - //explicit tmat4x4(tmat4x2<T> const & x); - //explicit tmat4x4(tmat3x4<T> const & x); - //explicit tmat4x4(tmat4x3<T> const & x); - - // Accesses - fvec4SIMD & operator[](length_t i); - fvec4SIMD const & operator[](length_t i) const; - - // Unary updatable operators - fmat4x4SIMD & operator= (fmat4x4SIMD const & m) GLM_DEFAULT; - fmat4x4SIMD & operator+= (float const & s); - fmat4x4SIMD & operator+= (fmat4x4SIMD const & m); - fmat4x4SIMD & operator-= (float const & s); - fmat4x4SIMD & operator-= (fmat4x4SIMD const & m); - fmat4x4SIMD & operator*= (float const & s); - fmat4x4SIMD & operator*= (fmat4x4SIMD const & m); - fmat4x4SIMD & operator/= (float const & s); - fmat4x4SIMD & operator/= (fmat4x4SIMD const & m); - fmat4x4SIMD & operator++ (); - fmat4x4SIMD & operator-- (); - }; - - // Binary operators - fmat4x4SIMD operator+ (fmat4x4SIMD const & m, float const & s); - fmat4x4SIMD operator+ (float const & s, fmat4x4SIMD const & m); - fmat4x4SIMD operator+ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); - - fmat4x4SIMD operator- (fmat4x4SIMD const & m, float const & s); - fmat4x4SIMD operator- (float const & s, fmat4x4SIMD const & m); - fmat4x4SIMD operator- (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); - - fmat4x4SIMD operator* (fmat4x4SIMD const & m, float const & s); - fmat4x4SIMD operator* (float const & s, fmat4x4SIMD const & m); - - fvec4SIMD operator* (fmat4x4SIMD const & m, fvec4SIMD const & v); - fvec4SIMD operator* (fvec4SIMD const & v, fmat4x4SIMD const & m); - - fmat4x4SIMD operator* (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); - - fmat4x4SIMD operator/ (fmat4x4SIMD const & m, float const & s); - fmat4x4SIMD operator/ (float const & s, fmat4x4SIMD const & m); - - fvec4SIMD operator/ (fmat4x4SIMD const & m, fvec4SIMD const & v); - fvec4SIMD operator/ (fvec4SIMD const & v, fmat4x4SIMD const & m); - - fmat4x4SIMD operator/ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); - - // Unary constant operators - fmat4x4SIMD const operator- (fmat4x4SIMD const & m); - fmat4x4SIMD const operator-- (fmat4x4SIMD const & m, int); - fmat4x4SIMD const operator++ (fmat4x4SIMD const & m, int); -}//namespace detail - - typedef detail::fmat4x4SIMD simdMat4; - - /// @addtogroup gtx_simd_mat4 - /// @{ - - //! Convert a simdMat4 to a mat4. - //! (From GLM_GTX_simd_mat4 extension) - mat4 mat4_cast( - detail::fmat4x4SIMD const & x); - - //! 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 GLM_GTX_simd_mat4 extension). - detail::fmat4x4SIMD matrixCompMult( - detail::fmat4x4SIMD const & x, - detail::fmat4x4SIMD 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 GLM_GTX_simd_mat4 extension). - detail::fmat4x4SIMD outerProduct( - detail::fvec4SIMD const & c, - detail::fvec4SIMD const & r); - - //! Returns the transposed matrix of x - //! (From GLM_GTX_simd_mat4 extension). - detail::fmat4x4SIMD transpose( - detail::fmat4x4SIMD const & x); - - //! Return the determinant of a mat4 matrix. - //! (From GLM_GTX_simd_mat4 extension). - float determinant( - detail::fmat4x4SIMD const & m); - - //! Return the inverse of a mat4 matrix. - //! (From GLM_GTX_simd_mat4 extension). - detail::fmat4x4SIMD inverse( - detail::fmat4x4SIMD const & m); - - /// @} -}// namespace glm - -#include "simd_mat4.inl" - -#endif//(GLM_ARCH != GLM_ARCH_PURE) diff --git a/3rdparty/glm/glm/gtx/simd_mat4.inl b/3rdparty/glm/glm/gtx/simd_mat4.inl deleted file mode 100644 index 13dcb20f0e7..00000000000 --- a/3rdparty/glm/glm/gtx/simd_mat4.inl +++ /dev/null @@ -1,606 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_simd_mat4 -/// @file glm/gtx/simd_mat4.inl -/// @date 2009-05-07 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////////////////////// - -namespace glm{ -namespace detail{ - -GLM_FUNC_QUALIFIER length_t fmat4x4SIMD::length() const -{ - return 4; -} - -////////////////////////////////////// -// Accesses - -GLM_FUNC_QUALIFIER fvec4SIMD & fmat4x4SIMD::operator[] -( - length_t i -) -{ - assert(i < this->length()); - - return this->Data[i]; -} - -GLM_FUNC_QUALIFIER fvec4SIMD const & fmat4x4SIMD::operator[] -( - length_t i -) const -{ - assert(i < this->length()); - - return this->Data[i]; -} - -////////////////////////////////////////////////////////////// -// Constructors - -#if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) - GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD() - { -# ifndef GLM_FORCE_NO_CTOR_INIT - this->Data[0] = fvec4SIMD(1, 0, 0, 0); - this->Data[1] = fvec4SIMD(0, 1, 0, 0); - this->Data[2] = fvec4SIMD(0, 0, 1, 0); - this->Data[3] = fvec4SIMD(0, 0, 0, 1); -# endif - } -# endif//!GLM_HAS_DEFAULTED_FUNCTIONS - -GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD(float const & s) -{ - this->Data[0] = fvec4SIMD(s, 0, 0, 0); - this->Data[1] = fvec4SIMD(0, s, 0, 0); - this->Data[2] = fvec4SIMD(0, 0, s, 0); - this->Data[3] = fvec4SIMD(0, 0, 0, s); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD -( - float const & x0, float const & y0, float const & z0, float const & w0, - float const & x1, float const & y1, float const & z1, float const & w1, - float const & x2, float const & y2, float const & z2, float const & w2, - float const & x3, float const & y3, float const & z3, float const & w3 -) -{ - this->Data[0] = fvec4SIMD(x0, y0, z0, w0); - this->Data[1] = fvec4SIMD(x1, y1, z1, w1); - this->Data[2] = fvec4SIMD(x2, y2, z2, w2); - this->Data[3] = fvec4SIMD(x3, y3, z3, w3); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD -( - fvec4SIMD const & v0, - fvec4SIMD const & v1, - fvec4SIMD const & v2, - fvec4SIMD const & v3 -) -{ - this->Data[0] = v0; - this->Data[1] = v1; - this->Data[2] = v2; - this->Data[3] = v3; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD -( - mat4 const & m -) -{ - this->Data[0] = fvec4SIMD(m[0]); - this->Data[1] = fvec4SIMD(m[1]); - this->Data[2] = fvec4SIMD(m[2]); - this->Data[3] = fvec4SIMD(m[3]); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD -( - __m128 const in[4] -) -{ - this->Data[0] = in[0]; - this->Data[1] = in[1]; - this->Data[2] = in[2]; - this->Data[3] = in[3]; -} - -////////////////////////////////////////////////////////////// -// mat4 operators - -#if !GLM_HAS_DEFAULTED_FUNCTIONS - GLM_FUNC_QUALIFIER fmat4x4SIMD& fmat4x4SIMD::operator= - ( - fmat4x4SIMD const & m - ) - { - this->Data[0] = m[0]; - this->Data[1] = m[1]; - this->Data[2] = m[2]; - this->Data[3] = m[3]; - return *this; - } -#endif//!GLM_HAS_DEFAULTED_FUNCTIONS - -GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator+= -( - fmat4x4SIMD const & m -) -{ - this->Data[0].Data = _mm_add_ps(this->Data[0].Data, m[0].Data); - this->Data[1].Data = _mm_add_ps(this->Data[1].Data, m[1].Data); - this->Data[2].Data = _mm_add_ps(this->Data[2].Data, m[2].Data); - this->Data[3].Data = _mm_add_ps(this->Data[3].Data, m[3].Data); - return *this; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-= -( - fmat4x4SIMD const & m -) -{ - this->Data[0].Data = _mm_sub_ps(this->Data[0].Data, m[0].Data); - this->Data[1].Data = _mm_sub_ps(this->Data[1].Data, m[1].Data); - this->Data[2].Data = _mm_sub_ps(this->Data[2].Data, m[2].Data); - this->Data[3].Data = _mm_sub_ps(this->Data[3].Data, m[3].Data); - - return *this; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator*= -( - fmat4x4SIMD const & m -) -{ - sse_mul_ps(&this->Data[0].Data, &m.Data[0].Data, &this->Data[0].Data); - return *this; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator/= -( - fmat4x4SIMD const & m -) -{ - __m128 Inv[4]; - sse_inverse_ps(&m.Data[0].Data, Inv); - sse_mul_ps(&this->Data[0].Data, Inv, &this->Data[0].Data); - return *this; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator+= -( - float const & s -) -{ - __m128 Operand = _mm_set_ps1(s); - this->Data[0].Data = _mm_add_ps(this->Data[0].Data, Operand); - this->Data[1].Data = _mm_add_ps(this->Data[1].Data, Operand); - this->Data[2].Data = _mm_add_ps(this->Data[2].Data, Operand); - this->Data[3].Data = _mm_add_ps(this->Data[3].Data, Operand); - return *this; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-= -( - float const & s -) -{ - __m128 Operand = _mm_set_ps1(s); - this->Data[0].Data = _mm_sub_ps(this->Data[0].Data, Operand); - this->Data[1].Data = _mm_sub_ps(this->Data[1].Data, Operand); - this->Data[2].Data = _mm_sub_ps(this->Data[2].Data, Operand); - this->Data[3].Data = _mm_sub_ps(this->Data[3].Data, Operand); - return *this; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator*= -( - float const & s -) -{ - __m128 Operand = _mm_set_ps1(s); - this->Data[0].Data = _mm_mul_ps(this->Data[0].Data, Operand); - this->Data[1].Data = _mm_mul_ps(this->Data[1].Data, Operand); - this->Data[2].Data = _mm_mul_ps(this->Data[2].Data, Operand); - this->Data[3].Data = _mm_mul_ps(this->Data[3].Data, Operand); - return *this; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator/= -( - float const & s -) -{ - __m128 Operand = _mm_div_ps(one, _mm_set_ps1(s)); - this->Data[0].Data = _mm_mul_ps(this->Data[0].Data, Operand); - this->Data[1].Data = _mm_mul_ps(this->Data[1].Data, Operand); - this->Data[2].Data = _mm_mul_ps(this->Data[2].Data, Operand); - this->Data[3].Data = _mm_mul_ps(this->Data[3].Data, Operand); - return *this; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator++ () -{ - this->Data[0].Data = _mm_add_ps(this->Data[0].Data, one); - this->Data[1].Data = _mm_add_ps(this->Data[1].Data, one); - this->Data[2].Data = _mm_add_ps(this->Data[2].Data, one); - this->Data[3].Data = _mm_add_ps(this->Data[3].Data, one); - return *this; -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-- () -{ - this->Data[0].Data = _mm_sub_ps(this->Data[0].Data, one); - this->Data[1].Data = _mm_sub_ps(this->Data[1].Data, one); - this->Data[2].Data = _mm_sub_ps(this->Data[2].Data, one); - this->Data[3].Data = _mm_sub_ps(this->Data[3].Data, one); - return *this; -} - - -////////////////////////////////////////////////////////////// -// Binary operators - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator+ -( - const fmat4x4SIMD &m, - float const & s -) -{ - return detail::fmat4x4SIMD - ( - m[0] + s, - m[1] + s, - m[2] + s, - m[3] + s - ); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator+ -( - float const & s, - const fmat4x4SIMD &m -) -{ - return detail::fmat4x4SIMD - ( - m[0] + s, - m[1] + s, - m[2] + s, - m[3] + s - ); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator+ -( - const fmat4x4SIMD &m1, - const fmat4x4SIMD &m2 -) -{ - return detail::fmat4x4SIMD - ( - m1[0] + m2[0], - m1[1] + m2[1], - m1[2] + m2[2], - m1[3] + m2[3] - ); -} - - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator- -( - const fmat4x4SIMD &m, - float const & s -) -{ - return detail::fmat4x4SIMD - ( - m[0] - s, - m[1] - s, - m[2] - s, - m[3] - s - ); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator- -( - float const & s, - const fmat4x4SIMD &m -) -{ - return detail::fmat4x4SIMD - ( - s - m[0], - s - m[1], - s - m[2], - s - m[3] - ); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator- -( - const fmat4x4SIMD &m1, - const fmat4x4SIMD &m2 -) -{ - return detail::fmat4x4SIMD - ( - m1[0] - m2[0], - m1[1] - m2[1], - m1[2] - m2[2], - m1[3] - m2[3] - ); -} - - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator* -( - const fmat4x4SIMD &m, - float const & s -) -{ - return detail::fmat4x4SIMD - ( - m[0] * s, - m[1] * s, - m[2] * s, - m[3] * s - ); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator* -( - float const & s, - const fmat4x4SIMD &m -) -{ - return detail::fmat4x4SIMD - ( - m[0] * s, - m[1] * s, - m[2] * s, - m[3] * s - ); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator* -( - const fmat4x4SIMD &m, - fvec4SIMD const & v -) -{ - return sse_mul_ps(&m.Data[0].Data, v.Data); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator* -( - fvec4SIMD const & v, - const fmat4x4SIMD &m -) -{ - return sse_mul_ps(v.Data, &m.Data[0].Data); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator* -( - const fmat4x4SIMD &m1, - const fmat4x4SIMD &m2 -) -{ - fmat4x4SIMD result; - sse_mul_ps(&m1.Data[0].Data, &m2.Data[0].Data, &result.Data[0].Data); - - return result; -} - - - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator/ -( - const fmat4x4SIMD &m, - float const & s -) -{ - return detail::fmat4x4SIMD - ( - m[0] / s, - m[1] / s, - m[2] / s, - m[3] / s - ); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator/ -( - float const & s, - const fmat4x4SIMD &m -) -{ - return detail::fmat4x4SIMD - ( - s / m[0], - s / m[1], - s / m[2], - s / m[3] - ); -} - -GLM_FUNC_QUALIFIER detail::fmat4x4SIMD inverse(detail::fmat4x4SIMD const & m) -{ - detail::fmat4x4SIMD result; - detail::sse_inverse_ps(&m[0].Data, &result[0].Data); - return result; -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator/ -( - const fmat4x4SIMD & m, - fvec4SIMD const & v -) -{ - return inverse(m) * v; -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator/ -( - fvec4SIMD const & v, - const fmat4x4SIMD &m -) -{ - return v * inverse(m); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD operator/ -( - const fmat4x4SIMD &m1, - const fmat4x4SIMD &m2 -) -{ - __m128 result[4]; - __m128 inv[4]; - - sse_inverse_ps(&m2.Data[0].Data, inv); - sse_mul_ps(&m1.Data[0].Data, inv, result); - - return fmat4x4SIMD(result); -} - - -////////////////////////////////////////////////////////////// -// Unary constant operators -GLM_FUNC_QUALIFIER fmat4x4SIMD const operator- -( - fmat4x4SIMD const & m -) -{ - return detail::fmat4x4SIMD - ( - -m[0], - -m[1], - -m[2], - -m[3] - ); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD const operator-- -( - fmat4x4SIMD const & m, - int -) -{ - return detail::fmat4x4SIMD - ( - m[0] - 1.0f, - m[1] - 1.0f, - m[2] - 1.0f, - m[3] - 1.0f - ); -} - -GLM_FUNC_QUALIFIER fmat4x4SIMD const operator++ -( - fmat4x4SIMD const & m, - int -) -{ - return detail::fmat4x4SIMD - ( - m[0] + 1.0f, - m[1] + 1.0f, - m[2] + 1.0f, - m[3] + 1.0f - ); -} - -}//namespace detail - -GLM_FUNC_QUALIFIER mat4 mat4_cast -( - detail::fmat4x4SIMD const & x -) -{ - GLM_ALIGN(16) mat4 Result; - _mm_store_ps(&Result[0][0], x.Data[0].Data); - _mm_store_ps(&Result[1][0], x.Data[1].Data); - _mm_store_ps(&Result[2][0], x.Data[2].Data); - _mm_store_ps(&Result[3][0], x.Data[3].Data); - return Result; -} - -GLM_FUNC_QUALIFIER detail::fmat4x4SIMD matrixCompMult -( - detail::fmat4x4SIMD const & x, - detail::fmat4x4SIMD const & y -) -{ - detail::fmat4x4SIMD result; - result[0] = x[0] * y[0]; - result[1] = x[1] * y[1]; - result[2] = x[2] * y[2]; - result[3] = x[3] * y[3]; - return result; -} - -GLM_FUNC_QUALIFIER detail::fmat4x4SIMD outerProduct -( - detail::fvec4SIMD const & c, - detail::fvec4SIMD const & r -) -{ - __m128 Shu0 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(0, 0, 0, 0)); - __m128 Shu1 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(1, 1, 1, 1)); - __m128 Shu2 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(2, 2, 2, 2)); - __m128 Shu3 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(3, 3, 3, 3)); - - detail::fmat4x4SIMD result(uninitialize); - result[0].Data = _mm_mul_ps(c.Data, Shu0); - result[1].Data = _mm_mul_ps(c.Data, Shu1); - result[2].Data = _mm_mul_ps(c.Data, Shu2); - result[3].Data = _mm_mul_ps(c.Data, Shu3); - return result; -} - -GLM_FUNC_QUALIFIER detail::fmat4x4SIMD transpose(detail::fmat4x4SIMD const & m) -{ - detail::fmat4x4SIMD result; - detail::sse_transpose_ps(&m[0].Data, &result[0].Data); - return result; -} - -GLM_FUNC_QUALIFIER float determinant(detail::fmat4x4SIMD const & m) -{ - float Result; - _mm_store_ss(&Result, detail::sse_det_ps(&m[0].Data)); - return Result; -} - -}//namespace glm diff --git a/3rdparty/glm/glm/gtx/simd_quat.hpp b/3rdparty/glm/glm/gtx/simd_quat.hpp deleted file mode 100644 index d06093eb633..00000000000 --- a/3rdparty/glm/glm/gtx/simd_quat.hpp +++ /dev/null @@ -1,335 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_simd_quat -/// @file glm/gtx/simd_quat.hpp -/// @date 2013-04-22 / 2014-11-25 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_simd_quat GLM_GTX_simd_quat -/// @ingroup gtx -/// -/// @brief SIMD implementation of quat type. -/// -/// <glm/gtx/simd_quat.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#pragma once - -// Dependency: -#include "../glm.hpp" -#include "../gtc/quaternion.hpp" -#include "../gtx/fast_trigonometry.hpp" - -#if(GLM_ARCH != GLM_ARCH_PURE) - -#if(GLM_ARCH & GLM_ARCH_SSE2) -# include "../gtx/simd_mat4.hpp" -#else -# error "GLM: GLM_GTX_simd_quat requires compiler support of SSE2 through intrinsics" -#endif - -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) -# pragma message("GLM: GLM_GTX_simd_quat extension included") -#endif - -// Warning silencer for nameless struct/union. -#if (GLM_COMPILER & GLM_COMPILER_VC) -# pragma warning(push) -# pragma warning(disable:4201) // warning C4201: nonstandard extension used : nameless struct/union -#endif - -namespace glm{ -namespace detail -{ - GLM_ALIGNED_STRUCT(16) fquatSIMD - { - typedef float value_type; - typedef std::size_t size_type; - - typedef fquatSIMD type; - typedef tquat<bool, defaultp> bool_type; - typedef tquat<float, defaultp> pure_type; - -#ifdef GLM_SIMD_ENABLE_XYZW_UNION - union - { - __m128 Data; - struct {float x, y, z, w;}; - }; -#else - __m128 Data; -#endif - - ////////////////////////////////////// - // Implicit basic constructors - - fquatSIMD() GLM_DEFAULT_CTOR; - fquatSIMD(fquatSIMD const & q) GLM_DEFAULT; - fquatSIMD(__m128 const & Data); - - ////////////////////////////////////// - // Explicit basic constructors - - explicit fquatSIMD( - ctor); - explicit fquatSIMD( - float const & w, - float const & x, - float const & y, - float const & z); - explicit fquatSIMD( - quat const & v); - explicit fquatSIMD( - vec3 const & eulerAngles); - - - ////////////////////////////////////// - // Unary arithmetic operators - - fquatSIMD& operator= (fquatSIMD const & q) GLM_DEFAULT; - fquatSIMD& operator*=(float const & s); - fquatSIMD& operator/=(float const & s); - }; - - - ////////////////////////////////////// - // Arithmetic operators - - detail::fquatSIMD operator- ( - detail::fquatSIMD const & q); - - detail::fquatSIMD operator+ ( - detail::fquatSIMD const & q, - detail::fquatSIMD const & p); - - detail::fquatSIMD operator* ( - detail::fquatSIMD const & q, - detail::fquatSIMD const & p); - - detail::fvec4SIMD operator* ( - detail::fquatSIMD const & q, - detail::fvec4SIMD const & v); - - detail::fvec4SIMD operator* ( - detail::fvec4SIMD const & v, - detail::fquatSIMD const & q); - - detail::fquatSIMD operator* ( - detail::fquatSIMD const & q, - float s); - - detail::fquatSIMD operator* ( - float s, - detail::fquatSIMD const & q); - - detail::fquatSIMD operator/ ( - detail::fquatSIMD const & q, - float s); - -}//namespace detail - - /// @addtogroup gtx_simd_quat - /// @{ - - typedef glm::detail::fquatSIMD simdQuat; - - //! Convert a simdQuat to a quat. - /// @see gtx_simd_quat - quat quat_cast( - detail::fquatSIMD const & x); - - //! Convert a simdMat4 to a simdQuat. - /// @see gtx_simd_quat - detail::fquatSIMD quatSIMD_cast( - detail::fmat4x4SIMD const & m); - - //! Converts a mat4 to a simdQuat. - /// @see gtx_simd_quat - template <typename T, precision P> - detail::fquatSIMD quatSIMD_cast( - tmat4x4<T, P> const & m); - - //! Converts a mat3 to a simdQuat. - /// @see gtx_simd_quat - template <typename T, precision P> - detail::fquatSIMD quatSIMD_cast( - tmat3x3<T, P> const & m); - - //! Convert a simdQuat to a simdMat4 - /// @see gtx_simd_quat - detail::fmat4x4SIMD mat4SIMD_cast( - detail::fquatSIMD const & q); - - //! Converts a simdQuat to a standard mat4. - /// @see gtx_simd_quat - mat4 mat4_cast( - detail::fquatSIMD const & q); - - - /// Returns the length of the quaternion. - /// - /// @see gtx_simd_quat - float length( - detail::fquatSIMD const & x); - - /// Returns the normalized quaternion. - /// - /// @see gtx_simd_quat - detail::fquatSIMD normalize( - detail::fquatSIMD const & x); - - /// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ... - /// - /// @see gtx_simd_quat - float dot( - detail::fquatSIMD const & q1, - detail::fquatSIMD const & q2); - - /// Spherical linear interpolation of two quaternions. - /// The interpolation is oriented and the rotation is performed at constant speed. - /// For short path spherical linear interpolation, use the slerp function. - /// - /// @param x A quaternion - /// @param y A quaternion - /// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1]. - /// @tparam T Value type used to build the quaternion. Supported: half, float or double. - /// @see gtx_simd_quat - /// @see - slerp(detail::fquatSIMD const & x, detail::fquatSIMD const & y, T const & a) - detail::fquatSIMD mix( - detail::fquatSIMD const & x, - detail::fquatSIMD const & y, - float const & a); - - /// Linear interpolation of two quaternions. - /// The interpolation is oriented. - /// - /// @param x A quaternion - /// @param y A quaternion - /// @param a Interpolation factor. The interpolation is defined in the range [0, 1]. - /// @tparam T Value type used to build the quaternion. Supported: half, float or double. - /// @see gtx_simd_quat - detail::fquatSIMD lerp( - detail::fquatSIMD const & x, - detail::fquatSIMD const & y, - float const & a); - - /// Spherical linear interpolation of two quaternions. - /// The interpolation always take the short path and the rotation is performed at constant speed. - /// - /// @param x A quaternion - /// @param y A quaternion - /// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1]. - /// @tparam T Value type used to build the quaternion. Supported: half, float or double. - /// @see gtx_simd_quat - detail::fquatSIMD slerp( - detail::fquatSIMD const & x, - detail::fquatSIMD const & y, - float const & a); - - - /// Faster spherical linear interpolation of two unit length quaternions. - /// - /// This is the same as mix(), except for two rules: - /// 1) The two quaternions must be unit length. - /// 2) The interpolation factor (a) must be in the range [0, 1]. - /// - /// This will use the equivalent to fastAcos() and fastSin(). - /// - /// @see gtx_simd_quat - /// @see - mix(detail::fquatSIMD const & x, detail::fquatSIMD const & y, T const & a) - detail::fquatSIMD fastMix( - detail::fquatSIMD const & x, - detail::fquatSIMD const & y, - float const & a); - - /// Identical to fastMix() except takes the shortest path. - /// - /// The same rules apply here as those in fastMix(). Both quaternions must be unit length and 'a' must be - /// in the range [0, 1]. - /// - /// @see - fastMix(detail::fquatSIMD const & x, detail::fquatSIMD const & y, T const & a) - /// @see - slerp(detail::fquatSIMD const & x, detail::fquatSIMD const & y, T const & a) - detail::fquatSIMD fastSlerp( - detail::fquatSIMD const & x, - detail::fquatSIMD const & y, - float const & a); - - - /// Returns the q conjugate. - /// - /// @see gtx_simd_quat - detail::fquatSIMD conjugate( - detail::fquatSIMD const & q); - - /// Returns the q inverse. - /// - /// @see gtx_simd_quat - detail::fquatSIMD inverse( - detail::fquatSIMD const & q); - - /// Build a quaternion from an angle and a normalized axis. - /// - /// @param angle Angle expressed in radians. - /// @param axis Axis of the quaternion, must be normalized. - /// - /// @see gtx_simd_quat - detail::fquatSIMD angleAxisSIMD( - float const & angle, - vec3 const & axis); - - /// Build a quaternion from an angle and a normalized axis. - /// - /// @param angle Angle expressed in radians. - /// @param x x component of the x-axis, x, y, z must be a normalized axis - /// @param y y component of the y-axis, x, y, z must be a normalized axis - /// @param z z component of the z-axis, x, y, z must be a normalized axis - /// - /// @see gtx_simd_quat - detail::fquatSIMD angleAxisSIMD( - float const & angle, - float const & x, - float const & y, - float const & z); - - // TODO: Move this to somewhere more appropriate. Used with fastMix() and fastSlerp(). - /// Performs the equivalent of glm::fastSin() on each component of the given __m128. - __m128 fastSin(__m128 x); - - /// @} -}//namespace glm - -#include "simd_quat.inl" - - -#if (GLM_COMPILER & GLM_COMPILER_VC) -# pragma warning(pop) -#endif - - -#endif//(GLM_ARCH != GLM_ARCH_PURE) diff --git a/3rdparty/glm/glm/gtx/simd_quat.inl b/3rdparty/glm/glm/gtx/simd_quat.inl deleted file mode 100644 index 1fe9c93f7f7..00000000000 --- a/3rdparty/glm/glm/gtx/simd_quat.inl +++ /dev/null @@ -1,649 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_simd_quat -/// @file glm/gtx/simd_quat.inl -/// @date 2013-04-22 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -namespace glm{ -namespace detail{ - - -////////////////////////////////////// -// Debugging -#if 0 -void print(__m128 v) -{ - GLM_ALIGN(16) float result[4]; - _mm_store_ps(result, v); - - printf("__m128: %f %f %f %f\n", result[0], result[1], result[2], result[3]); -} - -void print(const fvec4SIMD &v) -{ - printf("fvec4SIMD: %f %f %f %f\n", v.x, v.y, v.z, v.w); -} -#endif - -////////////////////////////////////// -// Implicit basic constructors - -# if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) - GLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD() -# ifdef GLM_FORCE_NO_CTOR_INIT - : Data(_mm_set_ps(1.0f, 0.0f, 0.0f, 0.0f)) -# endif - {} -# endif - -# if !GLM_HAS_DEFAULTED_FUNCTIONS - GLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(fquatSIMD const & q) : - Data(q.Data) - {} -# endif//!GLM_HAS_DEFAULTED_FUNCTIONS - -GLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(__m128 const & Data) : - Data(Data) -{} - -////////////////////////////////////// -// Explicit basic constructors - -GLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(float const & w, float const & x, float const & y, float const & z) : - Data(_mm_set_ps(w, z, y, x)) -{} - -GLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(quat const & q) : - Data(_mm_set_ps(q.w, q.z, q.y, q.x)) -{} - -GLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(vec3 const & eulerAngles) -{ - vec3 c = glm::cos(eulerAngles * 0.5f); - vec3 s = glm::sin(eulerAngles * 0.5f); - - Data = _mm_set_ps( - (c.x * c.y * c.z) + (s.x * s.y * s.z), - (c.x * c.y * s.z) - (s.x * s.y * c.z), - (c.x * s.y * c.z) + (s.x * c.y * s.z), - (s.x * c.y * c.z) - (c.x * s.y * s.z)); -} - - -////////////////////////////////////// -// Unary arithmetic operators - -#if !GLM_HAS_DEFAULTED_FUNCTIONS - GLM_FUNC_QUALIFIER fquatSIMD& fquatSIMD::operator=(fquatSIMD const & q) - { - this->Data = q.Data; - return *this; - } -#endif//!GLM_HAS_DEFAULTED_FUNCTIONS - -GLM_FUNC_QUALIFIER fquatSIMD& fquatSIMD::operator*=(float const & s) -{ - this->Data = _mm_mul_ps(this->Data, _mm_set_ps1(s)); - return *this; -} - -GLM_FUNC_QUALIFIER fquatSIMD& fquatSIMD::operator/=(float const & s) -{ - this->Data = _mm_div_ps(Data, _mm_set1_ps(s)); - return *this; -} - - - -// negate operator -GLM_FUNC_QUALIFIER fquatSIMD operator- (fquatSIMD const & q) -{ - return fquatSIMD(_mm_mul_ps(q.Data, _mm_set_ps(-1.0f, -1.0f, -1.0f, -1.0f))); -} - -// operator+ -GLM_FUNC_QUALIFIER fquatSIMD operator+ (fquatSIMD const & q1, fquatSIMD const & q2) -{ - return fquatSIMD(_mm_add_ps(q1.Data, q2.Data)); -} - -//operator* -GLM_FUNC_QUALIFIER fquatSIMD operator* (fquatSIMD const & q1, fquatSIMD const & q2) -{ - // SSE2 STATS: - // 11 shuffle - // 8 mul - // 8 add - - // SSE4 STATS: - // 3 shuffle - // 4 mul - // 4 dpps - - __m128 mul0 = _mm_mul_ps(q1.Data, _mm_shuffle_ps(q2.Data, q2.Data, _MM_SHUFFLE(0, 1, 2, 3))); - __m128 mul1 = _mm_mul_ps(q1.Data, _mm_shuffle_ps(q2.Data, q2.Data, _MM_SHUFFLE(1, 0, 3, 2))); - __m128 mul2 = _mm_mul_ps(q1.Data, _mm_shuffle_ps(q2.Data, q2.Data, _MM_SHUFFLE(2, 3, 0, 1))); - __m128 mul3 = _mm_mul_ps(q1.Data, q2.Data); - -# if((GLM_ARCH & GLM_ARCH_SSE4)) - __m128 add0 = _mm_dp_ps(mul0, _mm_set_ps(1.0f, -1.0f, 1.0f, 1.0f), 0xff); - __m128 add1 = _mm_dp_ps(mul1, _mm_set_ps(1.0f, 1.0f, 1.0f, -1.0f), 0xff); - __m128 add2 = _mm_dp_ps(mul2, _mm_set_ps(1.0f, 1.0f, -1.0f, 1.0f), 0xff); - __m128 add3 = _mm_dp_ps(mul3, _mm_set_ps(1.0f, -1.0f, -1.0f, -1.0f), 0xff); -# else - mul0 = _mm_mul_ps(mul0, _mm_set_ps(1.0f, -1.0f, 1.0f, 1.0f)); - __m128 add0 = _mm_add_ps(mul0, _mm_movehl_ps(mul0, mul0)); - add0 = _mm_add_ss(add0, _mm_shuffle_ps(add0, add0, 1)); - - mul1 = _mm_mul_ps(mul1, _mm_set_ps(1.0f, 1.0f, 1.0f, -1.0f)); - __m128 add1 = _mm_add_ps(mul1, _mm_movehl_ps(mul1, mul1)); - add1 = _mm_add_ss(add1, _mm_shuffle_ps(add1, add1, 1)); - - mul2 = _mm_mul_ps(mul2, _mm_set_ps(1.0f, 1.0f, -1.0f, 1.0f)); - __m128 add2 = _mm_add_ps(mul2, _mm_movehl_ps(mul2, mul2)); - add2 = _mm_add_ss(add2, _mm_shuffle_ps(add2, add2, 1)); - - mul3 = _mm_mul_ps(mul3, _mm_set_ps(1.0f, -1.0f, -1.0f, -1.0f)); - __m128 add3 = _mm_add_ps(mul3, _mm_movehl_ps(mul3, mul3)); - add3 = _mm_add_ss(add3, _mm_shuffle_ps(add3, add3, 1)); -#endif - - - // This SIMD code is a politically correct way of doing this, but in every test I've tried it has been slower than - // the final code below. I'll keep this here for reference - maybe somebody else can do something better... - // - //__m128 xxyy = _mm_shuffle_ps(add0, add1, _MM_SHUFFLE(0, 0, 0, 0)); - //__m128 zzww = _mm_shuffle_ps(add2, add3, _MM_SHUFFLE(0, 0, 0, 0)); - // - //return _mm_shuffle_ps(xxyy, zzww, _MM_SHUFFLE(2, 0, 2, 0)); - - float x; - float y; - float z; - float w; - - _mm_store_ss(&x, add0); - _mm_store_ss(&y, add1); - _mm_store_ss(&z, add2); - _mm_store_ss(&w, add3); - - return detail::fquatSIMD(w, x, y, z); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator* (fquatSIMD const & q, fvec4SIMD const & v) -{ - static const __m128 two = _mm_set1_ps(2.0f); - - __m128 q_wwww = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 3, 3, 3)); - __m128 q_swp0 = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 0, 2, 1)); - __m128 q_swp1 = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 1, 0, 2)); - __m128 v_swp0 = _mm_shuffle_ps(v.Data, v.Data, _MM_SHUFFLE(3, 0, 2, 1)); - __m128 v_swp1 = _mm_shuffle_ps(v.Data, v.Data, _MM_SHUFFLE(3, 1, 0, 2)); - - __m128 uv = _mm_sub_ps(_mm_mul_ps(q_swp0, v_swp1), _mm_mul_ps(q_swp1, v_swp0)); - __m128 uv_swp0 = _mm_shuffle_ps(uv, uv, _MM_SHUFFLE(3, 0, 2, 1)); - __m128 uv_swp1 = _mm_shuffle_ps(uv, uv, _MM_SHUFFLE(3, 1, 0, 2)); - __m128 uuv = _mm_sub_ps(_mm_mul_ps(q_swp0, uv_swp1), _mm_mul_ps(q_swp1, uv_swp0)); - - - uv = _mm_mul_ps(uv, _mm_mul_ps(q_wwww, two)); - uuv = _mm_mul_ps(uuv, two); - - return _mm_add_ps(v.Data, _mm_add_ps(uv, uuv)); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator* (fvec4SIMD const & v, fquatSIMD const & q) -{ - return glm::inverse(q) * v; -} - -GLM_FUNC_QUALIFIER fquatSIMD operator* (fquatSIMD const & q, float s) -{ - return fquatSIMD(_mm_mul_ps(q.Data, _mm_set1_ps(s))); -} - -GLM_FUNC_QUALIFIER fquatSIMD operator* (float s, fquatSIMD const & q) -{ - return fquatSIMD(_mm_mul_ps(_mm_set1_ps(s), q.Data)); -} - - -//operator/ -GLM_FUNC_QUALIFIER fquatSIMD operator/ (fquatSIMD const & q, float s) -{ - return fquatSIMD(_mm_div_ps(q.Data, _mm_set1_ps(s))); -} - - -}//namespace detail - - -GLM_FUNC_QUALIFIER quat quat_cast -( - detail::fquatSIMD const & x -) -{ - GLM_ALIGN(16) quat Result; - _mm_store_ps(&Result[0], x.Data); - - return Result; -} - -template <typename T> -GLM_FUNC_QUALIFIER detail::fquatSIMD quatSIMD_cast_impl(const T m0[], const T m1[], const T m2[]) -{ - T trace = m0[0] + m1[1] + m2[2] + T(1.0); - if (trace > T(0)) - { - T s = static_cast<T>(0.5) / sqrt(trace); - - return _mm_set_ps( - static_cast<float>(T(0.25) / s), - static_cast<float>((m0[1] - m1[0]) * s), - static_cast<float>((m2[0] - m0[2]) * s), - static_cast<float>((m1[2] - m2[1]) * s)); - } - else - { - if (m0[0] > m1[1]) - { - if (m0[0] > m2[2]) - { - // X is biggest. - T s = sqrt(m0[0] - m1[1] - m2[2] + T(1.0)) * T(0.5); - - return _mm_set_ps( - static_cast<float>((m1[2] - m2[1]) * s), - static_cast<float>((m2[0] + m0[2]) * s), - static_cast<float>((m0[1] + m1[0]) * s), - static_cast<float>(T(0.5) * s)); - } - } - else - { - if (m1[1] > m2[2]) - { - // Y is biggest. - T s = sqrt(m1[1] - m0[0] - m2[2] + T(1.0)) * T(0.5); - - return _mm_set_ps( - static_cast<float>((m2[0] - m0[2]) * s), - static_cast<float>((m1[2] + m2[1]) * s), - static_cast<float>(T(0.5) * s), - static_cast<float>((m0[1] + m1[0]) * s)); - } - } - - // Z is biggest. - T s = sqrt(m2[2] - m0[0] - m1[1] + T(1.0)) * T(0.5); - - return _mm_set_ps( - static_cast<float>((m0[1] - m1[0]) * s), - static_cast<float>(T(0.5) * s), - static_cast<float>((m1[2] + m2[1]) * s), - static_cast<float>((m2[0] + m0[2]) * s)); - } -} - -GLM_FUNC_QUALIFIER detail::fquatSIMD quatSIMD_cast -( - detail::fmat4x4SIMD const & m -) -{ - // Scalar implementation for now. - GLM_ALIGN(16) float m0[4]; - GLM_ALIGN(16) float m1[4]; - GLM_ALIGN(16) float m2[4]; - - _mm_store_ps(m0, m[0].Data); - _mm_store_ps(m1, m[1].Data); - _mm_store_ps(m2, m[2].Data); - - return quatSIMD_cast_impl(m0, m1, m2); -} - -template <typename T, precision P> -GLM_FUNC_QUALIFIER detail::fquatSIMD quatSIMD_cast -( - tmat4x4<T, P> const & m -) -{ - return quatSIMD_cast_impl(&m[0][0], &m[1][0], &m[2][0]); -} - -template <typename T, precision P> -GLM_FUNC_QUALIFIER detail::fquatSIMD quatSIMD_cast -( - tmat3x3<T, P> const & m -) -{ - return quatSIMD_cast_impl(&m[0][0], &m[1][0], &m[2][0]); -} - - -GLM_FUNC_QUALIFIER detail::fmat4x4SIMD mat4SIMD_cast -( - detail::fquatSIMD const & q -) -{ - detail::fmat4x4SIMD result; - - __m128 _wwww = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 3, 3, 3)); - __m128 _xyzw = q.Data; - __m128 _zxyw = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 1, 0, 2)); - __m128 _yzxw = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 0, 2, 1)); - - __m128 _xyzw2 = _mm_add_ps(_xyzw, _xyzw); - __m128 _zxyw2 = _mm_shuffle_ps(_xyzw2, _xyzw2, _MM_SHUFFLE(3, 1, 0, 2)); - __m128 _yzxw2 = _mm_shuffle_ps(_xyzw2, _xyzw2, _MM_SHUFFLE(3, 0, 2, 1)); - - __m128 _tmp0 = _mm_sub_ps(_mm_set1_ps(1.0f), _mm_mul_ps(_yzxw2, _yzxw)); - _tmp0 = _mm_sub_ps(_tmp0, _mm_mul_ps(_zxyw2, _zxyw)); - - __m128 _tmp1 = _mm_mul_ps(_yzxw2, _xyzw); - _tmp1 = _mm_add_ps(_tmp1, _mm_mul_ps(_zxyw2, _wwww)); - - __m128 _tmp2 = _mm_mul_ps(_zxyw2, _xyzw); - _tmp2 = _mm_sub_ps(_tmp2, _mm_mul_ps(_yzxw2, _wwww)); - - - // There's probably a better, more politically correct way of doing this... - result[0].Data = _mm_set_ps( - 0.0f, - reinterpret_cast<float*>(&_tmp2)[0], - reinterpret_cast<float*>(&_tmp1)[0], - reinterpret_cast<float*>(&_tmp0)[0]); - - result[1].Data = _mm_set_ps( - 0.0f, - reinterpret_cast<float*>(&_tmp1)[1], - reinterpret_cast<float*>(&_tmp0)[1], - reinterpret_cast<float*>(&_tmp2)[1]); - - result[2].Data = _mm_set_ps( - 0.0f, - reinterpret_cast<float*>(&_tmp0)[2], - reinterpret_cast<float*>(&_tmp2)[2], - reinterpret_cast<float*>(&_tmp1)[2]); - - result[3].Data = _mm_set_ps( - 1.0f, - 0.0f, - 0.0f, - 0.0f); - - - return result; -} - -GLM_FUNC_QUALIFIER mat4 mat4_cast -( - detail::fquatSIMD const & q -) -{ - return mat4_cast(mat4SIMD_cast(q)); -} - - - -GLM_FUNC_QUALIFIER float length -( - detail::fquatSIMD const & q -) -{ - return glm::sqrt(dot(q, q)); -} - -GLM_FUNC_QUALIFIER detail::fquatSIMD normalize -( - detail::fquatSIMD const & q -) -{ - return _mm_mul_ps(q.Data, _mm_set1_ps(1.0f / length(q))); -} - -GLM_FUNC_QUALIFIER float dot -( - detail::fquatSIMD const & q1, - detail::fquatSIMD const & q2 -) -{ - float result; - _mm_store_ss(&result, detail::sse_dot_ps(q1.Data, q2.Data)); - - return result; -} - -GLM_FUNC_QUALIFIER detail::fquatSIMD mix -( - detail::fquatSIMD const & x, - detail::fquatSIMD const & y, - float const & a -) -{ - float cosTheta = dot(x, y); - - if (cosTheta > 1.0f - glm::epsilon<float>()) - { - return _mm_add_ps(x.Data, _mm_mul_ps(_mm_set1_ps(a), _mm_sub_ps(y.Data, x.Data))); - } - else - { - float angle = glm::acos(cosTheta); - - - float s0 = glm::sin((1.0f - a) * angle); - float s1 = glm::sin(a * angle); - float d = 1.0f / glm::sin(angle); - - return (s0 * x + s1 * y) * d; - } -} - -GLM_FUNC_QUALIFIER detail::fquatSIMD lerp -( - detail::fquatSIMD const & x, - detail::fquatSIMD const & y, - float const & a -) -{ - // Lerp is only defined in [0, 1] - assert(a >= 0.0f); - assert(a <= 1.0f); - - return _mm_add_ps(x.Data, _mm_mul_ps(_mm_set1_ps(a), _mm_sub_ps(y.Data, x.Data))); -} - -GLM_FUNC_QUALIFIER detail::fquatSIMD slerp -( - detail::fquatSIMD const & x, - detail::fquatSIMD const & y, - float const & a -) -{ - detail::fquatSIMD z = y; - - float cosTheta = dot(x, y); - - // If cosTheta < 0, the interpolation will take the long way around the sphere. - // To fix this, one quat must be negated. - if (cosTheta < 0.0f) - { - z = -y; - cosTheta = -cosTheta; - } - - // Perform a linear interpolation when cosTheta is close to 1 to avoid side effect of sin(angle) becoming a zero denominator - if(cosTheta > 1.0f - epsilon<float>()) - { - return _mm_add_ps(x.Data, _mm_mul_ps(_mm_set1_ps(a), _mm_sub_ps(y.Data, x.Data))); - } - else - { - float angle = glm::acos(cosTheta); - - - float s0 = glm::sin((1.0f - a) * angle); - float s1 = glm::sin(a * angle); - float d = 1.0f / glm::sin(angle); - - return (s0 * x + s1 * y) * d; - } -} - - -GLM_FUNC_QUALIFIER detail::fquatSIMD fastMix -( - detail::fquatSIMD const & x, - detail::fquatSIMD const & y, - float const & a -) -{ - float cosTheta = dot(x, y); - - if (cosTheta > 1.0f - glm::epsilon<float>()) - { - return _mm_add_ps(x.Data, _mm_mul_ps(_mm_set1_ps(a), _mm_sub_ps(y.Data, x.Data))); - } - else - { - float angle = glm::fastAcos(cosTheta); - - - __m128 s = glm::fastSin(_mm_set_ps((1.0f - a) * angle, a * angle, angle, 0.0f)); - - __m128 s0 = _mm_shuffle_ps(s, s, _MM_SHUFFLE(3, 3, 3, 3)); - __m128 s1 = _mm_shuffle_ps(s, s, _MM_SHUFFLE(2, 2, 2, 2)); - __m128 d = _mm_div_ps(_mm_set1_ps(1.0f), _mm_shuffle_ps(s, s, _MM_SHUFFLE(1, 1, 1, 1))); - - return _mm_mul_ps(_mm_add_ps(_mm_mul_ps(s0, x.Data), _mm_mul_ps(s1, y.Data)), d); - } -} - -GLM_FUNC_QUALIFIER detail::fquatSIMD fastSlerp -( - detail::fquatSIMD const & x, - detail::fquatSIMD const & y, - float const & a -) -{ - detail::fquatSIMD z = y; - - float cosTheta = dot(x, y); - if (cosTheta < 0.0f) - { - z = -y; - cosTheta = -cosTheta; - } - - - if(cosTheta > 1.0f - epsilon<float>()) - { - return _mm_add_ps(x.Data, _mm_mul_ps(_mm_set1_ps(a), _mm_sub_ps(y.Data, x.Data))); - } - else - { - float angle = glm::fastAcos(cosTheta); - - - __m128 s = glm::fastSin(_mm_set_ps((1.0f - a) * angle, a * angle, angle, 0.0f)); - - __m128 s0 = _mm_shuffle_ps(s, s, _MM_SHUFFLE(3, 3, 3, 3)); - __m128 s1 = _mm_shuffle_ps(s, s, _MM_SHUFFLE(2, 2, 2, 2)); - __m128 d = _mm_div_ps(_mm_set1_ps(1.0f), _mm_shuffle_ps(s, s, _MM_SHUFFLE(1, 1, 1, 1))); - - return _mm_mul_ps(_mm_add_ps(_mm_mul_ps(s0, x.Data), _mm_mul_ps(s1, y.Data)), d); - } -} - - - -GLM_FUNC_QUALIFIER detail::fquatSIMD conjugate -( - detail::fquatSIMD const & q -) -{ - return detail::fquatSIMD(_mm_mul_ps(q.Data, _mm_set_ps(1.0f, -1.0f, -1.0f, -1.0f))); -} - -GLM_FUNC_QUALIFIER detail::fquatSIMD inverse -( - detail::fquatSIMD const & q -) -{ - return conjugate(q) / dot(q, q); -} - - -GLM_FUNC_QUALIFIER detail::fquatSIMD angleAxisSIMD -( - float const & angle, - vec3 const & v -) -{ - float s = glm::sin(angle * 0.5f); - - return _mm_set_ps( - glm::cos(angle * 0.5f), - v.z * s, - v.y * s, - v.x * s); -} - -GLM_FUNC_QUALIFIER detail::fquatSIMD angleAxisSIMD -( - float const & angle, - float const & x, - float const & y, - float const & z -) -{ - return angleAxisSIMD(angle, vec3(x, y, z)); -} - - -GLM_FUNC_QUALIFIER __m128 fastSin(__m128 x) -{ - static const __m128 c0 = _mm_set1_ps(0.16666666666666666666666666666667f); - static const __m128 c1 = _mm_set1_ps(0.00833333333333333333333333333333f); - static const __m128 c2 = _mm_set1_ps(0.00019841269841269841269841269841f); - - __m128 x3 = _mm_mul_ps(x, _mm_mul_ps(x, x)); - __m128 x5 = _mm_mul_ps(x3, _mm_mul_ps(x, x)); - __m128 x7 = _mm_mul_ps(x5, _mm_mul_ps(x, x)); - - __m128 y0 = _mm_mul_ps(x3, c0); - __m128 y1 = _mm_mul_ps(x5, c1); - __m128 y2 = _mm_mul_ps(x7, c2); - - return _mm_sub_ps(_mm_add_ps(_mm_sub_ps(x, y0), y1), y2); -} - - -}//namespace glm diff --git a/3rdparty/glm/glm/gtx/simd_vec4.hpp b/3rdparty/glm/glm/gtx/simd_vec4.hpp deleted file mode 100644 index 8e61311cf70..00000000000 --- a/3rdparty/glm/glm/gtx/simd_vec4.hpp +++ /dev/null @@ -1,574 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref gtx_simd_vec4 -/// @file glm/gtx/simd_vec4.hpp -/// @date 2009-05-07 / 2011-06-07 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// -/// @defgroup gtx_simd_vec4 GLM_GTX_simd_vec4 -/// @ingroup gtx -/// -/// @brief SIMD implementation of vec4 type. -/// -/// <glm/gtx/simd_vec4.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// - -#pragma once - -// Dependency: -#include "../glm.hpp" - -#if(GLM_ARCH != GLM_ARCH_PURE) - -#if(GLM_ARCH & GLM_ARCH_SSE2) -# include "../detail/intrinsic_common.hpp" -# include "../detail/intrinsic_geometric.hpp" -# include "../detail/intrinsic_integer.hpp" -#else -# error "GLM: GLM_GTX_simd_vec4 requires compiler support of SSE2 through intrinsics" -#endif - -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) -# pragma message("GLM: GLM_GTX_simd_vec4 extension included") -#endif - - -// Warning silencer for nameless struct/union. -#if (GLM_COMPILER & GLM_COMPILER_VC) -# pragma warning(push) -# pragma warning(disable:4201) // warning C4201: nonstandard extension used : nameless struct/union -#endif - -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 - -namespace glm{ -namespace detail -{ - /// 4-dimensional vector implemented using SIMD SEE intrinsics. - /// \ingroup gtx_simd_vec4 - GLM_ALIGNED_STRUCT(16) fvec4SIMD - { - typedef float value_type; - typedef std::size_t size_type; - - typedef fvec4SIMD type; - typedef tvec4<float, defaultp> pure_type; - typedef tvec4<bool, highp> bool_type; - -#ifdef GLM_SIMD_ENABLE_XYZW_UNION - union - { - __m128 Data; - struct {float x, y, z, w;}; - }; -#else - __m128 Data; -#endif - - ////////////////////////////////////// - // Implicit basic constructors - - fvec4SIMD() GLM_DEFAULT_CTOR; - fvec4SIMD(fvec4SIMD const & v) GLM_DEFAULT; - fvec4SIMD(__m128 const & Data); - - ////////////////////////////////////// - // Explicit basic constructors - - explicit fvec4SIMD( - ctor); - explicit fvec4SIMD( - float const & s); - explicit fvec4SIMD( - float const & x, - float const & y, - float const & z, - float const & w); - explicit fvec4SIMD( - vec4 const & v); - - //////////////////////////////////////// - //// Conversion vector constructors - - fvec4SIMD(vec2 const & v, float const & s1, float const & s2); - fvec4SIMD(float const & s1, vec2 const & v, float const & s2); - fvec4SIMD(float const & s1, float const & s2, vec2 const & v); - fvec4SIMD(vec3 const & v, float const & s); - fvec4SIMD(float const & s, vec3 const & v); - fvec4SIMD(vec2 const & v1, vec2 const & v2); - //fvec4SIMD(ivec4SIMD const & v); - - ////////////////////////////////////// - // Unary arithmetic operators - - fvec4SIMD& operator= (fvec4SIMD const & v) GLM_DEFAULT; - fvec4SIMD& operator+=(fvec4SIMD const & v); - fvec4SIMD& operator-=(fvec4SIMD const & v); - fvec4SIMD& operator*=(fvec4SIMD const & v); - fvec4SIMD& operator/=(fvec4SIMD const & v); - - fvec4SIMD& operator+=(float const & s); - fvec4SIMD& operator-=(float const & s); - fvec4SIMD& operator*=(float const & s); - fvec4SIMD& operator/=(float const & s); - - fvec4SIMD& operator++(); - fvec4SIMD& operator--(); - - ////////////////////////////////////// - // Swizzle operators - - template <comp X_, comp Y_, comp Z_, comp W_> - fvec4SIMD& swizzle(); - template <comp X_, comp Y_, comp Z_, comp W_> - fvec4SIMD swizzle() const; - template <comp X_, comp Y_, comp Z_> - fvec4SIMD swizzle() const; - template <comp X_, comp Y_> - fvec4SIMD swizzle() const; - template <comp X_> - fvec4SIMD swizzle() const; - }; -}//namespace detail - - typedef glm::detail::fvec4SIMD simdVec4; - - /// @addtogroup gtx_simd_vec4 - /// @{ - - //! Convert a simdVec4 to a vec4. - /// @see gtx_simd_vec4 - vec4 vec4_cast( - detail::fvec4SIMD const & x); - - //! Returns x if x >= 0; otherwise, it returns -x. - /// @see gtx_simd_vec4 - detail::fvec4SIMD abs(detail::fvec4SIMD const & x); - - //! Returns 1.0 if x > 0, 0.0 if x = 0, or -1.0 if x < 0. - /// @see gtx_simd_vec4 - detail::fvec4SIMD sign(detail::fvec4SIMD const & x); - - //! Returns a value equal to the nearest integer that is less then or equal to x. - /// @see gtx_simd_vec4 - detail::fvec4SIMD floor(detail::fvec4SIMD const & x); - - //! Returns a value equal to the nearest integer to x - //! whose absolute value is not larger than the absolute value of x. - /// @see gtx_simd_vec4 - detail::fvec4SIMD trunc(detail::fvec4SIMD 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. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD round(detail::fvec4SIMD 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.) - /// - /// @see gtx_simd_vec4 - //detail::fvec4SIMD roundEven(detail::fvec4SIMD const & x); - - //! Returns a value equal to the nearest integer - //! that is greater than or equal to x. - /// @see gtx_simd_vec4 - detail::fvec4SIMD ceil(detail::fvec4SIMD const & x); - - //! Return x - floor(x). - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD fract(detail::fvec4SIMD const & x); - - //! Modulus. Returns x - y * floor(x / y) - //! for each component in x using the floating point value y. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD mod( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y); - - //! Modulus. Returns x - y * floor(x / y) - //! for each component in x using the floating point value y. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD mod( - detail::fvec4SIMD const & x, - float 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 GLM_GTX_simd_vec4 extension, common function) - //detail::fvec4SIMD modf( - // detail::fvec4SIMD const & x, - // detail::fvec4SIMD & i); - - //! Returns y if y < x; otherwise, it returns x. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD min( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y); - - detail::fvec4SIMD min( - detail::fvec4SIMD const & x, - float const & y); - - //! Returns y if x < y; otherwise, it returns x. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD max( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y); - - detail::fvec4SIMD max( - detail::fvec4SIMD const & x, - float const & y); - - //! Returns min(max(x, minVal), maxVal) for each component in x - //! using the floating-point values minVal and maxVal. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD clamp( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & minVal, - detail::fvec4SIMD const & maxVal); - - detail::fvec4SIMD clamp( - detail::fvec4SIMD const & x, - float const & minVal, - float 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. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD mix( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y, - detail::fvec4SIMD const & a); - - //! Returns 0.0 if x < edge, otherwise it returns 1.0. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD step( - detail::fvec4SIMD const & edge, - detail::fvec4SIMD const & x); - - detail::fvec4SIMD step( - float const & edge, - detail::fvec4SIMD 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. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD smoothstep( - detail::fvec4SIMD const & edge0, - detail::fvec4SIMD const & edge1, - detail::fvec4SIMD const & x); - - detail::fvec4SIMD smoothstep( - float const & edge0, - float const & edge1, - detail::fvec4SIMD 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. - /// - /// @see gtx_simd_vec4 - //bvec4 isnan(detail::fvec4SIMD 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. - /// - /// @see gtx_simd_vec4 - //bvec4 isinf(detail::fvec4SIMD 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. - /// - /// @see gtx_simd_vec4 - //detail::ivec4SIMD floatBitsToInt(detail::fvec4SIMD 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. - /// - /// @see gtx_simd_vec4 - //detail::fvec4SIMD intBitsToFloat(detail::ivec4SIMD const & value); - - //! Computes and returns a * b + c. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD fma( - detail::fvec4SIMD const & a, - detail::fvec4SIMD const & b, - detail::fvec4SIMD 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. - /// - /// @see gtx_simd_vec4 - //detail::fvec4SIMD frexp(detail::fvec4SIMD const & x, detail::ivec4SIMD & 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. - /// - /// @see gtx_simd_vec4 - //detail::fvec4SIMD ldexp(detail::fvec4SIMD const & x, detail::ivec4SIMD const & exp); - - //! Returns the length of x, i.e., sqrt(x * x). - /// - /// @see gtx_simd_vec4 - float length( - detail::fvec4SIMD const & x); - - //! Returns the length of x, i.e., sqrt(x * x). - //! Less accurate but much faster than simdLength. - /// - /// @see gtx_simd_vec4 - float fastLength( - detail::fvec4SIMD const & x); - - //! Returns the length of x, i.e., sqrt(x * x). - //! Slightly more accurate but much slower than simdLength. - /// - /// @see gtx_simd_vec4 - float niceLength( - detail::fvec4SIMD const & x); - - //! Returns the length of x, i.e., sqrt(x * x). - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD length4( - detail::fvec4SIMD const & x); - - //! Returns the length of x, i.e., sqrt(x * x). - //! Less accurate but much faster than simdLength4. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD fastLength4( - detail::fvec4SIMD const & x); - - //! Returns the length of x, i.e., sqrt(x * x). - //! Slightly more accurate but much slower than simdLength4. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD niceLength4( - detail::fvec4SIMD const & x); - - //! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). - /// - /// @see gtx_simd_vec4 - float distance( - detail::fvec4SIMD const & p0, - detail::fvec4SIMD const & p1); - - //! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD distance4( - detail::fvec4SIMD const & p0, - detail::fvec4SIMD const & p1); - - //! Returns the dot product of x and y, i.e., result = x * y. - /// - /// @see gtx_simd_vec4 - float simdDot( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y); - - //! Returns the dot product of x and y, i.e., result = x * y. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD dot4( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y); - - //! Returns the cross product of x and y. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD cross( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y); - - //! Returns a vector in the same direction as x but with length of 1. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD normalize( - detail::fvec4SIMD const & x); - - //! Returns a vector in the same direction as x but with length of 1. - //! Less accurate but much faster than simdNormalize. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD fastNormalize( - detail::fvec4SIMD const & x); - - //! If dot(Nref, I) < 0.0, return N, otherwise, return -N. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD simdFaceforward( - detail::fvec4SIMD const & N, - detail::fvec4SIMD const & I, - detail::fvec4SIMD const & Nref); - - //! For the incident vector I and surface orientation N, - //! returns the reflection direction : result = I - 2.0 * dot(N, I) * N. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD reflect( - detail::fvec4SIMD const & I, - detail::fvec4SIMD const & N); - - //! For the incident vector I and surface normal N, - //! and the ratio of indices of refraction eta, - //! return the refraction vector. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD refract( - detail::fvec4SIMD const & I, - detail::fvec4SIMD const & N, - float const & eta); - - //! Returns the positive square root of x. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD sqrt( - detail::fvec4SIMD const & x); - - //! Returns the positive square root of x with the nicest quality but very slow. - //! Slightly more accurate but much slower than simdSqrt. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD niceSqrt( - detail::fvec4SIMD const & x); - - //! Returns the positive square root of x - //! Less accurate but much faster than sqrt. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD fastSqrt( - detail::fvec4SIMD const & x); - - //! Returns the reciprocal of the positive square root of x. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD inversesqrt( - detail::fvec4SIMD const & x); - - //! Returns the reciprocal of the positive square root of x. - //! Faster than inversesqrt but less accurate. - /// - /// @see gtx_simd_vec4 - detail::fvec4SIMD fastInversesqrt( - detail::fvec4SIMD const & x); - - /// @} -}//namespace glm - -#include "simd_vec4.inl" - -#if (GLM_COMPILER & GLM_COMPILER_VC) -# pragma warning(pop) -#endif - -#endif//(GLM_ARCH != GLM_ARCH_PURE) diff --git a/3rdparty/glm/glm/gtx/simd_vec4.inl b/3rdparty/glm/glm/gtx/simd_vec4.inl deleted file mode 100644 index 188fd41f0da..00000000000 --- a/3rdparty/glm/glm/gtx/simd_vec4.inl +++ /dev/null @@ -1,724 +0,0 @@ -namespace glm{ -namespace detail{ - -template <int Value> -struct shuffle_mask -{ - enum{value = Value}; -}; - -////////////////////////////////////// -// Implicit basic constructors - -#if !GLM_HAS_DEFAULTED_FUNCTIONS || !defined(GLM_FORCE_NO_CTOR_INIT) - GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD() -# ifdef GLM_FORCE_NO_CTOR_INIT - : Data(_mm_set_ps(0.0f, 0.0f, 0.0f, 0.0f)) -# endif - {} -#endif//!GLM_HAS_DEFAULTED_FUNCTIONS - -#if !GLM_HAS_DEFAULTED_FUNCTIONS - GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(fvec4SIMD const & v) : - Data(v.Data) - {} -#endif//!GLM_HAS_DEFAULTED_FUNCTIONS - -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(__m128 const & Data) : - Data(Data) -{} - -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec4 const & v) : - Data(_mm_set_ps(v.w, v.z, v.y, v.x)) -{} - -////////////////////////////////////// -// Explicit basic constructors - -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s) : - Data(_mm_set1_ps(s)) -{} - -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & x, float const & y, float const & z, float const & w) : -// Data(_mm_setr_ps(x, y, z, w)) - Data(_mm_set_ps(w, z, y, x)) -{} -/* -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const v[4]) : - Data(_mm_load_ps(v)) -{} -*/ -////////////////////////////////////// -// Swizzle constructors - -//fvec4SIMD(ref4<float> const & r); - -////////////////////////////////////// -// Conversion vector constructors - -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec2 const & v, float const & s1, float const & s2) : - Data(_mm_set_ps(s2, s1, v.y, v.x)) -{} - -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s1, vec2 const & v, float const & s2) : - Data(_mm_set_ps(s2, v.y, v.x, s1)) -{} - -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s1, float const & s2, vec2 const & v) : - Data(_mm_set_ps(v.y, v.x, s2, s1)) -{} - -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec3 const & v, float const & s) : - Data(_mm_set_ps(s, v.z, v.y, v.x)) -{} - -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s, vec3 const & v) : - Data(_mm_set_ps(v.z, v.y, v.x, s)) -{} - -GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec2 const & v1, vec2 const & v2) : - Data(_mm_set_ps(v2.y, v2.x, v1.y, v1.x)) -{} - -//GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(ivec4SIMD const & v) : -// Data(_mm_cvtepi32_ps(v.Data)) -//{} - -////////////////////////////////////// -// Unary arithmetic operators - -#if !GLM_HAS_DEFAULTED_FUNCTIONS - GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator=(fvec4SIMD const & v) - { - this->Data = v.Data; - return *this; - } -#endif//!GLM_HAS_DEFAULTED_FUNCTIONS - -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator+=(float const & s) -{ - this->Data = _mm_add_ps(Data, _mm_set_ps1(s)); - return *this; -} - -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator+=(fvec4SIMD const & v) -{ - this->Data = _mm_add_ps(this->Data , v.Data); - return *this; -} - -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator-=(float const & s) -{ - this->Data = _mm_sub_ps(Data, _mm_set_ps1(s)); - return *this; -} - -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator-=(fvec4SIMD const & v) -{ - this->Data = _mm_sub_ps(this->Data , v.Data); - return *this; -} - -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator*=(float const & s) -{ - this->Data = _mm_mul_ps(this->Data, _mm_set_ps1(s)); - return *this; -} - -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator*=(fvec4SIMD const & v) -{ - this->Data = _mm_mul_ps(this->Data , v.Data); - return *this; -} - -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator/=(float const & s) -{ - this->Data = _mm_div_ps(Data, _mm_set1_ps(s)); - return *this; -} - -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator/=(fvec4SIMD const & v) -{ - this->Data = _mm_div_ps(this->Data , v.Data); - return *this; -} - -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator++() -{ - this->Data = _mm_add_ps(this->Data , glm::detail::one); - return *this; -} - -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator--() -{ - this->Data = _mm_sub_ps(this->Data, glm::detail::one); - return *this; -} - -////////////////////////////////////// -// Swizzle operators - -template <comp X_, comp Y_, comp Z_, comp W_> -GLM_FUNC_QUALIFIER fvec4SIMD fvec4SIMD::swizzle() const -{ - __m128 Data = _mm_shuffle_ps( - this->Data, this->Data, - shuffle_mask<(W_ << 6) | (Z_ << 4) | (Y_ << 2) | (X_ << 0)>::value); - return fvec4SIMD(Data); -} - -template <comp X_, comp Y_, comp Z_, comp W_> -GLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::swizzle() -{ - this->Data = _mm_shuffle_ps( - this->Data, this->Data, - shuffle_mask<(W_ << 6) | (Z_ << 4) | (Y_ << 2) | (X_ << 0)>::value); - return *this; -} - -// operator+ -GLM_FUNC_QUALIFIER fvec4SIMD operator+ (fvec4SIMD const & v, float s) -{ - return fvec4SIMD(_mm_add_ps(v.Data, _mm_set1_ps(s))); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator+ (float s, fvec4SIMD const & v) -{ - return fvec4SIMD(_mm_add_ps(_mm_set1_ps(s), v.Data)); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator+ (fvec4SIMD const & v1, fvec4SIMD const & v2) -{ - return fvec4SIMD(_mm_add_ps(v1.Data, v2.Data)); -} - -//operator- -GLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v, float s) -{ - return fvec4SIMD(_mm_sub_ps(v.Data, _mm_set1_ps(s))); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator- (float s, fvec4SIMD const & v) -{ - return fvec4SIMD(_mm_sub_ps(_mm_set1_ps(s), v.Data)); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v1, fvec4SIMD const & v2) -{ - return fvec4SIMD(_mm_sub_ps(v1.Data, v2.Data)); -} - -//operator* -GLM_FUNC_QUALIFIER fvec4SIMD operator* (fvec4SIMD const & v, float s) -{ - __m128 par0 = v.Data; - __m128 par1 = _mm_set1_ps(s); - return fvec4SIMD(_mm_mul_ps(par0, par1)); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator* (float s, fvec4SIMD const & v) -{ - __m128 par0 = _mm_set1_ps(s); - __m128 par1 = v.Data; - return fvec4SIMD(_mm_mul_ps(par0, par1)); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator* (fvec4SIMD const & v1, fvec4SIMD const & v2) -{ - return fvec4SIMD(_mm_mul_ps(v1.Data, v2.Data)); -} - -//operator/ -GLM_FUNC_QUALIFIER fvec4SIMD operator/ (fvec4SIMD const & v, float s) -{ - __m128 par0 = v.Data; - __m128 par1 = _mm_set1_ps(s); - return fvec4SIMD(_mm_div_ps(par0, par1)); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator/ (float s, fvec4SIMD const & v) -{ - __m128 par0 = _mm_set1_ps(s); - __m128 par1 = v.Data; - return fvec4SIMD(_mm_div_ps(par0, par1)); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator/ (fvec4SIMD const & v1, fvec4SIMD const & v2) -{ - return fvec4SIMD(_mm_div_ps(v1.Data, v2.Data)); -} - -// Unary constant operators -GLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v) -{ - return fvec4SIMD(_mm_sub_ps(_mm_setzero_ps(), v.Data)); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator++ (fvec4SIMD const & v, int) -{ - return fvec4SIMD(_mm_add_ps(v.Data, glm::detail::one)); -} - -GLM_FUNC_QUALIFIER fvec4SIMD operator-- (fvec4SIMD const & v, int) -{ - return fvec4SIMD(_mm_sub_ps(v.Data, glm::detail::one)); -} - -}//namespace detail - -GLM_FUNC_QUALIFIER vec4 vec4_cast -( - detail::fvec4SIMD const & x -) -{ - GLM_ALIGN(16) vec4 Result; - _mm_store_ps(&Result[0], x.Data); - return Result; -} - -// Other possible implementation -//float abs(float a) -//{ -// return max(-a, a); -//} -GLM_FUNC_QUALIFIER detail::fvec4SIMD abs -( - detail::fvec4SIMD const & x -) -{ - return detail::sse_abs_ps(x.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD sign -( - detail::fvec4SIMD const & x -) -{ - return detail::sse_sgn_ps(x.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD floor -( - detail::fvec4SIMD const & x -) -{ - return detail::sse_flr_ps(x.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD trunc -( - detail::fvec4SIMD const & x -) -{ - //return x < 0 ? -floor(-x) : floor(x); - - __m128 Flr0 = detail::sse_flr_ps(_mm_sub_ps(_mm_setzero_ps(), x.Data)); - __m128 Sub0 = _mm_sub_ps(Flr0, x.Data); - __m128 Flr1 = detail::sse_flr_ps(x.Data); - - __m128 Cmp0 = _mm_cmplt_ps(x.Data, glm::detail::zero); - __m128 Cmp1 = _mm_cmpnlt_ps(x.Data, glm::detail::zero); - - __m128 And0 = _mm_and_ps(Sub0, Cmp0); - __m128 And1 = _mm_and_ps(Flr1, Cmp1); - - return _mm_or_ps(And0, And1); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD round -( - detail::fvec4SIMD const & x -) -{ - return detail::sse_rnd_ps(x.Data); -} - -//GLM_FUNC_QUALIFIER detail::fvec4SIMD roundEven -//( -// detail::fvec4SIMD const & x -//) -//{ - -//} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD ceil -( - detail::fvec4SIMD const & x -) -{ - return detail::sse_ceil_ps(x.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD fract -( - detail::fvec4SIMD const & x -) -{ - return detail::sse_frc_ps(x.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD mod -( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y -) -{ - return detail::sse_mod_ps(x.Data, y.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD mod -( - detail::fvec4SIMD const & x, - float const & y -) -{ - return detail::sse_mod_ps(x.Data, _mm_set1_ps(y)); -} - -//GLM_FUNC_QUALIFIER detail::fvec4SIMD modf -//( -// detail::fvec4SIMD const & x, -// detail::fvec4SIMD & i -//) -//{ - -//} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD min -( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y -) -{ - return _mm_min_ps(x.Data, y.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD min -( - detail::fvec4SIMD const & x, - float const & y -) -{ - return _mm_min_ps(x.Data, _mm_set1_ps(y)); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD max -( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y -) -{ - return _mm_max_ps(x.Data, y.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD max -( - detail::fvec4SIMD const & x, - float const & y -) -{ - return _mm_max_ps(x.Data, _mm_set1_ps(y)); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD clamp -( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & minVal, - detail::fvec4SIMD const & maxVal -) -{ - return detail::sse_clp_ps(x.Data, minVal.Data, maxVal.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD clamp -( - detail::fvec4SIMD const & x, - float const & minVal, - float const & maxVal -) -{ - return detail::sse_clp_ps(x.Data, _mm_set1_ps(minVal), _mm_set1_ps(maxVal)); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD mix -( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y, - detail::fvec4SIMD const & a -) -{ - __m128 Sub0 = _mm_sub_ps(y.Data, x.Data); - __m128 Mul0 = _mm_mul_ps(a.Data, Sub0); - return _mm_add_ps(x.Data, Mul0); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD step -( - detail::fvec4SIMD const & edge, - detail::fvec4SIMD const & x -) -{ - __m128 cmp0 = _mm_cmpngt_ps(x.Data, edge.Data); - return _mm_max_ps(_mm_min_ps(cmp0, _mm_setzero_ps()), detail::one); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD step -( - float const & edge, - detail::fvec4SIMD const & x -) -{ - __m128 cmp0 = _mm_cmpngt_ps(x.Data, _mm_set1_ps(edge)); - return _mm_max_ps(_mm_min_ps(cmp0, _mm_setzero_ps()), detail::one); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD smoothstep -( - detail::fvec4SIMD const & edge0, - detail::fvec4SIMD const & edge1, - detail::fvec4SIMD const & x -) -{ - return detail::sse_ssp_ps(edge0.Data, edge1.Data, x.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD smoothstep -( - float const & edge0, - float const & edge1, - detail::fvec4SIMD const & x -) -{ - return detail::sse_ssp_ps(_mm_set1_ps(edge0), _mm_set1_ps(edge1), x.Data); -} - -//GLM_FUNC_QUALIFIER bvec4 isnan(detail::fvec4SIMD const & x) -//{ - -//} - -//GLM_FUNC_QUALIFIER bvec4 isinf(detail::fvec4SIMD const & x) -//{ - -//} - -//GLM_FUNC_QUALIFIER detail::ivec4SIMD floatBitsToInt -//( -// detail::fvec4SIMD const & value -//) -//{ - -//} - -//GLM_FUNC_QUALIFIER detail::fvec4SIMD intBitsToFloat -//( -// detail::ivec4SIMD const & value -//) -//{ - -//} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD fma -( - detail::fvec4SIMD const & a, - detail::fvec4SIMD const & b, - detail::fvec4SIMD const & c -) -{ - return _mm_add_ps(_mm_mul_ps(a.Data, b.Data), c.Data); -} - -GLM_FUNC_QUALIFIER float length -( - detail::fvec4SIMD const & x -) -{ - detail::fvec4SIMD dot0 = detail::sse_dot_ss(x.Data, x.Data); - detail::fvec4SIMD sqt0 = sqrt(dot0); - float Result = 0; - _mm_store_ss(&Result, sqt0.Data); - return Result; -} - -GLM_FUNC_QUALIFIER float fastLength -( - detail::fvec4SIMD const & x -) -{ - detail::fvec4SIMD dot0 = detail::sse_dot_ss(x.Data, x.Data); - detail::fvec4SIMD sqt0 = fastSqrt(dot0); - float Result = 0; - _mm_store_ss(&Result, sqt0.Data); - return Result; -} - -GLM_FUNC_QUALIFIER float niceLength -( - detail::fvec4SIMD const & x -) -{ - detail::fvec4SIMD dot0 = detail::sse_dot_ss(x.Data, x.Data); - detail::fvec4SIMD sqt0 = niceSqrt(dot0); - float Result = 0; - _mm_store_ss(&Result, sqt0.Data); - return Result; -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD length4 -( - detail::fvec4SIMD const & x -) -{ - return sqrt(dot4(x, x)); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD fastLength4 -( - detail::fvec4SIMD const & x -) -{ - return fastSqrt(dot4(x, x)); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD niceLength4 -( - detail::fvec4SIMD const & x -) -{ - return niceSqrt(dot4(x, x)); -} - -GLM_FUNC_QUALIFIER float distance -( - detail::fvec4SIMD const & p0, - detail::fvec4SIMD const & p1 -) -{ - float Result = 0; - _mm_store_ss(&Result, detail::sse_dst_ps(p0.Data, p1.Data)); - return Result; -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD distance4 -( - detail::fvec4SIMD const & p0, - detail::fvec4SIMD const & p1 -) -{ - return detail::sse_dst_ps(p0.Data, p1.Data); -} - -GLM_FUNC_QUALIFIER float dot -( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y -) -{ - float Result = 0; - _mm_store_ss(&Result, detail::sse_dot_ss(x.Data, y.Data)); - return Result; -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD dot4 -( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y -) -{ - return detail::sse_dot_ps(x.Data, y.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD cross -( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y -) -{ - return detail::sse_xpd_ps(x.Data, y.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD normalize -( - detail::fvec4SIMD const & x -) -{ - __m128 dot0 = detail::sse_dot_ps(x.Data, x.Data); - __m128 isr0 = inversesqrt(detail::fvec4SIMD(dot0)).Data; - __m128 mul0 = _mm_mul_ps(x.Data, isr0); - return mul0; -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD fastNormalize -( - detail::fvec4SIMD const & x -) -{ - __m128 dot0 = detail::sse_dot_ps(x.Data, x.Data); - __m128 isr0 = fastInversesqrt(dot0).Data; - __m128 mul0 = _mm_mul_ps(x.Data, isr0); - return mul0; -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD faceforward -( - detail::fvec4SIMD const & N, - detail::fvec4SIMD const & I, - detail::fvec4SIMD const & Nref -) -{ - return detail::sse_ffd_ps(N.Data, I.Data, Nref.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD reflect -( - detail::fvec4SIMD const & I, - detail::fvec4SIMD const & N -) -{ - return detail::sse_rfe_ps(I.Data, N.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD refract -( - detail::fvec4SIMD const & I, - detail::fvec4SIMD const & N, - float const & eta -) -{ - return detail::sse_rfa_ps(I.Data, N.Data, _mm_set1_ps(eta)); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD sqrt(detail::fvec4SIMD const & x) -{ - return _mm_mul_ps(inversesqrt(x).Data, x.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD niceSqrt(detail::fvec4SIMD const & x) -{ - return _mm_sqrt_ps(x.Data); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD fastSqrt(detail::fvec4SIMD const & x) -{ - return _mm_mul_ps(fastInversesqrt(x.Data).Data, x.Data); -} - -// SSE scalar reciprocal sqrt using rsqrt op, plus one Newton-Rhaphson iteration -// By Elan Ruskin, http://assemblyrequired.crashworks.org/ -GLM_FUNC_QUALIFIER detail::fvec4SIMD inversesqrt(detail::fvec4SIMD const & x) -{ - GLM_ALIGN(4) static const __m128 three = {3, 3, 3, 3}; // aligned consts for fast load - GLM_ALIGN(4) static const __m128 half = {0.5,0.5,0.5,0.5}; - - __m128 recip = _mm_rsqrt_ps(x.Data); // "estimate" opcode - __m128 halfrecip = _mm_mul_ps(half, recip); - __m128 threeminus_xrr = _mm_sub_ps(three, _mm_mul_ps(x.Data, _mm_mul_ps(recip, recip))); - return _mm_mul_ps(halfrecip, threeminus_xrr); -} - -GLM_FUNC_QUALIFIER detail::fvec4SIMD fastInversesqrt(detail::fvec4SIMD const & x) -{ - return _mm_rsqrt_ps(x.Data); -} - -}//namespace glm diff --git a/3rdparty/glm/glm/gtx/spline.hpp b/3rdparty/glm/glm/gtx/spline.hpp index 09fcf4e1a74..333a5bce137 100644 --- a/3rdparty/glm/glm/gtx/spline.hpp +++ b/3rdparty/glm/glm/gtx/spline.hpp @@ -1,43 +1,14 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_spline /// @file glm/gtx/spline.hpp -/// @date 2007-01-25 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtx_spline GLM_GTX_spline /// @ingroup gtx -/// +/// /// @brief Spline functions -/// +/// /// <glm/gtx/spline.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -45,7 +16,7 @@ #include "../glm.hpp" #include "../gtx/optimum_pow.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_spline extension included") #endif diff --git a/3rdparty/glm/glm/gtx/spline.inl b/3rdparty/glm/glm/gtx/spline.inl index befdc3c626e..fcd33828898 100644 --- a/3rdparty/glm/glm/gtx/spline.inl +++ b/3rdparty/glm/glm/gtx/spline.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_spline /// @file glm/gtx/spline.inl -/// @date 2007-01-25 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/std_based_type.hpp b/3rdparty/glm/glm/gtx/std_based_type.hpp index f4bc1930a8a..ea1791b3c35 100644 --- a/3rdparty/glm/glm/gtx/std_based_type.hpp +++ b/3rdparty/glm/glm/gtx/std_based_type.hpp @@ -1,43 +1,14 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_std_based_type /// @file glm/gtx/std_based_type.hpp -/// @date 2008-06-08 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtx_extented_min_max (dependence) /// /// @defgroup gtx_std_based_type GLM_GTX_std_based_type /// @ingroup gtx -/// +/// /// @brief Adds vector types based on STL value types. /// <glm/gtx/std_based_type.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -45,7 +16,7 @@ #include "../glm.hpp" #include <cstdlib> -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_std_based_type extension included") #endif diff --git a/3rdparty/glm/glm/gtx/std_based_type.inl b/3rdparty/glm/glm/gtx/std_based_type.inl index 4e3cf1c8e06..ca431a33a44 100644 --- a/3rdparty/glm/glm/gtx/std_based_type.inl +++ b/3rdparty/glm/glm/gtx/std_based_type.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_std_based_type /// @file glm/gtx/std_based_type.inl -/// @date 2008-06-08 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/string_cast.hpp b/3rdparty/glm/glm/gtx/string_cast.hpp index c292efd1c1a..d2b9fc6a7a6 100644 --- a/3rdparty/glm/glm/gtx/string_cast.hpp +++ b/3rdparty/glm/glm/gtx/string_cast.hpp @@ -1,33 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_string_cast /// @file glm/gtx/string_cast.hpp -/// @date 2008-04-26 / 2014-05-10 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtc_half_float (dependence) @@ -36,12 +8,11 @@ /// /// @defgroup gtx_string_cast GLM_GTX_string_cast /// @ingroup gtx -/// +/// /// @brief Setup strings for GLM type values -/// +/// /// <glm/gtx/string_cast.hpp> need to be included to use these functionalities. /// This extension is not supported with CUDA -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -56,7 +27,7 @@ # error "GLM_GTX_string_cast is not supported on CUDA compiler" #endif -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_string_cast extension included") #endif diff --git a/3rdparty/glm/glm/gtx/string_cast.inl b/3rdparty/glm/glm/gtx/string_cast.inl index c21fa75fbd6..19f136b7cc8 100644 --- a/3rdparty/glm/glm/gtx/string_cast.inl +++ b/3rdparty/glm/glm/gtx/string_cast.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_string_cast /// @file glm/gtx/string_cast.inl -/// @date 2008-04-26 / 2014-05-10 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #include <cstdarg> #include <cstdio> @@ -479,7 +450,7 @@ namespace detail }//namespace detail template <template <typename, precision> class matType, typename T, precision P> -GLM_FUNC_DECL std::string to_string(matType<T, P> const & x) +GLM_FUNC_QUALIFIER std::string to_string(matType<T, P> const & x) { return detail::compute_to_string<matType, T, P>::call(x); } diff --git a/3rdparty/glm/glm/gtx/transform.hpp b/3rdparty/glm/glm/gtx/transform.hpp index 5d22fba52b2..365748b9e34 100644 --- a/3rdparty/glm/glm/gtx/transform.hpp +++ b/3rdparty/glm/glm/gtx/transform.hpp @@ -1,33 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_transform /// @file glm/gtx/transform.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtc_matrix_transform (dependence) @@ -38,9 +10,8 @@ /// @ingroup gtx /// /// @brief Add transformation matrices -/// +/// /// <glm/gtx/transform.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -48,7 +19,7 @@ #include "../glm.hpp" #include "../gtc/matrix_transform.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_transform extension included") #endif diff --git a/3rdparty/glm/glm/gtx/transform.inl b/3rdparty/glm/glm/gtx/transform.inl index 832a4ca5caa..516d8661a3a 100644 --- a/3rdparty/glm/glm/gtx/transform.inl +++ b/3rdparty/glm/glm/gtx/transform.inl @@ -1,60 +1,24 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_transform /// @file glm/gtx/transform.inl -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { template <typename T, precision P> - GLM_FUNC_QUALIFIER tmat4x4<T, P> translate( - tvec3<T, P> const & v) + GLM_FUNC_QUALIFIER tmat4x4<T, P> translate(tvec3<T, P> const & v) { - return translate( - tmat4x4<T, P>(1.0f), v); + return translate(tmat4x4<T, P>(static_cast<T>(1)), v); } template <typename T, precision P> - GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate( - T angle, - tvec3<T, P> const & v) + GLM_FUNC_QUALIFIER tmat4x4<T, P> rotate(T angle, tvec3<T, P> const & v) { - return rotate( - tmat4x4<T, P>(1), angle, v); + return rotate(tmat4x4<T, P>(static_cast<T>(1)), angle, v); } template <typename T, precision P> - GLM_FUNC_QUALIFIER tmat4x4<T, P> scale( - tvec3<T, P> const & v) + GLM_FUNC_QUALIFIER tmat4x4<T, P> scale(tvec3<T, P> const & v) { - return scale( - tmat4x4<T, P>(1.0f), v); + return scale(tmat4x4<T, P>(static_cast<T>(1)), v); } }//namespace glm diff --git a/3rdparty/glm/glm/gtx/transform2.hpp b/3rdparty/glm/glm/gtx/transform2.hpp index 6f131aff9ab..bf5fbc9ee6e 100644 --- a/3rdparty/glm/glm/gtx/transform2.hpp +++ b/3rdparty/glm/glm/gtx/transform2.hpp @@ -1,44 +1,15 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_transform2 /// @file glm/gtx/transform2.hpp -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtx_transform (dependence) /// /// @defgroup gtx_transform2 GLM_GTX_transform2 /// @ingroup gtx -/// +/// /// @brief Add extra transformation matrices /// /// <glm/gtx/transform2.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -46,7 +17,7 @@ #include "../glm.hpp" #include "../gtx/transform.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_transform2 extension included") #endif diff --git a/3rdparty/glm/glm/gtx/transform2.inl b/3rdparty/glm/glm/gtx/transform2.inl index 102093b1a40..b65bd3dba1a 100644 --- a/3rdparty/glm/glm/gtx/transform2.inl +++ b/3rdparty/glm/glm/gtx/transform2.inl @@ -1,41 +1,10 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_transform2 /// @file glm/gtx/transform2.inl -/// @date 2005-12-21 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { template <typename T, precision P> - GLM_FUNC_QUALIFIER tmat3x3<T, P> shearX2D( - const tmat3x3<T, P>& m, - T s) + GLM_FUNC_QUALIFIER tmat3x3<T, P> shearX2D(tmat3x3<T, P> const& m, T s) { tmat3x3<T, P> r(1); r[0][1] = s; @@ -43,9 +12,7 @@ namespace glm } template <typename T, precision P> - GLM_FUNC_QUALIFIER tmat3x3<T, P> shearY2D( - const tmat3x3<T, P>& m, - T s) + GLM_FUNC_QUALIFIER tmat3x3<T, P> shearY2D(tmat3x3<T, P> const& m, T s) { tmat3x3<T, P> r(1); r[1][0] = s; @@ -53,10 +20,7 @@ namespace glm } template <typename T, precision P> - GLM_FUNC_QUALIFIER tmat4x4<T, P> shearX3D( - const tmat4x4<T, P>& m, - T s, - T t) + GLM_FUNC_QUALIFIER tmat4x4<T, P> shearX3D(tmat4x4<T, P> const& m, T s, T t) { tmat4x4<T, P> r(1); r[1][0] = s; @@ -65,10 +29,7 @@ namespace glm } template <typename T, precision P> - GLM_FUNC_QUALIFIER tmat4x4<T, P> shearY3D( - const tmat4x4<T, P>& m, - T s, - T t) + GLM_FUNC_QUALIFIER tmat4x4<T, P> shearY3D(tmat4x4<T, P> const& m, T s, T t) { tmat4x4<T, P> r(1); r[0][1] = s; @@ -77,10 +38,7 @@ namespace glm } template <typename T, precision P> - GLM_FUNC_QUALIFIER tmat4x4<T, P> shearZ3D( - const tmat4x4<T, P>& m, - T s, - T t) + GLM_FUNC_QUALIFIER tmat4x4<T, P> shearZ3D(tmat4x4<T, P> const& m, T s, T t) { tmat4x4<T, P> r(1); r[0][2] = s; @@ -89,35 +47,31 @@ namespace glm } template <typename T, precision P> - GLM_FUNC_QUALIFIER tmat3x3<T, P> reflect2D( - const tmat3x3<T, P>& m, - const tvec3<T, P>& normal) + GLM_FUNC_QUALIFIER tmat3x3<T, P> reflect2D(tmat3x3<T, P> const& m, tvec3<T, P> const& normal) { - tmat3x3<T, P> r(1); - r[0][0] = 1 - 2 * normal.x * normal.x; - r[0][1] = -2 * normal.x * normal.y; - r[1][0] = -2 * normal.x * normal.y; - r[1][1] = 1 - 2 * normal.y * normal.y; + tmat3x3<T, P> r(static_cast<T>(1)); + r[0][0] = static_cast<T>(1) - static_cast<T>(2) * normal.x * normal.x; + r[0][1] = -static_cast<T>(2) * normal.x * normal.y; + r[1][0] = -static_cast<T>(2) * normal.x * normal.y; + r[1][1] = static_cast<T>(1) - static_cast<T>(2) * normal.y * normal.y; return m * r; } template <typename T, precision P> - GLM_FUNC_QUALIFIER tmat4x4<T, P> reflect3D( - const tmat4x4<T, P>& m, - const tvec3<T, P>& normal) + GLM_FUNC_QUALIFIER tmat4x4<T, P> reflect3D(tmat4x4<T, P> const& m, tvec3<T, P> const& normal) { - tmat4x4<T, P> r(1); - r[0][0] = 1 - 2 * normal.x * normal.x; - r[0][1] = -2 * normal.x * normal.y; - r[0][2] = -2 * normal.x * normal.z; + tmat4x4<T, P> r(static_cast<T>(1)); + r[0][0] = static_cast<T>(1) - static_cast<T>(2) * normal.x * normal.x; + r[0][1] = -static_cast<T>(2) * normal.x * normal.y; + r[0][2] = -static_cast<T>(2) * normal.x * normal.z; - r[1][0] = -2 * normal.x * normal.y; - r[1][1] = 1 - 2 * normal.y * normal.y; - r[1][2] = -2 * normal.y * normal.z; + r[1][0] = -static_cast<T>(2) * normal.x * normal.y; + r[1][1] = static_cast<T>(1) - static_cast<T>(2) * normal.y * normal.y; + r[1][2] = -static_cast<T>(2) * normal.y * normal.z; - r[2][0] = -2 * normal.x * normal.z; - r[2][1] = -2 * normal.y * normal.z; - r[2][2] = 1 - 2 * normal.z * normal.z; + r[2][0] = -static_cast<T>(2) * normal.x * normal.z; + r[2][1] = -static_cast<T>(2) * normal.y * normal.z; + r[2][2] = static_cast<T>(1) - static_cast<T>(2) * normal.z * normal.z; return m * r; } @@ -126,11 +80,11 @@ namespace glm const tmat3x3<T, P>& m, const tvec3<T, P>& normal) { - tmat3x3<T, P> r(1); - r[0][0] = 1 - normal.x * normal.x; + tmat3x3<T, P> r(static_cast<T>(1)); + r[0][0] = static_cast<T>(1) - normal.x * normal.x; r[0][1] = - normal.x * normal.y; r[1][0] = - normal.x * normal.y; - r[1][1] = 1 - normal.y * normal.y; + r[1][1] = static_cast<T>(1) - normal.y * normal.y; return m * r; } @@ -139,26 +93,24 @@ namespace glm const tmat4x4<T, P>& m, const tvec3<T, P>& normal) { - tmat4x4<T, P> r(1); - r[0][0] = 1 - normal.x * normal.x; + tmat4x4<T, P> r(static_cast<T>(1)); + r[0][0] = static_cast<T>(1) - normal.x * normal.x; r[0][1] = - normal.x * normal.y; r[0][2] = - normal.x * normal.z; r[1][0] = - normal.x * normal.y; - r[1][1] = 1 - normal.y * normal.y; + r[1][1] = static_cast<T>(1) - normal.y * normal.y; r[1][2] = - normal.y * normal.z; r[2][0] = - normal.x * normal.z; r[2][1] = - normal.y * normal.z; - r[2][2] = 1 - normal.z * normal.z; + r[2][2] = static_cast<T>(1) - normal.z * normal.z; return m * r; } template <typename T, precision P> - GLM_FUNC_QUALIFIER tmat4x4<T, P> scaleBias( - T scale, - T bias) + GLM_FUNC_QUALIFIER tmat4x4<T, P> scaleBias(T scale, T bias) { tmat4x4<T, P> result; - result[3] = tvec4<T, P>(tvec3<T, P>(bias), T(1)); + result[3] = tvec4<T, P>(tvec3<T, P>(bias), static_cast<T>(1)); result[0][0] = scale; result[1][1] = scale; result[2][2] = scale; @@ -166,10 +118,7 @@ namespace glm } template <typename T, precision P> - GLM_FUNC_QUALIFIER tmat4x4<T, P> scaleBias( - const tmat4x4<T, P>& m, - T scale, - T bias) + GLM_FUNC_QUALIFIER tmat4x4<T, P> scaleBias(tmat4x4<T, P> const& m, T scale, T bias) { return m * scaleBias(scale, bias); } diff --git a/3rdparty/glm/glm/gtx/type_aligned.hpp b/3rdparty/glm/glm/gtx/type_aligned.hpp index a2838b26dcc..8962a6f8df7 100644 --- a/3rdparty/glm/glm/gtx/type_aligned.hpp +++ b/3rdparty/glm/glm/gtx/type_aligned.hpp @@ -1,53 +1,24 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_type_aligned /// @file glm/gtx/type_aligned.hpp -/// @date 2014-11-23 / 2014-12-23 -/// @author Christophe Riccio -/// +/// /// @see core (dependence) /// @see gtc_quaternion (dependence) -/// +/// /// @defgroup gtx_type_aligned GLM_GTX_type_aligned /// @ingroup gtx -/// +/// /// @brief Defines aligned types. -/// +/// /// @ref core_precision defines aligned types. -/// +/// /// <glm/gtx/type_aligned.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../gtc/type_precision.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_type_aligned extension included") #endif diff --git a/3rdparty/glm/glm/gtx/type_aligned.inl b/3rdparty/glm/glm/gtx/type_aligned.inl index 5e755f020dd..83202dff4e2 100644 --- a/3rdparty/glm/glm/gtx/type_aligned.inl +++ b/3rdparty/glm/glm/gtx/type_aligned.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtc_type_aligned /// @file glm/gtc/type_aligned.inl -/// @date 2014-11-23 / 2014-11-23 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/type_trait.hpp b/3rdparty/glm/glm/gtx/type_trait.hpp index ceb671b3602..0207a06d424 100644 --- a/3rdparty/glm/glm/gtx/type_trait.hpp +++ b/3rdparty/glm/glm/gtx/type_trait.hpp @@ -1,43 +1,14 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2016 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_type_trait /// @file glm/gtx/type_trait.hpp -/// @date 2016-03-12 / 2016-03-12 -/// @author Christophe Riccio -/// +/// /// @see core (dependence) -/// +/// /// @defgroup gtx_type_trait GLM_GTX_type_trait /// @ingroup gtx -/// +/// /// @brief Defines traits for each type. -/// +/// /// <glm/gtx/type_trait.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -57,7 +28,7 @@ #include "../gtc/quaternion.hpp" #include "../gtx/dual_quaternion.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_type_trait extension included") #endif diff --git a/3rdparty/glm/glm/gtx/vector_angle.hpp b/3rdparty/glm/glm/gtx/vector_angle.hpp index a05b988f9ba..d52d3f83f0e 100644 --- a/3rdparty/glm/glm/gtx/vector_angle.hpp +++ b/3rdparty/glm/glm/gtx/vector_angle.hpp @@ -1,33 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_vector_angle /// @file glm/gtx/vector_angle.hpp -/// @date 2005-12-30 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// @see gtx_quaternion (dependence) @@ -35,11 +7,10 @@ /// /// @defgroup gtx_vector_angle GLM_GTX_vector_angle /// @ingroup gtx -/// +/// /// @brief Compute angle between vectors -/// +/// /// <glm/gtx/vector_angle.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -49,7 +20,7 @@ #include "../gtx/quaternion.hpp" #include "../gtx/rotate_vector.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_vector_angle extension included") #endif diff --git a/3rdparty/glm/glm/gtx/vector_angle.inl b/3rdparty/glm/glm/gtx/vector_angle.inl index ba5fdd49d65..05c30285665 100644 --- a/3rdparty/glm/glm/gtx/vector_angle.inl +++ b/3rdparty/glm/glm/gtx/vector_angle.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_vector_angle /// @file glm/gtx/vector_angle.inl -/// @date 2005-12-30 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { diff --git a/3rdparty/glm/glm/gtx/vector_query.hpp b/3rdparty/glm/glm/gtx/vector_query.hpp index 88b22c2a266..2c0d0227c8d 100644 --- a/3rdparty/glm/glm/gtx/vector_query.hpp +++ b/3rdparty/glm/glm/gtx/vector_query.hpp @@ -1,43 +1,14 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_vector_query /// @file glm/gtx/vector_query.hpp -/// @date 2008-03-10 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtx_vector_query GLM_GTX_vector_query /// @ingroup gtx -/// +/// /// @brief Query informations of vector types /// /// <glm/gtx/vector_query.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once @@ -46,7 +17,7 @@ #include <cfloat> #include <limits> -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_vector_query extension included") #endif diff --git a/3rdparty/glm/glm/gtx/vector_query.inl b/3rdparty/glm/glm/gtx/vector_query.inl index e7b0cb14282..85ea5e582d5 100644 --- a/3rdparty/glm/glm/gtx/vector_query.inl +++ b/3rdparty/glm/glm/gtx/vector_query.inl @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_vector_query /// @file glm/gtx/vector_query.inl -/// @date 2008-03-10 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #include <cassert> diff --git a/3rdparty/glm/glm/gtx/wrap.hpp b/3rdparty/glm/glm/gtx/wrap.hpp index 20566516e98..00600732fa5 100644 --- a/3rdparty/glm/glm/gtx/wrap.hpp +++ b/3rdparty/glm/glm/gtx/wrap.hpp @@ -1,50 +1,22 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_wrap /// @file glm/gtx/wrap.hpp -/// @date 2009-11-25 / 2011-06-07 -/// @author Christophe Riccio /// /// @see core (dependence) /// /// @defgroup gtx_wrap GLM_GTX_wrap /// @ingroup gtx -/// +/// /// @brief Wrapping mode of texture coordinates. -/// +/// /// <glm/gtx/wrap.hpp> need to be included to use these functionalities. -/////////////////////////////////////////////////////////////////////////////////// #pragma once // Dependency: #include "../glm.hpp" +#include "../gtc/vec1.hpp" -#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTX_wrap extension included") #endif @@ -55,23 +27,23 @@ namespace glm /// Simulate GL_CLAMP OpenGL wrap mode /// @see gtx_wrap extension. - template <typename genType> - GLM_FUNC_DECL genType clamp(genType const & Texcoord); + template <typename genType> + GLM_FUNC_DECL genType clamp(genType const& Texcoord); /// Simulate GL_REPEAT OpenGL wrap mode /// @see gtx_wrap extension. - template <typename genType> - GLM_FUNC_DECL genType repeat(genType const & Texcoord); + template <typename genType> + GLM_FUNC_DECL genType repeat(genType const& Texcoord); /// Simulate GL_MIRRORED_REPEAT OpenGL wrap mode /// @see gtx_wrap extension. - template <typename genType> - GLM_FUNC_DECL genType mirrorClamp(genType const & Texcoord); + template <typename genType> + GLM_FUNC_DECL genType mirrorClamp(genType const& Texcoord); /// Simulate GL_MIRROR_REPEAT OpenGL wrap mode /// @see gtx_wrap extension. - template <typename genType> - GLM_FUNC_DECL genType mirrorRepeat(genType const & Texcoord); + template <typename genType> + GLM_FUNC_DECL genType mirrorRepeat(genType const& Texcoord); /// @} }// namespace glm diff --git a/3rdparty/glm/glm/gtx/wrap.inl b/3rdparty/glm/glm/gtx/wrap.inl index 402e815daa8..941a803e40d 100644 --- a/3rdparty/glm/glm/gtx/wrap.inl +++ b/3rdparty/glm/glm/gtx/wrap.inl @@ -1,178 +1,58 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref gtx_wrap /// @file glm/gtx/wrap.inl -/// @date 2009-11-25 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// namespace glm { - template <typename genType> - GLM_FUNC_QUALIFIER genType clamp(genType const & Texcoord) - { - return glm::clamp(Texcoord, genType(0), genType(1)); - } - - template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec2<T, P> clamp(tvec2<T, P> const & Texcoord) + template <typename T, precision P, template <typename, precision> class vecType> + GLM_FUNC_QUALIFIER vecType<T, P> clamp(vecType<T, P> const& Texcoord) { - tvec2<T, P> Result; - for(typename tvec2<T, P>::size_type i = 0; i < tvec2<T, P>::value_size(); ++i) - Result[i] = clamp_to_edge(Texcoord[i]); - return Result; + return glm::clamp(Texcoord, vecType<T, P>(0), vecType<T, P>(1)); } - template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec3<T, P> clamp(tvec3<T, P> const & Texcoord) + template <typename genType> + GLM_FUNC_QUALIFIER genType clamp(genType const & Texcoord) { - tvec3<T, P> Result; - for(typename tvec3<T, P>::size_type i = 0; i < tvec3<T, P>::value_size(); ++i) - Result[i] = clamp_to_edge(Texcoord[i]); - return Result; + return clamp(tvec1<genType, defaultp>(Texcoord)).x; } - template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec4<T, P> clamp(tvec4<T, P> const & Texcoord) + template <typename T, precision P, template <typename, precision> class vecType> + GLM_FUNC_QUALIFIER vecType<T, P> repeat(vecType<T, P> const& Texcoord) { - tvec4<T, P> Result; - for(typename tvec4<T, P>::size_type i = 0; i < tvec4<T, P>::value_size(); ++i) - Result[i] = clamp_to_edge(Texcoord[i]); - return Result; + return glm::fract(Texcoord); } template <typename genType> GLM_FUNC_QUALIFIER genType repeat(genType const & Texcoord) { - return glm::fract(Texcoord); - } - - template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec2<T, P> repeat(tvec2<T, P> const & Texcoord) - { - tvec2<T, P> Result; - for(typename tvec2<T, P>::size_type i = 0; i < tvec2<T, P>::value_size(); ++i) - Result[i] = repeat(Texcoord[i]); - return Result; - } - - template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec3<T, P> repeat(tvec3<T, P> const & Texcoord) - { - tvec3<T, P> Result; - for(typename tvec3<T, P>::size_type i = 0; i < tvec3<T, P>::value_size(); ++i) - Result[i] = repeat(Texcoord[i]); - return Result; + return repeat(tvec1<genType, defaultp>(Texcoord)).x; } - template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec4<T, P> repeat(tvec4<T, P> const & Texcoord) + template <typename T, precision P, template <typename, precision> class vecType> + GLM_FUNC_QUALIFIER vecType<T, P> mirrorClamp(vecType<T, P> const& Texcoord) { - tvec4<T, P> Result; - for(typename tvec4<T, P>::size_type i = 0; i < tvec4<T, P>::value_size(); ++i) - Result[i] = repeat(Texcoord[i]); - return Result; + return glm::fract(glm::abs(Texcoord)); } template <typename genType> GLM_FUNC_QUALIFIER genType mirrorClamp(genType const & Texcoord) { - return glm::fract(glm::abs(Texcoord)); - //return glm::mod(glm::abs(Texcoord), 1.0f); - } - - template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec2<T, P> mirrorClamp(tvec2<T, P> const & Texcoord) - { - tvec2<T, P> Result; - for(typename tvec2<T, P>::size_type i = 0; i < tvec2<T, P>::value_size(); ++i) - Result[i] = mirrorClamp(Texcoord[i]); - return Result; - } - - template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec3<T, P> mirrorClamp(tvec3<T, P> const & Texcoord) - { - tvec3<T, P> Result; - for(typename tvec3<T, P>::size_type i = 0; i < tvec3<T, P>::value_size(); ++i) - Result[i] = mirrorClamp(Texcoord[i]); - return Result; + return mirrorClamp(tvec1<genType, defaultp>(Texcoord)).x; } - template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec4<T, P> mirrorClamp(tvec4<T, P> const & Texcoord) + template <typename T, precision P, template <typename, precision> class vecType> + GLM_FUNC_QUALIFIER vecType<T, P> mirrorRepeat(vecType<T, P> const& Texcoord) { - tvec4<T, P> Result; - for(typename tvec4<T, P>::size_type i = 0; i < tvec4<T, P>::value_size(); ++i) - Result[i] = mirrorClamp(Texcoord[i]); - return Result; + vecType<T, P> const Abs = glm::abs(Texcoord); + vecType<T, P> const Clamp = glm::mod(glm::floor(Abs), vecType<T, P>(2)); + vecType<T, P> const Floor = glm::floor(Abs); + vecType<T, P> const Rest = Abs - Floor; + vecType<T, P> const Mirror = Clamp + Rest; + return mix(Rest, vecType<T, P>(1) - Rest, glm::greaterThanEqual(Mirror, vecType<T, P>(1))); } template <typename genType> - GLM_FUNC_QUALIFIER genType mirrorRepeat(genType const & Texcoord) - { - genType const Abs = glm::abs(Texcoord); - genType const Clamp = genType(int(glm::floor(Abs)) % 2); - genType const Floor = glm::floor(Abs); - genType const Rest = Abs - Floor; - genType const Mirror = Clamp + Rest; - - genType Out; - if(Mirror >= genType(1)) - Out = genType(1) - Rest; - else - Out = Rest; - return Out; - } - - template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec2<T, P> mirrorRepeat(tvec2<T, P> const & Texcoord) - { - tvec2<T, P> Result; - for(typename tvec2<T, P>::size_type i = 0; i < tvec2<T, P>::value_size(); ++i) - Result[i] = mirrorRepeat(Texcoord[i]); - return Result; - } - - template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec3<T, P> mirrorRepeat(tvec3<T, P> const & Texcoord) - { - tvec3<T, P> Result; - for(typename tvec3<T, P>::size_type i = 0; i < tvec3<T, P>::value_size(); ++i) - Result[i] = mirrorRepeat(Texcoord[i]); - return Result; - } - - template <typename T, precision P> - GLM_FUNC_QUALIFIER tvec4<T, P> mirrorRepeat(tvec4<T, P> const & Texcoord) + GLM_FUNC_QUALIFIER genType mirrorRepeat(genType const& Texcoord) { - tvec4<T, P> Result; - for(typename tvec4<T, P>::size_type i = 0; i < tvec4<T, P>::value_size(); ++i) - Result[i] = mirrorRepeat(Texcoord[i]); - return Result; + return mirrorRepeat(tvec1<genType, defaultp>(Texcoord)).x; } }//namespace glm diff --git a/3rdparty/glm/glm/integer.hpp b/3rdparty/glm/glm/integer.hpp index b21a8eaca38..178e10e7fdc 100644 --- a/3rdparty/glm/glm/integer.hpp +++ b/3rdparty/glm/glm/integer.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/integer.hpp -/// @date 2013-12-24 / 2013-12-24 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/mat2x2.hpp b/3rdparty/glm/glm/mat2x2.hpp index 84d55981f2f..420fe9d624a 100644 --- a/3rdparty/glm/glm/mat2x2.hpp +++ b/3rdparty/glm/glm/mat2x2.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/mat2x2.hpp -/// @date 2013-12-24 / 2013-12-24 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/mat2x3.hpp b/3rdparty/glm/glm/mat2x3.hpp index b6c98f664ed..5c1cc70b6f2 100644 --- a/3rdparty/glm/glm/mat2x3.hpp +++ b/3rdparty/glm/glm/mat2x3.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/mat2x3.hpp -/// @date 2013-12-24 / 2013-12-24 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/mat2x4.hpp b/3rdparty/glm/glm/mat2x4.hpp index c96b4c21137..a82f136f5de 100644 --- a/3rdparty/glm/glm/mat2x4.hpp +++ b/3rdparty/glm/glm/mat2x4.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/mat2x4.hpp -/// @date 2013-12-24 / 2013-12-24 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/mat3x2.hpp b/3rdparty/glm/glm/mat3x2.hpp index 9206ebf98a4..40a56deee9c 100644 --- a/3rdparty/glm/glm/mat3x2.hpp +++ b/3rdparty/glm/glm/mat3x2.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/mat3x2.hpp -/// @date 2013-12-24 / 2013-12-24 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/mat3x3.hpp b/3rdparty/glm/glm/mat3x3.hpp index 55882bad10f..66bfdfaf148 100644 --- a/3rdparty/glm/glm/mat3x3.hpp +++ b/3rdparty/glm/glm/mat3x3.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/mat3x3.hpp -/// @date 2013-12-24 / 2013-12-24 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/mat3x4.hpp b/3rdparty/glm/glm/mat3x4.hpp index f77f544d4a9..5f83407ae1f 100644 --- a/3rdparty/glm/glm/mat3x4.hpp +++ b/3rdparty/glm/glm/mat3x4.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/mat3x4.hpp -/// @date 2013-12-24 / 2013-12-24 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/mat4x2.hpp b/3rdparty/glm/glm/mat4x2.hpp index 2e54405c66e..fe67c4fd97c 100644 --- a/3rdparty/glm/glm/mat4x2.hpp +++ b/3rdparty/glm/glm/mat4x2.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/mat4x2.hpp -/// @date 2013-12-24 / 2013-12-24 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/mat4x3.hpp b/3rdparty/glm/glm/mat4x3.hpp index 52750a23cd3..74845997c4d 100644 --- a/3rdparty/glm/glm/mat4x3.hpp +++ b/3rdparty/glm/glm/mat4x3.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/mat4x4.hpp -/// @date 2013-12-24 / 2013-12-24 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/mat4x4.hpp b/3rdparty/glm/glm/mat4x4.hpp index 274423719e9..d6c44e8e7ad 100644 --- a/3rdparty/glm/glm/mat4x4.hpp +++ b/3rdparty/glm/glm/mat4x4.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/mat4x4.hpp -/// @date 2013-12-24 / 2013-12-24 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/matrix.hpp b/3rdparty/glm/glm/matrix.hpp index ee96675a119..736dd49939a 100644 --- a/3rdparty/glm/glm/matrix.hpp +++ b/3rdparty/glm/glm/matrix.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/matrix.hpp -/// @date 2013-12-24 / 2013-12-24 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/packing.hpp b/3rdparty/glm/glm/packing.hpp index 1786fd560ed..4545adb1d8c 100644 --- a/3rdparty/glm/glm/packing.hpp +++ b/3rdparty/glm/glm/packing.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/packing.hpp -/// @date 2013-12-24 / 2013-12-24 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/simd/common.h b/3rdparty/glm/glm/simd/common.h index 14af85b71a7..d8c212d2fd3 100644 --- a/3rdparty/glm/glm/simd/common.h +++ b/3rdparty/glm/glm/simd/common.h @@ -1,169 +1,240 @@ -#if(GLM_COMPILER & GLM_COMPILER_VC) -#pragma warning(push) -#pragma warning(disable : 4510 4512 4610) -#endif +/// @ref simd +/// @file glm/simd/common.h - union ieee754_QNAN - { - const float f; - struct i - { - const unsigned int mantissa:23, exp:8, sign:1; - }; +#pragma once - ieee754_QNAN() : f(0.0)/*, mantissa(0x7FFFFF), exp(0xFF), sign(0x0)*/ {} - }; +#include "platform.h" -#if(GLM_COMPILER & GLM_COMPILER_VC) -#pragma warning(pop) -#endif +#if GLM_ARCH & GLM_ARCH_SSE2_BIT -static const __m128 GLM_VAR_USED glm_zero = _mm_setzero_ps(); -static const __m128 GLM_VAR_USED glm_one = _mm_set_ps1(1.0f); -static const __m128 GLM_VAR_USED glm_half = _mm_set_ps1(0.5f); -static const __m128 GLM_VAR_USED glm_minus_one = _mm_set_ps1(-1.0f); -static const __m128 GLM_VAR_USED glm_two = _mm_set_ps1(2.0f); -static const __m128 GLM_VAR_USED glm_three = _mm_set_ps1(3.0f); +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_add(glm_vec4 a, glm_vec4 b) +{ + return _mm_add_ps(a, b); +} -static const ieee754_QNAN glm_abs_mask; -static const __m128 GLM_VAR_USED glm_abs4_mask = _mm_set_ps1(glm_abs_mask.f); -static const __m128 GLM_VAR_USED glm_epi32_sign_mask = _mm_castsi128_ps(_mm_set1_epi32(static_cast<int>(0x80000000))); -static const __m128 GLM_VAR_USED glm_ps_2pow23 = _mm_set_ps1(8388608.0f); -static const __m128 GLM_VAR_USED glm_ps_1 = _mm_set_ps1(1.0f); +GLM_FUNC_QUALIFIER glm_vec4 glm_vec1_add(glm_vec4 a, glm_vec4 b) +{ + return _mm_add_ss(a, b); +} -GLM_FUNC_QUALIFIER __m128 glm_abs_ps(__m128 x) +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_sub(glm_vec4 a, glm_vec4 b) { - return _mm_and_ps(glm_abs4_mask, x); + return _mm_sub_ps(a, b); } -//sign -GLM_FUNC_QUALIFIER __m128 glm_sgn_ps(__m128 x) +GLM_FUNC_QUALIFIER glm_vec4 glm_vec1_sub(glm_vec4 a, glm_vec4 b) { - __m128 const Cmp0 = _mm_cmplt_ps(x, glm_zero); - __m128 const Cmp1 = _mm_cmpgt_ps(x, glm_zero); - __m128 const And0 = _mm_and_ps(Cmp0, glm_minus_one); - __m128 const And1 = _mm_and_ps(Cmp1, glm_one); - return _mm_or_ps(And0, And1); + return _mm_sub_ss(a, b); } -//round -GLM_FUNC_QUALIFIER __m128 glm_rnd_ps(__m128 x) +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_mul(glm_vec4 a, glm_vec4 b) { - __m128 const and0 = _mm_and_ps(glm_epi32_sign_mask, x); - __m128 const or0 = _mm_or_ps(and0, glm_ps_2pow23); - __m128 const add0 = _mm_add_ps(x, or0); - __m128 const sub0 = _mm_sub_ps(add0, or0); - return sub0; + return _mm_mul_ps(a, b); } -//floor -GLM_FUNC_QUALIFIER __m128 glm_flr_ps(__m128 x) +GLM_FUNC_QUALIFIER glm_vec4 glm_vec1_mul(glm_vec4 a, glm_vec4 b) { - __m128 const rnd0 = glm_rnd_ps(x); - __m128 const cmp0 = _mm_cmplt_ps(x, rnd0); - __m128 const and0 = _mm_and_ps(cmp0, glm_ps_1); - __m128 const sub0 = _mm_sub_ps(rnd0, and0); - return sub0; + return _mm_mul_ss(a, b); +} + +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_div(glm_vec4 a, glm_vec4 b) +{ + return _mm_div_ps(a, b); +} + +GLM_FUNC_QUALIFIER glm_vec4 glm_vec1_div(glm_vec4 a, glm_vec4 b) +{ + return _mm_div_ss(a, b); } -//trunc -//GLM_FUNC_QUALIFIER __m128 _mm_trc_ps(__m128 v) -//{ -// return __m128(); -//} +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_div_lowp(glm_vec4 a, glm_vec4 b) +{ + return glm_vec4_mul(a, _mm_rcp_ps(b)); +} + +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_swizzle_xyzw(glm_vec4 a) +{ +# if GLM_ARCH & GLM_ARCH_AVX2_BIT + return _mm_permute_ps(a, _MM_SHUFFLE(3, 2, 1, 0)); +# else + return _mm_shuffle_ps(a, a, _MM_SHUFFLE(3, 2, 1, 0)); +# endif +} + +GLM_FUNC_QUALIFIER glm_vec4 glm_vec1_fma(glm_vec4 a, glm_vec4 b, glm_vec4 c) +{ +# if GLM_ARCH & GLM_ARCH_AVX2_BIT + return _mm_fmadd_ss(a, b, c); +# else + return _mm_add_ss(_mm_mul_ss(a, b), c); +# endif +} + +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_fma(glm_vec4 a, glm_vec4 b, glm_vec4 c) +{ +# if GLM_ARCH & GLM_ARCH_AVX2_BIT + return _mm_fmadd_ps(a, b, c); +# else + return glm_vec4_add(glm_vec4_mul(a, b), c); +# endif +} + +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_abs(glm_vec4 x) +{ + return _mm_and_ps(x, _mm_castsi128_ps(_mm_set1_epi32(0x7FFFFFFF))); +} + +GLM_FUNC_QUALIFIER glm_ivec4 glm_ivec4_abs(glm_ivec4 x) +{ +# if GLM_ARCH & GLM_ARCH_SSSE3_BIT + return _mm_sign_epi32(x, x); +# else + glm_ivec4 const sgn0 = _mm_srai_epi32(x, 31); + glm_ivec4 const inv0 = _mm_xor_si128(x, sgn0); + glm_ivec4 const sub0 = _mm_sub_epi32(inv0, sgn0); + return sub0; +# endif +} + +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_sign(glm_vec4 x) +{ + glm_vec4 const zro0 = _mm_setzero_ps(); + glm_vec4 const cmp0 = _mm_cmplt_ps(x, zro0); + glm_vec4 const cmp1 = _mm_cmpgt_ps(x, zro0); + glm_vec4 const and0 = _mm_and_ps(cmp0, _mm_set1_ps(-1.0f)); + glm_vec4 const and1 = _mm_and_ps(cmp1, _mm_set1_ps(1.0f)); + glm_vec4 const or0 = _mm_or_ps(and0, and1);; + return or0; +} + +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_round(glm_vec4 x) +{ +# if GLM_ARCH & GLM_ARCH_SSE41_BIT + return _mm_round_ps(x, _MM_FROUND_TO_NEAREST_INT); +# else + glm_vec4 const sgn0 = _mm_castsi128_ps(_mm_set1_epi32(0x80000000)); + glm_vec4 const and0 = _mm_and_ps(sgn0, x); + glm_vec4 const or0 = _mm_or_ps(and0, _mm_set_ps1(8388608.0f)); + glm_vec4 const add0 = glm_vec4_add(x, or0); + glm_vec4 const sub0 = glm_vec4_sub(add0, or0); + return sub0; +# endif +} + +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_floor(glm_vec4 x) +{ +# if GLM_ARCH & GLM_ARCH_SSE41_BIT + return _mm_floor_ps(x); +# else + glm_vec4 const rnd0 = glm_vec4_round(x); + glm_vec4 const cmp0 = _mm_cmplt_ps(x, rnd0); + glm_vec4 const and0 = _mm_and_ps(cmp0, _mm_set1_ps(1.0f)); + glm_vec4 const sub0 = glm_vec4_sub(rnd0, and0); + return sub0; +# endif +} + +/* trunc TODO +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_trunc(glm_vec4 x) +{ + return glm_vec4(); +} +*/ //roundEven -GLM_FUNC_QUALIFIER __m128 glm_rde_ps(__m128 x) +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_roundEven(glm_vec4 x) { - __m128 const and0 = _mm_and_ps(glm_epi32_sign_mask, x); - __m128 const or0 = _mm_or_ps(and0, glm_ps_2pow23); - __m128 const add0 = _mm_add_ps(x, or0); - __m128 const sub0 = _mm_sub_ps(add0, or0); + glm_vec4 const sgn0 = _mm_castsi128_ps(_mm_set1_epi32(0x80000000)); + glm_vec4 const and0 = _mm_and_ps(sgn0, x); + glm_vec4 const or0 = _mm_or_ps(and0, _mm_set_ps1(8388608.0f)); + glm_vec4 const add0 = glm_vec4_add(x, or0); + glm_vec4 const sub0 = glm_vec4_sub(add0, or0); return sub0; } -GLM_FUNC_QUALIFIER __m128 glm_ceil_ps(__m128 x) +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_ceil(glm_vec4 x) { - __m128 const rnd0 = glm_rnd_ps(x); - __m128 const cmp0 = _mm_cmpgt_ps(x, rnd0); - __m128 const and0 = _mm_and_ps(cmp0, glm_ps_1); - __m128 const add0 = _mm_add_ps(rnd0, and0); - return add0; +# if GLM_ARCH & GLM_ARCH_SSE41_BIT + return _mm_ceil_ps(x); +# else + glm_vec4 const rnd0 = glm_vec4_round(x); + glm_vec4 const cmp0 = _mm_cmpgt_ps(x, rnd0); + glm_vec4 const and0 = _mm_and_ps(cmp0, _mm_set1_ps(1.0f)); + glm_vec4 const add0 = glm_vec4_add(rnd0, and0); + return add0; +# endif } -GLM_FUNC_QUALIFIER __m128 glm_frc_ps(__m128 x) +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_fract(glm_vec4 x) { - __m128 const flr0 = glm_flr_ps(x); - __m128 const sub0 = _mm_sub_ps(x, flr0); + glm_vec4 const flr0 = glm_vec4_floor(x); + glm_vec4 const sub0 = glm_vec4_sub(x, flr0); return sub0; } -GLM_FUNC_QUALIFIER __m128 glm_mod_ps(__m128 x, __m128 y) +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_mod(glm_vec4 x, glm_vec4 y) { - __m128 const div0 = _mm_div_ps(x, y); - __m128 const flr0 = glm_flr_ps(div0); - __m128 const mul0 = _mm_mul_ps(y, flr0); - __m128 const sub0 = _mm_sub_ps(x, mul0); + glm_vec4 const div0 = glm_vec4_div(x, y); + glm_vec4 const flr0 = glm_vec4_floor(div0); + glm_vec4 const mul0 = glm_vec4_mul(y, flr0); + glm_vec4 const sub0 = glm_vec4_sub(x, mul0); return sub0; } -GLM_FUNC_QUALIFIER __m128 glm_clp_ps(__m128 v, __m128 minVal, __m128 maxVal) +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_clamp(glm_vec4 v, glm_vec4 minVal, glm_vec4 maxVal) { - __m128 const min0 = _mm_min_ps(v, maxVal); - __m128 const max0 = _mm_max_ps(min0, minVal); + glm_vec4 const min0 = _mm_min_ps(v, maxVal); + glm_vec4 const max0 = _mm_max_ps(min0, minVal); return max0; } -GLM_FUNC_QUALIFIER __m128 glm_mix_ps(__m128 v1, __m128 v2, __m128 a) +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_mix(glm_vec4 v1, glm_vec4 v2, glm_vec4 a) { - __m128 const sub0 = _mm_sub_ps(glm_one, a); - __m128 const mul0 = _mm_mul_ps(v1, sub0); - __m128 const mul1 = _mm_mul_ps(v2, a); - __m128 const add0 = _mm_add_ps(mul0, mul1); - return add0; + glm_vec4 const sub0 = glm_vec4_sub(_mm_set1_ps(1.0f), a); + glm_vec4 const mul0 = glm_vec4_mul(v1, sub0); + glm_vec4 const mad0 = glm_vec4_fma(v2, a, mul0); + return mad0; } -//step -GLM_FUNC_QUALIFIER __m128 glm_stp_ps(__m128 edge, __m128 x) +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_step(glm_vec4 edge, glm_vec4 x) { - __m128 const cmp = _mm_cmple_ps(x, edge); - return _mm_movemask_ps(cmp) == 0 ? glm_one : glm_zero; + glm_vec4 const cmp = _mm_cmple_ps(x, edge); + return _mm_movemask_ps(cmp) == 0 ? _mm_set1_ps(1.0f) : _mm_setzero_ps(); } -// smoothstep -GLM_FUNC_QUALIFIER __m128 glm_ssp_ps(__m128 edge0, __m128 edge1, __m128 x) +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_smoothstep(glm_vec4 edge0, glm_vec4 edge1, glm_vec4 x) { - __m128 const sub0 = _mm_sub_ps(x, edge0); - __m128 const sub1 = _mm_sub_ps(edge1, edge0); - __m128 const div0 = _mm_sub_ps(sub0, sub1); - __m128 const clp0 = glm_clp_ps(div0, glm_zero, glm_one); - __m128 const mul0 = _mm_mul_ps(glm_two, clp0); - __m128 const sub2 = _mm_sub_ps(glm_three, mul0); - __m128 const mul1 = _mm_mul_ps(clp0, clp0); - __m128 const mul2 = _mm_mul_ps(mul1, sub2); + glm_vec4 const sub0 = glm_vec4_sub(x, edge0); + glm_vec4 const sub1 = glm_vec4_sub(edge1, edge0); + glm_vec4 const div0 = glm_vec4_sub(sub0, sub1); + glm_vec4 const clp0 = glm_vec4_clamp(div0, _mm_setzero_ps(), _mm_set1_ps(1.0f)); + glm_vec4 const mul0 = glm_vec4_mul(_mm_set1_ps(2.0f), clp0); + glm_vec4 const sub2 = glm_vec4_sub(_mm_set1_ps(3.0f), mul0); + glm_vec4 const mul1 = glm_vec4_mul(clp0, clp0); + glm_vec4 const mul2 = glm_vec4_mul(mul1, sub2); return mul2; } -/// \todo -//GLM_FUNC_QUALIFIER __m128 glm_nan_ps(__m128 x) -//{ -// __m128 empty; -// return empty; -//} - -/// \todo -//GLM_FUNC_QUALIFIER __m128 glm_inf_ps(__m128 x) -//{ -// __m128 empty; -// return empty; -//} +// Agner Fog method +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_nan(glm_vec4 x) +{ + glm_ivec4 const t1 = _mm_castps_si128(x); // reinterpret as 32-bit integer + glm_ivec4 const t2 = _mm_sll_epi32(t1, _mm_cvtsi32_si128(1)); // shift out sign bit + glm_ivec4 const t3 = _mm_set1_epi32(0xFF000000); // exponent mask + glm_ivec4 const t4 = _mm_and_si128(t2, t3); // exponent + glm_ivec4 const t5 = _mm_andnot_si128(t3, t2); // fraction + glm_ivec4 const Equal = _mm_cmpeq_epi32(t3, t4); + glm_ivec4 const Nequal = _mm_cmpeq_epi32(t5, _mm_setzero_si128()); + glm_ivec4 const And = _mm_and_si128(Equal, Nequal); + return _mm_castsi128_ps(And); // exponent = all 1s and fraction != 0 +} -// SSE scalar reciprocal sqrt using rsqrt op, plus one Newton-Rhaphson iteration -// By Elan Ruskin, http://assemblyrequired.crashworks.org/ -GLM_FUNC_QUALIFIER __m128 glm_sqrt_wip_ss(__m128 x) +// Agner Fog method +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_inf(glm_vec4 x) { - __m128 const recip = _mm_rsqrt_ss(x); // "estimate" opcode - __m128 const halfrecip = _mm_mul_ss(glm_half, recip); - __m128 const threeminus_xrr = _mm_sub_ss(glm_three, _mm_mul_ss(x, _mm_mul_ss(recip, recip))); - return _mm_mul_ss(halfrecip, threeminus_xrr); + glm_ivec4 const t1 = _mm_castps_si128(x); // reinterpret as 32-bit integer + glm_ivec4 const t2 = _mm_sll_epi32(t1, _mm_cvtsi32_si128(1)); // shift out sign bit + return _mm_castsi128_ps(_mm_cmpeq_epi32(t2, _mm_set1_epi32(0xFF000000))); // exponent is all 1s, fraction is 0 } + +#endif//GLM_ARCH & GLM_ARCH_SSE2_BIT diff --git a/3rdparty/glm/glm/simd/exponential.h b/3rdparty/glm/glm/simd/exponential.h index e69de29bb2d..4eb0fb74747 100644 --- a/3rdparty/glm/glm/simd/exponential.h +++ b/3rdparty/glm/glm/simd/exponential.h @@ -0,0 +1,20 @@ +/// @ref simd +/// @file glm/simd/experimental.h + +#pragma once + +#include "platform.h" + +#if GLM_ARCH & GLM_ARCH_SSE2_BIT + +GLM_FUNC_QUALIFIER glm_vec4 glm_vec1_sqrt_lowp(glm_vec4 x) +{ + return _mm_mul_ss(_mm_rsqrt_ss(x), x); +} + +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_sqrt_lowp(glm_vec4 x) +{ + return _mm_mul_ps(_mm_rsqrt_ps(x), x); +} + +#endif//GLM_ARCH & GLM_ARCH_SSE2_BIT diff --git a/3rdparty/glm/glm/simd/geometric.h b/3rdparty/glm/glm/simd/geometric.h index d6cfe16c16b..ca533872447 100644 --- a/3rdparty/glm/glm/simd/geometric.h +++ b/3rdparty/glm/glm/simd/geometric.h @@ -1,101 +1,124 @@ +/// @ref simd +/// @file glm/simd/geometric.h + #pragma once #include "common.h" -GLM_FUNC_QUALIFIER __m128 glm_dot_ps(__m128 v1, __m128 v2) +#if GLM_ARCH & GLM_ARCH_SSE2_BIT + +GLM_FUNC_DECL glm_vec4 glm_vec4_dot(glm_vec4 v1, glm_vec4 v2); +GLM_FUNC_DECL glm_vec4 glm_vec1_dot(glm_vec4 v1, glm_vec4 v2); + +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_length(glm_vec4 x) { -# if GLM_ARCH & GLM_ARCH_AVX - return _mm_dp_ps(v1, v2, 0xff); -# else - __m128 const mul0 = _mm_mul_ps(v1, v2); - __m128 const swp0 = _mm_shuffle_ps(mul0, mul0, _MM_SHUFFLE(2, 3, 0, 1)); - __m128 const add0 = _mm_add_ps(mul0, swp0); - __m128 const swp1 = _mm_shuffle_ps(add0, add0, _MM_SHUFFLE(0, 1, 2, 3)); - __m128 const add1 = _mm_add_ps(add0, swp1); - return add1; -# endif + glm_vec4 const dot0 = glm_vec4_dot(x, x); + glm_vec4 const sqt0 = _mm_sqrt_ps(dot0); + return sqt0; } -GLM_FUNC_QUALIFIER __m128 glm_dot_ss(__m128 v1, __m128 v2) +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_distance(glm_vec4 p0, glm_vec4 p1) { - __m128 const mul0 = _mm_mul_ps(v1, v2); - __m128 const mov0 = _mm_movehl_ps(mul0, mul0); - __m128 const add0 = _mm_add_ps(mov0, mul0); - __m128 const swp1 = _mm_shuffle_ps(add0, add0, 1); - __m128 const add1 = _mm_add_ss(add0, swp1); - return add1; + glm_vec4 const sub0 = _mm_sub_ps(p0, p1); + glm_vec4 const len0 = glm_vec4_length(sub0); + return len0; } -GLM_FUNC_QUALIFIER __m128 glm_len_ps(__m128 x) +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_dot(glm_vec4 v1, glm_vec4 v2) { - __m128 const dot0 = glm_dot_ps(x, x); - __m128 const sqt0 = _mm_sqrt_ps(dot0); - return sqt0; +# if GLM_ARCH & GLM_ARCH_AVX_BIT + return _mm_dp_ps(v1, v2, 0xff); +# elif GLM_ARCH & GLM_ARCH_SSE3_BIT + glm_vec4 const mul0 = _mm_mul_ps(v1, v2); + glm_vec4 const hadd0 = _mm_hadd_ps(mul0, mul0); + glm_vec4 const hadd1 = _mm_hadd_ps(hadd0, hadd0); + return hadd1; +# else + glm_vec4 const mul0 = _mm_mul_ps(v1, v2); + glm_vec4 const swp0 = _mm_shuffle_ps(mul0, mul0, _MM_SHUFFLE(2, 3, 0, 1)); + glm_vec4 const add0 = _mm_add_ps(mul0, swp0); + glm_vec4 const swp1 = _mm_shuffle_ps(add0, add0, _MM_SHUFFLE(0, 1, 2, 3)); + glm_vec4 const add1 = _mm_add_ps(add0, swp1); + return add1; +# endif } -GLM_FUNC_QUALIFIER __m128 glm_dst_ps(__m128 p0, __m128 p1) +GLM_FUNC_QUALIFIER glm_vec4 glm_vec1_dot(glm_vec4 v1, glm_vec4 v2) { - __m128 sub0 = _mm_sub_ps(p0, p1); - __m128 len0 = glm_len_ps(sub0); - return len0; +# if GLM_ARCH & GLM_ARCH_AVX_BIT + return _mm_dp_ps(v1, v2, 0xff); +# elif GLM_ARCH & GLM_ARCH_SSE3_BIT + glm_vec4 const mul0 = _mm_mul_ps(v1, v2); + glm_vec4 const had0 = _mm_hadd_ps(mul0, mul0); + glm_vec4 const had1 = _mm_hadd_ps(had0, had0); + return had1; +# else + glm_vec4 const mul0 = _mm_mul_ps(v1, v2); + glm_vec4 const mov0 = _mm_movehl_ps(mul0, mul0); + glm_vec4 const add0 = _mm_add_ps(mov0, mul0); + glm_vec4 const swp1 = _mm_shuffle_ps(add0, add0, 1); + glm_vec4 const add1 = _mm_add_ss(add0, swp1); + return add1; +# endif } -GLM_FUNC_QUALIFIER __m128 glm_xpd_ps(__m128 v1, __m128 v2) +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_cross(glm_vec4 v1, glm_vec4 v2) { - __m128 swp0 = _mm_shuffle_ps(v1, v1, _MM_SHUFFLE(3, 0, 2, 1)); - __m128 swp1 = _mm_shuffle_ps(v1, v1, _MM_SHUFFLE(3, 1, 0, 2)); - __m128 swp2 = _mm_shuffle_ps(v2, v2, _MM_SHUFFLE(3, 0, 2, 1)); - __m128 swp3 = _mm_shuffle_ps(v2, v2, _MM_SHUFFLE(3, 1, 0, 2)); - __m128 mul0 = _mm_mul_ps(swp0, swp3); - __m128 mul1 = _mm_mul_ps(swp1, swp2); - __m128 sub0 = _mm_sub_ps(mul0, mul1); + glm_vec4 const swp0 = _mm_shuffle_ps(v1, v1, _MM_SHUFFLE(3, 0, 2, 1)); + glm_vec4 const swp1 = _mm_shuffle_ps(v1, v1, _MM_SHUFFLE(3, 1, 0, 2)); + glm_vec4 const swp2 = _mm_shuffle_ps(v2, v2, _MM_SHUFFLE(3, 0, 2, 1)); + glm_vec4 const swp3 = _mm_shuffle_ps(v2, v2, _MM_SHUFFLE(3, 1, 0, 2)); + glm_vec4 const mul0 = _mm_mul_ps(swp0, swp3); + glm_vec4 const mul1 = _mm_mul_ps(swp1, swp2); + glm_vec4 const sub0 = _mm_sub_ps(mul0, mul1); return sub0; } -GLM_FUNC_QUALIFIER __m128 glm_nrm_ps(__m128 v) +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_normalize(glm_vec4 v) { - __m128 dot0 = glm_dot_ps(v, v); - __m128 isr0 = _mm_rsqrt_ps(dot0); - __m128 mul0 = _mm_mul_ps(v, isr0); + glm_vec4 const dot0 = glm_vec4_dot(v, v); + glm_vec4 const isr0 = _mm_rsqrt_ps(dot0); + glm_vec4 const mul0 = _mm_mul_ps(v, isr0); return mul0; } -GLM_FUNC_QUALIFIER __m128 glm_ffd_ps(__m128 N, __m128 I, __m128 Nref) +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_faceforward(glm_vec4 N, glm_vec4 I, glm_vec4 Nref) { - __m128 dot0 = glm_dot_ps(Nref, I); - __m128 sgn0 = glm_sgn_ps(dot0); - __m128 mul0 = _mm_mul_ps(sgn0, glm_minus_one); - __m128 mul1 = _mm_mul_ps(N, mul0); + glm_vec4 const dot0 = glm_vec4_dot(Nref, I); + glm_vec4 const sgn0 = glm_vec4_sign(dot0); + glm_vec4 const mul0 = _mm_mul_ps(sgn0, _mm_set1_ps(-1.0f)); + glm_vec4 const mul1 = _mm_mul_ps(N, mul0); return mul1; } -GLM_FUNC_QUALIFIER __m128 glm_rfe_ps(__m128 I, __m128 N) +GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_reflect(glm_vec4 I, glm_vec4 N) { - __m128 dot0 = glm_dot_ps(N, I); - __m128 mul0 = _mm_mul_ps(N, dot0); - __m128 mul1 = _mm_mul_ps(mul0, glm_two); - __m128 sub0 = _mm_sub_ps(I, mul1); + glm_vec4 const dot0 = glm_vec4_dot(N, I); + glm_vec4 const mul0 = _mm_mul_ps(N, dot0); + glm_vec4 const mul1 = _mm_mul_ps(mul0, _mm_set1_ps(2.0f)); + glm_vec4 const sub0 = _mm_sub_ps(I, mul1); return sub0; } -GLM_FUNC_QUALIFIER __m128 glm_rfa_ps(__m128 I, __m128 N, __m128 eta) +GLM_FUNC_QUALIFIER __m128 glm_vec4_refract(glm_vec4 I, glm_vec4 N, glm_vec4 eta) { - __m128 dot0 = glm_dot_ps(N, I); - __m128 mul0 = _mm_mul_ps(eta, eta); - __m128 mul1 = _mm_mul_ps(dot0, dot0); - __m128 sub0 = _mm_sub_ps(glm_one, mul0); - __m128 sub1 = _mm_sub_ps(glm_one, mul1); - __m128 mul2 = _mm_mul_ps(sub0, sub1); + glm_vec4 const dot0 = glm_vec4_dot(N, I); + glm_vec4 const mul0 = _mm_mul_ps(eta, eta); + glm_vec4 const mul1 = _mm_mul_ps(dot0, dot0); + glm_vec4 const sub0 = _mm_sub_ps(_mm_set1_ps(1.0f), mul0); + glm_vec4 const sub1 = _mm_sub_ps(_mm_set1_ps(1.0f), mul1); + glm_vec4 const mul2 = _mm_mul_ps(sub0, sub1); - if(_mm_movemask_ps(_mm_cmplt_ss(mul2, glm_zero)) == 0) - return glm_zero; + if(_mm_movemask_ps(_mm_cmplt_ss(mul2, _mm_set1_ps(0.0f))) == 0) + return _mm_set1_ps(0.0f); - __m128 sqt0 = _mm_sqrt_ps(mul2); - __m128 mul3 = _mm_mul_ps(eta, dot0); - __m128 add0 = _mm_add_ps(mul3, sqt0); - __m128 mul4 = _mm_mul_ps(add0, N); - __m128 mul5 = _mm_mul_ps(eta, I); - __m128 sub2 = _mm_sub_ps(mul5, mul4); + glm_vec4 const sqt0 = _mm_sqrt_ps(mul2); + glm_vec4 const mad0 = glm_vec4_fma(eta, dot0, sqt0); + glm_vec4 const mul4 = _mm_mul_ps(mad0, N); + glm_vec4 const mul5 = _mm_mul_ps(eta, I); + glm_vec4 const sub2 = _mm_sub_ps(mul5, mul4); return sub2; } + +#endif//GLM_ARCH & GLM_ARCH_SSE2_BIT diff --git a/3rdparty/glm/glm/simd/integer.h b/3rdparty/glm/glm/simd/integer.h index e69de29bb2d..50fd8248b6a 100644 --- a/3rdparty/glm/glm/simd/integer.h +++ b/3rdparty/glm/glm/simd/integer.h @@ -0,0 +1,115 @@ +/// @ref simd +/// @file glm/simd/integer.h + +#pragma once + +#if GLM_ARCH & GLM_ARCH_SSE2_BIT + +GLM_FUNC_QUALIFIER glm_uvec4 glm_i128_interleave(glm_uvec4 x) +{ + glm_uvec4 const Mask4 = _mm_set1_epi32(0x0000FFFF); + glm_uvec4 const Mask3 = _mm_set1_epi32(0x00FF00FF); + glm_uvec4 const Mask2 = _mm_set1_epi32(0x0F0F0F0F); + glm_uvec4 const Mask1 = _mm_set1_epi32(0x33333333); + glm_uvec4 const Mask0 = _mm_set1_epi32(0x55555555); + + glm_uvec4 Reg1; + glm_uvec4 Reg2; + + // REG1 = x; + // REG2 = y; + //Reg1 = _mm_unpacklo_epi64(x, y); + Reg1 = x; + + //REG1 = ((REG1 << 16) | REG1) & glm::uint64(0x0000FFFF0000FFFF); + //REG2 = ((REG2 << 16) | REG2) & glm::uint64(0x0000FFFF0000FFFF); + Reg2 = _mm_slli_si128(Reg1, 2); + Reg1 = _mm_or_si128(Reg2, Reg1); + Reg1 = _mm_and_si128(Reg1, Mask4); + + //REG1 = ((REG1 << 8) | REG1) & glm::uint64(0x00FF00FF00FF00FF); + //REG2 = ((REG2 << 8) | REG2) & glm::uint64(0x00FF00FF00FF00FF); + Reg2 = _mm_slli_si128(Reg1, 1); + Reg1 = _mm_or_si128(Reg2, Reg1); + Reg1 = _mm_and_si128(Reg1, Mask3); + + //REG1 = ((REG1 << 4) | REG1) & glm::uint64(0x0F0F0F0F0F0F0F0F); + //REG2 = ((REG2 << 4) | REG2) & glm::uint64(0x0F0F0F0F0F0F0F0F); + Reg2 = _mm_slli_epi32(Reg1, 4); + Reg1 = _mm_or_si128(Reg2, Reg1); + Reg1 = _mm_and_si128(Reg1, Mask2); + + //REG1 = ((REG1 << 2) | REG1) & glm::uint64(0x3333333333333333); + //REG2 = ((REG2 << 2) | REG2) & glm::uint64(0x3333333333333333); + Reg2 = _mm_slli_epi32(Reg1, 2); + Reg1 = _mm_or_si128(Reg2, Reg1); + Reg1 = _mm_and_si128(Reg1, Mask1); + + //REG1 = ((REG1 << 1) | REG1) & glm::uint64(0x5555555555555555); + //REG2 = ((REG2 << 1) | REG2) & glm::uint64(0x5555555555555555); + Reg2 = _mm_slli_epi32(Reg1, 1); + Reg1 = _mm_or_si128(Reg2, Reg1); + Reg1 = _mm_and_si128(Reg1, Mask0); + + //return REG1 | (REG2 << 1); + Reg2 = _mm_slli_epi32(Reg1, 1); + Reg2 = _mm_srli_si128(Reg2, 8); + Reg1 = _mm_or_si128(Reg1, Reg2); + + return Reg1; +} + +GLM_FUNC_QUALIFIER glm_uvec4 glm_i128_interleave2(glm_uvec4 x, glm_uvec4 y) +{ + glm_uvec4 const Mask4 = _mm_set1_epi32(0x0000FFFF); + glm_uvec4 const Mask3 = _mm_set1_epi32(0x00FF00FF); + glm_uvec4 const Mask2 = _mm_set1_epi32(0x0F0F0F0F); + glm_uvec4 const Mask1 = _mm_set1_epi32(0x33333333); + glm_uvec4 const Mask0 = _mm_set1_epi32(0x55555555); + + glm_uvec4 Reg1; + glm_uvec4 Reg2; + + // REG1 = x; + // REG2 = y; + Reg1 = _mm_unpacklo_epi64(x, y); + + //REG1 = ((REG1 << 16) | REG1) & glm::uint64(0x0000FFFF0000FFFF); + //REG2 = ((REG2 << 16) | REG2) & glm::uint64(0x0000FFFF0000FFFF); + Reg2 = _mm_slli_si128(Reg1, 2); + Reg1 = _mm_or_si128(Reg2, Reg1); + Reg1 = _mm_and_si128(Reg1, Mask4); + + //REG1 = ((REG1 << 8) | REG1) & glm::uint64(0x00FF00FF00FF00FF); + //REG2 = ((REG2 << 8) | REG2) & glm::uint64(0x00FF00FF00FF00FF); + Reg2 = _mm_slli_si128(Reg1, 1); + Reg1 = _mm_or_si128(Reg2, Reg1); + Reg1 = _mm_and_si128(Reg1, Mask3); + + //REG1 = ((REG1 << 4) | REG1) & glm::uint64(0x0F0F0F0F0F0F0F0F); + //REG2 = ((REG2 << 4) | REG2) & glm::uint64(0x0F0F0F0F0F0F0F0F); + Reg2 = _mm_slli_epi32(Reg1, 4); + Reg1 = _mm_or_si128(Reg2, Reg1); + Reg1 = _mm_and_si128(Reg1, Mask2); + + //REG1 = ((REG1 << 2) | REG1) & glm::uint64(0x3333333333333333); + //REG2 = ((REG2 << 2) | REG2) & glm::uint64(0x3333333333333333); + Reg2 = _mm_slli_epi32(Reg1, 2); + Reg1 = _mm_or_si128(Reg2, Reg1); + Reg1 = _mm_and_si128(Reg1, Mask1); + + //REG1 = ((REG1 << 1) | REG1) & glm::uint64(0x5555555555555555); + //REG2 = ((REG2 << 1) | REG2) & glm::uint64(0x5555555555555555); + Reg2 = _mm_slli_epi32(Reg1, 1); + Reg1 = _mm_or_si128(Reg2, Reg1); + Reg1 = _mm_and_si128(Reg1, Mask0); + + //return REG1 | (REG2 << 1); + Reg2 = _mm_slli_epi32(Reg1, 1); + Reg2 = _mm_srli_si128(Reg2, 8); + Reg1 = _mm_or_si128(Reg1, Reg2); + + return Reg1; +} + +#endif//GLM_ARCH & GLM_ARCH_SSE2_BIT diff --git a/3rdparty/glm/glm/simd/matrix.h b/3rdparty/glm/glm/simd/matrix.h index dcf94412441..549d40cc32a 100644 --- a/3rdparty/glm/glm/simd/matrix.h +++ b/3rdparty/glm/glm/simd/matrix.h @@ -1,17 +1,13 @@ +/// @ref simd +/// @file glm/simd/matrix.h + #pragma once #include "geometric.h" -static const __m128 GLM_VAR_USED _m128_rad_ps = _mm_set_ps1(3.141592653589793238462643383279f / 180.f); -static const __m128 GLM_VAR_USED _m128_deg_ps = _mm_set_ps1(180.f / 3.141592653589793238462643383279f); +#if GLM_ARCH & GLM_ARCH_SSE2_BIT -template <typename matType> -GLM_FUNC_QUALIFIER matType glm_comp_mul_ps -( - __m128 const in1[4], - __m128 const in2[4], - __m128 out[4] -) +GLM_FUNC_QUALIFIER void glm_mat4_matrixCompMult(glm_vec4 const in1[4], glm_vec4 const in2[4], glm_vec4 out[4]) { out[0] = _mm_mul_ps(in1[0], in2[0]); out[1] = _mm_mul_ps(in1[1], in2[1]); @@ -19,27 +15,23 @@ GLM_FUNC_QUALIFIER matType glm_comp_mul_ps out[3] = _mm_mul_ps(in1[3], in2[3]); } -GLM_FUNC_QUALIFIER void glm_add_ps(__m128 const in1[4], __m128 const in2[4], __m128 out[4]) +GLM_FUNC_QUALIFIER void glm_mat4_add(glm_vec4 const in1[4], glm_vec4 const in2[4], glm_vec4 out[4]) { - { - out[0] = _mm_add_ps(in1[0], in2[0]); - out[1] = _mm_add_ps(in1[1], in2[1]); - out[2] = _mm_add_ps(in1[2], in2[2]); - out[3] = _mm_add_ps(in1[3], in2[3]); - } + out[0] = _mm_add_ps(in1[0], in2[0]); + out[1] = _mm_add_ps(in1[1], in2[1]); + out[2] = _mm_add_ps(in1[2], in2[2]); + out[3] = _mm_add_ps(in1[3], in2[3]); } -GLM_FUNC_QUALIFIER void glm_sub_ps(__m128 const in1[4], __m128 const in2[4], __m128 out[4]) +GLM_FUNC_QUALIFIER void glm_mat4_sub(glm_vec4 const in1[4], glm_vec4 const in2[4], glm_vec4 out[4]) { - { - out[0] = _mm_sub_ps(in1[0], in2[0]); - out[1] = _mm_sub_ps(in1[1], in2[1]); - out[2] = _mm_sub_ps(in1[2], in2[2]); - out[3] = _mm_sub_ps(in1[3], in2[3]); - } + out[0] = _mm_sub_ps(in1[0], in2[0]); + out[1] = _mm_sub_ps(in1[1], in2[1]); + out[2] = _mm_sub_ps(in1[2], in2[2]); + out[3] = _mm_sub_ps(in1[3], in2[3]); } -GLM_FUNC_QUALIFIER __m128 glm_mul_ps(__m128 const m[4], __m128 v) +GLM_FUNC_QUALIFIER glm_vec4 glm_mat4_mul_vec4(glm_vec4 const m[4], glm_vec4 v) { __m128 v0 = _mm_shuffle_ps(v, v, _MM_SHUFFLE(0, 0, 0, 0)); __m128 v1 = _mm_shuffle_ps(v, v, _MM_SHUFFLE(1, 1, 1, 1)); @@ -58,7 +50,7 @@ GLM_FUNC_QUALIFIER __m128 glm_mul_ps(__m128 const m[4], __m128 v) return a2; } -GLM_FUNC_QUALIFIER __m128 glm_mul_ps(__m128 v, __m128 const m[4]) +GLM_FUNC_QUALIFIER __m128 glm_vec4_mul_mat4(glm_vec4 v, glm_vec4 const m[4]) { __m128 i0 = m[0]; __m128 i1 = m[1]; @@ -85,7 +77,7 @@ GLM_FUNC_QUALIFIER __m128 glm_mul_ps(__m128 v, __m128 const m[4]) return f2; } -GLM_FUNC_QUALIFIER void glm_mul_ps(__m128 const in1[4], __m128 const in2[4], __m128 out[4]) +GLM_FUNC_QUALIFIER void glm_mat4_mul(glm_vec4 const in1[4], glm_vec4 const in2[4], glm_vec4 out[4]) { { __m128 e0 = _mm_shuffle_ps(in2[0], in2[0], _MM_SHUFFLE(0, 0, 0, 0)); @@ -161,7 +153,7 @@ GLM_FUNC_QUALIFIER void glm_mul_ps(__m128 const in1[4], __m128 const in2[4], __m } } -GLM_FUNC_QUALIFIER void glm_transpose_ps(__m128 const in[4], __m128 out[4]) +GLM_FUNC_QUALIFIER void glm_mat4_transpose(glm_vec4 const in[4], glm_vec4 out[4]) { __m128 tmp0 = _mm_shuffle_ps(in[0], in[1], 0x44); __m128 tmp2 = _mm_shuffle_ps(in[0], in[1], 0xEE); @@ -174,7 +166,7 @@ GLM_FUNC_QUALIFIER void glm_transpose_ps(__m128 const in[4], __m128 out[4]) out[3] = _mm_shuffle_ps(tmp2, tmp3, 0xDD); } -GLM_FUNC_QUALIFIER __m128 glm_slow_det_ps(__m128 const in[4]) +GLM_FUNC_QUALIFIER glm_vec4 glm_mat4_determinant_highp(glm_vec4 const in[4]) { __m128 Fac0; { @@ -384,11 +376,11 @@ GLM_FUNC_QUALIFIER __m128 glm_slow_det_ps(__m128 const in[4]) // + m[0][1] * Inverse[1][0] // + m[0][2] * Inverse[2][0] // + m[0][3] * Inverse[3][0]; - __m128 Det0 = glm_dot_ps(in[0], Row2); + __m128 Det0 = glm_vec4_dot(in[0], Row2); return Det0; } -GLM_FUNC_QUALIFIER __m128 glm_detd_ps(__m128 const m[4]) +GLM_FUNC_QUALIFIER glm_vec4 glm_mat4_determinant_lowp(glm_vec4 const m[4]) { // _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128( @@ -448,10 +440,10 @@ GLM_FUNC_QUALIFIER __m128 glm_detd_ps(__m128 const m[4]) // + m[0][2] * DetCof[2] // + m[0][3] * DetCof[3]; - return glm_dot_ps(m[0], DetCof); + return glm_vec4_dot(m[0], DetCof); } -GLM_FUNC_QUALIFIER __m128 glm_det_ps(__m128 const m[4]) +GLM_FUNC_QUALIFIER glm_vec4 glm_mat4_determinant(glm_vec4 const m[4]) { // _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(add) @@ -511,10 +503,10 @@ GLM_FUNC_QUALIFIER __m128 glm_det_ps(__m128 const m[4]) // + m[0][2] * DetCof[2] // + m[0][3] * DetCof[3]; - return glm_dot_ps(m[0], DetCof); + return glm_vec4_dot(m[0], DetCof); } -GLM_FUNC_QUALIFIER void glm_inverse_ps(__m128 const in[4], __m128 out[4]) +GLM_FUNC_QUALIFIER void glm_mat4_inverse(glm_vec4 const in[4], glm_vec4 out[4]) { __m128 Fac0; { @@ -724,8 +716,8 @@ GLM_FUNC_QUALIFIER void glm_inverse_ps(__m128 const in[4], __m128 out[4]) // + m[0][1] * Inverse[1][0] // + m[0][2] * Inverse[2][0] // + m[0][3] * Inverse[3][0]; - __m128 Det0 = glm_dot_ps(in[0], Row2); - __m128 Rcp0 = _mm_div_ps(glm_one, Det0); + __m128 Det0 = glm_vec4_dot(in[0], Row2); + __m128 Rcp0 = _mm_div_ps(_mm_set1_ps(1.0f), Det0); //__m128 Rcp0 = _mm_rcp_ps(Det0); // Inverse /= Determinant; @@ -735,7 +727,7 @@ GLM_FUNC_QUALIFIER void glm_inverse_ps(__m128 const in[4], __m128 out[4]) out[3] = _mm_mul_ps(Inv3, Rcp0); } -GLM_FUNC_QUALIFIER void inverse_fast_ps(__m128 const in[4], __m128 out[4]) +GLM_FUNC_QUALIFIER void glm_mat4_inverse_lowp(glm_vec4 const in[4], glm_vec4 out[4]) { __m128 Fac0; { @@ -945,7 +937,7 @@ GLM_FUNC_QUALIFIER void inverse_fast_ps(__m128 const in[4], __m128 out[4]) // + m[0][1] * Inverse[1][0] // + m[0][2] * Inverse[2][0] // + m[0][3] * Inverse[3][0]; - __m128 Det0 = glm_dot_ps(in[0], Row2); + __m128 Det0 = glm_vec4_dot(in[0], Row2); __m128 Rcp0 = _mm_rcp_ps(Det0); //__m128 Rcp0 = _mm_div_ps(one, Det0); // Inverse /= Determinant; @@ -955,7 +947,7 @@ GLM_FUNC_QUALIFIER void inverse_fast_ps(__m128 const in[4], __m128 out[4]) out[3] = _mm_mul_ps(Inv3, Rcp0); } /* -GLM_FUNC_QUALIFIER void glm_rotate_ps(__m128 const in[4], float Angle, float const v[3], __m128 out[4]) +GLM_FUNC_QUALIFIER void glm_mat4_rotate(__m128 const in[4], float Angle, float const v[3], __m128 out[4]) { float a = glm::radians(Angle); float c = cos(a); @@ -1025,10 +1017,12 @@ GLM_FUNC_QUALIFIER void glm_rotate_ps(__m128 const in[4], float Angle, float con sse_mul_ps(in, Result, out); } */ -GLM_FUNC_QUALIFIER void glm_outer_ps(__m128 const & c, __m128 const & r, __m128 out[4]) +GLM_FUNC_QUALIFIER void glm_mat4_outerProduct(__m128 const & c, __m128 const & r, __m128 out[4]) { out[0] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(0, 0, 0, 0))); out[1] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(1, 1, 1, 1))); out[2] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(2, 2, 2, 2))); out[3] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(3, 3, 3, 3))); } + +#endif//GLM_ARCH & GLM_ARCH_SSE2_BIT diff --git a/3rdparty/glm/glm/simd/packing.h b/3rdparty/glm/glm/simd/packing.h index e69de29bb2d..609163eb0d7 100644 --- a/3rdparty/glm/glm/simd/packing.h +++ b/3rdparty/glm/glm/simd/packing.h @@ -0,0 +1,8 @@ +/// @ref simd +/// @file glm/simd/packing.h + +#pragma once + +#if GLM_ARCH & GLM_ARCH_SSE2_BIT + +#endif//GLM_ARCH & GLM_ARCH_SSE2_BIT diff --git a/3rdparty/glm/glm/simd/platform.h b/3rdparty/glm/glm/simd/platform.h index 14636a155bb..85eb4b5af5d 100644 --- a/3rdparty/glm/glm/simd/platform.h +++ b/3rdparty/glm/glm/simd/platform.h @@ -43,7 +43,7 @@ #endif// // Report platform detection -#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_PLATFORM_DISPLAYED)) +#if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_MESSAGE_PLATFORM_DISPLAYED) # define GLM_MESSAGE_PLATFORM_DISPLAYED # if(GLM_PLATFORM & GLM_PLATFORM_QNXNTO) # pragma message("GLM: QNX platform detected") @@ -68,7 +68,7 @@ # else # pragma message("GLM: platform not detected") # endif -#endif//GLM_MESSAGE +#endif//GLM_MESSAGES /////////////////////////////////////////////////////////////////////////////////// // Compiler @@ -103,7 +103,14 @@ #define GLM_COMPILER_GCC51 0x02000300 #define GLM_COMPILER_GCC52 0x02000400 #define GLM_COMPILER_GCC53 0x02000500 -#define GLM_COMPILER_GCC60 0x02000600 +#define GLM_COMPILER_GCC54 0x02000600 +#define GLM_COMPILER_GCC60 0x02000700 +#define GLM_COMPILER_GCC61 0x02000800 +#define GLM_COMPILER_GCC62 0x02000900 +#define GLM_COMPILER_GCC70 0x02000A00 +#define GLM_COMPILER_GCC71 0x02000B00 +#define GLM_COMPILER_GCC72 0x02000C00 +#define GLM_COMPILER_GCC80 0x02000D00 // CUDA #define GLM_COMPILER_CUDA 0x10000000 @@ -115,17 +122,18 @@ #define GLM_COMPILER_CUDA65 0x10000090 #define GLM_COMPILER_CUDA70 0x100000A0 #define GLM_COMPILER_CUDA75 0x100000B0 +#define GLM_COMPILER_CUDA80 0x100000C0 -// LLVM -#define GLM_COMPILER_LLVM 0x20000000 -#define GLM_COMPILER_LLVM32 0x20000030 -#define GLM_COMPILER_LLVM33 0x20000040 -#define GLM_COMPILER_LLVM34 0x20000050 -#define GLM_COMPILER_LLVM35 0x20000060 -#define GLM_COMPILER_LLVM36 0x20000070 -#define GLM_COMPILER_LLVM37 0x20000080 -#define GLM_COMPILER_LLVM38 0x20000090 -#define GLM_COMPILER_LLVM39 0x200000A0 +// Clang +#define GLM_COMPILER_CLANG 0x20000000 +#define GLM_COMPILER_CLANG32 0x20000030 +#define GLM_COMPILER_CLANG33 0x20000040 +#define GLM_COMPILER_CLANG34 0x20000050 +#define GLM_COMPILER_CLANG35 0x20000060 +#define GLM_COMPILER_CLANG36 0x20000070 +#define GLM_COMPILER_CLANG37 0x20000080 +#define GLM_COMPILER_CLANG38 0x20000090 +#define GLM_COMPILER_CLANG39 0x200000A0 // Build model #define GLM_MODEL_32 0x00000010 @@ -163,66 +171,66 @@ # define GLM_COMPILER GLM_COMPILER_CUDA # endif -// Visual C++ -#elif defined(_MSC_VER) -# if _MSC_VER < 1600 -# error "GLM requires Visual C++ 2010 or higher" -# elif _MSC_VER == 1600 -# define GLM_COMPILER GLM_COMPILER_VC2010 -# elif _MSC_VER == 1700 -# define GLM_COMPILER GLM_COMPILER_VC2012 -# elif _MSC_VER == 1800 -# define GLM_COMPILER GLM_COMPILER_VC2013 -# elif _MSC_VER >= 1900 -# define GLM_COMPILER GLM_COMPILER_VC2015 -# else//_MSC_VER -# define GLM_COMPILER GLM_COMPILER_VC -# endif//_MSC_VER - // Clang #elif defined(__clang__) # if GLM_PLATFORM & GLM_PLATFORM_APPLE # if __clang_major__ == 5 && __clang_minor__ == 0 -# define GLM_COMPILER GLM_COMPILER_LLVM33 +# define GLM_COMPILER GLM_COMPILER_CLANG33 # elif __clang_major__ == 5 && __clang_minor__ == 1 -# define GLM_COMPILER GLM_COMPILER_LLVM34 +# define GLM_COMPILER GLM_COMPILER_CLANG34 # elif __clang_major__ == 6 && __clang_minor__ == 0 -# define GLM_COMPILER GLM_COMPILER_LLVM35 +# define GLM_COMPILER GLM_COMPILER_CLANG35 # elif __clang_major__ == 6 && __clang_minor__ >= 1 -# define GLM_COMPILER GLM_COMPILER_LLVM36 +# define GLM_COMPILER GLM_COMPILER_CLANG36 # elif __clang_major__ >= 7 -# define GLM_COMPILER GLM_COMPILER_LLVM37 +# define GLM_COMPILER GLM_COMPILER_CLANG37 # else -# define GLM_COMPILER GLM_COMPILER_LLVM +# define GLM_COMPILER GLM_COMPILER_CLANG # endif # else # if __clang_major__ == 3 && __clang_minor__ == 0 -# define GLM_COMPILER GLM_COMPILER_LLVM30 +# define GLM_COMPILER GLM_COMPILER_CLANG30 # elif __clang_major__ == 3 && __clang_minor__ == 1 -# define GLM_COMPILER GLM_COMPILER_LLVM31 +# define GLM_COMPILER GLM_COMPILER_CLANG31 # elif __clang_major__ == 3 && __clang_minor__ == 2 -# define GLM_COMPILER GLM_COMPILER_LLVM32 +# define GLM_COMPILER GLM_COMPILER_CLANG32 # elif __clang_major__ == 3 && __clang_minor__ == 3 -# define GLM_COMPILER GLM_COMPILER_LLVM33 +# define GLM_COMPILER GLM_COMPILER_CLANG33 # elif __clang_major__ == 3 && __clang_minor__ == 4 -# define GLM_COMPILER GLM_COMPILER_LLVM34 +# define GLM_COMPILER GLM_COMPILER_CLANG34 # elif __clang_major__ == 3 && __clang_minor__ == 5 -# define GLM_COMPILER GLM_COMPILER_LLVM35 +# define GLM_COMPILER GLM_COMPILER_CLANG35 # elif __clang_major__ == 3 && __clang_minor__ == 6 -# define GLM_COMPILER GLM_COMPILER_LLVM36 +# define GLM_COMPILER GLM_COMPILER_CLANG36 # elif __clang_major__ == 3 && __clang_minor__ == 7 -# define GLM_COMPILER GLM_COMPILER_LLVM37 +# define GLM_COMPILER GLM_COMPILER_CLANG37 # elif __clang_major__ == 3 && __clang_minor__ == 8 -# define GLM_COMPILER GLM_COMPILER_LLVM38 +# define GLM_COMPILER GLM_COMPILER_CLANG38 # elif __clang_major__ == 3 && __clang_minor__ >= 9 -# define GLM_COMPILER GLM_COMPILER_LLVM39 +# define GLM_COMPILER GLM_COMPILER_CLANG39 # elif __clang_major__ >= 4 -# define GLM_COMPILER GLM_COMPILER_LLVM39 +# define GLM_COMPILER GLM_COMPILER_CLANG39 # else -# define GLM_COMPILER GLM_COMPILER_LLVM +# define GLM_COMPILER GLM_COMPILER_CLANG # endif # endif +// Visual C++ +#elif defined(_MSC_VER) +# if _MSC_VER < 1600 +# error "GLM requires Visual C++ 2010 or higher" +# elif _MSC_VER == 1600 +# define GLM_COMPILER GLM_COMPILER_VC2010 +# elif _MSC_VER == 1700 +# define GLM_COMPILER GLM_COMPILER_VC2012 +# elif _MSC_VER == 1800 +# define GLM_COMPILER GLM_COMPILER_VC2013 +# elif _MSC_VER >= 1900 +# define GLM_COMPILER GLM_COMPILER_VC2015 +# else//_MSC_VER +# define GLM_COMPILER GLM_COMPILER_VC +# endif//_MSC_VER + // G++ #elif defined(__GNUC__) || defined(__MINGW32__) # if (__GNUC__ == 4) && (__GNUC_MINOR__ == 2) @@ -247,10 +255,24 @@ # define GLM_COMPILER (GLM_COMPILER_GCC51) # elif (__GNUC__ == 5) && (__GNUC_MINOR__ == 2) # define GLM_COMPILER (GLM_COMPILER_GCC52) -# elif (__GNUC__ == 5) && (__GNUC_MINOR__ >= 3) +# elif (__GNUC__ == 5) && (__GNUC_MINOR__ == 3) # define GLM_COMPILER (GLM_COMPILER_GCC53) -# elif (__GNUC__ >= 6) +# elif (__GNUC__ == 5) && (__GNUC_MINOR__ >= 4) +# define GLM_COMPILER (GLM_COMPILER_GCC54) +# elif (__GNUC__ == 6) && (__GNUC_MINOR__ == 0) # define GLM_COMPILER (GLM_COMPILER_GCC60) +# elif (__GNUC__ == 6) && (__GNUC_MINOR__ == 1) +# define GLM_COMPILER (GLM_COMPILER_GCC61) +# elif (__GNUC__ == 6) && (__GNUC_MINOR__ >= 2) +# define GLM_COMPILER (GLM_COMPILER_GCC62) +# elif (__GNUC__ == 7) && (__GNUC_MINOR__ == 0) +# define GLM_COMPILER (GLM_COMPILER_GCC70) +# elif (__GNUC__ == 7) && (__GNUC_MINOR__ == 1) +# define GLM_COMPILER (GLM_COMPILER_GCC71) +# elif (__GNUC__ == 7) && (__GNUC_MINOR__ == 2) +# define GLM_COMPILER (GLM_COMPILER_GCC72) +# elif (__GNUC__ >= 8) +# define GLM_COMPILER (GLM_COMPILER_GCC80) # else # define GLM_COMPILER (GLM_COMPILER_GCC) # endif @@ -262,3 +284,154 @@ #ifndef GLM_COMPILER # error "GLM_COMPILER undefined, your compiler may not be supported by GLM. Add #define GLM_COMPILER 0 to ignore this message." #endif//GLM_COMPILER + +/////////////////////////////////////////////////////////////////////////////////// +// Instruction sets + +// User defines: GLM_FORCE_PURE GLM_FORCE_SSE2 GLM_FORCE_SSE3 GLM_FORCE_AVX GLM_FORCE_AVX2 GLM_FORCE_AVX2 + +#define GLM_ARCH_X86_BIT 0x00000001 +#define GLM_ARCH_SSE2_BIT 0x00000002 +#define GLM_ARCH_SSE3_BIT 0x00000004 +#define GLM_ARCH_SSSE3_BIT 0x00000008 +#define GLM_ARCH_SSE41_BIT 0x00000010 +#define GLM_ARCH_SSE42_BIT 0x00000020 +#define GLM_ARCH_AVX_BIT 0x00000040 +#define GLM_ARCH_AVX2_BIT 0x00000080 +#define GLM_ARCH_AVX512_BIT 0x00000100 // Skylake subset +#define GLM_ARCH_ARM_BIT 0x00000100 +#define GLM_ARCH_NEON_BIT 0x00000200 +#define GLM_ARCH_MIPS_BIT 0x00010000 +#define GLM_ARCH_PPC_BIT 0x01000000 + +#define GLM_ARCH_PURE (0x00000000) +#define GLM_ARCH_X86 (GLM_ARCH_X86_BIT) +#define GLM_ARCH_SSE2 (GLM_ARCH_SSE2_BIT | GLM_ARCH_X86) +#define GLM_ARCH_SSE3 (GLM_ARCH_SSE3_BIT | GLM_ARCH_SSE2) +#define GLM_ARCH_SSSE3 (GLM_ARCH_SSSE3_BIT | GLM_ARCH_SSE3) +#define GLM_ARCH_SSE41 (GLM_ARCH_SSE41_BIT | GLM_ARCH_SSSE3) +#define GLM_ARCH_SSE42 (GLM_ARCH_SSE42_BIT | GLM_ARCH_SSE41) +#define GLM_ARCH_AVX (GLM_ARCH_AVX_BIT | GLM_ARCH_SSE42) +#define GLM_ARCH_AVX2 (GLM_ARCH_AVX2_BIT | GLM_ARCH_AVX) +#define GLM_ARCH_AVX512 (GLM_ARCH_AVX512_BIT | GLM_ARCH_AVX2) // Skylake subset +#define GLM_ARCH_ARM (GLM_ARCH_ARM_BIT) +#define GLM_ARCH_NEON (GLM_ARCH_NEON_BIT | GLM_ARCH_ARM) +#define GLM_ARCH_MIPS (GLM_ARCH_MIPS_BIT) +#define GLM_ARCH_PPC (GLM_ARCH_PPC_BIT) + +#if defined(GLM_FORCE_PURE) +# define GLM_ARCH GLM_ARCH_PURE +#elif defined(GLM_FORCE_MIPS) +# define GLM_ARCH (GLM_ARCH_MIPS) +#elif defined(GLM_FORCE_PPC) +# define GLM_ARCH (GLM_ARCH_PPC) +#elif defined(GLM_FORCE_NEON) +# define GLM_ARCH (GLM_ARCH_NEON) +#elif defined(GLM_FORCE_AVX512) +# define GLM_ARCH (GLM_ARCH_AVX512) +#elif defined(GLM_FORCE_AVX2) +# define GLM_ARCH (GLM_ARCH_AVX2) +#elif defined(GLM_FORCE_AVX) +# define GLM_ARCH (GLM_ARCH_AVX) +#elif defined(GLM_FORCE_SSE42) +# define GLM_ARCH (GLM_ARCH_SSE42) +#elif defined(GLM_FORCE_SSE41) +# define GLM_ARCH (GLM_ARCH_SSE41) +#elif defined(GLM_FORCE_SSSE3) +# define GLM_ARCH (GLM_ARCH_SSSE3) +#elif defined(GLM_FORCE_SSE3) +# define GLM_ARCH (GLM_ARCH_SSE3) +#elif defined(GLM_FORCE_SSE2) +# define GLM_ARCH (GLM_ARCH_SSE2) +#elif (GLM_COMPILER & (GLM_COMPILER_CLANG | GLM_COMPILER_GCC)) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_LINUX)) +// This is Skylake set of instruction set +# if defined(__AVX512BW__) && defined(__AVX512F__) && defined(__AVX512CD__) && defined(__AVX512VL__) && defined(__AVX512DQ__) +# define GLM_ARCH (GLM_ARCH_AVX512) +# elif defined(__AVX2__) +# define GLM_ARCH (GLM_ARCH_AVX2) +# elif defined(__AVX__) +# define GLM_ARCH (GLM_ARCH_AVX) +# elif defined(__SSE4_2__) +# define GLM_ARCH (GLM_ARCH_SSE42) +# elif defined(__SSE4_1__) +# define GLM_ARCH (GLM_ARCH_SSE41) +# elif defined(__SSSE3__) +# define GLM_ARCH (GLM_ARCH_SSSE3) +# elif defined(__SSE3__) +# define GLM_ARCH (GLM_ARCH_SSE3) +# elif defined(__SSE2__) +# define GLM_ARCH (GLM_ARCH_SSE2) +# elif defined(__i386__) || defined(__x86_64__) +# define GLM_ARCH (GLM_ARCH_X86) +# elif defined(__ARM_NEON) +# define GLM_ARCH (GLM_ARCH_ARM | GLM_ARCH_NEON) +# elif defined(__arm__ ) +# define GLM_ARCH (GLM_ARCH_ARM) +# elif defined(__mips__ ) +# define GLM_ARCH (GLM_ARCH_MIPS) +# elif defined(__powerpc__ ) +# define GLM_ARCH (GLM_ARCH_PPC) +# else +# define GLM_ARCH (GLM_ARCH_PURE) +# endif +#elif (GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS)) +# if defined(_M_ARM) +# define GLM_ARCH (GLM_ARCH_ARM) +# elif defined(__AVX2__) +# define GLM_ARCH (GLM_ARCH_AVX2) +# elif defined(__AVX__) +# define GLM_ARCH (GLM_ARCH_AVX) +# elif defined(_M_X64) +# define GLM_ARCH (GLM_ARCH_SSE2) +# elif defined(_M_IX86_FP) +# if _M_IX86_FP >= 2 +# define GLM_ARCH (GLM_ARCH_SSE2) +# else +# define GLM_ARCH (GLM_ARCH_PURE) +# endif +# elif defined(_M_PPC) +# define GLM_ARCH (GLM_ARCH_PPC) +# else +# define GLM_ARCH (GLM_ARCH_PURE) +# endif +#else +# define GLM_ARCH GLM_ARCH_PURE +#endif + +// With MinGW-W64, including intrinsic headers before intrin.h will produce some errors. The problem is +// that windows.h (and maybe other headers) will silently include intrin.h, which of course causes problems. +// To fix, we just explicitly include intrin.h here. +#if defined(__MINGW64__) && (GLM_ARCH != GLM_ARCH_PURE) +# include <intrin.h> +#endif + +#if GLM_ARCH & GLM_ARCH_AVX2_BIT +# include <immintrin.h> +#elif GLM_ARCH & GLM_ARCH_AVX_BIT +# include <immintrin.h> +#elif GLM_ARCH & GLM_ARCH_SSE42_BIT +# include <nmmintrin.h> +#elif GLM_ARCH & GLM_ARCH_SSE41_BIT +# include <smmintrin.h> +#elif GLM_ARCH & GLM_ARCH_SSSE3_BIT +# include <tmmintrin.h> +#elif GLM_ARCH & GLM_ARCH_SSE3_BIT +# include <pmmintrin.h> +#elif GLM_ARCH & GLM_ARCH_SSE2_BIT +# include <emmintrin.h> +#endif//GLM_ARCH + +#if GLM_ARCH & GLM_ARCH_SSE2_BIT + typedef __m128 glm_vec4; + typedef __m128i glm_ivec4; + typedef __m128i glm_uvec4; +#endif + +#if GLM_ARCH & GLM_ARCH_AVX_BIT + typedef __m256d glm_dvec4; +#endif + +#if GLM_ARCH & GLM_ARCH_AVX2_BIT + typedef __m256i glm_i64vec4; + typedef __m256i glm_u64vec4; +#endif diff --git a/3rdparty/glm/glm/simd/trigonometric.h b/3rdparty/glm/glm/simd/trigonometric.h index e69de29bb2d..739b796e7e4 100644 --- a/3rdparty/glm/glm/simd/trigonometric.h +++ b/3rdparty/glm/glm/simd/trigonometric.h @@ -0,0 +1,9 @@ +/// @ref simd +/// @file glm/simd/trigonometric.h + +#pragma once + +#if GLM_ARCH & GLM_ARCH_SSE2_BIT + +#endif//GLM_ARCH & GLM_ARCH_SSE2_BIT + diff --git a/3rdparty/glm/glm/simd/vector_relational.h b/3rdparty/glm/glm/simd/vector_relational.h index e69de29bb2d..f7385e97473 100644 --- a/3rdparty/glm/glm/simd/vector_relational.h +++ b/3rdparty/glm/glm/simd/vector_relational.h @@ -0,0 +1,8 @@ +/// @ref simd +/// @file glm/simd/vector_relational.h + +#pragma once + +#if GLM_ARCH & GLM_ARCH_SSE2_BIT + +#endif//GLM_ARCH & GLM_ARCH_SSE2_BIT diff --git a/3rdparty/glm/glm/trigonometric.hpp b/3rdparty/glm/glm/trigonometric.hpp index 21ba20a194a..a9ce87cba6a 100644 --- a/3rdparty/glm/glm/trigonometric.hpp +++ b/3rdparty/glm/glm/trigonometric.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/trigonometric.hpp -/// @date 2013-12-24 / 2013-12-24 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/vec2.hpp b/3rdparty/glm/glm/vec2.hpp index 42633ff5cde..764c2e0067b 100644 --- a/3rdparty/glm/glm/vec2.hpp +++ b/3rdparty/glm/glm/vec2.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/vec2.hpp -/// @date 2013-12-24 / 2013-12-24 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/vec3.hpp b/3rdparty/glm/glm/vec3.hpp index 3e2991615e7..eccda312563 100644 --- a/3rdparty/glm/glm/vec3.hpp +++ b/3rdparty/glm/glm/vec3.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/vec3.hpp -/// @date 2013-12-24 / 2013-12-24 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/glm/vector_relational.hpp b/3rdparty/glm/glm/vector_relational.hpp index aff93272f30..d23419027d7 100644 --- a/3rdparty/glm/glm/vector_relational.hpp +++ b/3rdparty/glm/glm/vector_relational.hpp @@ -1,34 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// /// @ref core /// @file glm/vector_relational.hpp -/// @date 2013-12-24 / 2013-12-24 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// #pragma once diff --git a/3rdparty/glm/readme.md b/3rdparty/glm/readme.md index 9b88ff0b2a2..cef2aae98ae 100644 --- a/3rdparty/glm/readme.md +++ b/3rdparty/glm/readme.md @@ -51,7 +51,23 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate) ## Release notes -#### [GLM 0.9.8.0](https://github.com/g-truc/glm/releases/latest) - 2016-XX-XX +#### [GLM 0.9.9.0](https://github.com/g-truc/glm/releases/latest) - 2017-XX-XX +##### Features: + +##### Improvements: + +##### Fixes: + +##### Deprecation: +- Removed GLM_GTX_simd_vec4 extension +- Removed GLM_GTX_simd_mat4 extension +- Removed GLM_GTX_simd_quat extension +- Removed GLM_SWIZZLE, use GLM_FORCE_SWIZZLE instead +- Removed GLM_MESSAGES, use GLM_FORCE_MESSAGES instead +- Removed GLM_DEPTH_ZERO_TO_ONE, use GLM_FORCE_DEPTH_ZERO_TO_ONE instead +- Removed GLM_LEFT_HANDED, use GLM_FORCE_LEFT_HANDED instead + +#### [GLM 0.9.8.0](https://github.com/g-truc/glm/tree/0.9.8) - 2016-XX-XX ##### Features: - Added right and left handed projection and clip control support #447 #415 #119 - Added compNormalize and compScale functions to GTX_component_wise @@ -63,6 +79,12 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate) - Added missing bvec* && and || operators - Added iround and uround to GTC_integer, fast round on positive values - Added raw SIMD API +- Added 'aligned' qualifiers +- Added GTC_type_aligned with aligned *vec* types +- Added GTC_functions extension +- Added quaternion version of isnan and isinf #521 +- Added lowestBitValue to GTX_bit #536 +- Added GLM_FORCE_UNRESTRICTED_GENTYPE allowing non basic genType #543 ##### Improvements: - Improved SIMD and swizzle operators interactions with GCC and Clang #474 @@ -70,22 +92,62 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate) - Improved GTC_reciprocal documentation - Improved GLM_FORCE_EXPLICIT_CTOR coverage #481 - Improved OpenMP support detection for Clang, GCC, ICC and VC +- Improved GTX_wrap for SIMD friendliness - Added constexpr for *vec*, *mat*, *quat* and *dual_quat* types #493 +- Added NEON instruction set detection +- Added MIPS CPUs detection +- Added PowerPC CPUs detection +- Use Cuda built-in function for abs function implementation with Cuda compiler +- Factorized GLM_COMPILER_LLVM and GLM_COMPILER_APPLE_CLANG into GLM_COMPILER_CLANG +- No more warnings for use of long long +- Added more information to build messages ##### Fixes: - Fixed GTX_extended_min_max filename typo #386 - Fixed intersectRayTriangle to not do any unintentional backface culling - Fixed long long warnings when using C++98 on GCC and Clang #482 +- Fixed sign with signed integer function on non-x86 architecture +- Fixed strict aliasing warnings #473 +- Fixed missing vec1 overload to length2 and distance2 functions #431 +- Fixed GLM test '/fp:fast' and '/Za' command-line options are incompatible +- Fixed quaterion to mat3 cast function mat3_cast from GTC_quaternion #542 ##### Deprecation: - Removed GLM_FORCE_SIZE_FUNC define +- Deprecated GLM_GTX_simd_vec4 extension +- Deprecated GLM_GTX_simd_mat4 extension +- Deprecated GLM_GTX_simd_quat extension +- Deprecated GLM_SWIZZLE, use GLM_FORCE_SWIZZLE instead +- Deprecated GLM_MESSAGES, use GLM_FORCE_MESSAGES instead + +-------------------------------------------------------------------------------- +#### [GLM 0.9.7.6](https://github.com/g-truc/glm/releases/tag/0.9.7.6) - 2016-07-16 +##### Improvements: +- Added pkg-config file #509 +- Updated list of compiler versions detected +- Improved C++ 11 STL detection #523 + +##### Fixes: +- Fixed STL for C++11 detection on ICC #510 +- Fixed missing vec1 overload to length2 and distance2 functions #431 +- Fixed long long warnings when using C++98 on GCC and Clang #482 +- Fixed scalar reciprocal functions (GTC_reciprocal) #520 + +-------------------------------------------------------------------------------- +#### [GLM 0.9.7.5](https://github.com/g-truc/glm/releases/tag/0.9.7.5) - 2016-05-24 +##### Improvements: +- Added Visual C++ Clang toolset detection -#### [GLM 0.9.7.5](https://github.com/g-truc/glm/tree/0.9.7) - 2016-0X-XX ##### Fixes: - Fixed uaddCarry warning #497 - Fixed roundPowerOfTwo and floorPowerOfTwo #503 - Fixed Visual C++ SIMD instruction set automatic detection in 64 bits +- Fixed to_string when used with GLM_FORCE_INLINE #506 +- Fixed GLM_FORCE_INLINE with binary vec4 operators +- Fixed GTX_extended_min_max filename typo #386 +- Fixed intersectRayTriangle to not do any unintentional backface culling +-------------------------------------------------------------------------------- #### [GLM 0.9.7.4](https://github.com/g-truc/glm/releases/tag/0.9.7.4) - 2016-03-19 ##### Fixes: - Fixed asinh and atanh warning with C++98 STL #484 @@ -96,6 +158,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate) - Fixed missing GLM_PLATFORM_CYGWIN declaration #495 - Fixed various undefined reference errors #490 +-------------------------------------------------------------------------------- #### [GLM 0.9.7.3](https://github.com/g-truc/glm/releases/tag/0.9.7.3) - 2016-02-21 ##### Improvements: - Added AVX512 detection @@ -106,6 +169,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate) - Fixed Clang build on Windows #479 - Fixed 64 bits constants warnings on GCC #463 +-------------------------------------------------------------------------------- #### [GLM 0.9.7.2](https://github.com/g-truc/glm/releases/tag/0.9.7.2) - 2016-01-03 ##### Fixes: - Fixed GTC_round floorMultiple/ceilMultiple #412 @@ -119,6 +183,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate) - Fixed missing unary + operator #435 - Fixed Cygwin build errors when using C++11 #405 +-------------------------------------------------------------------------------- #### [GLM 0.9.7.1](https://github.com/g-truc/glm/releases/tag/0.9.7.1) - 2015-09-07 ##### Improvements: - Improved constexpr for constant functions coverage #198 @@ -135,6 +200,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate) - Fixed builtin bitscan never being used #392 - Removed unused func_noise.* files #398 +-------------------------------------------------------------------------------- #### [GLM 0.9.7.0](https://github.com/g-truc/glm/releases/tag/0.9.7.0) - 2015-08-02 ##### Features: - Added GTC_color_space: convertLinearToSRGB and convertSRGBToLinear functions diff --git a/3rdparty/glm/test/.DS_Store b/3rdparty/glm/test/.DS_Store Binary files differdeleted file mode 100644 index 8ade767ef29..00000000000 --- a/3rdparty/glm/test/.DS_Store +++ /dev/null diff --git a/3rdparty/glm/test/CMakeLists.txt b/3rdparty/glm/test/CMakeLists.txt index ef6c2877ef7..2d216c8968f 100644 --- a/3rdparty/glm/test/CMakeLists.txt +++ b/3rdparty/glm/test/CMakeLists.txt @@ -4,8 +4,8 @@ function(glmCreateTestGTC NAME) add_executable(${SAMPLE_NAME} ${NAME}.cpp) add_test( - NAME ${SAMPLE_NAME} - COMMAND $<TARGET_FILE:${SAMPLE_NAME}> ) + NAME ${SAMPLE_NAME} + COMMAND $<TARGET_FILE:${SAMPLE_NAME}> ) endif(GLM_TEST_ENABLE) endfunction() diff --git a/3rdparty/glm/test/core/core_func_common.cpp b/3rdparty/glm/test/core/core_func_common.cpp index ed6cb2df119..6ff3c3937c8 100644 --- a/3rdparty/glm/test/core/core_func_common.cpp +++ b/3rdparty/glm/test/core/core_func_common.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/func_common.cpp -/// @date 2011-01-15 / 2011-09-13 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #define GLM_FORCE_EXPLICIT_CTOR #include <glm/common.hpp> #include <glm/gtc/constants.hpp> @@ -444,7 +413,7 @@ namespace mix_ entry<glm::vec4, glm::bvec4> TestBVec4[] = { - {glm::vec4(0.0f), glm::vec4(1.0f), glm::bvec4(false), glm::vec4(0.0f)}, + {glm::vec4(0.0f, 0.0f, 1.0f, 1.0f), glm::vec4(2.0f, 2.0f, 3.0f, 3.0f), glm::bvec4(false, true, false, true), glm::vec4(0.0f, 2.0f, 1.0f, 3.0f)}, {glm::vec4(0.0f), glm::vec4(1.0f), glm::bvec4(true), glm::vec4(1.0f)}, {glm::vec4(-1.0f), glm::vec4(1.0f), glm::bvec4(false), glm::vec4(-1.0f)}, {glm::vec4(-1.0f), glm::vec4(1.0f), glm::bvec4(true), glm::vec4(1.0f)}, @@ -555,8 +524,8 @@ namespace step_ entry<float, glm::vec4> TestVec4Scalar [] = { - { 0.0f, glm::vec4(1.0f, 2.0f, 3.0f, 4.0f), glm::vec4(1.0f) }, { 1.0f, glm::vec4(1.0f, 2.0f, 3.0f, 4.0f), glm::vec4(1.0f) }, + { 0.0f, glm::vec4(1.0f, 2.0f, 3.0f, 4.0f), glm::vec4(1.0f) }, { 0.0f, glm::vec4(-1.0f, -2.0f, -3.0f, -4.0f), glm::vec4(0.0f) } }; @@ -986,12 +955,37 @@ namespace sign return Error; } + int test_f32vec4() + { + type<glm::vec4> const Data[] = + { + {glm::vec4( 1), glm::vec4( 1)}, + {glm::vec4( 0), glm::vec4( 0)}, + {glm::vec4( 2), glm::vec4( 1)}, + {glm::vec4( 3), glm::vec4( 1)}, + {glm::vec4(-1), glm::vec4(-1)}, + {glm::vec4(-2), glm::vec4(-1)}, + {glm::vec4(-3), glm::vec4(-1)} + }; + + int Error = 0; + + for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<glm::vec4>); ++i) + { + glm::vec4 Result = glm::sign(Data[i].Value); + Error += glm::all(glm::equal(Data[i].Return, Result)) ? 0 : 1; + } + + return Error; + } + int test() { int Error = 0; Error += test_int32(); Error += test_i32vec4(); + Error += test_f32vec4(); return Error; } @@ -1235,7 +1229,21 @@ namespace ldexp_ int main() { - int Error(0); + int Error = 0; + + glm::ivec4 const a(1); + glm::ivec4 const b = ~a; + + glm::int32 const c(1); + glm::int32 const d = ~c; + +# if GLM_ARCH & GLM_ARCH_AVX_BIT && GLM_HAS_UNRESTRICTED_UNIONS + glm_vec4 const A = _mm_set_ps(4, 3, 2, 1); + glm_vec4 const B = glm_vec4_swizzle_xyzw(A); + glm_vec4 const C = _mm_permute_ps(A, _MM_SHUFFLE(3, 2, 1, 0)); + glm_vec4 const D = _mm_permute_ps(A, _MM_SHUFFLE(0, 1, 2, 3)); + glm_vec4 const E = _mm_shuffle_ps(A, A, _MM_SHUFFLE(0, 1, 2, 3)); +# endif Error += sign::test(); Error += floor_::test(); @@ -1243,10 +1251,10 @@ int main() Error += modf_::test(); Error += floatBitsToInt::test(); Error += floatBitsToUint::test(); + Error += mix_::test(); Error += step_::test(); Error += max_::test(); Error += min_::test(); - Error += mix_::test(); Error += round_::test(); Error += roundEven::test(); Error += isnan_::test(); diff --git a/3rdparty/glm/test/core/core_func_exponential.cpp b/3rdparty/glm/test/core/core_func_exponential.cpp index b06090f0333..665d8df6f57 100644 --- a/3rdparty/glm/test/core/core_func_exponential.cpp +++ b/3rdparty/glm/test/core/core_func_exponential.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/func_exponential.cpp -/// @date 2011-01-15 / 2011-09-13 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/common.hpp> #include <glm/exponential.hpp> #include <glm/gtc/ulp.hpp> @@ -103,6 +72,16 @@ int test_sqrt() { int Error(0); +# if GLM_ARCH & GLM_ARCH_SSE2_BIT + for(float f = 0.1f; f < 30.0f; f += 0.1f) + { + float r = _mm_cvtss_f32(_mm_sqrt_ps(_mm_set1_ps(f))); + float s = std::sqrt(f); + Error += glm::abs(r - s) < 0.01f ? 0 : 1; + assert(!Error); + } +# endif//GLM_ARCH & GLM_ARCH_SSE2_BIT + float A = glm::sqrt(10.f); glm::vec1 B = glm::sqrt(glm::vec1(10.f)); glm::vec2 C = glm::sqrt(glm::vec2(10.f)); diff --git a/3rdparty/glm/test/core/core_func_geometric.cpp b/3rdparty/glm/test/core/core_func_geometric.cpp index 04d3f42d507..5c3379c436a 100644 --- a/3rdparty/glm/test/core/core_func_geometric.cpp +++ b/3rdparty/glm/test/core/core_func_geometric.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/func_geometric.cpp -/// @date 2011-01-15 / 2011-09-13 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/geometric.hpp> #include <glm/vector_relational.hpp> #include <glm/gtc/epsilon.hpp> @@ -118,6 +87,13 @@ namespace normalize glm::vec3 Normalize1 = glm::normalize(glm::vec3(1, 0, 0)); glm::vec3 Normalize2 = glm::normalize(glm::vec3(2, 0, 0)); + glm::vec3 Normalize3 = glm::normalize(glm::vec3(-0.6, 0.7, -0.5)); + + glm::vec3 ro = glm::vec3(glm::cos(5.f) * 3.f, 2.f, glm::sin(5.f) * 3.f); + glm::vec3 w = glm::normalize(glm::vec3(0, -0.2f, 0) - ro); + glm::vec3 u = glm::normalize(glm::cross(w, glm::vec3(0, 1, 0))); + glm::vec3 v = glm::cross(u, w); + int Error = 0; Error += glm::all(glm::lessThan(glm::abs(Normalize1 - glm::vec3(1, 0, 0)), glm::vec3(std::numeric_limits<float>::epsilon()))) ? 0 : 1; diff --git a/3rdparty/glm/test/core/core_func_integer.cpp b/3rdparty/glm/test/core/core_func_integer.cpp index 5558c24b120..c44153d8159 100644 --- a/3rdparty/glm/test/core/core_func_integer.cpp +++ b/3rdparty/glm/test/core/core_func_integer.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/func_integer.cpp -/// @date 2011-01-15 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/integer.hpp> #include <glm/vector_relational.hpp> #include <glm/gtc/vec1.hpp> @@ -560,8 +529,8 @@ namespace bitfieldReverse { int Error = 0; - Error += perf32(Samples); - Error += perf64(Samples); + Error += perf32(static_cast<glm::uint32>(Samples)); + Error += perf64(static_cast<glm::uint64>(Samples)); return Error; } @@ -1490,7 +1459,7 @@ namespace bitCount // bitCount - TimeIf { for(std::size_t i = 0, n = v.size(); i < n; ++i) - v[i] = bitCount_if(i); + v[i] = bitCount_if(static_cast<int>(i)); } std::clock_t TimestampsB = std::clock(); diff --git a/3rdparty/glm/test/core/core_func_integer_bit_count.cpp b/3rdparty/glm/test/core/core_func_integer_bit_count.cpp index c72d63e6179..f8cba2c0709 100644 --- a/3rdparty/glm/test/core/core_func_integer_bit_count.cpp +++ b/3rdparty/glm/test/core/core_func_integer_bit_count.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/func_integer_bit_count.cpp -/// @date 2011-01-15 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - // This has the programs for computing the number of 1-bits // in a word, or byte, etc. // Max line length is 57, to fit in hacker.book. diff --git a/3rdparty/glm/test/core/core_func_integer_find_lsb.cpp b/3rdparty/glm/test/core/core_func_integer_find_lsb.cpp index d41ff586ef0..69eb27c16aa 100644 --- a/3rdparty/glm/test/core/core_func_integer_find_lsb.cpp +++ b/3rdparty/glm/test/core/core_func_integer_find_lsb.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/func_integer_find_lsb.cpp -/// @date 2014-10-27 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - // This has the programs for computing the number of trailing zeros // in a word. // Max line length is 57, to fit in hacker.book. diff --git a/3rdparty/glm/test/core/core_func_integer_find_msb.cpp b/3rdparty/glm/test/core/core_func_integer_find_msb.cpp index cd3f6de7bf9..00268c868ea 100644 --- a/3rdparty/glm/test/core/core_func_integer_find_msb.cpp +++ b/3rdparty/glm/test/core/core_func_integer_find_msb.cpp @@ -1,33 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/func_integer_find_msb.cpp -/// @date 2014-10-27 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// // This has the programs for computing the number of leading zeros // in a word. // Max line length is 57, to fit in hacker.book. diff --git a/3rdparty/glm/test/core/core_func_matrix.cpp b/3rdparty/glm/test/core/core_func_matrix.cpp index db09e72d520..8037deb6bef 100644 --- a/3rdparty/glm/test/core/core_func_matrix.cpp +++ b/3rdparty/glm/test/core/core_func_matrix.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/func_matrix.cpp -/// @date 2007-01-25 / 2011-06-07 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/matrix.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/ulp.hpp> @@ -219,24 +188,24 @@ int test_inverse() int test_inverse_simd() { - int Failed(0); + int Error = 0; - glm::tmat4x4<float, glm::simd> const Identity(1); + glm::mat4x4 const Identity(1); - glm::tmat4x4<float, glm::simd> const A4x4( - glm::tvec4<float, glm::simd>(1, 0, 1, 0), - glm::tvec4<float, glm::simd>(0, 1, 0, 0), - glm::tvec4<float, glm::simd>(0, 0, 1, 0), - glm::tvec4<float, glm::simd>(0, 0, 0, 1)); - glm::tmat4x4<float, glm::simd> const B4x4 = glm::inverse(A4x4); - glm::tmat4x4<float, glm::simd> const I4x4 = A4x4 * B4x4; + glm::mat4x4 const A4x4( + glm::vec4(1, 0, 1, 0), + glm::vec4(0, 1, 0, 0), + glm::vec4(0, 0, 1, 0), + glm::vec4(0, 0, 0, 1)); + glm::mat4x4 const B4x4 = glm::inverse(A4x4); + glm::mat4x4 const I4x4 = A4x4 * B4x4; - Failed += glm::all(glm::epsilonEqual(I4x4[0], Identity[0], 0.001f)) ? 0 : 1; - Failed += glm::all(glm::epsilonEqual(I4x4[1], Identity[1], 0.001f)) ? 0 : 1; - Failed += glm::all(glm::epsilonEqual(I4x4[2], Identity[2], 0.001f)) ? 0 : 1; - Failed += glm::all(glm::epsilonEqual(I4x4[3], Identity[3], 0.001f)) ? 0 : 1; + Error += glm::all(glm::epsilonEqual(I4x4[0], Identity[0], 0.001f)) ? 0 : 1; + Error += glm::all(glm::epsilonEqual(I4x4[1], Identity[1], 0.001f)) ? 0 : 1; + Error += glm::all(glm::epsilonEqual(I4x4[2], Identity[2], 0.001f)) ? 0 : 1; + Error += glm::all(glm::epsilonEqual(I4x4[3], Identity[3], 0.001f)) ? 0 : 1; - return Failed; + return Error; } template <typename VEC3, typename MAT4> diff --git a/3rdparty/glm/test/core/core_func_noise.cpp b/3rdparty/glm/test/core/core_func_noise.cpp index 959f74a50e0..41db681f052 100644 --- a/3rdparty/glm/test/core/core_func_noise.cpp +++ b/3rdparty/glm/test/core/core_func_noise.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/func_noise.cpp -/// @date 2011-01-15 / 2011-09-13 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - int main() { int Failed = 0; diff --git a/3rdparty/glm/test/core/core_func_packing.cpp b/3rdparty/glm/test/core/core_func_packing.cpp index 52f606ebcb5..c3cd14a205a 100644 --- a/3rdparty/glm/test/core/core_func_packing.cpp +++ b/3rdparty/glm/test/core/core_func_packing.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/func_packing.cpp -/// @date 2011-01-15 / 2011-09-13 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/type_precision.hpp> #include <glm/gtc/epsilon.hpp> #include <glm/vector_relational.hpp> diff --git a/3rdparty/glm/test/core/core_func_swizzle.cpp b/3rdparty/glm/test/core/core_func_swizzle.cpp index f6710fc33ee..dfd6c8afe8e 100644 --- a/3rdparty/glm/test/core/core_func_swizzle.cpp +++ b/3rdparty/glm/test/core/core_func_swizzle.cpp @@ -1,36 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/core_func_swizzle.cpp -/// @date 2011-10-16 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#define GLM_MESSAGES -#define GLM_SWIZZLE +#define GLM_FORCE_MESSAGES +#define GLM_FORCE_SWIZZLE #include <glm/glm.hpp> int test_ivec2_swizzle() @@ -83,11 +52,12 @@ int test_vec4_swizzle() glm::vec4 B = A.wzyx(); glm::vec4 C = B.wzyx(); - float f = glm::dot(C.wzyx(), C.xyzw()); - Error += A != B ? 0 : 1; Error += A == C ? 0 : 1; + float f = glm::dot(C.wzyx(), C.xyzw()); + Error += glm::abs(f - 20.f) < 0.01f ? 0 : 1; + return Error; } diff --git a/3rdparty/glm/test/core/core_func_trigonometric.cpp b/3rdparty/glm/test/core/core_func_trigonometric.cpp index abadc6f5587..31723400a86 100644 --- a/3rdparty/glm/test/core/core_func_trigonometric.cpp +++ b/3rdparty/glm/test/core/core_func_trigonometric.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/core_func_trigonometric.cpp -/// @date 2011-01-15 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/trigonometric.hpp> int main() diff --git a/3rdparty/glm/test/core/core_func_vector_relational.cpp b/3rdparty/glm/test/core/core_func_vector_relational.cpp index 9c6b29f74ab..c98f789b49c 100644 --- a/3rdparty/glm/test/core/core_func_vector_relational.cpp +++ b/3rdparty/glm/test/core/core_func_vector_relational.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/core_vector_relational.cpp -/// @date 2011-01-15 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/vec2.hpp> #include <glm/vec3.hpp> #include <glm/vec4.hpp> diff --git a/3rdparty/glm/test/core/core_setup_force_cxx98.cpp b/3rdparty/glm/test/core/core_setup_force_cxx98.cpp index 42278a325f7..4b59501ab40 100644 --- a/3rdparty/glm/test/core/core_setup_force_cxx98.cpp +++ b/3rdparty/glm/test/core/core_setup_force_cxx98.cpp @@ -1,35 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @ref test -/// @file test/core/core_setup_force_cxx98.cpp -/// @date 2014-11-15 / 2014-11-15 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #define GLM_FORCE_CXX98 #include <glm/glm.hpp> #include <glm/ext.hpp> diff --git a/3rdparty/glm/test/core/core_setup_message.cpp b/3rdparty/glm/test/core/core_setup_message.cpp index ebdd61ddc00..7eaf7028732 100644 --- a/3rdparty/glm/test/core/core_setup_message.cpp +++ b/3rdparty/glm/test/core/core_setup_message.cpp @@ -1,13 +1,4 @@ -/////////////////////////////////////////////////////////////////////////////////////////////////// -// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) -/////////////////////////////////////////////////////////////////////////////////////////////////// -// Created : 2011-05-31 -// Updated : 2013-08-27 -// Licence : This source is under MIT License -// File : test/core/setup_message.cpp -/////////////////////////////////////////////////////////////////////////////////////////////////// - -#define GLM_MESSAGES +#define GLM_FORCE_MESSAGES #include <glm/vec3.hpp> #include <cstdio> @@ -71,9 +62,30 @@ int test_compiler() case GLM_COMPILER_GCC53: std::printf("GLM_COMPILER_GCC53\n"); break; + case GLM_COMPILER_GCC54: + std::printf("GLM_COMPILER_GCC54\n"); + break; case GLM_COMPILER_GCC60: std::printf("GLM_COMPILER_GCC60\n"); break; + case GLM_COMPILER_GCC61: + std::printf("GLM_COMPILER_GCC61\n"); + break; + case GLM_COMPILER_GCC62: + std::printf("GLM_COMPILER_GCC62\n"); + break; + case GLM_COMPILER_GCC70: + std::printf("GLM_COMPILER_GCC70\n"); + break; + case GLM_COMPILER_GCC71: + std::printf("GLM_COMPILER_GCC71\n"); + break; + case GLM_COMPILER_GCC72: + std::printf("GLM_COMPILER_GCC72\n"); + break; + case GLM_COMPILER_GCC80: + std::printf("GLM_COMPILER_GCC80\n"); + break; default: std::printf("GCC version not detected\n"); Error += 1; @@ -84,33 +96,33 @@ int test_compiler() { std::printf("GLM_COMPILER_CUDA\n"); } - else if(GLM_COMPILER & GLM_COMPILER_LLVM) + else if(GLM_COMPILER & GLM_COMPILER_CLANG) { switch(GLM_COMPILER) { - case GLM_COMPILER_LLVM32: - std::printf("GLM_COMPILER_LLVM32\n"); + case GLM_COMPILER_CLANG32: + std::printf("GLM_COMPILER_CLANG32\n"); break; - case GLM_COMPILER_LLVM33: - std::printf("GLM_COMPILER_LLVM33\n"); + case GLM_COMPILER_CLANG33: + std::printf("GLM_COMPILER_CLANG33\n"); break; - case GLM_COMPILER_LLVM34: - std::printf("GLM_COMPILER_LLVM34\n"); + case GLM_COMPILER_CLANG34: + std::printf("GLM_COMPILER_CLANG34\n"); break; - case GLM_COMPILER_LLVM35: - std::printf("GLM_COMPILER_LLVM35\n"); + case GLM_COMPILER_CLANG35: + std::printf("GLM_COMPILER_CLANG35\n"); break; - case GLM_COMPILER_LLVM36: - std::printf("GLM_COMPILER_LLVM36\n"); + case GLM_COMPILER_CLANG36: + std::printf("GLM_COMPILER_CLANG36\n"); break; - case GLM_COMPILER_LLVM37: - std::printf("GLM_COMPILER_LLVM37\n"); + case GLM_COMPILER_CLANG37: + std::printf("GLM_COMPILER_CLANG37\n"); break; - case GLM_COMPILER_LLVM38: - std::printf("GLM_COMPILER_LLVM38\n"); + case GLM_COMPILER_CLANG38: + std::printf("GLM_COMPILER_CLANG38\n"); break; - case GLM_COMPILER_LLVM39: - std::printf("GLM_COMPILER_LLVM39\n"); + case GLM_COMPILER_CLANG39: + std::printf("GLM_COMPILER_CLANG39\n"); break; default: std::printf("LLVM version not detected\n"); @@ -176,18 +188,24 @@ int test_instruction_set() if(GLM_ARCH == GLM_ARCH_PURE) std::printf("GLM_ARCH_PURE "); - if(GLM_ARCH & GLM_ARCH_ARM) - std::printf("GLM_ARCH_ARM "); + if(GLM_ARCH & GLM_ARCH_ARM_BIT) + std::printf("ARM "); + if(GLM_ARCH & GLM_ARCH_NEON_BIT) + std::printf("NEON "); if(GLM_ARCH & GLM_ARCH_AVX2) - std::printf("GLM_ARCH_AVX2 "); - if(GLM_ARCH & GLM_ARCH_AVX) - std::printf("GLM_ARCH_AVX "); + std::printf("AVX2 "); if(GLM_ARCH & GLM_ARCH_AVX) - std::printf("GLM_ARCH_SSE4 "); - if(GLM_ARCH & GLM_ARCH_SSE3) - std::printf("GLM_ARCH_SSE3 "); - if(GLM_ARCH & GLM_ARCH_SSE2) - std::printf("GLM_ARCH_SSE2 "); + std::printf("AVX "); + if(GLM_ARCH & GLM_ARCH_SSE42_BIT) + std::printf("SSE4.2 "); + if(GLM_ARCH & GLM_ARCH_SSE41_BIT) + std::printf("SSE4.1 "); + if(GLM_ARCH & GLM_ARCH_SSSE3_BIT) + std::printf("SSSE3 "); + if(GLM_ARCH & GLM_ARCH_SSE3_BIT) + std::printf("SSE3 "); + if(GLM_ARCH & GLM_ARCH_SSE2_BIT) + std::printf("SSE2 "); std::printf("\n"); diff --git a/3rdparty/glm/test/core/core_setup_precision.cpp b/3rdparty/glm/test/core/core_setup_precision.cpp index 5eca9846344..b44bc50e421 100644 --- a/3rdparty/glm/test/core/core_setup_precision.cpp +++ b/3rdparty/glm/test/core/core_setup_precision.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/core_setup_precision.cpp -/// @date 2011-05-31 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #define GLM_FORCE_INLINE #define GLM_PRECISION_HIGHP_FLOAT #include <glm/glm.hpp> diff --git a/3rdparty/glm/test/core/core_type_cast.cpp b/3rdparty/glm/test/core/core_type_cast.cpp index ff40ec8b961..b1c02910f70 100644 --- a/3rdparty/glm/test/core/core_type_cast.cpp +++ b/3rdparty/glm/test/core/core_type_cast.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/core_type_cast.cpp -/// @date 2013-05-06 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/glm.hpp> #include <algorithm> #include <vector> diff --git a/3rdparty/glm/test/core/core_type_ctor.cpp b/3rdparty/glm/test/core/core_type_ctor.cpp index f9f43e6e4b6..e9e73e4c7c5 100644 --- a/3rdparty/glm/test/core/core_type_ctor.cpp +++ b/3rdparty/glm/test/core/core_type_ctor.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/core_type_ctor.cpp -/// @date 2015-07-25 / 2015-07-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #define GLM_FORCE_NO_CTOR_INIT #include <glm/glm.hpp> #include <glm/gtc/vec1.hpp> @@ -193,10 +162,12 @@ int test_mat2x4_ctor() } A, B; A.f = glm::mat2x4(0); - Error += glm::all(glm::equal(A.i[0], glm::vec4(0))) ? 0 : 1; + glm::vec4 const C(0, 0, 0, 0); + Error += glm::all(glm::equal(A.i[0], C)) ? 0 : 1; B.f = glm::mat2x4(1); - Error += glm::all(glm::equal(B.i[0], glm::vec4(1, 0, 0, 0))) ? 0 : 1; + glm::vec4 const D(1, 0, 0, 0); + Error += glm::all(glm::equal(B.i[0], D)) ? 0 : 1; } # endif//GLM_HAS_DEFAULTED_FUNCTIONS diff --git a/3rdparty/glm/test/core/core_type_float.cpp b/3rdparty/glm/test/core/core_type_float.cpp index 921e1713245..11d475cc997 100644 --- a/3rdparty/glm/test/core/core_type_float.cpp +++ b/3rdparty/glm/test/core/core_type_float.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/core_type_float.cpp -/// @date 2008-08-31 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/glm.hpp> int test_float_size() diff --git a/3rdparty/glm/test/core/core_type_int.cpp b/3rdparty/glm/test/core/core_type_int.cpp index 9b305caa798..d60d5687cf7 100644 --- a/3rdparty/glm/test/core/core_type_int.cpp +++ b/3rdparty/glm/test/core/core_type_int.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/core_type_int.cpp -/// @date 2008-08-31 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/glm.hpp> int test_int_size() diff --git a/3rdparty/glm/test/core/core_type_length.cpp b/3rdparty/glm/test/core/core_type_length.cpp index 5c907d50a9a..17c2fa92650 100644 --- a/3rdparty/glm/test/core/core_type_length.cpp +++ b/3rdparty/glm/test/core/core_type_length.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/core_type_length.cpp -/// @date 2011-05-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/glm.hpp> int test_length_mat_non_squared() diff --git a/3rdparty/glm/test/core/core_type_mat2x2.cpp b/3rdparty/glm/test/core/core_type_mat2x2.cpp index 9e07f215952..78c0e8d20ad 100644 --- a/3rdparty/glm/test/core/core_type_mat2x2.cpp +++ b/3rdparty/glm/test/core/core_type_mat2x2.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/core_type_mat2x2.cpp -/// @date 2008-08-31 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/epsilon.hpp> #include <glm/matrix.hpp> #include <glm/vector_relational.hpp> diff --git a/3rdparty/glm/test/core/core_type_mat2x3.cpp b/3rdparty/glm/test/core/core_type_mat2x3.cpp index a8f99b290e0..36e4a59458b 100644 --- a/3rdparty/glm/test/core/core_type_mat2x3.cpp +++ b/3rdparty/glm/test/core/core_type_mat2x3.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/core_type_mat2x3.cpp -/// @date 2008-08-31 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/vector_relational.hpp> #include <glm/mat2x2.hpp> #include <glm/mat2x3.hpp> diff --git a/3rdparty/glm/test/core/core_type_mat2x4.cpp b/3rdparty/glm/test/core/core_type_mat2x4.cpp index 3704f284e0d..d2435f8d732 100644 --- a/3rdparty/glm/test/core/core_type_mat2x4.cpp +++ b/3rdparty/glm/test/core/core_type_mat2x4.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/core_type_mat2x4.cpp -/// @date 2008-08-31 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/vector_relational.hpp> #include <glm/mat2x2.hpp> #include <glm/mat2x3.hpp> diff --git a/3rdparty/glm/test/core/core_type_mat3x2.cpp b/3rdparty/glm/test/core/core_type_mat3x2.cpp index 989f9724a80..fdfa2083b79 100644 --- a/3rdparty/glm/test/core/core_type_mat3x2.cpp +++ b/3rdparty/glm/test/core/core_type_mat3x2.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/core_type_mat3x2.cpp -/// @date 2008-08-31 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/vector_relational.hpp> #include <glm/mat2x2.hpp> #include <glm/mat2x3.hpp> diff --git a/3rdparty/glm/test/core/core_type_mat3x3.cpp b/3rdparty/glm/test/core/core_type_mat3x3.cpp index 6b556de03dd..c8886a559ba 100644 --- a/3rdparty/glm/test/core/core_type_mat3x3.cpp +++ b/3rdparty/glm/test/core/core_type_mat3x3.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/core_type_mat3x3.cpp -/// @date 2008-08-31 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/epsilon.hpp> #include <glm/matrix.hpp> #include <glm/vector_relational.hpp> diff --git a/3rdparty/glm/test/core/core_type_mat3x4.cpp b/3rdparty/glm/test/core/core_type_mat3x4.cpp index c793d82ef87..131f6862ca5 100644 --- a/3rdparty/glm/test/core/core_type_mat3x4.cpp +++ b/3rdparty/glm/test/core/core_type_mat3x4.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/core_type_mat3x4.cpp -/// @date 2008-08-31 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/vector_relational.hpp> #include <glm/mat2x2.hpp> #include <glm/mat2x3.hpp> diff --git a/3rdparty/glm/test/core/core_type_mat4x2.cpp b/3rdparty/glm/test/core/core_type_mat4x2.cpp index 730c56e4b7d..eecdf1c71c2 100644 --- a/3rdparty/glm/test/core/core_type_mat4x2.cpp +++ b/3rdparty/glm/test/core/core_type_mat4x2.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/core_type_mat4x2.cpp -/// @date 2008-08-31 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/vector_relational.hpp> #include <glm/mat2x2.hpp> #include <glm/mat2x3.hpp> diff --git a/3rdparty/glm/test/core/core_type_mat4x3.cpp b/3rdparty/glm/test/core/core_type_mat4x3.cpp index dc678f94b1f..309a86b42ab 100644 --- a/3rdparty/glm/test/core/core_type_mat4x3.cpp +++ b/3rdparty/glm/test/core/core_type_mat4x3.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/core_type_mat4x3.cpp -/// @date 2008-08-31 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/vector_relational.hpp> #include <glm/mat2x2.hpp> #include <glm/mat2x3.hpp> diff --git a/3rdparty/glm/test/core/core_type_mat4x4.cpp b/3rdparty/glm/test/core/core_type_mat4x4.cpp index 578f270ecdd..94cc3ace00d 100644 --- a/3rdparty/glm/test/core/core_type_mat4x4.cpp +++ b/3rdparty/glm/test/core/core_type_mat4x4.cpp @@ -1,35 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/core_type_mat4x4.cpp -/// @date 2008-08-31 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#define GLM_SIMD #include <glm/gtc/epsilon.hpp> #include <glm/matrix.hpp> #include <glm/mat2x2.hpp> diff --git a/3rdparty/glm/test/core/core_type_vec1.cpp b/3rdparty/glm/test/core/core_type_vec1.cpp index 79baeba0a43..9177e38029d 100644 --- a/3rdparty/glm/test/core/core_type_vec1.cpp +++ b/3rdparty/glm/test/core/core_type_vec1.cpp @@ -1,35 +1,4 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/core_type_vec1.cpp -/// @date 2014-10-11 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#define GLM_SWIZZLE +#define GLM_FORCE_SWIZZLE #include <glm/vector_relational.hpp> #include <glm/gtc/vec1.hpp> #include <vector> @@ -96,7 +65,7 @@ int test_vec1_ctor() } #endif */ -#if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +#if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE) { glm::vec2 A = glm::vec2(1.0f, 2.0f); glm::vec2 B = A.xy; @@ -107,7 +76,7 @@ int test_vec1_ctor() Error += glm::all(glm::equal(A, C)) ? 0 : 1; Error += glm::all(glm::equal(A, D)) ? 0 : 1; } -#endif//GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +#endif//GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE) { glm::vec2 A = glm::vec2(2.0f); diff --git a/3rdparty/glm/test/core/core_type_vec2.cpp b/3rdparty/glm/test/core/core_type_vec2.cpp index b8ad7c13a2e..af7997af709 100644 --- a/3rdparty/glm/test/core/core_type_vec2.cpp +++ b/3rdparty/glm/test/core/core_type_vec2.cpp @@ -1,35 +1,4 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/core_type_vec2.cpp -/// @date 2008-08-31 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#define GLM_SWIZZLE +#define GLM_FORCE_SWIZZLE #include <glm/vector_relational.hpp> #include <glm/vec2.hpp> #include <vector> @@ -37,7 +6,6 @@ # include <type_traits> #endif - int test_vec2_operators() { int Error = 0; @@ -262,7 +230,7 @@ int test_vec2_ctor() } #endif -#if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +#if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE) { glm::vec2 A = glm::vec2(1.0f, 2.0f); glm::vec2 B = A.xy; @@ -273,7 +241,7 @@ int test_vec2_ctor() Error += glm::all(glm::equal(A, C)) ? 0 : 1; Error += glm::all(glm::equal(A, D)) ? 0 : 1; } -#endif//GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +#endif//GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE) { glm::vec2 A = glm::vec2(2.0f); diff --git a/3rdparty/glm/test/core/core_type_vec3.cpp b/3rdparty/glm/test/core/core_type_vec3.cpp index e27b78aee14..e6b894c7abc 100644 --- a/3rdparty/glm/test/core/core_type_vec3.cpp +++ b/3rdparty/glm/test/core/core_type_vec3.cpp @@ -1,35 +1,4 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/core_type_vec3.cpp -/// @date 2008-08-31 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#define GLM_SWIZZLE +#define GLM_FORCE_SWIZZLE #include <glm/vector_relational.hpp> #include <glm/geometric.hpp> #include <glm/vec2.hpp> @@ -71,7 +40,7 @@ int test_vec3_ctor() } #endif -#if(GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)) +#if(GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE)) { glm::vec3 A = glm::vec3(1.0f, 2.0f, 3.0f); glm::vec3 B = A.xyz; @@ -90,7 +59,7 @@ int test_vec3_ctor() Error += glm::all(glm::equal(A, G)) ? 0 : 1; Error += glm::all(glm::equal(A, H)) ? 0 : 1; } -#endif//(GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)) +#endif//(GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE)) { glm::vec3 A(1); diff --git a/3rdparty/glm/test/core/core_type_vec4.cpp b/3rdparty/glm/test/core/core_type_vec4.cpp index 090fd61aa38..86e302c7e34 100644 --- a/3rdparty/glm/test/core/core_type_vec4.cpp +++ b/3rdparty/glm/test/core/core_type_vec4.cpp @@ -1,35 +1,5 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/core/core_type_vec4.cpp -/// @date 2008-08-31 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - -#define GLM_SWIZZLE +#define GLM_FORCE_ALIGNED +#define GLM_FORCE_SWIZZLE #include <glm/vector_relational.hpp> #include <glm/vec2.hpp> #include <glm/vec3.hpp> @@ -98,7 +68,7 @@ int test_vec4_ctor() } #endif -#if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +#if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE) { glm::vec4 A = glm::vec4(1.0f, 2.0f, 3.0f, 4.0f); glm::vec4 B = A.xyzw; @@ -127,7 +97,7 @@ int test_vec4_ctor() Error += glm::all(glm::equal(A, L)) ? 0 : 1; Error += glm::all(glm::equal(A, M)) ? 0 : 1; } -#endif// GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE) +#endif// GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_FORCE_SWIZZLE) { glm::vec4 A(1); @@ -310,10 +280,31 @@ int test_vec4_operators() return Error; } +int test_vec4_equal() +{ + int Error = 0; + + { + glm::vec4 const A(1, 2, 3, 4); + glm::vec4 const B(1, 2, 3, 4); + Error += A == B ? 0 : 1; + Error += A != B ? 1 : 0; + } + + { + glm::ivec4 const A(1, 2, 3, 4); + glm::ivec4 const B(1, 2, 3, 4); + Error += A == B ? 0 : 1; + Error += A != B ? 1 : 0; + } + + return Error; +} + int test_vec4_size() { int Error = 0; - + Error += sizeof(glm::vec4) == sizeof(glm::lowp_vec4) ? 0 : 1; Error += sizeof(glm::vec4) == sizeof(glm::mediump_vec4) ? 0 : 1; Error += sizeof(glm::vec4) == sizeof(glm::highp_vec4) ? 0 : 1; @@ -324,7 +315,7 @@ int test_vec4_size() Error += 32 == sizeof(glm::highp_dvec4) ? 0 : 1; Error += glm::vec4().length() == 4 ? 0 : 1; Error += glm::dvec4().length() == 4 ? 0 : 1; - + return Error; } @@ -488,13 +479,13 @@ int test_vec4_simd() { int Error = 0; - glm::tvec4<float, glm::simd> a(std::clock(), std::clock(), std::clock(), std::clock()); - glm::tvec4<float, glm::simd> b(std::clock(), std::clock(), std::clock(), std::clock()); + glm::vec4 const a(std::clock(), std::clock(), std::clock(), std::clock()); + glm::vec4 const b(std::clock(), std::clock(), std::clock(), std::clock()); - glm::tvec4<float, glm::simd> c(b * a); - glm::tvec4<float, glm::simd> d(a + c); + glm::vec4 const c(b * a); + glm::vec4 const d(a + c); - Error += glm::all(glm::greaterThanEqual(d, glm::tvec4<float, glm::simd>(0))) ? 0 : 1; + Error += glm::all(glm::greaterThanEqual(d, glm::vec4(0))) ? 0 : 1; return Error; } @@ -503,6 +494,47 @@ int main() { int Error(0); +/* + { + glm::ivec4 const a1(2); + glm::ivec4 const b1 = a1 >> 1; + + __m128i const e1 = _mm_set1_epi32(2); + __m128i const f1 = _mm_srli_epi32(e1, 1); + + glm::ivec4 const g1 = *reinterpret_cast<glm::ivec4 const* const>(&f1); + + glm::ivec4 const a2(-2); + glm::ivec4 const b2 = a2 >> 1; + + __m128i const e2 = _mm_set1_epi32(-1); + __m128i const f2 = _mm_srli_epi32(e2, 1); + + glm::ivec4 const g2 = *reinterpret_cast<glm::ivec4 const* const>(&f2); + + printf("GNI\n"); + } + + { + glm::uvec4 const a1(2); + glm::uvec4 const b1 = a1 >> 1u; + + __m128i const e1 = _mm_set1_epi32(2); + __m128i const f1 = _mm_srli_epi32(e1, 1); + + glm::uvec4 const g1 = *reinterpret_cast<glm::uvec4 const* const>(&f1); + + glm::uvec4 const a2(-1); + glm::uvec4 const b2 = a2 >> 1u; + + __m128i const e2 = _mm_set1_epi32(-1); + __m128i const f2 = _mm_srli_epi32(e2, 1); + + glm::uvec4 const g2 = *reinterpret_cast<glm::uvec4 const* const>(&f2); + + printf("GNI\n"); + } +*/ glm::vec4 v; assert(v.length() == 4); @@ -516,6 +548,7 @@ int main() Error += test_bvec4_ctor(); Error += test_vec4_size(); Error += test_vec4_operators(); + Error += test_vec4_equal(); Error += test_vec4_swizzle_partial(); Error += test_vec4_simd(); Error += test_operator_increment(); diff --git a/3rdparty/glm/test/gtc/CMakeLists.txt b/3rdparty/glm/test/gtc/CMakeLists.txt index 18bc2494a7f..ab26247a8af 100644 --- a/3rdparty/glm/test/gtc/CMakeLists.txt +++ b/3rdparty/glm/test/gtc/CMakeLists.txt @@ -2,6 +2,7 @@ glmCreateTestGTC(gtc_bitfield) glmCreateTestGTC(gtc_color_space) glmCreateTestGTC(gtc_constants) glmCreateTestGTC(gtc_epsilon) +glmCreateTestGTC(gtc_functions) glmCreateTestGTC(gtc_integer) glmCreateTestGTC(gtc_matrix_access) glmCreateTestGTC(gtc_matrix_integer) @@ -13,6 +14,7 @@ glmCreateTestGTC(gtc_quaternion) glmCreateTestGTC(gtc_random) glmCreateTestGTC(gtc_round) glmCreateTestGTC(gtc_reciprocal) +glmCreateTestGTC(gtc_type_aligned) glmCreateTestGTC(gtc_type_precision) glmCreateTestGTC(gtc_type_ptr) glmCreateTestGTC(gtc_ulp) diff --git a/3rdparty/glm/test/gtc/gtc_bitfield.cpp b/3rdparty/glm/test/gtc/gtc_bitfield.cpp index 32f276f3b59..bf43ca9d030 100644 --- a/3rdparty/glm/test/gtc/gtc_bitfield.cpp +++ b/3rdparty/glm/test/gtc/gtc_bitfield.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtc/gtc_bitfield.cpp -/// @date 2014-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/bitfield.hpp> #include <glm/gtc/type_precision.hpp> #include <glm/vector_relational.hpp> @@ -349,7 +318,7 @@ namespace bitfieldInterleave return REG1 | (REG2 << 1); } - +/* inline glm::uint64 loopBitfieldInterleave(glm::uint32 x, glm::uint32 y) { static glm::uint64 const Mask[5] = @@ -371,7 +340,7 @@ namespace bitfieldInterleave return REG1 | (REG2 << 1); } - +*/ #if(GLM_ARCH != GLM_ARCH_PURE) inline glm::uint64 sseBitfieldInterleave(glm::uint32 x, glm::uint32 y) { @@ -498,24 +467,24 @@ namespace bitfieldInterleave { glm::uint64 A = glm::bitfieldInterleave(x, y); glm::uint64 B = fastBitfieldInterleave(x, y); - glm::uint64 C = loopBitfieldInterleave(x, y); + //glm::uint64 C = loopBitfieldInterleave(x, y); glm::uint64 D = interleaveBitfieldInterleave(x, y); assert(A == B); - assert(A == C); + //assert(A == C); assert(A == D); -# if(GLM_ARCH != GLM_ARCH_PURE) +# if GLM_ARCH & GLM_ARCH_SSE2_BIT glm::uint64 E = sseBitfieldInterleave(x, y); glm::uint64 F = sseUnalignedBitfieldInterleave(x, y); assert(A == E); assert(A == F); - __m128i G = glm::detail::_mm_bit_interleave_si128(_mm_set_epi32(0, y, 0, x)); + __m128i G = glm_i128_interleave(_mm_set_epi32(0, y, 0, x)); glm::uint64 Result[2]; _mm_storeu_si128((__m128i*)Result, G); assert(A == Result[0]); -# endif//(GLM_ARCH != GLM_ARCH_PURE) +# endif//GLM_ARCH & GLM_ARCH_SSE2_BIT } } @@ -571,7 +540,7 @@ namespace bitfieldInterleave std::printf("fastBitfieldInterleave Time %d clocks\n", static_cast<unsigned int>(Time)); } - +/* { std::clock_t LastTime = std::clock(); @@ -582,7 +551,7 @@ namespace bitfieldInterleave std::printf("loopBitfieldInterleave Time %d clocks\n", static_cast<unsigned int>(Time)); } - +*/ { std::clock_t LastTime = std::clock(); @@ -629,7 +598,7 @@ namespace bitfieldInterleave std::printf("glm::detail::bitfieldInterleave Time %d clocks\n", static_cast<unsigned int>(Time)); } -# if(GLM_ARCH != GLM_ARCH_PURE && !(GLM_COMPILER & GLM_COMPILER_GCC)) +# if(GLM_ARCH & GLM_ARCH_SSE2_BIT && !(GLM_COMPILER & GLM_COMPILER_GCC)) { // SIMD std::vector<__m128i> SimdData; @@ -642,13 +611,13 @@ namespace bitfieldInterleave std::clock_t LastTime = std::clock(); for(std::size_t i = 0; i < SimdData.size(); ++i) - SimdData[i] = glm::detail::_mm_bit_interleave_si128(SimdParam[i]); + SimdData[i] = glm_i128_interleave(SimdParam[i]); std::clock_t Time = std::clock() - LastTime; std::printf("_mm_bit_interleave_si128 Time %d clocks\n", static_cast<unsigned int>(Time)); } -# endif//(GLM_ARCH != GLM_ARCH_PURE) +# endif//GLM_ARCH & GLM_ARCH_SSE2_BIT return 0; } diff --git a/3rdparty/glm/test/gtc/gtc_color_space.cpp b/3rdparty/glm/test/gtc/gtc_color_space.cpp index fb585cc60fd..a834f39c8e3 100644 --- a/3rdparty/glm/test/gtc/gtc_color_space.cpp +++ b/3rdparty/glm/test/gtc/gtc_color_space.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtc/gtc_color.cpp -/// @date 2015-02-10 / 2015-02-10 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/color_space.hpp> #include <glm/gtc/epsilon.hpp> #include <glm/gtc/constants.hpp> diff --git a/3rdparty/glm/test/gtc/gtc_constants.cpp b/3rdparty/glm/test/gtc/gtc_constants.cpp index eab21f3a948..65903e9ead3 100644 --- a/3rdparty/glm/test/gtc/gtc_constants.cpp +++ b/3rdparty/glm/test/gtc/gtc_constants.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtc/gtc_constants.cpp -/// @date 2012-09-19 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/constants.hpp> int test_epsilon() diff --git a/3rdparty/glm/test/gtc/gtc_epsilon.cpp b/3rdparty/glm/test/gtc/gtc_epsilon.cpp index 783a4cd0472..20c59a1ae22 100644 --- a/3rdparty/glm/test/gtc/gtc_epsilon.cpp +++ b/3rdparty/glm/test/gtc/gtc_epsilon.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtc/gtc_epsilon.cpp -/// @date 2012-09-19 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/epsilon.hpp> #include <glm/gtc/constants.hpp> #include <glm/vector_relational.hpp> diff --git a/3rdparty/glm/test/gtc/gtc_functions.cpp b/3rdparty/glm/test/gtc/gtc_functions.cpp new file mode 100644 index 00000000000..0bdf8ab5871 --- /dev/null +++ b/3rdparty/glm/test/gtc/gtc_functions.cpp @@ -0,0 +1,35 @@ +#include <glm/gtc/functions.hpp> +#include <vector> + +int test_gauss_1d() +{ + int Error = 0; + + std::vector<float> Result(20); + for(std::size_t i = 0, n = Result.size(); i < n; ++i) + Result[i] = glm::gauss(static_cast<float>(i) * 0.1f, 0.0f, 1.0f); + + return Error; +} + +int test_gauss_2d() +{ + int Error = 0; + + std::vector<float> Result(20); + for(std::size_t i = 0, n = Result.size(); i < n; ++i) + Result[i] = glm::gauss(glm::vec2(i) * 0.1f, glm::vec2(0.0f), glm::vec2(1.0f)); + + return Error; +} + +int main() +{ + int Error = 0; + + Error += test_gauss_1d(); + Error += test_gauss_2d(); + + return Error; +} + diff --git a/3rdparty/glm/test/gtc/gtc_integer.cpp b/3rdparty/glm/test/gtc/gtc_integer.cpp index 4c320b0d948..f3d056e2400 100644 --- a/3rdparty/glm/test/gtc/gtc_integer.cpp +++ b/3rdparty/glm/test/gtc/gtc_integer.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtc/gtc_integer.cpp -/// @date 2014-11-17 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #define GLM_FORCE_INLINE #include <glm/gtc/epsilon.hpp> #include <glm/gtc/integer.hpp> diff --git a/3rdparty/glm/test/gtc/gtc_matrix_access.cpp b/3rdparty/glm/test/gtc/gtc_matrix_access.cpp index 3c74bc93af5..bb98199288b 100644 --- a/3rdparty/glm/test/gtc/gtc_matrix_access.cpp +++ b/3rdparty/glm/test/gtc/gtc_matrix_access.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtc/gtc_matrix_access.cpp -/// @date 2010-09-16 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/matrix_access.hpp> #include <glm/mat2x2.hpp> #include <glm/mat2x3.hpp> diff --git a/3rdparty/glm/test/gtc/gtc_matrix_integer.cpp b/3rdparty/glm/test/gtc/gtc_matrix_integer.cpp index d7572e61a9d..108016a8da8 100644 --- a/3rdparty/glm/test/gtc/gtc_matrix_integer.cpp +++ b/3rdparty/glm/test/gtc/gtc_matrix_integer.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtc/gtc_matrix_integer.cpp -/// @date 2010-09-16 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/matrix_integer.hpp> int main() diff --git a/3rdparty/glm/test/gtc/gtc_matrix_inverse.cpp b/3rdparty/glm/test/gtc/gtc_matrix_inverse.cpp index 0fe9d5c9f66..eaec6e17d13 100644 --- a/3rdparty/glm/test/gtc/gtc_matrix_inverse.cpp +++ b/3rdparty/glm/test/gtc/gtc_matrix_inverse.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtc/gtc_matrix_inverse.cpp -/// @date 2010-09-16 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/matrix_inverse.hpp> #include <glm/gtc/epsilon.hpp> diff --git a/3rdparty/glm/test/gtc/gtc_matrix_transform.cpp b/3rdparty/glm/test/gtc/gtc_matrix_transform.cpp index b4d6ca8e8ed..0fd4d2f84d7 100644 --- a/3rdparty/glm/test/gtc/gtc_matrix_transform.cpp +++ b/3rdparty/glm/test/gtc/gtc_matrix_transform.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtc/gtc_matrix_transform.cpp -/// @date 2010-09-16 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/constants.hpp> diff --git a/3rdparty/glm/test/gtc/gtc_noise.cpp b/3rdparty/glm/test/gtc/gtc_noise.cpp index fbf8006a88e..ec58693ed9c 100644 --- a/3rdparty/glm/test/gtc/gtc_noise.cpp +++ b/3rdparty/glm/test/gtc/gtc_noise.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtc/gtc_noise.cpp -/// @date 2011-04-21 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/noise.hpp> #include <gli/gli.hpp> #include <gli/gtx/loader.hpp> diff --git a/3rdparty/glm/test/gtc/gtc_packing.cpp b/3rdparty/glm/test/gtc/gtc_packing.cpp index dff652a0d9a..d1f40e5a925 100644 --- a/3rdparty/glm/test/gtc/gtc_packing.cpp +++ b/3rdparty/glm/test/gtc/gtc_packing.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtc/gtc_packing.cpp -/// @date 2013-08-09 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/packing.hpp> #include <glm/gtc/epsilon.hpp> #include <cstdio> diff --git a/3rdparty/glm/test/gtc/gtc_quaternion.cpp b/3rdparty/glm/test/gtc/gtc_quaternion.cpp index b15522c9278..49ac157b58f 100644 --- a/3rdparty/glm/test/gtc/gtc_quaternion.cpp +++ b/3rdparty/glm/test/gtc/gtc_quaternion.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtc/gtc_quaternion.cpp -/// @date 2010-09-16 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/quaternion.hpp> #include <glm/gtc/epsilon.hpp> #include <glm/vector_relational.hpp> diff --git a/3rdparty/glm/test/gtc/gtc_random.cpp b/3rdparty/glm/test/gtc/gtc_random.cpp index 61354ff1488..6c3b3d0e14e 100644 --- a/3rdparty/glm/test/gtc/gtc_random.cpp +++ b/3rdparty/glm/test/gtc/gtc_random.cpp @@ -1,37 +1,6 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtc/gtc_random.cpp -/// @date 2011-09-19 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/random.hpp> #include <glm/gtc/epsilon.hpp> -#if(GLM_LANG & GLM_LANG_CXX0X_FLAG) +#if GLM_LANG & GLM_LANG_CXX0X_FLAG # include <array> #endif diff --git a/3rdparty/glm/test/gtc/gtc_reciprocal.cpp b/3rdparty/glm/test/gtc/gtc_reciprocal.cpp index 6f453f719e1..515841325f5 100644 --- a/3rdparty/glm/test/gtc/gtc_reciprocal.cpp +++ b/3rdparty/glm/test/gtc/gtc_reciprocal.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtc/gtc_reciprocal.cpp -/// @date 2012-09-19 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/reciprocal.hpp> #include <ctime> diff --git a/3rdparty/glm/test/gtc/gtc_round.cpp b/3rdparty/glm/test/gtc/gtc_round.cpp index a0e2576d7a8..4575066c19d 100644 --- a/3rdparty/glm/test/gtc/gtc_round.cpp +++ b/3rdparty/glm/test/gtc/gtc_round.cpp @@ -1,33 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// 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. -/// -/// @file test/gtc/gtc_round.cpp -/// @date 2014-11-03 / 2014-11-03 -/// @author Christophe Riccio -/// -/// @see core (dependence) -/// @see gtc_round (dependence) -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/round.hpp> #include <glm/gtc/type_precision.hpp> #include <glm/gtc/vec1.hpp> diff --git a/3rdparty/glm/test/gtc/gtc_type_aligned.cpp b/3rdparty/glm/test/gtc/gtc_type_aligned.cpp new file mode 100644 index 00000000000..a3ba7b81486 --- /dev/null +++ b/3rdparty/glm/test/gtc/gtc_type_aligned.cpp @@ -0,0 +1,118 @@ +#define GLM_FORCE_MESSAGES +#include <glm/glm.hpp> + +#if GLM_HAS_ALIGNED_TYPE +#include <glm/gtc/type_aligned.hpp> + +GLM_STATIC_ASSERT(glm::detail::is_aligned<glm::aligned_lowp>::value, "aligned_lowp is not aligned"); +GLM_STATIC_ASSERT(glm::detail::is_aligned<glm::aligned_mediump>::value, "aligned_mediump is not aligned"); +GLM_STATIC_ASSERT(glm::detail::is_aligned<glm::aligned_highp>::value, "aligned_highp is not aligned"); +GLM_STATIC_ASSERT(!glm::detail::is_aligned<glm::packed_highp>::value, "packed_highp is aligned"); +GLM_STATIC_ASSERT(!glm::detail::is_aligned<glm::packed_mediump>::value, "packed_mediump is aligned"); +GLM_STATIC_ASSERT(!glm::detail::is_aligned<glm::packed_lowp>::value, "packed_lowp is aligned"); + +struct my_vec4_packed +{ + glm::uint32 a; + glm::vec4 b; +}; +GLM_STATIC_ASSERT(sizeof(my_vec4_packed) == sizeof(glm::uint32) + sizeof(glm::vec4), "glm::vec4 packed is not correct"); + +struct my_vec4_aligned +{ + glm::uint32 a; + glm::aligned_vec4 b; +}; +GLM_STATIC_ASSERT(sizeof(my_vec4_aligned) == sizeof(glm::aligned_vec4) * 2, "glm::vec4 aligned is not correct"); + +struct my_dvec4_packed +{ + glm::uint64 a; + glm::dvec4 b; +}; +GLM_STATIC_ASSERT(sizeof(my_dvec4_packed) == sizeof(glm::uint64) + sizeof(glm::dvec4), "glm::dvec4 packed is not correct"); + +struct my_dvec4_aligned +{ + glm::uint64 a; + glm::aligned_dvec4 b; +}; +//GLM_STATIC_ASSERT(sizeof(my_dvec4_aligned) == sizeof(glm::aligned_dvec4) * 2, "glm::dvec4 aligned is not correct"); + +struct my_ivec4_packed +{ + glm::uint32 a; + glm::ivec4 b; +}; +GLM_STATIC_ASSERT(sizeof(my_ivec4_packed) == sizeof(glm::uint32) + sizeof(glm::ivec4), "glm::ivec4 packed is not correct"); + +struct my_ivec4_aligned +{ + glm::uint32 a; + glm::aligned_ivec4 b; +}; +GLM_STATIC_ASSERT(sizeof(my_ivec4_aligned) == sizeof(glm::aligned_ivec4) * 2, "glm::ivec4 aligned is not correct"); + +struct my_u8vec4_packed +{ + glm::uint32 a; + glm::u8vec4 b; +}; +GLM_STATIC_ASSERT(sizeof(my_u8vec4_packed) == sizeof(glm::uint32) + sizeof(glm::u8vec4), "glm::u8vec4 packed is not correct"); + +int test_copy() +{ + int Error = 0; + + { + glm::aligned_ivec4 const a(1, 2, 3, 4); + glm::ivec4 const u(a); + + Error += a.x == u.x ? 0 : 1; + Error += a.y == u.y ? 0 : 1; + Error += a.z == u.z ? 0 : 1; + Error += a.w == u.w ? 0 : 1; + } + + { + my_ivec4_aligned a; + a.b = glm::ivec4(1, 2, 3, 4); + + my_ivec4_packed u; + u.b = a.b; + + Error += a.b.x == u.b.x ? 0 : 1; + Error += a.b.y == u.b.y ? 0 : 1; + Error += a.b.z == u.b.z ? 0 : 1; + Error += a.b.w == u.b.w ? 0 : 1; + } + + return Error; +} + +int main() +{ + int Error = 0; + + my_vec4_aligned GNA; + my_dvec4_aligned GNI; + + std::size_t A0 = sizeof(my_dvec4_aligned); + std::size_t B0 = sizeof(my_dvec4_packed); + std::size_t C0 = sizeof(glm::aligned_dvec4); + + std::size_t A1 = sizeof(my_vec4_aligned); + std::size_t B1 = sizeof(my_vec4_packed); + std::size_t C1 = sizeof(glm::aligned_vec4); + + return Error; +} + +#else + +int main() +{ + return 0; +} + +#endif//GLM_HAS_ALIGNED_TYPE diff --git a/3rdparty/glm/test/gtc/gtc_type_precision.cpp b/3rdparty/glm/test/gtc/gtc_type_precision.cpp index 814c49711a1..8ae430051f5 100644 --- a/3rdparty/glm/test/gtc/gtc_type_precision.cpp +++ b/3rdparty/glm/test/gtc/gtc_type_precision.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtc/gtc_type_precision.cpp -/// @date 2010-09-16 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/type_precision.hpp> #include <glm/gtc/quaternion.hpp> #include <vector> diff --git a/3rdparty/glm/test/gtc/gtc_type_ptr.cpp b/3rdparty/glm/test/gtc/gtc_type_ptr.cpp index 4bdd3cad3a0..bcdc2e20c64 100644 --- a/3rdparty/glm/test/gtc/gtc_type_ptr.cpp +++ b/3rdparty/glm/test/gtc/gtc_type_ptr.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtc/gtc_type_ptr.cpp -/// @date 2010-09-16 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/type_ptr.hpp> int test_value_ptr_vec() diff --git a/3rdparty/glm/test/gtc/gtc_ulp.cpp b/3rdparty/glm/test/gtc/gtc_ulp.cpp index 5698b219172..77d347c8479 100644 --- a/3rdparty/glm/test/gtc/gtc_ulp.cpp +++ b/3rdparty/glm/test/gtc/gtc_ulp.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtc/gtc_ulp.cpp -/// @date 2011-04-26 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/ulp.hpp> #include <limits> diff --git a/3rdparty/glm/test/gtc/gtc_vec1.cpp b/3rdparty/glm/test/gtc/gtc_vec1.cpp index b100d37c9c8..268d95e656f 100644 --- a/3rdparty/glm/test/gtc/gtc_vec1.cpp +++ b/3rdparty/glm/test/gtc/gtc_vec1.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtc/gtc_vec1.cpp -/// @date 2014-10-11 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/vec1.hpp> int main() diff --git a/3rdparty/glm/test/gtx/CMakeLists.txt b/3rdparty/glm/test/gtx/CMakeLists.txt index 7b40dce2663..5ad06cdea12 100644 --- a/3rdparty/glm/test/gtx/CMakeLists.txt +++ b/3rdparty/glm/test/gtx/CMakeLists.txt @@ -40,8 +40,6 @@ glmCreateTestGTC(gtx_rotate_normalized_axis) glmCreateTestGTC(gtx_rotate_vector) glmCreateTestGTC(gtx_scalar_multiplication) glmCreateTestGTC(gtx_scalar_relational) -#glmCreateTestGTC(gtx_simd_vec4) -#glmCreateTestGTC(gtx_simd_mat4) glmCreateTestGTC(gtx_spline) glmCreateTestGTC(gtx_string_cast) glmCreateTestGTC(gtx_type_aligned) diff --git a/3rdparty/glm/test/gtx/gtx_associated_min_max.cpp b/3rdparty/glm/test/gtx/gtx_associated_min_max.cpp index 756358e4030..b025ee2f629 100644 --- a/3rdparty/glm/test/gtx/gtx_associated_min_max.cpp +++ b/3rdparty/glm/test/gtx/gtx_associated_min_max.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_associated_min_max.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/type_precision.hpp> #include <glm/gtx/associated_min_max.hpp> diff --git a/3rdparty/glm/test/gtx/gtx_closest_point.cpp b/3rdparty/glm/test/gtx/gtx_closest_point.cpp index b77146f7491..88cf4db17de 100644 --- a/3rdparty/glm/test/gtx/gtx_closest_point.cpp +++ b/3rdparty/glm/test/gtx/gtx_closest_point.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_closest_point.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/closest_point.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_color_space.cpp b/3rdparty/glm/test/gtx/gtx_color_space.cpp index 6af7bdc992f..19ac276b631 100644 --- a/3rdparty/glm/test/gtx/gtx_color_space.cpp +++ b/3rdparty/glm/test/gtx/gtx_color_space.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_color_space.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/color_space.hpp> int test_saturation() diff --git a/3rdparty/glm/test/gtx/gtx_color_space_YCoCg.cpp b/3rdparty/glm/test/gtx/gtx_color_space_YCoCg.cpp index ee52833d15b..e42e328955a 100644 --- a/3rdparty/glm/test/gtx/gtx_color_space_YCoCg.cpp +++ b/3rdparty/glm/test/gtx/gtx_color_space_YCoCg.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_color_space_YCoCg.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/color_space_YCoCg.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_common.cpp b/3rdparty/glm/test/gtx/gtx_common.cpp index 605ea399231..2796695596b 100644 --- a/3rdparty/glm/test/gtx/gtx_common.cpp +++ b/3rdparty/glm/test/gtx/gtx_common.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_common.cpp -/// @date 2014-09-08 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/common.hpp> #include <glm/gtc/integer.hpp> #include <glm/gtc/epsilon.hpp> diff --git a/3rdparty/glm/test/gtx/gtx_compatibility.cpp b/3rdparty/glm/test/gtx/gtx_compatibility.cpp index ee577b0633b..b3ec17855ca 100644 --- a/3rdparty/glm/test/gtx/gtx_compatibility.cpp +++ b/3rdparty/glm/test/gtx/gtx_compatibility.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_compatibility.cpp -/// @date 2014-09-08 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/compatibility.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_component_wise.cpp b/3rdparty/glm/test/gtx/gtx_component_wise.cpp index 318e825d596..1ccc234696c 100644 --- a/3rdparty/glm/test/gtx/gtx_component_wise.cpp +++ b/3rdparty/glm/test/gtx/gtx_component_wise.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_component_wise.cpp -/// @date 2013-10-25 / 2015-09-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/component_wise.hpp> #include <glm/gtc/type_precision.hpp> #include <glm/gtc/epsilon.hpp> diff --git a/3rdparty/glm/test/gtx/gtx_dual_quaternion.cpp b/3rdparty/glm/test/gtx/gtx_dual_quaternion.cpp index 01a81b3da87..b06bba35935 100644 --- a/3rdparty/glm/test/gtx/gtx_dual_quaternion.cpp +++ b/3rdparty/glm/test/gtx/gtx_dual_quaternion.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_dual_quaternion.cpp -/// @date 2013-02-10 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/dual_quaternion.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/epsilon.hpp> diff --git a/3rdparty/glm/test/gtx/gtx_euler_angle.cpp b/3rdparty/glm/test/gtx/gtx_euler_angle.cpp index 6d4bca4b508..d56e419a458 100644 --- a/3rdparty/glm/test/gtx/gtx_euler_angle.cpp +++ b/3rdparty/glm/test/gtx/gtx_euler_angle.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_euler_angle.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - // Code sample from Filippo Ramaciotti #include <glm/gtc/matrix_transform.hpp> diff --git a/3rdparty/glm/test/gtx/gtx_extend.cpp b/3rdparty/glm/test/gtx/gtx_extend.cpp index db58bc9a7d2..d87830d7ec8 100644 --- a/3rdparty/glm/test/gtx/gtx_extend.cpp +++ b/3rdparty/glm/test/gtx/gtx_extend.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_extend.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/extend.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_extended_min_max.cpp b/3rdparty/glm/test/gtx/gtx_extended_min_max.cpp index c8c78479c27..96c2c0eb7c4 100644 --- a/3rdparty/glm/test/gtx/gtx_extended_min_max.cpp +++ b/3rdparty/glm/test/gtx/gtx_extended_min_max.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_extented_min_max.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/extended_min_max.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_fast_exponential.cpp b/3rdparty/glm/test/gtx/gtx_fast_exponential.cpp index 1e7272b6feb..74468ec7921 100644 --- a/3rdparty/glm/test/gtx/gtx_fast_exponential.cpp +++ b/3rdparty/glm/test/gtx/gtx_fast_exponential.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_fast_exponential.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/fast_exponential.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_fast_square_root.cpp b/3rdparty/glm/test/gtx/gtx_fast_square_root.cpp index 82328e83c29..5939d06d263 100644 --- a/3rdparty/glm/test/gtx/gtx_fast_square_root.cpp +++ b/3rdparty/glm/test/gtx/gtx_fast_square_root.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_fast_square_root.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/fast_square_root.hpp> #include <glm/gtc/type_precision.hpp> #include <glm/gtc/epsilon.hpp> diff --git a/3rdparty/glm/test/gtx/gtx_fast_trigonometry.cpp b/3rdparty/glm/test/gtx/gtx_fast_trigonometry.cpp index 7fd76b57b1d..d7652201fc5 100644 --- a/3rdparty/glm/test/gtx/gtx_fast_trigonometry.cpp +++ b/3rdparty/glm/test/gtx/gtx_fast_trigonometry.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_fast_trigonometry.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/type_precision.hpp> #include <glm/gtx/fast_trigonometry.hpp> #include <glm/gtx/integer.hpp> diff --git a/3rdparty/glm/test/gtx/gtx_gradient_paint.cpp b/3rdparty/glm/test/gtx/gtx_gradient_paint.cpp index f55095d7a72..4f167440096 100644 --- a/3rdparty/glm/test/gtx/gtx_gradient_paint.cpp +++ b/3rdparty/glm/test/gtx/gtx_gradient_paint.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_gradient_paint.cpp -/// @date 2011-10-13 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/gradient_paint.hpp> int test_radialGradient() diff --git a/3rdparty/glm/test/gtx/gtx_handed_coordinate_space.cpp b/3rdparty/glm/test/gtx/gtx_handed_coordinate_space.cpp index 01ecd09c105..baebb361756 100644 --- a/3rdparty/glm/test/gtx/gtx_handed_coordinate_space.cpp +++ b/3rdparty/glm/test/gtx/gtx_handed_coordinate_space.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_handed_coordinate_space.cpp -/// @date 2011-10-13 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/handed_coordinate_space.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_integer.cpp b/3rdparty/glm/test/gtx/gtx_integer.cpp index dcbbb692436..7fa44f49c72 100644 --- a/3rdparty/glm/test/gtx/gtx_integer.cpp +++ b/3rdparty/glm/test/gtx/gtx_integer.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_integer.cpp -/// @date 2011-10-11 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/exponential.hpp> #include <glm/gtc/epsilon.hpp> #include <glm/gtx/integer.hpp> diff --git a/3rdparty/glm/test/gtx/gtx_intersect.cpp b/3rdparty/glm/test/gtx/gtx_intersect.cpp index 292e4357270..8b4a5fbd4ba 100644 --- a/3rdparty/glm/test/gtx/gtx_intersect.cpp +++ b/3rdparty/glm/test/gtx/gtx_intersect.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_intersect.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/intersect.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_io.cpp b/3rdparty/glm/test/gtx/gtx_io.cpp index c9edf9cfe8e..a7ab7a76b62 100644 --- a/3rdparty/glm/test/gtx/gtx_io.cpp +++ b/3rdparty/glm/test/gtx/gtx_io.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2016 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_io.cpp -/// @date 2013-11-22 / 2016-03-14 -/// @author Jan P Springer (regnirpsj@gmail.com) -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/type_precision.hpp> #include <glm/gtx/io.hpp> #include <iostream> @@ -45,9 +14,14 @@ namespace if (cerberus) { switch (a) { - case glm::highp: os << "hi"; break; - case glm::mediump: os << "md"; break; - case glm::lowp: os << "lo"; break; + case glm::highp: os << "uhi"; break; + case glm::mediump: os << "umd"; break; + case glm::lowp: os << "ulo"; break; +# if GLM_HAS_ALIGNED_TYPE + case glm::aligned_highp: os << "ahi"; break; + case glm::aligned_mediump: os << "amd"; break; + case glm::aligned_lowp: os << "alo"; break; +# endif } } diff --git a/3rdparty/glm/test/gtx/gtx_log_base.cpp b/3rdparty/glm/test/gtx/gtx_log_base.cpp index 464b6eb10f7..66c6d51f945 100644 --- a/3rdparty/glm/test/gtx/gtx_log_base.cpp +++ b/3rdparty/glm/test/gtx/gtx_log_base.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_log_base.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/log_base.hpp> #include <glm/gtc/vec1.hpp> #include <glm/gtc/epsilon.hpp> diff --git a/3rdparty/glm/test/gtx/gtx_matrix_cross_product.cpp b/3rdparty/glm/test/gtx/gtx_matrix_cross_product.cpp index 14eb205b32f..325a327b6ec 100644 --- a/3rdparty/glm/test/gtx/gtx_matrix_cross_product.cpp +++ b/3rdparty/glm/test/gtx/gtx_matrix_cross_product.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_matrix_cross_product.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/matrix_cross_product.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_matrix_decompose.cpp b/3rdparty/glm/test/gtx/gtx_matrix_decompose.cpp index 8d10cf510c9..b8c3371f72a 100644 --- a/3rdparty/glm/test/gtx/gtx_matrix_decompose.cpp +++ b/3rdparty/glm/test/gtx/gtx_matrix_decompose.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_decomposition.cpp -/// @date 2014-08-31 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/matrix_decompose.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_matrix_interpolation.cpp b/3rdparty/glm/test/gtx/gtx_matrix_interpolation.cpp index 154060653b0..88724f94be3 100644 --- a/3rdparty/glm/test/gtx/gtx_matrix_interpolation.cpp +++ b/3rdparty/glm/test/gtx/gtx_matrix_interpolation.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_matrix_interpolation.cpp -/// @date 2012-09-19 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/matrix_interpolation.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_matrix_major_storage.cpp b/3rdparty/glm/test/gtx/gtx_matrix_major_storage.cpp index 870623a331d..85a9250ae46 100644 --- a/3rdparty/glm/test/gtx/gtx_matrix_major_storage.cpp +++ b/3rdparty/glm/test/gtx/gtx_matrix_major_storage.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_matrix_major_storage.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/matrix_major_storage.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_matrix_operation.cpp b/3rdparty/glm/test/gtx/gtx_matrix_operation.cpp index bf2409014f1..bfd6360813c 100644 --- a/3rdparty/glm/test/gtx/gtx_matrix_operation.cpp +++ b/3rdparty/glm/test/gtx/gtx_matrix_operation.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_matrix_operation.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/matrix_operation.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_matrix_query.cpp b/3rdparty/glm/test/gtx/gtx_matrix_query.cpp index 35189f6d273..71732a1056e 100644 --- a/3rdparty/glm/test/gtx/gtx_matrix_query.cpp +++ b/3rdparty/glm/test/gtx/gtx_matrix_query.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_matrix_query.cpp -/// @date 2011-11-22 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/matrix_query.hpp> int test_isNull() diff --git a/3rdparty/glm/test/gtx/gtx_matrix_transform_2d.cpp b/3rdparty/glm/test/gtx/gtx_matrix_transform_2d.cpp index ab714539b51..836df7c806c 100644 --- a/3rdparty/glm/test/gtx/gtx_matrix_transform_2d.cpp +++ b/3rdparty/glm/test/gtx/gtx_matrix_transform_2d.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_matrix_transform_2d.cpp -/// @date 2014-02-21 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/matrix_transform_2d.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_norm.cpp b/3rdparty/glm/test/gtx/gtx_norm.cpp index cbacbddfd1c..c088d927913 100644 --- a/3rdparty/glm/test/gtx/gtx_norm.cpp +++ b/3rdparty/glm/test/gtx/gtx_norm.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_norm.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/norm.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_normal.cpp b/3rdparty/glm/test/gtx/gtx_normal.cpp index 904db2b7dfc..7526bc0501c 100644 --- a/3rdparty/glm/test/gtx/gtx_normal.cpp +++ b/3rdparty/glm/test/gtx/gtx_normal.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_normal.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/normal.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_normalize_dot.cpp b/3rdparty/glm/test/gtx/gtx_normalize_dot.cpp index 37145787e3e..36c9728f1d2 100644 --- a/3rdparty/glm/test/gtx/gtx_normalize_dot.cpp +++ b/3rdparty/glm/test/gtx/gtx_normalize_dot.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_normalize_dot.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/normalize_dot.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_number_precision.cpp b/3rdparty/glm/test/gtx/gtx_number_precision.cpp index ad896ea5fd6..555ad79503d 100644 --- a/3rdparty/glm/test/gtx/gtx_number_precision.cpp +++ b/3rdparty/glm/test/gtx/gtx_number_precision.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_number_precision.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/number_precision.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_optimum_pow.cpp b/3rdparty/glm/test/gtx/gtx_optimum_pow.cpp index 7bbaf958ed7..a7b290b4598 100644 --- a/3rdparty/glm/test/gtx/gtx_optimum_pow.cpp +++ b/3rdparty/glm/test/gtx/gtx_optimum_pow.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_optimum_pow.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/optimum_pow.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_orthonormalize.cpp b/3rdparty/glm/test/gtx/gtx_orthonormalize.cpp index 0954a37443f..189e79f6d6f 100644 --- a/3rdparty/glm/test/gtx/gtx_orthonormalize.cpp +++ b/3rdparty/glm/test/gtx/gtx_orthonormalize.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_orthonormalize.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/orthonormalize.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_perpendicular.cpp b/3rdparty/glm/test/gtx/gtx_perpendicular.cpp index f688560705b..7e89ca971e7 100644 --- a/3rdparty/glm/test/gtx/gtx_perpendicular.cpp +++ b/3rdparty/glm/test/gtx/gtx_perpendicular.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_perpendicular.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/perpendicular.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_polar_coordinates.cpp b/3rdparty/glm/test/gtx/gtx_polar_coordinates.cpp index 0e95801997f..1ac584979d0 100644 --- a/3rdparty/glm/test/gtx/gtx_polar_coordinates.cpp +++ b/3rdparty/glm/test/gtx/gtx_polar_coordinates.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_polar_coordinates.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/polar_coordinates.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_projection.cpp b/3rdparty/glm/test/gtx/gtx_projection.cpp index b7a9721a700..d549adfd5ab 100644 --- a/3rdparty/glm/test/gtx/gtx_projection.cpp +++ b/3rdparty/glm/test/gtx/gtx_projection.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_projection.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/projection.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_quaternion.cpp b/3rdparty/glm/test/gtx/gtx_quaternion.cpp index 479bc65b38f..d3938fb1704 100644 --- a/3rdparty/glm/test/gtx/gtx_quaternion.cpp +++ b/3rdparty/glm/test/gtx/gtx_quaternion.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_quaternion.cpp -/// @date 2011-05-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/epsilon.hpp> #include <glm/gtc/type_ptr.hpp> #include <glm/gtc/matrix_transform.hpp> diff --git a/3rdparty/glm/test/gtx/gtx_range.cpp b/3rdparty/glm/test/gtx/gtx_range.cpp index 791c5051928..77c4792f4ef 100644 --- a/3rdparty/glm/test/gtx/gtx_range.cpp +++ b/3rdparty/glm/test/gtx/gtx_range.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_range.cpp -/// @date 2014-09-19 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/glm.hpp> #include <glm/gtc/epsilon.hpp> diff --git a/3rdparty/glm/test/gtx/gtx_rotate_normalized_axis.cpp b/3rdparty/glm/test/gtx/gtx_rotate_normalized_axis.cpp index 38031bf2d6a..7dca2281bd1 100644 --- a/3rdparty/glm/test/gtx/gtx_rotate_normalized_axis.cpp +++ b/3rdparty/glm/test/gtx/gtx_rotate_normalized_axis.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_rotate_normalized_axis.cpp -/// @date 2012-12-13 / 2012-12-13 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/rotate_normalized_axis.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_rotate_vector.cpp b/3rdparty/glm/test/gtx/gtx_rotate_vector.cpp index b8212f06b93..44935b3cde4 100644 --- a/3rdparty/glm/test/gtx/gtx_rotate_vector.cpp +++ b/3rdparty/glm/test/gtx/gtx_rotate_vector.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_rotate_vector.cpp -/// @date 2011-05-16 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/constants.hpp> #include <glm/gtx/rotate_vector.hpp> diff --git a/3rdparty/glm/test/gtx/gtx_scalar_multiplication.cpp b/3rdparty/glm/test/gtx/gtx_scalar_multiplication.cpp index 93ae55465a4..0a1adf02927 100644 --- a/3rdparty/glm/test/gtx/gtx_scalar_multiplication.cpp +++ b/3rdparty/glm/test/gtx/gtx_scalar_multiplication.cpp @@ -1,37 +1,6 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_scalar_multiplication.cpp -/// @date 2014-09-22 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/glm.hpp> -#if GLM_HAS_TEMPLATE_ALIASES & !(GLM_COMPILER & GLM_COMPILER_GCC) +#if GLM_HAS_TEMPLATE_ALIASES && !(GLM_COMPILER & GLM_COMPILER_GCC) #include <glm/gtx/scalar_multiplication.hpp> int main() diff --git a/3rdparty/glm/test/gtx/gtx_scalar_relational.cpp b/3rdparty/glm/test/gtx/gtx_scalar_relational.cpp index 5156e6c5e96..a526b0e84d3 100644 --- a/3rdparty/glm/test/gtx/gtx_scalar_relational.cpp +++ b/3rdparty/glm/test/gtx/gtx_scalar_relational.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_scalar_relational.cpp -/// @date 2013-02-04 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/glm.hpp> #include <glm/gtx/scalar_relational.hpp> #include <cstdio> diff --git a/3rdparty/glm/test/gtx/gtx_spline.cpp b/3rdparty/glm/test/gtx/gtx_spline.cpp index c627fb21d60..38ed5487d65 100644 --- a/3rdparty/glm/test/gtx/gtx_spline.cpp +++ b/3rdparty/glm/test/gtx/gtx_spline.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_spline.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/vec2.hpp> #include <glm/vec3.hpp> #include <glm/vec4.hpp> diff --git a/3rdparty/glm/test/gtx/gtx_string_cast.cpp b/3rdparty/glm/test/gtx/gtx_string_cast.cpp index 61223a88d66..94af4ec2970 100644 --- a/3rdparty/glm/test/gtx/gtx_string_cast.cpp +++ b/3rdparty/glm/test/gtx/gtx_string_cast.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_string_cast.cpp -/// @date 2011-09-01 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/glm.hpp> #include <glm/gtx/string_cast.hpp> #include <limits> diff --git a/3rdparty/glm/test/gtx/gtx_type_aligned.cpp b/3rdparty/glm/test/gtx/gtx_type_aligned.cpp index 2521518f63e..7274a7ebde7 100644 --- a/3rdparty/glm/test/gtx/gtx_type_aligned.cpp +++ b/3rdparty/glm/test/gtx/gtx_type_aligned.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_type_aligned.cpp -/// @date 2014-11-23 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/type_aligned.hpp> #include <cstdio> diff --git a/3rdparty/glm/test/gtx/gtx_vector_angle.cpp b/3rdparty/glm/test/gtx/gtx_vector_angle.cpp index 342c59ed878..1b4a6078971 100644 --- a/3rdparty/glm/test/gtx/gtx_vector_angle.cpp +++ b/3rdparty/glm/test/gtx/gtx_vector_angle.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_vector_angle.cpp -/// @date 2011-05-15 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtc/constants.hpp> #include <glm/gtx/vector_angle.hpp> #include <limits> diff --git a/3rdparty/glm/test/gtx/gtx_vector_query.cpp b/3rdparty/glm/test/gtx/gtx_vector_query.cpp index a2ea54b5331..160b9fa25b1 100644 --- a/3rdparty/glm/test/gtx/gtx_vector_query.cpp +++ b/3rdparty/glm/test/gtx/gtx_vector_query.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_vector_query.cpp -/// @date 2011-11-23 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/vec2.hpp> #include <glm/vec3.hpp> #include <glm/vec4.hpp> diff --git a/3rdparty/glm/test/gtx/gtx_wrap.cpp b/3rdparty/glm/test/gtx/gtx_wrap.cpp index b65d94baee8..cd7d7c4f045 100644 --- a/3rdparty/glm/test/gtx/gtx_wrap.cpp +++ b/3rdparty/glm/test/gtx/gtx_wrap.cpp @@ -1,34 +1,3 @@ -/////////////////////////////////////////////////////////////////////////////////// -/// OpenGL Mathematics (glm.g-truc.net) -/// -/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net) -/// Permission is hereby granted, free of charge, to any person obtaining a copy -/// of this software and associated documentation files (the "Software"), to deal -/// in the Software without restriction, including without limitation the rights -/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -/// copies of the Software, and to permit persons to whom the Software is -/// furnished to do so, subject to the following conditions: -/// -/// The above copyright notice and this permission notice shall be included in -/// all copies or substantial portions of the Software. -/// -/// Restrictions: -/// By making use of the Software for military purposes, you choose to make -/// a Bunny unhappy. -/// -/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -/// THE SOFTWARE. -/// -/// @file test/gtx/gtx_normal.cpp -/// @date 2013-10-25 / 2014-11-25 -/// @author Christophe Riccio -/////////////////////////////////////////////////////////////////////////////////// - #include <glm/gtx/wrap.hpp> #include <glm/gtc/epsilon.hpp> @@ -53,6 +22,18 @@ namespace clamp float E = glm::clamp(1.5f); Error += glm::epsilonEqual(E, 1.0f, 0.00001f) ? 0 : 1; + glm::vec2 K = glm::clamp(glm::vec2(0.5f)); + Error += glm::all(glm::epsilonEqual(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1; + + glm::vec3 L = glm::clamp(glm::vec3(0.5f)); + Error += glm::all(glm::epsilonEqual(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1; + + glm::vec4 M = glm::clamp(glm::vec4(0.5f)); + Error += glm::all(glm::epsilonEqual(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1; + + glm::vec1 N = glm::clamp(glm::vec1(0.5f)); + Error += glm::all(glm::epsilonEqual(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1; + return Error; } }//namespace clamp @@ -81,6 +62,18 @@ namespace repeat float F = glm::repeat(0.9f); Error += glm::epsilonEqual(F, 0.9f, 0.00001f) ? 0 : 1; + glm::vec2 K = glm::repeat(glm::vec2(0.5f)); + Error += glm::all(glm::epsilonEqual(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1; + + glm::vec3 L = glm::repeat(glm::vec3(0.5f)); + Error += glm::all(glm::epsilonEqual(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1; + + glm::vec4 M = glm::repeat(glm::vec4(0.5f)); + Error += glm::all(glm::epsilonEqual(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1; + + glm::vec1 N = glm::repeat(glm::vec1(0.5f)); + Error += glm::all(glm::epsilonEqual(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1; + return Error; } }//namespace repeat @@ -118,6 +111,18 @@ namespace mirrorClamp float I = glm::mirrorClamp(-0.9f); Error += glm::epsilonEqual(I, 0.9f, 0.00001f) ? 0 : 1; + glm::vec2 K = glm::mirrorClamp(glm::vec2(0.5f)); + Error += glm::all(glm::epsilonEqual(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1; + + glm::vec3 L = glm::mirrorClamp(glm::vec3(0.5f)); + Error += glm::all(glm::epsilonEqual(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1; + + glm::vec4 M = glm::mirrorClamp(glm::vec4(0.5f)); + Error += glm::all(glm::epsilonEqual(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1; + + glm::vec1 N = glm::mirrorClamp(glm::vec1(0.5f)); + Error += glm::all(glm::epsilonEqual(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1; + return Error; } }//namespace mirrorClamp @@ -155,6 +160,18 @@ namespace mirrorRepeat float I = glm::mirrorRepeat(-1.0f); Error += glm::epsilonEqual(I, 1.0f, 0.00001f) ? 0 : 1; + glm::vec2 K = glm::mirrorRepeat(glm::vec2(0.5f)); + Error += glm::all(glm::epsilonEqual(K, glm::vec2(0.5f), glm::vec2(0.00001f))) ? 0 : 1; + + glm::vec3 L = glm::mirrorRepeat(glm::vec3(0.5f)); + Error += glm::all(glm::epsilonEqual(L, glm::vec3(0.5f), glm::vec3(0.00001f))) ? 0 : 1; + + glm::vec4 M = glm::mirrorRepeat(glm::vec4(0.5f)); + Error += glm::all(glm::epsilonEqual(M, glm::vec4(0.5f), glm::vec4(0.00001f))) ? 0 : 1; + + glm::vec1 N = glm::mirrorRepeat(glm::vec1(0.5f)); + Error += glm::all(glm::epsilonEqual(N, glm::vec1(0.5f), glm::vec1(0.00001f))) ? 0 : 1; + return Error; } }//namespace mirrorRepeat |