Commit b41d0668 authored by Robert Menzel's avatar Robert Menzel

updated GLM to 0.9.7.1

parent 7ae41f65
...@@ -4,6 +4,8 @@ file(GLOB ROOT_SOURCE *.cpp) ...@@ -4,6 +4,8 @@ file(GLOB ROOT_SOURCE *.cpp)
file(GLOB ROOT_INLINE *.inl) file(GLOB ROOT_INLINE *.inl)
file(GLOB ROOT_HEADER *.hpp) file(GLOB ROOT_HEADER *.hpp)
file(GLOB ROOT_TEXT ../*.txt) file(GLOB ROOT_TEXT ../*.txt)
file(GLOB ROOT_MD ../*.md)
file(GLOB ROOT_NAT ../util/glm.natvis)
file(GLOB_RECURSE CORE_SOURCE ./detail/*.cpp) file(GLOB_RECURSE CORE_SOURCE ./detail/*.cpp)
file(GLOB_RECURSE CORE_INLINE ./detail/*.inl) file(GLOB_RECURSE CORE_INLINE ./detail/*.inl)
...@@ -17,7 +19,7 @@ file(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp) ...@@ -17,7 +19,7 @@ file(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp)
file(GLOB_RECURSE GTX_INLINE ./gtx/*.inl) file(GLOB_RECURSE GTX_INLINE ./gtx/*.inl)
file(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp) file(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp)
source_group("Text Files" FILES ${ROOT_TEXT}) source_group("Text Files" FILES ${ROOT_TEXT} ${ROOT_MD})
source_group("Core Files" FILES ${CORE_SOURCE}) source_group("Core Files" FILES ${CORE_SOURCE})
source_group("Core Files" FILES ${CORE_INLINE}) source_group("Core Files" FILES ${CORE_INLINE})
source_group("Core Files" FILES ${CORE_HEADER}) source_group("Core Files" FILES ${CORE_HEADER})
...@@ -30,11 +32,13 @@ source_group("GTX Files" FILES ${GTX_HEADER}) ...@@ -30,11 +32,13 @@ source_group("GTX Files" FILES ${GTX_HEADER})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
add_executable(${NAME} ${ROOT_TEXT} if(GLM_TEST_ENABLE)
${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} add_executable(${NAME} ${ROOT_TEXT} ${ROOT_MD} ${ROOT_NAT}
${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER}
${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER} ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER}
${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER}) ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER}
${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER})
endif(GLM_TEST_ENABLE)
#add_library(glm STATIC glm.cpp) #add_library(glm STATIC glm.cpp)
#add_library(glm_shared SHARED glm.cpp) #add_library(glm_shared SHARED glm.cpp)
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
/// The above copyright notice and this permission notice shall be included in /// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software. /// all copies or substantial portions of the Software.
/// ///
/// Restrictions:
/// By making use of the Software for military purposes, you choose to make
/// a Bunny unhappy.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
...@@ -26,9 +30,6 @@ ...@@ -26,9 +30,6 @@
/// @author Christophe Riccio /// @author Christophe Riccio
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#ifndef GLM_COMMON_INCLUDED #pragma once
#define GLM_COMMON_INCLUDED
#include "detail/func_common.hpp" #include "detail/func_common.hpp"
#endif//GLM_COMMON_INCLUDED
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
/// The above copyright notice and this permission notice shall be included in /// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software. /// all copies or substantial portions of the Software.
/// ///
/// Restrictions:
/// By making use of the Software for military purposes, you choose to make
/// a Bunny unhappy.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
...@@ -21,13 +25,12 @@ ...@@ -21,13 +25,12 @@
/// THE SOFTWARE. /// THE SOFTWARE.
/// ///
/// @ref core /// @ref core
/// @file glm/core/_features.hpp /// @file glm/detail/_features.hpp
/// @date 2013-02-20 / 2013-02-20 /// @date 2013-02-20 / 2013-02-20
/// @author Christophe Riccio /// @author Christophe Riccio
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_core_features #pragma once
#define glm_core_features
// #define GLM_CXX98_EXCEPTIONS // #define GLM_CXX98_EXCEPTIONS
// #define GLM_CXX98_RTTI // #define GLM_CXX98_RTTI
...@@ -281,7 +284,7 @@ ...@@ -281,7 +284,7 @@
# define GLM_CXX11_STATIC_ASSERT # define GLM_CXX11_STATIC_ASSERT
# endif # endif
#elif(GLM_COMPILER & GLM_COMPILER_CLANG) #elif(GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
# if(__has_feature(cxx_exceptions)) # if(__has_feature(cxx_exceptions))
# define GLM_CXX98_EXCEPTIONS # define GLM_CXX98_EXCEPTIONS
# endif # endif
...@@ -422,6 +425,4 @@ ...@@ -422,6 +425,4 @@
# define GLM_CXX11_VARIADIC_TEMPLATES # define GLM_CXX11_VARIADIC_TEMPLATES
# endif # endif
#endif//(GLM_COMPILER & GLM_COMPILER_CLANG) #endif//(GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
#endif//glm_core_features
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
/// The above copyright notice and this permission notice shall be included in /// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software. /// all copies or substantial portions of the Software.
/// ///
/// Restrictions:
/// By making use of the Software for military purposes, you choose to make
/// a Bunny unhappy.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
...@@ -21,7 +25,7 @@ ...@@ -21,7 +25,7 @@
/// THE SOFTWARE. /// THE SOFTWARE.
/// ///
/// @ref core /// @ref core
/// @file glm/core/_fixes.hpp /// @file glm/detail/_fixes.hpp
/// @date 2011-02-21 / 2011-11-22 /// @date 2011-02-21 / 2011-11-22
/// @author Christophe Riccio /// @author Christophe Riccio
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
......
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
/// The above copyright notice and this permission notice shall be included in /// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software. /// all copies or substantial portions of the Software.
/// ///
/// Restrictions:
/// By making use of the Software for military purposes, you choose to make
/// a Bunny unhappy.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
...@@ -26,8 +30,12 @@ ...@@ -26,8 +30,12 @@
/// @author Christophe Riccio /// @author Christophe Riccio
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#ifndef GLM_DETAIL_NOISE_INCLUDED #pragma once
#define GLM_DETAIL_NOISE_INCLUDED
#include "../vec2.hpp"
#include "../vec3.hpp"
#include "../vec4.hpp"
#include "../common.hpp"
namespace glm{ namespace glm{
namespace detail namespace detail
...@@ -75,19 +83,19 @@ namespace detail ...@@ -75,19 +83,19 @@ namespace detail
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec2<T, P> taylorInvSqrt(detail::tvec2<T, P> const & r) GLM_FUNC_QUALIFIER tvec2<T, P> taylorInvSqrt(tvec2<T, P> const & r)
{ {
return T(1.79284291400159) - T(0.85373472095314) * r; return T(1.79284291400159) - T(0.85373472095314) * r;
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec3<T, P> taylorInvSqrt(detail::tvec3<T, P> const & r) GLM_FUNC_QUALIFIER tvec3<T, P> taylorInvSqrt(tvec3<T, P> const & r)
{ {
return T(1.79284291400159) - T(0.85373472095314) * r; return T(1.79284291400159) - T(0.85373472095314) * r;
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec4<T, P> taylorInvSqrt(detail::tvec4<T, P> const & r) GLM_FUNC_QUALIFIER tvec4<T, P> taylorInvSqrt(tvec4<T, P> const & r)
{ {
return T(1.79284291400159) - T(0.85373472095314) * r; return T(1.79284291400159) - T(0.85373472095314) * r;
} }
...@@ -100,19 +108,19 @@ namespace detail ...@@ -100,19 +108,19 @@ namespace detail
*/ */
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec2<T, P> fade(detail::tvec2<T, P> const & t) GLM_FUNC_QUALIFIER tvec2<T, P> fade(tvec2<T, P> const & t)
{ {
return (t * t * t) * (t * (t * T(6) - T(15)) + T(10)); return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec3<T, P> fade(detail::tvec3<T, P> const & t) GLM_FUNC_QUALIFIER tvec3<T, P> fade(tvec3<T, P> const & t)
{ {
return (t * t * t) * (t * (t * T(6) - T(15)) + T(10)); return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
} }
template <typename T, precision P> template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tvec4<T, P> fade(detail::tvec4<T, P> const & t) GLM_FUNC_QUALIFIER tvec4<T, P> fade(tvec4<T, P> const & t)
{ {
return (t * t * t) * (t * (t * T(6) - T(15)) + T(10)); return (t * t * t) * (t * (t * T(6) - T(15)) + T(10));
} }
...@@ -126,5 +134,3 @@ namespace detail ...@@ -126,5 +134,3 @@ namespace detail
}//namespace detail }//namespace detail
}//namespace glm }//namespace glm
#endif//GLM_DETAIL_NOISE_INCLUDED
This diff is collapsed.
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
/// The above copyright notice and this permission notice shall be included in /// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software. /// all copies or substantial portions of the Software.
/// ///
/// Restrictions:
/// By making use of the Software for military purposes, you choose to make
/// a Bunny unhappy.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
...@@ -21,13 +25,12 @@ ...@@ -21,13 +25,12 @@
/// THE SOFTWARE. /// THE SOFTWARE.
/// ///
/// @ref core /// @ref core
/// @file glm/core/_swizzle_func.hpp /// @file glm/detail/_swizzle_func.hpp
/// @date 2011-10-16 / 2011-10-16 /// @date 2011-10-16 / 2011-10-16
/// @author Christophe Riccio /// @author Christophe Riccio
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_core_swizzle_func #pragma once
#define glm_core_swizzle_func
#define GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B) \ #define GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B) \
SWIZZLED_TYPE<TMPL_TYPE, PRECISION> A ## B() CONST \ SWIZZLED_TYPE<TMPL_TYPE, PRECISION> A ## B() CONST \
...@@ -720,5 +723,3 @@ ...@@ -720,5 +723,3 @@
GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, p, q) GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, p, q)
//GLM_SWIZZLE_GEN_VEC_FROM_VEC4(valType, detail::vec4, detail::vec2, detail::vec3, detail::vec4) //GLM_SWIZZLE_GEN_VEC_FROM_VEC4(valType, detail::vec4, detail::vec2, detail::vec3, detail::vec4)
#endif//glm_core_swizzle_func
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
/// The above copyright notice and this permission notice shall be included in /// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software. /// all copies or substantial portions of the Software.
/// ///
/// Restrictions:
/// By making use of the Software for military purposes, you choose to make
/// a Bunny unhappy.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
...@@ -21,197 +25,136 @@ ...@@ -21,197 +25,136 @@
/// THE SOFTWARE. /// THE SOFTWARE.
/// ///
/// @ref core /// @ref core
/// @file glm/core/_vectorize.hpp /// @file glm/detail/_vectorize.hpp
/// @date 2011-10-14 / 2011-10-14 /// @date 2011-10-14 / 2011-10-14
/// @author Christophe Riccio /// @author Christophe Riccio
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#ifndef GLM_CORE_DETAIL_INCLUDED #pragma once
#define GLM_CORE_DETAIL_INCLUDED
#include "type_vec1.hpp" #include "type_vec1.hpp"
#include "type_vec2.hpp" #include "type_vec2.hpp"
#include "type_vec3.hpp" #include "type_vec3.hpp"
#include "type_vec4.hpp" #include "type_vec4.hpp"
#define VECTORIZE1_VEC(func) \
template <typename T, precision P> \
GLM_FUNC_QUALIFIER detail::tvec1<T, P> func( \
detail::tvec1<T, P> const & v) \
{ \
return detail::tvec1<T, P>( \
func(v.x)); \
}
#define VECTORIZE2_VEC(func) \
template <typename T, precision P> \
GLM_FUNC_QUALIFIER detail::tvec2<T, P> func( \
detail::tvec2<T, P> const & v) \
{ \
return detail::tvec2<T, P>( \
func(v.x), \
func(v.y)); \
}
#define VECTORIZE3_VEC(func) \
template <typename T, precision P> \
GLM_FUNC_QUALIFIER detail::tvec3<T, P> func( \
detail::tvec3<T, P> const & v) \
{ \
return detail::tvec3<T, P>( \
func(v.x), \
func(v.y), \
func(v.z)); \
}
#define VECTORIZE4_VEC(func) \
template <typename T, precision P> \
GLM_FUNC_QUALIFIER detail::tvec4<T, P> func( \
detail::tvec4<T, P> const & v) \
{ \
return detail::tvec4<T, P>( \
func(v.x), \
func(v.y), \
func(v.z), \
func(v.w)); \
}
#define VECTORIZE_VEC(func) \
VECTORIZE1_VEC(func) \
VECTORIZE2_VEC(func) \
VECTORIZE3_VEC(func) \
VECTORIZE4_VEC(func)
#define VECTORIZE1_VEC_SCA(func) \
template <typename T, precision P> \
GLM_FUNC_QUALIFIER detail::tvec1<T, P> func \
( \
detail::tvec1<T, P> const & x, \
T const & y \
) \
{ \
return detail::tvec1<T, P>( \
func(x.x, y)); \
}
#define VECTORIZE2_VEC_SCA(func) \
template <typename T, precision P> \
GLM_FUNC_QUALIFIER detail::tvec2<T, P> func \
( \
detail::tvec2<T, P> const & x, \
T const & y \
) \
{ \
return detail::tvec2<T, P>( \
func(x.x, y), \
func(x.y, y)); \
}
#define VECTORIZE3_VEC_SCA(func) \
template <typename T, precision P> \
GLM_FUNC_QUALIFIER detail::tvec3<T, P> func \
( \
detail::tvec3<T, P> const & x, \
T const & y \
) \
{ \
return detail::tvec3<T, P>(