mirror of
https://github.com/g-truc/glm.git
synced 2024-11-23 01:14:34 +00:00
commit
69a824c478
@ -18,8 +18,18 @@ if(("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR ("${CMAKE_CXX_COMPILER_ID}"
|
|||||||
option(GLM_TEST_ENABLE_CXX_0X "Enable C++ 0x" OFF)
|
option(GLM_TEST_ENABLE_CXX_0X "Enable C++ 0x" OFF)
|
||||||
option(GLM_TEST_ENABLE_CXX_11 "Enable C++ 11" OFF)
|
option(GLM_TEST_ENABLE_CXX_11 "Enable C++ 11" OFF)
|
||||||
option(GLM_TEST_ENABLE_CXX_1Y "Enable C++ 1y" OFF)
|
option(GLM_TEST_ENABLE_CXX_1Y "Enable C++ 1y" OFF)
|
||||||
|
option(GLM_TEST_ENABLE_CXX_14 "Enable C++ 14" OFF)
|
||||||
|
option(GLM_TEST_ENABLE_CXX_1Z "Enable C++ 1z" OFF)
|
||||||
|
|
||||||
if(GLM_TEST_ENABLE_CXX_1Y)
|
if(GLM_TEST_ENABLE_CXX_1Z)
|
||||||
|
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++1z")
|
||||||
|
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
|
||||||
|
set(CMAKE_CXX_FLAGS "-std=c++1Z")
|
||||||
|
elseif(GLM_TEST_ENABLE_CXX_14)
|
||||||
|
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++14")
|
||||||
|
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
|
||||||
|
set(CMAKE_CXX_FLAGS "-std=c++14")
|
||||||
|
elseif(GLM_TEST_ENABLE_CXX_1Y)
|
||||||
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++1y")
|
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++1y")
|
||||||
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
|
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
|
||||||
set(CMAKE_CXX_FLAGS "-std=c++1y")
|
set(CMAKE_CXX_FLAGS "-std=c++1y")
|
||||||
@ -64,8 +74,6 @@ if(GLM_TEST_FORCE_PURE)
|
|||||||
|
|
||||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
add_definitions(-mfpmath=387)
|
add_definitions(-mfpmath=387)
|
||||||
elseif(MSVC)
|
|
||||||
add_definitions(/arch:IA32)
|
|
||||||
endif()
|
endif()
|
||||||
elseif(GLM_TEST_ENABLE_SIMD_AVX2)
|
elseif(GLM_TEST_ENABLE_SIMD_AVX2)
|
||||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
@ -121,8 +129,8 @@ endif()
|
|||||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||||
#add_definitions(-S)
|
#add_definitions(-S)
|
||||||
#add_definitions(-s)
|
#add_definitions(-s)
|
||||||
#add_definitions(-m32)
|
add_definitions(-m64)
|
||||||
#add_definitions(-O3)
|
add_definitions(-O2)
|
||||||
|
|
||||||
#add_definitions(-fprofile-arcs -ftest-coverage) gcov
|
#add_definitions(-fprofile-arcs -ftest-coverage) gcov
|
||||||
#ctest_enable_coverage()
|
#ctest_enable_coverage()
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
================================================================================
|
================================================================================
|
||||||
OpenGL Mathematics (GLM)
|
OpenGL Mathematics (GLM)
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
GLM is licensed under The Happy Bunny License and MIT License
|
GLM can be distributed and/or modified under the terms of either
|
||||||
|
a) The Happy Bunny License, or b) the MIT License.
|
||||||
|
|
||||||
================================================================================
|
================================================================================
|
||||||
The Happy Bunny License (Modified MIT License)
|
The Happy Bunny License (Modified MIT License)
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Copyright (c) 2005 - 2014 G-Truc Creation
|
Copyright (c) 2005 - 2015 G-Truc Creation
|
||||||
|
|
||||||
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
|
||||||
@ -33,7 +34,7 @@ THE SOFTWARE.
|
|||||||
================================================================================
|
================================================================================
|
||||||
The MIT License
|
The MIT License
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Copyright (c) 2005 - 2014 G-Truc Creation
|
Copyright (c) 2005 - 2015 G-Truc Creation
|
||||||
|
|
||||||
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
|
||||||
|
BIN
doc/glm.docx
BIN
doc/glm.docx
Binary file not shown.
BIN
doc/glm.pdf
BIN
doc/glm.pdf
Binary file not shown.
BIN
doc/~$glm.docx
BIN
doc/~$glm.docx
Binary file not shown.
@ -4,6 +4,7 @@ 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_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)
|
||||||
@ -31,7 +32,7 @@ source_group("GTX Files" FILES ${GTX_HEADER})
|
|||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
|
||||||
|
|
||||||
if(GLM_TEST_ENABLE)
|
if(GLM_TEST_ENABLE)
|
||||||
add_executable(${NAME} ${ROOT_TEXT}
|
add_executable(${NAME} ${ROOT_TEXT} ${ROOT_NAT}
|
||||||
${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER}
|
${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER}
|
||||||
${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER}
|
${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER}
|
||||||
${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER}
|
${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -34,7 +34,8 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#define GLM_MESSAGES
|
#define GLM_MESSAGES
|
||||||
#include "../glm.hpp"
|
#include <glm/glm.hpp>
|
||||||
|
#include <glm/ext.hpp>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
struct material
|
struct material
|
||||||
@ -213,10 +214,19 @@ typename vecType::value_type normalizeDotC(vecType const & a, vecType const & b)
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
glm::vec4 v(1);
|
glm::vec1 o(1);
|
||||||
float a = normalizeDotA(v, v);
|
glm::vec2 a(1);
|
||||||
float b = normalizeDotB(v, v);
|
glm::vec3 b(1);
|
||||||
float c = normalizeDotC(v, v);
|
glm::vec4 c(1);
|
||||||
|
|
||||||
|
glm::quat q;
|
||||||
|
glm::dualquat p;
|
||||||
|
|
||||||
|
glm::mat4 m(1);
|
||||||
|
|
||||||
|
float a0 = normalizeDotA(a, a);
|
||||||
|
float b0 = normalizeDotB(b, b);
|
||||||
|
float c0 = normalizeDotC(c, c);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -546,7 +546,7 @@ namespace detail
|
|||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'isnan' only accept floating-point inputs");
|
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'isnan' only accept floating-point inputs");
|
||||||
|
|
||||||
# if GLM_LANG & GLM_LANG_CXX11_FLAG
|
# if GLM_HAS_CXX11_STL
|
||||||
return std::isnan(x);
|
return std::isnan(x);
|
||||||
# elif GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL)
|
# elif GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL)
|
||||||
return _isnan(x) != 0;
|
return _isnan(x) != 0;
|
||||||
@ -580,17 +580,17 @@ namespace detail
|
|||||||
{
|
{
|
||||||
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'isinf' only accept floating-point inputs");
|
GLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, "'isinf' only accept floating-point inputs");
|
||||||
|
|
||||||
# if(GLM_LANG & GLM_LANG_CXX11_FLAG)
|
# if GLM_HAS_CXX11_STL
|
||||||
return std::isinf(x);
|
return std::isinf(x);
|
||||||
# elif(GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC))
|
# elif GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC)
|
||||||
return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF;
|
return _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF;
|
||||||
# elif(GLM_COMPILER & (GLM_COMPILER_GCC | (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM)))
|
# elif GLM_COMPILER & (GLM_COMPILER_GCC | (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM))
|
||||||
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID && __cplusplus < 201103L)
|
# if(GLM_PLATFORM & GLM_PLATFORM_ANDROID && __cplusplus < 201103L)
|
||||||
return _isinf(x) != 0;
|
return _isinf(x) != 0;
|
||||||
# else
|
# else
|
||||||
return std::isinf(x);
|
return std::isinf(x);
|
||||||
# endif
|
# endif
|
||||||
# elif(GLM_COMPILER & GLM_COMPILER_CUDA)
|
# elif GLM_COMPILER & GLM_COMPILER_CUDA
|
||||||
// http://developer.download.nvidia.com/compute/cuda/4_2/rel/toolkit/docs/online/group__CUDA__MATH__DOUBLE_g13431dd2b40b51f9139cbb7f50c18fab.html#g13431dd2b40b51f9139cbb7f50c18fab
|
// http://developer.download.nvidia.com/compute/cuda/4_2/rel/toolkit/docs/online/group__CUDA__MATH__DOUBLE_g13431dd2b40b51f9139cbb7f50c18fab.html#g13431dd2b40b51f9139cbb7f50c18fab
|
||||||
return isinf(double(x)) != 0;
|
return isinf(double(x)) != 0;
|
||||||
# else
|
# else
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -39,7 +39,7 @@
|
|||||||
namespace glm{
|
namespace glm{
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
# if GLM_LANG & GLM_LANG_CXX11_FLAG
|
# if GLM_HAS_CXX11_STL
|
||||||
using std::log2;
|
using std::log2;
|
||||||
# else
|
# else
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -104,11 +104,11 @@ namespace glm
|
|||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/faceforward.xml">GLSL faceforward man page</a>
|
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/faceforward.xml">GLSL faceforward man page</a>
|
||||||
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
|
/// @see <a href="http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf">GLSL 4.20.8 specification, section 8.5 Geometric Functions</a>
|
||||||
template <typename genType>
|
template <typename T, precision P, template <typename, precision> class vecType>
|
||||||
GLM_FUNC_DECL genType faceforward(
|
GLM_FUNC_DECL vecType<T, P> faceforward(
|
||||||
genType const & N,
|
vecType<T, P> const & N,
|
||||||
genType const & I,
|
vecType<T, P> const & I,
|
||||||
genType const & Nref);
|
vecType<T, P> const & Nref);
|
||||||
|
|
||||||
/// For the incident vector I and surface orientation N,
|
/// For the incident vector I and surface orientation N,
|
||||||
/// returns the reflection direction : result = I - 2.0 * dot(N, I) * N.
|
/// returns the reflection direction : result = I - 2.0 * dot(N, I) * N.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -165,6 +165,12 @@ namespace detail
|
|||||||
return dot(Nref, I) < static_cast<genType>(0) ? N : -N;
|
return dot(Nref, I) < static_cast<genType>(0) ? N : -N;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
// reflect
|
// reflect
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
GLM_FUNC_QUALIFIER genType reflect(genType const & I, genType const & N)
|
GLM_FUNC_QUALIFIER genType reflect(genType const & I, genType const & N)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -116,6 +116,7 @@ namespace detail
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# if !((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_MODEL == GLM_MODEL_32))
|
||||||
template <typename genIUType>
|
template <typename genIUType>
|
||||||
struct compute_findLSB<genIUType, 64>
|
struct compute_findLSB<genIUType, 64>
|
||||||
{
|
{
|
||||||
@ -126,6 +127,7 @@ namespace detail
|
|||||||
return IsNotNull ? int(Result) : -1;
|
return IsNotNull ? int(Result) : -1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
# endif
|
||||||
# endif//GLM_HAS_BITSCAN_WINDOWS
|
# endif//GLM_HAS_BITSCAN_WINDOWS
|
||||||
|
|
||||||
template <typename T, glm::precision P, template <class, glm::precision> class vecType, bool EXEC = true>
|
template <typename T, glm::precision P, template <class, glm::precision> class vecType, bool EXEC = true>
|
||||||
@ -171,14 +173,6 @@ namespace detail
|
|||||||
return IsNotNull ? int(Result) : -1;
|
return IsNotNull ? int(Result) : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename genIUType>
|
|
||||||
GLM_FUNC_QUALIFIER int compute_findMSB_64(genIUType Value)
|
|
||||||
{
|
|
||||||
unsigned long Result(0);
|
|
||||||
unsigned char IsNotNull = _BitScanReverse64(&Result, *reinterpret_cast<unsigned __int64*>(&Value));
|
|
||||||
return IsNotNull ? int(Result) : -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, glm::precision P, template <class, glm::precision> class vecType>
|
template <typename T, glm::precision P, template <class, glm::precision> class vecType>
|
||||||
struct compute_findMSB_vec<T, P, vecType, 32>
|
struct compute_findMSB_vec<T, P, vecType, 32>
|
||||||
{
|
{
|
||||||
@ -188,6 +182,15 @@ namespace detail
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# if !((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_MODEL == GLM_MODEL_32))
|
||||||
|
template <typename genIUType>
|
||||||
|
GLM_FUNC_QUALIFIER int compute_findMSB_64(genIUType Value)
|
||||||
|
{
|
||||||
|
unsigned long Result(0);
|
||||||
|
unsigned char IsNotNull = _BitScanReverse64(&Result, *reinterpret_cast<unsigned __int64*>(&Value));
|
||||||
|
return IsNotNull ? int(Result) : -1;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, glm::precision P, template <class, glm::precision> class vecType>
|
template <typename T, glm::precision P, template <class, glm::precision> class vecType>
|
||||||
struct compute_findMSB_vec<T, P, vecType, 64>
|
struct compute_findMSB_vec<T, P, vecType, 64>
|
||||||
{
|
{
|
||||||
@ -196,6 +199,7 @@ namespace detail
|
|||||||
return detail::functor1<int, T, P, vecType>::call(compute_findMSB_64, x);
|
return detail::functor1<int, T, P, vecType>::call(compute_findMSB_64, x);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
# endif
|
||||||
# endif//GLM_HAS_BITSCAN_WINDOWS
|
# endif//GLM_HAS_BITSCAN_WINDOWS
|
||||||
}//namespace detail
|
}//namespace detail
|
||||||
|
|
||||||
@ -203,7 +207,7 @@ namespace detail
|
|||||||
GLM_FUNC_QUALIFIER uint uaddCarry(uint const & x, uint const & y, uint & Carry)
|
GLM_FUNC_QUALIFIER uint uaddCarry(uint const & x, uint const & y, uint & Carry)
|
||||||
{
|
{
|
||||||
uint64 const Value64(static_cast<uint64>(x) + static_cast<uint64>(y));
|
uint64 const Value64(static_cast<uint64>(x) + static_cast<uint64>(y));
|
||||||
uint64 const Max32(static_cast<uint64>(std::numeric_limits<uint>::max()));
|
uint64 const Max32((static_cast<uint64>(1) << static_cast<uint64>(32)) - static_cast<uint64>(1));
|
||||||
Carry = Value64 > Max32 ? 1 : 0;
|
Carry = Value64 > Max32 ? 1 : 0;
|
||||||
return static_cast<uint32>(Value64 % (Max32 + static_cast<uint64>(1)));
|
return static_cast<uint32>(Value64 % (Max32 + static_cast<uint64>(1)));
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -111,7 +111,7 @@ namespace glm
|
|||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml">GLSL unpackUnorm2x16 man page</a>
|
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml">GLSL unpackUnorm2x16 man page</a>
|
||||||
/// @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 <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>
|
||||||
GLM_FUNC_DECL vec2 unpackUnorm2x16(uint const & p);
|
GLM_FUNC_DECL vec2 unpackUnorm2x16(uint p);
|
||||||
|
|
||||||
/// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
|
/// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
|
||||||
/// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
|
/// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
|
||||||
@ -124,7 +124,7 @@ namespace glm
|
|||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm2x16.xml">GLSL unpackSnorm2x16 man page</a>
|
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm2x16.xml">GLSL unpackSnorm2x16 man page</a>
|
||||||
/// @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 <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>
|
||||||
GLM_FUNC_DECL vec2 unpackSnorm2x16(uint const & p);
|
GLM_FUNC_DECL vec2 unpackSnorm2x16(uint p);
|
||||||
|
|
||||||
/// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
|
/// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
|
||||||
/// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
|
/// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
|
||||||
@ -137,7 +137,7 @@ namespace glm
|
|||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml">GLSL unpackUnorm4x8 man page</a>
|
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml">GLSL unpackUnorm4x8 man page</a>
|
||||||
/// @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 <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>
|
||||||
GLM_FUNC_DECL vec4 unpackUnorm4x8(uint const & p);
|
GLM_FUNC_DECL vec4 unpackUnorm4x8(uint p);
|
||||||
|
|
||||||
/// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
|
/// First, unpacks a single 32-bit unsigned integer p into a pair of 16-bit unsigned integers, four 8-bit unsigned integers, or four 8-bit signed integers.
|
||||||
/// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
|
/// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.
|
||||||
@ -150,7 +150,7 @@ namespace glm
|
|||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a>
|
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml">GLSL unpackSnorm4x8 man page</a>
|
||||||
/// @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 <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>
|
||||||
GLM_FUNC_DECL vec4 unpackSnorm4x8(uint const & p);
|
GLM_FUNC_DECL vec4 unpackSnorm4x8(uint p);
|
||||||
|
|
||||||
/// Returns a double-precision value obtained by packing the components of v into a 64-bit value.
|
/// Returns a double-precision value obtained by packing the components of v into a 64-bit value.
|
||||||
/// If an IEEE 754 Inf or NaN is created, it will not signal, and the resulting floating point value is unspecified.
|
/// If an IEEE 754 Inf or NaN is created, it will not signal, and the resulting floating point value is unspecified.
|
||||||
@ -169,7 +169,7 @@ namespace glm
|
|||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackDouble2x32.xml">GLSL unpackDouble2x32 man page</a>
|
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackDouble2x32.xml">GLSL unpackDouble2x32 man page</a>
|
||||||
/// @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 <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>
|
||||||
GLM_FUNC_DECL uvec2 unpackDouble2x32(double const & v);
|
GLM_FUNC_DECL uvec2 unpackDouble2x32(double v);
|
||||||
|
|
||||||
/// Returns an unsigned integer obtained by converting the components of a two-component floating-point vector
|
/// Returns an unsigned integer obtained by converting the components of a two-component floating-point vector
|
||||||
/// to the 16-bit floating-point representation found in the OpenGL Specification,
|
/// to the 16-bit floating-point representation found in the OpenGL Specification,
|
||||||
@ -189,7 +189,7 @@ namespace glm
|
|||||||
///
|
///
|
||||||
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml">GLSL unpackHalf2x16 man page</a>
|
/// @see <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml">GLSL unpackHalf2x16 man page</a>
|
||||||
/// @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 <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>
|
||||||
GLM_FUNC_DECL vec2 unpackHalf2x16(uint const & v);
|
GLM_FUNC_DECL vec2 unpackHalf2x16(uint v);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -38,13 +38,11 @@ namespace glm
|
|||||||
{
|
{
|
||||||
GLM_FUNC_QUALIFIER uint packUnorm2x16(vec2 const & v)
|
GLM_FUNC_QUALIFIER uint packUnorm2x16(vec2 const & v)
|
||||||
{
|
{
|
||||||
u16vec2 Topack(round(clamp(v, 0.0f, 1.0f) * 65535.0f));
|
u16vec2 const Topack(round(clamp(v, 0.0f, 1.0f) * 65535.0f));
|
||||||
// return reinterpret_cast<uint&>(Topack);
|
return reinterpret_cast<uint const &>(Topack);
|
||||||
uint* ptr(reinterpret_cast<uint*>(&Topack));
|
|
||||||
return *ptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GLM_FUNC_QUALIFIER vec2 unpackUnorm2x16(uint const & p)
|
GLM_FUNC_QUALIFIER vec2 unpackUnorm2x16(uint p)
|
||||||
{
|
{
|
||||||
vec2 Unpack(reinterpret_cast<u16vec2 const &>(p));
|
vec2 Unpack(reinterpret_cast<u16vec2 const &>(p));
|
||||||
return Unpack * float(1.5259021896696421759365224689097e-5); // 1.0 / 65535.0
|
return Unpack * float(1.5259021896696421759365224689097e-5); // 1.0 / 65535.0
|
||||||
@ -52,15 +50,13 @@ namespace glm
|
|||||||
|
|
||||||
GLM_FUNC_QUALIFIER uint packSnorm2x16(vec2 const & v)
|
GLM_FUNC_QUALIFIER uint packSnorm2x16(vec2 const & v)
|
||||||
{
|
{
|
||||||
i16vec2 Topack(round(clamp(v ,-1.0f, 1.0f) * 32767.0f));
|
i16vec2 const Topack(round(clamp(v ,-1.0f, 1.0f) * 32767.0f));
|
||||||
// return reinterpret_cast<uint32&>(Topack);
|
return reinterpret_cast<uint const &>(Topack);
|
||||||
uint* ptr(reinterpret_cast<uint*>(&Topack));
|
|
||||||
return *ptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GLM_FUNC_QUALIFIER vec2 unpackSnorm2x16(uint const & p)
|
GLM_FUNC_QUALIFIER vec2 unpackSnorm2x16(uint p)
|
||||||
{
|
{
|
||||||
vec2 Unpack(reinterpret_cast<i16vec2 const &>(p));
|
vec2 const Unpack(reinterpret_cast<i16vec2 const &>(p));
|
||||||
return clamp(
|
return clamp(
|
||||||
Unpack * 3.0518509475997192297128208258309e-5f, //1.0f / 32767.0f,
|
Unpack * 3.0518509475997192297128208258309e-5f, //1.0f / 32767.0f,
|
||||||
-1.0f, 1.0f);
|
-1.0f, 1.0f);
|
||||||
@ -68,25 +64,25 @@ namespace glm
|
|||||||
|
|
||||||
GLM_FUNC_QUALIFIER uint packUnorm4x8(vec4 const & v)
|
GLM_FUNC_QUALIFIER uint packUnorm4x8(vec4 const & v)
|
||||||
{
|
{
|
||||||
u8vec4 Topack(round(clamp(v, 0.0f, 1.0f) * 255.0f));
|
u8vec4 const Topack(round(clamp(v, 0.0f, 1.0f) * 255.0f));
|
||||||
return reinterpret_cast<uint&>(Topack);
|
return reinterpret_cast<uint const &>(Topack);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLM_FUNC_QUALIFIER vec4 unpackUnorm4x8(uint const & p)
|
GLM_FUNC_QUALIFIER vec4 unpackUnorm4x8(uint p)
|
||||||
{
|
{
|
||||||
vec4 Unpack(reinterpret_cast<u8vec4 const&>(p));
|
vec4 const Unpack(reinterpret_cast<u8vec4 const&>(p));
|
||||||
return Unpack * float(0.0039215686274509803921568627451); // 1 / 255
|
return Unpack * float(0.0039215686274509803921568627451); // 1 / 255
|
||||||
}
|
}
|
||||||
|
|
||||||
GLM_FUNC_QUALIFIER uint packSnorm4x8(vec4 const & v)
|
GLM_FUNC_QUALIFIER uint packSnorm4x8(vec4 const & v)
|
||||||
{
|
{
|
||||||
i8vec4 Topack(round(clamp(v ,-1.0f, 1.0f) * 127.0f));
|
i8vec4 const Topack(round(clamp(v ,-1.0f, 1.0f) * 127.0f));
|
||||||
return reinterpret_cast<uint&>(Topack);
|
return reinterpret_cast<uint const &>(Topack);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLM_FUNC_QUALIFIER glm::vec4 unpackSnorm4x8(uint const & p)
|
GLM_FUNC_QUALIFIER glm::vec4 unpackSnorm4x8(uint p)
|
||||||
{
|
{
|
||||||
vec4 Unpack(reinterpret_cast<i8vec4 const &>(p));
|
vec4 const Unpack(reinterpret_cast<i8vec4 const &>(p));
|
||||||
return clamp(
|
return clamp(
|
||||||
Unpack * 0.0078740157480315f, // 1.0f / 127.0f
|
Unpack * 0.0078740157480315f, // 1.0f / 127.0f
|
||||||
-1.0f, 1.0f);
|
-1.0f, 1.0f);
|
||||||
@ -97,24 +93,23 @@ namespace glm
|
|||||||
return reinterpret_cast<double const &>(v);
|
return reinterpret_cast<double const &>(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLM_FUNC_QUALIFIER uvec2 unpackDouble2x32(double const & v)
|
GLM_FUNC_QUALIFIER uvec2 unpackDouble2x32(double v)
|
||||||
{
|
{
|
||||||
return reinterpret_cast<uvec2 const &>(v);
|
return reinterpret_cast<uvec2 const &>(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
GLM_FUNC_QUALIFIER uint packHalf2x16(vec2 const & v)
|
GLM_FUNC_QUALIFIER uint packHalf2x16(vec2 const & v)
|
||||||
{
|
{
|
||||||
i16vec2 Unpack(
|
i16vec2 const Unpack(
|
||||||
detail::toFloat16(v.x),
|
detail::toFloat16(v.x),
|
||||||
detail::toFloat16(v.y));
|
detail::toFloat16(v.y));
|
||||||
|
|
||||||
uint * Result = reinterpret_cast<uint*>(&Unpack);
|
return reinterpret_cast<uint const &>(Unpack);
|
||||||
return *Result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GLM_FUNC_QUALIFIER vec2 unpackHalf2x16(uint const & v)
|
GLM_FUNC_QUALIFIER vec2 unpackHalf2x16(uint v)
|
||||||
{
|
{
|
||||||
i16vec2 Unpack(reinterpret_cast<i16vec2 const &>(v));
|
i16vec2 const Unpack(reinterpret_cast<i16vec2 const &>(v));
|
||||||
|
|
||||||
return vec2(
|
return vec2(
|
||||||
detail::toFloat32(Unpack.x),
|
detail::toFloat32(Unpack.x),
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -162,7 +162,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
// asinh
|
// asinh
|
||||||
# if GLM_LANG & GLM_LANG_CXX11_FLAG
|
# if GLM_HAS_CXX11_STL
|
||||||
using std::asinh;
|
using std::asinh;
|
||||||
# else
|
# else
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
@ -181,7 +181,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
// acosh
|
// acosh
|
||||||
# if GLM_LANG & GLM_LANG_CXX11_FLAG
|
# if GLM_HAS_CXX11_STL
|
||||||
using std::acosh;
|
using std::acosh;
|
||||||
# else
|
# else
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
@ -202,7 +202,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
// atanh
|
// atanh
|
||||||
# if GLM_LANG & GLM_LANG_CXX11_FLAG
|
# if GLM_HAS_CXX11_STL
|
||||||
using std::atanh;
|
using std::atanh;
|
||||||
# else
|
# else
|
||||||
template <typename genType>
|
template <typename genType>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -301,13 +301,13 @@ GLM_FUNC_QUALIFIER __m128 sse_ssp_ps(__m128 edge0, __m128 edge1, __m128 x)
|
|||||||
// By Elan Ruskin, http://assemblyrequired.crashworks.org/
|
// By Elan Ruskin, http://assemblyrequired.crashworks.org/
|
||||||
GLM_FUNC_QUALIFIER __m128 sse_sqrt_wip_ss(__m128 const & x)
|
GLM_FUNC_QUALIFIER __m128 sse_sqrt_wip_ss(__m128 const & x)
|
||||||
{
|
{
|
||||||
__m128 recip = _mm_rsqrt_ss(x); // "estimate" opcode
|
__m128 const recip = _mm_rsqrt_ss(x); // "estimate" opcode
|
||||||
const static __m128 three = {3, 3, 3, 3}; // aligned consts for fast load
|
__m128 const half = _mm_set_ps1(0.5f);
|
||||||
const static __m128 half = {0.5,0.5,0.5,0.5};
|
__m128 const halfrecip = _mm_mul_ss(half, recip);
|
||||||
__m128 halfrecip = _mm_mul_ss(half, recip);
|
__m128 const threeminus_xrr = _mm_sub_ss(three, _mm_mul_ss(x, _mm_mul_ss (recip, recip)));
|
||||||
__m128 threeminus_xrr = _mm_sub_ss(three, _mm_mul_ss(x, _mm_mul_ss (recip, recip)));
|
return _mm_mul_ss(halfrecip, threeminus_xrr);
|
||||||
return _mm_mul_ss( halfrecip, threeminus_xrr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}//namespace detail
|
}//namespace detail
|
||||||
}//namespace glms
|
}//namespace glms
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -44,6 +44,11 @@
|
|||||||
#define GLM_VERSION_PATCH 7
|
#define GLM_VERSION_PATCH 7
|
||||||
#define GLM_VERSION_REVISION 0
|
#define GLM_VERSION_REVISION 0
|
||||||
|
|
||||||
|
#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_VERSION_DISPLAYED))
|
||||||
|
# define GLM_MESSAGE_VERSION_DISPLAYED
|
||||||
|
# pragma message ("GLM: version 0.9.7")
|
||||||
|
#endif//GLM_MESSAGE
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Platform
|
// Platform
|
||||||
|
|
||||||
@ -329,88 +334,132 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// C++ Version
|
// C++ Version
|
||||||
|
|
||||||
// User defines: GLM_FORCE_CXX98
|
// User defines: GLM_FORCE_CXX98, GLM_FORCE_CXX03, GLM_FORCE_CXX11, GLM_FORCE_CXX14
|
||||||
|
|
||||||
#define GLM_LANG_CXX98_FLAG (1 << 1)
|
#define GLM_LANG_CXX98_FLAG (1 << 1)
|
||||||
#define GLM_LANG_CXX03_FLAG (1 << 2)
|
#define GLM_LANG_CXX03_FLAG (1 << 2)
|
||||||
#define GLM_LANG_CXX0X_FLAG (1 << 3)
|
#define GLM_LANG_CXX0X_FLAG (1 << 3)
|
||||||
#define GLM_LANG_CXX11_FLAG (1 << 4)
|
#define GLM_LANG_CXX11_FLAG (1 << 4)
|
||||||
#define GLM_LANG_CXX1Y_FLAG (1 << 5)
|
#define GLM_LANG_CXX1Y_FLAG (1 << 5)
|
||||||
#define GLM_LANG_CXXMS_FLAG (1 << 6)
|
#define GLM_LANG_CXX14_FLAG (1 << 6)
|
||||||
#define GLM_LANG_CXXGNU_FLAG (1 << 7)
|
#define GLM_LANG_CXX1Z_FLAG (1 << 7)
|
||||||
|
#define GLM_LANG_CXXMS_FLAG (1 << 8)
|
||||||
|
#define GLM_LANG_CXXGNU_FLAG (1 << 9)
|
||||||
|
|
||||||
#define GLM_LANG_CXX98 GLM_LANG_CXX98_FLAG
|
#define GLM_LANG_CXX98 GLM_LANG_CXX98_FLAG
|
||||||
#define GLM_LANG_CXX03 (GLM_LANG_CXX98 | GLM_LANG_CXX03_FLAG)
|
#define GLM_LANG_CXX03 (GLM_LANG_CXX98 | GLM_LANG_CXX03_FLAG)
|
||||||
#define GLM_LANG_CXX0X (GLM_LANG_CXX03 | GLM_LANG_CXX0X_FLAG)
|
#define GLM_LANG_CXX0X (GLM_LANG_CXX03 | GLM_LANG_CXX0X_FLAG)
|
||||||
#define GLM_LANG_CXX11 (GLM_LANG_CXX0X | GLM_LANG_CXX11_FLAG)
|
#define GLM_LANG_CXX11 (GLM_LANG_CXX0X | GLM_LANG_CXX11_FLAG)
|
||||||
#define GLM_LANG_CXX1Y (GLM_LANG_CXX11 | GLM_LANG_CXX1Y_FLAG)
|
#define GLM_LANG_CXX1Y (GLM_LANG_CXX11 | GLM_LANG_CXX1Y_FLAG)
|
||||||
|
#define GLM_LANG_CXX14 (GLM_LANG_CXX1Y | GLM_LANG_CXX14_FLAG)
|
||||||
|
#define GLM_LANG_CXX1Z (GLM_LANG_CXX14 | GLM_LANG_CXX1Z_FLAG)
|
||||||
#define GLM_LANG_CXXMS GLM_LANG_CXXMS_FLAG
|
#define GLM_LANG_CXXMS GLM_LANG_CXXMS_FLAG
|
||||||
#define GLM_LANG_CXXGNU GLM_LANG_CXXGNU_FLAG
|
#define GLM_LANG_CXXGNU GLM_LANG_CXXGNU_FLAG
|
||||||
|
|
||||||
#if defined(GLM_FORCE_CXX1Y)
|
#if defined(GLM_FORCE_CXX14)
|
||||||
# define GLM_LANG GLM_LANG_CXX1Y
|
# undef GLM_FORCE_CXX11
|
||||||
|
# undef GLM_FORCE_CXX03
|
||||||
|
# undef GLM_FORCE_CXX98
|
||||||
|
# define GLM_LANG GLM_LANG_CXX14
|
||||||
#elif defined(GLM_FORCE_CXX11)
|
#elif defined(GLM_FORCE_CXX11)
|
||||||
|
# undef GLM_FORCE_CXX03
|
||||||
|
# undef GLM_FORCE_CXX98
|
||||||
# define GLM_LANG GLM_LANG_CXX11
|
# define GLM_LANG GLM_LANG_CXX11
|
||||||
#elif defined(GLM_FORCE_CXX03)
|
#elif defined(GLM_FORCE_CXX03)
|
||||||
|
# undef GLM_FORCE_CXX98
|
||||||
# define GLM_LANG GLM_LANG_CXX03
|
# define GLM_LANG GLM_LANG_CXX03
|
||||||
#elif defined(GLM_FORCE_CXX98)
|
#elif defined(GLM_FORCE_CXX98)
|
||||||
# define GLM_LANG GLM_LANG_CXX98
|
# define GLM_LANG GLM_LANG_CXX98
|
||||||
#else
|
#else
|
||||||
# if __cplusplus >= 201103L
|
# if GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM)
|
||||||
# define GLM_LANG GLM_LANG_CXX11
|
# if __cplusplus >= 201402L // GLM_COMPILER_LLVM34 + -std=c++14
|
||||||
# elif GLM_COMPILER & GLM_COMPILER_CLANG
|
# define GLM_LANG GLM_LANG_CXX14
|
||||||
# if(GLM_PLATFORM == GLM_PLATFORM_APPLE)
|
# elif __has_feature(cxx_decltype_auto) && __has_feature(cxx_aggregate_nsdmi) // GLM_COMPILER_LLVM33 + -std=c++1y
|
||||||
# define GLM_DETAIL_MAJOR 1
|
# define GLM_LANG GLM_LANG_CXX1Y
|
||||||
# else
|
# elif __cplusplus >= 201103L // GLM_COMPILER_LLVM33 + -std=c++11
|
||||||
# define GLM_DETAIL_MAJOR 0
|
# define GLM_LANG GLM_LANG_CXX11
|
||||||
# endif
|
# elif __has_feature(cxx_static_assert) // GLM_COMPILER_LLVM29 + -std=c++11
|
||||||
# if __clang_major__ < (2 + GLM_DETAIL_MAJOR)
|
|
||||||
# define GLM_LANG GLM_LANG_CXX
|
|
||||||
# elif __has_feature(cxx_auto_type)
|
|
||||||
# define GLM_LANG GLM_LANG_CXX0X
|
# define GLM_LANG GLM_LANG_CXX0X
|
||||||
# else
|
# elif __cplusplus >= 199711L
|
||||||
# define GLM_LANG GLM_LANG_CXX98
|
# define GLM_LANG GLM_LANG_CXX98
|
||||||
|
# else
|
||||||
|
# define GLM_LANG GLM_LANG_CXX
|
||||||
# endif
|
# endif
|
||||||
# elif GLM_COMPILER & GLM_COMPILER_GCC
|
# elif GLM_COMPILER & GLM_COMPILER_GCC
|
||||||
# ifdef __GXX_EXPERIMENTAL_CXX0X__
|
# if __cplusplus >= 201402L
|
||||||
|
# define GLM_LANG GLM_LANG_CXX14
|
||||||
|
# elif __cplusplus >= 201103L
|
||||||
|
# define GLM_LANG GLM_LANG_CXX11
|
||||||
|
# elif defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||||
# define GLM_LANG GLM_LANG_CXX0X
|
# define GLM_LANG GLM_LANG_CXX0X
|
||||||
# else
|
# else
|
||||||
# define GLM_LANG GLM_LANG_CXX98
|
# define GLM_LANG GLM_LANG_CXX98
|
||||||
# endif
|
# endif
|
||||||
# elif GLM_COMPILER & GLM_COMPILER_VC
|
# elif GLM_COMPILER & GLM_COMPILER_VC
|
||||||
# ifdef _MSC_EXTENSIONS
|
# ifdef _MSC_EXTENSIONS
|
||||||
# if GLM_COMPILER >= GLM_COMPILER_VC2010
|
# if __cplusplus >= 201402L
|
||||||
|
# define GLM_LANG (GLM_LANG_CXX14 | GLM_LANG_CXXMS_FLAG)
|
||||||
|
//# elif GLM_COMPILER >= GLM_COMPILER_VC2015
|
||||||
|
//# define GLM_LANG (GLM_LANG_CXX1Y | GLM_LANG_CXXMS_FLAG)
|
||||||
|
# elif __cplusplus >= 201103L
|
||||||
|
# define GLM_LANG (GLM_LANG_CXX11 | GLM_LANG_CXXMS_FLAG)
|
||||||
|
# elif GLM_COMPILER >= GLM_COMPILER_VC2010
|
||||||
# define GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG)
|
# define GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG)
|
||||||
# else
|
# elif __cplusplus >= 199711L
|
||||||
# define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG)
|
# define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG)
|
||||||
|
# else
|
||||||
|
# define GLM_LANG (GLM_LANG_CXX | GLM_LANG_CXXMS_FLAG)
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
# if GLM_COMPILER >= GLM_COMPILER_VC2010
|
# 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
|
||||||
# define GLM_LANG GLM_LANG_CXX0X
|
# define GLM_LANG GLM_LANG_CXX0X
|
||||||
# else
|
# elif __cplusplus >= 199711L
|
||||||
# define GLM_LANG GLM_LANG_CXX98
|
# define GLM_LANG GLM_LANG_CXX98
|
||||||
|
# else
|
||||||
|
# define GLM_LANG GLM_LANG_CXX
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# elif GLM_COMPILER & GLM_COMPILER_INTEL
|
# elif GLM_COMPILER & GLM_COMPILER_INTEL
|
||||||
# ifdef _MSC_EXTENSIONS
|
# ifdef _MSC_EXTENSIONS
|
||||||
# if GLM_COMPILER >= GLM_COMPILER_INTEL13
|
# if __cplusplus >= 201402L
|
||||||
|
# define GLM_LANG (GLM_LANG_CXX14 | GLM_LANG_CXXMS_FLAG)
|
||||||
|
# elif __cplusplus >= 201103L
|
||||||
|
# define GLM_LANG (GLM_LANG_CXX11 | GLM_LANG_CXXMS_FLAG)
|
||||||
|
# elif GLM_COMPILER >= GLM_COMPILER_INTEL13
|
||||||
# define GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG)
|
# define GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG)
|
||||||
# else
|
# elif __cplusplus >= 199711L
|
||||||
# define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG)
|
# define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG)
|
||||||
|
# else
|
||||||
|
# define GLM_LANG (GLM_LANG_CXX | GLM_LANG_CXXMS_FLAG)
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else
|
||||||
# if GLM_COMPILER >= GLM_COMPILER_INTEL13
|
# if __cplusplus >= 201402L
|
||||||
# define GLM_LANG (GLM_LANG_CXX0X)
|
# define GLM_LANG (GLM_LANG_CXX14 | GLM_LANG_CXXMS_FLAG)
|
||||||
|
# elif __cplusplus >= 201103L
|
||||||
|
# define GLM_LANG (GLM_LANG_CXX11 | GLM_LANG_CXXMS_FLAG)
|
||||||
|
# elif GLM_COMPILER >= GLM_COMPILER_INTEL13
|
||||||
|
# define GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG)
|
||||||
|
# elif __cplusplus >= 199711L
|
||||||
|
# define GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG)
|
||||||
# else
|
# else
|
||||||
# define GLM_LANG (GLM_LANG_CXX98)
|
# define GLM_LANG (GLM_LANG_CXX | GLM_LANG_CXXMS_FLAG)
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# else
|
# else // Unkown compiler
|
||||||
# if __cplusplus >= 199711L
|
# if __cplusplus >= 201402L
|
||||||
|
# define GLM_LANG GLM_LANG_CXX14
|
||||||
|
# elif __cplusplus >= 201103L
|
||||||
|
# define GLM_LANG GLM_LANG_CXX11
|
||||||
|
# elif __cplusplus >= 199711L
|
||||||
# define GLM_LANG GLM_LANG_CXX98
|
# define GLM_LANG GLM_LANG_CXX98
|
||||||
# endif
|
# else
|
||||||
# ifndef GLM_FORCE_CXX98
|
# define GLM_LANG GLM_LANG_CXX // Good luck with that!
|
||||||
# define GLM_FORCE_CXX98
|
|
||||||
# endif
|
# endif
|
||||||
# ifndef GLM_FORCE_PURE
|
# ifndef GLM_FORCE_PURE
|
||||||
# define GLM_FORCE_PURE
|
# define GLM_FORCE_PURE
|
||||||
@ -420,122 +469,188 @@
|
|||||||
|
|
||||||
#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_LANG_DISPLAYED)
|
#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_LANG_DISPLAYED)
|
||||||
# define GLM_MESSAGE_LANG_DISPLAYED
|
# define GLM_MESSAGE_LANG_DISPLAYED
|
||||||
# if(GLM_LANG & GLM_LANG_CXXGNU_FLAG)
|
|
||||||
# pragma message("GLM: C++ with language extensions")
|
# if GLM_LANG & GLM_LANG_CXX1Z_FLAG
|
||||||
# elif(GLM_LANG & GLM_LANG_CXXMS_FLAG)
|
# pragma message("GLM: C++1z")
|
||||||
# pragma message("GLM: C++ with language extensions")
|
# elif GLM_LANG & GLM_LANG_CXX14_FLAG
|
||||||
# elif(GLM_LANG & GLM_LANG_CXX11_FLAG)
|
# pragma message("GLM: C++14")
|
||||||
|
# elif GLM_LANG & GLM_LANG_CXX1Y_FLAG
|
||||||
|
# pragma message("GLM: C++1y")
|
||||||
|
# elif GLM_LANG & GLM_LANG_CXX11_FLAG
|
||||||
# pragma message("GLM: C++11")
|
# pragma message("GLM: C++11")
|
||||||
# elif(GLM_LANG & GLM_LANG_CXX0X_FLAG)
|
# elif GLM_LANG & GLM_LANG_CXX0X_FLAG
|
||||||
# pragma message("GLM: C++0x")
|
# pragma message("GLM: C++0x")
|
||||||
# elif(GLM_LANG & GLM_LANG_CXX03_FLAG)
|
# elif GLM_LANG & GLM_LANG_CXX03_FLAG
|
||||||
# pragma message("GLM: C++03")
|
# pragma message("GLM: C++03")
|
||||||
# elif(GLM_LANG & GLM_LANG_CXX98_FLAG)
|
# elif GLM_LANG & GLM_LANG_CXX98_FLAG
|
||||||
# pragma message("GLM: C++98")
|
# pragma message("GLM: C++98")
|
||||||
# else
|
# else
|
||||||
# pragma message("GLM: C++ language undetected")
|
# pragma message("GLM: C++ language undetected")
|
||||||
# endif//GLM_MODEL
|
# endif//GLM_LANG
|
||||||
# pragma message("GLM: #define GLM_FORCE_CXX98, GLM_FORCE_CXX03, GLM_LANG_CXX11 or GLM_FORCE_CXX1Y to force using a specific version of the C++ language")
|
|
||||||
|
# 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_MESSAGE
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Has of C++ features
|
// Has of C++ features
|
||||||
|
|
||||||
#ifndef __has_feature
|
|
||||||
# define __has_feature(x) 0 // Compatibility with non-clang compilers.
|
|
||||||
#endif
|
|
||||||
#ifndef __has_extension
|
|
||||||
# define __has_extension __has_feature // Compatibility with pre-3.0 compilers.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// http://clang.llvm.org/cxx_status.html
|
// http://clang.llvm.org/cxx_status.html
|
||||||
// http://gcc.gnu.org/projects/cxx0x.html
|
// http://gcc.gnu.org/projects/cxx0x.html
|
||||||
// http://msdn.microsoft.com/en-us/library/vstudio/hh567368(v=vs.120).aspx
|
// http://msdn.microsoft.com/en-us/library/vstudio/hh567368(v=vs.120).aspx
|
||||||
|
|
||||||
// N1720
|
#if GLM_PLATFORM == GLM_PLATFORM_ANDROID
|
||||||
#define GLM_HAS_CXX11_STL ( \
|
# define GLM_HAS_CXX11_STL 0
|
||||||
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
|
#elif GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_INTEL)
|
||||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2015)))
|
# define GLM_HAS_CXX11_STL __has_include("__config")
|
||||||
|
#else
|
||||||
|
# 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)))
|
||||||
|
#endif
|
||||||
|
|
||||||
// N1720
|
// N1720
|
||||||
#define GLM_HAS_STATIC_ASSERT ( \
|
#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
|
||||||
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
|
# define GLM_HAS_STATIC_ASSERT __has_feature(cxx_static_assert)
|
||||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2010)) || \
|
#elif GLM_LANG & GLM_LANG_CXX11_FLAG
|
||||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \
|
# define GLM_HAS_STATIC_ASSERT 1
|
||||||
__has_feature(cxx_static_assert))
|
#else
|
||||||
|
# define GLM_HAS_STATIC_ASSERT (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
|
||||||
|
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \
|
||||||
|
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2010)))
|
||||||
|
#endif
|
||||||
|
|
||||||
// N1988
|
// N1988
|
||||||
#define GLM_HAS_EXTENDED_INTEGER_TYPE ( \
|
#if GLM_LANG & GLM_LANG_CXX11_FLAG
|
||||||
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
|
# define GLM_HAS_EXTENDED_INTEGER_TYPE 1
|
||||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012)) || \
|
#else
|
||||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \
|
# define GLM_HAS_EXTENDED_INTEGER_TYPE (\
|
||||||
((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_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012)) || \
|
||||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_APPLE_CLANG) && (GLM_COMPILER >= GLM_COMPILER_APPLE_CLANG40)))
|
((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_APPLE_CLANG) && (GLM_COMPILER >= GLM_COMPILER_APPLE_CLANG40)))
|
||||||
|
#endif
|
||||||
|
|
||||||
// N2235
|
// N2235
|
||||||
#define GLM_HAS_CONSTEXPR ( \
|
#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
|
||||||
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
|
# define GLM_HAS_CONSTEXPR __has_feature(cxx_constexpr)
|
||||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)) || \
|
# define GLM_HAS_CONSTEXPR_PARTIAL GLM_HAS_CONSTEXPR
|
||||||
__has_feature(cxx_constexpr))
|
#elif GLM_LANG & GLM_LANG_CXX11_FLAG
|
||||||
|
# define GLM_HAS_CONSTEXPR 1
|
||||||
|
# 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)))
|
||||||
|
# define GLM_HAS_CONSTEXPR_PARTIAL GLM_HAS_CONSTEXPR || ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2015))
|
||||||
|
#endif
|
||||||
|
|
||||||
// N2672
|
// N2672
|
||||||
#define GLM_HAS_INITIALIZER_LISTS ( \
|
#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
|
||||||
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
|
# define GLM_HAS_INITIALIZER_LISTS __has_feature(cxx_generalized_initializers)
|
||||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013))) || \
|
#elif GLM_LANG & GLM_LANG_CXX11_FLAG
|
||||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC44)) || \
|
# define GLM_HAS_INITIALIZER_LISTS 1
|
||||||
__has_feature(cxx_generalized_initializers))
|
#else
|
||||||
|
# define GLM_HAS_INITIALIZER_LISTS (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
|
||||||
|
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC44)) || \
|
||||||
|
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
|
||||||
|
#endif
|
||||||
|
|
||||||
// N2544 Unrestricted unions
|
// N2544 Unrestricted unions
|
||||||
#define GLM_HAS_UNRESTRICTED_UNIONS ( \
|
#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
|
||||||
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
|
# define GLM_HAS_UNRESTRICTED_UNIONS __has_feature(cxx_unrestricted_unions)
|
||||||
(GLM_LANG & GLM_LANG_CXXMS_FLAG) || \
|
#elif GLM_LANG & (GLM_LANG_CXX11_FLAG | GLM_LANG_CXXMS_FLAG)
|
||||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)) || \
|
# define GLM_HAS_UNRESTRICTED_UNIONS 1
|
||||||
__has_feature(cxx_unrestricted_unions))
|
#else
|
||||||
|
# define GLM_HAS_UNRESTRICTED_UNIONS (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
|
||||||
|
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)))
|
||||||
|
#endif
|
||||||
|
|
||||||
// N2346
|
// N2346
|
||||||
#define GLM_HAS_DEFAULTED_FUNCTIONS ( \
|
#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
|
||||||
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
|
# define GLM_HAS_DEFAULTED_FUNCTIONS __has_feature(cxx_defaulted_functions)
|
||||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013))) || \
|
#elif GLM_LANG & GLM_LANG_CXX11_FLAG
|
||||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC44)) || \
|
# define GLM_HAS_DEFAULTED_FUNCTIONS 1
|
||||||
__has_feature(cxx_defaulted_functions))
|
#else
|
||||||
|
# define GLM_HAS_DEFAULTED_FUNCTIONS (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
|
||||||
|
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC44)) || \
|
||||||
|
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
|
||||||
|
#endif
|
||||||
|
|
||||||
// N2118
|
// N2118
|
||||||
#define GLM_HAS_RVALUE_REFERENCES ( \
|
#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
|
||||||
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
|
# define GLM_HAS_RVALUE_REFERENCES __has_feature(cxx_rvalue_references)
|
||||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012))) || \
|
#elif GLM_LANG & GLM_LANG_CXX11_FLAG
|
||||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \
|
# define GLM_HAS_RVALUE_REFERENCES 1
|
||||||
__has_feature(cxx_rvalue_references))
|
#else
|
||||||
|
# define GLM_HAS_RVALUE_REFERENCES (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
|
||||||
|
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \
|
||||||
|
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012)))
|
||||||
|
#endif
|
||||||
|
|
||||||
#define GLM_HAS_STL_ARRAY ( \
|
// N2437 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf
|
||||||
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
|
#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
|
||||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2010))) || \
|
# define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS __has_feature(cxx_explicit_conversions)
|
||||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)))
|
#elif GLM_LANG & GLM_LANG_CXX11_FLAG
|
||||||
|
# define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS 1
|
||||||
|
#else
|
||||||
|
# define GLM_HAS_EXPLICIT_CONVERSION_OPERATORS (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
|
||||||
|
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC45)) || \
|
||||||
|
((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL14)) || \
|
||||||
|
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
|
||||||
|
#endif
|
||||||
|
|
||||||
#define GLM_HAS_TEMPLATE_ALIASES ( \
|
// N2258 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf
|
||||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013))) || \
|
#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
|
||||||
__has_feature(cxx_alias_templates))
|
# define GLM_HAS_TEMPLATE_ALIASES __has_feature(cxx_alias_templates)
|
||||||
|
#elif GLM_LANG & GLM_LANG_CXX11_FLAG
|
||||||
|
# define GLM_HAS_TEMPLATE_ALIASES 1
|
||||||
|
#else
|
||||||
|
# define GLM_HAS_TEMPLATE_ALIASES (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
|
||||||
|
((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL12_1)) || \
|
||||||
|
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC47)) || \
|
||||||
|
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
|
||||||
|
#endif
|
||||||
|
|
||||||
#define GLM_HAS_RANGE_FOR ( \
|
// N2930 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2930.html
|
||||||
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
|
#if GLM_COMPILER & (GLM_COMPILER_LLVM | GLM_COMPILER_APPLE_CLANG)
|
||||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012))) || \
|
# define GLM_HAS_RANGE_FOR __has_feature(cxx_range_for)
|
||||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)) || \
|
#elif GLM_LANG & GLM_LANG_CXX11_FLAG
|
||||||
__has_feature(cxx_range_for))
|
# define GLM_HAS_RANGE_FOR 1
|
||||||
|
#else
|
||||||
|
# define GLM_HAS_RANGE_FOR (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
|
||||||
|
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)) || \
|
||||||
|
((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_COMPILER >= GLM_COMPILER_INTEL13)) || \
|
||||||
|
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2012)))
|
||||||
|
#endif
|
||||||
|
|
||||||
#define GLM_HAS_ASSIGNABLE ( \
|
//
|
||||||
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
|
#if GLM_LANG & GLM_LANG_CXX11_FLAG
|
||||||
((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC49)))
|
# define GLM_HAS_ASSIGNABLE 1
|
||||||
|
#else
|
||||||
|
# define GLM_HAS_ASSIGNABLE (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
|
||||||
|
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC49)))
|
||||||
|
#endif
|
||||||
|
|
||||||
#define GLM_HAS_TRIVIAL_QUERIES ( \
|
//
|
||||||
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
|
#define GLM_HAS_TRIVIAL_QUERIES 0//( \
|
||||||
|
//((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
|
||||||
|
|
||||||
#define GLM_HAS_MAKE_SIGNED ( \
|
//
|
||||||
(GLM_LANG & GLM_LANG_CXX11_FLAG) || \
|
#if GLM_LANG & GLM_LANG_CXX11_FLAG
|
||||||
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
|
# define GLM_HAS_MAKE_SIGNED 1
|
||||||
|
#else
|
||||||
|
# define GLM_HAS_MAKE_SIGNED (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
|
||||||
|
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
|
||||||
|
#endif
|
||||||
|
|
||||||
#define GLM_HAS_BITSCAN_WINDOWS ( \
|
//
|
||||||
(GLM_ARCH != GLM_ARCH_PURE) && \
|
#if GLM_ARCH == GLM_ARCH_PURE
|
||||||
(GLM_PLATFORM & GLM_PLATFORM_WINDOWS) && \
|
# define GLM_HAS_BITSCAN_WINDOWS 0
|
||||||
(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_LLVM | GLM_COMPILER_INTEL)))
|
#else
|
||||||
|
# define GLM_HAS_BITSCAN_WINDOWS (GLM_PLATFORM & GLM_PLATFORM_WINDOWS) && (\
|
||||||
|
(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_LLVM | GLM_COMPILER_INTEL))
|
||||||
|
#endif
|
||||||
|
|
||||||
// OpenMP
|
// OpenMP
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
@ -565,12 +680,13 @@
|
|||||||
// User defines: GLM_FORCE_PURE GLM_FORCE_SSE2 GLM_FORCE_SSE3 GLM_FORCE_AVX GLM_FORCE_AVX2
|
// User defines: GLM_FORCE_PURE GLM_FORCE_SSE2 GLM_FORCE_SSE3 GLM_FORCE_AVX GLM_FORCE_AVX2
|
||||||
|
|
||||||
#define GLM_ARCH_PURE 0x0000
|
#define GLM_ARCH_PURE 0x0000
|
||||||
#define GLM_ARCH_X86 0x0001
|
#define GLM_ARCH_ARM 0x0001
|
||||||
#define GLM_ARCH_SSE2 0x0002
|
#define GLM_ARCH_X86 0x0002
|
||||||
#define GLM_ARCH_SSE3 0x0004
|
#define GLM_ARCH_SSE2 0x0004
|
||||||
#define GLM_ARCH_SSE4 0x0008
|
#define GLM_ARCH_SSE3 0x0008
|
||||||
#define GLM_ARCH_AVX 0x0010
|
#define GLM_ARCH_SSE4 0x0010
|
||||||
#define GLM_ARCH_AVX2 0x0020
|
#define GLM_ARCH_AVX 0x0020
|
||||||
|
#define GLM_ARCH_AVX2 0x0040
|
||||||
|
|
||||||
#if defined(GLM_FORCE_PURE)
|
#if defined(GLM_FORCE_PURE)
|
||||||
# define GLM_ARCH GLM_ARCH_PURE
|
# define GLM_ARCH GLM_ARCH_PURE
|
||||||
@ -597,7 +713,9 @@
|
|||||||
# define GLM_ARCH GLM_ARCH_PURE
|
# define GLM_ARCH GLM_ARCH_PURE
|
||||||
# endif
|
# endif
|
||||||
#elif (GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS))
|
#elif (GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS))
|
||||||
# if defined(__AVX2__)
|
# 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)
|
# define GLM_ARCH (GLM_ARCH_AVX2 | GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
|
||||||
# elif defined(__AVX__)
|
# elif defined(__AVX__)
|
||||||
# define GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
|
# define GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
|
||||||
@ -627,7 +745,7 @@
|
|||||||
// With MinGW-W64, including intrinsic headers before intrin.h will produce some errors. The problem is
|
// 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.
|
// 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.
|
// To fix, we just explicitly include intrin.h here.
|
||||||
#if defined(__MINGW32__) && (GLM_ARCH != GLM_ARCH_PURE)
|
#if defined(__MINGW64__) && (GLM_ARCH != GLM_ARCH_PURE)
|
||||||
# include <intrin.h>
|
# include <intrin.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -658,6 +776,8 @@
|
|||||||
# define GLM_MESSAGE_ARCH_DISPLAYED
|
# define GLM_MESSAGE_ARCH_DISPLAYED
|
||||||
# if(GLM_ARCH == GLM_ARCH_PURE)
|
# if(GLM_ARCH == GLM_ARCH_PURE)
|
||||||
# pragma message("GLM: Platform independent code")
|
# pragma message("GLM: Platform independent code")
|
||||||
|
# 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")
|
# pragma message("GLM: AVX2 instruction set")
|
||||||
# elif(GLM_ARCH & GLM_ARCH_AVX)
|
# elif(GLM_ARCH & GLM_ARCH_AVX)
|
||||||
@ -667,7 +787,6 @@
|
|||||||
# elif(GLM_ARCH & GLM_ARCH_SSE2)
|
# elif(GLM_ARCH & GLM_ARCH_SSE2)
|
||||||
# pragma message("GLM: SSE2 instruction set")
|
# pragma message("GLM: SSE2 instruction set")
|
||||||
# endif//GLM_ARCH
|
# endif//GLM_ARCH
|
||||||
# pragma message("GLM: #define GLM_FORCE_PURE to avoid using platform specific instruction sets")
|
|
||||||
#endif//GLM_MESSAGE
|
#endif//GLM_MESSAGE
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
@ -705,12 +824,9 @@
|
|||||||
# if GLM_COMPILER & GLM_COMPILER_VC
|
# if GLM_COMPILER & GLM_COMPILER_VC
|
||||||
# define GLM_INLINE __forceinline
|
# define GLM_INLINE __forceinline
|
||||||
# define GLM_NEVER_INLINE __declspec((noinline))
|
# define GLM_NEVER_INLINE __declspec((noinline))
|
||||||
# elif GLM_COMPILER & GLM_COMPILER_GCC
|
# elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM)
|
||||||
# define GLM_INLINE inline __attribute__((__always_inline__))
|
# define GLM_INLINE inline __attribute__((__always_inline__))
|
||||||
# define GLM_NEVER_INLINE __attribute__((__noinline__))
|
# define GLM_NEVER_INLINE __attribute__((__noinline__))
|
||||||
# elif GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM)
|
|
||||||
# define GLM_INLINE __attribute__((__always_inline__))
|
|
||||||
# define GLM_NEVER_INLINE __attribute__((__noinline__))
|
|
||||||
# else
|
# else
|
||||||
# define GLM_INLINE inline
|
# define GLM_INLINE inline
|
||||||
# define GLM_NEVER_INLINE
|
# define GLM_NEVER_INLINE
|
||||||
@ -777,11 +893,11 @@
|
|||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
using std::size_t;
|
using std::size_t;
|
||||||
#if defined(GLM_FORCE_SIZE_T_LENGTH) || defined(GLM_FORCE_SIZE_FUNC)
|
# if defined(GLM_FORCE_SIZE_T_LENGTH) || defined(GLM_FORCE_SIZE_FUNC)
|
||||||
typedef size_t length_t;
|
typedef size_t length_t;
|
||||||
#else
|
# else
|
||||||
typedef int length_t;
|
typedef int length_t;
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
@ -805,14 +921,38 @@ namespace detail
|
|||||||
|
|
||||||
#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_FORCE_SIZE_T_LENGTH)
|
#if defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_FORCE_SIZE_T_LENGTH)
|
||||||
# define GLM_MESSAGE_FORCE_SIZE_T_LENGTH
|
# define GLM_MESSAGE_FORCE_SIZE_T_LENGTH
|
||||||
# if defined(GLM_FORCE_SIZE_T_LENGTH)
|
# if defined GLM_FORCE_SIZE_FUNC
|
||||||
|
# pragma message("GLM: .length() is replaced by .size() and returns a std::size_t")
|
||||||
|
# elif defined GLM_FORCE_SIZE_T_LENGTH
|
||||||
# pragma message("GLM: .length() returns glm::length_t, a typedef of std::size_t")
|
# pragma message("GLM: .length() returns glm::length_t, a typedef of std::size_t")
|
||||||
# else
|
# else
|
||||||
# pragma message("GLM: .length() returns glm::length_t, a typedef of int following the GLSL specification")
|
# pragma message("GLM: .length() returns glm::length_t, a typedef of int following the GLSL specification")
|
||||||
# pragma message("GLM: #define GLM_FORCE_SIZE_T_LENGTH for .length() to return a size_t")
|
|
||||||
# endif
|
# endif
|
||||||
#endif//GLM_MESSAGE
|
#endif//GLM_MESSAGE
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// countof
|
||||||
|
|
||||||
|
#ifndef __has_feature
|
||||||
|
# define __has_feature(x) 0 // Compatibility with non-clang compilers.
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if GLM_HAS_CONSTEXPR_PARTIAL
|
||||||
|
namespace glm
|
||||||
|
{
|
||||||
|
template <typename T, std::size_t N>
|
||||||
|
constexpr std::size_t countof(T const (&)[N])
|
||||||
|
{
|
||||||
|
return N;
|
||||||
|
}
|
||||||
|
}//namespace glm
|
||||||
|
# define GLM_COUNTOF(arr) glm::countof(arr)
|
||||||
|
#elif _MSC_VER
|
||||||
|
# define GLM_COUNTOF(arr) _countof(arr)
|
||||||
|
#else
|
||||||
|
# define GLM_COUNTOF(arr) sizeof(arr) / sizeof(arr[0])
|
||||||
|
#endif
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Uninitialize constructors
|
// Uninitialize constructors
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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)
|
||||||
///
|
///
|
||||||
/// This half implementation is based on OpenEXR which is Copyright (c) 2002,
|
/// This half implementation is based on OpenEXR which is Copyright (c) 2002,
|
||||||
/// Industrial Light & Magic, a division of Lucas Digital Ltd. LLC
|
/// Industrial Light & Magic, a division of Lucas Digital Ltd. LLC
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -33,7 +33,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "setup.hpp"
|
#include "setup.hpp"
|
||||||
#include <type_traits>
|
#if GLM_HAS_MAKE_SIGNED
|
||||||
|
# include <type_traits>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if GLM_HAS_EXTENDED_INTEGER_TYPE
|
#if GLM_HAS_EXTENDED_INTEGER_TYPE
|
||||||
# include <cstdint>
|
# include <cstdint>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -63,6 +63,7 @@ namespace glm
|
|||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Constructors
|
// Constructors
|
||||||
GLM_FUNC_DECL tmat2x2();
|
GLM_FUNC_DECL tmat2x2();
|
||||||
|
GLM_FUNC_DECL tmat2x2(tmat2x2<T, P> const & m);
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_DECL tmat2x2(tmat2x2<T, Q> const & m);
|
GLM_FUNC_DECL tmat2x2(tmat2x2<T, Q> const & m);
|
||||||
|
|
||||||
@ -127,6 +128,8 @@ namespace glm
|
|||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary arithmetic operators
|
// Unary arithmetic operators
|
||||||
|
|
||||||
|
GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<T, P> const & v);
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<U, P> const & m);
|
GLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<U, P> const & m);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -62,6 +62,13 @@ namespace detail
|
|||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat2x2<T, P> const & m)
|
||||||
|
{
|
||||||
|
this->value[0] = m.value[0];
|
||||||
|
this->value[1] = m.value[1];
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat2x2<T, Q> const & m)
|
GLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(tmat2x2<T, Q> const & m)
|
||||||
@ -236,6 +243,14 @@ namespace detail
|
|||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
// Unary updatable operators
|
// Unary updatable operators
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator=(tmat2x2<T, P> const & m)
|
||||||
|
{
|
||||||
|
this->value[0] = m[0];
|
||||||
|
this->value[1] = m[1];
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator=(tmat2x2<U, P> const & m)
|
GLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator=(tmat2x2<U, P> const & m)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -58,6 +58,7 @@ namespace glm
|
|||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
GLM_FUNC_DECL tmat2x3();
|
GLM_FUNC_DECL tmat2x3();
|
||||||
|
GLM_FUNC_DECL tmat2x3(tmat2x3<T, P> const & m);
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_DECL tmat2x3(tmat2x3<T, Q> const & m);
|
GLM_FUNC_DECL tmat2x3(tmat2x3<T, Q> const & m);
|
||||||
|
|
||||||
@ -123,20 +124,22 @@ namespace glm
|
|||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary arithmetic operators
|
// Unary arithmetic operators
|
||||||
|
|
||||||
|
GLM_FUNC_DECL tmat2x3<T, P> & operator=(tmat2x3<T, P> const & m);
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat2x3<T, P> & operator= (tmat2x3<U, P> const & m);
|
GLM_FUNC_DECL tmat2x3<T, P> & operator=(tmat2x3<U, P> const & m);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat2x3<T, P> & operator+= (U s);
|
GLM_FUNC_DECL tmat2x3<T, P> & operator+=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat2x3<T, P> & operator+= (tmat2x3<U, P> const & m);
|
GLM_FUNC_DECL tmat2x3<T, P> & operator+=(tmat2x3<U, P> const & m);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat2x3<T, P> & operator-= (U s);
|
GLM_FUNC_DECL tmat2x3<T, P> & operator-=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat2x3<T, P> & operator-= (tmat2x3<U, P> const & m);
|
GLM_FUNC_DECL tmat2x3<T, P> & operator-=(tmat2x3<U, P> const & m);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat2x3<T, P> & operator*= (U s);
|
GLM_FUNC_DECL tmat2x3<T, P> & operator*=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat2x3<T, P> & operator/= (U s);
|
GLM_FUNC_DECL tmat2x3<T, P> & operator/=(U s);
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Increment and decrement operators
|
// Increment and decrement operators
|
||||||
@ -150,74 +153,47 @@ namespace glm
|
|||||||
// Binary operators
|
// Binary operators
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x3<T, P> operator+ (
|
GLM_FUNC_DECL tmat2x3<T, P> operator+(tmat2x3<T, P> const & m, T const & s);
|
||||||
tmat2x3<T, P> const & m,
|
|
||||||
T const & s);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x3<T, P> operator+ (
|
GLM_FUNC_DECL tmat2x3<T, P> operator+(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2);
|
||||||
tmat2x3<T, P> const & m1,
|
|
||||||
tmat2x3<T, P> const & m2);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x3<T, P> operator- (
|
GLM_FUNC_DECL tmat2x3<T, P> operator-(tmat2x3<T, P> const & m, T const & s);
|
||||||
tmat2x3<T, P> const & m,
|
|
||||||
T const & s);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x3<T, P> operator- (
|
GLM_FUNC_DECL tmat2x3<T, P> operator-(tmat2x3<T, P> const & m1, tmat2x3<T, P> const & m2);
|
||||||
tmat2x3<T, P> const & m1,
|
|
||||||
tmat2x3<T, P> const & m2);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x3<T, P> operator* (
|
GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat2x3<T, P> const & m, T const & s);
|
||||||
tmat2x3<T, P> const & m,
|
|
||||||
T const & s);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x3<T, P> operator* (
|
GLM_FUNC_DECL tmat2x3<T, P> operator*(T const & s, tmat2x3<T, P> const & m);
|
||||||
T const & s,
|
|
||||||
tmat2x3<T, P> const & m);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL typename tmat2x3<T, P>::col_type operator* (
|
GLM_FUNC_DECL typename tmat2x3<T, P>::col_type operator*(tmat2x3<T, P> const & m, typename tmat2x3<T, P>::row_type const & v);
|
||||||
tmat2x3<T, P> const & m,
|
|
||||||
typename tmat2x3<T, P>::row_type const & v);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL typename tmat2x3<T, P>::row_type operator* (
|
GLM_FUNC_DECL typename tmat2x3<T, P>::row_type operator*(typename tmat2x3<T, P>::col_type const & v, tmat2x3<T, P> const & m);
|
||||||
typename tmat2x3<T, P>::col_type const & v,
|
|
||||||
tmat2x3<T, P> const & m);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x3<T, P> operator* (
|
GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat2x2<T, P> const & m2);
|
||||||
tmat2x3<T, P> const & m1,
|
|
||||||
tmat2x2<T, P> const & m2);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> operator* (
|
GLM_FUNC_DECL tmat3x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat3x2<T, P> const & m2);
|
||||||
tmat2x3<T, P> const & m1,
|
|
||||||
tmat3x2<T, P> const & m2);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat4x3<T, P> operator* (
|
GLM_FUNC_DECL tmat4x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat4x2<T, P> const & m2);
|
||||||
tmat2x3<T, P> const & m1,
|
|
||||||
tmat4x2<T, P> const & m2);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x3<T, P> operator/ (
|
GLM_FUNC_DECL tmat2x3<T, P> operator/(tmat2x3<T, P> const & m, T const & s);
|
||||||
tmat2x3<T, P> const & m,
|
|
||||||
T const & s);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x3<T, P> operator/ (
|
GLM_FUNC_DECL tmat2x3<T, P> operator/(T const & s, tmat2x3<T, P> const & m);
|
||||||
T const & s,
|
|
||||||
tmat2x3<T, P> const & m);
|
|
||||||
|
|
||||||
// Unary constant operators
|
// Unary constant operators
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x3<T, P> const operator- (
|
GLM_FUNC_DECL tmat2x3<T, P> const operator-(tmat2x3<T, P> const & m);
|
||||||
tmat2x3<T, P> const & m);
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -44,6 +44,13 @@ namespace glm
|
|||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat2x3<T, P> const & m)
|
||||||
|
{
|
||||||
|
this->value[0] = m.value[0];
|
||||||
|
this->value[1] = m.value[1];
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat2x3<T, Q> const & m)
|
GLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(tmat2x3<T, Q> const & m)
|
||||||
@ -220,6 +227,14 @@ namespace glm
|
|||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
// Unary updatable operators
|
// Unary updatable operators
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator=(tmat2x3<T, P> const & m)
|
||||||
|
{
|
||||||
|
this->value[0] = m[0];
|
||||||
|
this->value[1] = m[1];
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator=(tmat2x3<U, P> const & m)
|
GLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator=(tmat2x3<U, P> const & m)
|
||||||
@ -432,7 +447,7 @@ namespace glm
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tmat4x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat3x2<T, P> const & m2)
|
GLM_FUNC_QUALIFIER tmat4x3<T, P> operator*(tmat2x3<T, P> const & m1, tmat4x2<T, P> const & m2)
|
||||||
{
|
{
|
||||||
return tmat4x3<T, P>(
|
return tmat4x3<T, P>(
|
||||||
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
|
m1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -58,6 +58,7 @@ namespace glm
|
|||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
GLM_FUNC_DECL tmat2x4();
|
GLM_FUNC_DECL tmat2x4();
|
||||||
|
GLM_FUNC_DECL tmat2x4(tmat2x4<T, P> const & m);
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_DECL tmat2x4(tmat2x4<T, Q> const & m);
|
GLM_FUNC_DECL tmat2x4(tmat2x4<T, Q> const & m);
|
||||||
|
|
||||||
@ -124,20 +125,22 @@ namespace glm
|
|||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary arithmetic operators
|
// Unary arithmetic operators
|
||||||
|
|
||||||
|
GLM_FUNC_DECL tmat2x4<T, P> & operator=(tmat2x4<T, P> const & m);
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat2x4<T, P>& operator= (tmat2x4<U, P> const & m);
|
GLM_FUNC_DECL tmat2x4<T, P> & operator=(tmat2x4<U, P> const & m);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat2x4<T, P>& operator+= (U s);
|
GLM_FUNC_DECL tmat2x4<T, P> & operator+=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat2x4<T, P>& operator+= (tmat2x4<U, P> const & m);
|
GLM_FUNC_DECL tmat2x4<T, P> & operator+=(tmat2x4<U, P> const & m);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat2x4<T, P>& operator-= (U s);
|
GLM_FUNC_DECL tmat2x4<T, P> & operator-=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat2x4<T, P>& operator-= (tmat2x4<U, P> const & m);
|
GLM_FUNC_DECL tmat2x4<T, P> & operator-=(tmat2x4<U, P> const & m);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat2x4<T, P>& operator*= (U s);
|
GLM_FUNC_DECL tmat2x4<T, P> & operator*=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat2x4<T, P>& operator/= (U s);
|
GLM_FUNC_DECL tmat2x4<T, P> & operator/=(U s);
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Increment and decrement operators
|
// Increment and decrement operators
|
||||||
@ -151,74 +154,47 @@ namespace glm
|
|||||||
// Binary operators
|
// Binary operators
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x4<T, P> operator+ (
|
GLM_FUNC_DECL tmat2x4<T, P> operator+(tmat2x4<T, P> const & m, T const & s);
|
||||||
tmat2x4<T, P> const & m,
|
|
||||||
T const & s);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x4<T, P> operator+ (
|
GLM_FUNC_DECL tmat2x4<T, P> operator+(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2);
|
||||||
tmat2x4<T, P> const & m1,
|
|
||||||
tmat2x4<T, P> const & m2);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x4<T, P> operator- (
|
GLM_FUNC_DECL tmat2x4<T, P> operator-(tmat2x4<T, P> const & m, T const & s);
|
||||||
tmat2x4<T, P> const & m,
|
|
||||||
T const & s);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x4<T, P> operator- (
|
GLM_FUNC_DECL tmat2x4<T, P> operator-(tmat2x4<T, P> const & m1, tmat2x4<T, P> const & m2);
|
||||||
tmat2x4<T, P> const & m1,
|
|
||||||
tmat2x4<T, P> const & m2);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x4<T, P> operator* (
|
GLM_FUNC_DECL tmat2x4<T, P> operator*(tmat2x4<T, P> const & m, T const & s);
|
||||||
tmat2x4<T, P> const & m,
|
|
||||||
T const & s);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x4<T, P> operator* (
|
GLM_FUNC_DECL tmat2x4<T, P> operator*(T const & s, tmat2x4<T, P> const & m);
|
||||||
T const & s,
|
|
||||||
tmat2x4<T, P> const & m);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL typename tmat2x4<T, P>::col_type operator* (
|
GLM_FUNC_DECL typename tmat2x4<T, P>::col_type operator*(tmat2x4<T, P> const & m, typename tmat2x4<T, P>::row_type const & v);
|
||||||
tmat2x4<T, P> const & m,
|
|
||||||
typename tmat2x4<T, P>::row_type const & v);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL typename tmat2x4<T, P>::row_type operator* (
|
GLM_FUNC_DECL typename tmat2x4<T, P>::row_type operator*(typename tmat2x4<T, P>::col_type const & v, tmat2x4<T, P> const & m);
|
||||||
typename tmat2x4<T, P>::col_type const & v,
|
|
||||||
tmat2x4<T, P> const & m);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat4x4<T, P> operator* (
|
GLM_FUNC_DECL tmat4x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat4x2<T, P> const & m2);
|
||||||
tmat2x4<T, P> const & m1,
|
|
||||||
tmat4x2<T, P> const & m2);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x4<T, P> operator* (
|
GLM_FUNC_DECL tmat2x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat2x2<T, P> const & m2);
|
||||||
tmat2x4<T, P> const & m1,
|
|
||||||
tmat2x2<T, P> const & m2);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
|
||||||
GLM_FUNC_DECL tmat3x4<T, P> operator* (
|
|
||||||
tmat2x4<T, P> const & m1,
|
|
||||||
tmat3x2<T, P> const & m2);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x4<T, P> operator/ (
|
GLM_FUNC_DECL tmat3x4<T, P> operator*(tmat2x4<T, P> const & m1, tmat3x2<T, P> const & m2);
|
||||||
tmat2x4<T, P> const & m,
|
|
||||||
T s);
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_DECL tmat2x4<T, P> operator/(tmat2x4<T, P> const & m, T s);
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x4<T, P> operator/ (
|
GLM_FUNC_DECL tmat2x4<T, P> operator/(T s, tmat2x4<T, P> const & m);
|
||||||
T s,
|
|
||||||
tmat2x4<T, P> const & m);
|
|
||||||
|
|
||||||
// Unary constant operators
|
// Unary constant operators
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x4<T, P> const operator- (
|
GLM_FUNC_DECL tmat2x4<T, P> const operator-(tmat2x4<T, P> const & m);
|
||||||
tmat2x4<T, P> const & m);
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -44,6 +44,13 @@ namespace glm
|
|||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat2x4<T, P> const & m)
|
||||||
|
{
|
||||||
|
this->value[0] = m.value[0];
|
||||||
|
this->value[1] = m.value[1];
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat2x4<T, Q> const & m)
|
GLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(tmat2x4<T, Q> const & m)
|
||||||
@ -221,6 +228,14 @@ namespace glm
|
|||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
// Unary updatable operators
|
// Unary updatable operators
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator=(tmat2x4<T, P> const & m)
|
||||||
|
{
|
||||||
|
this->value[0] = m[0];
|
||||||
|
this->value[1] = m[1];
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator=(tmat2x4<U, P> const & m)
|
GLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator=(tmat2x4<U, P> const & m)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -58,6 +58,7 @@ namespace glm
|
|||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
GLM_FUNC_DECL tmat3x2();
|
GLM_FUNC_DECL tmat3x2();
|
||||||
|
GLM_FUNC_DECL tmat3x2(tmat3x2<T, P> const & m);
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_DECL tmat3x2(tmat3x2<T, Q> const & m);
|
GLM_FUNC_DECL tmat3x2(tmat3x2<T, Q> const & m);
|
||||||
|
|
||||||
@ -130,20 +131,22 @@ namespace glm
|
|||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary arithmetic operators
|
// Unary arithmetic operators
|
||||||
|
|
||||||
|
GLM_FUNC_DECL tmat3x2<T, P> & operator=(tmat3x2<T, P> const & m);
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat3x2<T, P> & operator= (tmat3x2<U, P> const & m);
|
GLM_FUNC_DECL tmat3x2<T, P> & operator=(tmat3x2<U, P> const & m);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat3x2<T, P> & operator+= (U s);
|
GLM_FUNC_DECL tmat3x2<T, P> & operator+=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat3x2<T, P> & operator+= (tmat3x2<U, P> const & m);
|
GLM_FUNC_DECL tmat3x2<T, P> & operator+=(tmat3x2<U, P> const & m);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat3x2<T, P> & operator-= (U s);
|
GLM_FUNC_DECL tmat3x2<T, P> & operator-=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat3x2<T, P> & operator-= (tmat3x2<U, P> const & m);
|
GLM_FUNC_DECL tmat3x2<T, P> & operator-=(tmat3x2<U, P> const & m);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat3x2<T, P> & operator*= (U s);
|
GLM_FUNC_DECL tmat3x2<T, P> & operator*=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat3x2<T, P> & operator/= (U s);
|
GLM_FUNC_DECL tmat3x2<T, P> & operator/=(U s);
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Increment and decrement operators
|
// Increment and decrement operators
|
||||||
@ -156,74 +159,47 @@ namespace glm
|
|||||||
|
|
||||||
// Binary operators
|
// Binary operators
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x2<T, P> operator+ (
|
GLM_FUNC_DECL tmat3x2<T, P> operator+(tmat3x2<T, P> const & m, T const & s);
|
||||||
tmat3x2<T, P> const & m,
|
|
||||||
T const & s);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x2<T, P> operator+ (
|
GLM_FUNC_DECL tmat3x2<T, P> operator+(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2);
|
||||||
tmat3x2<T, P> const & m1,
|
|
||||||
tmat3x2<T, P> const & m2);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x2<T, P> operator- (
|
GLM_FUNC_DECL tmat3x2<T, P> operator-(tmat3x2<T, P> const & m, T const & s);
|
||||||
tmat3x2<T, P> const & m,
|
|
||||||
T const & s);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x2<T, P> operator- (
|
GLM_FUNC_DECL tmat3x2<T, P> operator-(tmat3x2<T, P> const & m1, tmat3x2<T, P> const & m2);
|
||||||
tmat3x2<T, P> const & m1,
|
|
||||||
tmat3x2<T, P> const & m2);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x2<T, P> operator* (
|
GLM_FUNC_DECL tmat3x2<T, P> operator*(tmat3x2<T, P> const & m, T const & s);
|
||||||
tmat3x2<T, P> const & m,
|
|
||||||
T const & s);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x2<T, P> operator* (
|
GLM_FUNC_DECL tmat3x2<T, P> operator*(T const & s, tmat3x2<T, P> const & m);
|
||||||
T const & s,
|
|
||||||
tmat3x2<T, P> const & m);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL typename tmat3x2<T, P>::col_type operator* (
|
GLM_FUNC_DECL typename tmat3x2<T, P>::col_type operator*(tmat3x2<T, P> const & m, typename tmat3x2<T, P>::row_type const & v);
|
||||||
tmat3x2<T, P> const & m,
|
|
||||||
typename tmat3x2<T, P>::row_type const & v);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL typename tmat3x2<T, P>::row_type operator* (
|
GLM_FUNC_DECL typename tmat3x2<T, P>::row_type operator*(typename tmat3x2<T, P>::col_type const & v, tmat3x2<T, P> const & m);
|
||||||
typename tmat3x2<T, P>::col_type const & v,
|
|
||||||
tmat3x2<T, P> const & m);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x2<T, P> operator* (
|
GLM_FUNC_DECL tmat2x2<T, P> operator*(tmat3x2<T, P> const & m1, tmat2x3<T, P> const & m2);
|
||||||
tmat3x2<T, P> const & m1,
|
|
||||||
tmat2x3<T, P> const & m2);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x2<T, P> operator* (
|
GLM_FUNC_DECL tmat3x2<T, P> operator*(tmat3x2<T, P> const & m1, tmat3x3<T, P> const & m2);
|
||||||
tmat3x2<T, P> const & m1,
|
|
||||||
tmat3x3<T, P> const & m2);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat4x2<T, P> operator* (
|
GLM_FUNC_DECL tmat4x2<T, P> operator*(tmat3x2<T, P> const & m1, tmat4x3<T, P> const & m2);
|
||||||
tmat3x2<T, P> const & m1,
|
|
||||||
tmat4x3<T, P> const & m2);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x2<T, P> operator/ (
|
GLM_FUNC_DECL tmat3x2<T, P> operator/(tmat3x2<T, P> const & m, T const & s);
|
||||||
tmat3x2<T, P> const & m,
|
|
||||||
T const & s);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x2<T, P> operator/ (
|
GLM_FUNC_DECL tmat3x2<T, P> operator/(T const & s, tmat3x2<T, P> const & m);
|
||||||
T const & s,
|
|
||||||
tmat3x2<T, P> const & m);
|
|
||||||
|
|
||||||
// Unary constant operators
|
// Unary constant operators
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x2<T, P> const operator-(
|
GLM_FUNC_DECL tmat3x2<T, P> const operator-(tmat3x2<T, P> const & m);
|
||||||
tmat3x2<T, P> const & m);
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -45,6 +45,14 @@ namespace glm
|
|||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat3x2<T, P> const & m)
|
||||||
|
{
|
||||||
|
this->value[0] = m.value[0];
|
||||||
|
this->value[1] = m.value[1];
|
||||||
|
this->value[2] = m.value[2];
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat3x2<T, Q> const & m)
|
GLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(tmat3x2<T, Q> const & m)
|
||||||
@ -249,6 +257,15 @@ namespace glm
|
|||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
// Unary updatable operators
|
// Unary updatable operators
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator=(tmat3x2<T, P> const & m)
|
||||||
|
{
|
||||||
|
this->value[0] = m[0];
|
||||||
|
this->value[1] = m[1];
|
||||||
|
this->value[2] = m[2];
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator=(tmat3x2<U, P> const & m)
|
GLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator=(tmat3x2<U, P> const & m)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -62,6 +62,7 @@ namespace glm
|
|||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
GLM_FUNC_DECL tmat3x3();
|
GLM_FUNC_DECL tmat3x3();
|
||||||
|
GLM_FUNC_DECL tmat3x3(tmat3x3<T, P> const & m);
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_DECL tmat3x3(tmat3x3<T, Q> const & m);
|
GLM_FUNC_DECL tmat3x3(tmat3x3<T, Q> const & m);
|
||||||
|
|
||||||
@ -134,129 +135,94 @@ namespace glm
|
|||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary arithmetic operators
|
// Unary arithmetic operators
|
||||||
|
|
||||||
|
GLM_FUNC_DECL tmat3x3<T, P> & operator=(tmat3x3<T, P> const & m);
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P>& operator= (tmat3x3<U, P> const & m);
|
GLM_FUNC_DECL tmat3x3<T, P> & operator=(tmat3x3<U, P> const & m);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P>& operator+= (U s);
|
GLM_FUNC_DECL tmat3x3<T, P> & operator+=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P>& operator+= (tmat3x3<U, P> const & m);
|
GLM_FUNC_DECL tmat3x3<T, P> & operator+=(tmat3x3<U, P> const & m);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P>& operator-= (U s);
|
GLM_FUNC_DECL tmat3x3<T, P> & operator-=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P>& operator-= (tmat3x3<U, P> const & m);
|
GLM_FUNC_DECL tmat3x3<T, P> & operator-=(tmat3x3<U, P> const & m);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P>& operator*= (U s);
|
GLM_FUNC_DECL tmat3x3<T, P> & operator*=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P>& operator*= (tmat3x3<U, P> const & m);
|
GLM_FUNC_DECL tmat3x3<T, P> & operator*=(tmat3x3<U, P> const & m);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P>& operator/= (U s);
|
GLM_FUNC_DECL tmat3x3<T, P> & operator/=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P>& operator/= (tmat3x3<U, P> const & m);
|
GLM_FUNC_DECL tmat3x3<T, P> & operator/=(tmat3x3<U, P> const & m);
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Increment and decrement operators
|
// Increment and decrement operators
|
||||||
|
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> & operator++ ();
|
GLM_FUNC_DECL tmat3x3<T, P> & operator++();
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> & operator-- ();
|
GLM_FUNC_DECL tmat3x3<T, P> & operator--();
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> operator++(int);
|
GLM_FUNC_DECL tmat3x3<T, P> operator++(int);
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> operator--(int);
|
GLM_FUNC_DECL tmat3x3<T, P> operator--(int);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Binary operators
|
// Binary operators
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> operator+ (
|
GLM_FUNC_DECL tmat3x3<T, P> operator+(tmat3x3<T, P> const & m, T const & s);
|
||||||
tmat3x3<T, P> const & m,
|
|
||||||
T const & s);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> operator+ (
|
GLM_FUNC_DECL tmat3x3<T, P> operator+(T const & s, tmat3x3<T, P> const & m);
|
||||||
T const & s,
|
|
||||||
tmat3x3<T, P> const & m);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> operator+ (
|
GLM_FUNC_DECL tmat3x3<T, P> operator+(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
|
||||||
tmat3x3<T, P> const & m1,
|
|
||||||
tmat3x3<T, P> const & m2);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> operator- (
|
GLM_FUNC_DECL tmat3x3<T, P> operator-(tmat3x3<T, P> const & m, T const & s);
|
||||||
tmat3x3<T, P> const & m,
|
|
||||||
T const & s);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> operator- (
|
GLM_FUNC_DECL tmat3x3<T, P> operator-(T const & s, tmat3x3<T, P> const & m);
|
||||||
T const & s,
|
|
||||||
tmat3x3<T, P> const & m);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> operator- (
|
GLM_FUNC_DECL tmat3x3<T, P> operator-(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
|
||||||
tmat3x3<T, P> const & m1,
|
|
||||||
tmat3x3<T, P> const & m2);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> operator* (
|
GLM_FUNC_DECL tmat3x3<T, P> operator*(tmat3x3<T, P> const & m, T const & s);
|
||||||
tmat3x3<T, P> const & m,
|
|
||||||
T const & s);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> operator* (
|
GLM_FUNC_DECL tmat3x3<T, P> operator*(T const & s, tmat3x3<T, P> const & m);
|
||||||
T const & s,
|
|
||||||
tmat3x3<T, P> const & m);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator* (
|
GLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator*(tmat3x3<T, P> const & m, typename tmat3x3<T, P>::row_type const & v);
|
||||||
tmat3x3<T, P> const & m,
|
|
||||||
typename tmat3x3<T, P>::row_type const & v);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL typename tmat3x3<T, P>::row_type operator* (
|
GLM_FUNC_DECL typename tmat3x3<T, P>::row_type operator*(typename tmat3x3<T, P>::col_type const & v, tmat3x3<T, P> const & m);
|
||||||
typename tmat3x3<T, P>::col_type const & v,
|
|
||||||
tmat3x3<T, P> const & m);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> operator* (
|
GLM_FUNC_DECL tmat3x3<T, P> operator*(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
|
||||||
tmat3x3<T, P> const & m1,
|
|
||||||
tmat3x3<T, P> const & m2);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat2x3<T, P> operator* (
|
GLM_FUNC_DECL tmat2x3<T, P> operator*(tmat3x3<T, P> const & m1, tmat2x3<T, P> const & m2);
|
||||||
tmat3x3<T, P> const & m1,
|
|
||||||
tmat2x3<T, P> const & m2);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat4x3<T, P> operator* (
|
GLM_FUNC_DECL tmat4x3<T, P> operator*(tmat3x3<T, P> const & m1, tmat4x3<T, P> const & m2);
|
||||||
tmat3x3<T, P> const & m1,
|
|
||||||
tmat4x3<T, P> const & m2);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> operator/ (
|
GLM_FUNC_DECL tmat3x3<T, P> operator/(tmat3x3<T, P> const & m, T const & s);
|
||||||
tmat3x3<T, P> const & m,
|
|
||||||
T const & s);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> operator/ (
|
GLM_FUNC_DECL tmat3x3<T, P> operator/(T const & s, tmat3x3<T, P> const & m);
|
||||||
T const & s,
|
|
||||||
tmat3x3<T, P> const & m);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator/ (
|
GLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator/(tmat3x3<T, P> const & m, typename tmat3x3<T, P>::row_type const & v);
|
||||||
tmat3x3<T, P> const & m,
|
|
||||||
typename tmat3x3<T, P>::row_type const & v);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL typename tmat3x3<T, P>::row_type operator/ (
|
GLM_FUNC_DECL typename tmat3x3<T, P>::row_type operator/(typename tmat3x3<T, P>::col_type const & v, tmat3x3<T, P> const & m);
|
||||||
typename tmat3x3<T, P>::col_type const & v,
|
|
||||||
tmat3x3<T, P> const & m);
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> operator/ (
|
GLM_FUNC_DECL tmat3x3<T, P> operator/(tmat3x3<T, P> const & m1, tmat3x3<T, P> const & m2);
|
||||||
tmat3x3<T, P> const & m1,
|
|
||||||
tmat3x3<T, P> const & m2);
|
|
||||||
|
|
||||||
// Unary constant operators
|
// Unary constant operators
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_DECL tmat3x3<T, P> const operator-(
|
GLM_FUNC_DECL tmat3x3<T, P> const operator-(tmat3x3<T, P> const & m);
|
||||||
tmat3x3<T, P> const & m);
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#ifndef GLM_EXTERNAL_TEMPLATE
|
#ifndef GLM_EXTERNAL_TEMPLATE
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -73,6 +73,14 @@ namespace detail
|
|||||||
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(ctor)
|
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(ctor)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat3x3<T, P> const & m)
|
||||||
|
{
|
||||||
|
this->value[0] = m.value[0];
|
||||||
|
this->value[1] = m.value[1];
|
||||||
|
this->value[2] = m.value[2];
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat3x3<T, Q> const & m)
|
GLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(tmat3x3<T, Q> const & m)
|
||||||
@ -273,6 +281,15 @@ namespace detail
|
|||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
// Operators
|
// Operators
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator=(tmat3x3<T, P> const & m)
|
||||||
|
{
|
||||||
|
this->value[0] = m[0];
|
||||||
|
this->value[1] = m[1];
|
||||||
|
this->value[2] = m[2];
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator=(tmat3x3<U, P> const & m)
|
GLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator=(tmat3x3<U, P> const & m)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -58,6 +58,7 @@ namespace glm
|
|||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
GLM_FUNC_DECL tmat3x4();
|
GLM_FUNC_DECL tmat3x4();
|
||||||
|
GLM_FUNC_DECL tmat3x4(tmat3x4<T, P> const & m);
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_DECL tmat3x4(tmat3x4<T, Q> const & m);
|
GLM_FUNC_DECL tmat3x4(tmat3x4<T, Q> const & m);
|
||||||
|
|
||||||
@ -129,6 +130,8 @@ namespace glm
|
|||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary arithmetic operators
|
// Unary arithmetic operators
|
||||||
|
|
||||||
|
GLM_FUNC_DECL tmat3x4<T, P> & operator=(tmat3x4<T, P> const & m);
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat3x4<T, P> & operator=(tmat3x4<U, P> const & m);
|
GLM_FUNC_DECL tmat3x4<T, P> & operator=(tmat3x4<U, P> const & m);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -45,6 +45,14 @@ namespace glm
|
|||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat3x4<T, P> const & m)
|
||||||
|
{
|
||||||
|
this->value[0] = m.value[0];
|
||||||
|
this->value[1] = m.value[1];
|
||||||
|
this->value[2] = m.value[2];
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat3x4<T, Q> const & m)
|
GLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(tmat3x4<T, Q> const & m)
|
||||||
@ -248,6 +256,15 @@ namespace glm
|
|||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
// Unary updatable operators
|
// Unary updatable operators
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator=(tmat3x4<T, P> const & m)
|
||||||
|
{
|
||||||
|
this->value[0] = m[0];
|
||||||
|
this->value[1] = m[1];
|
||||||
|
this->value[2] = m[2];
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator=(tmat3x4<U, P> const & m)
|
GLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator=(tmat3x4<U, P> const & m)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -58,6 +58,7 @@ namespace glm
|
|||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
GLM_FUNC_DECL tmat4x2();
|
GLM_FUNC_DECL tmat4x2();
|
||||||
|
GLM_FUNC_DECL tmat4x2(tmat4x2<T, P> const & m);
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_DECL tmat4x2(tmat4x2<T, Q> const & m);
|
GLM_FUNC_DECL tmat4x2(tmat4x2<T, Q> const & m);
|
||||||
|
|
||||||
@ -135,20 +136,22 @@ namespace glm
|
|||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary arithmetic operators
|
// Unary arithmetic operators
|
||||||
|
|
||||||
|
GLM_FUNC_DECL tmat4x2<T, P> & operator=(tmat4x2<T, P> const & m);
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat4x2<T, P>& operator=(tmat4x2<U, P> const & m);
|
GLM_FUNC_DECL tmat4x2<T, P> & operator=(tmat4x2<U, P> const & m);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat4x2<T, P>& operator+=(U s);
|
GLM_FUNC_DECL tmat4x2<T, P> & operator+=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat4x2<T, P>& operator+=(tmat4x2<U, P> const & m);
|
GLM_FUNC_DECL tmat4x2<T, P> & operator+=(tmat4x2<U, P> const & m);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat4x2<T, P>& operator-=(U s);
|
GLM_FUNC_DECL tmat4x2<T, P> & operator-=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat4x2<T, P>& operator-=(tmat4x2<U, P> const & m);
|
GLM_FUNC_DECL tmat4x2<T, P> & operator-=(tmat4x2<U, P> const & m);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat4x2<T, P>& operator*=(U s);
|
GLM_FUNC_DECL tmat4x2<T, P> & operator*=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat4x2<T, P>& operator/=(U s);
|
GLM_FUNC_DECL tmat4x2<T, P> & operator/=(U s);
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Increment and decrement operators
|
// Increment and decrement operators
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -46,6 +46,15 @@ namespace glm
|
|||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat4x2<T, P> const & m)
|
||||||
|
{
|
||||||
|
this->value[0] = m.value[0];
|
||||||
|
this->value[1] = m.value[1];
|
||||||
|
this->value[2] = m.value[2];
|
||||||
|
this->value[3] = m.value[3];
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat4x2<T, Q> const & m)
|
GLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(tmat4x2<T, Q> const & m)
|
||||||
@ -271,6 +280,16 @@ namespace glm
|
|||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
// Unary updatable operators
|
// Unary updatable operators
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tmat4x2<T, P>& tmat4x2<T, P>::operator=(tmat4x2<T, P> const & m)
|
||||||
|
{
|
||||||
|
this->value[0] = m[0];
|
||||||
|
this->value[1] = m[1];
|
||||||
|
this->value[2] = m[2];
|
||||||
|
this->value[3] = m[3];
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_QUALIFIER tmat4x2<T, P>& tmat4x2<T, P>::operator=(tmat4x2<U, P> const & m)
|
GLM_FUNC_QUALIFIER tmat4x2<T, P>& tmat4x2<T, P>::operator=(tmat4x2<U, P> const & m)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -57,6 +57,7 @@ namespace glm
|
|||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
GLM_FUNC_DECL tmat4x3();
|
GLM_FUNC_DECL tmat4x3();
|
||||||
|
GLM_FUNC_DECL tmat4x3(tmat4x3<T, P> const & m);
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_DECL tmat4x3(tmat4x3<T, Q> const & m);
|
GLM_FUNC_DECL tmat4x3(tmat4x3<T, Q> const & m);
|
||||||
|
|
||||||
@ -134,6 +135,8 @@ namespace glm
|
|||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary arithmetic operators
|
// Unary arithmetic operators
|
||||||
|
|
||||||
|
GLM_FUNC_DECL tmat4x3<T, P> & operator=(tmat4x3<T, P> const & m);
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat4x3<T, P> & operator=(tmat4x3<U, P> const & m);
|
GLM_FUNC_DECL tmat4x3<T, P> & operator=(tmat4x3<U, P> const & m);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -46,6 +46,15 @@ namespace glm
|
|||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat4x3<T, P> const & m)
|
||||||
|
{
|
||||||
|
this->value[0] = m.value[0];
|
||||||
|
this->value[1] = m.value[1];
|
||||||
|
this->value[2] = m.value[2];
|
||||||
|
this->value[3] = m.value[3];
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat4x3<T, Q> const & m)
|
GLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(tmat4x3<T, Q> const & m)
|
||||||
@ -271,6 +280,16 @@ namespace glm
|
|||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
// Unary updatable operators
|
// Unary updatable operators
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tmat4x3<T, P>& tmat4x3<T, P>::operator=(tmat4x3<T, P> const & m)
|
||||||
|
{
|
||||||
|
this->value[0] = m[0];
|
||||||
|
this->value[1] = m[1];
|
||||||
|
this->value[2] = m[2];
|
||||||
|
this->value[3] = m[3];
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_QUALIFIER tmat4x3<T, P>& tmat4x3<T, P>::operator=(tmat4x3<U, P> const & m)
|
GLM_FUNC_QUALIFIER tmat4x3<T, P>& tmat4x3<T, P>::operator=(tmat4x3<U, P> const & m)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -62,6 +62,7 @@ namespace glm
|
|||||||
public:
|
public:
|
||||||
// Constructors
|
// Constructors
|
||||||
GLM_FUNC_DECL tmat4x4();
|
GLM_FUNC_DECL tmat4x4();
|
||||||
|
GLM_FUNC_DECL tmat4x4(tmat4x4<T, P> const & m);
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_DECL tmat4x4(tmat4x4<T, Q> const & m);
|
GLM_FUNC_DECL tmat4x4(tmat4x4<T, Q> const & m);
|
||||||
|
|
||||||
@ -139,6 +140,8 @@ namespace glm
|
|||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary arithmetic operators
|
// Unary arithmetic operators
|
||||||
|
|
||||||
|
GLM_FUNC_DECL tmat4x4<T, P> & operator=(tmat4x4<T, P> const & m);
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tmat4x4<T, P> & operator=(tmat4x4<U, P> const & m);
|
GLM_FUNC_DECL tmat4x4<T, P> & operator=(tmat4x4<U, P> const & m);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -106,6 +106,15 @@ namespace detail
|
|||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat4x4<T, P> const & m)
|
||||||
|
{
|
||||||
|
this->value[0] = m[0];
|
||||||
|
this->value[1] = m[1];
|
||||||
|
this->value[2] = m[2];
|
||||||
|
this->value[3] = m[3];
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat4x4<T, Q> const & m)
|
GLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4(tmat4x4<T, Q> const & m)
|
||||||
@ -357,6 +366,18 @@ namespace detail
|
|||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
// Operators
|
// Operators
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator=(tmat4x4<T, P> const & m)
|
||||||
|
{
|
||||||
|
//memcpy could be faster
|
||||||
|
//memcpy(&this->value, &m.value, 16 * sizeof(valType));
|
||||||
|
this->value[0] = m[0];
|
||||||
|
this->value[1] = m[1];
|
||||||
|
this->value[2] = m[2];
|
||||||
|
this->value[3] = m[3];
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator=(tmat4x4<U, P> const & m)
|
GLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator=(tmat4x4<U, P> const & m)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -108,6 +108,7 @@ namespace glm
|
|||||||
// Implicit basic constructors
|
// Implicit basic constructors
|
||||||
|
|
||||||
GLM_FUNC_DECL tvec1();
|
GLM_FUNC_DECL tvec1();
|
||||||
|
GLM_FUNC_DECL tvec1(tvec1<T, P> const & v);
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_DECL tvec1(tvec1<T, Q> const & v);
|
GLM_FUNC_DECL tvec1(tvec1<T, Q> const & v);
|
||||||
|
|
||||||
@ -154,6 +155,8 @@ namespace glm
|
|||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary arithmetic operators
|
// Unary arithmetic operators
|
||||||
|
|
||||||
|
GLM_FUNC_DECL tvec1<T, P> & operator=(tvec1<T, P> const & v);
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec1<T, P> & operator=(tvec1<U, P> const & v);
|
GLM_FUNC_DECL tvec1<T, P> & operator=(tvec1<U, P> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -42,6 +42,11 @@ namespace glm
|
|||||||
# endif
|
# endif
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(tvec1<T, P> const & v)
|
||||||
|
: x(v.x)
|
||||||
|
{}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(tvec1<T, Q> const & v)
|
GLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(tvec1<T, Q> const & v)
|
||||||
@ -135,6 +140,13 @@ namespace glm
|
|||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary arithmetic operators
|
// Unary arithmetic operators
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator=(tvec1<T, P> const & v)
|
||||||
|
{
|
||||||
|
this->x = v.x;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator=(tvec1<U, P> const & v)
|
GLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator=(tvec1<U, P> const & v)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -109,6 +109,7 @@ namespace glm
|
|||||||
// Implicit basic constructors
|
// Implicit basic constructors
|
||||||
|
|
||||||
GLM_FUNC_DECL tvec2();
|
GLM_FUNC_DECL tvec2();
|
||||||
|
GLM_FUNC_DECL tvec2(tvec2<T, P> const & v);
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_DECL tvec2(tvec2<T, Q> const & v);
|
GLM_FUNC_DECL tvec2(tvec2<T, Q> const & v);
|
||||||
|
|
||||||
@ -162,32 +163,34 @@ namespace glm
|
|||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary arithmetic operators
|
// Unary arithmetic operators
|
||||||
|
|
||||||
|
GLM_FUNC_DECL tvec2<T, P>& operator=(tvec2<T, P> const & v);
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator=(tvec2<U, P> const & v);
|
GLM_FUNC_DECL tvec2<T, P>& operator=(tvec2<U, P> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator+=(U s);
|
GLM_FUNC_DECL tvec2<T, P>& operator+=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator+=(tvec1<U, P> const & v);
|
GLM_FUNC_DECL tvec2<T, P>& operator+=(tvec1<U, P> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator+=(tvec2<U, P> const & v);
|
GLM_FUNC_DECL tvec2<T, P>& operator+=(tvec2<U, P> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator-=(U s);
|
GLM_FUNC_DECL tvec2<T, P>& operator-=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator-=(tvec1<U, P> const & v);
|
GLM_FUNC_DECL tvec2<T, P>& operator-=(tvec1<U, P> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator-=(tvec2<U, P> const & v);
|
GLM_FUNC_DECL tvec2<T, P>& operator-=(tvec2<U, P> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator*=(U s);
|
GLM_FUNC_DECL tvec2<T, P>& operator*=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator*=(tvec1<U, P> const & v);
|
GLM_FUNC_DECL tvec2<T, P>& operator*=(tvec1<U, P> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator*=(tvec2<U, P> const & v);
|
GLM_FUNC_DECL tvec2<T, P>& operator*=(tvec2<U, P> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator/=(U s);
|
GLM_FUNC_DECL tvec2<T, P>& operator/=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator/=(tvec1<U, P> const & v);
|
GLM_FUNC_DECL tvec2<T, P>& operator/=(tvec1<U, P> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator/=(tvec2<U, P> const & v);
|
GLM_FUNC_DECL tvec2<T, P>& operator/=(tvec2<U, P> const & v);
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Increment and decrement operators
|
// Increment and decrement operators
|
||||||
@ -201,29 +204,29 @@ namespace glm
|
|||||||
// Unary bit operators
|
// Unary bit operators
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator%= (U s);
|
GLM_FUNC_DECL tvec2<T, P> & operator%=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator%= (tvec1<U, P> const & v);
|
GLM_FUNC_DECL tvec2<T, P> & operator%=(tvec1<U, P> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator%= (tvec2<U, P> const & v);
|
GLM_FUNC_DECL tvec2<T, P> & operator%=(tvec2<U, P> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator&= (U s);
|
GLM_FUNC_DECL tvec2<T, P> & operator&=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator&= (tvec1<U, P> const & v);
|
GLM_FUNC_DECL tvec2<T, P> & operator&=(tvec1<U, P> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator&= (tvec2<U, P> const & v);
|
GLM_FUNC_DECL tvec2<T, P> & operator&=(tvec2<U, P> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator|= (U s);
|
GLM_FUNC_DECL tvec2<T, P> & operator|=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator|= (tvec1<U, P> const & v);
|
GLM_FUNC_DECL tvec2<T, P> & operator|=(tvec1<U, P> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator|= (tvec2<U, P> const & v);
|
GLM_FUNC_DECL tvec2<T, P> & operator|=(tvec2<U, P> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator^= (U s);
|
GLM_FUNC_DECL tvec2<T, P> & operator^=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator^= (tvec1<U, P> const & v);
|
GLM_FUNC_DECL tvec2<T, P> & operator^=(tvec1<U, P> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator^= (tvec2<U, P> const & v);
|
GLM_FUNC_DECL tvec2<T, P> & operator^=(tvec2<U, P> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec2<T, P> & operator<<=(U s);
|
GLM_FUNC_DECL tvec2<T, P> & operator<<=(U s);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
|
@ -12,10 +12,6 @@
|
|||||||
/// 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
|
||||||
@ -25,13 +21,44 @@
|
|||||||
/// THE SOFTWARE.
|
/// THE SOFTWARE.
|
||||||
///
|
///
|
||||||
/// @ref core
|
/// @ref core
|
||||||
/// @file glm/detail/type_tvec2.inl
|
/// @file glm/core/type_tvec2.inl
|
||||||
/// @date 2008-08-18 / 2011-06-15
|
/// @date 2008-08-18 / 2011-06-15
|
||||||
/// @author Christophe Riccio
|
/// @author Christophe Riccio
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
|
#ifdef GLM_FORCE_SIZE_FUNC
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR size_t tvec2<T, P>::size() const
|
||||||
|
{
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tvec2<T, P>::length() const
|
||||||
|
{
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//////////////////////////////////////
|
||||||
|
// Accesses
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER T & tvec2<T, P>::operator[](length_t i)
|
||||||
|
{
|
||||||
|
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
|
||||||
|
return (&x)[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER T const & tvec2<T, P>::operator[](length_t i) const
|
||||||
|
{
|
||||||
|
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
|
||||||
|
return (&x)[i];
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Implicit basic constructors
|
// Implicit basic constructors
|
||||||
|
|
||||||
@ -42,6 +69,11 @@ namespace glm
|
|||||||
# endif
|
# endif
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(tvec2<T, P> const & v)
|
||||||
|
: x(v.x), y(v.y)
|
||||||
|
{}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(tvec2<T, Q> const & v)
|
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(tvec2<T, Q> const & v)
|
||||||
@ -61,8 +93,8 @@ namespace glm
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(T const & a, T const & b)
|
GLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(T const & s1, T const & s2)
|
||||||
: x(a), y(b)
|
: x(s1), y(s2)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
@ -106,54 +138,17 @@ namespace glm
|
|||||||
, y(static_cast<T>(v.y))
|
, y(static_cast<T>(v.y))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//////////////////////////////////////
|
|
||||||
// Component accesses
|
|
||||||
|
|
||||||
# ifdef GLM_FORCE_SIZE_FUNC
|
|
||||||
template <typename T, precision P>
|
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec2<T, P>::size_type tvec2<T, P>::size() const
|
|
||||||
{
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
|
||||||
GLM_FUNC_QUALIFIER T & tvec2<T, P>::operator[](typename tvec2<T, P>::size_type i)
|
|
||||||
{
|
|
||||||
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
|
|
||||||
return (&x)[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
|
||||||
GLM_FUNC_QUALIFIER T const & tvec2<T, P>::operator[](typename tvec2<T, P>::size_type i) const
|
|
||||||
{
|
|
||||||
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
|
|
||||||
return (&x)[i];
|
|
||||||
}
|
|
||||||
# else
|
|
||||||
template <typename T, precision P>
|
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR typename tvec2<T, P>::length_type tvec2<T, P>::length() const
|
|
||||||
{
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
|
||||||
GLM_FUNC_QUALIFIER T & tvec2<T, P>::operator[](typename tvec2<T, P>::length_type i)
|
|
||||||
{
|
|
||||||
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
|
|
||||||
return (&x)[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
|
||||||
GLM_FUNC_QUALIFIER T const & tvec2<T, P>::operator[](typename tvec2<T, P>::length_type i) const
|
|
||||||
{
|
|
||||||
assert(i >= 0 && static_cast<detail::component_count_t>(i) < detail::component_count(*this));
|
|
||||||
return (&x)[i];
|
|
||||||
}
|
|
||||||
# endif//GLM_FORCE_SIZE_FUNC
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary arithmetic operators
|
// Unary arithmetic operators
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator=(tvec2<T, P> const & v)
|
||||||
|
{
|
||||||
|
this->x = v.x;
|
||||||
|
this->y = v.y;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator=(tvec2<U, P> const & v)
|
GLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator=(tvec2<U, P> const & v)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -110,6 +110,7 @@ namespace glm
|
|||||||
// Implicit basic constructors
|
// Implicit basic constructors
|
||||||
|
|
||||||
GLM_FUNC_DECL tvec3();
|
GLM_FUNC_DECL tvec3();
|
||||||
|
GLM_FUNC_DECL tvec3(tvec3<T, P> const & v);
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_DECL tvec3(tvec3<T, Q> const & v);
|
GLM_FUNC_DECL tvec3(tvec3<T, Q> const & v);
|
||||||
|
|
||||||
@ -184,6 +185,8 @@ namespace glm
|
|||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary arithmetic operators
|
// Unary arithmetic operators
|
||||||
|
|
||||||
|
GLM_FUNC_DECL tvec3<T, P> & operator=(tvec3<T, P> const & v);
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec3<T, P> & operator=(tvec3<U, P> const & v);
|
GLM_FUNC_DECL tvec3<T, P> & operator=(tvec3<U, P> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -42,6 +42,11 @@ namespace glm
|
|||||||
# endif
|
# endif
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec3<T, P> const & v)
|
||||||
|
: x(v.x), y(v.y), z(v.z)
|
||||||
|
{}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec3<T, Q> const & v)
|
GLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec3<T, Q> const & v)
|
||||||
@ -183,6 +188,15 @@ namespace glm
|
|||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary arithmetic operators
|
// Unary arithmetic operators
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tvec3<T, P>& tvec3<T, P>::operator=(tvec3<T, P> const & v)
|
||||||
|
{
|
||||||
|
this->x = v.x;
|
||||||
|
this->y = v.y;
|
||||||
|
this->z = v.z;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_QUALIFIER tvec3<T, P>& tvec3<T, P>::operator=(tvec3<U, P> const & v)
|
GLM_FUNC_QUALIFIER tvec3<T, P>& tvec3<T, P>::operator=(tvec3<U, P> const & v)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -53,7 +53,9 @@ namespace detail
|
|||||||
typedef T type[4];
|
typedef T type[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
# if GLM_ARCH & GLM_ARCH_SSE2
|
# define GLM_NOT_BUGGY_VC32BITS !(GLM_MODEL == GLM_MODEL_32 && GLM_COMPILER & GLM_COMPILER_VC && GLM_COMPILER < GLM_COMPILER_VC2013)
|
||||||
|
|
||||||
|
# if GLM_ARCH & GLM_ARCH_SSE2 && GLM_NOT_BUGGY_VC32BITS
|
||||||
template <>
|
template <>
|
||||||
struct simd<float>
|
struct simd<float>
|
||||||
{
|
{
|
||||||
@ -73,7 +75,7 @@ namespace detail
|
|||||||
};
|
};
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if GLM_ARCH & GLM_ARCH_AVX
|
# if GLM_ARCH & GLM_ARCH_AVX && GLM_NOT_BUGGY_VC32BITS
|
||||||
template <>
|
template <>
|
||||||
struct simd<double>
|
struct simd<double>
|
||||||
{
|
{
|
||||||
@ -81,7 +83,7 @@ namespace detail
|
|||||||
};
|
};
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if GLM_ARCH & GLM_ARCH_AVX2
|
# if GLM_ARCH & GLM_ARCH_AVX2 && GLM_NOT_BUGGY_VC32BITS
|
||||||
template <>
|
template <>
|
||||||
struct simd<int64>
|
struct simd<int64>
|
||||||
{
|
{
|
||||||
@ -113,10 +115,11 @@ namespace detail
|
|||||||
# if GLM_HAS_ANONYMOUS_UNION
|
# if GLM_HAS_ANONYMOUS_UNION
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
typename detail::simd<T>::type data;
|
struct { T x, y, z, w;};
|
||||||
struct { T r, g, b, a; };
|
struct { T r, g, b, a; };
|
||||||
struct { T s, t, p, q; };
|
struct { T s, t, p, q; };
|
||||||
struct { T x, y, z, w;};
|
|
||||||
|
typename detail::simd<T>::type data;
|
||||||
|
|
||||||
# ifdef GLM_SWIZZLE
|
# ifdef GLM_SWIZZLE
|
||||||
_GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, x, y, z, w)
|
_GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, x, y, z, w)
|
||||||
@ -164,6 +167,7 @@ namespace detail
|
|||||||
// Implicit basic constructors
|
// Implicit basic constructors
|
||||||
|
|
||||||
GLM_FUNC_DECL tvec4();
|
GLM_FUNC_DECL tvec4();
|
||||||
|
GLM_FUNC_DECL tvec4(tvec4<T, P> const & v);
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
GLM_FUNC_DECL tvec4(tvec4<T, Q> const & v);
|
GLM_FUNC_DECL tvec4(tvec4<T, Q> const & v);
|
||||||
|
|
||||||
@ -281,6 +285,8 @@ namespace detail
|
|||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary arithmetic operators
|
// Unary arithmetic operators
|
||||||
|
|
||||||
|
GLM_FUNC_DECL tvec4<T, P> & operator=(tvec4<T, P> const & v);
|
||||||
|
|
||||||
template <typename U>
|
template <typename U>
|
||||||
GLM_FUNC_DECL tvec4<T, P> & operator=(tvec4<U, P> const & v);
|
GLM_FUNC_DECL tvec4<T, P> & operator=(tvec4<U, P> const & v);
|
||||||
template <typename U>
|
template <typename U>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
@ -42,21 +42,10 @@ namespace glm
|
|||||||
# endif
|
# endif
|
||||||
{}
|
{}
|
||||||
|
|
||||||
#if GLM_HAS_ANONYMOUS_UNION && (GLM_ARCH & GLM_ARCH_SSE2)
|
template <typename T, precision P>
|
||||||
template <>
|
GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec4<T, P> const & v)
|
||||||
GLM_FUNC_QUALIFIER tvec4<float, lowp>::tvec4()
|
: x(v.x), y(v.y), z(v.z), w(v.w)
|
||||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
|
||||||
: data(_mm_setzero_ps())
|
|
||||||
# endif
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template <>
|
|
||||||
GLM_FUNC_QUALIFIER tvec4<float, mediump>::tvec4()
|
|
||||||
# ifndef GLM_FORCE_NO_CTOR_INIT
|
|
||||||
: data(_mm_setzero_ps())
|
|
||||||
# endif
|
|
||||||
{}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <precision Q>
|
template <precision Q>
|
||||||
@ -76,35 +65,11 @@ namespace glm
|
|||||||
: x(s), y(s), z(s), w(s)
|
: x(s), y(s), z(s), w(s)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
#if GLM_HAS_ANONYMOUS_UNION && (GLM_ARCH & GLM_ARCH_SSE2)
|
|
||||||
template <>
|
|
||||||
GLM_FUNC_QUALIFIER tvec4<float, lowp>::tvec4(float s) :
|
|
||||||
data(_mm_set1_ps(s))
|
|
||||||
{}
|
|
||||||
|
|
||||||
template <>
|
|
||||||
GLM_FUNC_QUALIFIER tvec4<float, mediump>::tvec4(float s) :
|
|
||||||
data(_mm_set1_ps(s))
|
|
||||||
{}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(T a, T b, T c, T d)
|
GLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(T a, T b, T c, T d)
|
||||||
: x(a), y(b), z(c), w(d)
|
: x(a), y(b), z(c), w(d)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
#if GLM_HAS_ANONYMOUS_UNION && (GLM_ARCH & GLM_ARCH_SSE2)
|
|
||||||
template <>
|
|
||||||
GLM_FUNC_QUALIFIER tvec4<float, lowp>::tvec4(float a, float b, float c, float d) :
|
|
||||||
data(_mm_set_ps(d, c, b, a))
|
|
||||||
{}
|
|
||||||
|
|
||||||
template <>
|
|
||||||
GLM_FUNC_QUALIFIER tvec4<float, mediump>::tvec4(float a, float b, float c, float d) :
|
|
||||||
data(_mm_set_ps(d, c, b, a))
|
|
||||||
{}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Conversion scalar constructors
|
// Conversion scalar constructors
|
||||||
|
|
||||||
@ -285,6 +250,16 @@ namespace glm
|
|||||||
//////////////////////////////////////
|
//////////////////////////////////////
|
||||||
// Unary arithmetic operators
|
// Unary arithmetic operators
|
||||||
|
|
||||||
|
template <typename T, precision P>
|
||||||
|
GLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator=(tvec4<T, P> const & v)
|
||||||
|
{
|
||||||
|
this->x = v.x;
|
||||||
|
this->y = v.y;
|
||||||
|
this->z = v.z;
|
||||||
|
this->w = v.w;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <typename U>
|
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)
|
||||||
@ -307,40 +282,6 @@ namespace glm
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if GLM_HAS_ANONYMOUS_UNION && (GLM_ARCH & GLM_ARCH_SSE2)
|
|
||||||
template <>
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_QUALIFIER tvec4<float, lowp> & tvec4<float, lowp>::operator+=(U scalar)
|
|
||||||
{
|
|
||||||
this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast<float>(scalar)));
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
|
||||||
template <>
|
|
||||||
GLM_FUNC_QUALIFIER tvec4<float, lowp> & tvec4<float, lowp>::operator+=<float>(float scalar)
|
|
||||||
{
|
|
||||||
this->data = _mm_add_ps(this->data, _mm_set_ps1(scalar));
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_QUALIFIER tvec4<float, mediump> & tvec4<float, mediump>::operator+=(U scalar)
|
|
||||||
{
|
|
||||||
this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast<float>(scalar)));
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
|
||||||
template <>
|
|
||||||
GLM_FUNC_QUALIFIER tvec4<float, mediump> & tvec4<float, mediump>::operator+=<float>(float scalar)
|
|
||||||
{
|
|
||||||
this->data = _mm_add_ps(this->data, _mm_set_ps1(scalar));
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <typename U>
|
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)
|
||||||
@ -353,24 +294,6 @@ namespace glm
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if GLM_HAS_ANONYMOUS_UNION && (GLM_ARCH & GLM_ARCH_SSE2)
|
|
||||||
template <>
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_QUALIFIER tvec4<float, lowp> & tvec4<float, lowp>::operator+=(tvec1<U, lowp> const & v)
|
|
||||||
{
|
|
||||||
this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast<float>(v.x)));
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
|
||||||
template <typename U>
|
|
||||||
GLM_FUNC_QUALIFIER tvec4<float, mediump> & tvec4<float, mediump>::operator+=(tvec1<U, mediump> const & v)
|
|
||||||
{
|
|
||||||
this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast<float>(v.x)));
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template <typename T, precision P>
|
template <typename T, precision P>
|
||||||
template <typename U>
|
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)
|
||||||
@ -1187,3 +1110,15 @@ namespace glm
|
|||||||
~v.w);
|
~v.w);
|
||||||
}
|
}
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
|
#if GLM_HAS_ANONYMOUS_UNION && GLM_NOT_BUGGY_VC32BITS
|
||||||
|
#if GLM_ARCH & GLM_ARCH_SSE2
|
||||||
|
# include "type_vec4_sse2.inl"
|
||||||
|
#endif
|
||||||
|
#if GLM_ARCH & GLM_ARCH_AVX
|
||||||
|
# include "type_vec4_avx.inl"
|
||||||
|
#endif
|
||||||
|
#if GLM_ARCH & GLM_ARCH_AVX2
|
||||||
|
# include "type_vec4_avx2.inl"
|
||||||
|
#endif
|
||||||
|
#endif//
|
||||||
|
41
glm/detail/type_vec4_avx.inl
Normal file
41
glm/detail/type_vec4_avx.inl
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// OpenGL Mathematics (glm.g-truc.net)
|
||||||
|
///
|
||||||
|
/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
|
||||||
|
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
/// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
/// in the Software without restriction, including without limitation the rights
|
||||||
|
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
/// copies of the Software, and to permit persons to whom the Software is
|
||||||
|
/// furnished to do so, subject to the following conditions:
|
||||||
|
///
|
||||||
|
/// The above copyright notice and this permission notice shall be included in
|
||||||
|
/// all copies or substantial portions of the Software.
|
||||||
|
///
|
||||||
|
/// Restrictions:
|
||||||
|
/// By making use of the Software for military purposes, you choose to make
|
||||||
|
/// a Bunny unhappy.
|
||||||
|
///
|
||||||
|
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
/// LIABILITY, WHETHER IN AN ACTION 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_avx.inl
|
||||||
|
/// @date 2014-12-01 / 2014-12-01
|
||||||
|
/// @author Christophe Riccio
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
namespace glm{
|
||||||
|
namespace detail
|
||||||
|
{
|
||||||
|
|
||||||
|
}//namespace detail
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}//namespace glm
|
41
glm/detail/type_vec4_avx2.inl
Normal file
41
glm/detail/type_vec4_avx2.inl
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// OpenGL Mathematics (glm.g-truc.net)
|
||||||
|
///
|
||||||
|
/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
|
||||||
|
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
/// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
/// in the Software without restriction, including without limitation the rights
|
||||||
|
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
/// copies of the Software, and to permit persons to whom the Software is
|
||||||
|
/// furnished to do so, subject to the following conditions:
|
||||||
|
///
|
||||||
|
/// The above copyright notice and this permission notice shall be included in
|
||||||
|
/// all copies or substantial portions of the Software.
|
||||||
|
///
|
||||||
|
/// Restrictions:
|
||||||
|
/// By making use of the Software for military purposes, you choose to make
|
||||||
|
/// a Bunny unhappy.
|
||||||
|
///
|
||||||
|
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
/// LIABILITY, WHETHER IN AN ACTION 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_avx2.inl
|
||||||
|
/// @date 2014-12-01 / 2014-12-01
|
||||||
|
/// @author Christophe Riccio
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
namespace glm{
|
||||||
|
namespace detail
|
||||||
|
{
|
||||||
|
|
||||||
|
}//namespace detail
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}//namespace glm
|
120
glm/detail/type_vec4_sse2.inl
Normal file
120
glm/detail/type_vec4_sse2.inl
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// OpenGL Mathematics (glm.g-truc.net)
|
||||||
|
///
|
||||||
|
/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
|
||||||
|
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
/// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
/// in the Software without restriction, including without limitation the rights
|
||||||
|
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
/// copies of the Software, and to permit persons to whom the Software is
|
||||||
|
/// furnished to do so, subject to the following conditions:
|
||||||
|
///
|
||||||
|
/// The above copyright notice and this permission notice shall be included in
|
||||||
|
/// all copies or substantial portions of the Software.
|
||||||
|
///
|
||||||
|
/// Restrictions:
|
||||||
|
/// By making use of the Software for military purposes, you choose to make
|
||||||
|
/// a Bunny unhappy.
|
||||||
|
///
|
||||||
|
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
/// LIABILITY, WHETHER IN AN ACTION 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
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
namespace glm{
|
||||||
|
namespace detail
|
||||||
|
{
|
||||||
|
|
||||||
|
}//namespace detail
|
||||||
|
|
||||||
|
template <>
|
||||||
|
GLM_FUNC_QUALIFIER tvec4<float, lowp>::tvec4()
|
||||||
|
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||||
|
: data(_mm_setzero_ps())
|
||||||
|
# endif
|
||||||
|
{}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
GLM_FUNC_QUALIFIER tvec4<float, mediump>::tvec4()
|
||||||
|
# ifndef GLM_FORCE_NO_CTOR_INIT
|
||||||
|
: data(_mm_setzero_ps())
|
||||||
|
# endif
|
||||||
|
{}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
GLM_FUNC_QUALIFIER tvec4<float, lowp>::tvec4(float s) :
|
||||||
|
data(_mm_set1_ps(s))
|
||||||
|
{}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
GLM_FUNC_QUALIFIER tvec4<float, mediump>::tvec4(float s) :
|
||||||
|
data(_mm_set1_ps(s))
|
||||||
|
{}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
GLM_FUNC_QUALIFIER tvec4<float, lowp>::tvec4(float a, float b, float c, float d) :
|
||||||
|
data(_mm_set_ps(d, c, b, a))
|
||||||
|
{}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
GLM_FUNC_QUALIFIER tvec4<float, mediump>::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, lowp> & tvec4<float, lowp>::operator+=(U scalar)
|
||||||
|
{
|
||||||
|
this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast<float>(scalar)));
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
template <>
|
||||||
|
GLM_FUNC_QUALIFIER tvec4<float, lowp> & tvec4<float, lowp>::operator+=<float>(float scalar)
|
||||||
|
{
|
||||||
|
this->data = _mm_add_ps(this->data, _mm_set_ps1(scalar));
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_QUALIFIER tvec4<float, mediump> & tvec4<float, mediump>::operator+=(U scalar)
|
||||||
|
{
|
||||||
|
this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast<float>(scalar)));
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
template <>
|
||||||
|
GLM_FUNC_QUALIFIER tvec4<float, mediump> & tvec4<float, mediump>::operator+=<float>(float scalar)
|
||||||
|
{
|
||||||
|
this->data = _mm_add_ps(this->data, _mm_set_ps1(scalar));
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_QUALIFIER tvec4<float, lowp> & tvec4<float, lowp>::operator+=(tvec1<U, lowp> const & v)
|
||||||
|
{
|
||||||
|
this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast<float>(v.x)));
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
template <typename U>
|
||||||
|
GLM_FUNC_QUALIFIER tvec4<float, mediump> & tvec4<float, mediump>::operator+=(tvec1<U, mediump> const & v)
|
||||||
|
{
|
||||||
|
this->data = _mm_add_ps(this->data, _mm_set_ps1(static_cast<float>(v.x)));
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
}//namespace glm
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
81
glm/gtc/color.hpp
Normal file
81
glm/gtc/color.hpp
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// OpenGL Mathematics (glm.g-truc.net)
|
||||||
|
///
|
||||||
|
/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
|
||||||
|
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
/// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
/// in the Software without restriction, including without limitation the rights
|
||||||
|
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
/// copies of the Software, and to permit persons to whom the Software is
|
||||||
|
/// furnished to do so, subject to the following conditions:
|
||||||
|
///
|
||||||
|
/// The above copyright notice and this permission notice shall be included in
|
||||||
|
/// all copies or substantial portions of the Software.
|
||||||
|
///
|
||||||
|
/// Restrictions:
|
||||||
|
/// By making use of the Software for military purposes, you choose to make
|
||||||
|
/// a Bunny unhappy.
|
||||||
|
///
|
||||||
|
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
/// LIABILITY, WHETHER IN AN ACTION 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
|
||||||
|
/// @file glm/gtc/color.hpp
|
||||||
|
/// @date 2015-02-10 / 2015-02-10
|
||||||
|
/// @author Christophe Riccio
|
||||||
|
///
|
||||||
|
/// @see core (dependence)
|
||||||
|
/// @see gtc_color (dependence)
|
||||||
|
///
|
||||||
|
/// @defgroup gtc_color GLM_GTC_color
|
||||||
|
/// @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
|
||||||
|
|
||||||
|
// Dependencies
|
||||||
|
#include "../detail/setup.hpp"
|
||||||
|
#include "../detail/precision.hpp"
|
||||||
|
#include "../exponential.hpp"
|
||||||
|
#include "../vec3.hpp"
|
||||||
|
#include "../vec4.hpp"
|
||||||
|
#include <limits>
|
||||||
|
|
||||||
|
#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))
|
||||||
|
# pragma message("GLM: GLM_GTC_color extension included")
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace glm
|
||||||
|
{
|
||||||
|
/// @addtogroup gtc_color
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
/// Convert a RGB color to sRGB color using a standard gamma correction
|
||||||
|
template <typename T, precision P, template <typename, precision> class vecType>
|
||||||
|
GLM_FUNC_DECL vecType<T, P> convertRgbToSrgb(vecType<T, P> const & ColorRGB);
|
||||||
|
|
||||||
|
/// Convert a RGB color to sRGB color using a custom gamma correction
|
||||||
|
template <typename T, precision P, template <typename, precision> class vecType>
|
||||||
|
GLM_FUNC_DECL vecType<T, P> convertRgbToSrgb(vecType<T, P> const & ColorRGB, T Gamma);
|
||||||
|
|
||||||
|
/// Convert a sRGB color to RGB color using a standard gamma correction
|
||||||
|
template <typename T, precision P, template <typename, precision> class vecType>
|
||||||
|
GLM_FUNC_DECL vecType<T, P> convertSrgbToRgb(vecType<T, P> const & ColorSRGB);
|
||||||
|
|
||||||
|
/// Convert a sRGB color to RGB color using a custom gamma correction
|
||||||
|
template <typename T, precision P, template <typename, precision> class vecType>
|
||||||
|
GLM_FUNC_DECL vecType<T, P> convertSrgbToRgb(vecType<T, P> const & ColorSRGB, T Gamma);
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
} //namespace glm
|
||||||
|
|
||||||
|
#include "color.inl"
|
104
glm/gtc/color.inl
Normal file
104
glm/gtc/color.inl
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
/// OpenGL Mathematics (glm.g-truc.net)
|
||||||
|
///
|
||||||
|
/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)
|
||||||
|
/// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
/// of this software and associated documentation files (the "Software"), to deal
|
||||||
|
/// in the Software without restriction, including without limitation the rights
|
||||||
|
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
/// copies of the Software, and to permit persons to whom the Software is
|
||||||
|
/// furnished to do so, subject to the following conditions:
|
||||||
|
///
|
||||||
|
/// The above copyright notice and this permission notice shall be included in
|
||||||
|
/// all copies or substantial portions of the Software.
|
||||||
|
///
|
||||||
|
/// Restrictions:
|
||||||
|
/// By making use of the Software for military purposes, you choose to make
|
||||||
|
/// a Bunny unhappy.
|
||||||
|
///
|
||||||
|
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
/// LIABILITY, WHETHER IN AN ACTION 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
|
||||||
|
/// @file glm/gtc/color.inl
|
||||||
|
/// @date 2015-02-10 / 2015-02-10
|
||||||
|
/// @author Christophe Riccio
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
namespace glm{
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
vecType<T, P> const ClampedColor(clamp(ColorRGB, static_cast<T>(0), static_cast<T>(1)));
|
||||||
|
|
||||||
|
return mix(
|
||||||
|
pow(ClampedColor, vecType<T, P>(GammaCorrection)) * static_cast<T>(1.055) - static_cast<T>(0.055),
|
||||||
|
ClampedColor * static_cast<T>(12.92),
|
||||||
|
lessThan(ClampedColor, vecType<T, P>(static_cast<T>(0.0031308))));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
return tvec4<T, P>(compute_rgbToSrgb<T, P, tvec3>::call(tvec3<T, P>(ColorRGB), GammaCorrection), ColorRGB.a);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
return mix(
|
||||||
|
pow((ColorSRGB + static_cast<T>(0.055)) * static_cast<T>(0.94786729857819905213270142180095), vecType<T, P>(Gamma)),
|
||||||
|
ColorSRGB * static_cast<T>(0.07739938080495356037151702786378),
|
||||||
|
lessThanEqual(ColorSRGB, vecType<T, P>(static_cast<T>(0.04045))));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
return tvec4<T, P>(compute_srgbToRgb<T, P, tvec3>::call(tvec3<T, P>(ColorSRGB), Gamma), ColorSRGB.a);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}//namespace detail
|
||||||
|
|
||||||
|
template <typename T, precision P, template <typename, precision> class vecType>
|
||||||
|
GLM_FUNC_QUALIFIER vecType<T, P> convertRgbToSrgb(vecType<T, P> const & ColorRGB)
|
||||||
|
{
|
||||||
|
return detail::compute_rgbToSrgb<T, P, vecType>::call(ColorRGB, static_cast<T>(0.41666));
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T, precision P, template <typename, precision> class vecType>
|
||||||
|
GLM_FUNC_QUALIFIER vecType<T, P> convertRgbToSrgb(vecType<T, P> const & ColorRGB, T Gamma)
|
||||||
|
{
|
||||||
|
return detail::compute_rgbToSrgb<T, P, vecType>::call(ColorRGB, static_cast<T>(1) / Gamma);
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T, precision P, template <typename, precision> class vecType>
|
||||||
|
GLM_FUNC_QUALIFIER vecType<T, P> convertSrgbToRgb(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> convertSrgbToRgb(vecType<T, P> const & ColorSRGB, T Gamma)
|
||||||
|
{
|
||||||
|
return detail::compute_srgbToRgb<T, P, vecType>::call(ColorSRGB, Gamma);
|
||||||
|
}
|
||||||
|
}//namespace glm
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
/// 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
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user