[
  {
    "path": ".gitignore",
    "content": "# QT #\n######\n*.pro.user*\n*.qmake.stash\n\n# Compiled Source #\n###################\n*.o\nbuild/\n\n# Executables #\n###############\nparticles_cuda\nparticles_cuda.app\n\n# OS Generated Files #\n######################\n*.DS_Store\n\n# Makefiles #\n#############\nMakefile\n\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2015 ebirenbaum\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n"
  },
  {
    "path": "README.md",
    "content": "# Unified Particle Solver\n\n#### An implementation of Macklin et. al's [Unified Particle Physics for Real-Time Applications](http://mmacklin.com/uppfrta_preprint.pdf) for both the CPU and GPU.\n\nThis physics simulation was implemented on both the CPU (leveraging the Qt framework) and GPU (using CUDA) as a final project for Brown University's graduate-level course CSCI2240: Interactive Computer Graphics by Evan Birenbaum '15, Logan Barnes '15, and Geoff Trousdale '15.\n\n#### Overview\nThe simulation supports a variety of states of matter by representing the entire world as a large set of small, individual, and independent particles that are influenced by a set of constraints. The system supports the following physical phenomena with two-way interaction:\n  - Inter-particle collisions\n  - Rigid bodies with approximated stacking\n  - Friction\n  - Rope and cloth\n  - Fluids\n  - Gases\n\n#### CPU demo scenes\nThe following demo scenes are built in the CPU application, labeled with appropriate key commands to bring them up:\n\n  - *1* - A collapsing sand pile demonstrating frictional effect on angle of repose\n  - *2* - Stiff stacks of rigid bodies\n  - *3* - Stable stacking of rigid bodies in the formation of a wall\n  - *4* - Chained rigid bodies acting as a pendulum\n  - *5* - A fluid caught and held by a rope\n  - *6* - Two fluids settling, demonstrating the Rayleigh-Taylor instability\n  - *7* - Solids sinking or floating based on density\n  - *8* - Gas particles interacting with a swinging rope\n  - *9* - A rigid body being stopped by friction\n  - *0* - Fluids trapped like a water balloon\n  - *D* - Gas particles emitted into a closed space\n  - *S* - Gas particles emitted into an open space\n  - *W* - I came in like a wrecking ball!\n  - *N* - Newton's cradle\n  - *.* - Resolution of interlocked rigid bodies\n  - *V* - A volcano erupting and settling\n\nThe following commands may also be useful:\n  - *T* - Toggle real-time or time-step mode\n  - *Space* - move forward by a time step during time-step mode\n  - *R* - reset the simulation\n  - *C* - toggle rendering of individual particles\n\n#### GPU demo scenes\nNote: This version of the program no longer uses the CUDA 7 cuSolver library allowing it to be run on CUDA 5 capable machines.\n\nThe following demo scenes are built in the GPU application, labeled with appropriate key commands to bring them up:\n\n  - *1* - A single rope demonstrating basic distance constraints\n  - *2* - A cloth created with a grid of distance constraints\n  - *3* - Two fluids settling, demonstrating the Rayleigh-Taylor instability\n  - *4* - A single stack of solid particles\n  - *5* - Multiple stacks of solid particles\n  - *6* - A grid of solid particles falling into a cloth net\n  - *7* - A giant ball of fluid being fluidy, and demonstrating surface tension\n  - *8* - A combo scene of solid particles, cloths, ropes, and an immovable sphere\n  - *9* - Hair...just hair\n  - *0* - Empty scene\n\nMoving around in the scene:\n  - *W* - Move forward\n  - *A* - Move left\n  - *S* - Move backward\n  - *D* - Move right\n  - *Mouse* - Look around\n  - *Left Click* - Shoot particle into scene\n  - *Space* - Add fluid to scene at origin (not guaranteed to maintain stability)\n\n#### Pretty pictures\n\n![](./img/3d1.png)\n![](./img/3d2.png)\n![](./img/3d3.png)\n![](./img/2d1.png)\n![](./img/2d2.png)\n![](./img/2d3.png)\n"
  },
  {
    "path": "cpu/README",
    "content": ""
  },
  {
    "path": "cpu/glm/CMakeLists.txt",
    "content": "set(NAME glm_dummy)\r\n\r\nfile(GLOB ROOT_SOURCE *.cpp)\r\nfile(GLOB ROOT_INLINE *.inl)\r\nfile(GLOB ROOT_HEADER *.hpp)\r\nfile(GLOB ROOT_TEXT ../*.txt)\r\n\r\nfile(GLOB_RECURSE CORE_SOURCE ./detail/*.cpp)\r\nfile(GLOB_RECURSE CORE_INLINE ./detail/*.inl)\r\nfile(GLOB_RECURSE CORE_HEADER ./detail/*.hpp)\r\n\r\nfile(GLOB_RECURSE GTC_SOURCE ./gtc/*.cpp)\r\nfile(GLOB_RECURSE GTC_INLINE ./gtc/*.inl)\r\nfile(GLOB_RECURSE GTC_HEADER ./gtc/*.hpp)\r\n\r\nfile(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp)\r\nfile(GLOB_RECURSE GTX_INLINE ./gtx/*.inl)\r\nfile(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp)\r\n\r\nsource_group(\"Text Files\" FILES ${ROOT_TEXT})\r\nsource_group(\"Core Files\" FILES ${CORE_SOURCE})\r\nsource_group(\"Core Files\" FILES ${CORE_INLINE})\r\nsource_group(\"Core Files\" FILES ${CORE_HEADER})\r\nsource_group(\"GTC Files\" FILES ${GTC_SOURCE})\r\nsource_group(\"GTC Files\" FILES ${GTC_INLINE})\r\nsource_group(\"GTC Files\" FILES ${GTC_HEADER})\r\nsource_group(\"GTX Files\" FILES ${GTX_SOURCE})\r\nsource_group(\"GTX Files\" FILES ${GTX_INLINE})\r\nsource_group(\"GTX Files\" FILES ${GTX_HEADER})\r\n\r\ninclude_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)\r\n\r\nadd_executable(${NAME} ${ROOT_TEXT}\r\n\t${ROOT_SOURCE}    ${ROOT_INLINE}    ${ROOT_HEADER}\r\n\t${CORE_SOURCE}    ${CORE_INLINE}    ${CORE_HEADER}\r\n\t${GTC_SOURCE}     ${GTC_INLINE}     ${GTC_HEADER}\r\n\t${GTX_SOURCE}     ${GTX_INLINE}     ${GTX_HEADER})\r\n\r\n#add_library(glm STATIC glm.cpp)\r\n#add_library(glm_shared SHARED glm.cpp)\r\n"
  },
  {
    "path": "cpu/glm/common.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/common.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_COMMON_INCLUDED\r\n#define GLM_COMMON_INCLUDED\r\n\r\n#include \"detail/func_common.hpp\"\r\n\r\n#endif//GLM_COMMON_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/detail/_features.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/_features.hpp\r\n/// @date 2013-02-20 / 2013-02-20\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_features\r\n#define glm_core_features\r\n\r\n// #define GLM_CXX98_EXCEPTIONS\r\n// #define GLM_CXX98_RTTI\r\n\r\n// #define GLM_CXX11_RVALUE_REFERENCES\r\n// Rvalue references - GCC 4.3\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html\r\n\r\n// GLM_CXX11_TRAILING_RETURN\r\n// Rvalue references for *this - GCC not supported\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2439.htm\r\n\r\n// GLM_CXX11_NONSTATIC_MEMBER_INIT\r\n// Initialization of class objects by rvalues - GCC any\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1610.html\r\n\r\n// GLM_CXX11_NONSTATIC_MEMBER_INIT\r\n// Non-static data member initializers - GCC 4.7\r\n// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2008/n2756.htm\r\n\r\n// #define GLM_CXX11_VARIADIC_TEMPLATE\r\n// Variadic templates - GCC 4.3\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2242.pdf\r\n\r\n// \r\n// Extending variadic template template parameters - GCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf\r\n\r\n// #define GLM_CXX11_GENERALIZED_INITIALIZERS\r\n// Initializer lists - GCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm\r\n\r\n// #define GLM_CXX11_STATIC_ASSERT \r\n// Static assertions - GCC 4.3\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html\r\n\r\n// #define GLM_CXX11_AUTO_TYPE\r\n// auto-typed variables - GCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1984.pdf\r\n\r\n// #define GLM_CXX11_AUTO_TYPE\r\n// Multi-declarator auto - GCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1737.pdf\r\n\r\n// #define GLM_CXX11_AUTO_TYPE\r\n// Removal of auto as a storage-class specifier - GCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2546.htm\r\n\r\n// #define GLM_CXX11_AUTO_TYPE\r\n// New function declarator syntax - GCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm\r\n\r\n// #define GLM_CXX11_LAMBDAS\r\n// New wording for C++0x lambdas - GCC 4.5\r\n// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2927.pdf\r\n\r\n// #define GLM_CXX11_DECLTYPE\r\n// Declared type of an expression - GCC 4.3\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf\r\n\r\n// \r\n// Right angle brackets - GCC 4.3\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1757.html\r\n\r\n// \r\n// Default template arguments for function templates\tDR226\tGCC 4.3\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#226\r\n\r\n// \r\n// Solving the SFINAE problem for expressions\tDR339\tGCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2634.html\r\n\r\n// #define GLM_CXX11_ALIAS_TEMPLATE\r\n// Template aliases\tN2258\tGCC 4.7\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf\r\n\r\n// \r\n// Extern templates\tN1987\tYes\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1987.htm\r\n\r\n// #define GLM_CXX11_NULLPTR\r\n// Null pointer constant\tN2431\tGCC 4.6\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf\r\n\r\n// #define GLM_CXX11_STRONG_ENUMS\r\n// Strongly-typed enums\tN2347\tGCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf\r\n\r\n// \r\n// Forward declarations for enums\tN2764\tGCC 4.6\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2764.pdf\r\n\r\n// \r\n// Generalized attributes\tN2761\tGCC 4.8\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf\r\n\r\n// \r\n// Generalized constant expressions\tN2235\tGCC 4.6\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf\r\n\r\n// \r\n// Alignment support\tN2341\tGCC 4.8\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf\r\n\r\n// #define GLM_CXX11_DELEGATING_CONSTRUCTORS\r\n// Delegating constructors\tN1986\tGCC 4.7\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1986.pdf\r\n\r\n// \r\n// Inheriting constructors\tN2540\tGCC 4.8\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2540.htm\r\n\r\n// #define GLM_CXX11_EXPLICIT_CONVERSIONS\r\n// Explicit conversion operators\tN2437\tGCC 4.5\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf\r\n\r\n// \r\n// New character types\tN2249\tGCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2249.html\r\n\r\n// \r\n// Unicode string literals\tN2442\tGCC 4.5\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm\r\n\r\n// \r\n// Raw string literals\tN2442\tGCC 4.5\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm\r\n\r\n// \r\n// Universal character name literals\tN2170\tGCC 4.5\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2170.html\r\n\r\n// #define GLM_CXX11_USER_LITERALS\r\n// User-defined literals\t\tN2765\tGCC 4.7\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf\r\n\r\n// \r\n// Standard Layout Types\tN2342\tGCC 4.5\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2342.htm\r\n\r\n// #define GLM_CXX11_DEFAULTED_FUNCTIONS\r\n// #define GLM_CXX11_DELETED_FUNCTIONS\r\n// Defaulted and deleted functions\tN2346\tGCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm\r\n\r\n// \r\n// Extended friend declarations\tN1791\tGCC 4.7\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1791.pdf\r\n\r\n// \r\n// Extending sizeof\tN2253\tGCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2253.html\r\n\r\n// #define GLM_CXX11_INLINE_NAMESPACES\r\n// Inline namespaces\tN2535\tGCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2535.htm\r\n\r\n// #define GLM_CXX11_UNRESTRICTED_UNIONS\r\n// Unrestricted unions\tN2544\tGCC 4.6\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf\r\n\r\n// #define GLM_CXX11_LOCAL_TYPE_TEMPLATE_ARGS\r\n// Local and unnamed types as template arguments\tN2657\tGCC 4.5\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm\r\n\r\n// #define GLM_CXX11_RANGE_FOR\r\n// Range-based for\tN2930\tGCC 4.6\r\n// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2930.html\r\n\r\n// #define GLM_CXX11_OVERRIDE_CONTROL\r\n// Explicit virtual overrides\tN2928 N3206 N3272\tGCC 4.7\r\n// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm\r\n\r\n// \r\n// Minimal support for garbage collection and reachability-based leak detection\tN2670\tNo\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2670.htm\r\n\r\n// #define GLM_CXX11_NOEXCEPT\r\n// Allowing move constructors to throw [noexcept]\tN3050\tGCC 4.6 (core language only)\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3050.html\r\n\r\n// \r\n// Defining move special member functions\tN3053\tGCC 4.6\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3053.html\r\n\r\n// \r\n// Sequence points\tN2239\tYes\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html\r\n\r\n// \r\n// Atomic operations\tN2427\tGCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html\r\n\r\n// \r\n// Strong Compare and Exchange\tN2748\tGCC 4.5\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html\r\n\r\n// \r\n// Bidirectional Fences\tN2752\tGCC 4.8\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2752.htm\r\n\r\n// \r\n// Memory model\tN2429\tGCC 4.8\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2429.htm\r\n\r\n// \r\n// Data-dependency ordering: atomics and memory model\tN2664\tGCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2664.htm\r\n\r\n// \r\n// Propagating exceptions\tN2179\tGCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html\r\n\r\n// \r\n// Abandoning a process and at_quick_exit\tN2440\tGCC 4.8\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2440.htm\r\n\r\n// \r\n// Allow atomics use in signal handlers\tN2547\tYes\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2547.htm\r\n\r\n// \r\n// Thread-local storage\tN2659\tGCC 4.8\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm\r\n\r\n// \r\n// Dynamic initialization and destruction with concurrency\tN2660\tGCC 4.3\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm\r\n\r\n// \r\n// __func__ predefined identifier\tN2340\tGCC 4.3\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2340.htm\r\n\r\n// \r\n// C99 preprocessor\tN1653\tGCC 4.3\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm\r\n\r\n// \r\n// long long\tN1811\tGCC 4.3\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1811.pdf\r\n\r\n// \r\n// Extended integral types\tN1988\tYes\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1988.pdf\r\n\r\n#if(GLM_COMPILER & GLM_COMPILER_GCC)\r\n\r\n#\tif(GLM_COMPILER >= GLM_COMPILER_GCC43)\r\n#\t\tdefine GLM_CXX11_STATIC_ASSERT\r\n#\tendif\r\n\r\n#elif(GLM_COMPILER & GLM_COMPILER_CLANG)\r\n#\tif(__has_feature(cxx_exceptions))\r\n#\t\tdefine GLM_CXX98_EXCEPTIONS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_rtti))\r\n#\t\tdefine GLM_CXX98_RTTI\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_access_control_sfinae))\r\n#\t\tdefine GLM_CXX11_ACCESS_CONTROL_SFINAE\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_alias_templates))\r\n#\t\tdefine GLM_CXX11_ALIAS_TEMPLATE\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_alignas))\r\n#\t\tdefine GLM_CXX11_ALIGNAS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_attributes))\r\n#\t\tdefine GLM_CXX11_ATTRIBUTES\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_constexpr))\r\n#\t\tdefine GLM_CXX11_CONSTEXPR\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_decltype))\r\n#\t\tdefine GLM_CXX11_DECLTYPE\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_default_function_template_args))\r\n#\t\tdefine GLM_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_defaulted_functions))\r\n#\t\tdefine GLM_CXX11_DEFAULTED_FUNCTIONS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_delegating_constructors))\r\n#\t\tdefine GLM_CXX11_DELEGATING_CONSTRUCTORS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_deleted_functions))\r\n#\t\tdefine GLM_CXX11_DELETED_FUNCTIONS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_explicit_conversions))\r\n#\t\tdefine GLM_CXX11_EXPLICIT_CONVERSIONS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_generalized_initializers))\r\n#\t\tdefine GLM_CXX11_GENERALIZED_INITIALIZERS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_implicit_moves))\r\n#\t\tdefine GLM_CXX11_IMPLICIT_MOVES\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_inheriting_constructors))\r\n#\t\tdefine GLM_CXX11_INHERITING_CONSTRUCTORS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_inline_namespaces))\r\n#\t\tdefine GLM_CXX11_INLINE_NAMESPACES\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_lambdas))\r\n#\t\tdefine GLM_CXX11_LAMBDAS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_local_type_template_args))\r\n#\t\tdefine GLM_CXX11_LOCAL_TYPE_TEMPLATE_ARGS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_noexcept))\r\n#\t\tdefine GLM_CXX11_NOEXCEPT\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_nonstatic_member_init))\r\n#\t\tdefine GLM_CXX11_NONSTATIC_MEMBER_INIT\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_nullptr))\r\n#\t\tdefine GLM_CXX11_NULLPTR\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_override_control))\r\n#\t\tdefine GLM_CXX11_OVERRIDE_CONTROL\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_reference_qualified_functions))\r\n#\t\tdefine GLM_CXX11_REFERENCE_QUALIFIED_FUNCTIONS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_range_for))\r\n#\t\tdefine GLM_CXX11_RANGE_FOR\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_raw_string_literals))\r\n#\t\tdefine GLM_CXX11_RAW_STRING_LITERALS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_rvalue_references))\r\n#\t\tdefine GLM_CXX11_RVALUE_REFERENCES\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_static_assert))\r\n#\t\tdefine GLM_CXX11_STATIC_ASSERT\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_auto_type))\r\n#\t\tdefine GLM_CXX11_AUTO_TYPE\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_strong_enums))\r\n#\t\tdefine GLM_CXX11_STRONG_ENUMS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_trailing_return))\r\n#\t\tdefine GLM_CXX11_TRAILING_RETURN\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_unicode_literals))\r\n#\t\tdefine GLM_CXX11_UNICODE_LITERALS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_unrestricted_unions))\r\n#\t\tdefine GLM_CXX11_UNRESTRICTED_UNIONS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_user_literals))\r\n#\t\tdefine GLM_CXX11_USER_LITERALS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_variadic_templates))\r\n#\t\tdefine GLM_CXX11_VARIADIC_TEMPLATES\r\n#\tendif\r\n\r\n#endif//(GLM_COMPILER & GLM_COMPILER_CLANG)\r\n\r\n#endif//glm_core_features\r\n"
  },
  {
    "path": "cpu/glm/detail/_fixes.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/_fixes.hpp\r\n/// @date 2011-02-21 / 2011-11-22\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include <cmath>\r\n\r\n//! Workaround for compatibility with other libraries\r\n#ifdef max\r\n#undef max\r\n#endif\r\n\r\n//! Workaround for compatibility with other libraries\r\n#ifdef min\r\n#undef min\r\n#endif\r\n\r\n//! Workaround for Android\r\n#ifdef isnan\r\n#undef isnan\r\n#endif\r\n\r\n//! Workaround for Android\r\n#ifdef isinf\r\n#undef isinf\r\n#endif\r\n\r\n//! Workaround for Chrone Native Client\r\n#ifdef log2\r\n#undef log2\r\n#endif\r\n\r\n"
  },
  {
    "path": "cpu/glm/detail/_literals.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/_literals.hpp\r\n/// @date 2013-05-06 / 2013-05-06\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_literals\r\n#define glm_core_literals\r\n\r\nnamespace glm\r\n{\r\n#define GLM_CXX11_USER_LITERALS\r\n#ifdef GLM_CXX11_USER_LITERALS\r\n/*\r\n\tGLM_FUNC_QUALIFIER detail::half operator \"\" _h(long double const s)\r\n\t{\r\n\t\treturn detail::half(s);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER float operator \"\" _f(long double const s)\r\n\t{\r\n\t\treturn static_cast<float>(s);\r\n\t}\r\n*/\r\n#endif//GLM_CXX11_USER_LITERALS\r\n\r\n}//namespace glm\r\n\r\n#endif//glm_core_literals\r\n"
  },
  {
    "path": "cpu/glm/detail/_noise.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/detail/_noise.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_DETAIL_NOISE_INCLUDED\r\n#define GLM_DETAIL_NOISE_INCLUDED\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T mod289(T const & x)\r\n\t{\r\n\t\treturn x - floor(x * static_cast<T>(1.0) / static_cast<T>(289.0)) * static_cast<T>(289.0);\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T permute(T const & x)\r\n\t{\r\n\t\treturn mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> permute(tvec2<T, P> const & x)\r\n\t{\r\n\t\treturn mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> permute(tvec3<T, P> const & x)\r\n\t{\r\n\t\treturn mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> permute(tvec4<T, P> const & x)\r\n\t{\r\n\t\treturn mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);\r\n\t}\r\n/*\r\n\ttemplate <typename T, precision P, template<typename> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> permute(vecType<T, P> const & x)\r\n\t{\r\n\t\treturn mod289(((x * T(34)) + T(1)) * x);\r\n\t}\r\n*/\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T taylorInvSqrt(T const & r)\r\n\t{\r\n\t\treturn T(1.79284291400159) - T(0.85373472095314) * r;\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> taylorInvSqrt(detail::tvec2<T, P> const & r)\r\n\t{\r\n\t\treturn T(1.79284291400159) - T(0.85373472095314) * r;\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> taylorInvSqrt(detail::tvec3<T, P> const & r)\r\n\t{\r\n\t\treturn T(1.79284291400159) - T(0.85373472095314) * r;\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> taylorInvSqrt(detail::tvec4<T, P> const & r)\r\n\t{\r\n\t\treturn T(1.79284291400159) - T(0.85373472095314) * r;\r\n\t}\r\n/*\r\n\ttemplate <typename T, precision P, template<typename> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> taylorInvSqrt(vecType<T, P> const & r)\r\n\t{\r\n\t\treturn T(1.79284291400159) - T(0.85373472095314) * r;\r\n\t}\r\n*/\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> fade(detail::tvec2<T, P> const & t)\r\n\t{\r\n\t\treturn (t * t * t) * (t * (t * T(6) - T(15)) + T(10));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> fade(detail::tvec3<T, P> const & t)\r\n\t{\r\n\t\treturn (t * t * t) * (t * (t * T(6) - T(15)) + T(10));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> fade(detail::tvec4<T, P> const & t)\r\n\t{\r\n\t\treturn (t * t * t) * (t * (t * T(6) - T(15)) + T(10));\r\n\t}\r\n/*\r\n\ttemplate <typename T, precision P, template <typename> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> fade(vecType<T, P> const & t)\r\n\t{\r\n\t\treturn (t * t * t) * (t * (t * T(6) - T(15)) + T(10));\r\n\t}\r\n*/\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#endif//GLM_DETAIL_NOISE_INCLUDED\r\n\r\n"
  },
  {
    "path": "cpu/glm/detail/_swizzle.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/_swizzle.hpp\r\n/// @date 2006-04-20 / 2011-02-16\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_swizzle\r\n#define glm_core_swizzle\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\t// Internal class for implementing swizzle operators\r\n\ttemplate <typename T, int N>\r\n\tstruct _swizzle_base0\r\n\t{\r\n\t\ttypedef T       value_type;\r\n\r\n\tprotected:\r\n\t\tGLM_FUNC_QUALIFIER value_type&         elem   (size_t i)       { return (reinterpret_cast<value_type*>(_buffer))[i]; }\r\n\t\tGLM_FUNC_QUALIFIER const value_type&   elem   (size_t i) const { return (reinterpret_cast<const value_type*>(_buffer))[i]; }\r\n\r\n\t\t// Use an opaque buffer to *ensure* the compiler doesn't call a constructor.\r\n\t\t// The size 1 buffer is assumed to aligned to the actual members so that the\r\n\t\t// elem() \r\n\t\tchar    _buffer[1];\r\n\t};\r\n\r\n\ttemplate <typename T, precision P, typename V, int E0, int E1, int E2, int E3, int N>\r\n\tstruct _swizzle_base1 : public _swizzle_base0<T, N>\r\n\t{\r\n\t};\r\n\r\n\ttemplate <typename T, precision P, typename V, int E0, int E1>\r\n\tstruct _swizzle_base1<T, P, V,E0,E1,-1,-2,2> : public _swizzle_base0<T, 2>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER V operator ()()  const { return V(this->elem(E0), this->elem(E1)); }\r\n\t};\r\n\r\n\ttemplate <typename T, precision P, typename V, int E0, int E1, int E2>\r\n\tstruct _swizzle_base1<T, P, V,E0,E1,E2,-1,3> : public _swizzle_base0<T, 3>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER V operator ()()  const { return V(this->elem(E0), this->elem(E1), this->elem(E2)); }\r\n\t};\r\n\r\n\ttemplate <typename T, precision P, typename V, int E0, int E1, int E2, int E3>\r\n\tstruct _swizzle_base1<T, P, V,E0,E1,E2,E3,4> : public _swizzle_base0<T, 4>\r\n\t{ \r\n\t\tGLM_FUNC_QUALIFIER V operator ()()  const { return V(this->elem(E0), this->elem(E1), this->elem(E2), this->elem(E3)); }\r\n\t};\r\n\r\n\t// Internal class for implementing swizzle operators\r\n\t/*\r\n\t\tTemplate parameters:\r\n\r\n\t\tValueType = type of scalar values (e.g. float, double)\r\n\t\tVecType   = class the swizzle is applies to (e.g. tvec3<float>)\r\n\t\tN         = number of components in the vector (e.g. 3)\r\n\t\tE0...3    = what index the n-th element of this swizzle refers to in the unswizzled vec\r\n\r\n\t\tDUPLICATE_ELEMENTS = 1 if there is a repeated element, 0 otherwise (used to specialize swizzles\r\n\t\t\tcontaining duplicate elements so that they cannot be used as r-values).            \r\n\t*/\r\n\ttemplate <typename ValueType, precision P, typename VecType, int N, int E0, int E1, int E2, int E3, int DUPLICATE_ELEMENTS>\r\n\tstruct _swizzle_base2 : public _swizzle_base1<ValueType, P, VecType,E0,E1,E2,E3,N>\r\n\t{\r\n\t\ttypedef VecType vec_type;\r\n\t\ttypedef ValueType value_type;\r\n\r\n\t\tGLM_FUNC_QUALIFIER _swizzle_base2& operator= (const ValueType& t)\r\n\t\t{\r\n\t\t\tfor (int i = 0; i < N; ++i)\r\n\t\t\t\t(*this)[i] = t;\r\n\t\t\treturn *this;\r\n\t\t}\r\n\r\n\t\tGLM_FUNC_QUALIFIER _swizzle_base2& operator= (const VecType& that)\r\n\t\t{\r\n\t\t\tstruct op { \r\n\t\t\t\tGLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e = t; } \r\n\t\t\t};\r\n\t\t\t_apply_op(that, op());\r\n\t\t\treturn *this;\r\n\t\t}\r\n\r\n\t\tGLM_FUNC_QUALIFIER void operator -= (const VecType& that)\r\n\t\t{\r\n\t\t\tstruct op { \r\n\t\t\t\tGLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e -= t; } \r\n\t\t\t};\r\n\t\t\t_apply_op(that, op());\r\n\t\t}\r\n\r\n\t\tGLM_FUNC_QUALIFIER void operator += (const VecType& that)\r\n\t\t{\r\n\t\t\tstruct op { \r\n\t\t\t\tGLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e += t; } \r\n\t\t\t};\r\n\t\t\t_apply_op(that, op());\r\n\t\t}\r\n\r\n\t\tGLM_FUNC_QUALIFIER void operator *= (const VecType& that)\r\n\t\t{\r\n\t\t\tstruct op { \r\n\t\t\t\tGLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e *= t; } \r\n\t\t\t};\r\n\t\t\t_apply_op(that, op());\r\n\t\t}\r\n\r\n\t\tGLM_FUNC_QUALIFIER void operator /= (const VecType& that)\r\n\t\t{\r\n\t\t\tstruct op { \r\n\t\t\t\tGLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e /= t; } \r\n\t\t\t};\r\n\t\t\t_apply_op(that, op());\r\n\t\t}\r\n\r\n\t\tGLM_FUNC_QUALIFIER value_type& operator[]  (size_t i)\r\n\t\t{\r\n#ifndef __CUDA_ARCH__\r\n\t\t\tstatic\r\n#endif\r\n\t\t\t\tconst int offset_dst[4] = { E0, E1, E2, E3 };\r\n\t\t\treturn this->elem(offset_dst[i]);\r\n\t\t}\r\n\t\tGLM_FUNC_QUALIFIER value_type  operator[]  (size_t i) const\r\n\t\t{\r\n#ifndef __CUDA_ARCH__\r\n\t\t\tstatic\r\n#endif\r\n\t\t\t\tconst int offset_dst[4] = { E0, E1, E2, E3 };\r\n\t\t\treturn this->elem(offset_dst[i]);\r\n\t\t}\r\n\tprotected:\r\n\t\ttemplate <typename T>\r\n\t\tGLM_FUNC_QUALIFIER void _apply_op(const VecType& that, T op)\r\n\t\t{\r\n\t\t\t// Make a copy of the data in this == &that.\r\n\t\t\t// The copier should optimize out the copy in cases where the function is\r\n\t\t\t// properly inlined and the copy is not necessary.\r\n\t\t\tValueType t[N];\r\n\t\t\tfor (int i = 0; i < N; ++i)\r\n\t\t\t\tt[i] = that[i];\r\n\t\t\tfor (int i = 0; i < N; ++i)\r\n\t\t\t\top( (*this)[i], t[i] );\r\n\t\t}\r\n\t};\r\n\r\n\t// Specialization for swizzles containing duplicate elements.  These cannot be modified.\r\n\ttemplate <typename ValueType, precision P, typename VecType, int N, int E0, int E1, int E2, int E3>\r\n\tstruct _swizzle_base2<ValueType, P, VecType,N,E0,E1,E2,E3,1> : public _swizzle_base1<ValueType, P, VecType,E0,E1,E2,E3,N>\r\n\t{\r\n\t\ttypedef VecType         vec_type;        \r\n\t\ttypedef ValueType       value_type;\r\n\r\n\t\tstruct Stub {};\r\n\t\tGLM_FUNC_QUALIFIER _swizzle_base2& operator= (Stub const &) { return *this; }\r\n\r\n\t\tGLM_FUNC_QUALIFIER value_type  operator[]  (size_t i) const\r\n\t\t{\r\n#ifndef __CUDA_ARCH__\r\n\t\t\tstatic\r\n#endif\r\n\t\t\t\tconst int offset_dst[4] = { E0, E1, E2, E3 };\r\n\t\t\treturn this->elem(offset_dst[i]);\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <int N,typename ValueType, precision P, typename VecType, int E0,int E1,int E2,int E3>\r\n\tstruct _swizzle : public _swizzle_base2<ValueType, P, VecType, N,E0,E1,E2,E3,(E0==E1||E0==E2||E0==E3||E1==E2||E1==E3||E2==E3)>\r\n\t{\r\n\t\ttypedef _swizzle_base2<ValueType, P, VecType,N,E0,E1,E2,E3,(E0==E1||E0==E2||E0==E3||E1==E2||E1==E3||E2==E3)> base_type;\r\n\r\n\t\tusing base_type::operator=;\r\n\r\n\t\tGLM_FUNC_QUALIFIER operator VecType () const { return (*this)(); }\r\n\t};\r\n\r\n//\r\n// To prevent the C++ syntax from getting entirely overwhelming, define some alias macros\r\n//\r\n#define _GLM_SWIZZLE_TEMPLATE1   template <int N, typename T, precision P, typename V, int E0, int E1, int E2, int E3>\r\n#define _GLM_SWIZZLE_TEMPLATE2   template <int N, typename T, precision P, typename V, int E0, int E1, int E2, int E3, int F0, int F1, int F2, int F3>\r\n#define _GLM_SWIZZLE_TYPE1       _swizzle<N, T, P, V, E0, E1, E2, E3>\r\n#define _GLM_SWIZZLE_TYPE2       _swizzle<N, T, P, V, F0, F1, F2, F3>\r\n\r\n//\r\n// Wrapper for a binary operator (e.g. u.yy + v.zy)\r\n//\r\n#define _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND)                 \\\r\n\t_GLM_SWIZZLE_TEMPLATE2                                                          \\\r\n\tGLM_FUNC_QUALIFIER V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b)  \\\r\n\t{                                                                               \\\r\n\t\treturn a() OPERAND b();                                                     \\\r\n\t}                                                                               \\\r\n\t_GLM_SWIZZLE_TEMPLATE1                                                          \\\r\n\tGLM_FUNC_QUALIFIER V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const V& b)                   \\\r\n\t{                                                                               \\\r\n\t\treturn a() OPERAND b;                                                       \\\r\n\t}                                                                               \\\r\n\t_GLM_SWIZZLE_TEMPLATE1                                                          \\\r\n\tGLM_FUNC_QUALIFIER V operator OPERAND ( const V& a, const _GLM_SWIZZLE_TYPE1& b)                   \\\r\n\t{                                                                               \\\r\n\t\treturn a OPERAND b();                                                       \\\r\n\t}\r\n\r\n//\r\n// Wrapper for a operand between a swizzle and a binary (e.g. 1.0f - u.xyz)\r\n//\r\n#define _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND)                 \\\r\n\t_GLM_SWIZZLE_TEMPLATE1                                                          \\\r\n\tGLM_FUNC_QUALIFIER V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const T& b)                   \\\r\n\t{                                                                               \\\r\n\t\treturn a() OPERAND b;                                                       \\\r\n\t}                                                                               \\\r\n\t_GLM_SWIZZLE_TEMPLATE1                                                          \\\r\n\tGLM_FUNC_QUALIFIER V operator OPERAND ( const T& a, const _GLM_SWIZZLE_TYPE1& b)                   \\\r\n\t{                                                                               \\\r\n\t\treturn a OPERAND b();                                                       \\\r\n\t}\r\n\r\n//\r\n// Macro for wrapping a function taking one argument (e.g. abs())\r\n//\r\n#define _GLM_SWIZZLE_FUNCTION_1_ARGS(RETURN_TYPE,FUNCTION)                          \\\r\n\t_GLM_SWIZZLE_TEMPLATE1                                                          \\\r\n\tGLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a)  \\\r\n\t{                                                                               \\\r\n\t\treturn FUNCTION(a());                                                       \\\r\n\t}\r\n\r\n//\r\n// Macro for wrapping a function taking two vector arguments (e.g. dot()).\r\n//\r\n#define _GLM_SWIZZLE_FUNCTION_2_ARGS(RETURN_TYPE,FUNCTION)                                                      \\\r\n\t_GLM_SWIZZLE_TEMPLATE2                                                                                      \\\r\n\tGLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \\\r\n\t{                                                                                                           \\\r\n\t\treturn FUNCTION(a(), b());                                                                              \\\r\n\t}                                                                                                           \\\r\n\t_GLM_SWIZZLE_TEMPLATE1                                                                                      \\\r\n\tGLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b) \\\r\n\t{                                                                                                           \\\r\n\t\treturn FUNCTION(a(), b());                                                                              \\\r\n\t}                                                                                                           \\\r\n\t_GLM_SWIZZLE_TEMPLATE1                                                                                      \\\r\n\tGLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename V& b)         \\\r\n\t{                                                                                                           \\\r\n\t\treturn FUNCTION(a(), b);                                                                                \\\r\n\t}                                                                                                           \\\r\n\t_GLM_SWIZZLE_TEMPLATE1                                                                                      \\\r\n\tGLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const V& a, const _GLM_SWIZZLE_TYPE1& b)                  \\\r\n\t{                                                                                                           \\\r\n\t\treturn FUNCTION(a, b());                                                                                \\\r\n\t} \r\n\r\n//\r\n// Macro for wrapping a function take 2 vec arguments followed by a scalar (e.g. mix()).\r\n//\r\n#define _GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(RETURN_TYPE,FUNCTION)                                                             \\\r\n\t_GLM_SWIZZLE_TEMPLATE2                                                                                                    \\\r\n\tGLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b, const T& c)   \\\r\n\t{                                                                                                                         \\\r\n\t\treturn FUNCTION(a(), b(), c);                                                                                         \\\r\n\t}                                                                                                                         \\\r\n\t_GLM_SWIZZLE_TEMPLATE1                                                                                                    \\\r\n\tGLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b, const T& c)   \\\r\n\t{                                                                                                                         \\\r\n\t\treturn FUNCTION(a(), b(), c);                                                                                         \\\r\n\t}                                                                                                                         \\\r\n\t_GLM_SWIZZLE_TEMPLATE1                                                                                                    \\\r\n\tGLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename S0::vec_type& b, const T& c)\\\r\n\t{                                                                                                                         \\\r\n\t\treturn FUNCTION(a(), b, c);                                                                                           \\\r\n\t}                                                                                                                         \\\r\n\t_GLM_SWIZZLE_TEMPLATE1                                                                                                    \\\r\n\tGLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const typename V& a, const _GLM_SWIZZLE_TYPE1& b, const T& c)           \\\r\n\t{                                                                                                                         \\\r\n\t\treturn FUNCTION(a, b(), c);                                                                                           \\\r\n\t} \r\n \r\n}//namespace detail \r\n}//namespace glm\r\n\r\nnamespace glm\r\n{\r\n\tnamespace detail\r\n\t{\r\n\t\t_GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(-)\r\n\t\t_GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(*)\r\n\t\t_GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(+)\r\n\t\t_GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(-)\r\n\t\t_GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(*)\r\n\t\t_GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(/)\r\n\t}\r\n\r\n\t//\r\n\t// Swizzles are distinct types from the unswizzled type.  The below macros will\r\n\t// provide template specializations for the swizzle types for the given functions\r\n\t// so that the compiler does not have any ambiguity to choosing how to handle\r\n\t// the function.\r\n\t//\r\n\t// The alternative is to use the operator()() when calling the function in order\r\n\t// to explicitly convert the swizzled type to the unswizzled type.\r\n\t//\r\n\r\n\t//_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type,    abs);\r\n\t//_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type,    acos);\r\n\t//_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type,    acosh);\r\n\t//_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type,    all);\r\n\t//_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type,    any);\r\n\r\n\t//_GLM_SWIZZLE_FUNCTION_2_ARGS(value_type,  dot);\r\n\t//_GLM_SWIZZLE_FUNCTION_2_ARGS(vec_type,    cross);\r\n\t//_GLM_SWIZZLE_FUNCTION_2_ARGS(vec_type,    step);    \r\n\t//_GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(vec_type, mix);\r\n}\r\n\r\n#define _GLM_SWIZZLE2_2_MEMBERS(T, P, V, E0,E1) \\\r\n\tstruct { _swizzle<2, T, P, V<T, P>, 0,0,-1,-2> E0 ## E0; }; \\\r\n\tstruct { _swizzle<2, T, P, V<T, P>, 0,1,-1,-2> E0 ## E1; }; \\\r\n\tstruct { _swizzle<2, T, P, V<T, P>, 1,0,-1,-2> E1 ## E0; }; \\\r\n\tstruct { _swizzle<2, T, P, V<T, P>, 1,1,-1,-2> E1 ## E1; }; \r\n\r\n#define _GLM_SWIZZLE2_3_MEMBERS(T, P, V, E0,E1) \\\r\n\tstruct { _swizzle<3,T, P, V<T, P>, 0,0,0,-1> E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<3,T, P, V<T, P>, 0,0,1,-1> E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<3,T, P, V<T, P>, 0,1,0,-1> E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<3,T, P, V<T, P>, 0,1,1,-1> E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<3,T, P, V<T, P>, 1,0,0,-1> E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<3,T, P, V<T, P>, 1,0,1,-1> E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<3,T, P, V<T, P>, 1,1,0,-1> E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<3,T, P, V<T, P>, 1,1,1,-1> E1 ## E1 ## E1; };  \r\n\r\n#define _GLM_SWIZZLE2_4_MEMBERS(T, P, V, E0,E1) \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,1,1> E1 ## E1 ## E1 ## E1; };  \r\n\r\n#define _GLM_SWIZZLE3_2_MEMBERS(T, P, V, E0,E1,E2) \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 0,0,-1,-2> E0 ## E0; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 0,1,-1,-2> E0 ## E1; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 0,2,-1,-2> E0 ## E2; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 1,0,-1,-2> E1 ## E0; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 1,1,-1,-2> E1 ## E1; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 1,2,-1,-2> E1 ## E2; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 2,0,-1,-2> E2 ## E0; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 2,1,-1,-2> E2 ## E1; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 2,2,-1,-2> E2 ## E2; }; \r\n\r\n#define _GLM_SWIZZLE3_3_MEMBERS(T, P, V ,E0,E1,E2) \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,0,0,-1> E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,0,1,-1> E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,0,2,-1> E0 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,1,0,-1> E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,1,1,-1> E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,1,2,-1> E0 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,2,0,-1> E0 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,2,1,-1> E0 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,2,2,-1> E0 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,0,0,-1> E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,0,1,-1> E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,0,2,-1> E1 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,1,0,-1> E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,1,1,-1> E1 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,1,2,-1> E1 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,2,0,-1> E1 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,2,1,-1> E1 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,2,2,-1> E1 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,0,0,-1> E2 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,0,1,-1> E2 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,0,2,-1> E2 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,1,0,-1> E2 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,1,1,-1> E2 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,1,2,-1> E2 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,2,0,-1> E2 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,2,1,-1> E2 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,2,2,-1> E2 ## E2 ## E2; };\r\n\r\n#define _GLM_SWIZZLE3_4_MEMBERS(T, P, V, E0,E1,E2) \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,0,2> E0 ## E0 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,1,2> E0 ## E0 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,2,0> E0 ## E0 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,2,1> E0 ## E0 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,2,2> E0 ## E0 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,0,2> E0 ## E1 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,1,2> E0 ## E1 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,2,0> E0 ## E1 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,2,1> E0 ## E1 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,2,2> E0 ## E1 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,2,0,0> E0 ## E2 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,2,0,1> E0 ## E2 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,2,0,2> E0 ## E2 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,2,1,0> E0 ## E2 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,2,1,1> E0 ## E2 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,2,1,2> E0 ## E2 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,2,2,0> E0 ## E2 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,2,2,1> E0 ## E2 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,2,2,2> E0 ## E2 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,0,2> E1 ## E0 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,1,2> E1 ## E0 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,2,0> E1 ## E0 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,2,1> E1 ## E0 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,2,2> E1 ## E0 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,0,2> E1 ## E1 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,1,1> E1 ## E1 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,1,2> E1 ## E1 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,2,0> E1 ## E1 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,2,1> E1 ## E1 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,2,2> E1 ## E1 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,2,0,0> E1 ## E2 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,2,0,1> E1 ## E2 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,2,0,2> E1 ## E2 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,2,1,0> E1 ## E2 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,2,1,1> E1 ## E2 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,2,1,2> E1 ## E2 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,2,2,0> E1 ## E2 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,2,2,1> E1 ## E2 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,2,2,2> E1 ## E2 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,0,0,0> E2 ## E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,0,0,1> E2 ## E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,0,0,2> E2 ## E0 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,0,1,0> E2 ## E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,0,1,1> E2 ## E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,0,1,2> E2 ## E0 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,0,2,0> E2 ## E0 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,0,2,1> E2 ## E0 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,0,2,2> E2 ## E0 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,1,0,0> E2 ## E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,1,0,1> E2 ## E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,1,0,2> E2 ## E1 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,1,1,0> E2 ## E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,1,1,1> E2 ## E1 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,1,1,2> E2 ## E1 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,1,2,0> E2 ## E1 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,1,2,1> E2 ## E1 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,1,2,2> E2 ## E1 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,2,0,0> E2 ## E2 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,2,0,1> E2 ## E2 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,2,0,2> E2 ## E2 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,2,1,0> E2 ## E2 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,2,1,1> E2 ## E2 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,2,1,2> E2 ## E2 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,2,2,0> E2 ## E2 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,2,2,1> E2 ## E2 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,2,2,2> E2 ## E2 ## E2 ## E2; }; \r\n\r\n#define _GLM_SWIZZLE4_2_MEMBERS(T, P, V, E0,E1,E2,E3) \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 0,0,-1,-2> E0 ## E0; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 0,1,-1,-2> E0 ## E1; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 0,2,-1,-2> E0 ## E2; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 0,3,-1,-2> E0 ## E3; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 1,0,-1,-2> E1 ## E0; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 1,1,-1,-2> E1 ## E1; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 1,2,-1,-2> E1 ## E2; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 1,3,-1,-2> E1 ## E3; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 2,0,-1,-2> E2 ## E0; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 2,1,-1,-2> E2 ## E1; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 2,2,-1,-2> E2 ## E2; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 2,3,-1,-2> E2 ## E3; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 3,0,-1,-2> E3 ## E0; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 3,1,-1,-2> E3 ## E1; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 3,2,-1,-2> E3 ## E2; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 3,3,-1,-2> E3 ## E3; }; \r\n\r\n#define _GLM_SWIZZLE4_3_MEMBERS(T,P, V, E0,E1,E2,E3) \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,0,0,-1> E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,0,1,-1> E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,0,2,-1> E0 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,0,3,-1> E0 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,1,0,-1> E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,1,1,-1> E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,1,2,-1> E0 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,1,3,-1> E0 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,2,0,-1> E0 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,2,1,-1> E0 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,2,2,-1> E0 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,2,3,-1> E0 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,3,0,-1> E0 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,3,1,-1> E0 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,3,2,-1> E0 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,3,3,-1> E0 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,0,0,-1> E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,0,1,-1> E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,0,2,-1> E1 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,0,3,-1> E1 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,1,0,-1> E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,1,1,-1> E1 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,1,2,-1> E1 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,1,3,-1> E1 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,2,0,-1> E1 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,2,1,-1> E1 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,2,2,-1> E1 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,2,3,-1> E1 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,3,0,-1> E1 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,3,1,-1> E1 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,3,2,-1> E1 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,3,3,-1> E1 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,0,0,-1> E2 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,0,1,-1> E2 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,0,2,-1> E2 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,0,3,-1> E2 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,1,0,-1> E2 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,1,1,-1> E2 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,1,2,-1> E2 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,1,3,-1> E2 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,2,0,-1> E2 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,2,1,-1> E2 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,2,2,-1> E2 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,2,3,-1> E2 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,3,0,-1> E2 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,3,1,-1> E2 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,3,2,-1> E2 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,3,3,-1> E2 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,0,0,-1> E3 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,0,1,-1> E3 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,0,2,-1> E3 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,0,3,-1> E3 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,1,0,-1> E3 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,1,1,-1> E3 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,1,2,-1> E3 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,1,3,-1> E3 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,2,0,-1> E3 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,2,1,-1> E3 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,2,2,-1> E3 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,2,3,-1> E3 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,3,0,-1> E3 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,3,1,-1> E3 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,3,2,-1> E3 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,3,3,-1> E3 ## E3 ## E3; };  \r\n\r\n#define _GLM_SWIZZLE4_4_MEMBERS(T, P, V, E0,E1,E2,E3) \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,0,2> E0 ## E0 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,0,3> E0 ## E0 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,1,2> E0 ## E0 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,1,3> E0 ## E0 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,2,0> E0 ## E0 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,2,1> E0 ## E0 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,2,2> E0 ## E0 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,2,3> E0 ## E0 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,3,0> E0 ## E0 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,3,1> E0 ## E0 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,3,2> E0 ## E0 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,3,3> E0 ## E0 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,0,2> E0 ## E1 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,0,3> E0 ## E1 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,1,2> E0 ## E1 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,1,3> E0 ## E1 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,2,0> E0 ## E1 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,2,1> E0 ## E1 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,2,2> E0 ## E1 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,2,3> E0 ## E1 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,3,0> E0 ## E1 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,3,1> E0 ## E1 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,3,2> E0 ## E1 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,3,3> E0 ## E1 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,0,0> E0 ## E2 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,0,1> E0 ## E2 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,0,2> E0 ## E2 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,0,3> E0 ## E2 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,1,0> E0 ## E2 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,1,1> E0 ## E2 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,1,2> E0 ## E2 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,1,3> E0 ## E2 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,2,0> E0 ## E2 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,2,1> E0 ## E2 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,2,2> E0 ## E2 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,2,3> E0 ## E2 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,3,0> E0 ## E2 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,3,1> E0 ## E2 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,3,2> E0 ## E2 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,3,3> E0 ## E2 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,0,0> E0 ## E3 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,0,1> E0 ## E3 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,0,2> E0 ## E3 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,0,3> E0 ## E3 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,1,0> E0 ## E3 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,1,1> E0 ## E3 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,1,2> E0 ## E3 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,1,3> E0 ## E3 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,2,0> E0 ## E3 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,2,1> E0 ## E3 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,2,2> E0 ## E3 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,2,3> E0 ## E3 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,3,0> E0 ## E3 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,3,1> E0 ## E3 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,3,2> E0 ## E3 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,3,3> E0 ## E3 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,0,2> E1 ## E0 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,0,3> E1 ## E0 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,1,2> E1 ## E0 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,1,3> E1 ## E0 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,2,0> E1 ## E0 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,2,1> E1 ## E0 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,2,2> E1 ## E0 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,2,3> E1 ## E0 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,3,0> E1 ## E0 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,3,1> E1 ## E0 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,3,2> E1 ## E0 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,3,3> E1 ## E0 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,0,2> E1 ## E1 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,0,3> E1 ## E1 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,1,1> E1 ## E1 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,1,2> E1 ## E1 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,1,3> E1 ## E1 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,2,0> E1 ## E1 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,2,1> E1 ## E1 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,2,2> E1 ## E1 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,2,3> E1 ## E1 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,3,0> E1 ## E1 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,3,1> E1 ## E1 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,3,2> E1 ## E1 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,3,3> E1 ## E1 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,0,0> E1 ## E2 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,0,1> E1 ## E2 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,0,2> E1 ## E2 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,0,3> E1 ## E2 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,1,0> E1 ## E2 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,1,1> E1 ## E2 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,1,2> E1 ## E2 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,1,3> E1 ## E2 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,2,0> E1 ## E2 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,2,1> E1 ## E2 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,2,2> E1 ## E2 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,2,3> E1 ## E2 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,3,0> E1 ## E2 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,3,1> E1 ## E2 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,3,2> E1 ## E2 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,3,3> E1 ## E2 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,0,0> E1 ## E3 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,0,1> E1 ## E3 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,0,2> E1 ## E3 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,0,3> E1 ## E3 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,1,0> E1 ## E3 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,1,1> E1 ## E3 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,1,2> E1 ## E3 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,1,3> E1 ## E3 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,2,0> E1 ## E3 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,2,1> E1 ## E3 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,2,2> E1 ## E3 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,2,3> E1 ## E3 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,3,0> E1 ## E3 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,3,1> E1 ## E3 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,3,2> E1 ## E3 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,3,3> E1 ## E3 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,0,0> E2 ## E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,0,1> E2 ## E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,0,2> E2 ## E0 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,0,3> E2 ## E0 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,1,0> E2 ## E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,1,1> E2 ## E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,1,2> E2 ## E0 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,1,3> E2 ## E0 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,2,0> E2 ## E0 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,2,1> E2 ## E0 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,2,2> E2 ## E0 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,2,3> E2 ## E0 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,3,0> E2 ## E0 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,3,1> E2 ## E0 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,3,2> E2 ## E0 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,3,3> E2 ## E0 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,0,0> E2 ## E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,0,1> E2 ## E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,0,2> E2 ## E1 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,0,3> E2 ## E1 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,1,0> E2 ## E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,1,1> E2 ## E1 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,1,2> E2 ## E1 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,1,3> E2 ## E1 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,2,0> E2 ## E1 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,2,1> E2 ## E1 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,2,2> E2 ## E1 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,2,3> E2 ## E1 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,3,0> E2 ## E1 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,3,1> E2 ## E1 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,3,2> E2 ## E1 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,3,3> E2 ## E1 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,0,0> E2 ## E2 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,0,1> E2 ## E2 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,0,2> E2 ## E2 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,0,3> E2 ## E2 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,1,0> E2 ## E2 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,1,1> E2 ## E2 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,1,2> E2 ## E2 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,1,3> E2 ## E2 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,2,0> E2 ## E2 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,2,1> E2 ## E2 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,2,2> E2 ## E2 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,2,3> E2 ## E2 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,3,0> E2 ## E2 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,3,1> E2 ## E2 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,3,2> E2 ## E2 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,3,3> E2 ## E2 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,0,0> E2 ## E3 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,0,1> E2 ## E3 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,0,2> E2 ## E3 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,0,3> E2 ## E3 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,1,0> E2 ## E3 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,1,1> E2 ## E3 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,1,2> E2 ## E3 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,1,3> E2 ## E3 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,2,0> E2 ## E3 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,2,1> E2 ## E3 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,2,2> E2 ## E3 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,2,3> E2 ## E3 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,3,0> E2 ## E3 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,3,1> E2 ## E3 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,3,2> E2 ## E3 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,3,3> E2 ## E3 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,0,0> E3 ## E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,0,1> E3 ## E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,0,2> E3 ## E0 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,0,3> E3 ## E0 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,1,0> E3 ## E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,1,1> E3 ## E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,1,2> E3 ## E0 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,1,3> E3 ## E0 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,2,0> E3 ## E0 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,2,1> E3 ## E0 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,2,2> E3 ## E0 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,2,3> E3 ## E0 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,3,0> E3 ## E0 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,3,1> E3 ## E0 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,3,2> E3 ## E0 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,3,3> E3 ## E0 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,0,0> E3 ## E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,0,1> E3 ## E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,0,2> E3 ## E1 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,0,3> E3 ## E1 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,1,0> E3 ## E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,1,1> E3 ## E1 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,1,2> E3 ## E1 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,1,3> E3 ## E1 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,2,0> E3 ## E1 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,2,1> E3 ## E1 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,2,2> E3 ## E1 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,2,3> E3 ## E1 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,3,0> E3 ## E1 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,3,1> E3 ## E1 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,3,2> E3 ## E1 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,3,3> E3 ## E1 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,0,0> E3 ## E2 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,0,1> E3 ## E2 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,0,2> E3 ## E2 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,0,3> E3 ## E2 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,1,0> E3 ## E2 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,1,1> E3 ## E2 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,1,2> E3 ## E2 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,1,3> E3 ## E2 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,2,0> E3 ## E2 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,2,1> E3 ## E2 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,2,2> E3 ## E2 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,2,3> E3 ## E2 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,3,0> E3 ## E2 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,3,1> E3 ## E2 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,3,2> E3 ## E2 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,3,3> E3 ## E2 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,0,0> E3 ## E3 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,0,1> E3 ## E3 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,0,2> E3 ## E3 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,0,3> E3 ## E3 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,1,0> E3 ## E3 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,1,1> E3 ## E3 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,1,2> E3 ## E3 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,1,3> E3 ## E3 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,2,0> E3 ## E3 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,2,1> E3 ## E3 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,2,2> E3 ## E3 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,2,3> E3 ## E3 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,3,0> E3 ## E3 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,3,1> E3 ## E3 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,3,2> E3 ## E3 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,3,3> E3 ## E3 ## E3 ## E3; };\r\n\r\n#endif//glm_core_swizzle\r\n"
  },
  {
    "path": "cpu/glm/detail/_swizzle_func.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/_swizzle_func.hpp\r\n/// @date 2011-10-16 / 2011-10-16\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_swizzle_func\r\n#define glm_core_swizzle_func\r\n\r\n#define GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B)\t\\\r\n\tSWIZZLED_TYPE<TMPL_TYPE, PRECISION> A ## B() CONST\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B);\t\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C)\t\t\\\r\n\tSWIZZLED_TYPE<TMPL_TYPE, PRECISION> A ## B ## C() CONST\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B, this->C);\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C, D)\t\\\r\n\tSWIZZLED_TYPE<TMPL_TYPE, PRECISION> A ## B ## C ## D() CONST\t\t\t\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B, this->C, this->D);\t\t\t\t\t\\\r\n\t}\r\n\r\n#define GLM_SWIZZLE_GEN_VEC2_ENTRY_DEF(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B)\t\\\r\n\ttemplate <typename TMPL_TYPE>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\tSWIZZLED_TYPE<TMPL_TYPE> CLASS_TYPE<TMPL_TYPE, PRECISION>::A ## B() CONST\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B);\t\t\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define GLM_SWIZZLE_GEN_VEC3_ENTRY_DEF(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C)\t\t\\\r\n\ttemplate <typename TMPL_TYPE>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\tSWIZZLED_TYPE<TMPL_TYPE> CLASS_TYPE<TMPL_TYPE, PRECISION>::A ## B ## C() CONST\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B, this->C);\t\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define GLM_SWIZZLE_GEN_VEC4_ENTRY_DEF(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C, D)\t\\\r\n\ttemplate <typename TMPL_TYPE>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\tSWIZZLED_TYPE<TMPL_TYPE> CLASS_TYPE<TMPL_TYPE, PRECISION>::A ## B ## C ## D() CONST\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B, this->C, this->D);\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define GLM_MUTABLE\r\n\r\n#define GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A)\r\n\r\n#define GLM_SWIZZLE_GEN_REF_FROM_VEC2(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE) \\\r\n\tGLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, x, y) \\\r\n\tGLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, r, g) \\\r\n\tGLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, s, t)\r\n\r\n//GLM_SWIZZLE_GEN_REF_FROM_VEC2(valType, detail::vec2, detail::ref2)\r\n\r\n#define GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B)\r\n\r\n#define GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B, A)\r\n\r\n#define GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C)\r\n\r\n#define GLM_SWIZZLE_GEN_REF_FROM_VEC3(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE) \\\r\n\tGLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, x, y, z) \\\r\n\tGLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, r, g, b) \\\r\n\tGLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, s, t, p)\r\n\r\n//GLM_SWIZZLE_GEN_REF_FROM_VEC3(valType, detail::vec3, detail::ref2, detail::ref3)\r\n\r\n#define GLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, C)\r\n\r\n#define GLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, C, B)\r\n\r\n#define GLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, C, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, C, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, D, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, D, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, B, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, C, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, C, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, D, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, D, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, A, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, A, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, B, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, B, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, D, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, D, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, A, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, A, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, C, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, B, C, A)\r\n\r\n#define GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D)\r\n\r\n#define GLM_SWIZZLE_GEN_REF_FROM_VEC4(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \\\r\n\tGLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z, w) \\\r\n\tGLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b, a) \\\r\n\tGLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, p, q)\r\n\r\n//GLM_SWIZZLE_GEN_REF_FROM_VEC4(valType, detail::vec4, detail::ref2, detail::ref3, detail::ref4)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC_FROM_VEC2(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE)\t\t\t\\\r\n\tGLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y)\t\\\r\n\tGLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g)\t\\\r\n\tGLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t)\r\n\r\n//GLM_SWIZZLE_GEN_VEC_FROM_VEC2(valType, detail::vec2, detail::vec2, detail::vec3, detail::vec4)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, C)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC_FROM_VEC3(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \\\r\n\tGLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z) \\\r\n\tGLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b) \\\r\n\tGLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, p)\r\n\r\n//GLM_SWIZZLE_GEN_VEC_FROM_VEC3(valType, detail::vec3, detail::vec2, detail::vec3, detail::vec4)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, D)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC_FROM_VEC4(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \\\r\n\tGLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z, w) \\\r\n\tGLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b, a) \\\r\n\tGLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, p, q)\r\n\r\n//GLM_SWIZZLE_GEN_VEC_FROM_VEC4(valType, detail::vec4, detail::vec2, detail::vec3, detail::vec4)\r\n\r\n#endif//glm_core_swizzle_func\r\n"
  },
  {
    "path": "cpu/glm/detail/_vectorize.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/_vectorize.hpp\r\n/// @date 2011-10-14 / 2011-10-14\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_CORE_DETAIL_INCLUDED\r\n#define GLM_CORE_DETAIL_INCLUDED\r\n\r\n#include \"type_vec1.hpp\"\r\n#include \"type_vec2.hpp\"\r\n#include \"type_vec3.hpp\"\r\n#include \"type_vec4.hpp\"\r\n\r\n#define VECTORIZE1_VEC(func)\t\t\t\t\t\t\\\r\n\ttemplate <typename T, precision P>\t\t\t\t\\\r\n\tGLM_FUNC_QUALIFIER detail::tvec1<T, P> func(\t\\\r\n\t\tdetail::tvec1<T, P> const & v)\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn detail::tvec1<T, P>(\t\t\t\t\t\\\r\n\t\t\tfunc(v.x));\t\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define VECTORIZE2_VEC(func)\t\t\t\t\t\t\\\r\n\ttemplate <typename T, precision P>\t\t\t\t\\\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> func(\t\\\r\n\t\tdetail::tvec2<T, P> const & v)\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn detail::tvec2<T, P>(\t\t\t\t\t\\\r\n\t\t\tfunc(v.x),\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(v.y));\t\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define VECTORIZE3_VEC(func)\t\t\t\t\t\t\\\r\n\ttemplate <typename T, precision P>\t\t\t\t\\\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> func(\t\\\r\n\t\tdetail::tvec3<T, P> const & v)\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn detail::tvec3<T, P>(\t\t\t\t\t\\\r\n\t\t\tfunc(v.x),\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(v.y),\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(v.z));\t\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define VECTORIZE4_VEC(func)\t\t\t\t\t\t\\\r\n\ttemplate <typename T, precision P>\t\t\t\t\\\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> func(\t\\\r\n\t\tdetail::tvec4<T, P> const & v)\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn detail::tvec4<T, P>(\t\t\t\t\t\\\r\n\t\t\tfunc(v.x),\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(v.y),\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(v.z),\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(v.w));\t\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define VECTORIZE_VEC(func)\t\t\\\r\n\tVECTORIZE1_VEC(func)\t\t\\\r\n\tVECTORIZE2_VEC(func)\t\t\\\r\n\tVECTORIZE3_VEC(func)\t\t\\\r\n\tVECTORIZE4_VEC(func)\r\n\r\n#define VECTORIZE1_VEC_SCA(func)\t\t\t\t\t\t\t\\\r\n\ttemplate <typename T, precision P>\t\t\t\t\t\t\\\r\n\tGLM_FUNC_QUALIFIER detail::tvec1<T, P> func\t\t\t\t\\\r\n\t(\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\tdetail::tvec1<T, P> const & x,\t\t\t\t\t\t\\\r\n\t\tT const & y\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn detail::tvec1<T, P>(\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.x, y));\t\t\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define VECTORIZE2_VEC_SCA(func)\t\t\t\t\t\t\t\\\r\n\ttemplate <typename T, precision P>\t\t\t\t\t\t\\\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> func\t\t\t\t\\\r\n\t(\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\tdetail::tvec2<T, P> const & x,\t\t\t\t\t\t\\\r\n\t\tT const & y\t\\\r\n\t)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn detail::tvec2<T, P>(\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.x, y),\t\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.y, y));\t\t\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define VECTORIZE3_VEC_SCA(func)\t\t\t\t\t\t\t\\\r\n\ttemplate <typename T, precision P>\t\t\t\t\t\t\\\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> func\t\t\t\t\\\r\n\t(\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\tdetail::tvec3<T, P> const & x,\t\t\t\t\t\t\\\r\n\t\tT const & y\t\\\r\n\t)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn detail::tvec3<T, P>(\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.x, y),\t\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.y, y),\t\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.z, y));\t\t\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define VECTORIZE4_VEC_SCA(func)\t\t\t\t\t\t\t\\\r\n\ttemplate <typename T, precision P>\t\t\t\t\t\t\\\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> func\t\t\t\t\\\r\n\t(\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\tdetail::tvec4<T, P> const & x,\t\t\t\t\t\t\\\r\n\t\tT const & y\t\\\r\n\t)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn detail::tvec4<T, P>(\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.x, y),\t\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.y, y),\t\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.z, y),\t\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.w, y));\t\t\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define VECTORIZE_VEC_SCA(func)\t\t\\\r\n\tVECTORIZE1_VEC_SCA(func)\t\t\\\r\n\tVECTORIZE2_VEC_SCA(func)\t\t\\\r\n\tVECTORIZE3_VEC_SCA(func)\t\t\\\r\n\tVECTORIZE4_VEC_SCA(func)\r\n\r\n#define VECTORIZE2_VEC_VEC(func)\t\t\t\t\t\\\r\n\ttemplate <typename T, precision P>\t\t\t\t\\\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> func\t\t\\\r\n\t(\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\tdetail::tvec2<T, P> const & x,\t\t\t\t\\\r\n\t\tdetail::tvec2<T, P> const & y\t\t\t\t\\\r\n\t)\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn detail::tvec2<T, P>(\t\t\t\t\t\\\r\n\t\t\tfunc(x.x, y.x),\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.y, y.y));\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define VECTORIZE3_VEC_VEC(func)\t\t\t\t\t\\\r\n\ttemplate <typename T, precision P>\t\t\t\t\\\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> func\t\t\\\r\n\t(\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\tdetail::tvec3<T, P> const & x,\t\t\t\t\\\r\n\t\tdetail::tvec3<T, P> const & y\t\t\t\t\\\r\n\t)\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn detail::tvec3<T, P>(\t\t\t\t\t\\\r\n\t\t\tfunc(x.x, y.x),\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.y, y.y),\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.z, y.z));\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define VECTORIZE4_VEC_VEC(func)\t\t\t\t\\\r\n\ttemplate <typename T, precision P>\t\t\t\\\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> func\t\\\r\n\t(\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\tdetail::tvec4<T, P> const & x,\t\t\t\\\r\n\t\tdetail::tvec4<T, P> const & y\t\t\t\\\r\n\t)\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn detail::tvec4<T, P>(\t\t\t\t\\\r\n\t\t\tfunc(x.x, y.x),\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.y, y.y),\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.z, y.z),\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.w, y.w));\t\t\t\t\t\\\r\n\t}\r\n\r\n#define VECTORIZE_VEC_VEC(func)\t\t\\\r\n\tVECTORIZE2_VEC_VEC(func)\t\t\\\r\n\tVECTORIZE3_VEC_VEC(func)\t\t\\\r\n\tVECTORIZE4_VEC_VEC(func)\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate<bool C>\r\n\tstruct If\r\n\t{\r\n\t\ttemplate<typename F, typename T>\r\n\t\tstatic GLM_FUNC_QUALIFIER T apply(F functor, const T& val)\r\n\t\t{\r\n\t\t\treturn functor(val);\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate<>\r\n\tstruct If<false>\r\n\t{\r\n\t\ttemplate<typename F, typename T>\r\n\t\tstatic GLM_FUNC_QUALIFIER T apply(F, const T& val)\r\n\t\t{\r\n\t\t\treturn val;\r\n\t\t}\r\n\t};\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#endif//GLM_CORE_DETAIL_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/detail/dummy.cpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/dummy.cpp\r\n/// @date 2011-01-19 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///\r\n/// GLM is a header only library. There is nothing to compile. \r\n/// dummy.cpp exist only a wordaround for CMake file.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#define GLM_FORCE_RADIANS\r\n#define GLM_MESSAGES\r\n#include \"../glm.hpp\"\r\n#include <limits>\r\n/*\r\n#if(GLM_ARCH & GLM_ARCH_SSE2)\r\nstruct float4\r\n{\r\n\tunion\r\n\t{\r\n\t\tstruct {float r, g, b, a;};\r\n\t\tstruct {float s, t, p, q;};\r\n\t\tstruct {float x, y, z, w;};\r\n\t\t__m128 data;\r\n\t};\r\n};\r\n\r\nint test_simd()\r\n{\r\n\tfloat4 f;\r\n\r\n\r\n\r\n\treturn 0;\r\n}\r\n\r\n#endif//GLM_ARCH\r\n*/\r\n\r\ntemplate <class T = int>\r\nclass C;\r\n\r\ntemplate <class T>\r\nclass C\r\n{\r\npublic:\r\n\tT value;\r\n};\r\n\r\nint main()\r\n{\r\n/*\r\n#\tif(GLM_ARCH & GLM_ARCH_SSE2)\r\n\t\ttest_simd();\r\n#\tendif\r\n*/ \r\n\r\n\tC<> c;\r\n\r\n\treturn 0;\r\n}\r\n"
  },
  {
    "path": "cpu/glm/detail/func_common.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_common.hpp\r\n/// @date 2008-03-08 / 2010-01-26\r\n/// @author Christophe Riccio\r\n/// \r\n/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n///\r\n/// @defgroup core_func_common Common functions\r\n/// @ingroup core\r\n/// \r\n/// These all operate component-wise. The description is per component.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_FUNC_COMMON_INCLUDED\r\n#define GLM_FUNC_COMMON_INCLUDED\r\n\r\n#include \"setup.hpp\"\r\n#include \"precision.hpp\"\r\n#include \"type_int.hpp\"\r\n#include \"_fixes.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup core_func_common\r\n\t/// @{\r\n\r\n\t/// Returns x if x >= 0; otherwise, it returns -x.\r\n\t/// \r\n\t/// @tparam genType floating-point or signed integer; scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/abs.xml\">GLSL abs man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType abs(genType const & x);\r\n\r\n\t/// Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0. \r\n\t/// \r\n\t/// @tparam genType Floating-point or signed integer; scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/sign.xml\">GLSL sign man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType sign(genType const & x);\r\n\t\r\n\t/// Returns a value equal to the nearest integer that is less then or equal to x. \r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/floor.xml\">GLSL floor man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType floor(genType const & x);\r\n\r\n\t/// Returns a value equal to the nearest integer to x\r\n\t/// whose absolute value is not larger than the absolute value of x.\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/trunc.xml\">GLSL trunc man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType trunc(genType const & x);\r\n\r\n\t/// Returns a value equal to the nearest integer to x.\r\n\t/// The fraction 0.5 will round in a direction chosen by the\r\n\t/// implementation, presumably the direction that is fastest.\r\n\t/// This includes the possibility that round(x) returns the\r\n\t/// same value as roundEven(x) for all values of x.\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/round.xml\">GLSL round man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType round(genType const & x);\r\n\t\r\n\t/// Returns a value equal to the nearest integer to x.\r\n\t/// A fractional part of 0.5 will round toward the nearest even\r\n\t/// integer. (Both 3.5 and 4.5 for x will return 4.0.)\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/roundEven.xml\">GLSL roundEven man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\t/// @see <a href=\"http://developer.amd.com/documentation/articles/pages/New-Round-to-Even-Technique.aspx\">New round to even technique</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType roundEven(genType const & x);\r\n\r\n\t/// Returns a value equal to the nearest integer\r\n\t/// that is greater than or equal to x.\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/ceil.xml\">GLSL ceil man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType ceil(genType const & x);\r\n\r\n\t/// Return x - floor(x).\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/fract.xml\">GLSL fract man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType fract(genType const & x);\r\n\r\n\t/// Modulus. Returns x - y * floor(x / y)\r\n\t/// for each component in x using the floating point value y.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml\">GLSL mod man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType mod(\r\n\t\tgenType const & x,\r\n\t\tgenType const & y);\r\n\r\n\t/// Modulus. Returns x - y * floor(x / y)\r\n\t/// for each component in x using the floating point value y.\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml\">GLSL mod man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType mod(\r\n\t\tgenType const & x,\r\n\t\ttypename genType::value_type const & y);\r\n\r\n\t/// Returns the fractional part of x and sets i to the integer\r\n\t/// part (as a whole number floating point value). Both the\r\n\t/// return value and the output parameter will have the same\r\n\t/// sign as x.\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/modf.xml\">GLSL modf man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType modf(\r\n\t\tgenType const & x,\r\n\t\tgenType & i);\r\n\r\n\t/// Returns y if y < x; otherwise, it returns x.\r\n\t///\r\n\t/// @tparam genType Floating-point or integer; scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/min.xml\">GLSL min man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a><<<<<<< HEAD\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType min(\r\n\t\tgenType const & x,\r\n\t\tgenType const & y);\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType min(\r\n\t\tgenType const & x,\r\n\t\ttypename genType::value_type const & y);\r\n\r\n\t/// Returns y if x < y; otherwise, it returns x.\r\n\t/// \r\n\t/// @tparam genType Floating-point or integer; scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/max.xml\">GLSL max man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType max(\r\n\t\tgenType const & x,\r\n\t\tgenType const & y);\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType max(\r\n\t\tgenType const & x,\r\n\t\ttypename genType::value_type const & y);\r\n\r\n\t/// Returns min(max(x, minVal), maxVal) for each component in x \r\n\t/// using the floating-point values minVal and maxVal.\r\n\t///\r\n\t/// @tparam genType Floating-point or integer; scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/clamp.xml\">GLSL clamp man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType clamp(\r\n\t\tgenType const & x,\r\n\t\tgenType const & minVal,\r\n\t\tgenType const & maxVal);\r\n\r\n\ttemplate <typename genType, precision P>\r\n\tGLM_FUNC_DECL genType clamp(\r\n\t\tgenType const & x,\r\n\t\ttypename genType::value_type const & minVal,\r\n\t\ttypename genType::value_type const & maxVal);\r\n\r\n\t/// If genTypeU is a floating scalar or vector:\r\n\t/// Returns x * (1.0 - a) + y * a, i.e., the linear blend of\r\n\t/// x and y using the floating-point value a.\r\n\t/// The value for a is not restricted to the range [0, 1].\r\n\t/// \r\n\t/// If genTypeU is a boolean scalar or vector:\r\n\t/// Selects which vector each returned component comes\r\n\t/// from. For a component of <a> that is false, the\r\n\t/// corresponding component of x is returned. For a\r\n\t/// component of a that is true, the corresponding\r\n\t/// component of y is returned. Components of x and y that\r\n\t/// are not selected are allowed to be invalid floating point\r\n\t/// values and will have no effect on the results. Thus, this\r\n\t/// provides different functionality than\r\n\t/// genType mix(genType x, genType y, genType(a))\r\n\t/// where a is a Boolean vector.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/mix.xml\">GLSL mix man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\t/// \r\n\t/// @param[in]  x Value to interpolate.\r\n\t/// @param[in]  y Value to interpolate.\r\n\t/// @param[in]  a Interpolant.\r\n\t/// \r\n\t/// @tparam\tgenTypeT Floating point scalar or vector.\r\n\t/// @tparam genTypeU Floating point or boolean scalar or vector. It can't be a vector if it is the length of genTypeT.\r\n\t/// \r\n\t/// @code\r\n\t/// #include <glm/glm.hpp>\r\n\t/// ...\r\n\t/// float a;\r\n\t/// bool b;\r\n\t/// glm::dvec3 e;\r\n\t/// glm::dvec3 f;\r\n\t/// glm::vec4 g;\r\n\t/// glm::vec4 h;\r\n\t/// ...\r\n\t/// glm::vec4 r = glm::mix(g, h, a); // Interpolate with a floating-point scalar two vectors. \r\n\t/// glm::vec4 s = glm::mix(g, h, b); // Teturns g or h;\r\n\t/// glm::dvec3 t = glm::mix(e, f, a); // Types of the third parameter is not required to match with the first and the second.\r\n\t/// glm::vec4 u = glm::mix(g, h, r); // Interpolations can be perform per component with a vector for the last parameter.\r\n\t/// @endcode\r\n\ttemplate <typename T, typename U, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL vecType<T, P> mix(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y,\r\n\t\tvecType<U, P> const & a);\r\n\r\n\ttemplate <typename T, typename U, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL vecType<T, P> mix(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y,\r\n\t\tU const & a);\r\n\r\n\ttemplate <typename genTypeT, typename genTypeU>\r\n\tGLM_FUNC_DECL genTypeT mix(\r\n\t\tgenTypeT const & x,\r\n\t\tgenTypeT const & y,\r\n\t\tgenTypeU const & a);\r\n\r\n\t/// Returns 0.0 if x < edge, otherwise it returns 1.0 for each component of a genType.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/step.xml\">GLSL step man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType step(\r\n\t\tgenType const & edge,\r\n\t\tgenType const & x);\r\n\r\n\t/// Returns 0.0 if x < edge, otherwise it returns 1.0.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/step.xml\">GLSL step man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <template <typename, precision> class vecType, typename T, precision P>\r\n\tGLM_FUNC_DECL vecType<T, P> step(\r\n\t\tT const & edge,\r\n\t\tvecType<T, P> const & x);\r\n\r\n\t/// Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and\r\n\t/// performs smooth Hermite interpolation between 0 and 1\r\n\t/// when edge0 < x < edge1. This is useful in cases where\r\n\t/// you would want a threshold function with a smooth\r\n\t/// transition. This is equivalent to:\r\n\t/// genType t;\r\n\t/// t = clamp ((x - edge0) / (edge1 - edge0), 0, 1);\r\n\t/// return t * t * (3 - 2 * t);\r\n\t/// Results are undefined if edge0 >= edge1.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/smoothstep.xml\">GLSL smoothstep man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType smoothstep(\r\n\t\tgenType const & edge0,\r\n\t\tgenType const & edge1,\r\n\t\tgenType const & x);\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType smoothstep(\r\n\t\ttypename genType::value_type const & edge0,\r\n\t\ttypename genType::value_type const & edge1,\r\n\t\tgenType const & x);\r\n\r\n\t/// Returns true if x holds a NaN (not a number)\r\n\t/// representation in the underlying implementation's set of\r\n\t/// floating point representations. Returns false otherwise,\r\n\t/// including for implementations with no NaN\r\n\t/// representations.\r\n\t/// \r\n\t/// /!\\ When using compiler fast math, this function may fail.\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/isnan.xml\">GLSL isnan man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL typename genType::bool_type isnan(genType const & x);\r\n\r\n\t/// Returns true if x holds a positive infinity or negative\r\n\t/// infinity representation in the underlying implementation's\r\n\t/// set of floating point representations. Returns false\r\n\t/// otherwise, including for implementations with no infinity\r\n\t/// representations.\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/isinf.xml\">GLSL isinf man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL typename genType::bool_type isinf(genType const & x);\r\n\r\n\t/// Returns a signed integer value representing\r\n\t/// the encoding of a floating-point value. The floating-point\r\n\t/// value's bit-level representation is preserved.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToInt.xml\">GLSL floatBitsToInt man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\tGLM_FUNC_DECL int floatBitsToInt(float const & v);\r\n\r\n\t/// Returns a signed integer value representing\r\n\t/// the encoding of a floating-point value. The floatingpoint\r\n\t/// value's bit-level representation is preserved.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToInt.xml\">GLSL floatBitsToInt man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <template <typename, precision> class vecType, precision P>\r\n\tGLM_FUNC_DECL vecType<int, P> floatBitsToInt(vecType<float, P> const & v);\r\n\r\n\t/// Returns a unsigned integer value representing\r\n\t/// the encoding of a floating-point value. The floatingpoint\r\n\t/// value's bit-level representation is preserved.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToUint.xml\">GLSL floatBitsToUint man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\tGLM_FUNC_DECL uint floatBitsToUint(float const & v);\r\n\r\n\t/// Returns a unsigned integer value representing\r\n\t/// the encoding of a floating-point value. The floatingpoint\r\n\t/// value's bit-level representation is preserved.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToUint.xml\">GLSL floatBitsToUint man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <template <typename, precision> class vecType, precision P>\r\n\tGLM_FUNC_DECL vecType<uint, P> floatBitsToUint(vecType<float, P> const & v);\r\n\r\n\t/// Returns a floating-point value corresponding to a signed\r\n\t/// integer encoding of a floating-point value.\r\n\t/// If an inf or NaN is passed in, it will not signal, and the\r\n\t/// resulting floating point value is unspecified. Otherwise,\r\n\t/// the bit-level representation is preserved.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/intBitsToFloat.xml\">GLSL intBitsToFloat man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\tGLM_FUNC_DECL float intBitsToFloat(int const & v);\r\n\r\n\t/// Returns a floating-point value corresponding to a signed\r\n\t/// integer encoding of a floating-point value.\r\n\t/// If an inf or NaN is passed in, it will not signal, and the\r\n\t/// resulting floating point value is unspecified. Otherwise,\r\n\t/// the bit-level representation is preserved.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/intBitsToFloat.xml\">GLSL intBitsToFloat man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <template <typename, precision> class vecType, precision P>\r\n\tGLM_FUNC_DECL vecType<float, P> intBitsToFloat(vecType<int, P> const & v);\r\n\r\n\t/// Returns a floating-point value corresponding to a\r\n\t/// unsigned integer encoding of a floating-point value.\r\n\t/// If an inf or NaN is passed in, it will not signal, and the\r\n\t/// resulting floating point value is unspecified. Otherwise,\r\n\t/// the bit-level representation is preserved.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/uintBitsToFloat.xml\">GLSL uintBitsToFloat man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\tGLM_FUNC_DECL float uintBitsToFloat(uint const & v);\r\n\r\n\t/// Returns a floating-point value corresponding to a\r\n\t/// unsigned integer encoding of a floating-point value.\r\n\t/// If an inf or NaN is passed in, it will not signal, and the\r\n\t/// resulting floating point value is unspecified. Otherwise,\r\n\t/// the bit-level representation is preserved.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/uintBitsToFloat.xml\">GLSL uintBitsToFloat man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <template <typename, precision> class vecType, precision P>\r\n\tGLM_FUNC_DECL vecType<float, P> uintBitsToFloat(vecType<uint, P> const & v);\r\n\r\n\t/// Computes and returns a * b + c.\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/fma.xml\">GLSL fma man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType fma(genType const & a, genType const & b, genType const & c);\r\n\r\n\t/// Splits x into a floating-point significand in the range\r\n\t/// [0.5, 1.0) and an integral exponent of two, such that:\r\n\t/// x = significand * exp(2, exponent)\r\n\t/// \r\n\t/// The significand is returned by the function and the\r\n\t/// exponent is returned in the parameter exp. For a\r\n\t/// floating-point value of zero, the significant and exponent\r\n\t/// are both zero. For a floating-point value that is an\r\n\t/// infinity or is not a number, the results are undefined.\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/frexp.xml\">GLSL frexp man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType, typename genIType>\r\n\tGLM_FUNC_DECL genType frexp(genType const & x, genIType & exp);\r\n\r\n\t/// Builds a floating-point number from x and the\r\n\t/// corresponding integral exponent of two in exp, returning:\r\n\t/// significand * exp(2, exponent)\r\n\t/// \r\n\t/// If this product is too large to be represented in the\r\n\t/// floating-point type, the result is undefined.\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///  \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/ldexp.xml\">GLSL ldexp man page</a>; \r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType, typename genIType>\r\n\tGLM_FUNC_DECL genType ldexp(genType const & x, genIType const & exp);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"func_common.inl\"\r\n\r\n#endif//GLM_FUNC_COMMON_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/detail/func_common.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_common.inl\r\n/// @date 2008-08-03 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"func_vector_relational.hpp\"\r\n#include \"type_vec2.hpp\"\r\n#include \"type_vec3.hpp\"\r\n#include \"type_vec4.hpp\"\r\n#include \"_vectorize.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename genFIType, bool /*signed*/>\r\n\tstruct compute_abs\r\n\t{};\r\n\r\n\ttemplate <typename genFIType>\r\n\tstruct compute_abs<genFIType, true>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static genFIType call(genFIType const & x)\r\n\t\t{\r\n\t\t\tGLM_STATIC_ASSERT(\r\n\t\t\t\tstd::numeric_limits<genFIType>::is_iec559 || std::numeric_limits<genFIType>::is_signed,\r\n\t\t\t\t\"'abs' only accept floating-point and integer scalar or vector inputs\");\r\n\t\t\treturn x >= genFIType(0) ? x : -x;\r\n\t\t\t// TODO, perf comp with: *(((int *) &x) + 1) &= 0x7fffffff;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename genFIType>\r\n\tstruct compute_abs<genFIType, false>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static genFIType call(genFIType const & x)\r\n\t\t{\r\n\t\t\tGLM_STATIC_ASSERT(\r\n\t\t\t\t!std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer,\r\n\t\t\t\t\"'abs' only accept floating-point and integer scalar or vector inputs\");\r\n\t\t\treturn x;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, typename U, precision P, template <class, precision> class vecType>\r\n\tstruct compute_mix_vector\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, vecType<U, P> const & a)\r\n\t\t{\r\n\t\t\tGLM_STATIC_ASSERT(std::numeric_limits<U>::is_iec559, \"'mix' only accept floating-point inputs for the interpolator a\");\r\n\r\n\t\t\treturn vecType<T, P>(vecType<U, P>(x) + a * vecType<U, P>(y - x));\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P, template <class, precision> class vecType>\r\n\tstruct compute_mix_vector<T, bool, P, vecType>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, vecType<bool, P> const & a)\r\n\t\t{\r\n\t\t\tvecType<T, P> Result;\r\n\t\t\tfor(length_t i = 0; i < x.length(); ++i)\r\n\t\t\t\tResult[i] = a[i] ? y[i] : x[i];\r\n\t\t\treturn Result;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, typename U, precision P, template <class, precision> class vecType>\r\n\tstruct compute_mix_scalar\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, U const & a)\r\n\t\t{\r\n\t\t\tGLM_STATIC_ASSERT(std::numeric_limits<U>::is_iec559, \"'mix' only accept floating-point inputs for the interpolator a\");\r\n\r\n\t\t\treturn vecType<T, P>(vecType<U, P>(x) + a * vecType<U, P>(y - x));\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P, template <class, precision> class vecType>\r\n\tstruct compute_mix_scalar<T, bool, P, vecType>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, bool const & a)\r\n\t\t{\r\n\t\t\treturn a ? y : x;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, typename U>\r\n\tstruct compute_mix\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static T call(T const & x, T const & y, U const & a)\r\n\t\t{\r\n\t\t\tGLM_STATIC_ASSERT(std::numeric_limits<U>::is_iec559, \"'mix' only accept floating-point inputs for the interpolator a\");\r\n\r\n\t\t\treturn static_cast<T>(static_cast<U>(x) + a * static_cast<U>(y - x));\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T>\r\n\tstruct compute_mix<T, bool>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static T call(T const & x, T const & y, bool const & a)\r\n\t\t{\r\n\t\t\treturn a ? y : x;\r\n\t\t}\r\n\t};\r\n}//namespace detail\r\n\r\n\t// abs\r\n\ttemplate <typename genFIType>\r\n\tGLM_FUNC_QUALIFIER genFIType abs\r\n\t(\r\n\t\tgenFIType const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::compute_abs<genFIType, std::numeric_limits<genFIType>::is_signed>::call(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(abs)\r\n\r\n\t// sign\r\n\t//Try something like based on x >> 31 to get the sign bit\r\n\ttemplate <typename genFIType> \r\n\tGLM_FUNC_QUALIFIER genFIType sign\r\n\t(\r\n\t\tgenFIType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genFIType>::is_iec559 ||\r\n\t\t\t(std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer), \"'sign' only accept signed inputs\");\r\n\r\n\t\tgenFIType result;\r\n\t\tif(x > genFIType(0))\r\n\t\t\tresult = genFIType(1);\r\n\t\telse if(x < genFIType(0))\r\n\t\t\tresult = genFIType(-1);\r\n\t\telse\r\n\t\t\tresult = genFIType(0);\r\n\t\treturn result;\r\n\t}\r\n\t\r\n\tVECTORIZE_VEC(sign)\r\n\r\n\t// floor\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType floor(genType const & x)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'floor' only accept floating-point inputs\");\r\n\r\n\t\treturn ::std::floor(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(floor)\r\n\r\n\t// trunc\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType trunc(genType const & x)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'trunc' only accept floating-point inputs\");\r\n\r\n\t\t// TODO, add C++11 std::trunk\r\n\t\treturn x < 0 ? -floor(-x) : floor(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(trunc)\r\n\r\n\t// round\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType round(genType const& x)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'round' only accept floating-point inputs\");\r\n\r\n\t\t// TODO, add C++11 std::round\r\n\t\treturn x < 0 ? genType(int(x - genType(0.5))) : genType(int(x + genType(0.5)));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(round)\r\n\r\n/*\r\n\t// roundEven\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType roundEven(genType const& x)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'roundEven' only accept floating-point inputs\");\r\n\r\n\t\treturn genType(int(x + genType(int(x) % 2)));\r\n\t}\r\n*/\r\n\t\r\n\t// roundEven\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType roundEven(genType const & x)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'roundEven' only accept floating-point inputs\");\r\n\t\t\r\n\t\tint Integer = static_cast<int>(x);\r\n\t\tgenType IntegerPart = static_cast<genType>(Integer);\r\n\t\tgenType FractionalPart = fract(x);\r\n\r\n\t\tif(FractionalPart > static_cast<genType>(0.5) || FractionalPart < static_cast<genType>(0.5))\r\n\t\t{\r\n\t\t\treturn round(x);\r\n\t\t}\r\n\t\telse if((Integer % 2) == 0)\r\n\t\t{\r\n\t\t\treturn IntegerPart;\r\n\t\t}\r\n\t\telse if(x <= static_cast<genType>(0)) // Work around... \r\n\t\t{\r\n\t\t\treturn IntegerPart - static_cast<genType>(1);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn IntegerPart + static_cast<genType>(1);\r\n\t\t}\r\n\t\t//else // Bug on MinGW 4.5.2\r\n\t\t//{\r\n\t\t//\treturn mix(IntegerPart + genType(-1), IntegerPart + genType(1), x <= genType(0));\r\n\t\t//}\r\n\t}\r\n\t\r\n\tVECTORIZE_VEC(roundEven)\r\n\r\n\t// ceil\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType ceil(genType const & x)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'ceil' only accept floating-point inputs\");\r\n\r\n\t\treturn ::std::ceil(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(ceil)\r\n\r\n\t// fract\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType fract\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'fract' only accept floating-point inputs\");\r\n\r\n\t\treturn x - floor(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(fract)\r\n\r\n\t// mod\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType mod\r\n\t(\r\n\t\tgenType const & x, \r\n\t\tgenType const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'mod' only accept floating-point inputs\");\r\n\r\n\t\treturn x - y * floor(x / y);\r\n\t}\r\n\r\n\tVECTORIZE_VEC_SCA(mod)\r\n\tVECTORIZE_VEC_VEC(mod)\r\n\r\n\t// modf\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType modf\r\n\t(\r\n\t\tgenType const & x, \r\n\t\tgenType & i\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'modf' only accept floating-point inputs\");\r\n\r\n\t\treturn std::modf(x, &i);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> modf\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x,\r\n\t\tdetail::tvec2<T, P> & i\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tmodf(x.x, i.x),\r\n\t\t\tmodf(x.y, i.y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> modf\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<T, P> & i\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tmodf(x.x, i.x),\r\n\t\t\tmodf(x.y, i.y),\r\n\t\t\tmodf(x.z, i.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> modf\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & x,\r\n\t\tdetail::tvec4<T, P> & i\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tmodf(x.x, i.x),\r\n\t\t\tmodf(x.y, i.y),\r\n\t\t\tmodf(x.z, i.z),\r\n\t\t\tmodf(x.w, i.w));\r\n\t}\r\n\r\n\t//// Only valid if (INT_MIN <= x-y <= INT_MAX)\r\n\t//// min(x,y)\r\n\t//r = y + ((x - y) & ((x - y) >> (sizeof(int) *\r\n\t//CHAR_BIT - 1)));\r\n\t//// max(x,y)\r\n\t//r = x - ((x - y) & ((x - y) >> (sizeof(int) *\r\n\t//CHAR_BIT - 1)));\r\n\r\n\t// min\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType min\r\n\t(\r\n\t\tgenType const & x,\r\n\t\tgenType const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559 || std::numeric_limits<genType>::is_integer,\r\n\t\t\t\"'min' only accept floating-point or integer inputs\");\r\n\r\n\t\treturn x < y ? x : y;\r\n\t}\r\n\r\n\tVECTORIZE_VEC_SCA(min)\r\n\tVECTORIZE_VEC_VEC(min)\r\n\r\n\t// max\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType max\r\n\t(\r\n\t\tgenType const & x,\r\n\t\tgenType const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559 || std::numeric_limits<genType>::is_integer,\r\n\t\t\t\"'max' only accept floating-point or integer inputs\");\r\n\r\n\t\treturn x > y ? x : y;\r\n\t}\r\n\r\n\tVECTORIZE_VEC_SCA(max)\r\n\tVECTORIZE_VEC_VEC(max)\r\n\r\n\t// clamp\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType clamp\r\n\t(\r\n\t\tgenType const & x,\r\n\t\tgenType const & minVal,\r\n\t\tgenType const & maxVal\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559 || std::numeric_limits<genType>::is_integer,\r\n\t\t\t\"'clamp' only accept floating-point or integer inputs\");\r\n\t\t\r\n\t\treturn min(maxVal, max(minVal, x));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> clamp\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x,\r\n\t\tT const & minVal,\r\n\t\tT const & maxVal\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,\r\n\t\t\t\"'clamp' only accept floating-point or integer inputs\");\r\n\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tclamp(x.x, minVal, maxVal),\r\n\t\t\tclamp(x.y, minVal, maxVal));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> clamp\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tT const & minVal,\r\n\t\tT const & maxVal\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,\r\n\t\t\t\"'clamp' only accept floating-point or integer inputs\");\r\n\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tclamp(x.x, minVal, maxVal),\r\n\t\t\tclamp(x.y, minVal, maxVal),\r\n\t\t\tclamp(x.z, minVal, maxVal));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> clamp\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & x,\r\n\t\tT const & minVal,\r\n\t\tT const & maxVal\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,\r\n\t\t\t\"'clamp' only accept floating-point or integer inputs\");\r\n\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tclamp(x.x, minVal, maxVal),\r\n\t\t\tclamp(x.y, minVal, maxVal),\r\n\t\t\tclamp(x.z, minVal, maxVal),\r\n\t\t\tclamp(x.w, minVal, maxVal));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> clamp\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x,\r\n\t\tdetail::tvec2<T, P> const & minVal,\r\n\t\tdetail::tvec2<T, P> const & maxVal\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,\r\n\t\t\t\"'clamp' only accept floating-point or integer inputs\");\r\n\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tclamp(x.x, minVal.x, maxVal.x),\r\n\t\t\tclamp(x.y, minVal.y, maxVal.y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> clamp\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<T, P> const & minVal,\r\n\t\tdetail::tvec3<T, P> const & maxVal\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,\r\n\t\t\t\"'clamp' only accept floating-point or integer inputs\");\r\n\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tclamp(x.x, minVal.x, maxVal.x),\r\n\t\t\tclamp(x.y, minVal.y, maxVal.y),\r\n\t\t\tclamp(x.z, minVal.z, maxVal.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> clamp\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & x,\r\n\t\tdetail::tvec4<T, P> const & minVal,\r\n\t\tdetail::tvec4<T, P> const & maxVal\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,\r\n\t\t\t\"'clamp' only accept floating-point or integer inputs\");\r\n\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tclamp(x.x, minVal.x, maxVal.x),\r\n\t\t\tclamp(x.y, minVal.y, maxVal.y),\r\n\t\t\tclamp(x.z, minVal.z, maxVal.z),\r\n\t\t\tclamp(x.w, minVal.w, maxVal.w));\r\n\t}\r\n\r\n\ttemplate <typename T, typename U, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> mix\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y,\r\n\t\tvecType<U, P> const & a\r\n\t)\r\n\t{\r\n\t\treturn detail::compute_mix_vector<T, U, P, vecType>::call(x, y, a);\r\n\t}\r\n\r\n\ttemplate <typename T, typename U, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> mix\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y,\r\n\t\tU const & a\r\n\t)\r\n\t{\r\n\t\treturn detail::compute_mix_scalar<T, U, P, vecType>::call(x, y, a);\r\n\t}\r\n\r\n\ttemplate <typename genTypeT, typename genTypeU>\r\n\tGLM_FUNC_QUALIFIER genTypeT mix\r\n\t(\r\n\t\tgenTypeT const & x,\r\n\t\tgenTypeT const & y,\r\n\t\tgenTypeU const & a\r\n\t)\r\n\t{\r\n\t\treturn detail::compute_mix<genTypeT, genTypeU>::call(x, y, a);\r\n\t}\r\n\r\n\t// step\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType step\r\n\t(\r\n\t\tgenType const & edge,\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\treturn mix(genType(1), genType(0), glm::lessThan(x, edge));\r\n\t}\r\n\r\n\ttemplate <template <typename, precision> class vecType, typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> step\r\n\t(\r\n\t\tT const & edge,\r\n\t\tvecType<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'step' only accept floating-point inputs\");\r\n\r\n\t\treturn mix(vecType<T, P>(1), vecType<T, P>(0), glm::lessThan(x, vecType<T, P>(edge)));\r\n\t}\r\n\r\n\t// smoothstep\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType smoothstep\r\n\t(\r\n\t\tgenType const & edge0,\r\n\t\tgenType const & edge1,\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'smoothstep' only accept floating-point inputs\");\r\n\r\n\t\tgenType tmp = clamp((x - edge0) / (edge1 - edge0), genType(0), genType(1));\r\n\t\treturn tmp * tmp * (genType(3) - genType(2) * tmp);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> smoothstep\r\n\t(\r\n\t\tT const & edge0,\r\n\t\tT const & edge1,\r\n\t\tdetail::tvec2<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'smoothstep' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tsmoothstep(edge0, edge1, x.x),\r\n\t\t\tsmoothstep(edge0, edge1, x.y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> smoothstep\r\n\t(\r\n\t\tT const & edge0,\r\n\t\tT const & edge1,\r\n\t\tdetail::tvec3<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'smoothstep' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tsmoothstep(edge0, edge1, x.x),\r\n\t\t\tsmoothstep(edge0, edge1, x.y),\r\n\t\t\tsmoothstep(edge0, edge1, x.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> smoothstep\r\n\t(\r\n\t\tT const & edge0,\r\n\t\tT const & edge1,\r\n\t\tdetail::tvec4<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'smoothstep' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tsmoothstep(edge0, edge1, x.x),\r\n\t\t\tsmoothstep(edge0, edge1, x.y),\r\n\t\t\tsmoothstep(edge0, edge1, x.z),\r\n\t\t\tsmoothstep(edge0, edge1, x.w));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> smoothstep\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & edge0,\r\n\t\tdetail::tvec2<T, P> const & edge1,\r\n\t\tdetail::tvec2<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'smoothstep' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tsmoothstep(edge0.x, edge1.x, x.x),\r\n\t\t\tsmoothstep(edge0.y, edge1.y, x.y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> smoothstep\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & edge0,\r\n\t\tdetail::tvec3<T, P> const & edge1,\r\n\t\tdetail::tvec3<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'smoothstep' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tsmoothstep(edge0.x, edge1.x, x.x),\r\n\t\t\tsmoothstep(edge0.y, edge1.y, x.y),\r\n\t\t\tsmoothstep(edge0.z, edge1.z, x.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> smoothstep\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & edge0,\r\n\t\tdetail::tvec4<T, P> const & edge1,\r\n\t\tdetail::tvec4<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'smoothstep' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tsmoothstep(edge0.x, edge1.x, x.x),\r\n\t\t\tsmoothstep(edge0.y, edge1.y, x.y),\r\n\t\t\tsmoothstep(edge0.z, edge1.z, x.z),\r\n\t\t\tsmoothstep(edge0.w, edge1.w, x.w));\r\n\t}\r\n\r\n\t// TODO: Not working on MinGW...\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER bool isnan(genType const & x)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'isnan' only accept floating-point inputs\");\r\n\r\n#\t\tif(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL))\r\n\t\t\treturn _isnan(x) != 0;\r\n#\t\telif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG))\r\n#\t\t\tif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)\r\n\t\t\t\treturn _isnan(x) != 0;\r\n#\t\t\telse\r\n\t\t\t\treturn std::isnan(x);\r\n#\t\t\tendif\r\n#\t\telif(GLM_COMPILER & GLM_COMPILER_CUDA)\r\n\t\t\treturn isnan(x) != 0;\r\n#\t\telse\r\n\t\t\treturn std::isnan(x);\r\n#\t\tendif\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename detail::tvec2<T, P>::bool_type isnan\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'isnan' only accept floating-point inputs\");\r\n\r\n\t\treturn typename detail::tvec2<T, P>::bool_type(\r\n\t\t\tisnan(x.x),\r\n\t\t\tisnan(x.y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename detail::tvec3<T, P>::bool_type isnan\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'isnan' only accept floating-point inputs\");\r\n\r\n\t\treturn typename detail::tvec3<T, P>::bool_type(\r\n\t\t\tisnan(x.x),\r\n\t\t\tisnan(x.y),\r\n\t\t\tisnan(x.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename detail::tvec4<T, P>::bool_type isnan\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'isnan' only accept floating-point inputs\");\r\n\r\n\t\treturn typename detail::tvec4<T, P>::bool_type(\r\n\t\t\tisnan(x.x),\r\n\t\t\tisnan(x.y),\r\n\t\t\tisnan(x.z),\r\n\t\t\tisnan(x.w));\r\n\t}\r\n\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER bool isinf(\r\n\t\tgenType const & x)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'isinf' only accept floating-point inputs\");\r\n\r\n#\t\tif(GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC))\r\n\t\t\treturn _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF;\r\n#\t\telif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG))\r\n#\t\t\tif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)\r\n\t\t\t\treturn _isinf(x) != 0;\r\n#\t\t\telse\r\n\t\t\t\treturn std::isinf(x);\r\n#\t\t\tendif\r\n#\t\telif(GLM_COMPILER & GLM_COMPILER_CUDA)\r\n\t\t\t// http://developer.download.nvidia.com/compute/cuda/4_2/rel/toolkit/docs/online/group__CUDA__MATH__DOUBLE_g13431dd2b40b51f9139cbb7f50c18fab.html#g13431dd2b40b51f9139cbb7f50c18fab\r\n\t\t\treturn isinf(double(x)) != 0;\r\n#\t\telse\r\n\t\t\treturn std::isinf(x);\r\n#\t\tendif\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename detail::tvec2<T, P>::bool_type isinf\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'isinf' only accept floating-point inputs\");\r\n\r\n\t\treturn typename detail::tvec2<T, P>::bool_type(\r\n\t\t\tisinf(x.x),\r\n\t\t\tisinf(x.y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename detail::tvec3<T, P>::bool_type isinf\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'isinf' only accept floating-point inputs\");\r\n\r\n\t\treturn typename detail::tvec3<T, P>::bool_type(\r\n\t\t\tisinf(x.x),\r\n\t\t\tisinf(x.y),\r\n\t\t\tisinf(x.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename detail::tvec4<T, P>::bool_type isinf\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'isinf' only accept floating-point inputs\");\r\n\r\n\t\treturn typename detail::tvec4<T, P>::bool_type(\r\n\t\t\tisinf(x.x),\r\n\t\t\tisinf(x.y),\r\n\t\t\tisinf(x.z),\r\n\t\t\tisinf(x.w));\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER int floatBitsToInt(float const & v)\r\n\t{\r\n\t\treturn reinterpret_cast<int&>(const_cast<float&>(v));\r\n\t}\r\n\r\n\ttemplate <template <typename, precision> class vecType, precision P>\r\n\tGLM_FUNC_QUALIFIER vecType<int, P> floatBitsToInt(vecType<float, P> const & v)\r\n\t{\r\n\t\treturn reinterpret_cast<vecType<int, P>&>(const_cast<vecType<float, P>&>(v));\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint floatBitsToUint(float const & v)\r\n\t{\r\n\t\treturn reinterpret_cast<uint&>(const_cast<float&>(v));\r\n\t}\r\n\r\n\ttemplate <template <typename, precision> class vecType, precision P>\r\n\tGLM_FUNC_QUALIFIER vecType<uint, P> floatBitsToUint(vecType<float, P> const & v)\r\n\t{\r\n\t\treturn reinterpret_cast<vecType<uint, P>&>(const_cast<vecType<float, P>&>(v));\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER float intBitsToFloat(int const & v)\r\n\t{\r\n\t\treturn reinterpret_cast<float&>(const_cast<int&>(v));\r\n\t}\r\n\r\n\ttemplate <template <typename, precision> class vecType, precision P>\r\n\tGLM_FUNC_QUALIFIER vecType<float, P> intBitsToFloat(vecType<int, P> const & v)\r\n\t{\r\n\t\treturn reinterpret_cast<vecType<float, P>&>(const_cast<vecType<int, P>&>(v));\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER float uintBitsToFloat(uint const & v)\r\n\t{\r\n\t\treturn reinterpret_cast<float&>(const_cast<uint&>(v));\r\n\t}\r\n\r\n\ttemplate <template <typename, precision> class vecType, precision P>\r\n\tGLM_FUNC_QUALIFIER vecType<float, P> uintBitsToFloat(vecType<uint, P> const & v)\r\n\t{\r\n\t\treturn reinterpret_cast<vecType<float, P>&>(const_cast<vecType<uint, P>&>(v));\r\n\t}\r\n\t\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType fma\r\n\t(\r\n\t\tgenType const & a,\r\n\t\tgenType const & b,\r\n\t\tgenType const & c\r\n\t)\r\n\t{\r\n\t\treturn a * b + c;\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType frexp\r\n\t(\r\n\t\tgenType const & x,\r\n\t\tint & exp\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'frexp' only accept floating-point inputs\");\r\n\r\n\t\treturn std::frexp(x, exp);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> frexp\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x,\r\n\t\tdetail::tvec2<int, P> & exp\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'frexp' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tfrexp(x.x, exp.x),\r\n\t\t\tfrexp(x.y, exp.y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> frexp\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<int, P> & exp\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'frexp' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tfrexp(x.x, exp.x),\r\n\t\t\tfrexp(x.y, exp.y),\r\n\t\t\tfrexp(x.z, exp.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> frexp\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & x,\r\n\t\tdetail::tvec4<int, P> & exp\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'frexp' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tfrexp(x.x, exp.x),\r\n\t\t\tfrexp(x.y, exp.y),\r\n\t\t\tfrexp(x.z, exp.z),\r\n\t\t\tfrexp(x.w, exp.w));\r\n\t}\r\n\r\n\ttemplate <typename genType, precision P>\r\n\tGLM_FUNC_QUALIFIER genType ldexp\r\n\t(\r\n\t\tgenType const & x,\r\n\t\tint const & exp\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'frexp' only accept floating-point inputs\");\r\n\r\n\t\treturn std::ldexp(x, exp);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> ldexp\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x,\r\n\t\tdetail::tvec2<int, P> const & exp\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'ldexp' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tldexp(x.x, exp.x),\r\n\t\t\tldexp(x.y, exp.y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> ldexp\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<int, P> const & exp\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'ldexp' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tldexp(x.x, exp.x),\r\n\t\t\tldexp(x.y, exp.y),\r\n\t\t\tldexp(x.z, exp.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> ldexp\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & x,\r\n\t\tdetail::tvec4<int, P> const & exp\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'ldexp' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tldexp(x.x, exp.x),\r\n\t\t\tldexp(x.y, exp.y),\r\n\t\t\tldexp(x.z, exp.z),\r\n\t\t\tldexp(x.w, exp.w));\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/detail/func_exponential.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_exponential.hpp\r\n/// @date 2008-08-08 / 2011-06-14\r\n/// @author Christophe Riccio\r\n/// \r\n/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>\r\n///\r\n/// @defgroup core_func_exponential Exponential functions\r\n/// @ingroup core\r\n/// \r\n/// These all operate component-wise. The description is per component.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_func_exponential\r\n#define glm_core_func_exponential\r\n\r\n#include \"type_vec1.hpp\"\r\n#include \"type_vec2.hpp\"\r\n#include \"type_vec3.hpp\"\r\n#include \"type_vec4.hpp\"\r\n#include <cmath>\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup core_func_exponential\r\n\t/// @{\r\n\r\n\t/// Returns 'base' raised to the power 'exponent'. \r\n\t///\r\n\t/// @param base Floating point value. pow function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision.\r\n\t/// @param exponent Floating point value representing the 'exponent'.\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/pow.xml\">GLSL pow man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType pow(genType const & base, genType const & exponent);\r\n\r\n\t/// Returns the natural exponentiation of x, i.e., e^x.\r\n\t///\r\n\t/// @param x exp function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision.\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/exp.xml\">GLSL exp man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType exp(genType const & x);\r\n\r\n\t/// Returns the natural logarithm of x, i.e., \r\n\t/// returns the value y which satisfies the equation x = e^y. \r\n\t/// Results are undefined if x <= 0.\r\n\t///\r\n\t/// @param x log function is defined for input values of x defined in the range (0, inf+) in the limit of the type precision.\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/log.xml\">GLSL log man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType log(genType const & x);\r\n\r\n\t/// Returns 2 raised to the x power.\r\n\t/// \r\n\t/// @param x exp2 function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision.\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/exp2.xml\">GLSL exp2 man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType exp2(genType const & x);\r\n\r\n\t/// Returns the base 2 log of x, i.e., returns the value y, \r\n\t/// which satisfies the equation x = 2 ^ y.\r\n\t/// \r\n\t/// @param x log2 function is defined for input values of x defined in the range (0, inf+) in the limit of the type precision.\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/log2.xml\">GLSL log2 man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType log2(genType x);\r\n\r\n\t/// Returns the positive square root of x.\r\n\t/// \r\n\t/// @param x sqrt function is defined for input values of x defined in the range [0, inf+) in the limit of the type precision.\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/sqrt.xml\">GLSL sqrt man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>\r\n\t//template <typename genType>\r\n\t//GLM_FUNC_DECL genType sqrt(genType const & x);\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL vecType<T, P> sqrt(vecType<T, P> const & x);\r\n\t\r\n\t/// Returns the reciprocal of the positive square root of x.\r\n\t/// \r\n\t/// @param x inversesqrt function is defined for input values of x defined in the range [0, inf+) in the limit of the type precision.\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/inversesqrt.xml\">GLSL inversesqrt man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType inversesqrt(genType const & x);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"func_exponential.inl\"\r\n\r\n#endif//glm_core_func_exponential\r\n"
  },
  {
    "path": "cpu/glm/detail/func_exponential.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_exponential.inl\r\n/// @date 2008-08-03 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"func_vector_relational.hpp\"\r\n#include \"_vectorize.hpp\"\r\n#include <limits>\r\n#include <cassert>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <bool isFloat>\r\n\tstruct compute_log2\r\n\t{\r\n\t\ttemplate <typename T>\r\n\t\tT operator() (T const & Value) const;\r\n\t};\r\n\r\n\ttemplate <>\r\n\tstruct compute_log2<true>\r\n\t{\r\n\t\ttemplate <typename T>\r\n\t\tT operator() (T const & Value) const\r\n\t\t{\r\n\t\t\treturn static_cast<T>(::std::log(Value)) * static_cast<T>(1.4426950408889634073599246810019);\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <template <class, precision> class vecType, typename T, precision P>\r\n\tstruct compute_inversesqrt\r\n\t{\r\n\t\tstatic vecType<T, P> call(vecType<T, P> const & x)\r\n\t\t{\r\n\t\t\treturn static_cast<T>(1) / sqrt(x);\r\n\t\t}\r\n\t};\r\n\t\t\r\n\ttemplate <template <class, precision> class vecType>\r\n\tstruct compute_inversesqrt<vecType, float, lowp>\r\n\t{\r\n\t\tstatic vecType<float, lowp> call(vecType<float, lowp> const & x)\r\n\t\t{\r\n\t\t\tvecType<float, lowp> tmp(x);\r\n\t\t\tvecType<float, lowp> xhalf(tmp * 0.5f);\r\n\t\t\tvecType<uint, lowp>* p = reinterpret_cast<vecType<uint, lowp>*>(const_cast<vecType<float, lowp>*>(&x));\r\n\t\t\tvecType<uint, lowp> i = vecType<uint, lowp>(0x5f375a86) - (*p >> vecType<uint, lowp>(1));\r\n\t\t\tvecType<float, lowp>* ptmp = reinterpret_cast<vecType<float, lowp>*>(&i);\r\n\t\t\ttmp = *ptmp;\r\n\t\t\ttmp = tmp * (1.5f - xhalf * tmp * tmp);\r\n\t\t\treturn tmp;\r\n\t\t}\r\n\t};\r\n}//namespace detail\r\n\r\n\t// pow\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType pow\r\n\t(\r\n\t\tgenType const & x, \r\n\t\tgenType const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'pow' only accept floating-point inputs\");\r\n\r\n\t\treturn std::pow(x, y);\r\n\t}\r\n\r\n\tVECTORIZE_VEC_VEC(pow)\r\n\r\n\t// exp\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType exp\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'exp' only accept floating-point inputs\");\r\n\r\n\t\treturn std::exp(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(exp)\r\n\r\n\t// log\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType log\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'log' only accept floating-point inputs\");\r\n\r\n\t\treturn std::log(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(log)\r\n\r\n\t//exp2, ln2 = 0.69314718055994530941723212145818f\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType exp2(genType const & x)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'exp2' only accept floating-point inputs\");\r\n\r\n\t\treturn std::exp(static_cast<genType>(0.69314718055994530941723212145818) * x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(exp2)\r\n\r\n\t// log2, ln2 = 0.69314718055994530941723212145818f\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType log2(genType x)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559 || std::numeric_limits<genType>::is_integer,\r\n\t\t\t\"GLM core 'log2' only accept floating-point inputs. Include <glm/gtx/integer.hpp> for additional integer support.\");\r\n\r\n\t\tassert(x > genType(0)); // log2 is only defined on the range (0, inf]\r\n\t\treturn detail::compute_log2<std::numeric_limits<genType>::is_iec559>()(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(log2)\r\n\r\n\tnamespace detail\r\n\t{\r\n\t\ttemplate <template <class, precision> class vecType, typename T, precision P>\r\n\t\tstruct compute_sqrt{};\r\n\t\t\r\n\t\ttemplate <typename T, precision P>\r\n\t\tstruct compute_sqrt<detail::tvec1, T, P>\r\n\t\t{\r\n\t\t\tstatic detail::tvec1<T, P> call(detail::tvec1<T, P> const & x)\r\n\t\t\t{\r\n\t\t\t\treturn detail::tvec1<T, P>(std::sqrt(x.x));\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\ttemplate <typename T, precision P>\r\n\t\tstruct compute_sqrt<detail::tvec2, T, P>\r\n\t\t{\r\n\t\t\tstatic detail::tvec2<T, P> call(detail::tvec2<T, P> const & x)\r\n\t\t\t{\r\n\t\t\t\treturn detail::tvec2<T, P>(std::sqrt(x.x), std::sqrt(x.y));\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\ttemplate <typename T, precision P>\r\n\t\tstruct compute_sqrt<detail::tvec3, T, P>\r\n\t\t{\r\n\t\t\tstatic detail::tvec3<T, P> call(detail::tvec3<T, P> const & x)\r\n\t\t\t{\r\n\t\t\t\treturn detail::tvec3<T, P>(std::sqrt(x.x), std::sqrt(x.y), std::sqrt(x.z));\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\ttemplate <typename T, precision P>\r\n\t\tstruct compute_sqrt<detail::tvec4, T, P>\r\n\t\t{\r\n\t\t\tstatic detail::tvec4<T, P> call(detail::tvec4<T, P> const & x)\r\n\t\t\t{\r\n\t\t\t\treturn detail::tvec4<T, P>(std::sqrt(x.x), std::sqrt(x.y), std::sqrt(x.z), std::sqrt(x.w));\r\n\t\t\t}\r\n\t\t};\r\n\t}//namespace detail\r\n\t\r\n\t// sqrt\r\n\tGLM_FUNC_QUALIFIER float sqrt(float x)\r\n\t{\r\n\t\treturn detail::compute_sqrt<detail::tvec1, float, highp>::call(x).x;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER double sqrt(double x)\r\n\t{\r\n\t\treturn detail::compute_sqrt<detail::tvec1, double, highp>::call(x).x;\r\n\t}\r\n\t\t\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> sqrt(vecType<T, P> const & x)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'sqrt' only accept floating-point inputs\");\r\n\t\treturn detail::compute_sqrt<vecType, T, P>::call(x);\r\n\t}\r\n\r\n\t// inversesqrt\r\n\tGLM_FUNC_QUALIFIER float inversesqrt(float const & x)\r\n\t{\r\n\t\treturn 1.0f / sqrt(x);\r\n\t}\r\n\t\r\n\tGLM_FUNC_QUALIFIER double inversesqrt(double const & x)\r\n\t{\r\n\t\treturn 1.0 / sqrt(x);\r\n\t}\r\n\t\r\n\ttemplate <template <class, precision> class vecType, typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> inversesqrt\r\n\t(\r\n\t\tvecType<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'inversesqrt' only accept floating-point inputs\");\r\n\t\treturn detail::compute_inversesqrt<vecType, T, P>::call(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(inversesqrt)\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/detail/func_geometric.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_geometric.hpp\r\n/// @date 2008-08-03 / 2011-06-14\r\n/// @author Christophe Riccio\r\n///\r\n/// @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>\r\n/// \r\n/// @defgroup core_func_geometric Geometric functions\r\n/// @ingroup core\r\n/// \r\n/// These operate on vectors as vectors, not component-wise.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_func_geometric\r\n#define glm_core_func_geometric\r\n\r\n#include \"type_vec3.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup core_func_geometric\r\n\t/// @{\r\n\r\n\t/// Returns the length of x, i.e., sqrt(x * x).\r\n\t/// \r\n\t/// @tparam genType Floating-point vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/length.xml\">GLSL length man page</a>\r\n\t/// @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>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL typename genType::value_type length(\r\n\t\tgenType const & x); \r\n\r\n\t/// Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).\r\n\t///\r\n\t/// @tparam genType Floating-point vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/distance.xml\">GLSL distance man page</a>\r\n\t/// @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>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL typename genType::value_type distance(\r\n\t\tgenType const & p0, \r\n\t\tgenType const & p1);\r\n\r\n\t/// Returns the dot product of x and y, i.e., result = x * y.\r\n\t///\r\n\t/// @tparam genType Floating-point vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/dot.xml\">GLSL dot man page</a>\r\n\t/// @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>\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL T dot(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y);\r\n\r\n\t/// Returns the dot product of x and y, i.e., result = x * y.\r\n\t///\r\n\t/// @tparam genType Floating-point vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/dot.xml\">GLSL dot man page</a>\r\n\t/// @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>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType dot(\r\n\t\tgenType const & x,\r\n\t\tgenType const & y);\r\n\r\n\t/// Returns the cross product of x and y.\r\n\t///\r\n\t/// @tparam valType Floating-point scalar types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/cross.xml\">GLSL cross man page</a>\r\n\t/// @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>\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec3<T, P> cross(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<T, P> const & y);\r\n\r\n\t/// Returns a vector in the same direction as x but with length of 1.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/normalize.xml\">GLSL normalize man page</a>\r\n\t/// @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>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType normalize(\r\n\t\tgenType const & x);\r\n\r\n\t/// If dot(Nref, I) < 0.0, return N, otherwise, return -N.\r\n\t///\r\n\t/// @tparam genType Floating-point vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/faceforward.xml\">GLSL faceforward man page</a>\r\n\t/// @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>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType faceforward(\r\n\t\tgenType const & N,\r\n\t\tgenType const & I,\r\n\t\tgenType const & Nref);\r\n\r\n\t/// For the incident vector I and surface orientation N, \r\n\t/// returns the reflection direction : result = I - 2.0 * dot(N, I) * N.\r\n\t///\r\n\t/// @tparam genType Floating-point vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/reflect.xml\">GLSL reflect man page</a>\r\n\t/// @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>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType reflect(\r\n\t\tgenType const & I,\r\n\t\tgenType const & N);\r\n\r\n\t/// For the incident vector I and surface normal N, \r\n\t/// and the ratio of indices of refraction eta, \r\n\t/// return the refraction vector.\r\n\t///\r\n\t/// @tparam genType Floating-point vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/refract.xml\">GLSL refract man page</a>\r\n\t/// @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>\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL vecType<T, P> refract(\r\n\t\tvecType<T, P> const & I,\r\n\t\tvecType<T, P> const & N,\r\n\t\tT const & eta);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"func_geometric.inl\"\r\n\r\n#endif//glm_core_func_geometric\r\n"
  },
  {
    "path": "cpu/glm/detail/func_geometric.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_geometric.inl\r\n/// @date 2008-08-03 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"func_exponential.hpp\"\r\n#include \"func_common.hpp\"\r\n#include \"type_vec2.hpp\"\r\n#include \"type_vec4.hpp\"\r\n#include \"type_float.hpp\"\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <template <class, precision> class vecType, typename T, precision P>\r\n\tstruct compute_dot{};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_dot<detail::tvec1, T, P>\r\n\t{\r\n\t\tstatic T call(detail::tvec1<T, P> const & x, detail::tvec1<T, P> const & y)\r\n\t\t{\r\n\t\t\treturn detail::tvec1<T, P>(x * y).x;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_dot<detail::tvec2, T, P>\r\n\t{\r\n\t\tstatic T call(detail::tvec2<T, P> const & x, detail::tvec2<T, P> const & y)\r\n\t\t{\r\n\t\t\tdetail::tvec2<T, P> tmp(x * y);\r\n\t\t\treturn tmp.x + tmp.y;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_dot<detail::tvec3, T, P>\r\n\t{\r\n\t\tstatic T call(detail::tvec3<T, P> const & x, detail::tvec3<T, P> const & y)\r\n\t\t{\r\n\t\t\tdetail::tvec3<T, P> tmp(x * y);\r\n\t\t\treturn tmp.x + tmp.y + tmp.z;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_dot<detail::tvec4, T, P>\r\n\t{\r\n\t\tstatic T call(detail::tvec4<T, P> const & x, detail::tvec4<T, P> const & y)\r\n\t\t{\r\n\t\t\tdetail::tvec4<T, P> tmp(x * y);\r\n\t\t\treturn (tmp.x + tmp.y) + (tmp.z + tmp.w);\r\n\t\t}\r\n\t};\r\n}//namespace detail\r\n\r\n\t// length\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType length\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'length' only accept floating-point inputs\");\r\n\r\n\t\tgenType sqr = x * x;\r\n\t\treturn sqrt(sqr);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T length(detail::tvec2<T, P> const & v)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'length' only accept floating-point inputs\");\r\n\r\n\t\tT sqr = v.x * v.x + v.y * v.y;\r\n\t\treturn sqrt(sqr);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T length(detail::tvec3<T, P> const & v)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'length' only accept floating-point inputs\");\r\n\r\n\t\tT sqr = v.x * v.x + v.y * v.y + v.z * v.z;\r\n\t\treturn sqrt(sqr);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T length(detail::tvec4<T, P> const & v)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'length' only accept floating-point inputs\");\r\n\r\n\t\tT sqr = v.x * v.x + v.y * v.y + v.z * v.z + v.w * v.w;\r\n\t\treturn sqrt(sqr);\r\n\t}\r\n\r\n\t// distance\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType distance\r\n\t(\r\n\t\tgenType const & p0,\r\n\t\tgenType const & p1\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'distance' only accept floating-point inputs\");\r\n\r\n\t\treturn length(p1 - p0);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T distance\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & p0,\r\n\t\tdetail::tvec2<T, P> const & p1\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'distance' only accept floating-point inputs\");\r\n\r\n\t\treturn length(p1 - p0);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T distance\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & p0,\r\n\t\tdetail::tvec3<T, P> const & p1\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'distance' only accept floating-point inputs\");\r\n\r\n\t\treturn length(p1 - p0);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T distance\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & p0,\r\n\t\tdetail::tvec4<T, P> const & p1\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'distance' only accept floating-point inputs\");\r\n\r\n\t\treturn length(p1 - p0);\r\n\t}\r\n\r\n\t// dot\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T dot\r\n\t(\r\n\t\tT const & x,\r\n\t\tT const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'dot' only accept floating-point inputs\");\r\n\t\treturn detail::compute_dot<detail::tvec1, T, highp>::call(x, y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER T dot\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'dot' only accept floating-point inputs\");\r\n\t\treturn detail::compute_dot<vecType, T, P>::call(x, y);\r\n\t}\r\n\r\n/* // SSE3\r\n\tGLM_FUNC_QUALIFIER float dot(const tvec4<float>& x, const tvec4<float>& y)\r\n\t{\r\n\t\tfloat Result;\r\n\t\t__asm\r\n\t\t{\r\n\t\t\tmov\t\tesi, x\r\n\t\t\tmov\t\tedi, y\r\n\t\t\tmovaps\txmm0, [esi]\r\n\t\t\tmulps\txmm0, [edi]\r\n\t\t\thaddps(\t_xmm0, _xmm0 )\r\n\t\t\thaddps(\t_xmm0, _xmm0 )\r\n\t\t\tmovss\tResult, xmm0\r\n\t\t}\r\n\t\treturn Result;\r\n\t}\r\n*/\r\n\t// cross\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> cross\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'cross' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tx.y * y.z - y.y * x.z,\r\n\t\t\tx.z * y.x - y.z * x.x,\r\n\t\t\tx.x * y.y - y.x * x.y);\r\n\t}\r\n\r\n\t// normalize\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType normalize\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'normalize' only accept floating-point inputs\");\r\n\r\n\t\treturn x < genType(0) ? genType(-1) : genType(1);\r\n\t}\r\n\r\n\t// According to issue 10 GLSL 1.10 specification, if length(x) == 0 then result is undefine and generate an error\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> normalize\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'normalize' only accept floating-point inputs\");\r\n\t\t\r\n\t\tT sqr = x.x * x.x + x.y * x.y;\r\n\t\treturn x * inversesqrt(sqr);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> normalize\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'normalize' only accept floating-point inputs\");\r\n\r\n\t\tT sqr = x.x * x.x + x.y * x.y + x.z * x.z;\r\n\t\treturn x * inversesqrt(sqr);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> normalize\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'normalize' only accept floating-point inputs\");\r\n\t\t\r\n\t\tT sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w;\r\n\t\treturn x * inversesqrt(sqr);\r\n\t}\r\n\r\n\t// faceforward\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType faceforward\r\n\t(\r\n\t\tgenType const & N,\r\n\t\tgenType const & I,\r\n\t\tgenType const & Nref\r\n\t)\r\n\t{\r\n\t\treturn dot(Nref, I) < 0 ? N : -N;\r\n\t}\r\n\r\n\t// reflect\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType reflect\r\n\t(\r\n\t\tgenType const & I,\r\n\t\tgenType const & N\r\n\t)\r\n\t{\r\n\t\treturn I - N * dot(N, I) * genType(2);\r\n\t}\r\n\r\n\t// refract\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType refract\r\n\t(\r\n\t\tgenType const & I,\r\n\t\tgenType const & N,\r\n\t\tgenType const & eta\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'refract' only accept floating-point inputs\");\r\n\r\n\t\tgenType dotValue = dot(N, I);\r\n\t\tgenType k = genType(1) - eta * eta * (genType(1) - dotValue * dotValue);\r\n\t\tif(k < genType(0))\r\n\t\t\treturn genType(0);\r\n\t\telse\r\n\t\t\treturn eta * I - (eta * dotValue + sqrt(k)) * N;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> refract\r\n\t(\r\n\t\tvecType<T, P> const & I,\r\n\t\tvecType<T, P> const & N,\r\n\t\tT const & eta\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'refract' only accept floating-point inputs\");\r\n\r\n\t\tT dotValue = dot(N, I);\r\n\t\tT k = T(1) - eta * eta * (T(1) - dotValue * dotValue);\r\n\t\tif(k < T(0))\r\n\t\t\treturn vecType<T, P>(0);\r\n\t\telse\r\n\t\t\treturn eta * I - (eta * dotValue + std::sqrt(k)) * N;\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/detail/func_integer.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_integer.hpp\r\n/// @date 2010-03-17 / 2011-06-18\r\n/// @author Christophe Riccio\r\n///\r\n/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>\r\n/// \r\n/// @defgroup core_func_integer Integer functions\r\n/// @ingroup core\r\n/// \r\n/// These all operate component-wise. The description is per component. \r\n/// The notation [a, b] means the set of bits from bit-number a through bit-number \r\n/// b, inclusive. The lowest-order bit is bit 0.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_func_integer\r\n#define glm_core_func_integer\r\n\r\n#include \"setup.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup core_func_integer\r\n\t/// @{\r\n\r\n\t/// Adds 32-bit unsigned integer x and y, returning the sum\r\n\t/// modulo pow(2, 32). The value carry is set to 0 if the sum was\r\n\t/// less than pow(2, 32), or to 1 otherwise.\r\n\t///\r\n\t/// @tparam genUType Unsigned integer scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/uaddCarry.xml\">GLSL uaddCarry man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>\r\n\ttemplate <typename genUType>\r\n\tGLM_FUNC_DECL genUType uaddCarry(\r\n\t\tgenUType const & x,\r\n\t\tgenUType const & y,\r\n\t\tgenUType & carry);\r\n\r\n\t/// Subtracts the 32-bit unsigned integer y from x, returning\r\n\t/// the difference if non-negative, or pow(2, 32) plus the difference\r\n\t/// otherwise. The value borrow is set to 0 if x >= y, or to 1 otherwise.\r\n\t///\r\n\t/// @tparam genUType Unsigned integer scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/usubBorrow.xml\">GLSL usubBorrow man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>\r\n\ttemplate <typename genUType>\r\n\tGLM_FUNC_DECL genUType usubBorrow(\r\n\t\tgenUType const & x,\r\n\t\tgenUType const & y,\r\n\t\tgenUType & borrow);\r\n\t\t\r\n\t/// Multiplies 32-bit integers x and y, producing a 64-bit\r\n\t/// result. The 32 least-significant bits are returned in lsb.\r\n\t/// The 32 most-significant bits are returned in msb.\r\n\t///\r\n\t/// @tparam genUType Unsigned integer scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/umulExtended.xml\">GLSL umulExtended man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>\r\n\ttemplate <typename genUType>\r\n\tGLM_FUNC_DECL void umulExtended(\r\n\t\tgenUType const & x,\r\n\t\tgenUType const & y,\r\n\t\tgenUType & msb,\r\n\t\tgenUType & lsb);\r\n\t\t\r\n\t/// Multiplies 32-bit integers x and y, producing a 64-bit\r\n\t/// result. The 32 least-significant bits are returned in lsb.\r\n\t/// The 32 most-significant bits are returned in msb.\r\n\t/// \r\n\t/// @tparam genIType Signed integer scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/imulExtended.xml\">GLSL imulExtended man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>\r\n\ttemplate <typename genIType>\r\n\tGLM_FUNC_DECL void imulExtended(\r\n\t\tgenIType const & x,\r\n\t\tgenIType const & y,\r\n\t\tgenIType & msb,\r\n\t\tgenIType & lsb);\r\n\r\n\t/// Extracts bits [offset, offset + bits - 1] from value,\r\n\t/// returning them in the least significant bits of the result.\r\n\t/// For unsigned data types, the most significant bits of the\r\n\t/// result will be set to zero. For signed data types, the\r\n\t/// most significant bits will be set to the value of bit offset + base - 1.\r\n\t///\r\n\t/// If bits is zero, the result will be zero. The result will be\r\n\t/// undefined if offset or bits is negative, or if the sum of\r\n\t/// offset and bits is greater than the number of bits used\r\n\t/// to store the operand.\r\n\t///\r\n\t/// @tparam genIUType Signed or unsigned integer scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldExtract.xml\">GLSL bitfieldExtract man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_DECL genIUType bitfieldExtract(\r\n\t\tgenIUType const & Value,\r\n\t\tint const & Offset,\r\n\t\tint const & Bits);\r\n\r\n\t/// Returns the insertion the bits least-significant bits of insert into base.\r\n\t///\r\n\t/// The result will have bits [offset, offset + bits - 1] taken\r\n\t/// from bits [0, bits - 1] of insert, and all other bits taken\r\n\t/// directly from the corresponding bits of base. If bits is\r\n\t/// zero, the result will simply be base. The result will be\r\n\t/// undefined if offset or bits is negative, or if the sum of\r\n\t/// offset and bits is greater than the number of bits used to\r\n\t/// store the operand.\r\n\t///\r\n\t/// @tparam genIUType Signed or unsigned integer scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldInsert.xml\">GLSL bitfieldInsert man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_DECL genIUType bitfieldInsert(\r\n\t\tgenIUType const & Base,\r\n\t\tgenIUType const & Insert,\r\n\t\tint const & Offset,\r\n\t\tint const & Bits);\r\n\r\n\t/// Returns the reversal of the bits of value. \r\n\t/// The bit numbered n of the result will be taken from bit (bits - 1) - n of value, \r\n\t/// where bits is the total number of bits used to represent value.\r\n\t///\r\n\t/// @tparam genIUType Signed or unsigned integer scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldReverse.xml\">GLSL bitfieldReverse man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_DECL genIUType bitfieldReverse(genIUType const & Value);\r\n\t\t\r\n\t/// Returns the number of bits set to 1 in the binary representation of value.\r\n\t///\r\n\t/// @tparam genIUType Signed or unsigned integer scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/bitCount.xml\">GLSL bitCount man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>\r\n\t///\r\n\t/// @todo Clarify the declaration to specify that scalars are suported.\r\n\ttemplate <typename T, template <typename> class genIUType>\r\n\tGLM_FUNC_DECL typename genIUType<T>::signed_type bitCount(genIUType<T> const & Value);\r\n\r\n\t/// Returns the bit number of the least significant bit set to\r\n\t/// 1 in the binary representation of value. \r\n\t/// If value is zero, -1 will be returned.\r\n\t///\r\n\t/// @tparam genIUType Signed or unsigned integer scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/findLSB.xml\">GLSL findLSB man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>\r\n\t///\r\n\t/// @todo Clarify the declaration to specify that scalars are suported.\r\n\ttemplate <typename T, template <typename> class genIUType>\r\n\tGLM_FUNC_DECL typename genIUType<T>::signed_type findLSB(genIUType<T> const & Value);\r\n\r\n\t/// Returns the bit number of the most significant bit in the binary representation of value.\r\n\t/// For positive integers, the result will be the bit number of the most significant bit set to 1. \r\n\t/// For negative integers, the result will be the bit number of the most significant\r\n\t/// bit set to 0. For a value of zero or negative one, -1 will be returned.\r\n\t///\r\n\t/// @tparam genIUType Signed or unsigned integer scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/findMSB.xml\">GLSL findMSB man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>\r\n\t///\r\n\t/// @todo Clarify the declaration to specify that scalars are suported.\r\n\ttemplate <typename T, template <typename> class genIUType>\r\n\tGLM_FUNC_DECL typename genIUType<T>::signed_type findMSB(genIUType<T> const & Value);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"func_integer.inl\"\r\n\r\n#endif//glm_core_func_integer\r\n\r\n"
  },
  {
    "path": "cpu/glm/detail/func_integer.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_integer.inl\r\n/// @date 2010-03-17 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"type_vec2.hpp\"\r\n#include \"type_vec3.hpp\"\r\n#include \"type_vec4.hpp\"\r\n#include \"type_int.hpp\"\r\n#include \"_vectorize.hpp\"\r\n#if(GLM_ARCH != GLM_ARCH_PURE)\r\n#if(GLM_COMPILER & GLM_COMPILER_VC)\r\n#\tinclude <intrin.h>\r\n#\tpragma intrinsic(_BitScanReverse)\r\n#endif//(GLM_COMPILER & GLM_COMPILER_VC)\r\n#endif//(GLM_ARCH != GLM_ARCH_PURE)\r\n#include <limits>\r\n\r\nnamespace glm\r\n{\r\n\t// uaddCarry\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER uint uaddCarry\r\n\t(\r\n\t\tuint const & x,\r\n\t\tuint const & y,\r\n\t\tuint & Carry\r\n\t)\r\n\t{\r\n\t\tuint64 Value64 = static_cast<uint64>(x) + static_cast<uint64>(y);\r\n\t\tuint32 Result = static_cast<uint32>(Value64 % (static_cast<uint64>(1) << static_cast<uint64>(32)));\r\n\t\tCarry = (Value64 % (static_cast<uint64>(1) << static_cast<uint64>(32))) > 1 ? static_cast<uint32>(1) : static_cast<uint32>(0);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER uvec2 uaddCarry\r\n\t(\r\n\t\tuvec2 const & x,\r\n\t\tuvec2 const & y,\r\n\t\tuvec2 & Carry\r\n\t)\r\n\t{\r\n\t\treturn uvec2(\r\n\t\t\tuaddCarry(x[0], y[0], Carry[0]),\r\n\t\t\tuaddCarry(x[1], y[1], Carry[1]));\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER uvec3 uaddCarry\r\n\t(\r\n\t\tuvec3 const & x,\r\n\t\tuvec3 const & y,\r\n\t\tuvec3 & Carry\r\n\t)\r\n\t{\r\n\t\treturn uvec3(\r\n\t\t\tuaddCarry(x[0], y[0], Carry[0]),\r\n\t\t\tuaddCarry(x[1], y[1], Carry[1]),\r\n\t\t\tuaddCarry(x[2], y[2], Carry[2]));\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER uvec4 uaddCarry\r\n\t(\r\n\t\tuvec4 const & x,\r\n\t\tuvec4 const & y,\r\n\t\tuvec4 & Carry\r\n\t)\r\n\t{\r\n\t\treturn uvec4(\r\n\t\t\tuaddCarry(x[0], y[0], Carry[0]),\r\n\t\t\tuaddCarry(x[1], y[1], Carry[1]),\r\n\t\t\tuaddCarry(x[2], y[2], Carry[2]),\r\n\t\t\tuaddCarry(x[3], y[3], Carry[3]));\r\n\t}\r\n\r\n\t// usubBorrow\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER uint usubBorrow\r\n\t(\r\n\t\tuint const & x,\r\n\t\tuint const & y,\r\n\t\tuint & Borrow\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(sizeof(uint) == sizeof(uint32), \"uint and uint32 size mismatch\");\r\n\r\n\t\tBorrow = x >= y ? static_cast<uint32>(0) : static_cast<uint32>(1);\r\n\t\tif(x > y)\r\n\t\t\treturn static_cast<uint32>(static_cast<int64>(x) -static_cast<int64>(y));\r\n\t\telse\r\n\t\t\treturn static_cast<uint32>((static_cast<int64>(1) << static_cast<int64>(32)) + static_cast<int64>(x) - static_cast<int64>(y));\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER uvec2 usubBorrow\r\n\t(\r\n\t\tuvec2 const & x,\r\n\t\tuvec2 const & y,\r\n\t\tuvec2 & Borrow\r\n\t)\r\n\t{\r\n\t\treturn uvec2(\r\n\t\t\tusubBorrow(x[0], y[0], Borrow[0]),\r\n\t\t\tusubBorrow(x[1], y[1], Borrow[1]));\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER uvec3 usubBorrow\r\n\t(\r\n\t\tuvec3 const & x,\r\n\t\tuvec3 const & y,\r\n\t\tuvec3 & Borrow\r\n\t)\r\n\t{\r\n\t\treturn uvec3(\r\n\t\t\tusubBorrow(x[0], y[0], Borrow[0]),\r\n\t\t\tusubBorrow(x[1], y[1], Borrow[1]),\r\n\t\t\tusubBorrow(x[2], y[2], Borrow[2]));\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER uvec4 usubBorrow\r\n\t(\r\n\t\tuvec4 const & x,\r\n\t\tuvec4 const & y,\r\n\t\tuvec4 & Borrow\r\n\t)\r\n\t{\r\n\t\treturn uvec4(\r\n\t\t\tusubBorrow(x[0], y[0], Borrow[0]),\r\n\t\t\tusubBorrow(x[1], y[1], Borrow[1]),\r\n\t\t\tusubBorrow(x[2], y[2], Borrow[2]),\r\n\t\t\tusubBorrow(x[3], y[3], Borrow[3]));\r\n\t}\r\n\r\n\t// umulExtended\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER void umulExtended\r\n\t(\r\n\t\tuint const & x,\r\n\t\tuint const & y,\r\n\t\tuint & msb,\r\n\t\tuint & lsb\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(sizeof(uint) == sizeof(uint32), \"uint and uint32 size mismatch\");\r\n\r\n\t\tuint64 Value64 = static_cast<uint64>(x) * static_cast<uint64>(y);\r\n\t\tmsb = *(reinterpret_cast<uint32*>(&Value64) + 1);\r\n\t\tlsb = reinterpret_cast<uint32&>(Value64);\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER void umulExtended\r\n\t(\r\n\t\tuvec2 const & x,\r\n\t\tuvec2 const & y,\r\n\t\tuvec2 & msb,\r\n\t\tuvec2 & lsb\r\n\t)\r\n\t{\r\n\t\tumulExtended(x[0], y[0], msb[0], lsb[0]);\r\n\t\tumulExtended(x[1], y[1], msb[1], lsb[1]);\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER void umulExtended\r\n\t(\r\n\t\tuvec3 const & x,\r\n\t\tuvec3 const & y,\r\n\t\tuvec3 & msb,\r\n\t\tuvec3 & lsb\r\n\t)\r\n\t{\r\n\t\tumulExtended(x[0], y[0], msb[0], lsb[0]);\r\n\t\tumulExtended(x[1], y[1], msb[1], lsb[1]);\r\n\t\tumulExtended(x[2], y[2], msb[2], lsb[2]);\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER void umulExtended\r\n\t(\r\n\t\tuvec4 const & x,\r\n\t\tuvec4 const & y,\r\n\t\tuvec4 & msb,\r\n\t\tuvec4 & lsb\r\n\t)\r\n\t{\r\n\t\tumulExtended(x[0], y[0], msb[0], lsb[0]);\r\n\t\tumulExtended(x[1], y[1], msb[1], lsb[1]);\r\n\t\tumulExtended(x[2], y[2], msb[2], lsb[2]);\r\n\t\tumulExtended(x[3], y[3], msb[3], lsb[3]);\r\n\t}\r\n\r\n\t// imulExtended\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER void imulExtended\r\n\t(\r\n\t\tint const & x,\r\n\t\tint const & y,\r\n\t\tint & msb,\r\n\t\tint & lsb\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(sizeof(int) == sizeof(int32), \"int and int32 size mismatch\");\r\n\r\n\t\tint64 Value64 = static_cast<int64>(x) * static_cast<int64>(y);\r\n\t\tmsb = *(reinterpret_cast<int32*>(&Value64) + 1);\r\n\t\tlsb = reinterpret_cast<int32&>(Value64);\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER void imulExtended\r\n\t(\r\n\t\tivec2 const & x,\r\n\t\tivec2 const & y,\r\n\t\tivec2 & msb,\r\n\t\tivec2 & lsb\r\n\t)\r\n\t{\r\n\t\timulExtended(x[0], y[0], msb[0], lsb[0]),\r\n\t\timulExtended(x[1], y[1], msb[1], lsb[1]);\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER void imulExtended\r\n\t(\r\n\t\tivec3 const & x,\r\n\t\tivec3 const & y,\r\n\t\tivec3 & msb,\r\n\t\tivec3 & lsb\r\n\t)\r\n\t{\r\n\t\timulExtended(x[0], y[0], msb[0], lsb[0]),\r\n\t\timulExtended(x[1], y[1], msb[1], lsb[1]);\r\n\t\timulExtended(x[2], y[2], msb[2], lsb[2]);\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER void imulExtended\r\n\t(\r\n\t\tivec4 const & x,\r\n\t\tivec4 const & y,\r\n\t\tivec4 & msb,\r\n\t\tivec4 & lsb\r\n\t)\r\n\t{\r\n\t\timulExtended(x[0], y[0], msb[0], lsb[0]),\r\n\t\timulExtended(x[1], y[1], msb[1], lsb[1]);\r\n\t\timulExtended(x[2], y[2], msb[2], lsb[2]);\r\n\t\timulExtended(x[3], y[3], msb[3], lsb[3]);\r\n\t}\r\n\r\n\t// bitfieldExtract\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_QUALIFIER genIUType bitfieldExtract\r\n\t(\r\n\t\tgenIUType const & Value,\r\n\t\tint const & Offset,\r\n\t\tint const & Bits\r\n\t)\r\n\t{\r\n\t\tint GenSize = int(sizeof(genIUType)) << int(3);\r\n\r\n\t\tassert(Offset + Bits <= GenSize);\r\n\r\n\t\tgenIUType ShiftLeft = Bits ? Value << (GenSize - (Bits + Offset)) : genIUType(0);\r\n\t\tgenIUType ShiftBack = ShiftLeft >> genIUType(GenSize - Bits);\r\n\r\n\t\treturn ShiftBack;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> bitfieldExtract\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & Value,\r\n\t\tint const & Offset,\r\n\t\tint const & Bits\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tbitfieldExtract(Value[0], Offset, Bits),\r\n\t\t\tbitfieldExtract(Value[1], Offset, Bits));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> bitfieldExtract\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & Value,\r\n\t\tint const & Offset,\r\n\t\tint const & Bits\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tbitfieldExtract(Value[0], Offset, Bits),\r\n\t\t\tbitfieldExtract(Value[1], Offset, Bits),\r\n\t\t\tbitfieldExtract(Value[2], Offset, Bits));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> bitfieldExtract\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & Value,\r\n\t\tint const & Offset,\r\n\t\tint const & Bits\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tbitfieldExtract(Value[0], Offset, Bits),\r\n\t\t\tbitfieldExtract(Value[1], Offset, Bits),\r\n\t\t\tbitfieldExtract(Value[2], Offset, Bits),\r\n\t\t\tbitfieldExtract(Value[3], Offset, Bits));\r\n\t}\r\n\r\n\t// bitfieldInsert\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_QUALIFIER genIUType bitfieldInsert\r\n\t(\r\n\t\tgenIUType const & Base,\r\n\t\tgenIUType const & Insert,\r\n\t\tint const & Offset,\r\n\t\tint const & Bits\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, \"'bitfieldInsert' only accept integer values\");\r\n\t\tassert(Offset + Bits <= sizeof(genIUType));\r\n\r\n\t\tif(Bits == 0)\r\n\t\t\treturn Base;\r\n\r\n\t\tgenIUType Mask = 0;\r\n\t\tfor(int Bit = Offset; Bit < Offset + Bits; ++Bit)\r\n\t\t\tMask |= (1 << Bit);\r\n\r\n\t\treturn (Base & ~Mask) | (Insert & Mask);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> bitfieldInsert\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & Base,\r\n\t\tdetail::tvec2<T, P> const & Insert,\r\n\t\tint const & Offset,\r\n\t\tint const & Bits\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tbitfieldInsert(Base[0], Insert[0], Offset, Bits),\r\n\t\t\tbitfieldInsert(Base[1], Insert[1], Offset, Bits));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> bitfieldInsert\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & Base,\r\n\t\tdetail::tvec3<T, P> const & Insert,\r\n\t\tint const & Offset,\r\n\t\tint const & Bits\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tbitfieldInsert(Base[0], Insert[0], Offset, Bits),\r\n\t\t\tbitfieldInsert(Base[1], Insert[1], Offset, Bits),\r\n\t\t\tbitfieldInsert(Base[2], Insert[2], Offset, Bits));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> bitfieldInsert\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & Base,\r\n\t\tdetail::tvec4<T, P> const & Insert,\r\n\t\tint const & Offset,\r\n\t\tint const & Bits\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tbitfieldInsert(Base[0], Insert[0], Offset, Bits),\r\n\t\t\tbitfieldInsert(Base[1], Insert[1], Offset, Bits),\r\n\t\t\tbitfieldInsert(Base[2], Insert[2], Offset, Bits),\r\n\t\t\tbitfieldInsert(Base[3], Insert[3], Offset, Bits));\r\n\t}\r\n\r\n\t// bitfieldReverse\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_QUALIFIER genIUType bitfieldReverse(genIUType const & Value)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, \"'bitfieldReverse' only accept integer values\");\r\n\r\n\t\tgenIUType Out = 0;\r\n\t\tstd::size_t BitSize = sizeof(genIUType) * 8;\r\n\t\tfor(std::size_t i = 0; i < BitSize; ++i)\r\n\t\t\tif(Value & (genIUType(1) << i))\r\n\t\t\t\tOut |= genIUType(1) << (BitSize - 1 - i);\r\n\t\treturn Out;\r\n\t}\t\r\n\r\n\tVECTORIZE_VEC(bitfieldReverse)\r\n\r\n\t// bitCount\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_QUALIFIER int bitCount(genIUType const & Value)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, \"'bitCount' only accept integer values\");\r\n\r\n\t\tint Count = 0;\r\n\t\tfor(std::size_t i = 0; i < sizeof(genIUType) * std::size_t(8); ++i)\r\n\t\t{\r\n\t\t\tif(Value & (1 << i))\r\n\t\t\t\t++Count;\r\n\t\t}\r\n\t\treturn Count;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<int, P> bitCount\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<int, P>(\r\n\t\t\tbitCount(value[0]),\r\n\t\t\tbitCount(value[1]));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<int, P> bitCount\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<int, P>(\r\n\t\t\tbitCount(value[0]),\r\n\t\t\tbitCount(value[1]),\r\n\t\t\tbitCount(value[2]));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<int, P> bitCount\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<int, P>(\r\n\t\t\tbitCount(value[0]),\r\n\t\t\tbitCount(value[1]),\r\n\t\t\tbitCount(value[2]),\r\n\t\t\tbitCount(value[3]));\r\n\t}\r\n\r\n\t// findLSB\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_QUALIFIER int findLSB\r\n\t(\r\n\t\tgenIUType const & Value\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, \"'findLSB' only accept integer values\");\r\n\t\tif(Value == 0)\r\n\t\t\treturn -1;\r\n\r\n\t\tgenIUType Bit;\r\n\t\tfor(Bit = genIUType(0); !(Value & (1 << Bit)); ++Bit){}\r\n\t\treturn Bit;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<int, P> findLSB\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<int, P>(\r\n\t\t\tfindLSB(value[0]),\r\n\t\t\tfindLSB(value[1]));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<int, P> findLSB\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<int, P>(\r\n\t\t\tfindLSB(value[0]),\r\n\t\t\tfindLSB(value[1]),\r\n\t\t\tfindLSB(value[2]));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<int, P> findLSB\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<int, P>(\r\n\t\t\tfindLSB(value[0]),\r\n\t\t\tfindLSB(value[1]),\r\n\t\t\tfindLSB(value[2]),\r\n\t\t\tfindLSB(value[3]));\r\n\t}\r\n\r\n\t// findMSB\r\n#if((GLM_ARCH != GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_VC))\r\n\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_QUALIFIER int findMSB\r\n\t(\r\n\t\tgenIUType const & Value\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, \"'findMSB' only accept integer values\");\r\n\t\tif(Value == 0)\r\n\t\t\treturn -1;\r\n\r\n\t\tunsigned long Result(0);\r\n\t\t_BitScanReverse(&Result, Value);\r\n\t\treturn int(Result);\r\n\t}\r\n/*\r\n// __builtin_clz seems to be buggy as it crasks for some values, from 0x00200000 to 80000000\r\n#elif((GLM_ARCH != GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC40))\r\n\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_QUALIFIER int findMSB\r\n\t(\r\n\t\tgenIUType const & Value\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, \"'findMSB' only accept integer values\");\r\n\t\tif(Value == 0)\r\n\t\t\treturn -1;\r\n\r\n\t\t// clz returns the number or trailing 0-bits; see\r\n\t\t// http://gcc.gnu.org/onlinedocs/gcc-4.7.1/gcc/Other-Builtins.html\r\n\t\t//\r\n\t\t// NoteBecause __builtin_clz only works for unsigned ints, this\r\n\t\t// implementation will not work for 64-bit integers.\r\n\t\t//\r\n\t\treturn 31 - __builtin_clzl(Value);\r\n\t}\r\n*/\r\n#else\r\n\r\n/* SSE implementation idea\r\n\r\n\t\t__m128i const Zero = _mm_set_epi32( 0,  0,  0,  0);\r\n\t\t__m128i const One = _mm_set_epi32( 1,  1,  1,  1);\r\n\t\t__m128i Bit = _mm_set_epi32(-1, -1, -1, -1);\r\n\t\t__m128i Tmp = _mm_set_epi32(Value, Value, Value, Value);\r\n\t\t__m128i Mmi = Zero;\r\n\t\tfor(int i = 0; i < 32; ++i)\r\n\t\t{\r\n\t\t\t__m128i Shilt = _mm_and_si128(_mm_cmpgt_epi32(Tmp, One), One);\r\n\t\t\tTmp = _mm_srai_epi32(Tmp, One);\r\n\t\t\tBit = _mm_add_epi32(Bit, _mm_and_si128(Shilt, i));\r\n\t\t\tMmi = _mm_and_si128(Mmi, One);\r\n\t\t}\r\n\t\treturn Bit;\r\n\r\n*/\r\n\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_QUALIFIER int findMSB\r\n\t(\r\n\t\tgenIUType const & Value\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, \"'findMSB' only accept integer values\");\r\n\t\t\r\n\t\tif(Value == genIUType(0) || Value == genIUType(-1))\r\n\t\t\treturn -1;\r\n\t\telse if(Value > 0)\r\n\t\t{\r\n\t\t\tgenIUType Bit = genIUType(-1);\r\n\t\t\tfor(genIUType tmp = Value; tmp > 0; tmp >>= 1, ++Bit){}\r\n\t\t\treturn Bit;\r\n\t\t}\r\n\t\telse //if(Value < 0)\r\n\t\t{\r\n\t\t\tint const BitCount(sizeof(genIUType) * 8);\r\n\t\t\tint MostSignificantBit(-1);\r\n\t\t\tfor(int BitIndex(0); BitIndex < BitCount; ++BitIndex)\r\n\t\t\t\tMostSignificantBit = (Value & (1 << BitIndex)) ? MostSignificantBit : BitIndex;\r\n\t\t\tassert(MostSignificantBit >= 0);\r\n\t\t\treturn MostSignificantBit;\r\n\t\t}\r\n\t}\r\n#endif//(GLM_COMPILER)\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<int, P> findMSB\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<int, P>(\r\n\t\t\tfindMSB(value[0]),\r\n\t\t\tfindMSB(value[1]));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<int, P> findMSB\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<int, P>(\r\n\t\t\tfindMSB(value[0]),\r\n\t\t\tfindMSB(value[1]),\r\n\t\t\tfindMSB(value[2]));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<int, P> findMSB\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<int, P>(\r\n\t\t\tfindMSB(value[0]),\r\n\t\t\tfindMSB(value[1]),\r\n\t\t\tfindMSB(value[2]),\r\n\t\t\tfindMSB(value[3]));\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/detail/func_matrix.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_matrix.hpp\r\n/// @date 2008-08-03 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///\r\n/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>\r\n/// \r\n/// @defgroup core_func_matrix Matrix functions\r\n/// @ingroup core\r\n/// \r\n/// For each of the following built-in matrix functions, there is both a \r\n/// single-precision floating point version, where all arguments and return values \r\n/// are single precision, and a double-precision floating version, where all \r\n/// arguments and return values are double precision. Only the single-precision \r\n/// floating point version is shown.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_CORE_func_matrix\r\n#define GLM_CORE_func_matrix\r\n\r\n// Dependencies\r\n#include \"../detail/precision.hpp\"\r\n#include \"../detail/setup.hpp\"\r\n#include \"../detail/type_mat.hpp\"\r\n#include \"../vec2.hpp\"\r\n#include \"../vec3.hpp\"\r\n#include \"../vec4.hpp\"\r\n#include \"../mat2x2.hpp\"\r\n#include \"../mat2x3.hpp\"\r\n#include \"../mat2x4.hpp\"\r\n#include \"../mat3x2.hpp\"\r\n#include \"../mat3x3.hpp\"\r\n#include \"../mat3x4.hpp\"\r\n#include \"../mat4x2.hpp\"\r\n#include \"../mat4x3.hpp\"\r\n#include \"../mat4x4.hpp\"\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct outerProduct_trait<T, P, tvec2, tvec2>\r\n\t{\r\n\t\ttypedef tmat2x2<T, P> type;\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct outerProduct_trait<T, P, tvec2, tvec3>\r\n\t{\r\n\t\ttypedef tmat2x3<T, P> type;\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct outerProduct_trait<T, P, tvec2, tvec4>\r\n\t{\r\n\t\ttypedef tmat2x4<T, P> type;\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct outerProduct_trait<T, P, tvec3, tvec2>\r\n\t{\r\n\t\ttypedef tmat3x2<T, P> type;\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct outerProduct_trait<T, P, tvec3, tvec3>\r\n\t{\r\n\t\ttypedef tmat3x3<T, P> type;\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct outerProduct_trait<T, P, tvec3, tvec4>\r\n\t{\r\n\t\ttypedef tmat3x4<T, P> type;\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct outerProduct_trait<T, P, tvec4, tvec2>\r\n\t{\r\n\t\ttypedef tmat4x2<T, P> type;\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct outerProduct_trait<T, P, tvec4, tvec3>\r\n\t{\r\n\t\ttypedef tmat4x3<T, P> type;\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct outerProduct_trait<T, P, tvec4, tvec4>\r\n\t{\r\n\t\ttypedef tmat4x4<T, P> type;\r\n\t};\r\n\r\n}//namespace detail\r\n\r\n\t/// @addtogroup core_func_matrix\r\n\t/// @{\r\n\r\n\t/// Multiply matrix x by matrix y component-wise, i.e., \r\n\t/// result[i][j] is the scalar product of x[i][j] and y[i][j].\r\n\t/// \r\n\t/// @tparam matType Floating-point matrix types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/matrixCompMult.xml\">GLSL matrixCompMult man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>\r\n\ttemplate <typename T, precision P, template <typename, precision> class matType>\r\n\tGLM_FUNC_DECL matType<T, P> matrixCompMult(matType<T, P> const & x, matType<T, P> const & y);\r\n\r\n\t/// Treats the first parameter c as a column vector\r\n\t/// and the second parameter r as a row vector\r\n\t/// and does a linear algebraic matrix multiply c * r.\r\n\t/// \r\n\t/// @tparam matType Floating-point matrix types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/outerProduct.xml\">GLSL outerProduct man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>\r\n\t/// \r\n\t/// @todo Clarify the declaration to specify that matType doesn't have to be provided when used.\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecTypeA, template <typename, precision> class vecTypeB>\r\n\tGLM_FUNC_DECL typename detail::outerProduct_trait<T, P, vecTypeA, vecTypeB>::type outerProduct(vecTypeA<T, P> const & c, vecTypeB<T, P> const & r);\r\n\r\n\t/// Returns the transposed matrix of x\r\n\t/// \r\n\t/// @tparam matType Floating-point matrix types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/transpose.xml\">GLSL transpose man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>\r\n#\tif((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC11))\r\n\t\ttemplate <typename T, precision P, template <typename, precision> class matType>\r\n\t\tGLM_FUNC_DECL typename matType<T, P>::transpose_type transpose(matType<T, P> const & x);\r\n#\tendif\r\n\t\r\n\t/// Return the determinant of a squared matrix.\r\n\t/// \r\n\t/// @tparam valType Floating-point scalar types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/determinant.xml\">GLSL determinant man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>\t\r\n\ttemplate <typename T, precision P, template <typename, precision> class matType>\r\n\tGLM_FUNC_DECL T determinant(matType<T, P> const & m);\r\n\r\n\t/// Return the inverse of a squared matrix.\r\n\t/// \r\n\t/// @tparam valType Floating-point scalar types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/inverse.xml\">GLSL inverse man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>\t \r\n\ttemplate <typename T, precision P, template <typename, precision> class matType>\r\n\tGLM_FUNC_DECL matType<T, P> inverse(matType<T, P> const & m);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"func_matrix.inl\"\r\n\r\n#endif//GLM_CORE_func_matrix\r\n"
  },
  {
    "path": "cpu/glm/detail/func_matrix.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_matrix.inl\r\n/// @date 2008-03-08 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../geometric.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate\r\n\t<\r\n\t\ttemplate <class, precision> class vecTypeA,\r\n\t\ttemplate <class, precision> class vecTypeB,\r\n\t\ttypename T, precision P\r\n\t>\r\n\tstruct compute_outerProduct{};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_outerProduct<detail::tvec2, detail::tvec2, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, detail::tvec2, detail::tvec2>::type call(detail::tvec2<T, P> const & c, detail::tvec2<T, P> const & r)\r\n\t\t{\r\n\t\t\tdetail::tmat2x2<T, P> m(detail::tmat2x2<T, P>::_null);\r\n\t\t\tm[0][0] = c[0] * r[0];\r\n\t\t\tm[0][1] = c[1] * r[0];\r\n\t\t\tm[1][0] = c[0] * r[1];\r\n\t\t\tm[1][1] = c[1] * r[1];\r\n\t\t\treturn m;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_outerProduct<detail::tvec3, detail::tvec3, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, detail::tvec3, detail::tvec3>::type call(detail::tvec3<T, P> const & c, detail::tvec3<T, P> const & r)\r\n\t\t{\r\n\t\t\tdetail::tmat3x3<T, P> m(detail::tmat3x3<T, P>::_null);\r\n\t\t\tfor(length_t i(0); i < m.length(); ++i)\r\n\t\t\t\tm[i] = c * r[i];\r\n\t\t\treturn m;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_outerProduct<detail::tvec4, detail::tvec4, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, detail::tvec4, detail::tvec4>::type call(detail::tvec4<T, P> const & c, detail::tvec4<T, P> const & r)\r\n\t\t{\r\n\t\t\tdetail::tmat4x4<T, P> m(detail::tmat4x4<T, P>::_null);\r\n\t\t\tfor(length_t i(0); i < m.length(); ++i)\r\n\t\t\t\tm[i] = c * r[i];\r\n\t\t\treturn m;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_outerProduct<detail::tvec3, detail::tvec2, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, detail::tvec3, detail::tvec2>::type call(detail::tvec3<T, P> const & c, detail::tvec2<T, P> const & r)\r\n\t\t{\r\n\t\t\tdetail::tmat2x3<T, P> m(detail::tmat2x3<T, P>::_null);\r\n\t\t\tm[0][0] = c.x * r.x;\r\n\t\t\tm[0][1] = c.y * r.x;\r\n\t\t\tm[0][2] = c.z * r.x;\r\n\t\t\tm[1][0] = c.x * r.y;\r\n\t\t\tm[1][1] = c.y * r.y;\r\n\t\t\tm[1][2] = c.z * r.y;\r\n\t\t\treturn m;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_outerProduct<detail::tvec2, detail::tvec3, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, detail::tvec2, detail::tvec3>::type call(detail::tvec2<T, P> const & c, detail::tvec3<T, P> const & r)\r\n\t\t{\r\n\t\t\tdetail::tmat3x2<T, P> m(detail::tmat3x2<T, P>::_null);\r\n\t\t\tm[0][0] = c.x * r.x;\r\n\t\t\tm[0][1] = c.y * r.x;\r\n\t\t\tm[1][0] = c.x * r.y;\r\n\t\t\tm[1][1] = c.y * r.y;\r\n\t\t\tm[2][0] = c.x * r.z;\r\n\t\t\tm[2][1] = c.y * r.z;\r\n\t\t\treturn m;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_outerProduct<detail::tvec4, detail::tvec2, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, detail::tvec4, detail::tvec2>::type call(detail::tvec4<T, P> const & c, detail::tvec2<T, P> const & r)\r\n\t\t{\r\n\t\t\tdetail::tmat2x4<T, P> m(detail::tmat2x4<T, P>::_null);\r\n\t\t\tm[0][0] = c.x * r.x;\r\n\t\t\tm[0][1] = c.y * r.x;\r\n\t\t\tm[0][2] = c.z * r.x;\r\n\t\t\tm[0][3] = c.w * r.x;\r\n\t\t\tm[1][0] = c.x * r.y;\r\n\t\t\tm[1][1] = c.y * r.y;\r\n\t\t\tm[1][2] = c.z * r.y;\r\n\t\t\tm[1][3] = c.w * r.y;\r\n\t\t\treturn m;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_outerProduct<detail::tvec2, detail::tvec4, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, detail::tvec2, detail::tvec4>::type call(detail::tvec2<T, P> const & c, detail::tvec4<T, P> const & r)\r\n\t\t{\r\n\t\t\tdetail::tmat4x2<T, P> m(detail::tmat4x2<T, P>::_null);\r\n\t\t\tm[0][0] = c.x * r.x;\r\n\t\t\tm[0][1] = c.y * r.x;\r\n\t\t\tm[1][0] = c.x * r.y;\r\n\t\t\tm[1][1] = c.y * r.y;\r\n\t\t\tm[2][0] = c.x * r.z;\r\n\t\t\tm[2][1] = c.y * r.z;\r\n\t\t\tm[3][0] = c.x * r.w;\r\n\t\t\tm[3][1] = c.y * r.w;\r\n\t\t\treturn m;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_outerProduct<detail::tvec4, detail::tvec3, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, detail::tvec4, detail::tvec3>::type call(detail::tvec4<T, P> const & c, detail::tvec3<T, P> const & r)\r\n\t\t{\r\n\t\t\tdetail::tmat3x4<T, P> m(detail::tmat3x4<T, P>::_null);\r\n\t\t\tm[0][0] = c.x * r.x;\r\n\t\t\tm[0][1] = c.y * r.x;\r\n\t\t\tm[0][2] = c.z * r.x;\r\n\t\t\tm[0][3] = c.w * r.x;\r\n\t\t\tm[1][0] = c.x * r.y;\r\n\t\t\tm[1][1] = c.y * r.y;\r\n\t\t\tm[1][2] = c.z * r.y;\r\n\t\t\tm[1][3] = c.w * r.y;\r\n\t\t\tm[2][0] = c.x * r.z;\r\n\t\t\tm[2][1] = c.y * r.z;\r\n\t\t\tm[2][2] = c.z * r.z;\r\n\t\t\tm[2][3] = c.w * r.z;\r\n\t\t\treturn m;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_outerProduct<detail::tvec3, detail::tvec4, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, detail::tvec3, detail::tvec4>::type call(detail::tvec3<T, P> const & c, detail::tvec4<T, P> const & r)\r\n\t\t{\r\n\t\t\tdetail::tmat4x3<T, P> m(detail::tmat4x3<T, P>::_null);\r\n\t\t\tm[0][0] = c.x * r.x;\r\n\t\t\tm[0][1] = c.y * r.x;\r\n\t\t\tm[0][2] = c.z * r.x;\r\n\t\t\tm[1][0] = c.x * r.y;\r\n\t\t\tm[1][1] = c.y * r.y;\r\n\t\t\tm[1][2] = c.z * r.y;\r\n\t\t\tm[2][0] = c.x * r.z;\r\n\t\t\tm[2][1] = c.y * r.z;\r\n\t\t\tm[2][2] = c.z * r.z;\r\n\t\t\tm[3][0] = c.x * r.w;\r\n\t\t\tm[3][1] = c.y * r.w;\r\n\t\t\tm[3][2] = c.z * r.w;\r\n\t\t\treturn m;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <template <class, precision> class matType, typename T, precision P>\r\n\tstruct compute_transpose{};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_transpose<detail::tmat2x2, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static detail::tmat2x2<T, P> call(detail::tmat2x2<T, P> const & m)\r\n\t\t{\r\n\t\t\tdetail::tmat2x2<T, P> result(detail::tmat2x2<T, P>::_null);\r\n\t\t\tresult[0][0] = m[0][0];\r\n\t\t\tresult[0][1] = m[1][0];\r\n\t\t\tresult[1][0] = m[0][1];\r\n\t\t\tresult[1][1] = m[1][1];\r\n\t\t\treturn result;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_transpose<detail::tmat2x3, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static detail::tmat3x2<T, P> call(detail::tmat2x3<T, P> const & m)\r\n\t\t{\r\n\t\t\tdetail::tmat3x2<T, P> result(detail::tmat3x2<T, P>::_null);\r\n\t\t\tresult[0][0] = m[0][0];\r\n\t\t\tresult[0][1] = m[1][0];\r\n\t\t\tresult[1][0] = m[0][1];\r\n\t\t\tresult[1][1] = m[1][1];\r\n\t\t\tresult[2][0] = m[0][2];\r\n\t\t\tresult[2][1] = m[1][2];\r\n\t\t\treturn result;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_transpose<detail::tmat2x4, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static detail::tmat4x2<T, P> call(detail::tmat2x4<T, P> const & m)\r\n\t\t{\r\n\t\t\tdetail::tmat4x2<T, P> result(detail::tmat4x2<T, P>::_null);\r\n\t\t\tresult[0][0] = m[0][0];\r\n\t\t\tresult[0][1] = m[1][0];\r\n\t\t\tresult[1][0] = m[0][1];\r\n\t\t\tresult[1][1] = m[1][1];\r\n\t\t\tresult[2][0] = m[0][2];\r\n\t\t\tresult[2][1] = m[1][2];\r\n\t\t\tresult[3][0] = m[0][3];\r\n\t\t\tresult[3][1] = m[1][3];\r\n\t\t\treturn result;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_transpose<detail::tmat3x2, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static detail::tmat2x3<T, P> call(detail::tmat3x2<T, P> const & m)\r\n\t\t{\r\n\t\t\tdetail::tmat2x3<T, P> result(detail::tmat2x3<T, P>::_null);\r\n\t\t\tresult[0][0] = m[0][0];\r\n\t\t\tresult[0][1] = m[1][0];\r\n\t\t\tresult[0][2] = m[2][0];\r\n\t\t\tresult[1][0] = m[0][1];\r\n\t\t\tresult[1][1] = m[1][1];\r\n\t\t\tresult[1][2] = m[2][1];\r\n\t\t\treturn result;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_transpose<detail::tmat3x3, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static detail::tmat3x3<T, P> call(detail::tmat3x3<T, P> const & m)\r\n\t\t{\r\n\t\t\tdetail::tmat3x3<T, P> result(detail::tmat3x3<T, P>::_null);\r\n\t\t\tresult[0][0] = m[0][0];\r\n\t\t\tresult[0][1] = m[1][0];\r\n\t\t\tresult[0][2] = m[2][0];\r\n\r\n\t\t\tresult[1][0] = m[0][1];\r\n\t\t\tresult[1][1] = m[1][1];\r\n\t\t\tresult[1][2] = m[2][1];\r\n\r\n\t\t\tresult[2][0] = m[0][2];\r\n\t\t\tresult[2][1] = m[1][2];\r\n\t\t\tresult[2][2] = m[2][2];\r\n\t\t\treturn result;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_transpose<detail::tmat3x4, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static detail::tmat4x3<T, P> call(detail::tmat3x4<T, P> const & m)\r\n\t\t{\r\n\t\t\tdetail::tmat4x3<T, P> result(detail::tmat4x3<T, P>::_null);\r\n\t\t\tresult[0][0] = m[0][0];\r\n\t\t\tresult[0][1] = m[1][0];\r\n\t\t\tresult[0][2] = m[2][0];\r\n\t\t\tresult[1][0] = m[0][1];\r\n\t\t\tresult[1][1] = m[1][1];\r\n\t\t\tresult[1][2] = m[2][1];\r\n\t\t\tresult[2][0] = m[0][2];\r\n\t\t\tresult[2][1] = m[1][2];\r\n\t\t\tresult[2][2] = m[2][2];\r\n\t\t\tresult[3][0] = m[0][3];\r\n\t\t\tresult[3][1] = m[1][3];\r\n\t\t\tresult[3][2] = m[2][3];\r\n\t\t\treturn result;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_transpose<detail::tmat4x2, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static detail::tmat2x4<T, P> call(detail::tmat4x2<T, P> const & m)\r\n\t\t{\r\n\t\t\tdetail::tmat2x4<T, P> result(detail::tmat2x4<T, P>::_null);\r\n\t\t\tresult[0][0] = m[0][0];\r\n\t\t\tresult[0][1] = m[1][0];\r\n\t\t\tresult[0][2] = m[2][0];\r\n\t\t\tresult[0][3] = m[3][0];\r\n\t\t\tresult[1][0] = m[0][1];\r\n\t\t\tresult[1][1] = m[1][1];\r\n\t\t\tresult[1][2] = m[2][1];\r\n\t\t\tresult[1][3] = m[3][1];\r\n\t\t\treturn result;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_transpose<detail::tmat4x3, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static detail::tmat3x4<T, P> call(detail::tmat4x3<T, P> const & m)\r\n\t\t{\r\n\t\t\tdetail::tmat3x4<T, P> result(detail::tmat3x4<T, P>::_null);\r\n\t\t\tresult[0][0] = m[0][0];\r\n\t\t\tresult[0][1] = m[1][0];\r\n\t\t\tresult[0][2] = m[2][0];\r\n\t\t\tresult[0][3] = m[3][0];\r\n\t\t\tresult[1][0] = m[0][1];\r\n\t\t\tresult[1][1] = m[1][1];\r\n\t\t\tresult[1][2] = m[2][1];\r\n\t\t\tresult[1][3] = m[3][1];\r\n\t\t\tresult[2][0] = m[0][2];\r\n\t\t\tresult[2][1] = m[1][2];\r\n\t\t\tresult[2][2] = m[2][2];\r\n\t\t\tresult[2][3] = m[3][2];\r\n\t\t\treturn result;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_transpose<detail::tmat4x4, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static detail::tmat4x4<T, P> call(detail::tmat4x4<T, P> const & m)\r\n\t\t{\r\n\t\t\tdetail::tmat4x4<T, P> result(detail::tmat4x4<T, P>::_null);\r\n\t\t\tresult[0][0] = m[0][0];\r\n\t\t\tresult[0][1] = m[1][0];\r\n\t\t\tresult[0][2] = m[2][0];\r\n\t\t\tresult[0][3] = m[3][0];\r\n\r\n\t\t\tresult[1][0] = m[0][1];\r\n\t\t\tresult[1][1] = m[1][1];\r\n\t\t\tresult[1][2] = m[2][1];\r\n\t\t\tresult[1][3] = m[3][1];\r\n\r\n\t\t\tresult[2][0] = m[0][2];\r\n\t\t\tresult[2][1] = m[1][2];\r\n\t\t\tresult[2][2] = m[2][2];\r\n\t\t\tresult[2][3] = m[3][2];\r\n\r\n\t\t\tresult[3][0] = m[0][3];\r\n\t\t\tresult[3][1] = m[1][3];\r\n\t\t\tresult[3][2] = m[2][3];\r\n\t\t\tresult[3][3] = m[3][3];\r\n\t\t\treturn result;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <template <class, precision> class matType, typename T, precision P>\r\n\tstruct compute_determinant{};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_determinant<detail::tmat2x2, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static T call(detail::tmat2x2<T, P> const & m)\r\n\t\t{\r\n\t\t\treturn m[0][0] * m[1][1] - m[1][0] * m[0][1];\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_determinant<detail::tmat3x3, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static T call(detail::tmat3x3<T, P> const & m)\r\n\t\t{\r\n\t\t\treturn\r\n\t\t\t\t+ m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2])\r\n\t\t\t\t- m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2])\r\n\t\t\t\t+ m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]);\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_determinant<detail::tmat4x4, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static T call(detail::tmat4x4<T, P> const & m)\r\n\t\t{\r\n\t\t\tT SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\r\n\t\t\tT SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\r\n\t\t\tT SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\r\n\t\t\tT SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\r\n\t\t\tT SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\r\n\t\t\tT SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\r\n\r\n\t\t\tdetail::tvec4<T, P> DetCof(\r\n\t\t\t\t+ (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02),\r\n\t\t\t\t- (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04),\r\n\t\t\t\t+ (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05),\r\n\t\t\t\t- (m[1][0] * SubFactor02 - m[1][1] * SubFactor04 + m[1][2] * SubFactor05));\r\n\r\n\t\t\treturn\r\n\t\t\t\tm[0][0] * DetCof[0] + m[0][1] * DetCof[1] +\r\n\t\t\t\tm[0][2] * DetCof[2] + m[0][3] * DetCof[3];\r\n\t\t}\r\n\t};\r\n}//namespace detail\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class matType>\r\n\tGLM_FUNC_QUALIFIER matType<T, P> matrixCompMult(matType<T, P> const & x, matType<T, P> const & y)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'matrixCompMult' only accept floating-point inputs\");\r\n\r\n\t\tmatType<T, P> result(matType<T, P>::_null);\r\n\t\tfor(length_t i = 0; i < result.length(); ++i)\r\n\t\t\tresult[i] = x[i] * y[i];\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate<typename T, precision P, template <typename, precision> class vecTypeA, template <typename, precision> class vecTypeB>\r\n\tGLM_FUNC_QUALIFIER typename detail::outerProduct_trait<T, P, vecTypeA, vecTypeB>::type outerProduct(vecTypeA<T, P> const & c, vecTypeB<T, P> const & r)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'outerProduct' only accept floating-point inputs\");\r\n\t\treturn detail::compute_outerProduct<vecTypeA, vecTypeB, T, P>::call(c, r);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class matType>\r\n\tGLM_FUNC_QUALIFIER typename matType<T, P>::transpose_type transpose(matType<T, P> const & m)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'transpose' only accept floating-point inputs\");\r\n\t\treturn detail::compute_transpose<matType, T, P>::call(m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class matType>\r\n\tGLM_FUNC_QUALIFIER T determinant(matType<T, P> const & m)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'determinant' only accept floating-point inputs\");\r\n\t\treturn detail::compute_determinant<matType, T, P>::call(m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class matType>\r\n\tGLM_FUNC_QUALIFIER matType<T, P> inverse(matType<T, P> const & m)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'inverse' only accept floating-point inputs\");\r\n\t\treturn detail::compute_inverse<matType, T, P>::call(m);\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/detail/func_noise.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_noise.hpp\r\n/// @date 2008-08-01 / 2011-06-18\r\n/// @author Christophe Riccio\r\n///\r\n/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>\r\n/// \r\n/// @defgroup core_func_noise Noise functions\r\n/// @ingroup core\r\n/// \r\n/// Noise functions are stochastic functions that can be used to increase visual \r\n/// complexity. Values returned by the following noise functions give the \r\n/// appearance of randomness, but are not truly random.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_func_noise\r\n#define glm_core_func_noise\r\n\r\n#include \"type_vec1.hpp\"\r\n#include \"type_vec2.hpp\"\r\n#include \"type_vec3.hpp\"\r\n#include \"setup.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup core_func_noise\r\n\t/// @{\r\n\r\n\t/// Returns a 1D noise value based on the input value x.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/noise1.xml\">GLSL noise1 man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL typename genType::value_type noise1(genType const & x);\r\n\r\n\t/// Returns a 2D noise value based on the input value x.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/noise2.xml\">GLSL noise2 man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL detail::tvec2<typename genType::value_type, defaultp> noise2(genType const & x);\r\n\r\n\t/// Returns a 3D noise value based on the input value x.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/noise3.xml\">GLSL noise3 man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL detail::tvec3<typename genType::value_type, defaultp> noise3(genType const & x);\r\n\r\n\t/// Returns a 4D noise value based on the input value x.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/noise4.xml\">GLSL noise4 man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL detail::tvec4<typename genType::value_type, defaultp> noise4(genType const & x);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"func_noise.inl\"\r\n\r\n#endif//glm_core_func_noise\r\n"
  },
  {
    "path": "cpu/glm/detail/func_noise.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_noise.inl\r\n/// @date 2008-08-01 / 2011-09-27\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../detail/_noise.hpp\"\r\n#include \"./func_common.hpp\"\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> grad4(T const & j, detail::tvec4<T, P> const & ip)\r\n\t{\r\n\t\tdetail::tvec3<T, P> pXYZ = floor(fract(detail::tvec3<T, P>(j) * detail::tvec3<T, P>(ip)) * T(7)) * ip[2] - T(1);\r\n\t\tT pW = static_cast<T>(1.5) - dot(abs(pXYZ), detail::tvec3<T, P>(1));\r\n\t\tdetail::tvec4<T, P> s = detail::tvec4<T, P>(lessThan(detail::tvec4<T, P>(pXYZ, pW), detail::tvec4<T, P>(0.0)));\r\n\t\tpXYZ = pXYZ + (detail::tvec3<T, P>(s) * T(2) - T(1)) * s.w; \r\n\t\treturn detail::tvec4<T, P>(pXYZ, pW);\r\n\t}\r\n}//namespace detail\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T noise1(T const & x)\r\n\t{\r\n\t\treturn noise1(detail::tvec2<T, defaultp>(x, T(0)));\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, defaultp> noise2(T const & x)\r\n\t{\r\n\t\treturn detail::tvec2<T, defaultp>(\r\n\t\t\tnoise1(x + T(0.0)),\r\n\t\t\tnoise1(x + T(1.0)));\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, defaultp> noise3(T const & x)\r\n\t{\r\n\t\treturn detail::tvec3<T, defaultp>(\r\n\t\t\tnoise1(x - T(1.0)),\r\n\t\t\tnoise1(x + T(0.0)),\r\n\t\t\tnoise1(x + T(1.0)));\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, defaultp> noise4(T const & x)\r\n\t{\r\n\t\treturn detail::tvec4<T, defaultp>(\r\n\t\t\tnoise1(x - T(1.0)),\r\n\t\t\tnoise1(x + T(0.0)),\r\n\t\t\tnoise1(x + T(1.0)),\r\n\t\t\tnoise1(x + T(2.0)));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T noise1(detail::tvec2<T, P> const & v)\r\n\t{\r\n\t\tdetail::tvec4<T, P> const C = detail::tvec4<T, P>(\r\n\t\t\tT( 0.211324865405187),\t\t// (3.0 -  sqrt(3.0)) / 6.0\r\n\t\t\tT( 0.366025403784439),\t\t//  0.5 * (sqrt(3.0)  - 1.0)\r\n\t\t\tT(-0.577350269189626),\t\t// -1.0 + 2.0 * C.x\r\n\t\t\tT( 0.024390243902439));\t\t//  1.0 / 41.0\r\n\t\t\r\n\t\t// First corner\r\n\t\tdetail::tvec2<T, P> i  = floor(v + dot(v, detail::tvec2<T, P>(C[1])));\r\n\t\tdetail::tvec2<T, P> x0 = v -   i + dot(i, detail::tvec2<T, P>(C[0]));\r\n\t\t\r\n\t\t// Other corners\r\n\t\t//i1.x = step( x0.y, x0.x ); // x0.x > x0.y ? 1.0 : 0.0\r\n\t\t//i1.y = 1.0 - i1.x;\r\n\t\tdetail::tvec2<T, P> i1 = (x0.x > x0.y) ? detail::tvec2<T, P>(1, 0) : detail::tvec2<T, P>(0, 1);\r\n\r\n\t\t// x0 = x0 - 0.0 + 0.0 * C.xx ;\r\n\t\t// x1 = x0 - i1 + 1.0 * C.xx ;\r\n\t\t// x2 = x0 - 1.0 + 2.0 * C.xx ;\r\n\t\tdetail::tvec4<T, P> x12 = detail::tvec4<T, P>(x0.x, x0.y, x0.x, x0.y) + detail::tvec4<T, P>(C.x, C.x, C.z, C.z);\r\n\t\tx12 = detail::tvec4<T, P>(detail::tvec2<T, P>(x12) - i1, x12.z, x12.w);\r\n\t\t\r\n\t\t// Permutations\r\n\t\ti = mod(i, T(289)); // Avoid truncation effects in permutation\r\n\t\tdetail::tvec3<T, P> p = detail::permute(\r\n\t\t\tdetail::permute(i.y + detail::tvec3<T, P>(T(0), i1.y, T(1))) + i.x + detail::tvec3<T, P>(T(0), i1.x, T(1)));\r\n\t\t\r\n\t\tdetail::tvec3<T, P> m = max(T(0.5) - detail::tvec3<T, P>(\r\n\t\t\tdot(x0, x0),\r\n\t\t\tdot(detail::tvec2<T, P>(x12.x, x12.y), detail::tvec2<T, P>(x12.x, x12.y)),\r\n\t\t\tdot(detail::tvec2<T, P>(x12.z, x12.w), detail::tvec2<T, P>(x12.z, x12.w))), T(0));\r\n\t\t\r\n\t\tm = m * m;\r\n\t\tm = m * m;\r\n\t\t\r\n\t\t// Gradients: 41 points uniformly over a line, mapped onto a diamond.\r\n\t\t// The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287)\r\n\t\t\r\n\t\tdetail::tvec3<T, P> x = static_cast<T>(2) * fract(p * C.w) - T(1);\r\n\t\tdetail::tvec3<T, P> h = abs(x) - T(0.5);\r\n\t\tdetail::tvec3<T, P> ox = floor(x + T(0.5));\r\n\t\tdetail::tvec3<T, P> a0 = x - ox;\r\n\t\t\r\n\t\t// Normalise gradients implicitly by scaling m\r\n\t\t// Inlined for speed: m *= taylorInvSqrt( a0*a0 + h*h );\r\n\t\tm *= static_cast<T>(1.79284291400159) - T(0.85373472095314) * (a0 * a0 + h * h);\r\n\t\t\r\n\t\t// Compute final noise value at P\r\n\t\tdetail::tvec3<T, P> g;\r\n\t\tg.x  = a0.x  * x0.x  + h.x  * x0.y;\r\n\t\t//g.yz = a0.yz * x12.xz + h.yz * x12.yw;\r\n\t\tg.y = a0.y * x12.x + h.y * x12.y;\r\n\t\tg.z = a0.z * x12.z + h.z * x12.w;\r\n\t\treturn T(130) * dot(m, g);\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T noise1(detail::tvec3<T, P> const & v)\r\n\t{\r\n\t\tdetail::tvec2<T, P> const C(1.0 / 6.0, 1.0 / 3.0);\r\n\t\tdetail::tvec4<T, P> const D(0.0, 0.5, 1.0, 2.0);\r\n\t\t\r\n\t\t// First corner\r\n\t\tdetail::tvec3<T, P> i(floor(v + dot(v, detail::tvec3<T, P>(C.y))));\r\n\t\tdetail::tvec3<T, P> x0(v - i + dot(i, detail::tvec3<T, P>(C.x)));\r\n\t\t\r\n\t\t// Other corners\r\n\t\tdetail::tvec3<T, P> g(step(detail::tvec3<T, P>(x0.y, x0.z, x0.x), x0));\r\n\t\tdetail::tvec3<T, P> l(T(1) - g);\r\n\t\tdetail::tvec3<T, P> i1(min(g, detail::tvec3<T, P>(l.z, l.x, l.y)));\r\n\t\tdetail::tvec3<T, P> i2(max(g, detail::tvec3<T, P>(l.z, l.x, l.y)));\r\n\t\t\r\n\t\t// x0 = x0 - 0.0 + 0.0 * C.xxx;\r\n\t\t// x1 = x0 - i1  + 1.0 * C.xxx;\r\n\t\t// x2 = x0 - i2  + 2.0 * C.xxx;\r\n\t\t// x3 = x0 - 1.0 + 3.0 * C.xxx;\r\n\t\tdetail::tvec3<T, P> x1(x0 - i1 + C.x);\r\n\t\tdetail::tvec3<T, P> x2(x0 - i2 + C.y);\t\t// 2.0*C.x = 1/3 = C.y\r\n\t\tdetail::tvec3<T, P> x3(x0 - D.y);\t\t\t// -1.0+3.0*C.x = -0.5 = -D.y\r\n\t\t\r\n\t\t// Permutations\r\n\t\ti = mod289(i); \r\n\t\tdetail::tvec4<T, P> p(detail::permute(detail::permute(detail::permute(\r\n\t\t\ti.z + detail::tvec4<T, P>(T(0), i1.z, i2.z, T(1))) +\r\n\t\t\ti.y + detail::tvec4<T, P>(T(0), i1.y, i2.y, T(1))) +\r\n\t\t\ti.x + detail::tvec4<T, P>(T(0), i1.x, i2.x, T(1))));\r\n\t\t\r\n\t\t// Gradients: 7x7 points over a square, mapped onto an octahedron.\r\n\t\t// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\r\n\t\tT n_ = static_cast<T>(0.142857142857); // 1.0/7.0\r\n\t\tdetail::tvec3<T, P> ns(n_ * detail::tvec3<T, P>(D.w, D.y, D.z) - detail::tvec3<T, P>(D.x, D.z, D.x));\r\n\t\t\r\n\t\tdetail::tvec4<T, P> j(p - T(49) * floor(p * ns.z * ns.z));\t// mod(p,7*7)\r\n\t\t\r\n\t\tdetail::tvec4<T, P> x_(floor(j * ns.z));\r\n\t\tdetail::tvec4<T, P> y_(floor(j - T(7) * x_));\t\t\t\t// mod(j,N)\r\n\t\t\r\n\t\tdetail::tvec4<T, P> x(x_ * ns.x + ns.y);\r\n\t\tdetail::tvec4<T, P> y(y_ * ns.x + ns.y);\r\n\t\tdetail::tvec4<T, P> h(T(1) - abs(x) - abs(y));\r\n\t\t\r\n\t\tdetail::tvec4<T, P> b0(x.x, x.y, y.x, y.y);\r\n\t\tdetail::tvec4<T, P> b1(x.z, x.w, y.z, y.w);\r\n\t\t\r\n\t\t// vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\r\n\t\t// vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\r\n\t\tdetail::tvec4<T, P> s0(floor(b0) * T(2) + T(1));\r\n\t\tdetail::tvec4<T, P> s1(floor(b1) * T(2) + T(1));\r\n\t\tdetail::tvec4<T, P> sh(-step(h, detail::tvec4<T, P>(0.0)));\r\n\t\t\r\n\t\tdetail::tvec4<T, P> a0 = detail::tvec4<T, P>(b0.x, b0.z, b0.y, b0.w) + detail::tvec4<T, P>(s0.x, s0.z, s0.y, s0.w) * detail::tvec4<T, P>(sh.x, sh.x, sh.y, sh.y);\r\n\t\tdetail::tvec4<T, P> a1 = detail::tvec4<T, P>(b1.x, b1.z, b1.y, b1.w) + detail::tvec4<T, P>(s1.x, s1.z, s1.y, s1.w) * detail::tvec4<T, P>(sh.z, sh.z, sh.w, sh.w);\r\n\t\t\r\n\t\tdetail::tvec3<T, P> p0(a0.x, a0.y, h.x);\r\n\t\tdetail::tvec3<T, P> p1(a0.z, a0.w, h.y);\r\n\t\tdetail::tvec3<T, P> p2(a1.x, a1.y, h.z);\r\n\t\tdetail::tvec3<T, P> p3(a1.z, a1.w, h.w);\r\n\t\t\r\n\t\t// Normalise gradients\r\n\t\tdetail::tvec4<T, P> norm = taylorInvSqrt(detail::tvec4<T, P>(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3)));\r\n\t\tp0 *= norm.x;\r\n\t\tp1 *= norm.y;\r\n\t\tp2 *= norm.z;\r\n\t\tp3 *= norm.w;\r\n\t\t\r\n\t\t// Mix final noise value\r\n\t\tdetail::tvec4<T, P> m = max(T(0.6) - detail::tvec4<T, P>(dot(x0, x0), dot(x1, x1), dot(x2, x2), dot(x3, x3)), T(0));\r\n\t\tm = m * m;\r\n\t\treturn T(42) * dot(m * m, detail::tvec4<T, P>(dot(p0, x0), dot(p1, x1), dot(p2, x2), dot(p3, x3)));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T noise1(detail::tvec4<T, P> const & v)\r\n\t{\r\n\t\tdetail::tvec4<T, P> const C(\r\n\t\t\t0.138196601125011,\t\t// (5 - sqrt(5))/20  G4\r\n\t\t\t0.276393202250021,\t\t// 2 * G4\r\n\t\t\t0.414589803375032,\t\t// 3 * G4\r\n\t\t\t-0.447213595499958);\t// -1 + 4 * G4\r\n\t\t\r\n\t\t// (sqrt(5) - 1)/4 = F4, used once below\r\n\t\tT const F4 = static_cast<T>(0.309016994374947451);\r\n\t\t\r\n\t\t// First corner\r\n\t\tdetail::tvec4<T, P> i  = floor(v + dot(v, detail::tvec4<T, P>(F4)));\r\n\t\tdetail::tvec4<T, P> x0 = v -   i + dot(i, detail::tvec4<T, P>(C.x));\r\n\t\t\r\n\t\t// Other corners\r\n\t\t\r\n\t\t// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)\r\n\t\tdetail::tvec4<T, P> i0;\r\n\t\tdetail::tvec3<T, P> isX = step(detail::tvec3<T, P>(x0.y, x0.z, x0.w), detail::tvec3<T, P>(x0.x));\r\n\t\tdetail::tvec3<T, P> isYZ = step(detail::tvec3<T, P>(x0.z, x0.w, x0.w), detail::tvec3<T, P>(x0.y, x0.y, x0.z));\r\n\t\t\r\n\t\t//  i0.x = dot(isX, vec3(1.0));\r\n\t\t//i0.x = isX.x + isX.y + isX.z;\r\n\t\t//i0.yzw = static_cast<T>(1) - isX;\r\n\t\ti0 = detail::tvec4<T, P>(isX.x + isX.y + isX.z, T(1) - isX);\r\n\t\t\r\n\t\t//  i0.y += dot(isYZ.xy, vec2(1.0));\r\n\t\ti0.y += isYZ.x + isYZ.y;\r\n\t\t\r\n\t\t//i0.zw += 1.0 - detail::tvec2<T, P>(isYZ.x, isYZ.y);\r\n\t\ti0.z += static_cast<T>(1) - isYZ.x;\r\n\t\ti0.w += static_cast<T>(1) - isYZ.y;\r\n\t\ti0.z += isYZ.z;\r\n\t\ti0.w += static_cast<T>(1) - isYZ.z;\r\n\t\t\r\n\t\t// i0 now contains the unique values 0,1,2,3 in each channel\r\n\t\tdetail::tvec4<T, P> i3 = clamp(i0, T(0), T(1));\r\n\t\tdetail::tvec4<T, P> i2 = clamp(i0 - T(1), T(0), T(1));\r\n\t\tdetail::tvec4<T, P> i1 = clamp(i0 - T(2), T(0), T(1));\r\n\t\t\r\n\t\t//  x0 = x0 - 0.0 + 0.0 * C.xxxx\r\n\t\t//  x1 = x0 - i1  + 0.0 * C.xxxx\r\n\t\t//  x2 = x0 - i2  + 0.0 * C.xxxx\r\n\t\t//  x3 = x0 - i3  + 0.0 * C.xxxx\r\n\t\t//  x4 = x0 - 1.0 + 4.0 * C.xxxx\r\n\t\tdetail::tvec4<T, P> x1 = x0 - i1 + C.x;\r\n\t\tdetail::tvec4<T, P> x2 = x0 - i2 + C.y;\r\n\t\tdetail::tvec4<T, P> x3 = x0 - i3 + C.z;\r\n\t\tdetail::tvec4<T, P> x4 = x0 + C.w;\r\n\t\t\r\n\t\t// Permutations\r\n\t\ti = mod(i, T(289));\r\n\t\tT j0 = detail::permute(detail::permute(detail::permute(detail::permute(i.w) + i.z) + i.y) + i.x);\r\n\t\tdetail::tvec4<T, P> j1 = detail::permute(detail::permute(detail::permute(detail::permute(\r\n\t\t\ti.w + detail::tvec4<T, P>(i1.w, i2.w, i3.w, T(1))) +\r\n\t\t\ti.z + detail::tvec4<T, P>(i1.z, i2.z, i3.z, T(1))) +\r\n\t\t\ti.y + detail::tvec4<T, P>(i1.y, i2.y, i3.y, T(1))) +\r\n\t\t\ti.x + detail::tvec4<T, P>(i1.x, i2.x, i3.x, T(1)));\r\n\t\t\r\n\t\t// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope\r\n\t\t// 7*7*6 = 294, which is close to the ring size 17*17 = 289.\r\n\t\tdetail::tvec4<T, P> ip = detail::tvec4<T, P>(T(1) / T(294), T(1) / T(49), T(1) / T(7), T(0));\r\n\t\t\r\n\t\tdetail::tvec4<T, P> p0 = detail::grad4(j0,   ip);\r\n\t\tdetail::tvec4<T, P> p1 = detail::grad4(j1.x, ip);\r\n\t\tdetail::tvec4<T, P> p2 = detail::grad4(j1.y, ip);\r\n\t\tdetail::tvec4<T, P> p3 = detail::grad4(j1.z, ip);\r\n\t\tdetail::tvec4<T, P> p4 = detail::grad4(j1.w, ip);\r\n\t\t\r\n\t\t// Normalise gradients\r\n\t\tdetail::tvec4<T, P> norm = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3)));\r\n\t\tp0 *= norm.x;\r\n\t\tp1 *= norm.y;\r\n\t\tp2 *= norm.z;\r\n\t\tp3 *= norm.w;\r\n\t\tp4 *= taylorInvSqrt(dot(p4, p4));\r\n\t\t\r\n\t\t// Mix contributions from the five corners\r\n\t\tdetail::tvec3<T, P> m0 = max(T(0.6) - detail::tvec3<T, P>(dot(x0, x0), dot(x1, x1), dot(x2, x2)), T(0));\r\n\t\tdetail::tvec2<T, P> m1 = max(T(0.6) - detail::tvec2<T, P>(dot(x3, x3), dot(x4, x4)             ), T(0));\r\n\t\tm0 = m0 * m0;\r\n\t\tm1 = m1 * m1;\r\n\t\t\r\n\t\treturn T(49) * (\r\n\t\t\tdot(m0 * m0, detail::tvec3<T, P>(dot(p0, x0), dot(p1, x1), dot(p2, x2))) +\r\n\t\t\tdot(m1 * m1, detail::tvec2<T, P>(dot(p3, x3), dot(p4, x4))));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> noise2(detail::tvec2<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tnoise1(x + detail::tvec2<T, P>(0.0)),\r\n\t\t\tnoise1(detail::tvec2<T, P>(0.0) - x));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> noise2(detail::tvec3<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tnoise1(x + detail::tvec3<T, P>(0.0)),\r\n\t\t\tnoise1(detail::tvec3<T, P>(0.0) - x));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> noise2(detail::tvec4<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tnoise1(x + detail::tvec4<T, P>(0)),\r\n\t\t\tnoise1(detail::tvec4<T, P>(0) - x));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> noise3(detail::tvec2<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tnoise1(x - detail::tvec2<T, P>(1.0)),\r\n\t\t\tnoise1(x + detail::tvec2<T, P>(0.0)),\r\n\t\t\tnoise1(x + detail::tvec2<T, P>(1.0)));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> noise3(detail::tvec3<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tnoise1(x - detail::tvec3<T, P>(1.0)),\r\n\t\t\tnoise1(x + detail::tvec3<T, P>(0.0)),\r\n\t\t\tnoise1(x + detail::tvec3<T, P>(1.0)));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> noise3(detail::tvec4<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tnoise1(x - detail::tvec4<T, P>(1)),\r\n\t\t\tnoise1(x + detail::tvec4<T, P>(0)),\r\n\t\t\tnoise1(x + detail::tvec4<T, P>(1)));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> noise4(detail::tvec2<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tnoise1(x - detail::tvec2<T, P>(1)),\r\n\t\t\tnoise1(x + detail::tvec2<T, P>(0)),\r\n\t\t\tnoise1(x + detail::tvec2<T, P>(1)),\r\n\t\t\tnoise1(x + detail::tvec2<T, P>(2)));\r\n\t}\r\n\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> noise4(detail::tvec3<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tnoise1(x - detail::tvec3<T, P>(1)),\r\n\t\t\tnoise1(x + detail::tvec3<T, P>(0)),\r\n\t\t\tnoise1(x + detail::tvec3<T, P>(1)),\r\n\t\t\tnoise1(x + detail::tvec3<T, P>(2)));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> noise4(detail::tvec4<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tnoise1(x - detail::tvec4<T, P>(1)),\r\n\t\t\tnoise1(x + detail::tvec4<T, P>(0)),\r\n\t\t\tnoise1(x + detail::tvec4<T, P>(1)),\r\n\t\t\tnoise1(x + detail::tvec4<T, P>(2)));\r\n\t}\r\n\t\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/detail/func_packing.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_packing.hpp\r\n/// @date 2010-03-17 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///\r\n/// @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>\r\n/// \r\n/// @defgroup core_func_packing Floating-Point Pack and Unpack Functions\r\n/// @ingroup core\r\n/// \r\n/// These functions do not operate component-wise, rather as described in each case.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_CORE_func_packing\r\n#define GLM_CORE_func_packing\r\n\r\n#include \"type_vec2.hpp\"\r\n#include \"type_vec4.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup core_func_packing\r\n\t/// @{\r\n\r\n\t/// First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. \r\n\t/// Then, the results are packed into the returned 32-bit unsigned integer.\r\n\t/// \r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packUnorm2x16: round(clamp(c, 0, +1) * 65535.0) \r\n\t/// \r\n\t/// The first component of the vector will be written to the least significant bits of the output; \r\n\t/// the last component will be written to the most significant bits.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm2x16.xml\">GLSL packUnorm2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint packUnorm2x16(vec2 const & v);\r\n\r\n\t/// First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. \r\n\t/// Then, the results are packed into the returned 32-bit unsigned integer.\r\n\t/// \r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packSnorm2x16: round(clamp(v, -1, +1) * 32767.0)\r\n\t/// \r\n\t/// The first component of the vector will be written to the least significant bits of the output; \r\n\t/// the last component will be written to the most significant bits.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm2x16.xml\">GLSL packSnorm2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint packSnorm2x16(vec2 const & v);\r\n\r\n\t/// First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. \r\n\t/// Then, the results are packed into the returned 32-bit unsigned integer.\r\n\t/// \r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packUnorm4x8:\tround(clamp(c, 0, +1) * 255.0)\r\n\t/// \r\n\t/// The first component of the vector will be written to the least significant bits of the output; \r\n\t/// the last component will be written to the most significant bits.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml\">GLSL packUnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint packUnorm4x8(vec4 const & v);\r\n\r\n\t/// First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. \r\n\t/// Then, the results are packed into the returned 32-bit unsigned integer.\r\n\t/// \r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packSnorm4x8:\tround(clamp(c, -1, +1) * 127.0) \r\n\t/// \r\n\t/// The first component of the vector will be written to the least significant bits of the output; \r\n\t/// the last component will be written to the most significant bits.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml\">GLSL packSnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint packSnorm4x8(vec4 const & v);\r\n\r\n\t/// 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. \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackUnorm2x16: f / 65535.0 \r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml\">GLSL unpackUnorm2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL vec2 unpackUnorm2x16(uint const & p);\r\n\r\n\t/// 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. \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackSnorm2x16: clamp(f / 32767.0, -1, +1)\r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm2x16.xml\">GLSL unpackSnorm2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL vec2 unpackSnorm2x16(uint const & p);\r\n\r\n\t/// 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. \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackUnorm4x8: f / 255.0\r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml\">GLSL unpackUnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL vec4 unpackUnorm4x8(uint const & p);\r\n\r\n\t/// 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. \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackSnorm4x8: clamp(f / 127.0, -1, +1)\r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml\">GLSL unpackSnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL vec4 unpackSnorm4x8(uint const & p);\r\n\r\n\t/// Returns a double-precision value obtained by packing the components of v into a 64-bit value. \r\n\t/// If an IEEE 754 Inf or NaN is created, it will not signal, and the resulting floating point value is unspecified. \r\n\t/// Otherwise, the bit- level representation of v is preserved. \r\n\t/// The first vector component specifies the 32 least significant bits; \r\n\t/// the second component specifies the 32 most significant bits.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packDouble2x32.xml\">GLSL packDouble2x32 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL double packDouble2x32(uvec2 const & v);\r\n\r\n\t/// Returns a two-component unsigned integer vector representation of v. \r\n\t/// The bit-level representation of v is preserved. \r\n\t/// The first component of the vector contains the 32 least significant bits of the double; \r\n\t/// the second component consists the 32 most significant bits.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackDouble2x32.xml\">GLSL unpackDouble2x32 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uvec2 unpackDouble2x32(double const & v);\r\n\r\n\t/// Returns an unsigned integer obtained by converting the components of a two-component floating-point vector \r\n\t/// to the 16-bit floating-point representation found in the OpenGL Specification, \r\n\t/// and then packing these two 16- bit integers into a 32-bit unsigned integer.\r\n\t/// The first vector component specifies the 16 least-significant bits of the result; \r\n\t/// the second component specifies the 16 most-significant bits.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml\">GLSL packHalf2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint packHalf2x16(vec2 const & v);\r\n\t\r\n\t/// Returns a two-component floating-point vector with components obtained by unpacking a 32-bit unsigned integer into a pair of 16-bit values, \r\n\t/// interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification, \r\n\t/// and converting them to 32-bit floating-point values.\r\n\t/// The first component of the vector is obtained from the 16 least-significant bits of v; \r\n\t/// the second component is obtained from the 16 most-significant bits of v.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml\">GLSL unpackHalf2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL vec2 unpackHalf2x16(uint const & v);\r\n\t\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"func_packing.inl\"\r\n\r\n#endif//GLM_CORE_func_packing\r\n"
  },
  {
    "path": "cpu/glm/detail/func_packing.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_packing.inl\r\n/// @date 2010-03-17 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"func_common.hpp\"\r\n#include \"type_half.hpp\"\r\n#include \"../fwd.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\tGLM_FUNC_QUALIFIER uint packUnorm2x16(vec2 const & v)\r\n\t{\r\n\t\tu16vec2 Topack(round(clamp(v, 0.0f, 1.0f) * 65535.0f));\r\n\t\treturn reinterpret_cast<uint&>(Topack);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER vec2 unpackUnorm2x16(uint const & p)\r\n\t{\r\n\t\tvec2 Unpack(reinterpret_cast<u16vec2 const &>(p));\r\n\t\treturn Unpack * float(1.5259021896696421759365224689097e-5); // 1.0 / 65535.0\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint packSnorm2x16(vec2 const & v)\r\n\t{\r\n\t\ti16vec2 Topack(round(clamp(v ,-1.0f, 1.0f) * 32767.0f));\r\n\t\treturn reinterpret_cast<uint32&>(Topack);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER vec2 unpackSnorm2x16(uint const & p)\r\n\t{\r\n\t\tvec2 Unpack(reinterpret_cast<i16vec2 const &>(p));\r\n\t\treturn clamp(\r\n\t\t\tUnpack * 3.0518509475997192297128208258309e-5f, //1.0f / 32767.0f,\r\n\t\t\t-1.0f, 1.0f);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint packUnorm4x8(vec4 const & v)\r\n\t{\r\n\t\tu8vec4 Topack(round(clamp(v, 0.0f, 1.0f) * 255.0f));\r\n\t\treturn reinterpret_cast<uint&>(Topack);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER vec4 unpackUnorm4x8(uint const & p)\r\n\t{\r\n\t\tvec4 Unpack(reinterpret_cast<u8vec4 const&>(p));\r\n\t\treturn Unpack * float(0.0039215686274509803921568627451); // 1 / 255\r\n\t}\r\n\t\r\n\tGLM_FUNC_QUALIFIER uint packSnorm4x8(vec4 const & v)\r\n\t{\r\n\t\ti8vec4 Topack(round(clamp(v ,-1.0f, 1.0f) * 127.0f));\r\n\t\treturn reinterpret_cast<uint&>(Topack);\r\n\t}\r\n\t\r\n\tGLM_FUNC_QUALIFIER glm::vec4 unpackSnorm4x8(uint const & p)\r\n\t{\r\n\t\tvec4 Unpack(reinterpret_cast<i8vec4 const &>(p));\r\n\t\treturn clamp(\r\n\t\t\tUnpack * 0.0078740157480315f, // 1.0f / 127.0f\r\n\t\t\t-1.0f, 1.0f);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER double packDouble2x32(uvec2 const & v)\r\n\t{\r\n\t\treturn reinterpret_cast<double const &>(v);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uvec2 unpackDouble2x32(double const & v)\r\n\t{\r\n\t\treturn reinterpret_cast<uvec2 const &>(v);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint packHalf2x16(vec2 const & v)\r\n\t{\r\n\t\ti16vec2 Unpack(\r\n\t\t\tdetail::toFloat16(v.x),\r\n\t\t\tdetail::toFloat16(v.y));\r\n\r\n\t\tuint * Result = reinterpret_cast<uint*>(&Unpack);\r\n\t\treturn *Result;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER vec2 unpackHalf2x16(uint const & v)\r\n\t{\r\n\t\ti16vec2 Unpack(reinterpret_cast<i16vec2 const &>(v));\r\n\t\r\n\t\treturn vec2(\r\n\t\t\tdetail::toFloat32(Unpack.x), \r\n\t\t\tdetail::toFloat32(Unpack.y));\r\n\t}\r\n}//namespace glm\r\n\r\n"
  },
  {
    "path": "cpu/glm/detail/func_trigonometric.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_trigonometric.hpp\r\n/// @date 2008-08-01 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///\r\n/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n/// \r\n/// @defgroup core_func_trigonometric Angle and Trigonometry Functions\r\n/// @ingroup core\r\n/// \r\n/// Function parameters specified as angle are assumed to be in units of radians. \r\n/// In no case will any of these functions result in a divide by zero error. If \r\n/// the divisor of a ratio is 0, then results will be undefined.\r\n/// \r\n/// These all operate component-wise. The description is per component.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_CORE_func_trigonometric\r\n#define GLM_CORE_func_trigonometric\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup core_func_trigonometric\r\n\t/// @{\r\n\r\n\t/// Converts degrees to radians and returns the result.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/radians.xml\">GLSL radians man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType radians(genType const & degrees);\r\n\r\n\t/// Converts radians to degrees and returns the result.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/degrees.xml\">GLSL degrees man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType degrees(genType const & radians);\r\n\r\n\t/// The standard trigonometric sine function. \r\n\t/// The values returned by this function will range from [-1, 1].\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/sin.xml\">GLSL sin man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType sin(genType const & angle);\r\n\r\n\t/// The standard trigonometric cosine function. \r\n\t/// The values returned by this function will range from [-1, 1].\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/cos.xml\">GLSL cos man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType cos(genType const & angle);\r\n\r\n\t/// The standard trigonometric tangent function.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/tan.xml\">GLSL tan man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType tan(genType const & angle); \r\n\r\n\t/// Arc sine. Returns an angle whose sine is x. \r\n\t/// The range of values returned by this function is [-PI/2, PI/2]. \r\n\t/// Results are undefined if |x| > 1.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/asin.xml\">GLSL asin man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType asin(genType const & x);\r\n\r\n\t/// Arc cosine. Returns an angle whose sine is x. \r\n\t/// The range of values returned by this function is [0, PI]. \r\n\t/// Results are undefined if |x| > 1.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/acos.xml\">GLSL acos man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType acos(genType const & x);\r\n\r\n\t/// Arc tangent. Returns an angle whose tangent is y/x. \r\n\t/// The signs of x and y are used to determine what \r\n\t/// quadrant the angle is in. The range of values returned \r\n\t/// by this function is [-PI, PI]. Results are undefined \r\n\t/// if x and y are both 0. \r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/atan.xml\">GLSL atan man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType atan(genType const & y, genType const & x);\r\n\r\n\t/// Arc tangent. Returns an angle whose tangent is y_over_x. \r\n\t/// The range of values returned by this function is [-PI/2, PI/2].\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/atan.xml\">GLSL atan man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType atan(genType const & y_over_x);\r\n\r\n\t/// Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/sinh.xml\">GLSL sinh man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType sinh(genType const & angle);\r\n\r\n\t/// Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/cosh.xml\">GLSL cosh man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType cosh(genType const & angle);\r\n\r\n\t/// Returns the hyperbolic tangent function, sinh(angle) / cosh(angle)\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/tanh.xml\">GLSL tanh man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType tanh(genType const & angle);\r\n\r\n\t/// Arc hyperbolic sine; returns the inverse of sinh.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/asinh.xml\">GLSL asinh man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType asinh(genType const & x);\r\n\t\r\n\t/// Arc hyperbolic cosine; returns the non-negative inverse\r\n\t/// of cosh. Results are undefined if x < 1.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/acosh.xml\">GLSL acosh man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType acosh(genType const & x);\r\n\r\n\t/// Arc hyperbolic tangent; returns the inverse of tanh.\r\n\t/// Results are undefined if abs(x) >= 1.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/atanh.xml\">GLSL atanh man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType atanh(genType const & x);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"func_trigonometric.inl\"\r\n\r\n#endif//GLM_CORE_func_trigonometric\r\n\r\n\r\n"
  },
  {
    "path": "cpu/glm/detail/func_trigonometric.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_trigonometric.inl\r\n/// @date 2008-08-03 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"_vectorize.hpp\"\r\n#include <cmath>\r\n#include <limits>\r\n\r\nnamespace glm\r\n{\r\n\t// radians\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType radians\r\n\t(\r\n\t\tgenType const & degrees\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'radians' only accept floating-point input\");\r\n\r\n\t\treturn degrees * genType(0.01745329251994329576923690768489);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(radians)\r\n\t\r\n\t// degrees\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType degrees\r\n\t(\r\n\t\tgenType const & radians\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'degrees' only accept floating-point input\");\r\n\r\n\t\treturn radians * genType(57.295779513082320876798154814105);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(degrees)\r\n\r\n\t// sin\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType sin\r\n\t(\r\n\t\tgenType const & angle\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'sin' only accept floating-point input\");\r\n\r\n\t\treturn genType(::std::sin(angle));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(sin)\r\n\r\n\t// cos\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType cos(genType const & angle)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'cos' only accept floating-point input\");\r\n\r\n\t\treturn genType(::std::cos(angle));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(cos)\r\n\r\n\t// tan\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType tan\r\n\t(\r\n\t\tgenType const & angle\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'tan' only accept floating-point input\");\r\n\r\n\t\treturn genType(::std::tan(angle));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(tan)\r\n\r\n\t// asin\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType asin\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'asin' only accept floating-point input\");\r\n\r\n\t\treturn genType(::std::asin(x));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(asin)\r\n\r\n\t// acos\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType acos\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'acos' only accept floating-point input\");\r\n\r\n\t\treturn genType(::std::acos(x));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(acos)\r\n\r\n\t// atan\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType atan\r\n\t(\r\n\t\tgenType const & y, \r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'atan' only accept floating-point input\");\r\n\r\n\t\treturn genType(::std::atan2(y, x));\r\n\t}\r\n\r\n\tVECTORIZE_VEC_VEC(atan)\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType atan\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'atan' only accept floating-point input\");\r\n\r\n\t\treturn genType(::std::atan(x));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(atan)\r\n\r\n\t// sinh\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType sinh\r\n\t(\r\n\t\tgenType const & angle\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'sinh' only accept floating-point input\");\r\n\r\n\t\treturn genType(std::sinh(angle));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(sinh)\r\n\r\n\t// cosh\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType cosh\r\n\t(\r\n\t\tgenType const & angle\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'cosh' only accept floating-point input\");\r\n\r\n\t\treturn genType(std::cosh(angle));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(cosh)\r\n\r\n\t// tanh\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType tanh\r\n\t(\r\n\t\tgenType const & angle\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'tanh' only accept floating-point input\");\r\n\r\n\t\treturn genType(std::tanh(angle));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(tanh)\r\n\r\n\t// asinh\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType asinh\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'asinh' only accept floating-point input\");\r\n\t\t\r\n\t\treturn (x < genType(0) ? genType(-1) : (x > genType(0) ? genType(1) : genType(0))) * log(abs(x) + sqrt(genType(1) + x * x));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(asinh)\r\n\r\n\t// acosh\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType acosh\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'acosh' only accept floating-point input\");\r\n\r\n\t\tif(x < genType(1))\r\n\t\t\treturn genType(0);\r\n\t\treturn log(x + sqrt(x * x - genType(1)));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(acosh)\r\n\r\n\t// atanh\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType atanh\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'atanh' only accept floating-point input\");\r\n\t\t\r\n\t\tif(abs(x) >= genType(1))\r\n\t\t\treturn 0;\r\n\t\treturn genType(0.5) * log((genType(1) + x) / (genType(1) - x));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(atanh)\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/detail/func_vector_relational.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_vector_relational.hpp\r\n/// @date 2008-08-03 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///\r\n/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>\r\n/// \r\n/// @defgroup core_func_vector_relational Vector Relational Functions\r\n/// @ingroup core\r\n/// \r\n/// Relational and equality operators (<, <=, >, >=, ==, !=) are defined to \r\n/// operate on scalars and produce scalar Boolean results. For vector results, \r\n/// use the following built-in functions. \r\n/// \r\n/// In all cases, the sizes of all the input and return vectors for any particular \r\n/// call must match.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_CORE_func_vector_relational\r\n#define GLM_CORE_func_vector_relational\r\n\r\n#include \"precision.hpp\"\r\n#include \"setup.hpp\"\r\n\r\n#if !((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER <= GLM_COMPILER_VC10)) // Workaround a Visual C++ bug\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup core_func_vector_relational\r\n\t/// @{\r\n\r\n\t/// Returns the component-wise comparison result of x < y.\r\n\t/// \r\n\t/// @tparam vecType Floating-point or integer vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThan.xml\">GLSL lessThan man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>\r\n\t// TODO: Mismatched \r\n\t//template <typename T, precision P, template <typename, precision> class vecType>\r\n\t//GLM_FUNC_DECL typename vecType<T, P>::bool_type lessThan(vecType<T, P> const & x, vecType<T, P> const & y);\r\n\r\n\t/// Returns the component-wise comparison of result x <= y.\r\n\t///\r\n\t/// @tparam vecType Floating-point or integer vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThanEqual.xml\">GLSL lessThanEqual man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL typename vecType<T, P>::bool_type lessThanEqual(vecType<T, P> const & x, vecType<T, P> const & y);\r\n\r\n\t/// Returns the component-wise comparison of result x > y.\r\n\t///\r\n\t/// @tparam vecType Floating-point or integer vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThan.xml\">GLSL greaterThan man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL typename vecType<T, P>::bool_type greaterThan(vecType<T, P> const & x, vecType<T, P> const & y);\r\n\r\n\t/// Returns the component-wise comparison of result x >= y.\r\n\t///\r\n\t/// @tparam vecType Floating-point or integer vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThanEqual.xml\">GLSL greaterThanEqual man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL typename vecType<T, P>::bool_type greaterThanEqual(vecType<T, P> const & x, vecType<T, P> const & y);\r\n\r\n\t/// Returns the component-wise comparison of result x == y.\r\n\t///\r\n\t/// @tparam vecType Floating-point, integer or boolean vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/equal.xml\">GLSL equal man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>\r\n\t//TODO: conflicts with definision\r\n\t//template <typename T, precision P, template <typename, precision> class vecType>\r\n\t//GLM_FUNC_DECL typename vecType<T, P>::bool_type equal(vecType<T, P> const & x, vecType<T, P> const & y);\r\n\r\n\t/// Returns the component-wise comparison of result x != y.\r\n\t/// \r\n\t/// @tparam vecType Floating-point, integer or boolean vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/notEqual.xml\">GLSL notEqual man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL typename vecType<T, P>::bool_type notEqual(vecType<T, P> const & x, vecType<T, P> const & y);\r\n\r\n\t/// Returns true if any component of x is true.\r\n\t///\r\n\t/// @tparam vecType Boolean vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/any.xml\">GLSL any man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>\r\n\ttemplate <precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL bool any(vecType<bool, P> const & v);\r\n\r\n\t/// Returns true if all components of x are true.\r\n\t///\r\n\t/// @tparam vecType Boolean vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/all.xml\">GLSL all man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>\r\n\ttemplate <precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL bool all(vecType<bool, P> const & v);\r\n\r\n\t/// Returns the component-wise logical complement of x.\r\n\t/// /!\\ Because of language incompatibilities between C++ and GLSL, GLM defines the function not but not_ instead.\r\n\t///\r\n\t/// @tparam vecType Boolean vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/not.xml\">GLSL not man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>\r\n\ttemplate <precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL vecType<bool, P> not_(vecType<bool, P> const & v);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#endif\r\n\r\n#include \"func_vector_relational.inl\"\r\n\r\n#endif//GLM_CORE_func_vector_relational\r\n"
  },
  {
    "path": "cpu/glm/detail/func_vector_relational.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_vector_relational.inl\r\n/// @date 2008-08-03 / 2011-09-09\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include <limits>\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER typename vecType<T, P>::bool_type lessThan\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,\r\n\t\t\t\"Invalid template instantiation of 'lessThan', GLM vector types required floating-point or integer value types vectors\");\r\n\t\tassert(x.length() == y.length());\r\n\r\n\t\ttypename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);\r\n\t\tfor(int i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] < y[i];\r\n\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER typename vecType<T, P>::bool_type lessThanEqual\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,\r\n\t\t\t\"Invalid template instantiation of 'lessThanEqual', GLM vector types required floating-point or integer value types vectors\");\r\n\t\tassert(x.length() == y.length());\r\n\r\n\t\ttypename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);\r\n\t\tfor(int i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] <= y[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER typename vecType<T, P>::bool_type greaterThan\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,\r\n\t\t\t\"Invalid template instantiation of 'greaterThan', GLM vector types required floating-point or integer value types vectors\");\r\n\t\tassert(x.length() == y.length());\r\n\r\n\t\ttypename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);\r\n\t\tfor(int i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] > y[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER typename vecType<T, P>::bool_type greaterThanEqual\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,\r\n\t\t\t\"Invalid template instantiation of 'greaterThanEqual', GLM vector types required floating-point or integer value types vectors\");\r\n\t\tassert(x.length() == y.length());\r\n\r\n\t\ttypename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);\r\n\t\tfor(int i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] >= y[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER typename vecType<T, P>::bool_type equal\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tassert(x.length() == y.length());\r\n\r\n\t\ttypename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);\r\n\t\tfor(int i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] == y[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER typename vecType<T, P>::bool_type notEqual\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tassert(x.length() == y.length());\r\n\r\n\t\ttypename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);\r\n\t\tfor(int i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] != y[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER bool any(vecType<bool, P> const & v)\r\n\t{\r\n\t\tbool Result = false;\r\n\t\tfor(int i = 0; i < v.length(); ++i)\r\n\t\t\tResult = Result || v[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER bool all(vecType<bool, P> const & v)\r\n\t{\r\n\t\tbool Result = true;\r\n\t\tfor(int i = 0; i < v.length(); ++i)\r\n\t\t\tResult = Result && v[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<bool, P> not_(vecType<bool, P> const & v)\r\n\t{\r\n\t\ttypename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);\r\n\t\tfor(int i = 0; i < v.length(); ++i)\r\n\t\t\tResult[i] = !v[i];\r\n\t\treturn Result;\r\n\t}\r\n}//namespace glm\r\n\r\n"
  },
  {
    "path": "cpu/glm/detail/glm.cpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/glm.cpp\r\n/// @date 2013-04-22 / 2013-04-22\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include <glm/glm.hpp>\r\n#include <glm/gtc/quaternion.hpp>\r\n#include <glm/gtx/dual_quaternion.hpp>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n// tvec1 type explicit instantiation\r\n/*\r\ntemplate struct tvec1<uint8, lowp>;\r\ntemplate struct tvec1<uint16, lowp>;\r\ntemplate struct tvec1<uint32, lowp>;\r\ntemplate struct tvec1<uint64, lowp>;\r\ntemplate struct tvec1<int8, lowp>;\r\ntemplate struct tvec1<int16, lowp>;\r\ntemplate struct tvec1<int32, lowp>;\r\ntemplate struct tvec1<int64, lowp>;\r\ntemplate struct tvec1<float16, lowp>;\r\ntemplate struct tvec1<float32, lowp>;\r\ntemplate struct tvec1<float64, lowp>;\r\n\r\ntemplate struct tvec1<uint8, mediump>;\r\ntemplate struct tvec1<uint16, mediump>;\r\ntemplate struct tvec1<uint32, mediump>;\r\ntemplate struct tvec1<uint64, mediump>;\r\ntemplate struct tvec1<int8, mediump>;\r\ntemplate struct tvec1<int16, mediump>;\r\ntemplate struct tvec1<int32, mediump>;\r\ntemplate struct tvec1<int64, mediump>;\r\ntemplate struct tvec1<float16, mediump>;\r\ntemplate struct tvec1<float32, mediump>;\r\ntemplate struct tvec1<float64, mediump>;\r\n\r\ntemplate struct tvec1<uint8, highp>;\r\ntemplate struct tvec1<uint16, highp>;\r\ntemplate struct tvec1<uint32, highp>;\r\ntemplate struct tvec1<uint64, highp>;\r\ntemplate struct tvec1<int8, highp>;\r\ntemplate struct tvec1<int16, highp>;\r\ntemplate struct tvec1<int32, highp>;\r\ntemplate struct tvec1<int64, highp>;\r\ntemplate struct tvec1<float16, highp>;\r\ntemplate struct tvec1<float32, highp>;\r\ntemplate struct tvec1<float64, highp>;\r\n*/\r\n// tvec2 type explicit instantiation\r\ntemplate struct tvec2<uint8, lowp>;\r\ntemplate struct tvec2<uint16, lowp>;\r\ntemplate struct tvec2<uint32, lowp>;\r\ntemplate struct tvec2<uint64, lowp>;\r\ntemplate struct tvec2<int8, lowp>;\r\ntemplate struct tvec2<int16, lowp>;\r\ntemplate struct tvec2<int32, lowp>;\r\ntemplate struct tvec2<int64, lowp>;\r\ntemplate struct tvec2<float32, lowp>;\r\ntemplate struct tvec2<float64, lowp>;\r\n\r\ntemplate struct tvec2<uint8, mediump>;\r\ntemplate struct tvec2<uint16, mediump>;\r\ntemplate struct tvec2<uint32, mediump>;\r\ntemplate struct tvec2<uint64, mediump>;\r\ntemplate struct tvec2<int8, mediump>;\r\ntemplate struct tvec2<int16, mediump>;\r\ntemplate struct tvec2<int32, mediump>;\r\ntemplate struct tvec2<int64, mediump>;\r\ntemplate struct tvec2<float32, mediump>;\r\ntemplate struct tvec2<float64, mediump>;\r\n\r\ntemplate struct tvec2<uint8, highp>;\r\ntemplate struct tvec2<uint16, highp>;\r\ntemplate struct tvec2<uint32, highp>;\r\ntemplate struct tvec2<uint64, highp>;\r\ntemplate struct tvec2<int8, highp>;\r\ntemplate struct tvec2<int16, highp>;\r\ntemplate struct tvec2<int32, highp>;\r\ntemplate struct tvec2<int64, highp>;\r\ntemplate struct tvec2<float32, highp>;\r\ntemplate struct tvec2<float64, highp>;\r\n\r\n// tvec3 type explicit instantiation\r\ntemplate struct tvec3<uint8, lowp>;\r\ntemplate struct tvec3<uint16, lowp>;\r\ntemplate struct tvec3<uint32, lowp>;\r\ntemplate struct tvec3<uint64, lowp>;\r\ntemplate struct tvec3<int8, lowp>;\r\ntemplate struct tvec3<int16, lowp>;\r\ntemplate struct tvec3<int32, lowp>;\r\ntemplate struct tvec3<int64, lowp>;\r\ntemplate struct tvec3<float32, lowp>;\r\ntemplate struct tvec3<float64, lowp>;\r\n\r\ntemplate struct tvec3<uint8, mediump>;\r\ntemplate struct tvec3<uint16, mediump>;\r\ntemplate struct tvec3<uint32, mediump>;\r\ntemplate struct tvec3<uint64, mediump>;\r\ntemplate struct tvec3<int8, mediump>;\r\ntemplate struct tvec3<int16, mediump>;\r\ntemplate struct tvec3<int32, mediump>;\r\ntemplate struct tvec3<int64, mediump>;\r\ntemplate struct tvec3<float32, mediump>;\r\ntemplate struct tvec3<float64, mediump>;\r\n\r\ntemplate struct tvec3<uint8, highp>;\r\ntemplate struct tvec3<uint16, highp>;\r\ntemplate struct tvec3<uint32, highp>;\r\ntemplate struct tvec3<uint64, highp>;\r\ntemplate struct tvec3<int8, highp>;\r\ntemplate struct tvec3<int16, highp>;\r\ntemplate struct tvec3<int32, highp>;\r\ntemplate struct tvec3<int64, highp>;\r\ntemplate struct tvec3<float32, highp>;\r\ntemplate struct tvec3<float64, highp>;\r\n\r\n// tvec4 type explicit instantiation\r\ntemplate struct tvec4<uint8, lowp>;\r\ntemplate struct tvec4<uint16, lowp>;\r\ntemplate struct tvec4<uint32, lowp>;\r\ntemplate struct tvec4<uint64, lowp>;\r\ntemplate struct tvec4<int8, lowp>;\r\ntemplate struct tvec4<int16, lowp>;\r\ntemplate struct tvec4<int32, lowp>;\r\ntemplate struct tvec4<int64, lowp>;\r\ntemplate struct tvec4<float32, lowp>;\r\ntemplate struct tvec4<float64, lowp>;\r\n\r\ntemplate struct tvec4<uint8, mediump>;\r\ntemplate struct tvec4<uint16, mediump>;\r\ntemplate struct tvec4<uint32, mediump>;\r\ntemplate struct tvec4<uint64, mediump>;\r\ntemplate struct tvec4<int8, mediump>;\r\ntemplate struct tvec4<int16, mediump>;\r\ntemplate struct tvec4<int32, mediump>;\r\ntemplate struct tvec4<int64, mediump>;\r\ntemplate struct tvec4<float32, mediump>;\r\ntemplate struct tvec4<float64, mediump>;\r\n\r\ntemplate struct tvec4<uint8, highp>;\r\ntemplate struct tvec4<uint16, highp>;\r\ntemplate struct tvec4<uint32, highp>;\r\ntemplate struct tvec4<uint64, highp>;\r\ntemplate struct tvec4<int8, highp>;\r\ntemplate struct tvec4<int16, highp>;\r\ntemplate struct tvec4<int32, highp>;\r\ntemplate struct tvec4<int64, highp>;\r\ntemplate struct tvec4<float32, highp>;\r\ntemplate struct tvec4<float64, highp>;\r\n\r\n// tmat2x2 type explicit instantiation\r\ntemplate struct tmat2x2<float32, lowp>;\r\ntemplate struct tmat2x2<float64, lowp>;\r\n\r\ntemplate struct tmat2x2<float32, mediump>;\r\ntemplate struct tmat2x2<float64, mediump>;\r\n\r\ntemplate struct tmat2x2<float32, highp>;\r\ntemplate struct tmat2x2<float64, highp>;\r\n\r\n// tmat2x3 type explicit instantiation\r\ntemplate struct tmat2x3<float32, lowp>;\r\ntemplate struct tmat2x3<float64, lowp>;\r\n\r\ntemplate struct tmat2x3<float32, mediump>;\r\ntemplate struct tmat2x3<float64, mediump>;\r\n\r\ntemplate struct tmat2x3<float32, highp>;\r\ntemplate struct tmat2x3<float64, highp>;\r\n\r\n// tmat2x4 type explicit instantiation\r\ntemplate struct tmat2x4<float32, lowp>;\r\ntemplate struct tmat2x4<float64, lowp>;\r\n\r\ntemplate struct tmat2x4<float32, mediump>;\r\ntemplate struct tmat2x4<float64, mediump>;\r\n\r\ntemplate struct tmat2x4<float32, highp>;\r\ntemplate struct tmat2x4<float64, highp>;\r\n\r\n// tmat3x2 type explicit instantiation\r\ntemplate struct tmat3x2<float32, lowp>;\r\ntemplate struct tmat3x2<float64, lowp>;\r\n\r\ntemplate struct tmat3x2<float32, mediump>;\r\ntemplate struct tmat3x2<float64, mediump>;\r\n\r\ntemplate struct tmat3x2<float32, highp>;\r\ntemplate struct tmat3x2<float64, highp>;\r\n\r\n// tmat3x3 type explicit instantiation\r\ntemplate struct tmat3x3<float32, lowp>;\r\ntemplate struct tmat3x3<float64, lowp>;\r\n\r\ntemplate struct tmat3x3<float32, mediump>;\r\ntemplate struct tmat3x3<float64, mediump>;\r\n\r\ntemplate struct tmat3x3<float32, highp>;\r\ntemplate struct tmat3x3<float64, highp>;\r\n\r\n// tmat3x4 type explicit instantiation\r\ntemplate struct tmat3x4<float32, lowp>;\r\ntemplate struct tmat3x4<float64, lowp>;\r\n\r\ntemplate struct tmat3x4<float32, mediump>;\r\ntemplate struct tmat3x4<float64, mediump>;\r\n\r\ntemplate struct tmat3x4<float32, highp>;\r\ntemplate struct tmat3x4<float64, highp>;\r\n\r\n// tmat4x2 type explicit instantiation\r\ntemplate struct tmat4x2<float32, lowp>;\r\ntemplate struct tmat4x2<float64, lowp>;\r\n\r\ntemplate struct tmat4x2<float32, mediump>;\r\ntemplate struct tmat4x2<float64, mediump>;\r\n\r\ntemplate struct tmat4x2<float32, highp>;\r\ntemplate struct tmat4x2<float64, highp>;\r\n\r\n// tmat4x3 type explicit instantiation\r\ntemplate struct tmat4x3<float32, lowp>;\r\ntemplate struct tmat4x3<float64, lowp>;\r\n\r\ntemplate struct tmat4x3<float32, mediump>;\r\ntemplate struct tmat4x3<float64, mediump>;\r\n\r\ntemplate struct tmat4x3<float32, highp>;\r\ntemplate struct tmat4x3<float64, highp>;\r\n\r\n// tmat4x4 type explicit instantiation\r\ntemplate struct tmat4x4<float32, lowp>;\r\ntemplate struct tmat4x4<float64, lowp>;\r\n\r\ntemplate struct tmat4x4<float32, mediump>;\r\ntemplate struct tmat4x4<float64, mediump>;\r\n\r\ntemplate struct tmat4x4<float32, highp>;\r\ntemplate struct tmat4x4<float64, highp>;\r\n\r\n// tquat type explicit instantiation\r\ntemplate struct tquat<float32, lowp>;\r\ntemplate struct tquat<float64, lowp>;\r\n\r\ntemplate struct tquat<float32, mediump>;\r\ntemplate struct tquat<float64, mediump>;\r\n\r\ntemplate struct tquat<float32, highp>;\r\ntemplate struct tquat<float64, highp>;\r\n\r\n//tdualquat type explicit instantiation\r\ntemplate struct tdualquat<float32, lowp>;\r\ntemplate struct tdualquat<float64, lowp>;\r\n\r\ntemplate struct tdualquat<float32, mediump>;\r\ntemplate struct tdualquat<float64, mediump>;\r\n\r\ntemplate struct tdualquat<float32, highp>;\r\ntemplate struct tdualquat<float64, highp>;\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n"
  },
  {
    "path": "cpu/glm/detail/hint.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/hint.hpp\r\n/// @date 2008-08-14 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type\r\n#define glm_core_type\r\n\r\nnamespace glm\r\n{\r\n\t// Use dont_care, nicest and fastest to optimize implementations.\r\n\tclass dont_care {};\r\n\tclass nicest {};\r\n\tclass fastest {};\r\n}//namespace glm\r\n\r\n#endif//glm_core_type\r\n"
  },
  {
    "path": "cpu/glm/detail/intrinsic_common.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_common.hpp\r\n/// @date 2009-05-11 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_detail_intrinsic_common\r\n#define glm_detail_intrinsic_common\r\n\r\n#include \"setup.hpp\"\r\n\r\n#if(!(GLM_ARCH & GLM_ARCH_SSE2))\r\n#\terror \"SSE2 instructions not supported or enabled\"\r\n#else\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\t__m128 sse_abs_ps(__m128 x);\r\n\r\n\t__m128 sse_sgn_ps(__m128 x);\r\n\r\n\t//floor\r\n\t__m128 sse_flr_ps(__m128 v);\r\n\r\n\t//trunc\r\n\t__m128 sse_trc_ps(__m128 v);\r\n\r\n\t//round\r\n\t__m128 sse_nd_ps(__m128 v);\r\n\r\n\t//roundEven\r\n\t__m128 sse_rde_ps(__m128 v);\r\n\r\n\t__m128 sse_rnd_ps(__m128 x);\r\n\r\n\t__m128 sse_ceil_ps(__m128 v);\r\n\r\n\t__m128 sse_frc_ps(__m128 x);\r\n\r\n\t__m128 sse_mod_ps(__m128 x, __m128 y);\r\n\r\n\t__m128 sse_modf_ps(__m128 x, __m128i & i);\r\n\r\n\t//GLM_FUNC_QUALIFIER __m128 sse_min_ps(__m128 x, __m128 y)\r\n\r\n\t//GLM_FUNC_QUALIFIER __m128 sse_max_ps(__m128 x, __m128 y)\r\n\r\n\t__m128 sse_clp_ps(__m128 v, __m128 minVal, __m128 maxVal);\r\n\r\n\t__m128 sse_mix_ps(__m128 v1, __m128 v2, __m128 a);\r\n\r\n\t__m128 sse_stp_ps(__m128 edge, __m128 x);\r\n\r\n\t__m128 sse_ssp_ps(__m128 edge0, __m128 edge1, __m128 x);\r\n\r\n\t__m128 sse_nan_ps(__m128 x);\r\n\r\n\t__m128 sse_inf_ps(__m128 x);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#include \"intrinsic_common.inl\"\r\n\r\n#endif//GLM_ARCH\r\n#endif//glm_detail_intrinsic_common\r\n"
  },
  {
    "path": "cpu/glm/detail/intrinsic_common.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_common.inl\r\n/// @date 2009-05-08 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail{\r\n\r\n#if(GLM_COMPILER & GLM_COMPILER_VC)\r\n#pragma warning(push)\r\n#pragma warning(disable : 4510 4512 4610)\r\n#endif\r\n\r\n\tunion ieee754_QNAN\r\n\t{\r\n\t\tconst float f;\r\n\t\tstruct i\r\n\t\t{\r\n\t\t\tconst unsigned int mantissa:23, exp:8, sign:1;\r\n\t\t};\r\n\r\n\t\tieee754_QNAN() : f(0.0)/*, mantissa(0x7FFFFF), exp(0xFF), sign(0x0)*/ {}\r\n\t};\r\n\r\n#if(GLM_COMPILER & GLM_COMPILER_VC)\r\n#pragma warning(pop)\r\n#endif\r\n\r\n\tstatic const __m128 GLM_VAR_USED zero = _mm_setzero_ps();\r\n\tstatic const __m128 GLM_VAR_USED one = _mm_set_ps1(1.0f);\r\n\tstatic const __m128 GLM_VAR_USED minus_one = _mm_set_ps1(-1.0f);\r\n\tstatic const __m128 GLM_VAR_USED two = _mm_set_ps1(2.0f);\r\n\tstatic const __m128 GLM_VAR_USED three = _mm_set_ps1(3.0f);\r\n\tstatic const __m128 GLM_VAR_USED pi = _mm_set_ps1(3.1415926535897932384626433832795f);\r\n\tstatic const __m128 GLM_VAR_USED hundred_eighty = _mm_set_ps1(180.f);\r\n\tstatic const __m128 GLM_VAR_USED pi_over_hundred_eighty = _mm_set_ps1(0.017453292519943295769236907684886f);\r\n\tstatic const __m128 GLM_VAR_USED hundred_eighty_over_pi = _mm_set_ps1(57.295779513082320876798154814105f);\r\n\r\n\tstatic const ieee754_QNAN absMask;\r\n\tstatic const __m128 GLM_VAR_USED abs4Mask = _mm_set_ps1(absMask.f);\r\n\r\n\tstatic const __m128 GLM_VAR_USED _epi32_sign_mask = _mm_castsi128_ps(_mm_set1_epi32(static_cast<int>(0x80000000)));\r\n\t//static const __m128 GLM_VAR_USED _epi32_inv_sign_mask = _mm_castsi128_ps(_mm_set1_epi32(0x7FFFFFFF));\r\n\t//static const __m128 GLM_VAR_USED _epi32_mant_mask = _mm_castsi128_ps(_mm_set1_epi32(0x7F800000));\r\n\t//static const __m128 GLM_VAR_USED _epi32_inv_mant_mask = _mm_castsi128_ps(_mm_set1_epi32(0x807FFFFF));\r\n\t//static const __m128 GLM_VAR_USED _epi32_min_norm_pos = _mm_castsi128_ps(_mm_set1_epi32(0x00800000));\r\n\tstatic const __m128 GLM_VAR_USED _epi32_0 = _mm_set_ps1(0);\r\n\tstatic const __m128 GLM_VAR_USED _epi32_1 = _mm_set_ps1(1);\r\n\tstatic const __m128 GLM_VAR_USED _epi32_2 = _mm_set_ps1(2);\r\n\tstatic const __m128 GLM_VAR_USED _epi32_3 = _mm_set_ps1(3);\r\n\tstatic const __m128 GLM_VAR_USED _epi32_4 = _mm_set_ps1(4);\r\n\tstatic const __m128 GLM_VAR_USED _epi32_5 = _mm_set_ps1(5);\r\n\tstatic const __m128 GLM_VAR_USED _epi32_6 = _mm_set_ps1(6);\r\n\tstatic const __m128 GLM_VAR_USED _epi32_7 = _mm_set_ps1(7);\r\n\tstatic const __m128 GLM_VAR_USED _epi32_8 = _mm_set_ps1(8);\r\n\tstatic const __m128 GLM_VAR_USED _epi32_9 = _mm_set_ps1(9);\r\n\tstatic const __m128 GLM_VAR_USED _epi32_127 = _mm_set_ps1(127);\r\n\t//static const __m128 GLM_VAR_USED _epi32_ninf = _mm_castsi128_ps(_mm_set1_epi32(0xFF800000));\r\n\t//static const __m128 GLM_VAR_USED _epi32_pinf = _mm_castsi128_ps(_mm_set1_epi32(0x7F800000));\r\n\r\n\tstatic const __m128 GLM_VAR_USED _ps_1_3 = _mm_set_ps1(0.33333333333333333333333333333333f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_0p5 = _mm_set_ps1(0.5f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_1 = _mm_set_ps1(1.0f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_m1 = _mm_set_ps1(-1.0f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_2 = _mm_set_ps1(2.0f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_3 = _mm_set_ps1(3.0f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_127 = _mm_set_ps1(127.0f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_255 = _mm_set_ps1(255.0f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_2pow23 = _mm_set_ps1(8388608.0f);\r\n\r\n\tstatic const __m128 GLM_VAR_USED _ps_1_0_0_0 = _mm_set_ps(1.0f, 0.0f, 0.0f, 0.0f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_0_1_0_0 = _mm_set_ps(0.0f, 1.0f, 0.0f, 0.0f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_0_0_1_0 = _mm_set_ps(0.0f, 0.0f, 1.0f, 0.0f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_0_0_0_1 = _mm_set_ps(0.0f, 0.0f, 0.0f, 1.0f);\r\n\r\n\tstatic const __m128 GLM_VAR_USED _ps_pi = _mm_set_ps1(3.1415926535897932384626433832795f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_pi2 = _mm_set_ps1(6.283185307179586476925286766560f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_2_pi = _mm_set_ps1(0.63661977236758134307553505349006f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_pi_2 = _mm_set_ps1(1.5707963267948966192313216916398f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_4_pi = _mm_set_ps1(1.2732395447351626861510701069801f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_pi_4 = _mm_set_ps1(0.78539816339744830961566084581988f);\r\n\r\n\tstatic const __m128 GLM_VAR_USED _ps_sincos_p0 = _mm_set_ps1(0.15707963267948963959e1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_sincos_p1 = _mm_set_ps1(-0.64596409750621907082e0f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_sincos_p2 = _mm_set_ps1(0.7969262624561800806e-1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_sincos_p3 = _mm_set_ps1(-0.468175413106023168e-2f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_tan_p0 = _mm_set_ps1(-1.79565251976484877988e7f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_tan_p1 = _mm_set_ps1(1.15351664838587416140e6f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_tan_p2 = _mm_set_ps1(-1.30936939181383777646e4f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_tan_q0 = _mm_set_ps1(-5.38695755929454629881e7f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_tan_q1 = _mm_set_ps1(2.50083801823357915839e7f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_tan_q2 = _mm_set_ps1(-1.32089234440210967447e6f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_tan_q3 = _mm_set_ps1(1.36812963470692954678e4f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_tan_poleval = _mm_set_ps1(3.68935e19f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_atan_t0 = _mm_set_ps1(-0.91646118527267623468e-1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_atan_t1 = _mm_set_ps1(-0.13956945682312098640e1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_atan_t2 = _mm_set_ps1(-0.94393926122725531747e2f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_atan_t3 = _mm_set_ps1(0.12888383034157279340e2f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_atan_s0 = _mm_set_ps1(0.12797564625607904396e1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_atan_s1 = _mm_set_ps1(0.21972168858277355914e1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_atan_s2 = _mm_set_ps1(0.68193064729268275701e1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_atan_s3 = _mm_set_ps1(0.28205206687035841409e2f);\r\n\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp_hi = _mm_set_ps1(88.3762626647949f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp_lo = _mm_set_ps1(-88.3762626647949f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp_rln2 = _mm_set_ps1(1.4426950408889634073599f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp_p0 = _mm_set_ps1(1.26177193074810590878e-4f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp_p1 = _mm_set_ps1(3.02994407707441961300e-2f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp_q0 = _mm_set_ps1(3.00198505138664455042e-6f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp_q1 = _mm_set_ps1(2.52448340349684104192e-3f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp_q2 = _mm_set_ps1(2.27265548208155028766e-1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp_q3 = _mm_set_ps1(2.00000000000000000009e0f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp_c1 = _mm_set_ps1(6.93145751953125e-1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp_c2 = _mm_set_ps1(1.42860682030941723212e-6f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp2_hi = _mm_set_ps1(127.4999961853f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp2_lo = _mm_set_ps1(-127.4999961853f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp2_p0 = _mm_set_ps1(2.30933477057345225087e-2f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp2_p1 = _mm_set_ps1(2.02020656693165307700e1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp2_p2 = _mm_set_ps1(1.51390680115615096133e3f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp2_q0 = _mm_set_ps1(2.33184211722314911771e2f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp2_q1 = _mm_set_ps1(4.36821166879210612817e3f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_log_p0 = _mm_set_ps1(-7.89580278884799154124e-1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_log_p1 = _mm_set_ps1(1.63866645699558079767e1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_log_p2 = _mm_set_ps1(-6.41409952958715622951e1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_log_q0 = _mm_set_ps1(-3.56722798256324312549e1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_log_q1 = _mm_set_ps1(3.12093766372244180303e2f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_log_q2 = _mm_set_ps1(-7.69691943550460008604e2f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_log_c0 = _mm_set_ps1(0.693147180559945f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_log2_c0 = _mm_set_ps1(1.44269504088896340735992f);\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_abs_ps(__m128 x)\r\n{\r\n\treturn _mm_and_ps(glm::detail::abs4Mask, x);\r\n} \r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_sgn_ps(__m128 x)\r\n{\r\n\t__m128 Neg = _mm_set1_ps(-1.0f);\r\n\t__m128 Pos = _mm_set1_ps(1.0f);\r\n\r\n\t__m128 Cmp0 = _mm_cmplt_ps(x, zero);\r\n\t__m128 Cmp1 = _mm_cmpgt_ps(x, zero);\r\n\r\n\t__m128 And0 = _mm_and_ps(Cmp0, Neg);\r\n\t__m128 And1 = _mm_and_ps(Cmp1, Pos);\r\n\r\n\treturn _mm_or_ps(And0, And1);\r\n}\r\n\r\n//floor\r\nGLM_FUNC_QUALIFIER __m128 sse_flr_ps(__m128 x)\r\n{\r\n\t__m128 rnd0 = sse_rnd_ps(x);\r\n\t__m128 cmp0 = _mm_cmplt_ps(x, rnd0);\r\n\t__m128 and0 = _mm_and_ps(cmp0, glm::detail::_ps_1);\r\n\t__m128 sub0 = _mm_sub_ps(rnd0, and0);\r\n\treturn sub0;\r\n}\r\n\r\n//trunc\r\n/*\r\nGLM_FUNC_QUALIFIER __m128 _mm_trc_ps(__m128 v)\r\n{\r\n\treturn __m128();\r\n}\r\n*/\r\n//round\r\nGLM_FUNC_QUALIFIER __m128 sse_rnd_ps(__m128 x)\r\n{\r\n\t__m128 and0 = _mm_and_ps(glm::detail::_epi32_sign_mask, x);\r\n\t__m128 or0 = _mm_or_ps(and0, glm::detail::_ps_2pow23);\r\n\t__m128 add0 = _mm_add_ps(x, or0);\r\n\t__m128 sub0 = _mm_sub_ps(add0, or0);\r\n\treturn sub0;\r\n}\r\n\r\n//roundEven\r\nGLM_FUNC_QUALIFIER __m128 sse_rde_ps(__m128 x)\r\n{\r\n\t__m128 and0 = _mm_and_ps(glm::detail::_epi32_sign_mask, x);\r\n\t__m128 or0 = _mm_or_ps(and0, glm::detail::_ps_2pow23);\r\n\t__m128 add0 = _mm_add_ps(x, or0);\r\n\t__m128 sub0 = _mm_sub_ps(add0, or0);\r\n\treturn sub0;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_ceil_ps(__m128 x)\r\n{\r\n\t__m128 rnd0 = sse_rnd_ps(x);\r\n\t__m128 cmp0 = _mm_cmpgt_ps(x, rnd0);\r\n\t__m128 and0 = _mm_and_ps(cmp0, glm::detail::_ps_1);\r\n\t__m128 add0 = _mm_add_ps(rnd0, and0);\r\n\treturn add0;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_frc_ps(__m128 x)\r\n{\r\n\t__m128 flr0 = sse_flr_ps(x);\r\n\t__m128 sub0 = _mm_sub_ps(x, flr0);\r\n\treturn sub0;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_mod_ps(__m128 x, __m128 y)\r\n{\r\n\t__m128 div0 = _mm_div_ps(x, y);\r\n\t__m128 flr0 = sse_flr_ps(div0);\r\n\t__m128 mul0 = _mm_mul_ps(y, flr0);\r\n\t__m128 sub0 = _mm_sub_ps(x, mul0);\r\n\treturn sub0;\r\n}\r\n\r\n/// TODO\r\n/*\r\nGLM_FUNC_QUALIFIER __m128 sse_modf_ps(__m128 x, __m128i & i)\r\n{\r\n\t__m128 empty;\r\n\treturn empty;\r\n}\r\n*/\r\n\r\n//GLM_FUNC_QUALIFIER __m128 _mm_min_ps(__m128 x, __m128 y)\r\n\r\n//GLM_FUNC_QUALIFIER __m128 _mm_max_ps(__m128 x, __m128 y)\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_clp_ps(__m128 v, __m128 minVal, __m128 maxVal)\r\n{\r\n\t__m128 min0 = _mm_min_ps(v, maxVal);\r\n\t__m128 max0 = _mm_max_ps(min0, minVal);\r\n\treturn max0;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_mix_ps(__m128 v1, __m128 v2, __m128 a)\r\n{\r\n\t__m128 sub0 = _mm_sub_ps(glm::detail::one, a);\r\n\t__m128 mul0 = _mm_mul_ps(v1, sub0);\r\n\t__m128 mul1 = _mm_mul_ps(v2, a);\r\n\t__m128 add0 = _mm_add_ps(mul0, mul1);\r\n\treturn add0;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_stp_ps(__m128 edge, __m128 x)\r\n{\r\n\t__m128 cmp = _mm_cmple_ps(x, edge);\r\n\tif(_mm_movemask_ps(cmp) == 0)\r\n\t\treturn glm::detail::one;\r\n\telse\r\n\t\treturn glm::detail::zero;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_ssp_ps(__m128 edge0, __m128 edge1, __m128 x)\r\n{\r\n\t__m128 sub0 = _mm_sub_ps(x, edge0);\r\n\t__m128 sub1 = _mm_sub_ps(edge1, edge0);\r\n\t__m128 div0 = _mm_sub_ps(sub0, sub1);\r\n\t__m128 clp0 = sse_clp_ps(div0, glm::detail::zero, glm::detail::one);\r\n\t__m128 mul0 = _mm_mul_ps(glm::detail::two, clp0);\r\n\t__m128 sub2 = _mm_sub_ps(glm::detail::three, mul0);\r\n\t__m128 mul1 = _mm_mul_ps(clp0, clp0);\r\n\t__m128 mul2 = _mm_mul_ps(mul1, sub2);\r\n\treturn mul2;\r\n}\r\n\r\n/// \\todo\r\n//GLM_FUNC_QUALIFIER __m128 sse_nan_ps(__m128 x)\r\n//{\r\n//\t__m128 empty;\r\n//\treturn empty;\r\n//}\r\n\r\n/// \\todo\r\n//GLM_FUNC_QUALIFIER __m128 sse_inf_ps(__m128 x)\r\n//{\r\n//\t__m128 empty;\r\n//\treturn empty;\r\n//}\r\n\r\n// SSE scalar reciprocal sqrt using rsqrt op, plus one Newton-Rhaphson iteration\r\n// By Elan Ruskin, http://assemblyrequired.crashworks.org/\r\nGLM_FUNC_QUALIFIER __m128 sse_sqrt_wip_ss(__m128 const & x)\r\n{\r\n\t__m128 recip = _mm_rsqrt_ss(x);  // \"estimate\" opcode\r\n\tconst static __m128 three = {3, 3, 3, 3}; // aligned consts for fast load\r\n\tconst static __m128 half = {0.5,0.5,0.5,0.5};\r\n\t__m128 halfrecip = _mm_mul_ss(half, recip);\r\n\t__m128 threeminus_xrr = _mm_sub_ss(three, _mm_mul_ss(x, _mm_mul_ss (recip, recip)));\r\n\treturn _mm_mul_ss( halfrecip, threeminus_xrr);\r\n}\r\n\r\n}//namespace detail\r\n}//namespace glms\r\n"
  },
  {
    "path": "cpu/glm/detail/intrinsic_exponential.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_exponential.hpp\r\n/// @date 2009-05-11 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_detail_intrinsic_exponential\r\n#define glm_detail_intrinsic_exponential\r\n\r\n#include \"setup.hpp\"\r\n\r\n#if(!(GLM_ARCH & GLM_ARCH_SSE2))\r\n#\terror \"SSE2 instructions not supported or enabled\"\r\n#else\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n/*\r\nGLM_FUNC_QUALIFIER __m128 sse_rsqrt_nr_ss(__m128 const x)\r\n{\r\n\t__m128 recip = _mm_rsqrt_ss( x );  // \"estimate\" opcode\r\n\tconst static __m128 three = { 3, 3, 3, 3 }; // aligned consts for fast load\r\n\tconst static __m128 half = { 0.5,0.5,0.5,0.5 };\r\n\t__m128 halfrecip = _mm_mul_ss( half, recip );\r\n\t__m128 threeminus_xrr = _mm_sub_ss( three, _mm_mul_ss( x, _mm_mul_ss ( recip, recip ) ) );\r\n\treturn _mm_mul_ss( halfrecip, threeminus_xrr );\r\n}\r\n \r\nGLM_FUNC_QUALIFIER __m128 sse_normalize_fast_ps(  float * RESTRICT vOut, float * RESTRICT vIn )\r\n{\r\n        __m128 x = _mm_load_ss(&vIn[0]);\r\n        __m128 y = _mm_load_ss(&vIn[1]);\r\n        __m128 z = _mm_load_ss(&vIn[2]);\r\n \r\n        const __m128 l =  // compute x*x + y*y + z*z\r\n                _mm_add_ss(\r\n                 _mm_add_ss( _mm_mul_ss(x,x),\r\n                             _mm_mul_ss(y,y)\r\n                            ),\r\n                 _mm_mul_ss( z, z )\r\n                );\r\n \r\n \r\n        const __m128 rsqt = _mm_rsqrt_nr_ss( l );\r\n        _mm_store_ss( &vOut[0] , _mm_mul_ss( rsqt, x ) );\r\n        _mm_store_ss( &vOut[1] , _mm_mul_ss( rsqt, y ) );\r\n        _mm_store_ss( &vOut[2] , _mm_mul_ss( rsqt, z ) );\r\n \r\n        return _mm_mul_ss( l , rsqt );\r\n}\r\n*/\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#endif//GLM_ARCH\r\n#endif//glm_detail_intrinsic_exponential\r\n"
  },
  {
    "path": "cpu/glm/detail/intrinsic_exponential.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_exponential.inl\r\n/// @date 2011-06-15 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n"
  },
  {
    "path": "cpu/glm/detail/intrinsic_geometric.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_geometric.hpp\r\n/// @date 2009-05-08 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_intrinsic_geometric\r\n#define glm_core_intrinsic_geometric\r\n\r\n#include \"setup.hpp\"\r\n\r\n#if(!(GLM_ARCH & GLM_ARCH_SSE2))\r\n#\terror \"SSE2 instructions not supported or enabled\"\r\n#else\r\n\r\n#include \"intrinsic_common.hpp\"\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\t//length\r\n\t__m128 sse_len_ps(__m128 x);\r\n\r\n\t//distance\r\n\t__m128 sse_dst_ps(__m128 p0, __m128 p1);\r\n\r\n\t//dot\r\n\t__m128 sse_dot_ps(__m128 v1, __m128 v2);\r\n\r\n\t// SSE1\r\n\t__m128 sse_dot_ss(__m128 v1, __m128 v2);\r\n\r\n\t//cross\r\n\t__m128 sse_xpd_ps(__m128 v1, __m128 v2);\r\n\r\n\t//normalize\r\n\t__m128 sse_nrm_ps(__m128 v);\r\n\r\n\t//faceforward\r\n\t__m128 sse_ffd_ps(__m128 N, __m128 I, __m128 Nref);\r\n\r\n\t//reflect\r\n\t__m128 sse_rfe_ps(__m128 I, __m128 N);\r\n\r\n\t//refract\r\n\t__m128 sse_rfa_ps(__m128 I, __m128 N, __m128 eta);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#include \"intrinsic_geometric.inl\"\r\n\r\n#endif//GLM_ARCH\r\n#endif//glm_core_intrinsic_geometric\r\n"
  },
  {
    "path": "cpu/glm/detail/intrinsic_geometric.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_geometric.inl\r\n/// @date 2009-05-08 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail{\r\n\r\n//length\r\nGLM_FUNC_QUALIFIER __m128 sse_len_ps(__m128 x)\r\n{\r\n    __m128 dot0 = sse_dot_ps(x, x);\r\n\t__m128 sqt0 = _mm_sqrt_ps(dot0);\r\n    return sqt0;\r\n}\r\n\r\n//distance\r\nGLM_FUNC_QUALIFIER __m128 sse_dst_ps(__m128 p0, __m128 p1)\r\n{\r\n\t__m128 sub0 = _mm_sub_ps(p0, p1);\r\n    __m128 len0 = sse_len_ps(sub0);\r\n    return len0;\r\n}\r\n\r\n//dot\r\nGLM_FUNC_QUALIFIER __m128 sse_dot_ps(__m128 v1, __m128 v2)\r\n{\r\n#   if((GLM_ARCH & GLM_ARCH_SSE4) == GLM_ARCH_SSE4)\r\n        return _mm_dp_ps(v1, v2, 0xff);\r\n#   else\r\n        __m128 mul0 = _mm_mul_ps(v1, v2);\r\n        __m128 swp0 = _mm_shuffle_ps(mul0, mul0, _MM_SHUFFLE(2, 3, 0, 1));\r\n        __m128 add0 = _mm_add_ps(mul0, swp0);\r\n        __m128 swp1 = _mm_shuffle_ps(add0, add0, _MM_SHUFFLE(0, 1, 2, 3));\r\n        __m128 add1 = _mm_add_ps(add0, swp1);\r\n        return add1;\r\n#   endif\r\n}\r\n\r\n// SSE1\r\nGLM_FUNC_QUALIFIER __m128 sse_dot_ss(__m128 v1, __m128 v2)\r\n{\r\n\t__m128 mul0 = _mm_mul_ps(v1, v2);\r\n\t__m128 mov0 = _mm_movehl_ps(mul0, mul0);\r\n\t__m128 add0 = _mm_add_ps(mov0, mul0);\r\n\t__m128 swp1 = _mm_shuffle_ps(add0, add0, 1);\r\n\t__m128 add1 = _mm_add_ss(add0, swp1);\r\n\treturn add1;\r\n}\r\n\r\n//cross\r\nGLM_FUNC_QUALIFIER __m128 sse_xpd_ps(__m128 v1, __m128 v2)\r\n{\r\n\t__m128 swp0 = _mm_shuffle_ps(v1, v1, _MM_SHUFFLE(3, 0, 2, 1));\r\n\t__m128 swp1 = _mm_shuffle_ps(v1, v1, _MM_SHUFFLE(3, 1, 0, 2));\r\n\t__m128 swp2 = _mm_shuffle_ps(v2, v2, _MM_SHUFFLE(3, 0, 2, 1));\r\n\t__m128 swp3 = _mm_shuffle_ps(v2, v2, _MM_SHUFFLE(3, 1, 0, 2));\r\n\t__m128 mul0 = _mm_mul_ps(swp0, swp3);\r\n\t__m128 mul1 = _mm_mul_ps(swp1, swp2);\r\n\t__m128 sub0 = _mm_sub_ps(mul0, mul1);\r\n\treturn sub0;\r\n}\r\n\r\n//normalize\r\nGLM_FUNC_QUALIFIER __m128 sse_nrm_ps(__m128 v)\r\n{\r\n\t__m128 dot0 = sse_dot_ps(v, v);\r\n\t__m128 isr0 = _mm_rsqrt_ps(dot0);\r\n\t__m128 mul0 = _mm_mul_ps(v, isr0);\r\n\treturn mul0;\r\n}\r\n\r\n//faceforward\r\nGLM_FUNC_QUALIFIER __m128 sse_ffd_ps(__m128 N, __m128 I, __m128 Nref)\r\n{\r\n\t//__m128 dot0 = _mm_dot_ps(v, v);\r\n\t//__m128 neg0 = _mm_neg_ps(N);\r\n\t//__m128 sgn0 = _mm_sgn_ps(dot0);\r\n\t//__m128 mix0 = _mm_mix_ps(N, neg0, sgn0);\r\n\t//return mix0;\r\n\r\n\t__m128 dot0 = sse_dot_ps(Nref, I);\r\n\t__m128 sgn0 = sse_sgn_ps(dot0);\r\n\t__m128 mul0 = _mm_mul_ps(sgn0, glm::detail::minus_one);\r\n\t__m128 mul1 = _mm_mul_ps(N, mul0);\r\n\treturn mul1;\r\n}\r\n\r\n//reflect\r\nGLM_FUNC_QUALIFIER __m128 sse_rfe_ps(__m128 I, __m128 N)\r\n{\r\n\t__m128 dot0 = sse_dot_ps(N, I);\r\n\t__m128 mul0 = _mm_mul_ps(N, dot0);\r\n\t__m128 mul1 = _mm_mul_ps(mul0, glm::detail::two);\r\n\t__m128 sub0 = _mm_sub_ps(I, mul1);\r\n\treturn sub0;\r\n}\r\n\r\n//refract\r\nGLM_FUNC_QUALIFIER __m128 sse_rfa_ps(__m128 I, __m128 N, __m128 eta)\r\n{\r\n\t__m128 dot0 = sse_dot_ps(N, I);\r\n\t__m128 mul0 = _mm_mul_ps(eta, eta);\r\n\t__m128 mul1 = _mm_mul_ps(dot0, dot0);\r\n\t__m128 sub0 = _mm_sub_ps(glm::detail::one, mul0);\r\n\t__m128 sub1 = _mm_sub_ps(glm::detail::one, mul1);\r\n\t__m128 mul2 = _mm_mul_ps(sub0, sub1);\r\n\t\r\n\tif(_mm_movemask_ps(_mm_cmplt_ss(mul2, glm::detail::zero)) == 0)\r\n\t\treturn glm::detail::zero;\r\n\r\n\t__m128 sqt0 = _mm_sqrt_ps(mul2);\r\n\t__m128 mul3 = _mm_mul_ps(eta, dot0);\r\n\t__m128 add0 = _mm_add_ps(mul3, sqt0);\r\n\t__m128 mul4 = _mm_mul_ps(add0, N);\r\n\t__m128 mul5 = _mm_mul_ps(eta, I);\r\n\t__m128 sub2 = _mm_sub_ps(mul5, mul4);\r\n\r\n\treturn sub2;\r\n}\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/detail/intrinsic_integer.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_integer.hpp\r\n/// @date 2009-05-11 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_detail_intrinsic_integer\r\n#define glm_detail_intrinsic_integer\r\n\r\n#include \"glm/glm.hpp\"\r\n\r\n#if(!(GLM_ARCH & GLM_ARCH_SSE2))\r\n#\terror \"SSE2 instructions not supported or enabled\"\r\n#else\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\t__m128i _mm_bit_interleave_si128(__m128i x);\r\n\t__m128i _mm_bit_interleave_si128(__m128i x, __m128i y);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#include \"intrinsic_integer.inl\"\r\n\r\n#endif//GLM_ARCH\r\n#endif//glm_detail_intrinsic_integer\r\n"
  },
  {
    "path": "cpu/glm/detail/intrinsic_integer.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_integer.inl\r\n/// @date 2009-05-08 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\tinline __m128i _mm_bit_interleave_si128(__m128i x)\r\n\t{\r\n\t\t__m128i const Mask4 = _mm_set1_epi32(0x0000FFFF);\r\n\t\t__m128i const Mask3 = _mm_set1_epi32(0x00FF00FF);\r\n\t\t__m128i const Mask2 = _mm_set1_epi32(0x0F0F0F0F);\r\n\t\t__m128i const Mask1 = _mm_set1_epi32(0x33333333);\r\n\t\t__m128i const Mask0 = _mm_set1_epi32(0x55555555);\r\n\r\n\t\t__m128i Reg1;\r\n\t\t__m128i Reg2;\r\n\r\n\t\t// REG1 = x;\r\n\t\t// REG2 = y;\r\n\t\t//Reg1 = _mm_unpacklo_epi64(x, y);\r\n\t\tReg1 = x;\r\n\r\n\t\t//REG1 = ((REG1 << 16) | REG1) & glm::uint64(0x0000FFFF0000FFFF);\r\n\t\t//REG2 = ((REG2 << 16) | REG2) & glm::uint64(0x0000FFFF0000FFFF);\r\n\t\tReg2 = _mm_slli_si128(Reg1, 2);\r\n\t\tReg1 = _mm_or_si128(Reg2, Reg1);\r\n\t\tReg1 = _mm_and_si128(Reg1, Mask4);\r\n\r\n\t\t//REG1 = ((REG1 <<  8) | REG1) & glm::uint64(0x00FF00FF00FF00FF);\r\n\t\t//REG2 = ((REG2 <<  8) | REG2) & glm::uint64(0x00FF00FF00FF00FF);\r\n\t\tReg2 = _mm_slli_si128(Reg1, 1);\r\n\t\tReg1 = _mm_or_si128(Reg2, Reg1);\r\n\t\tReg1 = _mm_and_si128(Reg1, Mask3);\r\n\r\n\t\t//REG1 = ((REG1 <<  4) | REG1) & glm::uint64(0x0F0F0F0F0F0F0F0F);\r\n\t\t//REG2 = ((REG2 <<  4) | REG2) & glm::uint64(0x0F0F0F0F0F0F0F0F);\r\n\t\tReg2 = _mm_slli_epi32(Reg1, 4);\r\n\t\tReg1 = _mm_or_si128(Reg2, Reg1);\r\n\t\tReg1 = _mm_and_si128(Reg1, Mask2);\r\n\r\n\t\t//REG1 = ((REG1 <<  2) | REG1) & glm::uint64(0x3333333333333333);\r\n\t\t//REG2 = ((REG2 <<  2) | REG2) & glm::uint64(0x3333333333333333);\r\n\t\tReg2 = _mm_slli_epi32(Reg1, 2);\r\n\t\tReg1 = _mm_or_si128(Reg2, Reg1);\r\n\t\tReg1 = _mm_and_si128(Reg1, Mask1);\r\n\r\n\t\t//REG1 = ((REG1 <<  1) | REG1) & glm::uint64(0x5555555555555555);\r\n\t\t//REG2 = ((REG2 <<  1) | REG2) & glm::uint64(0x5555555555555555);\r\n\t\tReg2 = _mm_slli_epi32(Reg1, 1);\r\n\t\tReg1 = _mm_or_si128(Reg2, Reg1);\r\n\t\tReg1 = _mm_and_si128(Reg1, Mask0);\r\n\r\n\t\t//return REG1 | (REG2 << 1);\r\n\t\tReg2 = _mm_slli_epi32(Reg1, 1);\r\n\t\tReg2 = _mm_srli_si128(Reg2, 8);\r\n\t\tReg1 = _mm_or_si128(Reg1, Reg2);\r\n\t\r\n\t\treturn Reg1;\r\n\t}\r\n\r\n\tinline __m128i _mm_bit_interleave_si128(__m128i x, __m128i y)\r\n\t{\r\n\t\t__m128i const Mask4 = _mm_set1_epi32(0x0000FFFF);\r\n\t\t__m128i const Mask3 = _mm_set1_epi32(0x00FF00FF);\r\n\t\t__m128i const Mask2 = _mm_set1_epi32(0x0F0F0F0F);\r\n\t\t__m128i const Mask1 = _mm_set1_epi32(0x33333333);\r\n\t\t__m128i const Mask0 = _mm_set1_epi32(0x55555555);\r\n\r\n\t\t__m128i Reg1;\r\n\t\t__m128i Reg2;\r\n\r\n\t\t// REG1 = x;\r\n\t\t// REG2 = y;\r\n\t\tReg1 = _mm_unpacklo_epi64(x, y);\r\n\r\n\t\t//REG1 = ((REG1 << 16) | REG1) & glm::uint64(0x0000FFFF0000FFFF);\r\n\t\t//REG2 = ((REG2 << 16) | REG2) & glm::uint64(0x0000FFFF0000FFFF);\r\n\t\tReg2 = _mm_slli_si128(Reg1, 2);\r\n\t\tReg1 = _mm_or_si128(Reg2, Reg1);\r\n\t\tReg1 = _mm_and_si128(Reg1, Mask4);\r\n\r\n\t\t//REG1 = ((REG1 <<  8) | REG1) & glm::uint64(0x00FF00FF00FF00FF);\r\n\t\t//REG2 = ((REG2 <<  8) | REG2) & glm::uint64(0x00FF00FF00FF00FF);\r\n\t\tReg2 = _mm_slli_si128(Reg1, 1);\r\n\t\tReg1 = _mm_or_si128(Reg2, Reg1);\r\n\t\tReg1 = _mm_and_si128(Reg1, Mask3);\r\n\r\n\t\t//REG1 = ((REG1 <<  4) | REG1) & glm::uint64(0x0F0F0F0F0F0F0F0F);\r\n\t\t//REG2 = ((REG2 <<  4) | REG2) & glm::uint64(0x0F0F0F0F0F0F0F0F);\r\n\t\tReg2 = _mm_slli_epi32(Reg1, 4);\r\n\t\tReg1 = _mm_or_si128(Reg2, Reg1);\r\n\t\tReg1 = _mm_and_si128(Reg1, Mask2);\r\n\r\n\t\t//REG1 = ((REG1 <<  2) | REG1) & glm::uint64(0x3333333333333333);\r\n\t\t//REG2 = ((REG2 <<  2) | REG2) & glm::uint64(0x3333333333333333);\r\n\t\tReg2 = _mm_slli_epi32(Reg1, 2);\r\n\t\tReg1 = _mm_or_si128(Reg2, Reg1);\r\n\t\tReg1 = _mm_and_si128(Reg1, Mask1);\r\n\r\n\t\t//REG1 = ((REG1 <<  1) | REG1) & glm::uint64(0x5555555555555555);\r\n\t\t//REG2 = ((REG2 <<  1) | REG2) & glm::uint64(0x5555555555555555);\r\n\t\tReg2 = _mm_slli_epi32(Reg1, 1);\r\n\t\tReg1 = _mm_or_si128(Reg2, Reg1);\r\n\t\tReg1 = _mm_and_si128(Reg1, Mask0);\r\n\r\n\t\t//return REG1 | (REG2 << 1);\r\n\t\tReg2 = _mm_slli_epi32(Reg1, 1);\r\n\t\tReg2 = _mm_srli_si128(Reg2, 8);\r\n\t\tReg1 = _mm_or_si128(Reg1, Reg2);\r\n\t\r\n\t\treturn Reg1;\r\n\t}\r\n}//namespace detail\r\n}//namespace glms\r\n"
  },
  {
    "path": "cpu/glm/detail/intrinsic_matrix.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_common.hpp\r\n/// @date 2009-06-05 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_detail_intrinsic_matrix\r\n#define glm_detail_intrinsic_matrix\r\n\r\n#include \"setup.hpp\"\r\n\r\n#if(!(GLM_ARCH & GLM_ARCH_SSE2))\r\n#\terror \"SSE2 instructions not supported or enabled\"\r\n#else\r\n\r\n#include \"intrinsic_geometric.hpp\"\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\tvoid sse_add_ps(__m128 in1[4], __m128 in2[4], __m128 out[4]);\r\n\r\n\tvoid sse_sub_ps(__m128 in1[4], __m128 in2[4], __m128 out[4]);\r\n\r\n\t__m128 sse_mul_ps(__m128 m[4], __m128 v);\r\n\r\n\t__m128 sse_mul_ps(__m128 v, __m128 m[4]);\r\n\r\n\tvoid sse_mul_ps(__m128 const in1[4], __m128 const in2[4], __m128 out[4]);\r\n\r\n\tvoid sse_transpose_ps(__m128 const in[4], __m128 out[4]);\r\n\r\n\tvoid sse_inverse_ps(__m128 const in[4], __m128 out[4]);\r\n\r\n\tvoid sse_rotate_ps(__m128 const in[4], float Angle, float const v[3], __m128 out[4]);\r\n\r\n\t__m128 sse_det_ps(__m128 const m[4]);\r\n\r\n\t__m128 sse_slow_det_ps(__m128 const m[4]);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#include \"intrinsic_matrix.inl\"\r\n\r\n#endif//GLM_ARCH\r\n#endif//glm_detail_intrinsic_matrix\r\n"
  },
  {
    "path": "cpu/glm/detail/intrinsic_matrix.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_common.inl\r\n/// @date 2009-06-05 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail{\r\n\r\nstatic const __m128 GLM_VAR_USED _m128_rad_ps = _mm_set_ps1(3.141592653589793238462643383279f / 180.f);\r\nstatic const __m128 GLM_VAR_USED _m128_deg_ps = _mm_set_ps1(180.f / 3.141592653589793238462643383279f);\r\n\r\ntemplate <typename matType>\r\nGLM_FUNC_QUALIFIER matType sse_comp_mul_ps\r\n(\r\n\t__m128 const in1[4],\r\n\t__m128 const in2[4],\r\n\t__m128 out[4]\r\n)\r\n{\r\n\tout[0] = _mm_mul_ps(in1[0], in2[0]);\r\n\tout[1] = _mm_mul_ps(in1[1], in2[1]);\r\n\tout[2] = _mm_mul_ps(in1[2], in2[2]);\r\n\tout[3] = _mm_mul_ps(in1[3], in2[3]);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER void sse_add_ps(__m128 const in1[4], __m128 const in2[4], __m128 out[4])\r\n{\r\n\t{\r\n\t\tout[0] = _mm_add_ps(in1[0], in2[0]);\r\n\t\tout[1] = _mm_add_ps(in1[1], in2[1]);\r\n\t\tout[2] = _mm_add_ps(in1[2], in2[2]);\r\n\t\tout[3] = _mm_add_ps(in1[3], in2[3]);\r\n\t}\r\n}\r\n\r\nGLM_FUNC_QUALIFIER void sse_sub_ps(__m128 const in1[4], __m128 const in2[4], __m128 out[4])\r\n{\r\n\t{\r\n\t\tout[0] = _mm_sub_ps(in1[0], in2[0]);\r\n\t\tout[1] = _mm_sub_ps(in1[1], in2[1]);\r\n\t\tout[2] = _mm_sub_ps(in1[2], in2[2]);\r\n\t\tout[3] = _mm_sub_ps(in1[3], in2[3]);\r\n\t}\r\n}\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_mul_ps(__m128 const m[4], __m128 v)\r\n{\r\n\t__m128 v0 = _mm_shuffle_ps(v, v, _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 v1 = _mm_shuffle_ps(v, v, _MM_SHUFFLE(1, 1, 1, 1));\r\n\t__m128 v2 = _mm_shuffle_ps(v, v, _MM_SHUFFLE(2, 2, 2, 2));\r\n\t__m128 v3 = _mm_shuffle_ps(v, v, _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t__m128 m0 = _mm_mul_ps(m[0], v0);\r\n\t__m128 m1 = _mm_mul_ps(m[1], v1);\r\n\t__m128 m2 = _mm_mul_ps(m[2], v2);\r\n\t__m128 m3 = _mm_mul_ps(m[3], v3);\r\n\r\n\t__m128 a0 = _mm_add_ps(m0, m1);\r\n\t__m128 a1 = _mm_add_ps(m2, m3);\r\n\t__m128 a2 = _mm_add_ps(a0, a1);\r\n\r\n\treturn a2;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_mul_ps(__m128 v, __m128 const m[4])\r\n{\r\n\t__m128 i0 = m[0];\r\n\t__m128 i1 = m[1];\r\n\t__m128 i2 = m[2];\r\n\t__m128 i3 = m[3];\r\n\r\n\t__m128 m0 = _mm_mul_ps(v, i0);\r\n\t__m128 m1 = _mm_mul_ps(v, i1);\r\n\t__m128 m2 = _mm_mul_ps(v, i2);\r\n\t__m128 m3 = _mm_mul_ps(v, i3);\r\n\r\n\t__m128 u0 = _mm_unpacklo_ps(m0, m1);\r\n\t__m128 u1 = _mm_unpackhi_ps(m0, m1);\r\n\t__m128 a0 = _mm_add_ps(u0, u1);\r\n\r\n\t__m128 u2 = _mm_unpacklo_ps(m2, m3);\r\n\t__m128 u3 = _mm_unpackhi_ps(m2, m3);\r\n\t__m128 a1 = _mm_add_ps(u2, u3);\r\n\r\n\t__m128 f0 = _mm_movelh_ps(a0, a1);\r\n\t__m128 f1 = _mm_movehl_ps(a1, a0);\r\n\t__m128 f2 = _mm_add_ps(f0, f1);\r\n\r\n\treturn f2;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER void sse_mul_ps(__m128 const in1[4], __m128 const in2[4], __m128 out[4])\r\n{\r\n\t{\r\n\t\t__m128 e0 = _mm_shuffle_ps(in2[0], in2[0], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 e1 = _mm_shuffle_ps(in2[0], in2[0], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 e2 = _mm_shuffle_ps(in2[0], in2[0], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 e3 = _mm_shuffle_ps(in2[0], in2[0], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 m0 = _mm_mul_ps(in1[0], e0);\r\n\t\t__m128 m1 = _mm_mul_ps(in1[1], e1);\r\n\t\t__m128 m2 = _mm_mul_ps(in1[2], e2);\r\n\t\t__m128 m3 = _mm_mul_ps(in1[3], e3);\r\n\r\n\t\t__m128 a0 = _mm_add_ps(m0, m1);\r\n\t\t__m128 a1 = _mm_add_ps(m2, m3);\r\n\t\t__m128 a2 = _mm_add_ps(a0, a1);\r\n\r\n\t\tout[0] = a2;\r\n\t}\r\n\r\n\t{\r\n\t\t__m128 e0 = _mm_shuffle_ps(in2[1], in2[1], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 e1 = _mm_shuffle_ps(in2[1], in2[1], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 e2 = _mm_shuffle_ps(in2[1], in2[1], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 e3 = _mm_shuffle_ps(in2[1], in2[1], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 m0 = _mm_mul_ps(in1[0], e0);\r\n\t\t__m128 m1 = _mm_mul_ps(in1[1], e1);\r\n\t\t__m128 m2 = _mm_mul_ps(in1[2], e2);\r\n\t\t__m128 m3 = _mm_mul_ps(in1[3], e3);\r\n\r\n\t\t__m128 a0 = _mm_add_ps(m0, m1);\r\n\t\t__m128 a1 = _mm_add_ps(m2, m3);\r\n\t\t__m128 a2 = _mm_add_ps(a0, a1);\r\n\r\n\t\tout[1] = a2;\r\n\t}\r\n\r\n\t{\r\n\t\t__m128 e0 = _mm_shuffle_ps(in2[2], in2[2], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 e1 = _mm_shuffle_ps(in2[2], in2[2], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 e2 = _mm_shuffle_ps(in2[2], in2[2], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 e3 = _mm_shuffle_ps(in2[2], in2[2], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 m0 = _mm_mul_ps(in1[0], e0);\r\n\t\t__m128 m1 = _mm_mul_ps(in1[1], e1);\r\n\t\t__m128 m2 = _mm_mul_ps(in1[2], e2);\r\n\t\t__m128 m3 = _mm_mul_ps(in1[3], e3);\r\n\r\n\t\t__m128 a0 = _mm_add_ps(m0, m1);\r\n\t\t__m128 a1 = _mm_add_ps(m2, m3);\r\n\t\t__m128 a2 = _mm_add_ps(a0, a1);\r\n\r\n\t\tout[2] = a2;\r\n\t}\r\n\r\n\t{\r\n\t\t//(__m128&)_mm_shuffle_epi32(__m128i&)in2[0], _MM_SHUFFLE(3, 3, 3, 3))\r\n\t\t__m128 e0 = _mm_shuffle_ps(in2[3], in2[3], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 e1 = _mm_shuffle_ps(in2[3], in2[3], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 e2 = _mm_shuffle_ps(in2[3], in2[3], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 e3 = _mm_shuffle_ps(in2[3], in2[3], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 m0 = _mm_mul_ps(in1[0], e0);\r\n\t\t__m128 m1 = _mm_mul_ps(in1[1], e1);\r\n\t\t__m128 m2 = _mm_mul_ps(in1[2], e2);\r\n\t\t__m128 m3 = _mm_mul_ps(in1[3], e3);\r\n\r\n\t\t__m128 a0 = _mm_add_ps(m0, m1);\r\n\t\t__m128 a1 = _mm_add_ps(m2, m3);\r\n\t\t__m128 a2 = _mm_add_ps(a0, a1);\r\n\r\n\t\tout[3] = a2;\r\n\t}\r\n}\r\n\r\nGLM_FUNC_QUALIFIER void sse_transpose_ps(__m128 const in[4], __m128 out[4])\r\n{\r\n    __m128 tmp0 = _mm_shuffle_ps(in[0], in[1], 0x44);\r\n    __m128 tmp2 = _mm_shuffle_ps(in[0], in[1], 0xEE);\r\n    __m128 tmp1 = _mm_shuffle_ps(in[2], in[3], 0x44);\r\n    __m128 tmp3 = _mm_shuffle_ps(in[2], in[3], 0xEE);\r\n\r\n    out[0] = _mm_shuffle_ps(tmp0, tmp1, 0x88);\r\n    out[1] = _mm_shuffle_ps(tmp0, tmp1, 0xDD);\r\n    out[2] = _mm_shuffle_ps(tmp2, tmp3, 0x88);\r\n    out[3] = _mm_shuffle_ps(tmp2, tmp3, 0xDD);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_slow_det_ps(__m128 const in[4])\r\n{\r\n\t__m128 Fac0;\r\n\t{\r\n\t\t//\tvalType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\r\n\t\t//\tvalType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\r\n\t\t//\tvalType SubFactor06 = m[1][2] * m[3][3] - m[3][2] * m[1][3];\r\n\t\t//\tvalType SubFactor13 = m[1][2] * m[2][3] - m[2][2] * m[1][3];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac0 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 Fac1;\r\n\t{\r\n\t\t//\tvalType SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\r\n\t\t//\tvalType SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\r\n\t\t//\tvalType SubFactor07 = m[1][1] * m[3][3] - m[3][1] * m[1][3];\r\n\t\t//\tvalType SubFactor14 = m[1][1] * m[2][3] - m[2][1] * m[1][3];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac1 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\r\n\t__m128 Fac2;\r\n\t{\r\n\t\t//\tvalType SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\r\n\t\t//\tvalType SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\r\n\t\t//\tvalType SubFactor08 = m[1][1] * m[3][2] - m[3][1] * m[1][2];\r\n\t\t//\tvalType SubFactor15 = m[1][1] * m[2][2] - m[2][1] * m[1][2];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac2 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 Fac3;\r\n\t{\r\n\t\t//\tvalType SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\r\n\t\t//\tvalType SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\r\n\t\t//\tvalType SubFactor09 = m[1][0] * m[3][3] - m[3][0] * m[1][3];\r\n\t\t//\tvalType SubFactor16 = m[1][0] * m[2][3] - m[2][0] * m[1][3];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac3 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 Fac4;\r\n\t{\r\n\t\t//\tvalType SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\r\n\t\t//\tvalType SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\r\n\t\t//\tvalType SubFactor10 = m[1][0] * m[3][2] - m[3][0] * m[1][2];\r\n\t\t//\tvalType SubFactor17 = m[1][0] * m[2][2] - m[2][0] * m[1][2];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac4 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 Fac5;\r\n\t{\r\n\t\t//\tvalType SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\r\n\t\t//\tvalType SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\r\n\t\t//\tvalType SubFactor12 = m[1][0] * m[3][1] - m[3][0] * m[1][1];\r\n\t\t//\tvalType SubFactor18 = m[1][0] * m[2][1] - m[2][0] * m[1][1];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac5 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 SignA = _mm_set_ps( 1.0f,-1.0f, 1.0f,-1.0f);\r\n\t__m128 SignB = _mm_set_ps(-1.0f, 1.0f,-1.0f, 1.0f);\r\n\r\n\t// m[1][0]\r\n\t// m[0][0]\r\n\t// m[0][0]\r\n\t// m[0][0]\r\n\t__m128 Temp0 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 Vec0 = _mm_shuffle_ps(Temp0, Temp0, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// m[1][1]\r\n\t// m[0][1]\r\n\t// m[0][1]\r\n\t// m[0][1]\r\n\t__m128 Temp1 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t__m128 Vec1 = _mm_shuffle_ps(Temp1, Temp1, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// m[1][2]\r\n\t// m[0][2]\r\n\t// m[0][2]\r\n\t// m[0][2]\r\n\t__m128 Temp2 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t__m128 Vec2 = _mm_shuffle_ps(Temp2, Temp2, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// m[1][3]\r\n\t// m[0][3]\r\n\t// m[0][3]\r\n\t// m[0][3]\r\n\t__m128 Temp3 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t__m128 Vec3 = _mm_shuffle_ps(Temp3, Temp3, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// col0\r\n\t// + (Vec1[0] * Fac0[0] - Vec2[0] * Fac1[0] + Vec3[0] * Fac2[0]),\r\n\t// - (Vec1[1] * Fac0[1] - Vec2[1] * Fac1[1] + Vec3[1] * Fac2[1]),\r\n\t// + (Vec1[2] * Fac0[2] - Vec2[2] * Fac1[2] + Vec3[2] * Fac2[2]),\r\n\t// - (Vec1[3] * Fac0[3] - Vec2[3] * Fac1[3] + Vec3[3] * Fac2[3]),\r\n\t__m128 Mul00 = _mm_mul_ps(Vec1, Fac0);\r\n\t__m128 Mul01 = _mm_mul_ps(Vec2, Fac1);\r\n\t__m128 Mul02 = _mm_mul_ps(Vec3, Fac2);\r\n\t__m128 Sub00 = _mm_sub_ps(Mul00, Mul01);\r\n\t__m128 Add00 = _mm_add_ps(Sub00, Mul02);\r\n\t__m128 Inv0 = _mm_mul_ps(SignB, Add00);\r\n\r\n\t// col1\r\n\t// - (Vec0[0] * Fac0[0] - Vec2[0] * Fac3[0] + Vec3[0] * Fac4[0]),\r\n\t// + (Vec0[0] * Fac0[1] - Vec2[1] * Fac3[1] + Vec3[1] * Fac4[1]),\r\n\t// - (Vec0[0] * Fac0[2] - Vec2[2] * Fac3[2] + Vec3[2] * Fac4[2]),\r\n\t// + (Vec0[0] * Fac0[3] - Vec2[3] * Fac3[3] + Vec3[3] * Fac4[3]),\r\n\t__m128 Mul03 = _mm_mul_ps(Vec0, Fac0);\r\n\t__m128 Mul04 = _mm_mul_ps(Vec2, Fac3);\r\n\t__m128 Mul05 = _mm_mul_ps(Vec3, Fac4);\r\n\t__m128 Sub01 = _mm_sub_ps(Mul03, Mul04);\r\n\t__m128 Add01 = _mm_add_ps(Sub01, Mul05);\r\n\t__m128 Inv1 = _mm_mul_ps(SignA, Add01);\r\n\r\n\t// col2\r\n\t// + (Vec0[0] * Fac1[0] - Vec1[0] * Fac3[0] + Vec3[0] * Fac5[0]),\r\n\t// - (Vec0[0] * Fac1[1] - Vec1[1] * Fac3[1] + Vec3[1] * Fac5[1]),\r\n\t// + (Vec0[0] * Fac1[2] - Vec1[2] * Fac3[2] + Vec3[2] * Fac5[2]),\r\n\t// - (Vec0[0] * Fac1[3] - Vec1[3] * Fac3[3] + Vec3[3] * Fac5[3]),\r\n\t__m128 Mul06 = _mm_mul_ps(Vec0, Fac1);\r\n\t__m128 Mul07 = _mm_mul_ps(Vec1, Fac3);\r\n\t__m128 Mul08 = _mm_mul_ps(Vec3, Fac5);\r\n\t__m128 Sub02 = _mm_sub_ps(Mul06, Mul07);\r\n\t__m128 Add02 = _mm_add_ps(Sub02, Mul08);\r\n\t__m128 Inv2 = _mm_mul_ps(SignB, Add02);\r\n\r\n\t// col3\r\n\t// - (Vec1[0] * Fac2[0] - Vec1[0] * Fac4[0] + Vec2[0] * Fac5[0]),\r\n\t// + (Vec1[0] * Fac2[1] - Vec1[1] * Fac4[1] + Vec2[1] * Fac5[1]),\r\n\t// - (Vec1[0] * Fac2[2] - Vec1[2] * Fac4[2] + Vec2[2] * Fac5[2]),\r\n\t// + (Vec1[0] * Fac2[3] - Vec1[3] * Fac4[3] + Vec2[3] * Fac5[3]));\r\n\t__m128 Mul09 = _mm_mul_ps(Vec0, Fac2);\r\n\t__m128 Mul10 = _mm_mul_ps(Vec1, Fac4);\r\n\t__m128 Mul11 = _mm_mul_ps(Vec2, Fac5);\r\n\t__m128 Sub03 = _mm_sub_ps(Mul09, Mul10);\r\n\t__m128 Add03 = _mm_add_ps(Sub03, Mul11);\r\n\t__m128 Inv3 = _mm_mul_ps(SignA, Add03);\r\n\r\n\t__m128 Row0 = _mm_shuffle_ps(Inv0, Inv1, _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 Row1 = _mm_shuffle_ps(Inv2, Inv3, _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 Row2 = _mm_shuffle_ps(Row0, Row1, _MM_SHUFFLE(2, 0, 2, 0));\r\n\r\n\t//\tvalType Determinant = m[0][0] * Inverse[0][0]\r\n\t//\t\t\t\t\t\t+ m[0][1] * Inverse[1][0]\r\n\t//\t\t\t\t\t\t+ m[0][2] * Inverse[2][0]\r\n\t//\t\t\t\t\t\t+ m[0][3] * Inverse[3][0];\r\n\t__m128 Det0 = sse_dot_ps(in[0], Row2);\r\n\treturn Det0;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_detd_ps\r\n(\r\n\t__m128 const m[4]\r\n)\r\n{\r\n\t// _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(\r\n\r\n\t//T SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\r\n\t//T SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\r\n\t//T SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\r\n\t//T SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\r\n\t//T SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\r\n\t//T SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\r\n\r\n\t// First 2 columns\r\n \t__m128 Swp2A = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[2]), _MM_SHUFFLE(0, 1, 1, 2)));\r\n \t__m128 Swp3A = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[3]), _MM_SHUFFLE(3, 2, 3, 3)));\r\n\t__m128 MulA = _mm_mul_ps(Swp2A, Swp3A);\r\n\r\n\t// Second 2 columns\r\n\t__m128 Swp2B = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[2]), _MM_SHUFFLE(3, 2, 3, 3)));\r\n\t__m128 Swp3B = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[3]), _MM_SHUFFLE(0, 1, 1, 2)));\r\n\t__m128 MulB = _mm_mul_ps(Swp2B, Swp3B);\r\n\r\n\t// Columns subtraction\r\n\t__m128 SubE = _mm_sub_ps(MulA, MulB);\r\n\r\n\t// Last 2 rows\r\n\t__m128 Swp2C = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[2]), _MM_SHUFFLE(0, 0, 1, 2)));\r\n\t__m128 Swp3C = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[3]), _MM_SHUFFLE(1, 2, 0, 0)));\r\n\t__m128 MulC = _mm_mul_ps(Swp2C, Swp3C);\r\n\t__m128 SubF = _mm_sub_ps(_mm_movehl_ps(MulC, MulC), MulC);\r\n\r\n\t//detail::tvec4<T, P> DetCof(\r\n\t//\t+ (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02),\r\n\t//\t- (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04),\r\n\t//\t+ (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05),\r\n\t//\t- (m[1][0] * SubFactor02 - m[1][1] * SubFactor04 + m[1][2] * SubFactor05));\r\n\r\n\t__m128 SubFacA = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(SubE), _MM_SHUFFLE(2, 1, 0, 0)));\r\n\t__m128 SwpFacA = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[1]), _MM_SHUFFLE(0, 0, 0, 1)));\r\n\t__m128 MulFacA = _mm_mul_ps(SwpFacA, SubFacA);\r\n\r\n\t__m128 SubTmpB = _mm_shuffle_ps(SubE, SubF, _MM_SHUFFLE(0, 0, 3, 1));\r\n\t__m128 SubFacB = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(SubTmpB), _MM_SHUFFLE(3, 1, 1, 0)));//SubF[0], SubE[3], SubE[3], SubE[1];\r\n\t__m128 SwpFacB = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[1]), _MM_SHUFFLE(1, 1, 2, 2)));\r\n\t__m128 MulFacB = _mm_mul_ps(SwpFacB, SubFacB);\r\n\r\n\t__m128 SubRes = _mm_sub_ps(MulFacA, MulFacB);\r\n\r\n\t__m128 SubTmpC = _mm_shuffle_ps(SubE, SubF, _MM_SHUFFLE(1, 0, 2, 2));\r\n\t__m128 SubFacC = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(SubTmpC), _MM_SHUFFLE(3, 3, 2, 0)));\r\n\t__m128 SwpFacC = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[1]), _MM_SHUFFLE(2, 3, 3, 3)));\r\n\t__m128 MulFacC = _mm_mul_ps(SwpFacC, SubFacC);\r\n\r\n\t__m128 AddRes = _mm_add_ps(SubRes, MulFacC);\r\n\t__m128 DetCof = _mm_mul_ps(AddRes, _mm_setr_ps( 1.0f,-1.0f, 1.0f,-1.0f));\r\n\r\n\t//return m[0][0] * DetCof[0]\r\n\t//\t + m[0][1] * DetCof[1]\r\n\t//\t + m[0][2] * DetCof[2]\r\n\t//\t + m[0][3] * DetCof[3];\r\n\r\n\treturn sse_dot_ps(m[0], DetCof);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_det_ps\r\n(\r\n\t__m128 const m[4]\r\n)\r\n{\r\n\t// _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(add)\r\n\r\n\t//T SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\r\n\t//T SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\r\n\t//T SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\r\n\t//T SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\r\n\t//T SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\r\n\t//T SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\r\n\r\n\t// First 2 columns\r\n \t__m128 Swp2A = _mm_shuffle_ps(m[2], m[2], _MM_SHUFFLE(0, 1, 1, 2));\r\n \t__m128 Swp3A = _mm_shuffle_ps(m[3], m[3], _MM_SHUFFLE(3, 2, 3, 3));\r\n\t__m128 MulA = _mm_mul_ps(Swp2A, Swp3A);\r\n\r\n\t// Second 2 columns\r\n\t__m128 Swp2B = _mm_shuffle_ps(m[2], m[2], _MM_SHUFFLE(3, 2, 3, 3));\r\n\t__m128 Swp3B = _mm_shuffle_ps(m[3], m[3], _MM_SHUFFLE(0, 1, 1, 2));\r\n\t__m128 MulB = _mm_mul_ps(Swp2B, Swp3B);\r\n\r\n\t// Columns subtraction\r\n\t__m128 SubE = _mm_sub_ps(MulA, MulB);\r\n\r\n\t// Last 2 rows\r\n\t__m128 Swp2C = _mm_shuffle_ps(m[2], m[2], _MM_SHUFFLE(0, 0, 1, 2));\r\n\t__m128 Swp3C = _mm_shuffle_ps(m[3], m[3], _MM_SHUFFLE(1, 2, 0, 0));\r\n\t__m128 MulC = _mm_mul_ps(Swp2C, Swp3C);\r\n\t__m128 SubF = _mm_sub_ps(_mm_movehl_ps(MulC, MulC), MulC);\r\n\r\n\t//detail::tvec4<T, P> DetCof(\r\n\t//\t+ (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02),\r\n\t//\t- (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04),\r\n\t//\t+ (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05),\r\n\t//\t- (m[1][0] * SubFactor02 - m[1][1] * SubFactor04 + m[1][2] * SubFactor05));\r\n\r\n\t__m128 SubFacA = _mm_shuffle_ps(SubE, SubE, _MM_SHUFFLE(2, 1, 0, 0));\r\n\t__m128 SwpFacA = _mm_shuffle_ps(m[1], m[1], _MM_SHUFFLE(0, 0, 0, 1));\r\n\t__m128 MulFacA = _mm_mul_ps(SwpFacA, SubFacA);\r\n\r\n\t__m128 SubTmpB = _mm_shuffle_ps(SubE, SubF, _MM_SHUFFLE(0, 0, 3, 1));\r\n\t__m128 SubFacB = _mm_shuffle_ps(SubTmpB, SubTmpB, _MM_SHUFFLE(3, 1, 1, 0));//SubF[0], SubE[3], SubE[3], SubE[1];\r\n\t__m128 SwpFacB = _mm_shuffle_ps(m[1], m[1], _MM_SHUFFLE(1, 1, 2, 2));\r\n\t__m128 MulFacB = _mm_mul_ps(SwpFacB, SubFacB);\r\n\r\n\t__m128 SubRes = _mm_sub_ps(MulFacA, MulFacB);\r\n\r\n\t__m128 SubTmpC = _mm_shuffle_ps(SubE, SubF, _MM_SHUFFLE(1, 0, 2, 2));\r\n\t__m128 SubFacC = _mm_shuffle_ps(SubTmpC, SubTmpC, _MM_SHUFFLE(3, 3, 2, 0));\r\n\t__m128 SwpFacC = _mm_shuffle_ps(m[1], m[1], _MM_SHUFFLE(2, 3, 3, 3));\r\n\t__m128 MulFacC = _mm_mul_ps(SwpFacC, SubFacC);\r\n\r\n\t__m128 AddRes = _mm_add_ps(SubRes, MulFacC);\r\n\t__m128 DetCof = _mm_mul_ps(AddRes, _mm_setr_ps( 1.0f,-1.0f, 1.0f,-1.0f));\r\n\r\n\t//return m[0][0] * DetCof[0]\r\n\t//\t + m[0][1] * DetCof[1]\r\n\t//\t + m[0][2] * DetCof[2]\r\n\t//\t + m[0][3] * DetCof[3];\r\n\r\n\treturn sse_dot_ps(m[0], DetCof);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER void sse_inverse_ps(__m128 const in[4], __m128 out[4])\r\n{\r\n\t__m128 Fac0;\r\n\t{\r\n\t\t//\tvalType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\r\n\t\t//\tvalType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\r\n\t\t//\tvalType SubFactor06 = m[1][2] * m[3][3] - m[3][2] * m[1][3];\r\n\t\t//\tvalType SubFactor13 = m[1][2] * m[2][3] - m[2][2] * m[1][3];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac0 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 Fac1;\r\n\t{\r\n\t\t//\tvalType SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\r\n\t\t//\tvalType SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\r\n\t\t//\tvalType SubFactor07 = m[1][1] * m[3][3] - m[3][1] * m[1][3];\r\n\t\t//\tvalType SubFactor14 = m[1][1] * m[2][3] - m[2][1] * m[1][3];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac1 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\r\n\t__m128 Fac2;\r\n\t{\r\n\t\t//\tvalType SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\r\n\t\t//\tvalType SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\r\n\t\t//\tvalType SubFactor08 = m[1][1] * m[3][2] - m[3][1] * m[1][2];\r\n\t\t//\tvalType SubFactor15 = m[1][1] * m[2][2] - m[2][1] * m[1][2];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac2 = _mm_sub_ps(Mul00, Mul01);\r\n    }\r\n\r\n\t__m128 Fac3;\r\n\t{\r\n\t\t//\tvalType SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\r\n\t\t//\tvalType SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\r\n\t\t//\tvalType SubFactor09 = m[1][0] * m[3][3] - m[3][0] * m[1][3];\r\n\t\t//\tvalType SubFactor16 = m[1][0] * m[2][3] - m[2][0] * m[1][3];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac3 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 Fac4;\r\n\t{\r\n\t\t//\tvalType SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\r\n\t\t//\tvalType SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\r\n\t\t//\tvalType SubFactor10 = m[1][0] * m[3][2] - m[3][0] * m[1][2];\r\n\t\t//\tvalType SubFactor17 = m[1][0] * m[2][2] - m[2][0] * m[1][2];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac4 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 Fac5;\r\n\t{\r\n\t\t//\tvalType SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\r\n\t\t//\tvalType SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\r\n\t\t//\tvalType SubFactor12 = m[1][0] * m[3][1] - m[3][0] * m[1][1];\r\n\t\t//\tvalType SubFactor18 = m[1][0] * m[2][1] - m[2][0] * m[1][1];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac5 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 SignA = _mm_set_ps( 1.0f,-1.0f, 1.0f,-1.0f);\r\n\t__m128 SignB = _mm_set_ps(-1.0f, 1.0f,-1.0f, 1.0f);\r\n\r\n\t// m[1][0]\r\n\t// m[0][0]\r\n\t// m[0][0]\r\n\t// m[0][0]\r\n\t__m128 Temp0 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 Vec0 = _mm_shuffle_ps(Temp0, Temp0, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// m[1][1]\r\n\t// m[0][1]\r\n\t// m[0][1]\r\n\t// m[0][1]\r\n\t__m128 Temp1 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t__m128 Vec1 = _mm_shuffle_ps(Temp1, Temp1, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// m[1][2]\r\n\t// m[0][2]\r\n\t// m[0][2]\r\n\t// m[0][2]\r\n\t__m128 Temp2 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t__m128 Vec2 = _mm_shuffle_ps(Temp2, Temp2, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// m[1][3]\r\n\t// m[0][3]\r\n\t// m[0][3]\r\n\t// m[0][3]\r\n\t__m128 Temp3 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t__m128 Vec3 = _mm_shuffle_ps(Temp3, Temp3, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// col0\r\n\t// + (Vec1[0] * Fac0[0] - Vec2[0] * Fac1[0] + Vec3[0] * Fac2[0]),\r\n\t// - (Vec1[1] * Fac0[1] - Vec2[1] * Fac1[1] + Vec3[1] * Fac2[1]),\r\n\t// + (Vec1[2] * Fac0[2] - Vec2[2] * Fac1[2] + Vec3[2] * Fac2[2]),\r\n\t// - (Vec1[3] * Fac0[3] - Vec2[3] * Fac1[3] + Vec3[3] * Fac2[3]),\r\n\t__m128 Mul00 = _mm_mul_ps(Vec1, Fac0);\r\n\t__m128 Mul01 = _mm_mul_ps(Vec2, Fac1);\r\n\t__m128 Mul02 = _mm_mul_ps(Vec3, Fac2);\r\n\t__m128 Sub00 = _mm_sub_ps(Mul00, Mul01);\r\n\t__m128 Add00 = _mm_add_ps(Sub00, Mul02);\r\n\t__m128 Inv0 = _mm_mul_ps(SignB, Add00);\r\n\r\n\t// col1\r\n\t// - (Vec0[0] * Fac0[0] - Vec2[0] * Fac3[0] + Vec3[0] * Fac4[0]),\r\n\t// + (Vec0[0] * Fac0[1] - Vec2[1] * Fac3[1] + Vec3[1] * Fac4[1]),\r\n\t// - (Vec0[0] * Fac0[2] - Vec2[2] * Fac3[2] + Vec3[2] * Fac4[2]),\r\n\t// + (Vec0[0] * Fac0[3] - Vec2[3] * Fac3[3] + Vec3[3] * Fac4[3]),\r\n\t__m128 Mul03 = _mm_mul_ps(Vec0, Fac0);\r\n\t__m128 Mul04 = _mm_mul_ps(Vec2, Fac3);\r\n\t__m128 Mul05 = _mm_mul_ps(Vec3, Fac4);\r\n\t__m128 Sub01 = _mm_sub_ps(Mul03, Mul04);\r\n\t__m128 Add01 = _mm_add_ps(Sub01, Mul05);\r\n\t__m128 Inv1 = _mm_mul_ps(SignA, Add01);\r\n\r\n\t// col2\r\n\t// + (Vec0[0] * Fac1[0] - Vec1[0] * Fac3[0] + Vec3[0] * Fac5[0]),\r\n\t// - (Vec0[0] * Fac1[1] - Vec1[1] * Fac3[1] + Vec3[1] * Fac5[1]),\r\n\t// + (Vec0[0] * Fac1[2] - Vec1[2] * Fac3[2] + Vec3[2] * Fac5[2]),\r\n\t// - (Vec0[0] * Fac1[3] - Vec1[3] * Fac3[3] + Vec3[3] * Fac5[3]),\r\n\t__m128 Mul06 = _mm_mul_ps(Vec0, Fac1);\r\n\t__m128 Mul07 = _mm_mul_ps(Vec1, Fac3);\r\n\t__m128 Mul08 = _mm_mul_ps(Vec3, Fac5);\r\n\t__m128 Sub02 = _mm_sub_ps(Mul06, Mul07);\r\n\t__m128 Add02 = _mm_add_ps(Sub02, Mul08);\r\n\t__m128 Inv2 = _mm_mul_ps(SignB, Add02);\r\n\r\n\t// col3\r\n\t// - (Vec1[0] * Fac2[0] - Vec1[0] * Fac4[0] + Vec2[0] * Fac5[0]),\r\n\t// + (Vec1[0] * Fac2[1] - Vec1[1] * Fac4[1] + Vec2[1] * Fac5[1]),\r\n\t// - (Vec1[0] * Fac2[2] - Vec1[2] * Fac4[2] + Vec2[2] * Fac5[2]),\r\n\t// + (Vec1[0] * Fac2[3] - Vec1[3] * Fac4[3] + Vec2[3] * Fac5[3]));\r\n\t__m128 Mul09 = _mm_mul_ps(Vec0, Fac2);\r\n\t__m128 Mul10 = _mm_mul_ps(Vec1, Fac4);\r\n\t__m128 Mul11 = _mm_mul_ps(Vec2, Fac5);\r\n\t__m128 Sub03 = _mm_sub_ps(Mul09, Mul10);\r\n\t__m128 Add03 = _mm_add_ps(Sub03, Mul11);\r\n\t__m128 Inv3 = _mm_mul_ps(SignA, Add03);\r\n\r\n\t__m128 Row0 = _mm_shuffle_ps(Inv0, Inv1, _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 Row1 = _mm_shuffle_ps(Inv2, Inv3, _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 Row2 = _mm_shuffle_ps(Row0, Row1, _MM_SHUFFLE(2, 0, 2, 0));\r\n\r\n\t//\tvalType Determinant = m[0][0] * Inverse[0][0] \r\n\t//\t\t\t\t\t\t+ m[0][1] * Inverse[1][0] \r\n\t//\t\t\t\t\t\t+ m[0][2] * Inverse[2][0] \r\n\t//\t\t\t\t\t\t+ m[0][3] * Inverse[3][0];\r\n\t__m128 Det0 = sse_dot_ps(in[0], Row2);\r\n\t__m128 Rcp0 = _mm_div_ps(one, Det0);\r\n\t//__m128 Rcp0 = _mm_rcp_ps(Det0);\r\n\r\n\t//\tInverse /= Determinant;\r\n\tout[0] = _mm_mul_ps(Inv0, Rcp0);\r\n\tout[1] = _mm_mul_ps(Inv1, Rcp0);\r\n\tout[2] = _mm_mul_ps(Inv2, Rcp0);\r\n\tout[3] = _mm_mul_ps(Inv3, Rcp0);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER void sse_inverse_fast_ps(__m128 const in[4], __m128 out[4])\r\n{\r\n\t__m128 Fac0;\r\n\t{\r\n\t\t//\tvalType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\r\n\t\t//\tvalType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\r\n\t\t//\tvalType SubFactor06 = m[1][2] * m[3][3] - m[3][2] * m[1][3];\r\n\t\t//\tvalType SubFactor13 = m[1][2] * m[2][3] - m[2][2] * m[1][3];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac0 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 Fac1;\r\n\t{\r\n\t\t//\tvalType SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\r\n\t\t//\tvalType SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\r\n\t\t//\tvalType SubFactor07 = m[1][1] * m[3][3] - m[3][1] * m[1][3];\r\n\t\t//\tvalType SubFactor14 = m[1][1] * m[2][3] - m[2][1] * m[1][3];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac1 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\r\n\t__m128 Fac2;\r\n\t{\r\n\t\t//\tvalType SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\r\n\t\t//\tvalType SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\r\n\t\t//\tvalType SubFactor08 = m[1][1] * m[3][2] - m[3][1] * m[1][2];\r\n\t\t//\tvalType SubFactor15 = m[1][1] * m[2][2] - m[2][1] * m[1][2];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac2 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 Fac3;\r\n\t{\r\n\t\t//\tvalType SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\r\n\t\t//\tvalType SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\r\n\t\t//\tvalType SubFactor09 = m[1][0] * m[3][3] - m[3][0] * m[1][3];\r\n\t\t//\tvalType SubFactor16 = m[1][0] * m[2][3] - m[2][0] * m[1][3];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac3 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 Fac4;\r\n\t{\r\n\t\t//\tvalType SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\r\n\t\t//\tvalType SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\r\n\t\t//\tvalType SubFactor10 = m[1][0] * m[3][2] - m[3][0] * m[1][2];\r\n\t\t//\tvalType SubFactor17 = m[1][0] * m[2][2] - m[2][0] * m[1][2];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac4 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 Fac5;\r\n\t{\r\n\t\t//\tvalType SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\r\n\t\t//\tvalType SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\r\n\t\t//\tvalType SubFactor12 = m[1][0] * m[3][1] - m[3][0] * m[1][1];\r\n\t\t//\tvalType SubFactor18 = m[1][0] * m[2][1] - m[2][0] * m[1][1];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac5 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 SignA = _mm_set_ps( 1.0f,-1.0f, 1.0f,-1.0f);\r\n\t__m128 SignB = _mm_set_ps(-1.0f, 1.0f,-1.0f, 1.0f);\r\n\r\n\t// m[1][0]\r\n\t// m[0][0]\r\n\t// m[0][0]\r\n\t// m[0][0]\r\n\t__m128 Temp0 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 Vec0 = _mm_shuffle_ps(Temp0, Temp0, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// m[1][1]\r\n\t// m[0][1]\r\n\t// m[0][1]\r\n\t// m[0][1]\r\n\t__m128 Temp1 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t__m128 Vec1 = _mm_shuffle_ps(Temp1, Temp1, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// m[1][2]\r\n\t// m[0][2]\r\n\t// m[0][2]\r\n\t// m[0][2]\r\n\t__m128 Temp2 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t__m128 Vec2 = _mm_shuffle_ps(Temp2, Temp2, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// m[1][3]\r\n\t// m[0][3]\r\n\t// m[0][3]\r\n\t// m[0][3]\r\n\t__m128 Temp3 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t__m128 Vec3 = _mm_shuffle_ps(Temp3, Temp3, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// col0\r\n\t// + (Vec1[0] * Fac0[0] - Vec2[0] * Fac1[0] + Vec3[0] * Fac2[0]),\r\n\t// - (Vec1[1] * Fac0[1] - Vec2[1] * Fac1[1] + Vec3[1] * Fac2[1]),\r\n\t// + (Vec1[2] * Fac0[2] - Vec2[2] * Fac1[2] + Vec3[2] * Fac2[2]),\r\n\t// - (Vec1[3] * Fac0[3] - Vec2[3] * Fac1[3] + Vec3[3] * Fac2[3]),\r\n\t__m128 Mul00 = _mm_mul_ps(Vec1, Fac0);\r\n\t__m128 Mul01 = _mm_mul_ps(Vec2, Fac1);\r\n\t__m128 Mul02 = _mm_mul_ps(Vec3, Fac2);\r\n\t__m128 Sub00 = _mm_sub_ps(Mul00, Mul01);\r\n\t__m128 Add00 = _mm_add_ps(Sub00, Mul02);\r\n\t__m128 Inv0 = _mm_mul_ps(SignB, Add00);\r\n\r\n\t// col1\r\n\t// - (Vec0[0] * Fac0[0] - Vec2[0] * Fac3[0] + Vec3[0] * Fac4[0]),\r\n\t// + (Vec0[0] * Fac0[1] - Vec2[1] * Fac3[1] + Vec3[1] * Fac4[1]),\r\n\t// - (Vec0[0] * Fac0[2] - Vec2[2] * Fac3[2] + Vec3[2] * Fac4[2]),\r\n\t// + (Vec0[0] * Fac0[3] - Vec2[3] * Fac3[3] + Vec3[3] * Fac4[3]),\r\n\t__m128 Mul03 = _mm_mul_ps(Vec0, Fac0);\r\n\t__m128 Mul04 = _mm_mul_ps(Vec2, Fac3);\r\n\t__m128 Mul05 = _mm_mul_ps(Vec3, Fac4);\r\n\t__m128 Sub01 = _mm_sub_ps(Mul03, Mul04);\r\n\t__m128 Add01 = _mm_add_ps(Sub01, Mul05);\r\n\t__m128 Inv1 = _mm_mul_ps(SignA, Add01);\r\n\r\n\t// col2\r\n\t// + (Vec0[0] * Fac1[0] - Vec1[0] * Fac3[0] + Vec3[0] * Fac5[0]),\r\n\t// - (Vec0[0] * Fac1[1] - Vec1[1] * Fac3[1] + Vec3[1] * Fac5[1]),\r\n\t// + (Vec0[0] * Fac1[2] - Vec1[2] * Fac3[2] + Vec3[2] * Fac5[2]),\r\n\t// - (Vec0[0] * Fac1[3] - Vec1[3] * Fac3[3] + Vec3[3] * Fac5[3]),\r\n\t__m128 Mul06 = _mm_mul_ps(Vec0, Fac1);\r\n\t__m128 Mul07 = _mm_mul_ps(Vec1, Fac3);\r\n\t__m128 Mul08 = _mm_mul_ps(Vec3, Fac5);\r\n\t__m128 Sub02 = _mm_sub_ps(Mul06, Mul07);\r\n\t__m128 Add02 = _mm_add_ps(Sub02, Mul08);\r\n\t__m128 Inv2 = _mm_mul_ps(SignB, Add02);\r\n\r\n\t// col3\r\n\t// - (Vec1[0] * Fac2[0] - Vec1[0] * Fac4[0] + Vec2[0] * Fac5[0]),\r\n\t// + (Vec1[0] * Fac2[1] - Vec1[1] * Fac4[1] + Vec2[1] * Fac5[1]),\r\n\t// - (Vec1[0] * Fac2[2] - Vec1[2] * Fac4[2] + Vec2[2] * Fac5[2]),\r\n\t// + (Vec1[0] * Fac2[3] - Vec1[3] * Fac4[3] + Vec2[3] * Fac5[3]));\r\n\t__m128 Mul09 = _mm_mul_ps(Vec0, Fac2);\r\n\t__m128 Mul10 = _mm_mul_ps(Vec1, Fac4);\r\n\t__m128 Mul11 = _mm_mul_ps(Vec2, Fac5);\r\n\t__m128 Sub03 = _mm_sub_ps(Mul09, Mul10);\r\n\t__m128 Add03 = _mm_add_ps(Sub03, Mul11);\r\n\t__m128 Inv3 = _mm_mul_ps(SignA, Add03);\r\n\r\n\t__m128 Row0 = _mm_shuffle_ps(Inv0, Inv1, _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 Row1 = _mm_shuffle_ps(Inv2, Inv3, _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 Row2 = _mm_shuffle_ps(Row0, Row1, _MM_SHUFFLE(2, 0, 2, 0));\r\n\r\n\t//\tvalType Determinant = m[0][0] * Inverse[0][0] \r\n\t//\t\t\t\t\t\t+ m[0][1] * Inverse[1][0] \r\n\t//\t\t\t\t\t\t+ m[0][2] * Inverse[2][0] \r\n\t//\t\t\t\t\t\t+ m[0][3] * Inverse[3][0];\r\n\t__m128 Det0 = sse_dot_ps(in[0], Row2);\r\n\t__m128 Rcp0 = _mm_rcp_ps(Det0);\r\n\t//__m128 Rcp0 = _mm_div_ps(one, Det0);\r\n\t//\tInverse /= Determinant;\r\n\tout[0] = _mm_mul_ps(Inv0, Rcp0);\r\n\tout[1] = _mm_mul_ps(Inv1, Rcp0);\r\n\tout[2] = _mm_mul_ps(Inv2, Rcp0);\r\n\tout[3] = _mm_mul_ps(Inv3, Rcp0);\r\n}\r\n/*\r\nGLM_FUNC_QUALIFIER void sse_rotate_ps(__m128 const in[4], float Angle, float const v[3], __m128 out[4])\r\n{\r\n\tfloat a = glm::radians(Angle);\r\n    float c = cos(a);\r\n    float s = sin(a);\r\n\r\n\tglm::vec4 AxisA(v[0], v[1], v[2], float(0));\r\n\t__m128 AxisB = _mm_set_ps(AxisA.w, AxisA.z, AxisA.y, AxisA.x);\r\n    __m128 AxisC = detail::sse_nrm_ps(AxisB);\r\n\r\n\t__m128 Cos0 = _mm_set_ss(c);\r\n\t__m128 CosA = _mm_shuffle_ps(Cos0, Cos0, _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 Sin0 = _mm_set_ss(s);\r\n\t__m128 SinA = _mm_shuffle_ps(Sin0, Sin0, _MM_SHUFFLE(0, 0, 0, 0));\r\n\r\n\t// detail::tvec3<T, P> temp = (valType(1) - c) * axis;\r\n\t__m128 Temp0 = _mm_sub_ps(one, CosA);\r\n\t__m128 Temp1 = _mm_mul_ps(Temp0, AxisC);\r\n\t\r\n\t//Rotate[0][0] = c + temp[0] * axis[0];\r\n\t//Rotate[0][1] = 0 + temp[0] * axis[1] + s * axis[2];\r\n\t//Rotate[0][2] = 0 + temp[0] * axis[2] - s * axis[1];\r\n\t__m128 Axis0 = _mm_shuffle_ps(AxisC, AxisC, _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 TmpA0 = _mm_mul_ps(Axis0, AxisC);\r\n\t__m128 CosA0 = _mm_shuffle_ps(Cos0, Cos0, _MM_SHUFFLE(1, 1, 1, 0));\r\n\t__m128 TmpA1 = _mm_add_ps(CosA0, TmpA0);\r\n\t__m128 SinA0 = SinA;//_mm_set_ps(0.0f, s, -s, 0.0f);\r\n\t__m128 TmpA2 = _mm_shuffle_ps(AxisC, AxisC, _MM_SHUFFLE(3, 1, 2, 3));\r\n\t__m128 TmpA3 = _mm_mul_ps(SinA0, TmpA2);\r\n\t__m128 TmpA4 = _mm_add_ps(TmpA1, TmpA3);\r\n\r\n\t//Rotate[1][0] = 0 + temp[1] * axis[0] - s * axis[2];\r\n\t//Rotate[1][1] = c + temp[1] * axis[1];\r\n\t//Rotate[1][2] = 0 + temp[1] * axis[2] + s * axis[0];\r\n\t__m128 Axis1 = _mm_shuffle_ps(AxisC, AxisC, _MM_SHUFFLE(1, 1, 1, 1));\r\n\t__m128 TmpB0 = _mm_mul_ps(Axis1, AxisC);\r\n\t__m128 CosA1 = _mm_shuffle_ps(Cos0, Cos0, _MM_SHUFFLE(1, 1, 0, 1));\r\n\t__m128 TmpB1 = _mm_add_ps(CosA1, TmpB0);\r\n\t__m128 SinB0 = SinA;//_mm_set_ps(-s, 0.0f, s, 0.0f);\r\n\t__m128 TmpB2 = _mm_shuffle_ps(AxisC, AxisC, _MM_SHUFFLE(3, 0, 3, 2));\r\n\t__m128 TmpB3 = _mm_mul_ps(SinA0, TmpB2);\r\n\t__m128 TmpB4 = _mm_add_ps(TmpB1, TmpB3);\r\n\r\n    //Rotate[2][0] = 0 + temp[2] * axis[0] + s * axis[1];\r\n    //Rotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0];\r\n    //Rotate[2][2] = c + temp[2] * axis[2];\r\n\t__m128 Axis2 = _mm_shuffle_ps(AxisC, AxisC, _MM_SHUFFLE(2, 2, 2, 2));\r\n\t__m128 TmpC0 = _mm_mul_ps(Axis2, AxisC);\r\n\t__m128 CosA2 = _mm_shuffle_ps(Cos0, Cos0, _MM_SHUFFLE(1, 0, 1, 1));\r\n\t__m128 TmpC1 = _mm_add_ps(CosA2, TmpC0);\r\n\t__m128 SinC0 = SinA;//_mm_set_ps(s, -s, 0.0f, 0.0f);\r\n\t__m128 TmpC2 = _mm_shuffle_ps(AxisC, AxisC, _MM_SHUFFLE(3, 3, 0, 1));\r\n\t__m128 TmpC3 = _mm_mul_ps(SinA0, TmpC2);\r\n\t__m128 TmpC4 = _mm_add_ps(TmpC1, TmpC3);\r\n\r\n\t__m128 Result[4];\r\n\tResult[0] = TmpA4;\r\n\tResult[1] = TmpB4;\r\n\tResult[2] = TmpC4;\r\n\tResult[3] = _mm_set_ps(1, 0, 0, 0);\r\n\r\n\t//detail::tmat4x4<valType> Result(detail::tmat4x4<valType>::_null);\r\n\t//Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2];\r\n\t//Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2];\r\n\t//Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2];\r\n\t//Result[3] = m[3];\r\n\t//return Result;\r\n\tsse_mul_ps(in, Result, out);\r\n}\r\n*/\r\nGLM_FUNC_QUALIFIER void sse_outer_ps(__m128 const & c, __m128 const & r, __m128 out[4])\r\n{\r\n\tout[0] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(0, 0, 0, 0)));\r\n\tout[1] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(1, 1, 1, 1)));\r\n\tout[2] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(2, 2, 2, 2)));\r\n\tout[3] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(3, 3, 3, 3)));\r\n}\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/detail/intrinsic_trigonometric.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_trigonometric.hpp\r\n/// @date 2009-06-09 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_detail_intrinsic_trigonometric\r\n#define glm_detail_intrinsic_trigonometric\r\n\r\n#include \"setup.hpp\"\r\n\r\n#if(!(GLM_ARCH & GLM_ARCH_SSE2))\r\n#\terror \"SSE2 instructions not supported or enabled\"\r\n#else\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#include \"intrinsic_trigonometric.inl\"\r\n\r\n#endif//GLM_ARCH\r\n#endif//glm_detail_intrinsic_trigonometric\r\n"
  },
  {
    "path": "cpu/glm/detail/intrinsic_trigonometric.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_trigonometric.inl\r\n/// @date 2011-06-15 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n"
  },
  {
    "path": "cpu/glm/detail/intrinsic_vector_relational.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_vector_relational.hpp\r\n/// @date 2009-06-09 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_detail_intrinsic_vector_relational\r\n#define glm_detail_intrinsic_vector_relational\r\n\r\n#include \"setup.hpp\"\r\n\r\n#if(!(GLM_ARCH & GLM_ARCH_SSE2))\r\n#\terror \"SSE2 instructions not supported or enabled\"\r\n#else\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#include \"intrinsic_vector_relational.inl\"\r\n\r\n#endif//GLM_ARCH\r\n#endif//glm_detail_intrinsic_vector_relational\r\n"
  },
  {
    "path": "cpu/glm/detail/intrinsic_vector_relational.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_vector_relational.inl\r\n/// @date 2009-06-09 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n//\r\n//// lessThan\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec2<T, P>::bool_type lessThan\r\n//(\r\n//\tdetail::tvec2<T, P> const & x, \r\n//\tdetail::tvec2<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\r\n//    return typename detail::tvec2<bool>::bool_type(x.x < y.x, x.y < y.y);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec3<T, P>::bool_type lessThan\r\n//(\r\n//\tdetail::tvec3<T, P> const & x, \r\n//\tdetail::tvec3<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\t\r\n//\treturn typename detail::tvec3<bool>::bool_type(x.x < y.x, x.y < y.y, x.z < y.z);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec4<T, P>::bool_type lessThan\r\n//(\r\n//\tdetail::tvec4<T, P> const & x, \r\n//\tdetail::tvec4<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\r\n//\treturn typename detail::tvec4<bool>::bool_type(x.x < y.x, x.y < y.y, x.z < y.z, x.w < y.w);\r\n//}\r\n//\r\n//// lessThanEqual\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec2<T, P>::bool_type lessThanEqual\r\n//(\r\n//\tdetail::tvec2<T, P> const & x, \r\n//\tdetail::tvec2<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\r\n//\treturn typename detail::tvec2<bool>::bool_type(x.x <= y.x, x.y <= y.y);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec3<T, P>::bool_type lessThanEqual\r\n//(\r\n//\tdetail::tvec3<T, P> const & x, \r\n//\tdetail::tvec3<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\t\r\n//\treturn typename detail::tvec3<bool>::bool_type(x.x <= y.x, x.y <= y.y, x.z <= y.z);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec4<T, P>::bool_type lessThanEqual\r\n//(\r\n//\tdetail::tvec4<T, P> const & x, \r\n//\tdetail::tvec4<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\t\r\n//\treturn typename detail::tvec4<bool>::bool_type(x.x <= y.x, x.y <= y.y, x.z <= y.z, x.w <= y.w);\r\n//}\r\n//\r\n//// greaterThan\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec2<T, P>::bool_type greaterThan\r\n//(\r\n//\tdetail::tvec2<T, P> const & x, \r\n//\tdetail::tvec2<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\r\n//\treturn typename detail::tvec2<bool>::bool_type(x.x > y.x, x.y > y.y);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec3<T, P>::bool_type greaterThan\r\n//(\r\n//\tdetail::tvec3<T, P> const & x, \r\n//\tdetail::tvec3<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\t\r\n//\treturn typename detail::tvec3<bool>::bool_type(x.x > y.x, x.y > y.y, x.z > y.z);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec4<T, P>::bool_type greaterThan\r\n//(\r\n//\tdetail::tvec4<T, P> const & x, \r\n//\tdetail::tvec4<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\t\r\n//\treturn typename detail::tvec4<bool>::bool_type(x.x > y.x, x.y > y.y, x.z > y.z, x.w > y.w);\r\n//}\r\n//\r\n//// greaterThanEqual\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec2<T, P>::bool_type greaterThanEqual\r\n//(\r\n//\tdetail::tvec2<T, P> const & x, \r\n//\tdetail::tvec2<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\r\n//\treturn typename detail::tvec2<bool>::bool_type(x.x >= y.x, x.y >= y.y);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec3<T, P>::bool_type greaterThanEqual\r\n//(\r\n//\tdetail::tvec3<T, P> const & x, \r\n//\tdetail::tvec3<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\r\n//\treturn typename detail::tvec3<bool>::bool_type(x.x >= y.x, x.y >= y.y, x.z >= y.z);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec4<T, P>::bool_type greaterThanEqual\r\n//(\r\n//\tdetail::tvec4<T, P> const & x, \r\n//\tdetail::tvec4<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\r\n//\treturn typename detail::tvec4<bool>::bool_type(x.x >= y.x, x.y >= y.y, x.z >= y.z, x.w >= y.w);\r\n//}\r\n//\r\n//// equal\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec2<T, P>::bool_type equal\r\n//(\r\n//\tdetail::tvec2<T, P> const & x, \r\n//\tdetail::tvec2<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint || \r\n//\t\tdetail::type<valType>::is_bool);\r\n//\r\n//\treturn typename detail::tvec2<T, P>::bool_type(x.x == y.x, x.y == y.y);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec3<T, P>::bool_type equal\r\n//(\r\n//\tdetail::tvec3<T, P> const & x, \r\n//\tdetail::tvec3<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint || \r\n//\t\tdetail::type<valType>::is_bool);\r\n//\r\n//\treturn typename detail::tvec3<T, P>::bool_type(x.x == y.x, x.y == y.y, x.z == y.z);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec4<T, P>::bool_type equal\r\n//(\r\n//\tdetail::tvec4<T, P> const & x, \r\n//\tdetail::tvec4<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint || \r\n//\t\tdetail::type<valType>::is_bool);\r\n//\r\n//\treturn typename detail::tvec4<T, P>::bool_type(x.x == y.x, x.y == y.y, x.z == y.z, x.w == y.w);\r\n//}\r\n//\r\n//// notEqual\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec2<T, P>::bool_type notEqual\r\n//(\r\n//\tdetail::tvec2<T, P> const & x, \r\n//\tdetail::tvec2<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint || \r\n//\t\tdetail::type<valType>::is_bool);\r\n//\r\n//\treturn typename detail::tvec2<T, P>::bool_type(x.x != y.x, x.y != y.y);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec3<T, P>::bool_type notEqual\r\n//(\r\n//\tdetail::tvec3<T, P> const & x, \r\n//\tdetail::tvec3<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint || \r\n//\t\tdetail::type<valType>::is_bool);\r\n//\r\n//\treturn typename detail::tvec3<T, P>::bool_type(x.x != y.x, x.y != y.y, x.z != y.z);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec4<T, P>::bool_type notEqual\r\n//(\r\n//\tdetail::tvec4<T, P> const & x, \r\n//\tdetail::tvec4<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint || \r\n//\t\tdetail::type<valType>::is_bool);\r\n//\r\n//\treturn typename detail::tvec4<T, P>::bool_type(x.x != y.x, x.y != y.y, x.z != y.z, x.w != y.w);\r\n//}\r\n//\r\n//// any\r\n//GLM_FUNC_QUALIFIER bool any(detail::tvec2<bool> const & x)\r\n//{\r\n//\treturn x.x || x.y;\r\n//}\r\n//\r\n//GLM_FUNC_QUALIFIER bool any(detail::tvec3<bool> const & x)\r\n//{\r\n//    return x.x || x.y || x.z;\r\n//}\r\n//\r\n//GLM_FUNC_QUALIFIER bool any(detail::tvec4<bool> const & x)\r\n//{\r\n//    return x.x || x.y || x.z || x.w;\r\n//}\r\n//\r\n//// all\r\n//GLM_FUNC_QUALIFIER bool all(const detail::tvec2<bool>& x)\r\n//{\r\n//    return x.x && x.y;\r\n//}\r\n//\r\n//GLM_FUNC_QUALIFIER bool all(const detail::tvec3<bool>& x)\r\n//{\r\n//    return x.x && x.y && x.z;\r\n//}\r\n//\r\n//GLM_FUNC_QUALIFIER bool all(const detail::tvec4<bool>& x)\r\n//{\r\n//    return x.x && x.y && x.z && x.w;\r\n//}\r\n//\r\n//// not\r\n//GLM_FUNC_QUALIFIER detail::tvec2<bool>::bool_type not_\r\n//(\r\n//\tdetail::tvec2<bool> const & v\r\n//)\r\n//{\r\n//    return detail::tvec2<bool>::bool_type(!v.x, !v.y);\r\n//}\r\n//\r\n//GLM_FUNC_QUALIFIER detail::tvec3<bool>::bool_type not_\r\n//(\r\n//\tdetail::tvec3<bool> const & v\r\n//)\r\n//{\r\n//    return detail::tvec3<bool>::bool_type(!v.x, !v.y, !v.z);\r\n//}\r\n//\r\n//GLM_FUNC_QUALIFIER detail::tvec4<bool>::bool_type not_\r\n//(\r\n//\tdetail::tvec4<bool> const & v\r\n//)\r\n//{\r\n//    return detail::tvec4<bool>::bool_type(!v.x, !v.y, !v.z, !v.w);\r\n//}"
  },
  {
    "path": "cpu/glm/detail/precision.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n///\r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n///\r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/precision.hpp\r\n/// @date 2013-04-01 / 2013-04-01\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_CORE_PRECISION_INCLUDED\r\n#define GLM_CORE_PRECISION_INCLUDED\r\n\r\nnamespace glm\r\n{\r\n\tenum precision\r\n\t{\r\n\t\thighp,\r\n\t\tmediump,\r\n\t\tlowp,\r\n\t\tdefaultp = highp\r\n\t};\r\n}//namespace glm\r\n\r\n#endif//GLM_CORE_PRECISION_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/detail/precision.inl",
    "content": ""
  },
  {
    "path": "cpu/glm/detail/setup.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/setup.hpp\r\n/// @date 2006-11-13 / 2013-03-30\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_SETUP_INCLUDED\r\n#define GLM_SETUP_INCLUDED\r\n\r\n#include <cassert>\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Version\r\n\r\n#define GLM_VERSION\t\t\t\t\t95\r\n#define GLM_VERSION_MAJOR\t\t\t0\r\n#define GLM_VERSION_MINOR\t\t\t9\r\n#define GLM_VERSION_PATCH\t\t\t5\r\n#define GLM_VERSION_REVISION\t\t2\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Platform\r\n\r\n#define GLM_PLATFORM_UNKNOWN\t\t0x00000000\r\n#define GLM_PLATFORM_WINDOWS\t\t0x00010000\r\n#define GLM_PLATFORM_LINUX\t\t\t0x00020000\r\n#define GLM_PLATFORM_APPLE\t\t\t0x00040000\r\n//#define GLM_PLATFORM_IOS\t\t\t0x00080000\r\n#define GLM_PLATFORM_ANDROID\t\t0x00100000\r\n#define GLM_PLATFORM_CHROME_NACL\t0x00200000\r\n#define GLM_PLATFORM_UNIX\t\t\t0x00400000\r\n#define GLM_PLATFORM_QNXNTO\t\t\t0x00800000\r\n#define GLM_PLATFORM_WINCE\t\t\t0x01000000\r\n\r\n#ifdef GLM_FORCE_PLATFORM_UNKNOWN\r\n#\tdefine GLM_PLATFORM GLM_PLATFORM_UNKNOWN\r\n#elif defined(__QNXNTO__)\r\n#\tdefine GLM_PLATFORM GLM_PLATFORM_QNXNTO\r\n#elif defined(__APPLE__)\r\n#\tdefine GLM_PLATFORM GLM_PLATFORM_APPLE\r\n#elif defined(WINCE)\r\n#\tdefine GLM_PLATFORM GLM_PLATFORM_WINCE\r\n#elif defined(_WIN32)\r\n#\tdefine GLM_PLATFORM GLM_PLATFORM_WINDOWS\r\n#elif defined(__native_client__)\r\n#\tdefine GLM_PLATFORM GLM_PLATFORM_CHROME_NACL\r\n#elif defined(__ANDROID__)\r\n#\tdefine GLM_PLATFORM GLM_PLATFORM_ANDROID\r\n#elif defined(__linux)\r\n#\tdefine GLM_PLATFORM GLM_PLATFORM_LINUX\r\n#elif defined(__unix)\r\n#\tdefine GLM_PLATFORM GLM_PLATFORM_UNIX\r\n#else\r\n#\tdefine GLM_PLATFORM GLM_PLATFORM_UNKNOWN\r\n#endif//\r\n\r\n// Report platform detection\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_PLATFORM_DISPLAYED))\r\n#\tdefine GLM_MESSAGE_PLATFORM_DISPLAYED\r\n#\tif(GLM_PLATFORM & GLM_PLATFORM_QNXNTO)\r\n#\t\tpragma message(\"GLM: QNX platform detected\")\r\n//#\telif(GLM_PLATFORM & GLM_PLATFORM_IOS)\r\n//#\t\tpragma message(\"GLM: iOS platform detected\")\r\n#\telif(GLM_PLATFORM & GLM_PLATFORM_APPLE)\r\n#\t\tpragma message(\"GLM: Apple platform detected\")\r\n#\telif(GLM_PLATFORM & GLM_PLATFORM_WINCE)\r\n#\t\tpragma message(\"GLM: WinCE platform detected\")\r\n#\telif(GLM_PLATFORM & GLM_PLATFORM_WINDOWS)\r\n#\t\tpragma message(\"GLM: Windows platform detected\")\r\n#\telif(GLM_PLATFORM & GLM_PLATFORM_CHROME_NACL)\r\n#\t\tpragma message(\"GLM: Native Client detected\")\r\n#\telif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)\r\n#\t\tpragma message(\"GLM: Android platform detected\")\r\n#\telif(GLM_PLATFORM & GLM_PLATFORM_LINUX)\r\n#\t\tpragma message(\"GLM: Linux platform detected\")\r\n#\telif(GLM_PLATFORM & GLM_PLATFORM_UNIX)\r\n#\t\tpragma message(\"GLM: UNIX platform detected\")\r\n#\telif(GLM_PLATFORM & GLM_PLATFORM_UNKNOWN)\r\n#\t\tpragma message(\"GLM: platform unknown\")\r\n#\telse\r\n#\t\tpragma message(\"GLM: platform not detected\")\r\n#\tendif\r\n#endif//GLM_MESSAGE\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Compiler\r\n\r\n// User defines: GLM_FORCE_COMPILER_UNKNOWN\r\n// TODO ? __llvm__ \r\n\r\n#define GLM_COMPILER_UNKNOWN\t\t0x00000000\r\n\r\n// Intel\r\n#define GLM_COMPILER_INTEL\t\t\t0x00100000\r\n#define GLM_COMPILER_INTEL9\t\t\t0x00100010\r\n#define GLM_COMPILER_INTEL10_0\t\t0x00100020\r\n#define GLM_COMPILER_INTEL10_1\t\t0x00100030\r\n#define GLM_COMPILER_INTEL11_0\t\t0x00100040\r\n#define GLM_COMPILER_INTEL11_1\t\t0x00100050\r\n#define GLM_COMPILER_INTEL12_0\t\t0x00100060\r\n#define GLM_COMPILER_INTEL12_1\t\t0x00100070\r\n#define GLM_COMPILER_INTEL13_0\t\t0x00100080\r\n\r\n// Visual C++ defines\r\n#define GLM_COMPILER_VC\t\t\t\t0x01000000\r\n#define GLM_COMPILER_VC8\t\t\t0x01000070\r\n#define GLM_COMPILER_VC9\t\t\t0x01000080\r\n#define GLM_COMPILER_VC10\t\t\t0x01000090\r\n#define GLM_COMPILER_VC11\t\t\t0x010000A0\r\n#define GLM_COMPILER_VC12\t\t\t0x010000B0\r\n\r\n// GCC defines\r\n#define GLM_COMPILER_GCC\t\t\t0x02000000\r\n#define GLM_COMPILER_GCC34\t\t\t0x02000050\r\n#define GLM_COMPILER_GCC35\t\t\t0x02000060\r\n#define GLM_COMPILER_GCC40\t\t\t0x02000070\r\n#define GLM_COMPILER_GCC41\t\t\t0x02000080\r\n#define GLM_COMPILER_GCC42\t\t\t0x02000090\r\n#define GLM_COMPILER_GCC43\t\t\t0x020000A0\r\n#define GLM_COMPILER_GCC44\t\t\t0x020000B0\r\n#define GLM_COMPILER_GCC45\t\t\t0x020000C0\r\n#define GLM_COMPILER_GCC46\t\t\t0x020000D0\r\n#define GLM_COMPILER_GCC47\t\t\t0x020000E0\r\n#define GLM_COMPILER_GCC48\t\t\t0x020000F0\r\n#define GLM_COMPILER_GCC49\t\t\t0x02000100\r\n\r\n// Borland C++\r\n#define GLM_COMPILER_BC\t\t\t\t0x04000000\r\n\r\n// CodeWarrior\r\n#define GLM_COMPILER_CODEWARRIOR\t0x08000000\r\n\r\n// CUDA\r\n#define GLM_COMPILER_CUDA\t\t\t0x10000000\r\n#define GLM_COMPILER_CUDA30\t\t\t0x10000010\r\n#define GLM_COMPILER_CUDA31\t\t\t0x10000020\r\n#define GLM_COMPILER_CUDA32\t\t\t0x10000030\r\n#define GLM_COMPILER_CUDA40\t\t\t0x10000040\r\n#define GLM_COMPILER_CUDA41\t\t\t0x10000050\r\n#define GLM_COMPILER_CUDA42\t\t\t0x10000060\r\n\r\n// Clang\r\n#define GLM_COMPILER_CLANG\t\t\t0x20000000\r\n#define GLM_COMPILER_CLANG26\t\t0x20000010\r\n#define GLM_COMPILER_CLANG27\t\t0x20000020\r\n#define GLM_COMPILER_CLANG28\t\t0x20000030\r\n#define GLM_COMPILER_CLANG29\t\t0x20000040\r\n#define GLM_COMPILER_CLANG30\t\t0x20000050\r\n#define GLM_COMPILER_CLANG31\t\t0x20000060\r\n#define GLM_COMPILER_CLANG32\t\t0x20000070\r\n#define GLM_COMPILER_CLANG33\t\t0x20000080\r\n#define GLM_COMPILER_CLANG40\t\t0x20000090\r\n#define GLM_COMPILER_CLANG41\t\t0x200000A0\r\n#define GLM_COMPILER_CLANG42\t\t0x200000B0\r\n#define GLM_COMPILER_CLANG43\t\t0x200000C0\r\n#define GLM_COMPILER_CLANG50\t\t0x200000D0\r\n\r\n// LLVM GCC\r\n#define GLM_COMPILER_LLVM_GCC\t\t0x40000000\r\n\r\n// Build model\r\n#define GLM_MODEL_32\t\t\t\t0x00000010\r\n#define GLM_MODEL_64\t\t\t\t0x00000020\r\n\r\n// Force generic C++ compiler\r\n#ifdef GLM_FORCE_COMPILER_UNKNOWN\r\n#\tdefine GLM_COMPILER GLM_COMPILER_UNKNOWN\r\n\r\n#elif defined(__INTEL_COMPILER)\r\n#\tif __INTEL_COMPILER == 900\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL9\r\n#\telif __INTEL_COMPILER == 1000\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL10_0\r\n#\telif __INTEL_COMPILER == 1010\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL10_1\r\n#\telif __INTEL_COMPILER == 1100\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL11_0\r\n#\telif __INTEL_COMPILER == 1110\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL11_1\r\n#\telif __INTEL_COMPILER == 1200\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL12_0\r\n#\telif __INTEL_COMPILER == 1210\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL12_1\r\n#\telif __INTEL_COMPILER >= 1300\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL13_0\r\n#\telse\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL\r\n#\tendif\r\n\r\n// CUDA\r\n#elif defined(__CUDACC__)\r\n#\tif CUDA_VERSION < 3000\r\n#\t\terror \"GLM requires CUDA 3.0 or higher\"\r\n#\telse\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CUDA\r\n#\tendif\r\n\r\n// Visual C++\r\n#elif defined(_MSC_VER)\r\n#\tif _MSC_VER < 1400\r\n#\t\terror \"GLM requires Visual C++ 2005 or higher\"\r\n#\telif _MSC_VER == 1400\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC8\r\n#\telif _MSC_VER == 1500\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC9\r\n#\telif _MSC_VER == 1600\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC10\r\n#\telif _MSC_VER == 1700\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC11\r\n#\telif _MSC_VER >= 1800\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC12\r\n#\telse//_MSC_VER\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC\r\n#\tendif//_MSC_VER\r\n\r\n// Clang\r\n#elif defined(__clang__)\r\n#\tif (__clang_major__ <= 1) || ((__clang_major__ == 2) && (__clang_minor__ < 6))\r\n#\t\terror \"GLM requires Clang 2.6 or higher\"\r\n#\telif(__clang_major__ == 2) && (__clang_minor__ == 6)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG26\r\n#\telif(__clang_major__ == 2) && (__clang_minor__ == 7)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG27\r\n#\telif(__clang_major__ == 2) && (__clang_minor__ == 8)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG28\r\n#\telif(__clang_major__ == 2) && (__clang_minor__ == 9)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG29\r\n#\telif(__clang_major__ == 3) && (__clang_minor__ == 0)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG30\r\n#\telif(__clang_major__ == 3) && (__clang_minor__ == 1)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG31\r\n#\telif(__clang_major__ == 3) && (__clang_minor__ == 2)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG32\r\n#\telif(__clang_major__ == 3) && (__clang_minor__ == 3)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG33\r\n#\telif(__clang_major__ == 4) && (__clang_minor__ == 0)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG40\r\n#\telif(__clang_major__ == 4) && (__clang_minor__ == 1)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG41\r\n#\telif(__clang_major__ == 4) && (__clang_minor__ == 2)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG42\r\n#\telif(__clang_major__ == 4) && (__clang_minor__ >= 3)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG43\r\n#\telif(__clang_major__ > 4)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG50\r\n#\telse\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG\r\n#\tendif\r\n\r\n// G++ \r\n#elif(defined(__GNUC__) || defined(__MINGW32__))// || defined(__llvm__) || defined(__clang__)\r\n#\tif (__GNUC__ == 3) && (__GNUC_MINOR__ == 4)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_GCC34\r\n#\telif (__GNUC__ == 3) && (__GNUC_MINOR__ == 5)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_GCC35\r\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 0)\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC40)\r\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 1)\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC41)\r\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 2)\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC42)\r\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC43)\r\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 4)\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC44)\r\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 5)\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC45)\r\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 6)\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC46)\r\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 7)\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC47)\r\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC48)\r\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC49)\r\n#\telif (__GNUC__ > 4 )\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC49)\r\n#\telse\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC)\r\n#\tendif\r\n\r\n// Borland C++\r\n#elif defined(_BORLANDC_)\r\n#\tdefine GLM_COMPILER GLM_COMPILER_BC\r\n\r\n// Codewarrior\r\n#elif defined(__MWERKS__)\r\n#\tdefine GLM_COMPILER GLM_COMPILER_CODEWARRIOR\r\n\r\n#else\r\n#\tdefine GLM_COMPILER GLM_COMPILER_UNKNOWN\r\n#endif\r\n\r\n#ifndef GLM_COMPILER\r\n#error \"GLM_COMPILER undefined, your compiler may not be supported by GLM. Add #define GLM_COMPILER 0 to ignore this message.\"\r\n#endif//GLM_COMPILER\r\n\r\n// Report compiler detection\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_COMPILER_DISPLAYED))\r\n#\tdefine GLM_MESSAGE_COMPILER_DISPLAYED\r\n#\tif(GLM_COMPILER & GLM_COMPILER_CUDA)\r\n#\t\tpragma message(\"GLM: CUDA compiler detected\")\r\n#\telif(GLM_COMPILER & GLM_COMPILER_VC)\r\n#\t\tpragma message(\"GLM: Visual C++ compiler detected\")\r\n#\telif(GLM_COMPILER & GLM_COMPILER_CLANG)\r\n#\t\tpragma message(\"GLM: Clang compiler detected\")\r\n#\telif(GLM_COMPILER & GLM_COMPILER_LLVM_GCC)\r\n#\t\tpragma message(\"GLM: LLVM GCC compiler detected\")\r\n#\telif(GLM_COMPILER & GLM_COMPILER_INTEL)\r\n#\t\tpragma message(\"GLM: Intel Compiler detected\")\r\n#\telif(GLM_COMPILER & GLM_COMPILER_GCC)\r\n#\t\tif(GLM_COMPILER == GLM_COMPILER_GCC_LLVM)\r\n#\t\t\tpragma message(\"GLM: LLVM GCC compiler detected\")\r\n#\t\telif(GLM_COMPILER == GLM_COMPILER_GCC_CLANG)\r\n#\t\t\tpragma message(\"GLM: CLANG compiler detected\")\r\n#\t\telse\r\n#\t\t\tpragma message(\"GLM: GCC compiler detected\")\r\n#\t\tendif\r\n#\telif(GLM_COMPILER & GLM_COMPILER_BC)\r\n#\t\tpragma message(\"GLM: Borland compiler detected but not supported\")\r\n#\telif(GLM_COMPILER & GLM_COMPILER_CODEWARRIOR)\r\n#\t\tpragma message(\"GLM: Codewarrior compiler detected but not supported\")\r\n#\telse\r\n#\t\tpragma message(\"GLM: Compiler not detected\")\r\n#\tendif\r\n#endif//GLM_MESSAGE\r\n\r\n/////////////////\r\n// Build model //\r\n\r\n#if(defined(__arch64__) || defined(__LP64__) || defined(_M_X64) || defined(__ppc64__) || defined(__x86_64__))\r\n#\t\tdefine GLM_MODEL\tGLM_MODEL_64\r\n#elif(defined(__i386__) || defined(__ppc__))\r\n#\tdefine GLM_MODEL\tGLM_MODEL_32\r\n#else\r\n#\tdefine GLM_MODEL\tGLM_MODEL_32\r\n#endif//\r\n\r\n#if(!defined(GLM_MODEL) && GLM_COMPILER != 0)\r\n#\terror \"GLM_MODEL undefined, your compiler may not be supported by GLM. Add #define GLM_MODEL 0 to ignore this message.\"\r\n#endif//GLM_MODEL\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_MODEL_DISPLAYED))\r\n#\tdefine GLM_MESSAGE_MODEL_DISPLAYED\r\n#\tif(GLM_MODEL == GLM_MODEL_64)\r\n#\t\tpragma message(\"GLM: 64 bits model\")\r\n#\telif(GLM_MODEL == GLM_MODEL_32)\r\n#\t\tpragma message(\"GLM: 32 bits model\")\r\n#\tendif//GLM_MODEL\r\n#endif//GLM_MESSAGE\r\n\r\n/////////////////\r\n// C++ Version //\r\n\r\n// User defines: GLM_FORCE_CXX98\r\n\r\n#define GLM_LANG_CXX_FLAG\t\t\t(1 << 0)\r\n#define GLM_LANG_CXX98_FLAG\t\t\t(1 << 1)\r\n#define GLM_LANG_CXX03_FLAG\t\t\t(1 << 2)\r\n#define GLM_LANG_CXX0X_FLAG\t\t\t(1 << 3)\r\n#define GLM_LANG_CXX11_FLAG\t\t\t(1 << 4)\r\n#define GLM_LANG_CXX1Y_FLAG\t\t\t(1 << 5)\r\n#define GLM_LANG_CXXMS_FLAG\t\t\t(1 << 6)\r\n#define GLM_LANG_CXXGNU_FLAG\t\t(1 << 7)\r\n\r\n#define GLM_LANG_CXX\t\t\tGLM_LANG_CXX_FLAG\r\n#define GLM_LANG_CXX98\t\t\t(GLM_LANG_CXX | GLM_LANG_CXX98_FLAG)\r\n#define GLM_LANG_CXX03\t\t\t(GLM_LANG_CXX98 | GLM_LANG_CXX03_FLAG)\r\n#define GLM_LANG_CXX0X\t\t\t(GLM_LANG_CXX03 | GLM_LANG_CXX0X_FLAG)\r\n#define GLM_LANG_CXX11\t\t\t(GLM_LANG_CXX0X | GLM_LANG_CXX11_FLAG)\r\n#define GLM_LANG_CXX1Y\t\t\t(GLM_LANG_CXX11 | GLM_LANG_CXX1Y_FLAG)\r\n#define GLM_LANG_CXXMS\t\t\tGLM_LANG_CXXMS_FLAG\r\n#define GLM_LANG_CXXGNU\t\t\tGLM_LANG_CXXGNU_FLAG\r\n\r\n#if(defined(GLM_FORCE_CXX1Y))\r\n#\tdefine GLM_LANG GLM_LANG_CXX1Y\r\n#elif(defined(GLM_FORCE_CXX11))\r\n#\tdefine GLM_LANG GLM_LANG_CXX11\r\n#elif(defined(GLM_FORCE_CXX03))\r\n#\tdefine GLM_LANG GLM_LANG_CXX03\r\n#elif(defined(GLM_FORCE_CXX98))\r\n#\tdefine GLM_LANG GLM_LANG_CXX98\r\n#else\r\n#\tif(__cplusplus >= 201103L)\r\n#\t\tdefine GLM_LANG GLM_LANG_CXX11\r\n#\telif((GLM_COMPILER & GLM_COMPILER_CLANG) == GLM_COMPILER_CLANG)\r\n#\t\tif(GLM_PLATFORM == GLM_PLATFORM_APPLE)\r\n#\t\t\tdefine GLM_DETAIL_MAJOR 1\r\n#\t\telse\r\n#\t\t\tdefine GLM_DETAIL_MAJOR 0\r\n#\t\tendif\r\n#\t\tif(__clang_major__ < (2 + GLM_DETAIL_MAJOR))\r\n#\t\t\tdefine GLM_LANG GLM_LANG_CXX\r\n#\t\telif(__has_feature(cxx_auto_type))\r\n#\t\t\tdefine GLM_LANG GLM_LANG_CXX0X\r\n#\t\telse\r\n#\t\t\tdefine GLM_LANG GLM_LANG_CXX98\r\n#\t\tendif\r\n#\telif((GLM_COMPILER & GLM_COMPILER_GCC) == GLM_COMPILER_GCC)\r\n#\t\tif defined(__GXX_EXPERIMENTAL_CXX0X__)\r\n#\t\t\tdefine GLM_LANG GLM_LANG_CXX0X\r\n#\t\telse\r\n#\t\t\tdefine GLM_LANG GLM_LANG_CXX98\r\n#\t\tendif\r\n#\telif(GLM_COMPILER & GLM_COMPILER_VC)\r\n#\t\tif(defined(_MSC_EXTENSIONS))\r\n#\t\t\tif(GLM_COMPILER >= GLM_COMPILER_VC10)\r\n#\t\t\t\tdefine GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG)\r\n#\t\t\telse\r\n#\t\t\t\tdefine GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG)\r\n#\t\t\tendif\r\n#\t\telse\r\n#\t\t\tif(GLM_COMPILER >= GLM_COMPILER_VC10)\r\n#\t\t\t\tdefine GLM_LANG GLM_LANG_CXX0X\r\n#\t\t\telse\r\n#\t\t\t\tdefine GLM_LANG GLM_LANG_CXX98\r\n#\t\t\tendif\r\n#\t\tendif\r\n#\telif(GLM_COMPILER & GLM_COMPILER_INTEL)\r\n#\t\tif(defined(_MSC_EXTENSIONS))\r\n#\t\t\tif(GLM_COMPILER >= GLM_COMPILER_INTEL13_0)\r\n#\t\t\t\tdefine GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG)\r\n#\t\t\telse\r\n#\t\t\t\tdefine GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG)\r\n#\t\t\tendif\r\n#\t\telse\r\n#\t\t\tif(GLM_COMPILER >= GLM_COMPILER_INTEL13_0)\r\n#\t\t\t\tdefine GLM_LANG (GLM_LANG_CXX0X)\r\n#\t\t\telse\r\n#\t\t\t\tdefine GLM_LANG (GLM_LANG_CXX98)\r\n#\t\t\tendif\r\n#\t\tendif\r\n#\telif(__cplusplus >= 199711L)\r\n#\t\tdefine GLM_LANG GLM_LANG_CXX98\r\n#\telse\r\n#\t\tdefine GLM_LANG GLM_LANG_CXX\r\n#\tendif\r\n#endif\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_LANG_DISPLAYED))\r\n#\tdefine GLM_MESSAGE_LANG_DISPLAYED\r\n#\tif(GLM_LANG & GLM_LANG_CXXGNU_FLAG)\r\n#\t\tpragma message(\"GLM: C++ with language extensions\")\r\n#\telif(GLM_LANG & GLM_LANG_CXXMS_FLAG)\r\n#\t\tpragma message(\"GLM: C++ with language extensions\")\r\n#\telif(GLM_LANG & GLM_LANG_CXX11_FLAG)\r\n#\t\tpragma message(\"GLM: C++11\")\r\n#\telif(GLM_LANG & GLM_LANG_CXX0X_FLAG)\r\n#\t\tpragma message(\"GLM: C++0x\")\r\n#\telif(GLM_LANG & GLM_LANG_CXX03_FLAG)\r\n#\t\tpragma message(\"GLM: C++03\")\r\n#\telif(GLM_LANG & GLM_LANG_CXX98_FLAG)\r\n#\t\tpragma message(\"GLM: C++98\")\r\n#\telse\r\n#\t\tpragma message(\"GLM: C++ language undetected\")\r\n#\tendif//GLM_MODEL\r\n#\tpragma 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\")\r\n#endif//GLM_MESSAGE\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Has of C++ features\r\n\r\n#ifndef __has_feature\r\n#\tdefine __has_feature(x) 0  // Compatibility with non-clang compilers.\r\n#endif\r\n#ifndef __has_extension\r\n#\tdefine __has_extension __has_feature // Compatibility with pre-3.0 compilers.\r\n#endif\r\n\r\n// http://clang.llvm.org/cxx_status.html\r\n// http://gcc.gnu.org/projects/cxx0x.html\r\n// http://msdn.microsoft.com/en-us/library/vstudio/hh567368(v=vs.120).aspx\r\n\r\n// N1720\r\n#define GLM_HAS_STATIC_ASSERT ( \\\r\n\t(GLM_LANG & GLM_LANG_CXX11_FLAG) || \\\r\n\t((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC10)) || \\\r\n\t((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \\\r\n\t__has_feature(cxx_static_assert))\r\n\r\n// N1988\r\n#define GLM_HAS_EXTENDED_INTEGER_TYPE ( \\\r\n\t(GLM_LANG & GLM_LANG_CXX11_FLAG) || \\\r\n\t((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC11)) || \\\r\n\t((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \\\r\n\t((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_CLANG) && (GLM_COMPILER >= GLM_COMPILER_CLANG29)))\r\n\r\n// N2235\r\n#define GLM_HAS_CONSTEXPR ( \\\r\n\t(GLM_LANG & GLM_LANG_CXX11_FLAG) || \\\r\n\t((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)) || \\\r\n\t__has_feature(cxx_constexpr))\r\n\r\n// N2672\r\n#define GLM_HAS_INITIALIZER_LISTS ( \\\r\n\t(GLM_LANG & GLM_LANG_CXX11_FLAG) || \\\r\n\t((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12))) || \\\r\n\t((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC44)) || \\\r\n\t__has_feature(cxx_generalized_initializers))\r\n\r\n// OpenMP\r\n#ifdef _OPENMP \r\n#\tif(GLM_COMPILER & GLM_COMPILER_GCC)\r\n#\t\tif(GLM_COMPILER > GLM_COMPILER_GCC47)\r\n#\t\t\tdefine GLM_HAS_OPENMP 31\r\n#\t\telif(GLM_COMPILER > GLM_COMPILER_GCC44)\r\n#\t\t\tdefine GLM_HAS_OPENMP 30\r\n#\t\telif(GLM_COMPILER > GLM_COMPILER_GCC42)\r\n#\t\t\tdefine GLM_HAS_OPENMP 25\r\n#\t\tendif\r\n#\tendif//(GLM_COMPILER & GLM_COMPILER_GCC)\r\n\r\n#\tif(GLM_COMPILER & GLM_COMPILER_VC)\r\n#\t\tif(GLM_COMPILER > GLM_COMPILER_VC8)\r\n#\t\t\tdefine GLM_HAS_OPENMP 20\r\n#\t\tendif\r\n#\tendif//(GLM_COMPILER & GLM_COMPILER_GCC)\r\n#endif\r\n\r\n// Not standard\r\n#define GLM_HAS_ANONYMOUS_UNION (GLM_LANG & GLM_LANG_CXXMS_FLAG)\r\n\r\n/////////////////\r\n// Platform \r\n\r\n// User defines: GLM_FORCE_PURE GLM_FORCE_SSE2 GLM_FORCE_AVX\r\n\r\n#define GLM_ARCH_PURE\t\t0x0000\r\n#define GLM_ARCH_SSE2\t\t0x0001\r\n#define GLM_ARCH_SSE3\t\t0x0002// | GLM_ARCH_SSE2\r\n#define GLM_ARCH_SSE4\t\t0x0004// | GLM_ARCH_SSE3 | GLM_ARCH_SSE2\r\n#define GLM_ARCH_AVX\t\t0x0008// | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2\r\n#define GLM_ARCH_AVX2\t\t0x0010// | GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2\r\n\r\n#if(defined(GLM_FORCE_PURE))\r\n#\tdefine GLM_ARCH GLM_ARCH_PURE\r\n#elif(defined(GLM_FORCE_AVX2))\r\n#\tdefine GLM_ARCH (GLM_ARCH_AVX2 | GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\r\n#elif(defined(GLM_FORCE_AVX))\r\n#\tdefine GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\r\n#elif(defined(GLM_FORCE_SSE4))\r\n#\tdefine GLM_ARCH (GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\r\n#elif(defined(GLM_FORCE_SSE3))\r\n#\tdefine GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\r\n#elif(defined(GLM_FORCE_SSE2))\r\n#\tdefine GLM_ARCH (GLM_ARCH_SSE2)\r\n#elif((GLM_COMPILER & GLM_COMPILER_VC) && (defined(_M_IX86) || defined(_M_X64)))\r\n#\tif(GLM_PLATFORM == GLM_PLATFORM_WINCE)\r\n#\t\tdefine GLM_ARCH GLM_ARCH_PURE\r\n#\telif(defined(_M_CEE_PURE))\r\n#\t\tdefine GLM_ARCH GLM_ARCH_PURE\r\n/* TODO: Explore auto detection of instruction set support\r\n#\telif(defined(_M_IX86_FP))\r\n#\t\tif(_M_IX86_FP >= 3)\r\n#\t\t\tdefine GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\r\n#\t\telif(_M_IX86_FP >= 2)\r\n#\t\t\tdefine GLM_ARCH (GLM_ARCH_SSE2)\r\n#\t\telse\r\n#\t\t\tdefine GLM_ARCH GLM_ARCH_PURE\r\n#\t\tendif\r\n*/\r\n#\telif(GLM_COMPILER >= GLM_COMPILER_VC11)\r\n#\t\tdefine GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\r\n#\telif(GLM_COMPILER >= GLM_COMPILER_VC10)\r\n#\t\tif(_MSC_FULL_VER >= 160031118) //160031118: VC2010 SP1 beta full version\r\n#\t\t\tdefine GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)//GLM_ARCH_AVX (Require SP1)\r\n#\t\telse\r\n#\t\t\tdefine GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\r\n#\t\tendif\r\n#\telif(GLM_COMPILER >= GLM_COMPILER_VC9) \r\n#\t\tdefine GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\r\n#\telif(GLM_COMPILER >= GLM_COMPILER_VC8)\r\n#\t\tdefine GLM_ARCH GLM_ARCH_SSE2\r\n#\telse\r\n#\t\tdefine GLM_ARCH GLM_ARCH_PURE\r\n#\tendif\r\n#elif((GLM_PLATFORM & GLM_PLATFORM_APPLE) && (GLM_COMPILER & GLM_COMPILER_GCC))\r\n#\tdefine GLM_ARCH GLM_ARCH_PURE\r\n#elif(((GLM_COMPILER & GLM_COMPILER_GCC) && (defined(__i386__) || defined(__x86_64__))) || (GLM_COMPILER & GLM_COMPILER_LLVM_GCC))\r\n#\tdefine GLM_ARCH (GLM_ARCH_PURE \\\r\n| (defined(__AVX2__) ? GLM_ARCH_AVX2 : 0) \\\r\n| (defined(__AVX__) ? GLM_ARCH_AVX : 0) \\\r\n| (defined(__SSE4__) ? GLM_ARCH_SSE4 : 0) \\\r\n| (defined(__SSE3__) ? GLM_ARCH_SSE3 : 0) \\\r\n| (defined(__SSE2__) ? GLM_ARCH_SSE2 : 0))\r\n#else\r\n#\tdefine GLM_ARCH GLM_ARCH_PURE\r\n#endif\r\n\r\n// With MinGW-W64, including intrinsic headers before intrin.h will produce some errors. The problem is\r\n// that windows.h (and maybe other headers) will silently include intrin.h, which of course causes problems.\r\n// To fix, we just explicitly include intrin.h here.\r\n#if defined(__MINGW32__) && (GLM_ARCH != GLM_ARCH_PURE)\r\n#\tinclude <intrin.h>\r\n#endif\r\n\r\n//#if(GLM_ARCH != GLM_ARCH_PURE)\r\n#if(GLM_ARCH & GLM_ARCH_AVX2)\r\n#\tinclude <immintrin.h>\r\n#endif//GLM_ARCH\r\n#if(GLM_ARCH & GLM_ARCH_AVX)\r\n#\tinclude <immintrin.h>\r\n#endif//GLM_ARCH\r\n#if(GLM_ARCH & GLM_ARCH_SSE4)\r\n#\tinclude <smmintrin.h>\r\n#endif//GLM_ARCH\r\n#if(GLM_ARCH & GLM_ARCH_SSE3)\r\n#\tinclude <pmmintrin.h>\r\n#endif//GLM_ARCH\r\n#if(GLM_ARCH & GLM_ARCH_SSE2)\r\n#\tinclude <emmintrin.h>\r\n#\tif(GLM_COMPILER == GLM_COMPILER_VC8) // VC8 is missing some intrinsics, workaround\r\n\t\tinline float _mm_cvtss_f32(__m128 A) { return A.m128_f32[0]; }\r\n\t\tinline __m128 _mm_castpd_ps(__m128d PD) { union { __m128 ps; __m128d pd; } c; c.pd = PD; return c.ps; }\r\n\t\tinline __m128d _mm_castps_pd(__m128 PS) { union { __m128 ps; __m128d pd; } c; c.ps = PS; return c.pd; }\r\n\t\tinline __m128i _mm_castps_si128(__m128 PS) { union { __m128 ps; __m128i pi; } c; c.ps = PS; return c.pi; }\r\n\t\tinline __m128 _mm_castsi128_ps(__m128i PI) { union { __m128 ps; __m128i pi; } c; c.pi = PI; return c.ps; }\r\n#\tendif\r\n#endif//GLM_ARCH\r\n//#endif//(GLM_ARCH != GLM_ARCH_PURE)\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_ARCH_DISPLAYED))\r\n#\tdefine GLM_MESSAGE_ARCH_DISPLAYED\r\n#\tif(GLM_ARCH == GLM_ARCH_PURE)\r\n#\t\tpragma message(\"GLM: Platform independent code\")\r\n#\telif(GLM_ARCH & GLM_ARCH_SSE2)\r\n#\t\tpragma message(\"GLM: SSE2 instruction set\")\r\n#\telif(GLM_ARCH & GLM_ARCH_SSE3)\r\n#\t\tpragma message(\"GLM: SSE3 instruction set\")\r\n#\telif(GLM_ARCH & GLM_ARCH_SSE4)\r\n#\t\tpragma message(\"GLM: SSE4 instruction set\")\r\n#\telif(GLM_ARCH & GLM_ARCH_AVX)\r\n#\t\tpragma message(\"GLM: AVX instruction set\")\r\n#\telif(GLM_ARCH & GLM_ARCH_AVX2)\r\n#\t\tpragma message(\"GLM: AVX2 instruction set\")\r\n#\tendif//GLM_ARCH\r\n#\tpragma message(\"GLM: #define GLM_FORCE_PURE to avoid using platform specific instruction sets\")\r\n#endif//GLM_MESSAGE\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Radians\r\n\r\n//#define GLM_FORCE_RADIANS\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Static assert\r\n\r\n#if GLM_HAS_STATIC_ASSERT\r\n#\tdefine GLM_STATIC_ASSERT(x, message) static_assert(x, message)\r\n#elif(defined(BOOST_STATIC_ASSERT))\r\n#\tdefine GLM_STATIC_ASSERT(x, message) BOOST_STATIC_ASSERT(x)\r\n#elif(GLM_COMPILER & GLM_COMPILER_VC)\r\n#\tdefine GLM_STATIC_ASSERT(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1]\r\n#else\r\n#\tdefine GLM_STATIC_ASSERT(x, message)\r\n#\tdefine GLM_STATIC_ASSERT_NULL\r\n#endif//GLM_LANG\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Qualifiers \r\n\r\n// User defines: GLM_FORCE_INLINE GLM_FORCE_CUDA\r\n\r\n#if(defined(GLM_FORCE_CUDA) || (GLM_COMPILER & GLM_COMPILER_CUDA))\r\n#\tdefine GLM_CUDA_FUNC_DEF __device__ __host__ \r\n#\tdefine GLM_CUDA_FUNC_DECL __device__ __host__ \r\n#else\r\n#\tdefine GLM_CUDA_FUNC_DEF\r\n#\tdefine GLM_CUDA_FUNC_DECL\r\n#endif\r\n\r\n#if GLM_COMPILER & GLM_COMPILER_GCC\r\n#\tdefine GLM_VAR_USED __attribute__ ((unused))\r\n#else\r\n#\tdefine GLM_VAR_USED\r\n#endif\r\n\r\n#if(defined(GLM_FORCE_INLINE))\r\n#\tif((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC8))\r\n#\t\tdefine GLM_INLINE __forceinline\r\n#\telif((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC34))\r\n#\t\tdefine GLM_INLINE __attribute__((always_inline)) inline\r\n#\telif(GLM_COMPILER & GLM_COMPILER_CLANG)\r\n#\t\tdefine GLM_INLINE __attribute__((always_inline))\r\n#\telse\r\n#\t\tdefine GLM_INLINE inline\r\n#\tendif//GLM_COMPILER\r\n#else\r\n#\tdefine GLM_INLINE inline\r\n#endif//defined(GLM_FORCE_INLINE)\r\n\r\n#define GLM_FUNC_DECL GLM_CUDA_FUNC_DECL\r\n#define GLM_FUNC_QUALIFIER GLM_CUDA_FUNC_DEF GLM_INLINE\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Swizzle operators\r\n\r\n// User defines: GLM_SWIZZLE\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_SWIZZLE_DISPLAYED))\r\n#\tdefine GLM_MESSAGE_SWIZZLE_DISPLAYED\r\n#\tif defined(GLM_SWIZZLE)\r\n#\t\tpragma message(\"GLM: Swizzling operators enabled\")\r\n#\telse\r\n#\t\tpragma message(\"GLM: Swizzling operators disabled, #define GLM_SWIZZLE to enable swizzle operators\")\r\n#\tendif\r\n#endif//GLM_MESSAGE\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Length type\r\n\r\n// User defines: GLM_FORCE_SIZE_T_LENGTH\r\n\r\nnamespace glm\r\n{\r\n#if defined(GLM_FORCE_SIZE_T_LENGTH)\r\n\ttypedef std::size_t length_t;\r\n#else\r\n\ttypedef int length_t;\r\n#endif\r\n}//namespace glm\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_FORCE_SIZE_T_LENGTH))\r\n#\tdefine GLM_MESSAGE_FORCE_SIZE_T_LENGTH\r\n#\tif defined(GLM_FORCE_SIZE_T_LENGTH)\r\n#\t\tpragma message(\"GLM: .length() returns glm::length_t, a typedef of std::size_t\")\r\n#\telse\r\n#\t\tpragma message(\"GLM: .length() returns glm::length_t, a typedef of int following the GLSL specification\")\r\n#\t\tpragma message(\"GLM: #define GLM_FORCE_SIZE_T_LENGTH for .length() to return a std::size_t\")\r\n#\tendif\r\n#endif//GLM_MESSAGE\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Qualifiers\r\n\r\n#if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC8))\r\n#\tdefine GLM_DEPRECATED __declspec(deprecated)\r\n#\tdefine GLM_ALIGN(x) __declspec(align(x))\r\n#\tdefine GLM_ALIGNED_STRUCT(x) __declspec(align(x)) struct\r\n#\tdefine GLM_RESTRICT __declspec(restrict)\r\n#\tdefine GLM_RESTRICT_VAR __restrict\r\n#elif(GLM_COMPILER & GLM_COMPILER_INTEL)\r\n#\tdefine GLM_DEPRECATED\r\n#\tdefine GLM_ALIGN(x) __declspec(align(x))\r\n#\tdefine GLM_ALIGNED_STRUCT(x) __declspec(align(x)) struct\r\n#\tdefine GLM_RESTRICT\r\n#\tdefine GLM_RESTRICT_VAR __restrict\r\n#elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG))\r\n#\tdefine GLM_DEPRECATED __attribute__((__deprecated__))\r\n#\tdefine GLM_ALIGN(x) __attribute__((aligned(x)))\r\n#\tdefine GLM_ALIGNED_STRUCT(x) struct __attribute__((aligned(x)))\r\n#\tdefine GLM_RESTRICT __restrict__\r\n#\tdefine GLM_RESTRICT_VAR __restrict__\r\n#else\r\n#\tdefine GLM_DEPRECATED\r\n#\tdefine GLM_ALIGN\r\n#\tdefine GLM_ALIGNED_STRUCT(x)\r\n#\tdefine GLM_RESTRICT\r\n#\tdefine GLM_RESTRICT_VAR\r\n#endif//GLM_COMPILER\r\n\r\n#if GLM_HAS_CONSTEXPR\r\n#\tdefine GLM_CONSTEXPR constexpr\r\n#else\r\n#\tdefine GLM_CONSTEXPR\r\n#endif\r\n\r\n#endif//GLM_SETUP_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/detail/type_float.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_float.hpp\r\n/// @date 2008-08-22 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_float\r\n#define glm_core_type_float\r\n\r\n#include \"setup.hpp\"\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttypedef float\t\t\t\tfloat32;\r\n\ttypedef double\t\t\t\tfloat64;\r\n}//namespace detail\r\n\t\r\n\ttypedef float\t\t\t\tlowp_float_t;\r\n\ttypedef float\t\t\t\tmediump_float_t;\r\n\ttypedef double\t\t\t\thighp_float_t;\r\n\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\r\n\t/// Low precision floating-point numbers. \r\n\t/// There is no guarantee on the actual precision.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.4 Floats</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef lowp_float_t\t\tlowp_float;\r\n\r\n\t/// Medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.4 Floats</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef mediump_float_t\t\tmediump_float;\r\n\r\n\t/// High precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.4 Floats</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef highp_float_t\t\thighp_float;\r\n\r\n#if(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef mediump_float\t\tfloat_t;\r\n#elif(defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef highp_float\t\t\tfloat_t;\r\n#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef mediump_float\t\tfloat_t;\r\n#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef lowp_float\t\t\tfloat_t;\r\n#else\r\n#\terror \"GLM error: multiple default precision requested for floating-point types\"\r\n#endif\r\n\r\n\ttypedef float\t\t\t\tfloat32;\r\n\ttypedef double\t\t\t\tfloat64;\r\n\r\n////////////////////\r\n// check type sizes\r\n#ifndef GLM_STATIC_ASSERT_NULL\r\n\tGLM_STATIC_ASSERT(sizeof(glm::float32) == 4, \"float32 size isn't 4 bytes on this platform\");\r\n\tGLM_STATIC_ASSERT(sizeof(glm::float64) == 8, \"float64 size isn't 8 bytes on this platform\");\r\n#endif//GLM_STATIC_ASSERT_NULL\r\n\r\n\t/// @}\r\n\r\n}//namespace glm\r\n\r\n#endif//glm_core_type_float\r\n"
  },
  {
    "path": "cpu/glm/detail/type_gentype.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_gentype.hpp\r\n/// @date 2008-10-05 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_gentype\r\n#define glm_core_type_gentype\r\n\r\nnamespace glm\r\n{\r\n\tenum profile\r\n\t{\r\n\t\tnice,\r\n\t\tfast,\r\n\t\tsimd\r\n\t};\r\n\r\n\ttypedef std::size_t sizeType;\r\n\t\r\nnamespace detail\r\n{\r\n\ttemplate\r\n\t<\r\n\t\ttypename VALTYPE, \r\n\t\ttemplate <typename> class TYPE\r\n\t>\r\n\tstruct genType\r\n\t{\r\n\tpublic:\r\n\t\tenum ctor{null};\r\n\r\n\t\ttypedef VALTYPE value_type;\r\n\t\ttypedef VALTYPE & value_reference;\r\n\t\ttypedef VALTYPE * value_pointer;\r\n\t\ttypedef VALTYPE const * value_const_pointer;\r\n\t\ttypedef TYPE<bool> bool_type;\r\n\r\n\t\ttypedef sizeType size_type;\r\n\t\tstatic bool is_vector();\r\n\t\tstatic bool is_matrix();\r\n\t\t\r\n\t\ttypedef TYPE<VALTYPE> type;\r\n\t\ttypedef TYPE<VALTYPE> * pointer;\r\n\t\ttypedef TYPE<VALTYPE> const * const_pointer;\r\n\t\ttypedef TYPE<VALTYPE> const * const const_pointer_const;\r\n\t\ttypedef TYPE<VALTYPE> * const pointer_const;\r\n\t\ttypedef TYPE<VALTYPE> & reference;\r\n\t\ttypedef TYPE<VALTYPE> const & const_reference;\r\n\t\ttypedef TYPE<VALTYPE> const & param_type;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Address (Implementation details)\r\n\r\n\t\tvalue_const_pointer value_address() const{return value_pointer(this);}\r\n\t\tvalue_pointer value_address(){return value_pointer(this);}\r\n\r\n\t//protected:\r\n\t//\tenum kind\r\n\t//\t{\r\n\t//\t\tGEN_TYPE,\r\n\t//\t\tVEC_TYPE,\r\n\t//\t\tMAT_TYPE\r\n\t//\t};\r\n\r\n\t//\ttypedef typename TYPE::kind kind;\r\n\t};\r\n\r\n\ttemplate\r\n\t<\r\n\t\ttypename VALTYPE, \r\n\t\ttemplate <typename> class TYPE\r\n\t>\r\n\tbool genType<VALTYPE, TYPE>::is_vector()\r\n\t{\r\n\t\treturn true;\r\n\t}\r\n/*\r\n\ttemplate <typename valTypeT, unsigned int colT, unsigned int rowT, profile proT = nice>\r\n\tclass base\r\n\t{\r\n\tpublic:\r\n\t\t//////////////////////////////////////\r\n\t\t// Traits\r\n\r\n\t\ttypedef sizeType\t\t\t\t\t\t\tsize_type;\r\n\t\ttypedef valTypeT\t\t\t\t\t\t\tvalue_type;\r\n\r\n\t\ttypedef base<value_type, colT, rowT>\t\tclass_type;\r\n\r\n\t\ttypedef base<bool, colT, rowT>\t\t\t\tbool_type;\r\n\t\ttypedef base<value_type, rowT, 1>\t\t\tcol_type;\r\n\t\ttypedef base<value_type, colT, 1>\t\t\trow_type;\r\n\t\ttypedef base<value_type, rowT, colT>\t\ttranspose_type;\r\n\r\n\t\tstatic size_type\t\t\t\t\t\t\tcol_size();\r\n\t\tstatic size_type\t\t\t\t\t\t\trow_size();\r\n\t\tstatic size_type\t\t\t\t\t\t\tvalue_size();\r\n\t\tstatic bool\t\t\t\t\t\t\t\t\tis_scalar();\r\n\t\tstatic bool\t\t\t\t\t\t\t\t\tis_vector();\r\n\t\tstatic bool\t\t\t\t\t\t\t\t\tis_matrix();\r\n\r\n\tprivate:\r\n\t\t// Data \r\n\t\tcol_type value[colT];\t\t\r\n\r\n\tpublic:\r\n\t\t//////////////////////////////////////\r\n\t\t// Constructors\r\n\t\tbase();\r\n\t\tbase(class_type const & m);\r\n\r\n\t\texplicit base(T const & x);\r\n\t\texplicit base(value_type const * const x);\r\n\t\texplicit base(col_type const * const x);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversions\r\n\t\ttemplate <typename vU, uint cU, uint rU, profile pU>\r\n\t\texplicit base(base<vU, cU, rU, pU> const & m);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Accesses\r\n\t\tcol_type& operator[](size_type i);\r\n\t\tcol_type const & operator[](size_type i) const;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Unary updatable operators\r\n\t\tclass_type& operator=  (class_type const & x);\r\n\t\tclass_type& operator+= (T const & x);\r\n\t\tclass_type& operator+= (class_type const & x);\r\n\t\tclass_type& operator-= (T const & x);\r\n\t\tclass_type& operator-= (class_type const & x);\r\n\t\tclass_type& operator*= (T const & x);\r\n\t\tclass_type& operator*= (class_type const & x);\r\n\t\tclass_type& operator/= (T const & x);\r\n\t\tclass_type& operator/= (class_type const & x);\r\n\t\tclass_type& operator++ ();\r\n\t\tclass_type& operator-- ();\r\n\t};\r\n*/\r\n\t\r\n\t//template <typename T>\r\n\t//struct traits\r\n\t//{\r\n\t//\tstatic const bool is_signed = false;\r\n\t//\tstatic const bool is_float = false;\r\n\t//\tstatic const bool is_vector = false;\r\n\t//\tstatic const bool is_matrix = false;\r\n\t//\tstatic const bool is_genType = false;\r\n\t//\tstatic const bool is_genIType = false;\r\n\t//\tstatic const bool is_genUType = false;\r\n\t//};\r\n\t\r\n\t//template <>\r\n\t//struct traits<half>\r\n\t//{\r\n\t//\tstatic const bool is_float = true;\r\n\t//\tstatic const bool is_genType = true;\r\n\t//};\r\n\t\r\n\t//template <>\r\n\t//struct traits<float>\r\n\t//{\r\n\t//\tstatic const bool is_float = true;\r\n\t//\tstatic const bool is_genType = true;\r\n\t//};\r\n\t\r\n\t//template <>\r\n\t//struct traits<double>\r\n\t//{\r\n\t//\tstatic const bool is_float = true;\r\n\t//\tstatic const bool is_genType = true;\r\n\t//};\r\n\t\r\n\t//template <typename genType>\r\n\t//struct desc\r\n\t//{\r\n\t//\ttypedef genType\t\t\t\t\t\t\ttype;\r\n\t//\ttypedef genType *\t\t\t\t\t\tpointer;\r\n\t//\ttypedef genType const*\t\t\t\t\tconst_pointer;\r\n\t//\ttypedef genType const *const\t\t\tconst_pointer_const;\r\n\t//\ttypedef genType *const\t\t\t\t\tpointer_const;\r\n\t//\ttypedef genType &\t\t\t\t\t\treference;\r\n\t//\ttypedef genType const&\t\t\t\t\tconst_reference;\r\n\t//\ttypedef genType const&\t\t\t\t\tparam_type;\r\n\t\r\n\t//\ttypedef typename genType::value_type\tvalue_type;\r\n\t//\ttypedef typename genType::size_type\t\tsize_type;\r\n\t//\tstatic const typename size_type\t\t\tvalue_size;\r\n\t//};\r\n\t\r\n\t//template <typename genType>\r\n\t//const typename desc<genType>::size_type desc<genType>::value_size = genType::value_size();\r\n\t\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n//#include \"type_gentype.inl\"\r\n\r\n#endif//glm_core_type_gentype\r\n"
  },
  {
    "path": "cpu/glm/detail/type_gentype.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_gentype.inl\r\n/// @date 2008-10-05 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail{\r\n\r\n/////////////////////////////////\r\n// Static functions\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::size_type base<vT, cT, rT, pT>::col_size()\r\n{\r\n\treturn cT;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::size_type base<vT, cT, rT, pT>::row_size()\r\n{\r\n\treturn rT;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::size_type base<vT, cT, rT, pT>::value_size()\r\n{\r\n\treturn rT * cT;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\nbool base<vT, cT, rT, pT>::is_scalar()\r\n{\r\n\treturn rT == 1 && cT == 1;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\nbool base<vT, cT, rT, pT>::is_vector()\r\n{\r\n\treturn rT == 1;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\nbool base<vT, cT, rT, pT>::is_matrix()\r\n{\r\n\treturn rT != 1;\r\n}\r\n\r\n/////////////////////////////////\r\n// Constructor\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\nbase<vT, cT, rT, pT>::base()\r\n{\r\n\tmemset(&this->value, 0, cT * rT * sizeof(vT));\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\nbase<vT, cT, rT, pT>::base\r\n(\r\n\ttypename base<vT, cT, rT, pT>::class_type const & m\r\n)\r\n{\r\n\tfor\r\n\t(\r\n\t\ttypename genType<vT, cT, rT, pT>::size_type i = typename base<vT, cT, rT, pT>::size_type(0);\r\n\t\ti < base<vT, cT, rT, pT>::col_size();\r\n\t\t++i\r\n\t)\r\n\t{\r\n\t\tthis->value[i] = m[i];\r\n\t}\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\nbase<vT, cT, rT, pT>::base\r\n(\r\n\ttypename base<vT, cT, rT, pT>::T const & x\r\n)\r\n{\r\n\tif(rT == 1) // vector\r\n\t{\r\n\t\tfor\r\n\t\t(\r\n\t\t\ttypename base<vT, cT, rT, pT>::size_type i = typename base<vT, cT, rT, pT>::size_type(0);\r\n\t\t\ti < base<vT, cT, rT, pT>::col_size();\r\n\t\t\t++i\r\n\t\t)\r\n\t\t{\r\n\t\t\tthis->value[i][rT] = x;\r\n\t\t}\r\n\t}\r\n\telse // matrix\r\n\t{\r\n\t\tmemset(&this->value, 0, cT * rT * sizeof(vT));\r\n\r\n\t\ttypename base<vT, cT, rT, pT>::size_type stop = cT < rT ? cT : rT;\r\n\r\n\t\tfor\r\n\t\t(\r\n\t\t\ttypename base<vT, cT, rT, pT>::size_type i = typename base<vT, cT, rT, pT>::size_type(0);\r\n\t\t\ti < stop;\r\n\t\t\t++i\r\n\t\t)\r\n\t\t{\r\n\t\t\tthis->value[i][i] = x;\r\n\t\t}\r\n\t}\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\nbase<vT, cT, rT, pT>::base\r\n(\r\n\ttypename base<vT, cT, rT, pT>::value_type const * const x\r\n)\r\n{\r\n\tmemcpy(&this->value, &x.value, cT * rT * sizeof(vT));\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\nbase<vT, cT, rT, pT>::base\r\n(\r\n\ttypename base<vT, cT, rT, pT>::col_type const * const x\r\n)\r\n{\r\n\tfor\r\n\t(\r\n\t\ttypename base<vT, cT, rT, pT>::size_type i = typename base<vT, cT, rT, pT>::size_type(0);\r\n\t\ti < base<vT, cT, rT, pT>::col_size();\r\n\t\t++i\r\n\t)\r\n\t{\r\n\t\tthis->value[i] = x[i];\r\n\t}\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntemplate <typename vU, uint cU, uint rU, profile pU>\r\nbase<vT, cT, rT, pT>::base\r\n(\r\n\tbase<vU, cU, rU, pU> const & m\r\n)\r\n{\r\n\tfor\r\n\t(\r\n\t\ttypename base<vT, cT, rT, pT>::size_type i = typename base<vT, cT, rT, pT>::size_type(0);\r\n\t\ti < base<vT, cT, rT, pT>::col_size();\r\n\t\t++i\r\n\t)\r\n\t{\r\n\t\tthis->value[i] = base<vT, cT, rT, pT>(m[i]);\r\n\t}\r\n}\r\n\r\n//////////////////////////////////////\r\n// Accesses\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::col_type& base<vT, cT, rT, pT>::operator[]\r\n(\r\n\ttypename base<vT, cT, rT, pT>::size_type i\r\n)\r\n{\r\n\treturn this->value[i];\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::col_type const & base<vT, cT, rT, pT>::operator[]\r\n(\r\n\ttypename base<vT, cT, rT, pT>::size_type i\r\n) const\r\n{\r\n\treturn this->value[i];\r\n}\r\n\r\n//////////////////////////////////////\r\n// Unary updatable operators\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator= \r\n(\r\n\ttypename base<vT, cT, rT, pT>::class_type const & x\r\n)\r\n{\r\n\tmemcpy(&this->value, &x.value, cT * rT * sizeof(vT));\r\n\treturn *this;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator+= \r\n(\r\n\ttypename base<vT, cT, rT, pT>::T const & x\r\n)\r\n{\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();\r\n\r\n\tfor(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)\r\n\tfor(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)\r\n\t\tthis->value[j][i] += x;\r\n\r\n\treturn *this;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator+= \r\n(\r\n\ttypename base<vT, cT, rT, pT>::class_type const & x\r\n)\r\n{\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();\r\n\r\n\tfor(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)\r\n\tfor(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)\r\n\t\tthis->value[j][i] += x[j][i];\r\n\r\n\treturn *this;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator-= \r\n(\r\n\ttypename base<vT, cT, rT, pT>::T const & x\r\n)\r\n{\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();\r\n\r\n\tfor(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)\r\n\tfor(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)\r\n\t\tthis->value[j][i] -= x;\r\n\r\n\treturn *this;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator-= \r\n(\r\n\ttypename base<vT, cT, rT, pT>::class_type const & x\r\n)\r\n{\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();\r\n\r\n\tfor(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)\r\n\tfor(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)\r\n\t\tthis->value[j][i] -= x[j][i];\r\n\r\n\treturn *this;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator*= \r\n(\r\n\ttypename base<vT, cT, rT, pT>::T const & x\r\n)\r\n{\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();\r\n\r\n\tfor(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)\r\n\tfor(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)\r\n\t\tthis->value[j][i] *= x;\r\n\r\n\treturn *this;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator*= \r\n(\r\n\ttypename base<vT, cT, rT, pT>::class_type const & x\r\n)\r\n{\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();\r\n\r\n\tfor(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)\r\n\tfor(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)\r\n\t\tthis->value[j][i] *= x[j][i];\r\n\r\n\treturn *this;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator/= \r\n(\r\n\ttypename base<vT, cT, rT, pT>::T const & x\r\n)\r\n{\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();\r\n\r\n\tfor(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)\r\n\tfor(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)\r\n\t\tthis->value[j][i] /= x;\r\n\r\n\treturn *this;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator/= \r\n(\r\n\ttypename base<vT, cT, rT, pT>::class_type const & x\r\n)\r\n{\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();\r\n\r\n\tfor(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)\r\n\tfor(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)\r\n\t\tthis->value[j][i] /= x[j][i];\r\n\r\n\treturn *this;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator++ ()\r\n{\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_col = col_size();\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_row = row_size();\r\n\r\n\tfor(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)\r\n\tfor(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)\r\n\t\t++this->value[j][i];\r\n\r\n\treturn *this;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator-- ()\r\n{\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_col = col_size();\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_row = row_size();\r\n\r\n\tfor(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)\r\n\tfor(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)\r\n\t\t--this->value[j][i];\r\n\r\n\treturn *this;\r\n}\r\n\r\n} //namespace detail\r\n} //namespace glm\r\n"
  },
  {
    "path": "cpu/glm/detail/type_half.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_half.hpp\r\n/// @date 2008-08-17 / 2011-09-20\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_half\r\n#define glm_core_type_half\r\n\r\n#include \"setup.hpp\"\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttypedef short hdata;\r\n\r\n\tGLM_FUNC_DECL float toFloat32(hdata value);\r\n\tGLM_FUNC_DECL hdata toFloat16(float const & value);\r\n\r\n}//namespace detail\r\n\r\n\t/// half-precision floating-point numbers.\r\n\t//typedef detail::hdata\t\thalf;\r\n\t\t\r\n}//namespace glm\r\n\r\n#include \"type_half.inl\"\r\n\r\n#endif//glm_core_type_half\r\n"
  },
  {
    "path": "cpu/glm/detail/type_half.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///\r\n/// This half implementation is based on OpenEXR which is Copyright (c) 2002, \r\n/// Industrial Light & Magic, a division of Lucas Digital Ltd. LLC\r\n///\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_half.inl\r\n/// @date 2008-08-17 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\tGLM_FUNC_QUALIFIER float overflow()\r\n\t{\r\n\t\tvolatile float f = 1e10;\r\n\r\n\t\tfor(int i = 0; i < 10; ++i)\t\r\n\t\t\tf *= f;             // this will overflow before\r\n\t\t\t\t\t\t\t\t// the forloop terminates\r\n\t\treturn f;\r\n\t}\r\n\r\n\tunion uif32\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER uif32() :\r\n\t\t\ti(0)\r\n\t\t{}\r\n\r\n\t\tGLM_FUNC_QUALIFIER uif32(float f) :\r\n\t\t\tf(f)\r\n\t\t{}\r\n\r\n\t\tGLM_FUNC_QUALIFIER uif32(uint32 i) :\r\n\t\t\ti(i)\r\n\t\t{}\r\n\r\n\t\tfloat f;\r\n\t\tuint32 i;\r\n\t};\r\n\r\n\tGLM_FUNC_QUALIFIER float toFloat32(hdata value)\r\n\t{\r\n\t\tint s = (value >> 15) & 0x00000001;\r\n\t\tint e = (value >> 10) & 0x0000001f;\r\n\t\tint m =  value        & 0x000003ff;\r\n\r\n\t\tif(e == 0)\r\n\t\t{\r\n\t\t\tif(m == 0)\r\n\t\t\t{\r\n\t\t\t\t//\r\n\t\t\t\t// Plus or minus zero\r\n\t\t\t\t//\r\n\r\n\t\t\t\tdetail::uif32 result;\r\n\t\t\t\tresult.i = (unsigned int)(s << 31);\r\n\t\t\t\treturn result.f;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//\r\n\t\t\t\t// Denormalized number -- renormalize it\r\n\t\t\t\t//\r\n\r\n\t\t\t\twhile(!(m & 0x00000400))\r\n\t\t\t\t{\r\n\t\t\t\t\tm <<= 1;\r\n\t\t\t\t\te -=  1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\te += 1;\r\n\t\t\t\tm &= ~0x00000400;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(e == 31)\r\n\t\t{\r\n\t\t\tif(m == 0)\r\n\t\t\t{\r\n\t\t\t\t//\r\n\t\t\t\t// Positive or negative infinity\r\n\t\t\t\t//\r\n\r\n\t\t\t\tuif32 result;\r\n\t\t\t\tresult.i = (unsigned int)((s << 31) | 0x7f800000);\r\n\t\t\t\treturn result.f;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//\r\n\t\t\t\t// Nan -- preserve sign and significand bits\r\n\t\t\t\t//\r\n\r\n\t\t\t\tuif32 result;\r\n\t\t\t\tresult.i = (unsigned int)((s << 31) | 0x7f800000 | (m << 13));\r\n\t\t\t\treturn result.f;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t// Normalized number\r\n\t\t//\r\n\r\n\t\te = e + (127 - 15);\r\n\t\tm = m << 13;\r\n\r\n\t\t//\r\n\t\t// Assemble s, e and m.\r\n\t\t//\r\n\r\n\t\tuif32 Result;\r\n\t\tResult.i = (unsigned int)((s << 31) | (e << 23) | m);\r\n\t\treturn Result.f;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER hdata toFloat16(float const & f)\r\n\t{\r\n\t\tuif32 Entry;\r\n\t\tEntry.f = f;\r\n\t\tint i = (int)Entry.i;\r\n\r\n\t\t//\r\n\t\t// Our floating point number, f, is represented by the bit\r\n\t\t// pattern in integer i.  Disassemble that bit pattern into\r\n\t\t// the sign, s, the exponent, e, and the significand, m.\r\n\t\t// Shift s into the position where it will go in in the\r\n\t\t// resulting half number.\r\n\t\t// Adjust e, accounting for the different exponent bias\r\n\t\t// of float and half (127 versus 15).\r\n\t\t//\r\n\r\n\t\tint s =  (i >> 16) & 0x00008000;\r\n\t\tint e = ((i >> 23) & 0x000000ff) - (127 - 15);\r\n\t\tint m =   i        & 0x007fffff;\r\n\r\n\t\t//\r\n\t\t// Now reassemble s, e and m into a half:\r\n\t\t//\r\n\r\n\t\tif(e <= 0)\r\n\t\t{\r\n\t\t\tif(e < -10)\r\n\t\t\t{\r\n\t\t\t\t//\r\n\t\t\t\t// E is less than -10.  The absolute value of f is\r\n\t\t\t\t// less than half_MIN (f may be a small normalized\r\n\t\t\t\t// float, a denormalized float or a zero).\r\n\t\t\t\t//\r\n\t\t\t\t// We convert f to a half zero.\r\n\t\t\t\t//\r\n\r\n\t\t\t\treturn hdata(s);\r\n\t\t\t}\r\n\r\n\t\t\t//\r\n\t\t\t// E is between -10 and 0.  F is a normalized float,\r\n\t\t\t// whose magnitude is less than __half_NRM_MIN.\r\n\t\t\t//\r\n\t\t\t// We convert f to a denormalized half.\r\n\t\t\t// \r\n\r\n\t\t\tm = (m | 0x00800000) >> (1 - e);\r\n\r\n\t\t\t//\r\n\t\t\t// Round to nearest, round \"0.5\" up.\r\n\t\t\t//\r\n\t\t\t// Rounding may cause the significand to overflow and make\r\n\t\t\t// our number normalized.  Because of the way a half's bits\r\n\t\t\t// are laid out, we don't have to treat this case separately;\r\n\t\t\t// the code below will handle it correctly.\r\n\t\t\t// \r\n\r\n\t\t\tif(m & 0x00001000) \r\n\t\t\t\tm += 0x00002000;\r\n\r\n\t\t\t//\r\n\t\t\t// Assemble the half from s, e (zero) and m.\r\n\t\t\t//\r\n\r\n\t\t\treturn hdata(s | (m >> 13));\r\n\t\t}\r\n\t\telse if(e == 0xff - (127 - 15))\r\n\t\t{\r\n\t\t\tif(m == 0)\r\n\t\t\t{\r\n\t\t\t\t//\r\n\t\t\t\t// F is an infinity; convert f to a half\r\n\t\t\t\t// infinity with the same sign as f.\r\n\t\t\t\t//\r\n\r\n\t\t\t\treturn hdata(s | 0x7c00);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//\r\n\t\t\t\t// F is a NAN; we produce a half NAN that preserves\r\n\t\t\t\t// the sign bit and the 10 leftmost bits of the\r\n\t\t\t\t// significand of f, with one exception: If the 10\r\n\t\t\t\t// leftmost bits are all zero, the NAN would turn \r\n\t\t\t\t// into an infinity, so we have to set at least one\r\n\t\t\t\t// bit in the significand.\r\n\t\t\t\t//\r\n\r\n\t\t\t\tm >>= 13;\r\n\r\n\t\t\t\treturn hdata(s | 0x7c00 | m | (m == 0));\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//\r\n\t\t\t// E is greater than zero.  F is a normalized float.\r\n\t\t\t// We try to convert f to a normalized half.\r\n\t\t\t//\r\n\r\n\t\t\t//\r\n\t\t\t// Round to nearest, round \"0.5\" up\r\n\t\t\t//\r\n\r\n\t\t\tif(m &  0x00001000)\r\n\t\t\t{\r\n\t\t\t\tm += 0x00002000;\r\n\r\n\t\t\t\tif(m & 0x00800000)\r\n\t\t\t\t{\r\n\t\t\t\t\tm =  0;     // overflow in significand,\r\n\t\t\t\t\te += 1;     // adjust exponent\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//\r\n\t\t\t// Handle exponent overflow\r\n\t\t\t//\r\n\r\n\t\t\tif (e > 30)\r\n\t\t\t{\r\n\t\t\t\toverflow();        // Cause a hardware floating point overflow;\r\n\r\n\t\t\t\treturn hdata(s | 0x7c00);\r\n\t\t\t\t// if this returns, the half becomes an\r\n\t\t\t}   // infinity with the same sign as f.\r\n\r\n\t\t\t//\r\n\t\t\t// Assemble the half from s, e and m.\r\n\t\t\t//\r\n\r\n\t\t\treturn hdata(s | (e << 10) | (m >> 13));\r\n\t\t}\r\n\t}\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/detail/type_int.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_int.hpp\r\n/// @date 2008-08-22 / 2013-03-30\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_int\r\n#define glm_core_type_int\r\n\r\n#include \"setup.hpp\"\r\n\r\n#if GLM_HAS_EXTENDED_INTEGER_TYPE\r\n#\tinclude <cstdint>\r\n#endif\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n#\tif GLM_HAS_EXTENDED_INTEGER_TYPE\r\n\t\ttypedef std::int8_t\t\t\t\t\tint8;\r\n\t\ttypedef std::int16_t\t\t\t\tint16;\r\n\t\ttypedef std::int32_t\t\t\t\tint32;\r\n\t\ttypedef std::int64_t\t\t\t\tint64;\r\n\t\r\n\t\ttypedef std::uint8_t\t\t\t\tuint8;\r\n\t\ttypedef std::uint16_t\t\t\t\tuint16;\r\n\t\ttypedef std::uint32_t\t\t\t\tuint32;\r\n\t\ttypedef std::uint64_t\t\t\t\tuint64;\r\n#\telse\r\n#\t\tif(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) // C99 detected, 64 bit types available\r\n\t\t\ttypedef int64_t\t\t\t\t\tsint64;\r\n\t\t\ttypedef uint64_t\t\t\t\tuint64;\r\n#\t\telif(GLM_COMPILER & GLM_COMPILER_VC)\r\n\t\t\ttypedef signed __int64\t\t\tsint64;\r\n\t\t\ttypedef unsigned __int64\t\tuint64;\r\n#\t\telif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC | GLM_COMPILER_CLANG))\r\n\t\t\t__extension__ typedef signed long long\t\tsint64;\r\n\t\t\t__extension__ typedef unsigned long long\tuint64;\r\n#\t\telif(GLM_COMPILER & GLM_COMPILER_BC)\r\n\t\t\ttypedef Int64\t\t\t\t\tsint64;\r\n\t\t\ttypedef Uint64\t\t\t\t\tuint64;\r\n#\t\telse//unknown compiler\r\n\t\t\ttypedef signed long\tlong\t\tsint64;\r\n\t\t\ttypedef unsigned long long\t\tuint64;\r\n#\t\tendif//GLM_COMPILER\r\n\t\t\r\n\t\ttypedef signed char\t\t\t\t\tint8;\r\n\t\ttypedef signed short\t\t\t\tint16;\r\n\t\ttypedef signed int\t\t\t\t\tint32;\r\n\t\ttypedef sint64\t\t\t\t\t\tint64;\r\n\t\r\n\t\ttypedef unsigned char\t\t\t\tuint8;\r\n\t\ttypedef unsigned short\t\t\t\tuint16;\r\n\t\ttypedef unsigned int\t\t\t\tuint32;\r\n\t\ttypedef uint64\t\t\t\t\t\tuint64;\r\n#endif//\r\n\t\r\n\ttypedef signed int\t\t\t\t\t\tlowp_int_t;\r\n\ttypedef signed int\t\t\t\t\t\tmediump_int_t;\r\n\ttypedef signed int\t\t\t\t\t\thighp_int_t;\r\n\t\r\n\ttypedef unsigned int\t\t\t\t\tlowp_uint_t;\r\n\ttypedef unsigned int\t\t\t\t\tmediump_uint_t;\r\n\ttypedef unsigned int\t\t\t\t\thighp_uint_t;\r\n}//namespace detail\r\n\r\n\ttypedef detail::int8\t\t\t\t\tint8;\r\n\ttypedef detail::int16\t\t\t\t\tint16;\r\n\ttypedef detail::int32\t\t\t\t\tint32;\r\n\ttypedef detail::int64\t\t\t\t\tint64;\r\n\t\r\n\ttypedef detail::uint8\t\t\t\t\tuint8;\r\n\ttypedef detail::uint16\t\t\t\t\tuint16;\r\n\ttypedef detail::uint32\t\t\t\t\tuint32;\r\n\ttypedef detail::uint64\t\t\t\t\tuint64;\r\n\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\r\n\t/// Low precision signed integer. \r\n\t/// There is no guarantee on the actual precision.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.3 Integers</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::lowp_int_t\t\t\t\tlowp_int;\r\n\r\n\t/// Medium precision signed integer. \r\n\t/// There is no guarantee on the actual precision.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.3 Integers</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::mediump_int_t\t\t\tmediump_int;\r\n\r\n\t/// High precision signed integer.\r\n\t/// There is no guarantee on the actual precision.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.3 Integers</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::highp_int_t\t\t\t\thighp_int;\r\n\r\n\t/// Low precision unsigned integer. \r\n\t/// There is no guarantee on the actual precision.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.3 Integers</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::lowp_uint_t\t\t\t\tlowp_uint;\r\n\r\n\t/// Medium precision unsigned integer. \r\n\t/// There is no guarantee on the actual precision.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.3 Integers</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::mediump_uint_t\t\t\tmediump_uint;\r\n\r\n\t/// High precision unsigned integer. \r\n\t/// There is no guarantee on the actual precision.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.3 Integers</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::highp_uint_t\t\t\thighp_uint;\r\n\r\n#if(!defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef mediump_int\t\t\t\t\tint_t;\r\n#elif(defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef highp_int\t\t\t\t\tint_t;\r\n#elif(!defined(GLM_PRECISION_HIGHP_INT) && defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef mediump_int\t\t\t\t\tint_t;\r\n#elif(!defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_int\t\t\t\t\tint_t;\r\n#else\r\n#\terror \"GLM error: multiple default precision requested for signed interger types\"\r\n#endif\r\n\r\n#if(!defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT))\r\n\ttypedef mediump_uint\t\t\t\tuint_t;\r\n#elif(defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT))\r\n\ttypedef highp_uint\t\t\t\t\tuint_t;\r\n#elif(!defined(GLM_PRECISION_HIGHP_UINT) && defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT))\r\n\ttypedef mediump_uint\t\t\t\tuint_t;\r\n#elif(!defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && defined(GLM_PRECISION_LOWP_UINT))\r\n\ttypedef lowp_uint\t\t\t\t\tuint_t;\r\n#else\r\n#\terror \"GLM error: multiple default precision requested for unsigned interger types\"\r\n#endif\r\n\r\n\t/// Unsigned integer type.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.3 Integers</a>\r\n\ttypedef unsigned int\t\t\t\tuint;\r\n\r\n\t/// @}\r\n\r\n////////////////////\r\n// check type sizes\r\n#ifndef GLM_STATIC_ASSERT_NULL\r\n\tGLM_STATIC_ASSERT(sizeof(glm::int8) == 1, \"int8 size isn't 1 byte on this platform\");\r\n\tGLM_STATIC_ASSERT(sizeof(glm::int16) == 2, \"int16 size isn't 2 bytes on this platform\");\r\n\tGLM_STATIC_ASSERT(sizeof(glm::int32) == 4, \"int32 size isn't 4 bytes on this platform\");\r\n\tGLM_STATIC_ASSERT(sizeof(glm::int64) == 8, \"int64 size isn't 8 bytes on this platform\");\r\n\r\n\tGLM_STATIC_ASSERT(sizeof(glm::uint8) == 1, \"uint8 size isn't 1 byte on this platform\");\r\n\tGLM_STATIC_ASSERT(sizeof(glm::uint16) == 2, \"uint16 size isn't 2 bytes on this platform\");\r\n\tGLM_STATIC_ASSERT(sizeof(glm::uint32) == 4, \"uint32 size isn't 4 bytes on this platform\");\r\n\tGLM_STATIC_ASSERT(sizeof(glm::uint64) == 8, \"uint64 size isn't 8 bytes on this platform\");\r\n#endif//GLM_STATIC_ASSERT_NULL\r\n\r\n}//namespace glm\r\n\r\n#endif//glm_core_type_int\r\n"
  },
  {
    "path": "cpu/glm/detail/type_mat.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat.hpp\r\n/// @date 2010-01-26 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_mat\r\n#define glm_core_type_mat\r\n\r\n#include \"precision.hpp\"\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P> struct tvec2;\r\n\ttemplate <typename T, precision P> struct tvec3;\r\n\ttemplate <typename T, precision P> struct tvec4;\r\n\ttemplate <typename T, precision P> struct tmat2x2;\r\n\ttemplate <typename T, precision P> struct tmat2x3;\r\n\ttemplate <typename T, precision P> struct tmat2x4;\r\n\ttemplate <typename T, precision P> struct tmat3x2;\r\n\ttemplate <typename T, precision P> struct tmat3x3;\r\n\ttemplate <typename T, precision P> struct tmat3x4;\r\n\ttemplate <typename T, precision P> struct tmat4x2;\r\n\ttemplate <typename T, precision P> struct tmat4x3;\r\n\ttemplate <typename T, precision P> struct tmat4x4;\r\n\r\n\ttemplate <typename T, precision P, template <class, precision> class colType, template <class, precision> class rowType>\r\n\tstruct outerProduct_trait{};\r\n\r\n\ttemplate <template <class, precision> class matType, typename T, precision P>\r\n\tstruct compute_inverse{};\r\n}//namespace detail\r\n\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 2 columns of 2 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, lowp>\t\tlowp_mat2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, mediump>\t\tmediump_mat2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, highp>\t\thighp_mat2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, lowp>\t\tlowp_mat2x2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, mediump>\t\tmediump_mat2x2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, highp>\t\thighp_mat2x2;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 2 columns of 3 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x3<float, lowp>\t\tlowp_mat2x3;\r\n\t\r\n\t/// 2 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x3<float, mediump>\t\tmediump_mat2x3;\r\n\t\r\n\t/// 2 columns of 3 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x3<float, highp>\t\thighp_mat2x3;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 2 columns of 4 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x4<float, lowp>\t\tlowp_mat2x4;\r\n\t\r\n\t/// 2 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x4<float, mediump>\t\tmediump_mat2x4;\r\n\t\r\n\t/// 2 columns of 4 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x4<float, highp>\t\thighp_mat2x4;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 3 columns of 2 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x2<float, lowp>\t\tlowp_mat3x2;\r\n\t\r\n\t/// 3 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x2<float, mediump>\t\tmediump_mat3x2;\r\n\t\r\n\t/// 3 columns of 2 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x2<float, highp>\t\thighp_mat3x2;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 3 columns of 3 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, lowp>\t\tlowp_mat3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, mediump>\t\tmediump_mat3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, highp>\t\thighp_mat3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, lowp>\t\tlowp_mat3x3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, mediump>\t\tmediump_mat3x3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, highp>\t\thighp_mat3x3;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 3 columns of 4 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x4<float, lowp>\t\tlowp_mat3x4;\r\n\t\r\n\t/// 3 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x4<float, mediump>\t\tmediump_mat3x4;\r\n\t\r\n\t/// 3 columns of 4 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x4<float, highp>\t\thighp_mat3x4;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 4 columns of 2 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x2<float, lowp>\t\tlowp_mat4x2;\r\n\t\r\n\t/// 4 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x2<float, mediump>\t\tmediump_mat4x2;\r\n\t\r\n\t/// 4 columns of 2 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x2<float, highp>\t\thighp_mat4x2;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 4 columns of 3 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x3<float, lowp>\t\tlowp_mat4x3;\r\n\t\r\n\t/// 4 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x3<float, mediump>\t\tmediump_mat4x3;\r\n\t\r\n\t/// 4 columns of 3 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x3<float, highp>\t\thighp_mat4x3;\r\n\t\r\n\t/// @}\r\n\t\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 4 columns of 4 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, lowp>\t\tlowp_mat4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, mediump>\t\tmediump_mat4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, highp>\t\thighp_mat4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, lowp>\t\tlowp_mat4x4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, mediump>\t\tmediump_mat4x4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, highp>\t\thighp_mat4x4;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_types\r\n\t/// @{\r\n\t\r\n\t//////////////////////////\r\n\t// Float definition\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef lowp_mat2x2\t\t\tmat2x2;\r\n\ttypedef lowp_mat2x3\t\t\tmat2x3;\r\n\ttypedef lowp_mat2x4\t\t\tmat2x4;\r\n\ttypedef lowp_mat3x2\t\t\tmat3x2;\r\n\ttypedef lowp_mat3x3\t\t\tmat3x3;\r\n\ttypedef lowp_mat3x4\t\t\tmat3x4;\r\n\ttypedef lowp_mat4x2\t\t\tmat4x2;\r\n\ttypedef lowp_mat4x3\t\t\tmat4x3;\r\n\ttypedef lowp_mat4x4\t\t\tmat4x4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))\r\n\ttypedef mediump_mat2x2\t\tmat2x2;\r\n\ttypedef mediump_mat2x3\t\tmat2x3;\r\n\ttypedef mediump_mat2x4\t\tmat2x4;\r\n\ttypedef mediump_mat3x2\t\tmat3x2;\r\n\ttypedef mediump_mat3x3\t\tmat3x3;\r\n\ttypedef mediump_mat3x4\t\tmat3x4;\r\n\ttypedef mediump_mat4x2\t\tmat4x2;\r\n\ttypedef mediump_mat4x3\t\tmat4x3;\r\n\ttypedef mediump_mat4x4\t\tmat4x4;\r\n#else\t\r\n\t//! 2 columns of 2 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_mat2x2\t\t\tmat2x2;\r\n\t\r\n\t//! 2 columns of 3 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_mat2x3\t\t\tmat2x3;\r\n\t\r\n\t//! 2 columns of 4 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_mat2x4\t\t\tmat2x4;\r\n\t\r\n\t//! 3 columns of 2 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_mat3x2\t\t\tmat3x2;\r\n\t\r\n\t//! 3 columns of 3 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_mat3x3\t\t\tmat3x3;\r\n\t\r\n\t//! 3 columns of 4 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_mat3x4\t\t\tmat3x4;\r\n\t\r\n\t//! 4 columns of 2 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_mat4x2\t\t\tmat4x2;\r\n\t\r\n\t//! 4 columns of 3 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_mat4x3\t\t\tmat4x3;\r\n\t\r\n\t//! 4 columns of 4 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_mat4x4\t\t\tmat4x4;\r\n\t\r\n#endif//GLM_PRECISION\r\n\t\r\n\t//! 2 columns of 2 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef mat2x2\t\t\t\t\tmat2;\r\n\t\r\n\t//! 3 columns of 3 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef mat3x3\t\t\t\t\tmat3;\r\n\t\r\n\t//! 4 columns of 4 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef mat4x4\t\t\t\t\tmat4;\r\n\t\t\r\n\t//////////////////////////\r\n\t// Double definition\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 2 columns of 2 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<double, lowp>\t\tlowp_dmat2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<double, mediump>\tmediump_dmat2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<double, highp>\t\thighp_dmat2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<double, lowp>\t\tlowp_dmat2x2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<double, mediump>\tmediump_dmat2x2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<double, highp>\t\thighp_dmat2x2;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 2 columns of 3 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x3<double, lowp>\t\tlowp_dmat2x3;\r\n\t\r\n\t/// 2 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x3<double, mediump>\tmediump_dmat2x3;\r\n\t\r\n\t/// 2 columns of 3 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x3<double, highp>\t\thighp_dmat2x3;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 2 columns of 4 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x4<double, lowp>\t\tlowp_dmat2x4;\r\n\t\r\n\t/// 2 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x4<double, mediump>\tmediump_dmat2x4;\r\n\t\r\n\t/// 2 columns of 4 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x4<double, highp>\t\thighp_dmat2x4;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 3 columns of 2 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x2<double, lowp>\t\tlowp_dmat3x2;\r\n\t\r\n\t/// 3 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x2<double, mediump>\tmediump_dmat3x2;\r\n\t\r\n\t/// 3 columns of 2 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x2<double, highp>\t\thighp_dmat3x2;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 3 columns of 3 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, lowp>\t\tlowp_dmat3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<double, mediump>\tmediump_dmat3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<double, highp>\t\thighp_dmat3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<double, lowp>\t\tlowp_dmat3x3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<double, mediump>\tmediump_dmat3x3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<double, highp>\t\thighp_dmat3x3;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 3 columns of 4 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x4<double, lowp>\t\tlowp_dmat3x4;\r\n\t\r\n\t/// 3 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x4<double, mediump>\tmediump_dmat3x4;\r\n\t\r\n\t/// 3 columns of 4 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x4<double, highp>\t\thighp_dmat3x4;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 4 columns of 2 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x2<double, lowp>\t\tlowp_dmat4x2;\r\n\t\r\n\t/// 4 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x2<double, mediump>\tmediump_dmat4x2;\r\n\t\r\n\t/// 4 columns of 2 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x2<double, highp>\t\thighp_dmat4x2;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 4 columns of 3 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x3<double, lowp>\t\tlowp_dmat4x3;\r\n\t\r\n\t/// 4 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x3<double, mediump>\tmediump_dmat4x3;\r\n\t\r\n\t/// 4 columns of 3 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x3<double, highp>\t\thighp_dmat4x3;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 4 columns of 4 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<double, lowp>\t\tlowp_dmat4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<double, mediump>\tmediump_dmat4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<double, highp>\t\thighp_dmat4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<double, lowp>\t\tlowp_dmat4x4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<double, mediump>\tmediump_dmat4x4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<double, highp>\t\thighp_dmat4x4;\r\n\t\r\n\t/// @}\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_DOUBLE))\r\n\ttypedef lowp_dmat2x2\t\tdmat2x2;\r\n\ttypedef lowp_dmat2x3\t\tdmat2x3;\r\n\ttypedef lowp_dmat2x4\t\tdmat2x4;\r\n\ttypedef lowp_dmat3x2\t\tdmat3x2;\r\n\ttypedef lowp_dmat3x3\t\tdmat3x3;\r\n\ttypedef lowp_dmat3x4\t\tdmat3x4;\r\n\ttypedef lowp_dmat4x2\t\tdmat4x2;\r\n\ttypedef lowp_dmat4x3\t\tdmat4x3;\r\n\ttypedef lowp_dmat4x4\t\tdmat4x4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))\r\n\ttypedef mediump_dmat2x2\t\tdmat2x2;\r\n\ttypedef mediump_dmat2x3\t\tdmat2x3;\r\n\ttypedef mediump_dmat2x4\t\tdmat2x4;\r\n\ttypedef mediump_dmat3x2\t\tdmat3x2;\r\n\ttypedef mediump_dmat3x3\t\tdmat3x3;\r\n\ttypedef mediump_dmat3x4\t\tdmat3x4;\r\n\ttypedef mediump_dmat4x2\t\tdmat4x2;\r\n\ttypedef mediump_dmat4x3\t\tdmat4x3;\r\n\ttypedef mediump_dmat4x4\t\tdmat4x4;\r\n#else //defined(GLM_PRECISION_HIGHP_DOUBLE)\r\n\t\r\n\t//! 2 * 2 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat2x2\t\tdmat2;\r\n\t\r\n\t//! 3 * 3 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat3x3\t\tdmat3;\r\n\t\r\n\t//! 4 * 4 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat4x4\t\tdmat4;\r\n\t\r\n\t//! 2 * 2 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat2x2\t\tdmat2x2;\r\n\t\r\n\t//! 2 * 3 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat2x3\t\tdmat2x3;\r\n\t\r\n\t//! 2 * 4 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat2x4\t\tdmat2x4;\r\n\t\r\n\t//! 3 * 2 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat3x2\t\tdmat3x2;\r\n\t\r\n\t/// 3 * 3 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat3x3\t\tdmat3x3;\r\n\t\r\n\t/// 3 * 4 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat3x4\t\tdmat3x4;\r\n\t\r\n\t/// 4 * 2 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat4x2\t\tdmat4x2;\r\n\t\r\n\t/// 4 * 3 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat4x3\t\tdmat4x3;\r\n\t\r\n\t/// 4 * 4 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat4x4\t\tdmat4x4;\r\n\r\n#endif//GLM_PRECISION\r\n\t\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#endif//glm_core_type_mat\r\n"
  },
  {
    "path": "cpu/glm/detail/type_mat.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat.inl\r\n/// @date 2011-06-15 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n"
  },
  {
    "path": "cpu/glm/detail/type_mat2x2.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\t\r\n/// @file glm/core/type_mat2x2.hpp\r\n/// @date 2005-01-27 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_mat2x2\r\n#define glm_core_type_mat2x2\r\n\r\n#include \"../fwd.hpp\"\r\n#include \"type_vec2.hpp\"\r\n#include \"type_mat.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tmat2x2\r\n\t{\r\n\t\tenum ctor{_null};\r\n\t\ttypedef T value_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\ttypedef tvec2<T, P> col_type;\r\n\t\ttypedef tvec2<T, P> row_type;\r\n\t\ttypedef tmat2x2<T, P> type;\r\n\t\ttypedef tmat2x2<T, P> transpose_type;\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tfriend tvec2<U, Q> operator/(tmat2x2<U, Q> const & m, tvec2<U, Q> const & v);\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tfriend tvec2<U, Q> operator/(tvec2<U, Q> const & v, tmat2x2<U, Q> const & m);\r\n\r\n\tprivate:\r\n\t\t/// @cond DETAIL\r\n\t\tcol_type value[2];\r\n\t\t/// @endcond\r\n\t\t\r\n\tpublic:\r\n\t\t//////////////////////////////////////\r\n\t\t// Constructors\r\n\t\tGLM_FUNC_DECL tmat2x2();\r\n\t\tGLM_FUNC_DECL tmat2x2(tmat2x2<T, P> const & m);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tmat2x2(tmat2x2<T, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat2x2(\r\n\t\t\tctor Null);\r\n\t\tGLM_FUNC_DECL explicit tmat2x2(\r\n\t\t\tT const & x);\r\n\t\tGLM_FUNC_DECL tmat2x2(\r\n\t\t\tT const & x1, T const & y1,\r\n\t\t\tT const & x2, T const & y2);\r\n\t\tGLM_FUNC_DECL tmat2x2(\r\n\t\t\tcol_type const & v1,\r\n\t\t\tcol_type const & v2);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversions\r\n\t\ttemplate <typename U, typename V, typename M, typename N>\r\n\t\tGLM_FUNC_DECL tmat2x2(\r\n\t\t\tU const & x1, V const & y1,\r\n\t\t\tM const & x2, N const & y2);\r\n\r\n\t\ttemplate <typename U, typename V>\r\n\t\tGLM_FUNC_DECL tmat2x2(\r\n\t\t\ttvec2<U, P> const & v1,\r\n\t\t\ttvec2<V, P> const & v2);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Matrix conversions\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tmat2x2(tmat2x2<U, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat2x2(tmat3x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x2(tmat4x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x2(tmat2x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x2(tmat3x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x2(tmat2x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x2(tmat4x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x2(tmat3x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x2(tmat4x3<T, P> const & x);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Accesses\r\n\r\n\t\tGLM_FUNC_DECL col_type & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL col_type const & operator[](length_t i) const;\r\n\r\n\t\t// Unary updatable operators\r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<T, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator+=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator+=(tmat2x2<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator-=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator-=(tmat2x2<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator*=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator*=(tmat2x2<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator/=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator/=(tmat2x2<U, P> const & m);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator++ ();\r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator-- ();\r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> operator--(int);\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> compute_inverse_mat2(tmat2x2<T, P> const & m);\r\n\r\n\t// Binary operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator+ (\r\n\t\ttmat2x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator+ (\r\n\t\tT const & s,\r\n\t\ttmat2x2<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator+ (\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator- (\r\n\t\ttmat2x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator- (\r\n\t\tT const & s,\r\n\t\ttmat2x2<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator- (\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator* (\r\n\t\ttmat2x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator* (\r\n\t\tT const & s, \r\n\t\ttmat2x2<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat2x2<T, P>::col_type operator* (\r\n\t\ttmat2x2<T, P> const & m,\r\n\t\ttypename tmat2x2<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat2x2<T, P>::row_type operator* (\r\n\t\ttypename tmat2x2<T, P>::col_type const & v,\r\n\t\ttmat2x2<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator* (\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> operator* (\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat3x2<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> operator* (\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat4x2<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator/ (\r\n\t\ttmat2x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator/ (\r\n\t\tT const & s,\r\n\t\ttmat2x2<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat2x2<T, P>::col_type operator/ (\r\n\t\ttmat2x2<T, P> const & m,\r\n\t\ttypename tmat2x2<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat2x2<T, P>::row_type operator/ (\r\n\t\ttypename tmat2x2<T, P>::col_type const & v,\r\n\t\ttmat2x2<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator/ (\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2);\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_DECL tmat2x2<T, P> const operator-(\r\n\t\ttmat2x2<T, P> const & m);\r\n} //namespace detail\r\n} //namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_mat2x2.inl\"\r\n#endif\r\n\r\n#endif //glm_core_type_mat2x2\r\n"
  },
  {
    "path": "cpu/glm/detail/type_mat2x2.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat2x2.inl\r\n/// @date 2005-01-16 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tmat2x2<T, P>::length() const\r\n\t{\r\n\t\treturn 2;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type &\r\n\ttmat2x2<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t)\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type const &\r\n\ttmat2x2<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t) const\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2()\r\n\t{\r\n\t\tthis->value[0] = col_type(1, 0);\r\n\t\tthis->value[1] = col_type(0, 1);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(\r\n\t\ttmat2x2<T, Q> const & m)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\tctor\r\n\t)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tvalue_type const Zero(0);\r\n\t\tthis->value[0] = col_type(s, Zero);\r\n\t\tthis->value[1] = col_type(Zero, s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\tT const & x0, T const & y0,\r\n\t\tT const & x1, T const & y1\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(x0, y0);\r\n\t\tthis->value[1] = col_type(x1, y1);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\tcol_type const & v0,\r\n\t\tcol_type const & v1\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = v0;\r\n\t\tthis->value[1] = v1;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion constructors\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename X1, typename Y1, typename X2, typename Y2>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\tX1 const & x1, Y1 const & y1,\r\n\t\tX2 const & x2, Y2 const & y2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(static_cast<T>(x1), value_type(y1));\r\n\t\tthis->value[1] = col_type(static_cast<T>(x2), value_type(y2));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename V1, typename V2>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\ttvec2<V1, P> const & v1,\r\n\t\ttvec2<V2, P> const & v2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(v1);\r\n\t\tthis->value[1] = col_type(v2);\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// mat2x2 matrix conversions\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\ttmat2x2<U, Q> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\ttmat4x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// mat2x2 operators\r\n\r\n\t// This function shouldn't required but it seems that VC7.1 have an optimisation bug if this operator wasn't declared\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator= (tmat2x2<T, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator= (tmat2x2<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator+= (U s)\r\n\t{\r\n\t\tthis->value[0] += s;\r\n\t\tthis->value[1] += s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator+= (tmat2x2<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] += m[0];\r\n\t\tthis->value[1] += m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator-= (U s)\r\n\t{\r\n\t\tthis->value[0] -= s;\r\n\t\tthis->value[1] -= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator-= (tmat2x2<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] -= m[0];\r\n\t\tthis->value[1] -= m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator*= (U s)\r\n\t{\r\n\t\tthis->value[0] *= s;\r\n\t\tthis->value[1] *= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator*= (tmat2x2<U, P> const & m)\r\n\t{\r\n\t\treturn (*this = *this * m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator/= (U s)\r\n\t{\r\n\t\tthis->value[0] /= s;\r\n\t\tthis->value[1] /= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator/= (tmat2x2<U, P> const & m)\r\n\t{\r\n\t\treturn (*this = *this * detail::compute_inverse<detail::tmat2x2, T, P>::call(m));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator++()\r\n\t{\r\n\t\t++this->value[0];\r\n\t\t++this->value[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator--()\r\n\t{\r\n\t\t--this->value[0];\r\n\t\t--this->value[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> tmat2x2<T, P>::operator++(int)\r\n\t{\r\n\t\ttmat2x2<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> tmat2x2<T, P>::operator--(int)\r\n\t{\r\n\t\ttmat2x2<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_inverse<detail::tmat2x2, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static detail::tmat2x2<T, P> call(detail::tmat2x2<T, P> const & m)\r\n\t\t{\r\n\t\t\tT OneOverDeterminant = static_cast<T>(1) / (\r\n\t\t\t\t+ m[0][0] * m[1][1]\r\n\t\t\t\t- m[1][0] * m[0][1]);\r\n\r\n\t\t\tdetail::tmat2x2<T, P> Inverse(\r\n\t\t\t\t+ m[1][1] * OneOverDeterminant,\r\n\t\t\t\t- m[0][1] * OneOverDeterminant,\r\n\t\t\t\t- m[1][0] * OneOverDeterminant,\r\n\t\t\t\t+ m[0][0] * OneOverDeterminant);\r\n\r\n\t\t\treturn Inverse;\r\n\t\t}\r\n\t};\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Binary operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator+\r\n\t(\r\n\t\ttmat2x2<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator+\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator+\r\n\t(\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\tm1[0] + m2[0],\r\n\t\t\tm1[1] + m2[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator-\r\n\t(\r\n\t\ttmat2x2<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\tm[0] - s,\r\n\t\t\tm[1] - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator-\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\ts - m[0],\r\n\t\t\ts - m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator-\r\n\t(\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\tm1[0] - m2[0],\r\n\t\t\tm1[1] - m2[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator*\r\n\t(\r\n\t\ttmat2x2<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator*\r\n\t(\t\r\n\t\tT const & s,\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type operator*\r\n\t(\r\n\t\ttmat2x2<T, P> const & m,\r\n\t\ttypename tmat2x2<T, P>::row_type const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tm[0][0] * v.x + m[1][0] * v.y,\r\n\t\t\tm[0][1] * v.x + m[1][1] * v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x2<T, P>::row_type operator*\r\n\t(\r\n\t\ttypename tmat2x2<T, P>::col_type const & v,\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tv.x * m[0][0] + v.y * m[0][1],\r\n\t\t\tv.x * m[1][0] + v.y * m[1][1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator*\r\n\t(\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> operator*\r\n\t(\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat3x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> operator*\r\n\t(\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat4x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1],\r\n\t\t\tm1[0][0] * m2[3][0] + m1[1][0] * m2[3][1],\r\n\t\t\tm1[0][1] * m2[3][0] + m1[1][1] * m2[3][1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator/\r\n\t(\r\n\t\ttmat2x2<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\tm[0] / s,\r\n\t\t\tm[1] / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator/\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\ts / m[0],\r\n\t\t\ts / m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type operator/\r\n\t(\r\n\t\ttmat2x2<T, P> const & m, \r\n\t\ttypename tmat2x2<T, P>::row_type & v\r\n\t)\r\n\t{\r\n\t\treturn detail::compute_inverse<detail::tmat2x2, T, P>::call(m) * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x2<T, P>::row_type operator/ \r\n\t(\r\n\t\ttypename tmat2x2<T, P>::col_type const & v,\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn v * detail::compute_inverse<detail::tmat2x2, T, P>::call(m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator/\r\n\t(\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2\r\n\t)\r\n\t{\t\r\n\t\ttmat2x2<T, P> m1_copy(m1);\r\n\t\treturn m1_copy /= m2;\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> const operator-\r\n\t(\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\t-m[0], \r\n\t\t\t-m[1]);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] == m2[0]) && (m1[1] == m2[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] != m2[0]) || (m1[1] != m2[1]);\r\n\t}\r\n\r\n} //namespace detail\r\n} //namespace glm\r\n"
  },
  {
    "path": "cpu/glm/detail/type_mat2x3.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat2x3.hpp\r\n/// @date 2006-10-01 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_mat2x3\r\n#define glm_core_type_mat2x3\r\n\r\n#include \"../fwd.hpp\"\r\n#include \"type_vec2.hpp\"\r\n#include \"type_vec3.hpp\"\r\n#include \"type_mat.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tmat2x3\r\n\t{\r\n\t\tenum ctor{_null};\r\n\t\ttypedef T value_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\ttypedef tvec3<T, P> col_type;\r\n\t\ttypedef tvec2<T, P> row_type;\r\n\t\ttypedef tmat2x3<T, P> type;\r\n\t\ttypedef tmat3x2<T, P> transpose_type;\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\tprivate:\r\n\t\t// Data \r\n\t\tcol_type value[2];\r\n\r\n\tpublic:\r\n\t\t// Constructors\r\n\t\tGLM_FUNC_DECL tmat2x3();\r\n\t\tGLM_FUNC_DECL tmat2x3(tmat2x3<T, P> const & m);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tmat2x3(tmat2x3<T, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat2x3(\r\n\t\t\tctor);\r\n\t\tGLM_FUNC_DECL explicit tmat2x3(\r\n\t\t\tT const & s);\r\n\t\tGLM_FUNC_DECL tmat2x3(\r\n\t\t\tT const & x0, T const & y0, T const & z0,\r\n\t\t\tT const & x1, T const & y1, T const & z1);\r\n\t\tGLM_FUNC_DECL tmat2x3(\r\n\t\t\tcol_type const & v0,\r\n\t\t\tcol_type const & v1);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversions\r\n\t\ttemplate <typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2>\r\n\t\tGLM_FUNC_DECL tmat2x3(\r\n\t\t\tX1 const & x1, Y1 const & y1, Z1 const & z1,\r\n\t\t\tX2 const & x2, Y2 const & y2, Z2 const & z2);\r\n\t\t\t\r\n\t\ttemplate <typename U, typename V>\r\n\t\tGLM_FUNC_DECL tmat2x3(\r\n\t\t\ttvec3<U, P> const & v1,\r\n\t\t\ttvec3<V, P> const & v2);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Matrix conversion\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tmat2x3(tmat2x3<U, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat2x3(tmat2x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x3(tmat3x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x3(tmat4x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x3(tmat2x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x3(tmat3x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x3(tmat3x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x3(tmat4x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x3(tmat4x3<T, P> const & x);\r\n\r\n\t\t// Accesses\r\n\t\tGLM_FUNC_DECL col_type & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL col_type const & operator[](length_t i) const;\r\n\r\n\t\t// Unary updatable operators\r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> & operator=  (tmat2x3<T, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> & operator=  (tmat2x3<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> & operator+= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> & operator+= (tmat2x3<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> & operator-= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> & operator-= (tmat2x3<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> & operator*= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> & operator/= (U s);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> & operator++ ();\r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> & operator-- ();\r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> operator--(int);\r\n\t};\r\n\r\n\t// Binary operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> operator+ (\r\n\t\ttmat2x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttmat2x3<T, P> operator+ (\r\n\t\ttmat2x3<T, P> const & m1,\r\n\t\ttmat2x3<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> operator- (\r\n\t\ttmat2x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> operator- (\r\n\t\ttmat2x3<T, P> const & m1,\r\n\t\ttmat2x3<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> operator* (\r\n\t\ttmat2x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> operator* (\r\n\t\tT const & s,\r\n\t\ttmat2x3<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat2x3<T, P>::col_type operator* (\r\n\t\ttmat2x3<T, P> const & m, \r\n\t\ttypename tmat2x3<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat2x3<T, P>::row_type operator* (\r\n\t\ttypename tmat2x3<T, P>::col_type const & v,\r\n\t\ttmat2x3<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> operator* (\r\n\t\ttmat2x3<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator* (\r\n\t\ttmat2x3<T, P> const & m1,\r\n\t\ttmat3x2<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> operator* (\r\n\t\ttmat2x3<T, P> const & m1,\r\n\t\ttmat4x2<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> operator/ (\r\n\t\ttmat2x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> operator/ (\r\n\t\tT const & s,\r\n\t\ttmat2x3<T, P> const & m);\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> const operator- (\r\n\t\ttmat2x3<T, P> const & m);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_mat2x3.inl\"\r\n#endif\r\n\r\n#endif //glm_core_type_mat2x3\r\n"
  },
  {
    "path": "cpu/glm/detail/type_mat2x3.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat2x3.inl\r\n/// @date 2006-08-05 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tmat2x3<T, P>::length() const\r\n\t{\r\n\t\treturn 2;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type &\r\n\ttmat2x3<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t)\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type const &\r\n\ttmat2x3<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t) const\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Constructors\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3()\r\n\t{\r\n\t\tthis->value[0] = col_type(T(1), T(0), T(0));\r\n\t\tthis->value[1] = col_type(T(0), T(1), T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(\r\n\t\ttmat2x3<T, Q> const & m)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\tctor\r\n\t)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(s, T(0), T(0));\r\n\t\tthis->value[1] = col_type(T(0), s, T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\tT const & x0, T const & y0, T const & z0,\r\n\t\tT const & x1, T const & y1, T const & z1\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(x0, y0, z0);\r\n\t\tthis->value[1] = col_type(x1, y1, z1);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\tcol_type const & v0,\r\n\t\tcol_type const & v1\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = v0;\r\n\t\tthis->value[1] = v1;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion constructors\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <\r\n\t\ttypename X1, typename Y1, typename Z1,\r\n\t\ttypename X2, typename Y2, typename Z2>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\tX1 const & x1, Y1 const & y1, Z1 const & z1,\r\n\t\tX2 const & x2, Y2 const & y2, Z2 const & z2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1));\r\n\t\tthis->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename V1, typename V2>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\ttvec3<V1, P> const & v1,\r\n\t\ttvec3<V2, P> const & v2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(v1);\r\n\t\tthis->value[1] = col_type(v2);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Matrix conversions\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\ttmat2x3<U, Q> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], T(0));\r\n\t\tthis->value[1] = col_type(m[1], T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], T(0));\r\n\t\tthis->value[1] = col_type(m[1], T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], T(0));\r\n\t\tthis->value[1] = col_type(m[1], T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\ttmat4x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Unary updatable operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator= (tmat2x3<T, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator= (tmat2x3<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> & tmat2x3<T, P>::operator+= (U s)\r\n\t{\r\n\t\tthis->value[0] += s;\r\n\t\tthis->value[1] += s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator+= (tmat2x3<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] += m[0];\r\n\t\tthis->value[1] += m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator-= (U s)\r\n\t{\r\n\t\tthis->value[0] -= s;\r\n\t\tthis->value[1] -= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator-= (tmat2x3<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] -= m[0];\r\n\t\tthis->value[1] -= m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator*= (U s)\r\n\t{\r\n\t\tthis->value[0] *= s;\r\n\t\tthis->value[1] *= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> & tmat2x3<T, P>::operator/= (U s)\r\n\t{\r\n\t\tthis->value[0] /= s;\r\n\t\tthis->value[1] /= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> & tmat2x3<T, P>::operator++()\r\n\t{\r\n\t\t++this->value[0];\r\n\t\t++this->value[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> & tmat2x3<T, P>::operator--()\r\n\t{\r\n\t\t--this->value[0];\r\n\t\t--this->value[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> tmat2x3<T, P>::operator++(int)\r\n\t{\r\n\t\ttmat2x3<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> tmat2x3<T, P>::operator--(int)\r\n\t{\r\n\t\ttmat2x3<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Binary operators\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> operator+ \r\n\t(\r\n\t\ttmat2x3<T, P> const & m, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> operator+ \r\n\t(\r\n\t\ttmat2x3<T, P> const & m1, \r\n\t\ttmat2x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\tm1[0] + m2[0],\r\n\t\t\tm1[1] + m2[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> operator- \r\n\t(\r\n\t\ttmat2x3<T, P> const & m, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\tm[0] - s,\r\n\t\t\tm[1] - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> operator- \r\n\t(\r\n\t\ttmat2x3<T, P> const & m1, \r\n\t\ttmat2x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\tm1[0] - m2[0],\r\n\t\t\tm1[1] - m2[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> operator* \r\n\t(\r\n\t\ttmat2x3<T, P> const & m, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> operator*\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type operator*\r\n\t(\r\n\t\ttmat2x3<T, P> const & m,\r\n\t\ttypename tmat2x3<T, P>::row_type const & v)\r\n\t{\r\n\t\treturn typename tmat2x3<T, P>::col_type(\r\n\t\t\tm[0][0] * v.x + m[1][0] * v.y,\r\n\t\t\tm[0][1] * v.x + m[1][1] * v.y,\r\n\t\t\tm[0][2] * v.x + m[1][2] * v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x3<T, P>::row_type operator*\r\n\t(\r\n\t\ttypename tmat2x3<T, P>::col_type const & v,\r\n\t\ttmat2x3<T, P> const & m)\r\n\t{\r\n\t\treturn typename tmat2x3<T, P>::row_type(\r\n\t\t\tv.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2],\r\n\t\t\tv.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> operator*\r\n\t(\r\n\t\ttmat2x3<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator*\r\n\t(\r\n\t\ttmat2x3<T, P> const & m1,\r\n\t\ttmat3x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\tT SrcA00 = m1[0][0];\r\n\t\tT SrcA01 = m1[0][1];\r\n\t\tT SrcA02 = m1[0][2];\r\n\t\tT SrcA10 = m1[1][0];\r\n\t\tT SrcA11 = m1[1][1];\r\n\t\tT SrcA12 = m1[1][2];\r\n\r\n\t\tT SrcB00 = m2[0][0];\r\n\t\tT SrcB01 = m2[0][1];\r\n\t\tT SrcB10 = m2[1][0];\r\n\t\tT SrcB11 = m2[1][1];\r\n\t\tT SrcB20 = m2[2][0];\r\n\t\tT SrcB21 = m2[2][1];\r\n\r\n\t\ttmat3x3<T, P> Result(tmat3x3<T, P>::_null);\r\n\t\tResult[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01;\r\n\t\tResult[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01;\r\n\t\tResult[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01;\r\n\t\tResult[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11;\r\n\t\tResult[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11;\r\n\t\tResult[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11;\r\n\t\tResult[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21;\r\n\t\tResult[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21;\r\n\t\tResult[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> operator*\r\n\t(\r\n\t\ttmat2x3<T, P> const & m1,\r\n\t\ttmat4x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1],\r\n\t\t\tm1[0][2] * m2[2][0] + m1[1][2] * m2[2][1],\r\n\t\t\tm1[0][0] * m2[3][0] + m1[1][0] * m2[3][1],\r\n\t\t\tm1[0][1] * m2[3][0] + m1[1][1] * m2[3][1],\r\n\t\t\tm1[0][2] * m2[3][0] + m1[1][2] * m2[3][1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> operator/\r\n\t(\r\n\t\ttmat2x3<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\tm[0] / s,\r\n\t\t\tm[1] / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> operator/\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\ts / m[0],\r\n\t\t\ts / m[1]);\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> const operator-\r\n\t(\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\t-m[0],\r\n\t\t\t-m[1]);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttmat2x3<T, P> const & m1,\r\n\t\ttmat2x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] == m2[0]) && (m1[1] == m2[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttmat2x3<T, P> const & m1,\r\n\t\ttmat2x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] != m2[0]) || (m1[1] != m2[1]);\r\n\t}\r\n} //namespace detail\r\n} //namespace glm\r\n"
  },
  {
    "path": "cpu/glm/detail/type_mat2x4.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat2x4.hpp\r\n/// @date 2006-08-05 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_mat2x4\r\n#define glm_core_type_mat2x4\r\n\r\n#include \"../fwd.hpp\"\r\n#include \"type_vec2.hpp\"\r\n#include \"type_vec4.hpp\"\r\n#include \"type_mat.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tmat2x4\r\n\t{\r\n\t\tenum ctor{_null};\r\n\t\ttypedef T value_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\ttypedef tvec4<T, P> col_type;\r\n\t\ttypedef tvec2<T, P> row_type;\r\n\t\ttypedef tmat2x4<T, P> type;\r\n\t\ttypedef tmat4x2<T, P> transpose_type;\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\tprivate:\r\n\t\t// Data \r\n\t\tcol_type value[2];\r\n\r\n\tpublic:\r\n\t\t// Constructors\r\n\t\tGLM_FUNC_DECL tmat2x4();\r\n\t\tGLM_FUNC_DECL tmat2x4(tmat2x4<T, P> const & m);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tmat2x4(tmat2x4<T, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat2x4(\r\n\t\t\tctor);\r\n\t\tGLM_FUNC_DECL explicit tmat2x4(\r\n\t\t\tT const & s);\r\n\t\tGLM_FUNC_DECL tmat2x4(\r\n\t\t\tT const & x0, T const & y0, T const & z0, T const & w0,\r\n\t\t\tT const & x1, T const & y1, T const & z1, T const & w1);\r\n\t\tGLM_FUNC_DECL tmat2x4(\r\n\t\t\tcol_type const & v0, \r\n\t\t\tcol_type const & v1);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversions\r\n\t\ttemplate <\r\n\t\t\ttypename X1, typename Y1, typename Z1, typename W1,\r\n\t\t\ttypename X2, typename Y2, typename Z2, typename W2>\r\n\t\tGLM_FUNC_DECL tmat2x4(\r\n\t\t\tX1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,\r\n\t\t\tX2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2);\r\n\r\n\t\ttemplate <typename U, typename V>\r\n\t\tGLM_FUNC_DECL tmat2x4(\r\n\t\t\ttvec4<U, P> const & v1,\r\n\t\t\ttvec4<V, P> const & v2);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Matrix conversions\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tmat2x4(tmat2x4<U, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat2x4(tmat2x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x4(tmat3x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x4(tmat4x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x4(tmat2x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x4(tmat3x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x4(tmat3x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x4(tmat4x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x4(tmat4x3<T, P> const & x);\r\n\r\n\t\t// Accesses\r\n\t\tGLM_FUNC_DECL col_type & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL col_type const & operator[](length_t i) const;\r\n\r\n\t\t// Unary updatable operators\r\n\t\tGLM_FUNC_DECL tmat2x4<T, P>& operator=  (tmat2x4<T, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x4<T, P>& operator=  (tmat2x4<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x4<T, P>& operator+= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x4<T, P>& operator+= (tmat2x4<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x4<T, P>& operator-= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x4<T, P>& operator-= (tmat2x4<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x4<T, P>& operator*= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x4<T, P>& operator/= (U s);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tmat2x4<T, P> & operator++ ();\r\n\t\tGLM_FUNC_DECL tmat2x4<T, P> & operator-- ();\r\n\t\tGLM_FUNC_DECL tmat2x4<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tmat2x4<T, P> operator--(int);\r\n\t};\r\n\r\n\t// Binary operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x4<T, P> operator+ (\r\n\t\ttmat2x4<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x4<T, P> operator+ (\r\n\t\ttmat2x4<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x4<T, P> operator- (\r\n\t\ttmat2x4<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x4<T, P> operator- (\r\n\t\ttmat2x4<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x4<T, P> operator* (\r\n\t\ttmat2x4<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x4<T, P> operator* (\r\n\t\tT const & s,\r\n\t\ttmat2x4<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat2x4<T, P>::col_type operator* (\r\n\t\ttmat2x4<T, P> const & m,\r\n\t\ttypename tmat2x4<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat2x4<T, P>::row_type operator* (\r\n\t\ttypename tmat2x4<T, P>::col_type const & v,\r\n\t\ttmat2x4<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator* (\r\n\t\ttmat2x4<T, P> const & m1, \r\n\t\ttmat4x2<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x4<T, P> operator* (\r\n\t\ttmat2x4<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> operator* (\r\n\t\ttmat2x4<T, P> const & m1,\r\n\t\ttmat3x2<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x4<T, P> operator/ (\r\n\t\ttmat2x4<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_DECL tmat2x4<T, P> operator/ (\r\n\t\tT const & s,\r\n\t\ttmat2x4<T, P> const & m);\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x4<T, P> const operator- (\r\n\t\ttmat2x4<T, P> const & m);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_mat2x4.inl\"\r\n#endif\r\n\r\n#endif //glm_core_type_mat2x4\r\n"
  },
  {
    "path": "cpu/glm/detail/type_mat2x4.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat2x4.inl\r\n/// @date 2006-08-05 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tmat2x4<T, P>::length() const\r\n\t{\r\n\t\treturn 2;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type &\r\n\ttmat2x4<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t)\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type const &\r\n\ttmat2x4<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t) const\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4()\r\n\t{\r\n\t\tvalue_type const Zero(0);\r\n\t\tvalue_type const One(1);\r\n\t\tthis->value[0] = col_type(One, Zero, Zero, Zero);\r\n\t\tthis->value[1] = col_type(Zero, One, Zero, Zero);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(\r\n\t\ttmat2x4<T, Q> const & m)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\tctor\r\n\t)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tvalue_type const Zero(0);\r\n\t\tthis->value[0] = col_type(s, Zero, Zero, Zero);\r\n\t\tthis->value[1] = col_type(Zero, s, Zero, Zero);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\tT const & x0, T const & y0, T const & z0, T const & w0,\r\n\t\tT const & x1, T const & y1, T const & z1, T const & w1\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(x0, y0, z0, w0);\r\n\t\tthis->value[1] = col_type(x1, y1, z1, w1);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\tcol_type const & v0,\r\n\t\tcol_type const & v1\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = v0;\r\n\t\tthis->value[1] = v1;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion constructors\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <\r\n\t\ttypename X1, typename Y1, typename Z1, typename W1,\r\n\t\ttypename X2, typename Y2, typename Z2, typename W2>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\tX1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,\r\n\t\tX2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1), value_type(w1));\r\n\t\tthis->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2), value_type(w2));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename V1, typename V2>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\ttvec4<V1, P> const & v1,\r\n\t\ttvec4<V2, P> const & v2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(v1);\r\n\t\tthis->value[1] = col_type(v2);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Matrix conversions\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\ttmat2x4<U, Q> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], detail::tvec2<T, P>(0));\r\n\t\tthis->value[1] = col_type(m[1], detail::tvec2<T, P>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], T(0));\r\n\t\tthis->value[1] = col_type(m[1], T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], T(0));\r\n\t\tthis->value[1] = col_type(m[1], T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], detail::tvec2<T, P>(0));\r\n\t\tthis->value[1] = col_type(m[1], detail::tvec2<T, P>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], detail::tvec2<T, P>(T(0)));\r\n\t\tthis->value[1] = col_type(m[1], detail::tvec2<T, P>(T(0)));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\ttmat4x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], T(0));\r\n\t\tthis->value[1] = col_type(m[1], T(0));\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Unary updatable operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator= (tmat2x4<T, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator= (tmat2x4<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator+= (U s)\r\n\t{\r\n\t\tthis->value[0] += s;\r\n\t\tthis->value[1] += s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator+= (tmat2x4<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] += m[0];\r\n\t\tthis->value[1] += m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator-= (U s)\r\n\t{\r\n\t\tthis->value[0] -= s;\r\n\t\tthis->value[1] -= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator-= (tmat2x4<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] -= m[0];\r\n\t\tthis->value[1] -= m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator*= (U s)\r\n\t{\r\n\t\tthis->value[0] *= s;\r\n\t\tthis->value[1] *= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> & tmat2x4<T, P>::operator/= (U s)\r\n\t{\r\n\t\tthis->value[0] /= s;\r\n\t\tthis->value[1] /= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator++()\r\n\t{\r\n\t\t++this->value[0];\r\n\t\t++this->value[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator--()\r\n\t{\r\n\t\t--this->value[0];\r\n\t\t--this->value[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> tmat2x4<T, P>::operator++(int)\r\n\t{\r\n\t\ttmat2x4<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> tmat2x4<T, P>::operator--(int)\r\n\t{\r\n\t\ttmat2x4<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Binary operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> operator+\r\n\t(\r\n\t\ttmat2x4<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> operator+\r\n\t(\r\n\t\ttmat2x4<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\tm1[0] + m2[0],\r\n\t\t\tm1[1] + m2[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> operator-\r\n\t(\r\n\t\ttmat2x4<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\tm[0] - s,\r\n\t\t\tm[1] - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> operator-\r\n\t(\r\n\t\ttmat2x4<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\tm1[0] - m2[0],\r\n\t\t\tm1[1] - m2[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> operator*\r\n\t(\r\n\t\ttmat2x4<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> operator*\r\n\t(\r\n\t\tT const & s, \r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type operator* \r\n\t(\r\n\t\ttmat2x4<T, P> const & m, \r\n\t\ttypename tmat2x4<T, P>::row_type const & v\r\n\t)\r\n\t{\r\n\t\treturn typename tmat2x4<T, P>::col_type(\r\n\t\t\tm[0][0] * v.x + m[1][0] * v.y,\r\n\t\t\tm[0][1] * v.x + m[1][1] * v.y,\r\n\t\t\tm[0][2] * v.x + m[1][2] * v.y,\r\n\t\t\tm[0][3] * v.x + m[1][3] * v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x4<T, P>::row_type operator*\r\n\t(\r\n\t\ttypename tmat2x4<T, P>::col_type const & v,\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn typename tmat2x4<T, P>::row_type(\r\n\t\t\tv.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2] + v.w * m[0][3],\r\n\t\t\tv.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2] + v.w * m[1][3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator*\r\n\t(\r\n\t\ttmat2x4<T, P> const & m1,\r\n\t\ttmat4x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\tT SrcA00 = m1[0][0];\r\n\t\tT SrcA01 = m1[0][1];\r\n\t\tT SrcA02 = m1[0][2];\r\n\t\tT SrcA03 = m1[0][3];\r\n\t\tT SrcA10 = m1[1][0];\r\n\t\tT SrcA11 = m1[1][1];\r\n\t\tT SrcA12 = m1[1][2];\r\n\t\tT SrcA13 = m1[1][3];\r\n\r\n\t\tT SrcB00 = m2[0][0];\r\n\t\tT SrcB01 = m2[0][1];\r\n\t\tT SrcB10 = m2[1][0];\r\n\t\tT SrcB11 = m2[1][1];\r\n\t\tT SrcB20 = m2[2][0];\r\n\t\tT SrcB21 = m2[2][1];\r\n\t\tT SrcB30 = m2[3][0];\r\n\t\tT SrcB31 = m2[3][1];\r\n\r\n\t\ttmat4x4<T, P> Result(tmat4x4<T, P>::_null);\r\n\t\tResult[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01;\r\n\t\tResult[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01;\r\n\t\tResult[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01;\r\n\t\tResult[0][3] = SrcA03 * SrcB00 + SrcA13 * SrcB01;\r\n\t\tResult[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11;\r\n\t\tResult[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11;\r\n\t\tResult[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11;\r\n\t\tResult[1][3] = SrcA03 * SrcB10 + SrcA13 * SrcB11;\r\n\t\tResult[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21;\r\n\t\tResult[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21;\r\n\t\tResult[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21;\r\n\t\tResult[2][3] = SrcA03 * SrcB20 + SrcA13 * SrcB21;\r\n\t\tResult[3][0] = SrcA00 * SrcB30 + SrcA10 * SrcB31;\r\n\t\tResult[3][1] = SrcA01 * SrcB30 + SrcA11 * SrcB31;\r\n\t\tResult[3][2] = SrcA02 * SrcB30 + SrcA12 * SrcB31;\r\n\t\tResult[3][3] = SrcA03 * SrcB30 + SrcA13 * SrcB31;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> operator*\r\n\t(\r\n\t\ttmat2x4<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1],\r\n\t\t\tm1[0][3] * m2[0][0] + m1[1][3] * m2[0][1],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1],\r\n\t\t\tm1[0][3] * m2[1][0] + m1[1][3] * m2[1][1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> operator*\r\n\t(\r\n\t\ttmat2x4<T, P> const & m1,\r\n\t\ttmat3x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1],\r\n\t\t\tm1[0][3] * m2[0][0] + m1[1][3] * m2[0][1],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1],\r\n\t\t\tm1[0][3] * m2[1][0] + m1[1][3] * m2[1][1],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1],\r\n\t\t\tm1[0][2] * m2[2][0] + m1[1][2] * m2[2][1],\r\n\t\t\tm1[0][3] * m2[2][0] + m1[1][3] * m2[2][1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> operator/\r\n\t(\r\n\t\ttmat2x4<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\tm[0] / s,\r\n\t\t\tm[1] / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> operator/\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\ts / m[0],\r\n\t\t\ts / m[1]);\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> const operator-\r\n\t(\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\t-m[0], \r\n\t\t\t-m[1]);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttmat2x4<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] == m2[0]) && (m1[1] == m2[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttmat2x4<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] != m2[0]) || (m1[1] != m2[1]);\r\n\t}\r\n} //namespace detail\r\n} //namespace glm\r\n"
  },
  {
    "path": "cpu/glm/detail/type_mat3x2.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat3x2.hpp\r\n/// @date 2006-08-05 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_mat3x2\r\n#define glm_core_type_mat3x2\r\n\r\n#include \"../fwd.hpp\"\r\n#include \"type_vec2.hpp\"\r\n#include \"type_vec3.hpp\"\r\n#include \"type_mat.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tmat3x2\r\n\t{\r\n\t\tenum ctor{_null};\r\n\t\ttypedef T value_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\ttypedef tvec2<T, P> col_type;\r\n\t\ttypedef tvec3<T, P> row_type;\r\n\t\ttypedef tmat3x2<T, P> type;\r\n\t\ttypedef tmat2x3<T, P> transpose_type;\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\tprivate:\r\n\t\t// Data\r\n\t\tcol_type value[3];\r\n\r\n\tpublic:\r\n\t\t// Constructors\r\n\t\tGLM_FUNC_DECL tmat3x2();\r\n\t\tGLM_FUNC_DECL tmat3x2(tmat3x2<T, P> const & m);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tmat3x2(tmat3x2<T, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat3x2(\r\n\t\t\tctor);\r\n\t\tGLM_FUNC_DECL explicit tmat3x2(\r\n\t\t\tT const & s);\r\n\t\tGLM_FUNC_DECL tmat3x2(\r\n\t\t\tT const & x0, T const & y0,\r\n\t\t\tT const & x1, T const & y1,\r\n\t\t\tT const & x2, T const & y2);\r\n\t\tGLM_FUNC_DECL tmat3x2(\r\n\t\t\tcol_type const & v0,\r\n\t\t\tcol_type const & v1,\r\n\t\t\tcol_type const & v2);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversions\r\n\t\ttemplate<\r\n\t\t\ttypename X1, typename Y1,\r\n\t\t\ttypename X2, typename Y2,\r\n\t\t\ttypename X3, typename Y3>\r\n\t\tGLM_FUNC_DECL tmat3x2(\r\n\t\t\tX1 const & x1, Y1 const & y1,\r\n\t\t\tX2 const & x2, Y2 const & y2,\r\n\t\t\tX3 const & x3, Y3 const & y3);\r\n\t\t\t\r\n\t\ttemplate <typename V1, typename V2, typename V3>\r\n\t\tGLM_FUNC_DECL tmat3x2(\r\n\t\t\ttvec2<V1, P> const & v1,\r\n\t\t\ttvec2<V2, P> const & v2,\r\n\t\t\ttvec2<V3, P> const & v3);\r\n\r\n\t\t// Matrix conversions\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tmat3x2(tmat3x2<U, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat3x2(tmat2x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x2(tmat3x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x2(tmat4x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x2(tmat2x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x2(tmat2x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x2(tmat3x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x2(tmat4x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x2(tmat4x3<T, P> const & x);\r\n\r\n\t\t// Accesses\r\n\t\tGLM_FUNC_DECL col_type & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL col_type const & operator[](length_t i) const;\r\n\r\n\t\t// Unary updatable operators\r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> & operator=  (tmat3x2<T, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> & operator=  (tmat3x2<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> & operator+= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> & operator+= (tmat3x2<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> & operator-= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> & operator-= (tmat3x2<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> & operator*= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> & operator/= (U s);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> & operator++ ();\r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> & operator-- ();\r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> operator--(int);\r\n\t};\r\n\r\n\t// Binary operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> operator+ (\r\n\t\ttmat3x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> operator+ (\r\n\t\ttmat3x2<T, P> const & m1,\r\n\t\ttmat3x2<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> operator- (\r\n\t\ttmat3x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> operator- (\r\n\t\ttmat3x2<T, P> const & m1,\r\n\t\ttmat3x2<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> operator* (\r\n\t\ttmat3x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> operator* (\r\n\t\tT const & s,\r\n\t\ttmat3x2<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat3x2<T, P>::col_type operator* (\r\n\t\ttmat3x2<T, P> const & m,\r\n\t\ttypename tmat3x2<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat3x2<T, P>::row_type operator* (\r\n\t\ttypename tmat3x2<T, P>::col_type const & v,\r\n\t\ttmat3x2<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator* (\r\n\t\ttmat3x2<T, P> const & m1,\r\n\t\ttmat2x3<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> operator* (\r\n\t\ttmat3x2<T, P> const & m1,\r\n\t\ttmat3x3<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> operator* (\r\n\t\ttmat3x2<T, P> const & m1,\r\n\t\ttmat4x3<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> operator/ (\r\n\t\ttmat3x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> operator/ (\r\n\t\tT const & s,\r\n\t\ttmat3x2<T, P> const & m);\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> const operator-(\r\n\t\ttmat3x2<T, P> const & m);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_mat3x2.inl\"\r\n#endif\r\n\r\n#endif //glm_core_type_mat3x2\r\n"
  },
  {
    "path": "cpu/glm/detail/type_mat3x2.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat3x2.inl\r\n/// @date 2006-08-05 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tmat3x2<T, P>::length() const\r\n\t{\r\n\t\treturn 3;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type &\r\n\ttmat3x2<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t)\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type const & \r\n\ttmat3x2<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t) const\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Constructors\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2()\r\n\t{\r\n\t\tthis->value[0] = col_type(1, 0);\r\n\t\tthis->value[1] = col_type(0, 1);\r\n\t\tthis->value[2] = col_type(0, 0);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t\tthis->value[2] = m.value[2];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(\r\n\t\ttmat3x2<T, Q> const & m)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t\tthis->value[2] = m.value[2];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\tctor\r\n\t)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(s, 0);\r\n\t\tthis->value[1] = col_type(0, s);\r\n\t\tthis->value[2] = col_type(0, 0);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\tT const & x0, T const & y0,\r\n\t\tT const & x1, T const & y1,\r\n\t\tT const & x2, T const & y2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(x0, y0);\r\n\t\tthis->value[1] = col_type(x1, y1);\r\n\t\tthis->value[2] = col_type(x2, y2);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\tcol_type const & v0,\r\n\t\tcol_type const & v1,\r\n\t\tcol_type const & v2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = v0;\r\n\t\tthis->value[1] = v1;\r\n\t\tthis->value[2] = v2;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion constructors\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <\r\n\t\ttypename X1, typename Y1,\r\n\t\ttypename X2, typename Y2,\r\n\t\ttypename X3, typename Y3>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\tX1 const & x1, Y1 const & y1,\r\n\t\tX2 const & x2, Y2 const & y2,\r\n\t\tX3 const & x3, Y3 const & y3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(static_cast<T>(x1), value_type(y1));\r\n\t\tthis->value[1] = col_type(static_cast<T>(x2), value_type(y2));\r\n\t\tthis->value[2] = col_type(static_cast<T>(x3), value_type(y3));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename V1, typename V2, typename V3>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\ttvec2<V1, P> const & v1,\r\n\t\ttvec2<V2, P> const & v2,\r\n\t\ttvec2<V3, P> const & v3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(v1);\r\n\t\tthis->value[1] = col_type(v2);\r\n\t\tthis->value[2] = col_type(v3);\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// mat3x2 matrix conversions\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\ttmat3x2<U, Q> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = col_type(T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\ttmat4x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Unary updatable operators\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator= (tmat3x2<T, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator= (tmat3x2<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator+= (U s)\r\n\t{\r\n\t\tthis->value[0] += s;\r\n\t\tthis->value[1] += s;\r\n\t\tthis->value[2] += s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator+= (tmat3x2<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] += m[0];\r\n\t\tthis->value[1] += m[1];\r\n\t\tthis->value[2] += m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator-= (U s)\r\n\t{\r\n\t\tthis->value[0] -= s;\r\n\t\tthis->value[1] -= s;\r\n\t\tthis->value[2] -= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator-= (tmat3x2<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] -= m[0];\r\n\t\tthis->value[1] -= m[1];\r\n\t\tthis->value[2] -= m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator*= (U s)\r\n\t{\r\n\t\tthis->value[0] *= s;\r\n\t\tthis->value[1] *= s;\r\n\t\tthis->value[2] *= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> & tmat3x2<T, P>::operator/= (U s)\r\n\t{\r\n\t\tthis->value[0] /= s;\r\n\t\tthis->value[1] /= s;\r\n\t\tthis->value[2] /= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator++ ()\r\n\t{\r\n\t\t++this->value[0];\r\n\t\t++this->value[1];\r\n\t\t++this->value[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator-- ()\r\n\t{\r\n\t\t--this->value[0];\r\n\t\t--this->value[1];\r\n\t\t--this->value[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> tmat3x2<T, P>::operator++(int)\r\n\t{\r\n\t\ttmat3x2<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> tmat3x2<T, P>::operator--(int)\r\n\t{\r\n\t\ttmat3x2<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Binary operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> operator+\r\n\t(\r\n\t\ttmat3x2<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s,\r\n\t\t\tm[2] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> operator+\r\n\t(\r\n\t\ttmat3x2<T, P> const & m1,\r\n\t\ttmat3x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\tm1[0] + m2[0],\r\n\t\t\tm1[1] + m2[1],\r\n\t\t\tm1[2] + m2[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> operator-\r\n\t(\r\n\t\ttmat3x2<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\tm[0] - s,\r\n\t\t\tm[1] - s,\r\n\t\t\tm[2] - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> operator- \r\n\t(\t\r\n\t\ttmat3x2<T, P> const & m1, \r\n\t\ttmat3x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\tm1[0] - m2[0],\r\n\t\t\tm1[1] - m2[1],\r\n\t\t\tm1[2] - m2[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> operator* \r\n\t(\r\n\t\ttmat3x2<T, P> const & m, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> operator* \r\n\t(\r\n\t\tT const & s, \r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s);\r\n\t}\r\n   \r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type operator* \r\n\t(\r\n\t\ttmat3x2<T, P> const & m, \r\n\t\ttypename tmat3x2<T, P>::row_type const & v)\r\n\t{\r\n\t\treturn typename tmat3x2<T, P>::col_type(\r\n\t\t\tm[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z,\r\n\t\t\tm[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x2<T, P>::row_type operator*\r\n\t(\r\n\t\ttypename tmat3x2<T, P>::col_type const & v,\r\n\t\ttmat3x2<T, P> const & m)\r\n\t{\r\n\t\treturn typename tmat3x2<T, P>::row_type(\r\n\t\t\tv.x * m[0][0] + v.y * m[0][1],\r\n\t\t\tv.x * m[1][0] + v.y * m[1][1],\r\n\t\t\tv.x * m[2][0] + v.y * m[2][1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator*\r\n\t(\r\n\t\ttmat3x2<T, P> const & m1,\r\n\t\ttmat2x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\tconst T SrcA00 = m1[0][0];\r\n\t\tconst T SrcA01 = m1[0][1];\r\n\t\tconst T SrcA10 = m1[1][0];\r\n\t\tconst T SrcA11 = m1[1][1];\r\n\t\tconst T SrcA20 = m1[2][0];\r\n\t\tconst T SrcA21 = m1[2][1];\r\n\r\n\t\tconst T SrcB00 = m2[0][0];\r\n\t\tconst T SrcB01 = m2[0][1];\r\n\t\tconst T SrcB02 = m2[0][2];\r\n\t\tconst T SrcB10 = m2[1][0];\r\n\t\tconst T SrcB11 = m2[1][1];\r\n\t\tconst T SrcB12 = m2[1][2];\r\n\r\n\t\ttmat2x2<T, P> Result(tmat2x2<T, P>::_null);\r\n\t\tResult[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02;\r\n\t\tResult[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02;\r\n\t\tResult[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12;\r\n\t\tResult[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> operator*\r\n\t(\r\n\t\ttmat3x2<T, P> const & m1,\r\n\t\ttmat3x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> operator*\r\n\t(\r\n\t\ttmat3x2<T, P> const & m1,\r\n\t\ttmat4x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2],\r\n\t\t\tm1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2],\r\n\t\t\tm1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> operator/\r\n\t(\r\n\t\ttmat3x2<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\tm[0] / s,\r\n\t\t\tm[1] / s,\r\n\t\t\tm[2] / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> operator/\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\ts / m[0],\r\n\t\t\ts / m[1],\r\n\t\t\ts / m[2]);\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> const operator-\r\n\t(\r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\t-m[0],\r\n\t\t\t-m[1],\r\n\t\t\t-m[2]);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttmat3x2<T, P> const & m1,\r\n\t\ttmat3x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttmat3x2<T, P> const & m1, \r\n\t\ttmat3x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);\r\n\t}\r\n\r\n} //namespace detail\r\n} //namespace glm\r\n"
  },
  {
    "path": "cpu/glm/detail/type_mat3x3.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat3x3.hpp\r\n/// @date 2005-01-27 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_mat3x3\r\n#define glm_core_type_mat3x3\r\n\r\n#include \"../fwd.hpp\"\r\n#include \"type_vec3.hpp\"\r\n#include \"type_mat.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tmat3x3\r\n\t{\r\n\t\tenum ctor{_null};\r\n\t\ttypedef T value_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\ttypedef tvec3<T, P> col_type;\r\n\t\ttypedef tvec3<T, P> row_type;\r\n\t\ttypedef tmat3x3<T, P> type;\r\n\t\ttypedef tmat3x3<T, P> transpose_type;\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tfriend tvec3<U, Q> operator/(tmat3x3<U, Q> const & m, tvec3<U, Q> const & v);\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tfriend tvec3<U, Q> operator/(tvec3<U, Q> const & v, tmat3x3<U, Q> const & m);\r\n\r\n\tprivate:\r\n\t\t/// @cond DETAIL\r\n\t\tcol_type value[3];\r\n\t\t/// @endcond\r\n\t\t\r\n\tpublic:\r\n\t\t// Constructors\r\n\t\tGLM_FUNC_DECL tmat3x3();\r\n\t\tGLM_FUNC_DECL tmat3x3(tmat3x3<T, P> const & m);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tmat3x3(tmat3x3<T, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat3x3(\r\n\t\t\tctor Null);\r\n\t\tGLM_FUNC_DECL explicit tmat3x3(\r\n\t\t\tT const & s);\r\n\t\tGLM_FUNC_DECL tmat3x3(\r\n\t\t\tT const & x0, T const & y0, T const & z0,\r\n\t\t\tT const & x1, T const & y1, T const & z1,\r\n\t\t\tT const & x2, T const & y2, T const & z2);\r\n\t\tGLM_FUNC_DECL tmat3x3(\r\n\t\t\tcol_type const & v0,\r\n\t\t\tcol_type const & v1,\r\n\t\t\tcol_type const & v2);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversions\r\n\t\ttemplate<\r\n\t\t\ttypename X1, typename Y1, typename Z1,\r\n\t\t\ttypename X2, typename Y2, typename Z2,\r\n\t\t\ttypename X3, typename Y3, typename Z3>\r\n\t\tGLM_FUNC_DECL tmat3x3(\r\n\t\t\tX1 const & x1, Y1 const & y1, Z1 const & z1,\r\n\t\t\tX2 const & x2, Y2 const & y2, Z2 const & z2,\r\n\t\t\tX3 const & x3, Y3 const & y3, Z3 const & z3);\r\n\t\t\t\r\n\t\ttemplate <typename V1, typename V2, typename V3>\r\n\t\tGLM_FUNC_DECL tmat3x3(\r\n\t\t\ttvec3<V1, P> const & v1,\r\n\t\t\ttvec3<V2, P> const & v2,\r\n\t\t\ttvec3<V3, P> const & v3);\r\n\r\n\t\t// Matrix conversions\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tmat3x3(tmat3x3<U, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat3x3(tmat2x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x3(tmat4x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x3(tmat2x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x3(tmat3x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x3(tmat2x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x3(tmat4x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x3(tmat3x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x3(tmat4x3<T, P> const & x);\r\n\r\n\t\t// Accesses\r\n\t\tGLM_FUNC_DECL col_type & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL col_type const & operator[](length_t i) const;\r\n\r\n\t\t// Unary updatable operators\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P>& operator=  (tmat3x3<T, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P>& operator=  (tmat3x3<U, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P>& operator+= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P>& operator+= (tmat3x3<U, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P>& operator-= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P>& operator-= (tmat3x3<U, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P>& operator*= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P>& operator*= (tmat3x3<U, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P>& operator/= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P>& operator/= (tmat3x3<U, P> const & m);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P> & operator++ ();\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P> & operator-- ();\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P> operator--(int);\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> compute_inverse_mat3(tmat3x3<T, P> const & m);\r\n\r\n\t// Binary operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator+ (\r\n\t\ttmat3x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator+ (\r\n\t\tT const & s,\r\n\t\ttmat3x3<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator+ (\r\n\t\ttmat3x3<T, P> const & m1,\r\n\t\ttmat3x3<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator- (\r\n\t\ttmat3x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator- (\r\n\t\tT const & s,\r\n\t\ttmat3x3<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator- (\r\n\t\ttmat3x3<T, P> const & m1,\r\n\t\ttmat3x3<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator* (\r\n\t\ttmat3x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator* (\r\n\t\tT const & s,\r\n\t\ttmat3x3<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator* (\r\n\t\ttmat3x3<T, P> const & m,\r\n\t\ttypename tmat3x3<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat3x3<T, P>::row_type operator* (\r\n\t\ttypename tmat3x3<T, P>::col_type const & v,\r\n\t\ttmat3x3<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator* (\r\n\t\ttmat3x3<T, P> const & m1,\r\n\t\ttmat3x3<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> operator* (\r\n\t\ttmat3x3<T, P> const & m1,\r\n\t\ttmat2x3<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> operator* (\r\n\t\ttmat3x3<T, P> const & m1,\r\n\t\ttmat4x3<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator/ (\r\n\t\ttmat3x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator/ (\r\n\t\tT const & s,\r\n\t\ttmat3x3<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator/ (\r\n\t\ttmat3x3<T, P> const & m,\r\n\t\ttypename tmat3x3<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat3x3<T, P>::row_type operator/ (\r\n\t\ttypename tmat3x3<T, P>::col_type const & v,\r\n\t\ttmat3x3<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator/ (\r\n\t\ttmat3x3<T, P> const & m1,\r\n\t\ttmat3x3<T, P> const & m2);\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> const operator-(\r\n\t\ttmat3x3<T, P> const & m);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_mat3x3.inl\"\r\n#endif\r\n\r\n#endif //glm_core_type_mat3x3\r\n"
  },
  {
    "path": "cpu/glm/detail/type_mat3x3.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat3x3.inl\r\n/// @date 2005-01-27 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tmat3x3<T, P>::length() const\r\n\t{\r\n\t\treturn 3;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type &\r\n\ttmat3x3<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t)\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type const &\r\n\ttmat3x3<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t) const\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3()\r\n\t{\r\n\t\tvalue_type const Zero(0);\r\n\t\tvalue_type const One(1);\r\n\t\tthis->value[0] = col_type(One, Zero, Zero);\r\n\t\tthis->value[1] = col_type(Zero, One, Zero);\r\n\t\tthis->value[2] = col_type(Zero, Zero, One);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t\tthis->value[2] = m.value[2];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\tctor\r\n\t)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(\r\n\t\ttmat3x3<T, Q> const & m)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t\tthis->value[2] = m.value[2];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tvalue_type const Zero(0);\r\n\t\tthis->value[0] = col_type(s, Zero, Zero);\r\n\t\tthis->value[1] = col_type(Zero, s, Zero);\r\n\t\tthis->value[2] = col_type(Zero, Zero, s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\tT const & x0, T const & y0, T const & z0,\r\n\t\tT const & x1, T const & y1, T const & z1,\r\n\t\tT const & x2, T const & y2, T const & z2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(x0, y0, z0);\r\n\t\tthis->value[1] = col_type(x1, y1, z1);\r\n\t\tthis->value[2] = col_type(x2, y2, z2);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\tcol_type const & v0,\r\n\t\tcol_type const & v1,\r\n\t\tcol_type const & v2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = v0;\r\n\t\tthis->value[1] = v1;\r\n\t\tthis->value[2] = v2;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion constructors\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <\r\n\t\ttypename X1, typename Y1, typename Z1,\r\n\t\ttypename X2, typename Y2, typename Z2,\r\n\t\ttypename X3, typename Y3, typename Z3>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\tX1 const & x1, Y1 const & y1, Z1 const & z1,\r\n\t\tX2 const & x2, Y2 const & y2, Z2 const & z2,\r\n\t\tX3 const & x3, Y3 const & y3, Z3 const & z3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1));\r\n\t\tthis->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2));\r\n\t\tthis->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename V1, typename V2, typename V3>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\ttvec3<V1, P> const & v1,\r\n\t\ttvec3<V2, P> const & v2,\r\n\t\ttvec3<V3, P> const & v3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(v1);\r\n\t\tthis->value[1] = col_type(v2);\r\n\t\tthis->value[2] = col_type(v3);\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Conversions\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\ttmat3x3<U, Q> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], value_type(0));\r\n\t\tthis->value[1] = col_type(m[1], value_type(0));\r\n\t\tthis->value[2] = col_type(detail::tvec2<T, P>(0), value_type(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = col_type(detail::tvec2<T, P>(0), value_type(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], value_type(0));\r\n\t\tthis->value[1] = col_type(m[1], value_type(0));\r\n\t\tthis->value[2] = col_type(m[2], value_type(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(detail::tvec2<T, P>(0), value_type(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], value_type(0));\r\n\t\tthis->value[1] = col_type(m[1], value_type(0));\r\n\t\tthis->value[2] = col_type(m[2], value_type(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\ttmat4x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Operators\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator= (tmat3x3<T, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator= (tmat3x3<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator+= (U s)\r\n\t{\r\n\t\tthis->value[0] += s;\r\n\t\tthis->value[1] += s;\r\n\t\tthis->value[2] += s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator+= (tmat3x3<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] += m[0];\r\n\t\tthis->value[1] += m[1];\r\n\t\tthis->value[2] += m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator-= (U s)\r\n\t{\r\n\t\tthis->value[0] -= s;\r\n\t\tthis->value[1] -= s;\r\n\t\tthis->value[2] -= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator-= (tmat3x3<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] -= m[0];\r\n\t\tthis->value[1] -= m[1];\r\n\t\tthis->value[2] -= m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator*= (U s)\r\n\t{\r\n\t\tthis->value[0] *= s;\r\n\t\tthis->value[1] *= s;\r\n\t\tthis->value[2] *= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator*= (tmat3x3<U, P> const & m)\r\n\t{\r\n\t\treturn (*this = *this * m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator/= (U s)\r\n\t{\r\n\t\tthis->value[0] /= s;\r\n\t\tthis->value[1] /= s;\r\n\t\tthis->value[2] /= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator/= (tmat3x3<U, P> const & m)\r\n\t{\r\n\t\treturn (*this = *this * detail::compute_inverse<detail::tmat3x3, T, P>::call(m));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator++ ()\r\n\t{\r\n\t\t++this->value[0];\r\n\t\t++this->value[1];\r\n\t\t++this->value[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator--()\r\n\t{\r\n\t\t--this->value[0];\r\n\t\t--this->value[1];\r\n\t\t--this->value[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> tmat3x3<T, P>::operator++(int)\r\n\t{\r\n\t\ttmat3x3<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> tmat3x3<T, P>::operator--(int)\r\n\t{\r\n\t\ttmat3x3<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_inverse<detail::tmat3x3, T, P>\r\n\t{\r\n\t\tstatic detail::tmat3x3<T, P> call(detail::tmat3x3<T, P> const & m)\r\n\t\t{\r\n\t\t\tT OneOverDeterminant = static_cast<T>(1) / (\r\n\t\t\t\t+ m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2])\r\n\t\t\t\t- m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2])\r\n\t\t\t\t+ m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]));\r\n\r\n\t\t\tdetail::tmat3x3<T, P> Inverse(detail::tmat3x3<T, P>::_null);\r\n\t\t\tInverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]) * OneOverDeterminant;\r\n\t\t\tInverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]) * OneOverDeterminant;\r\n\t\t\tInverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]) * OneOverDeterminant;\r\n\t\t\tInverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]) * OneOverDeterminant;\r\n\t\t\tInverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]) * OneOverDeterminant;\r\n\t\t\tInverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]) * OneOverDeterminant;\r\n\t\t\tInverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]) * OneOverDeterminant;\r\n\t\t\tInverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]) * OneOverDeterminant;\r\n\t\t\tInverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]) * OneOverDeterminant;\r\n\r\n\t\t\treturn Inverse;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> compute_inverse_mat3(tmat3x3<T, P> const & m)\r\n\t{\r\n\t\tT S00 = m[0][0];\r\n\t\tT S01 = m[0][1];\r\n\t\tT S02 = m[0][2];\r\n\r\n\t\tT S10 = m[1][0];\r\n\t\tT S11 = m[1][1];\r\n\t\tT S12 = m[1][2];\r\n\r\n\t\tT S20 = m[2][0];\r\n\t\tT S21 = m[2][1];\r\n\t\tT S22 = m[2][2];\r\n/*\r\n\t\ttmat3x3<T, P> Inverse(\r\n\t\t\t+ (S11 * S22 - S21 * S12),\r\n\t\t\t- (S10 * S22 - S20 * S12),\r\n\t\t\t+ (S10 * S21 - S20 * S11),\r\n\t\t\t- (S01 * S22 - S21 * S02),\r\n\t\t\t+ (S00 * S22 - S20 * S02),\r\n\t\t\t- (S00 * S21 - S20 * S01),\r\n\t\t\t+ (S01 * S12 - S11 * S02),\r\n\t\t\t- (S00 * S12 - S10 * S02),\r\n\t\t\t+ (S00 * S11 - S10 * S01));\r\n*/\r\n\t\ttmat3x3<T, P> Inverse(\r\n\t\t\tS11 * S22 - S21 * S12,\r\n\t\t\tS12 * S20 - S22 * S10,\r\n\t\t\tS10 * S21 - S20 * S11,\r\n\t\t\tS02 * S21 - S01 * S22,\r\n\t\t\tS00 * S22 - S02 * S20,\r\n\t\t\tS01 * S20 - S00 * S21,\r\n\t\t\tS12 * S01 - S11 * S02,\r\n\t\t\tS10 * S02 - S12 * S00,\r\n\t\t\tS11 * S00 - S10 * S01);\r\n\r\n\t\tT Determinant = \r\n\t\t\t+ S00 * (S11 * S22 - S21 * S12)\r\n\t\t\t- S10 * (S01 * S22 - S21 * S02)\r\n\t\t\t+ S20 * (S01 * S12 - S11 * S02);\r\n\r\n\t\tInverse /= Determinant;\r\n\t\treturn Inverse;\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Binary operators\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator+ \r\n\t(\r\n\t\ttmat3x3<T, P> const & m, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x3<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s,\r\n\t\t\tm[2] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator+ \r\n\t(\r\n\t\tT const & s, \r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat3x3<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s,\r\n\t\t\tm[2] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator+ \r\n\t(\r\n\t\ttmat3x3<T, P> const & m1, \r\n\t\ttmat3x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x3<T, P>(\r\n\t\t\tm1[0] + m2[0],\r\n\t\t\tm1[1] + m2[1],\r\n\t\t\tm1[2] + m2[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator- \r\n\t(\r\n\t\ttmat3x3<T, P> const & m, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x3<T, P>(\r\n\t\t\tm[0] - s,\r\n\t\t\tm[1] - s,\r\n\t\t\tm[2] - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator- \r\n\t(\r\n\t\tT const & s, \r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat3x3<T, P>(\r\n\t\t\ts - m[0],\r\n\t\t\ts - m[1],\r\n\t\t\ts - m[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator- \r\n\t(\r\n\t\ttmat3x3<T, P> const & m1, \r\n\t\ttmat3x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x3<T, P>(\r\n\t\t\tm1[0] - m2[0],\r\n\t\t\tm1[1] - m2[1],\r\n\t\t\tm1[2] - m2[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator* \r\n\t(\r\n\t\ttmat3x3<T, P> const & m, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x3<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator* \r\n\t(\r\n\t\tT const & s, \r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat3x3<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type operator* \r\n\t(\r\n\t\ttmat3x3<T, P> const & m, \r\n\t\ttypename tmat3x3<T, P>::row_type const & v\r\n\t)\r\n\t{\r\n\t\treturn typename tmat3x3<T, P>::col_type(\r\n\t\t\tm[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z,\r\n\t\t\tm[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z,\r\n\t\t\tm[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER typename tmat3x3<T, P>::row_type operator* \r\n\t(\r\n\t\ttypename tmat3x3<T, P>::col_type const & v, \r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn typename tmat3x3<T, P>::row_type(\r\n\t\t\tm[0][0] * v.x + m[0][1] * v.y + m[0][2] * v.z,\r\n\t\t\tm[1][0] * v.x + m[1][1] * v.y + m[1][2] * v.z,\r\n\t\t\tm[2][0] * v.x + m[2][1] * v.y + m[2][2] * v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator* \r\n\t(\r\n\t\ttmat3x3<T, P> const & m1, \r\n\t\ttmat3x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\tT const SrcA00 = m1[0][0];\r\n\t\tT const SrcA01 = m1[0][1];\r\n\t\tT const SrcA02 = m1[0][2];\r\n\t\tT const SrcA10 = m1[1][0];\r\n\t\tT const SrcA11 = m1[1][1];\r\n\t\tT const SrcA12 = m1[1][2];\r\n\t\tT const SrcA20 = m1[2][0];\r\n\t\tT const SrcA21 = m1[2][1];\r\n\t\tT const SrcA22 = m1[2][2];\r\n\r\n\t\tT const SrcB00 = m2[0][0];\r\n\t\tT const SrcB01 = m2[0][1];\r\n\t\tT const SrcB02 = m2[0][2];\r\n\t\tT const SrcB10 = m2[1][0];\r\n\t\tT const SrcB11 = m2[1][1];\r\n\t\tT const SrcB12 = m2[1][2];\r\n\t\tT const SrcB20 = m2[2][0];\r\n\t\tT const SrcB21 = m2[2][1];\r\n\t\tT const SrcB22 = m2[2][2];\r\n\r\n\t\ttmat3x3<T, P> Result(tmat3x3<T, P>::_null);\r\n\t\tResult[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02;\r\n\t\tResult[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02;\r\n\t\tResult[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02;\r\n\t\tResult[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12;\r\n\t\tResult[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12;\r\n\t\tResult[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11 + SrcA22 * SrcB12;\r\n\t\tResult[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21 + SrcA20 * SrcB22;\r\n\t\tResult[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21 + SrcA21 * SrcB22;\r\n\t\tResult[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21 + SrcA22 * SrcB22;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> operator*\r\n\t(\r\n\t\ttmat3x3<T, P> const & m1,\r\n\t\ttmat2x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> operator*\r\n\t(\r\n\t\ttmat3x3<T, P> const & m1,\r\n\t\ttmat4x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2],\r\n\t\t\tm1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2],\r\n\t\t\tm1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2],\r\n\t\t\tm1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2],\r\n\t\t\tm1[0][2] * m2[3][0] + m1[1][2] * m2[3][1] + m1[2][2] * m2[3][2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator/\r\n\t(\r\n\t\ttmat3x3<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x3<T, P>(\r\n\t\t\tm[0] / s,\r\n\t\t\tm[1] / s,\r\n\t\t\tm[2] / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator/\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat3x3<T, P>(\r\n\t\t\ts / m[0],\r\n\t\t\ts / m[1],\r\n\t\t\ts / m[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type operator/\r\n\t(\r\n\t\ttmat3x3<T, P> const & m,\r\n\t\ttypename tmat3x3<T, P>::row_type const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::compute_inverse<detail::tmat3x3, T, P>::call(m) * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x3<T, P>::row_type operator/\r\n\t(\r\n\t\ttypename tmat3x3<T, P>::col_type const & v,\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn v * detail::compute_inverse<detail::tmat3x3, T, P>::call(m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator/\r\n\t(\r\n\t\ttmat3x3<T, P> const & m1,\r\n\t\ttmat3x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\ttmat3x3<T, P> m1_copy(m1);\r\n\t\treturn m1_copy /= m2;\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> const operator-\r\n\t(\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat3x3<T, P>(\r\n\t\t\t-m[0], \r\n\t\t\t-m[1],\r\n\t\t\t-m[2]);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttmat3x3<T, P> const & m1,\r\n\t\ttmat3x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttmat3x3<T, P> const & m1,\r\n\t\ttmat3x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);\r\n\t}\r\n\r\n} //namespace detail\r\n} //namespace glm\r\n"
  },
  {
    "path": "cpu/glm/detail/type_mat3x4.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat3x4.hpp\r\n/// @date 2006-08-05 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_mat3x4\r\n#define glm_core_type_mat3x4\r\n\r\n#include \"../fwd.hpp\"\r\n#include \"type_vec3.hpp\"\r\n#include \"type_vec4.hpp\"\r\n#include \"type_mat.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tmat3x4\r\n\t{\r\n\t\tenum ctor{_null};\r\n\t\ttypedef T value_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\ttypedef tvec4<T, P> col_type;\r\n\t\ttypedef tvec3<T, P> row_type;\r\n\t\ttypedef tmat3x4<T, P> type;\r\n\t\ttypedef tmat4x3<T, P> transpose_type;\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\tprivate:\r\n\t\t// Data \r\n\t\tcol_type value[3];\r\n\r\n\tpublic:\r\n\t\t// Constructors\r\n\t\tGLM_FUNC_DECL tmat3x4();\r\n\t\tGLM_FUNC_DECL tmat3x4(tmat3x4<T, P> const & m);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tmat3x4(tmat3x4<T, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat3x4(\r\n\t\t\tctor Null);\r\n\t\tGLM_FUNC_DECL explicit tmat3x4(\r\n\t\t\tT const & s);\r\n\t\tGLM_FUNC_DECL tmat3x4(\r\n\t\t\tT const & x0, T const & y0, T const & z0, T const & w0,\r\n\t\t\tT const & x1, T const & y1, T const & z1, T const & w1,\r\n\t\t\tT const & x2, T const & y2, T const & z2, T const & w2);\r\n\t\tGLM_FUNC_DECL tmat3x4(\r\n\t\t\tcol_type const & v0,\r\n\t\t\tcol_type const & v1,\r\n\t\t\tcol_type const & v2);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversions\r\n\t\ttemplate<\r\n\t\t\ttypename X1, typename Y1, typename Z1, typename W1,\r\n\t\t\ttypename X2, typename Y2, typename Z2, typename W2,\r\n\t\t\ttypename X3, typename Y3, typename Z3, typename W3>\r\n\t\tGLM_FUNC_DECL tmat3x4(\r\n\t\t\tX1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,\r\n\t\t\tX2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,\r\n\t\t\tX3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3);\r\n\t\t\t\r\n\t\ttemplate <typename V1, typename V2, typename V3>\r\n\t\tGLM_FUNC_DECL tmat3x4(\r\n\t\t\ttvec4<V1, P> const & v1,\r\n\t\t\ttvec4<V2, P> const & v2,\r\n\t\t\ttvec4<V3, P> const & v3);\r\n\r\n\t\t// Matrix conversion\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tmat3x4(tmat3x4<U, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat3x4(tmat2x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x4(tmat3x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x4(tmat4x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x4(tmat2x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x4(tmat3x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x4(tmat2x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x4(tmat4x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x4(tmat4x3<T, P> const & x);\r\n\r\n\t\t// Accesses\r\n\t\tGLM_FUNC_DECL col_type & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL col_type const & operator[](length_t i) const;\r\n\r\n\t\t// Unary updatable operators\r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> & operator=  (tmat3x4<T, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> & operator=  (tmat3x4<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> & operator+= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> & operator+= (tmat3x4<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> & operator-= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> & operator-= (tmat3x4<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> & operator*= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> & operator/= (U s);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> & operator++ ();\r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> & operator-- ();\r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> operator--(int);\r\n\t};\r\n\r\n\t// Binary operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> operator+ (\r\n\t\ttmat3x4<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> operator+ (\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> operator- (\r\n\t\ttmat3x4<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> operator- (\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> operator* (\r\n\t\ttmat3x4<T, P> const & m, \r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> operator* (\r\n\t\tT const & s,\r\n\t\ttmat3x4<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat3x4<T, P>::col_type operator* (\r\n\t\ttmat3x4<T, P> const & m,\r\n\t\ttypename tmat3x4<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_DECL typename tmat3x4<T, P>::row_type operator* (\r\n\t\ttypename tmat3x4<T, P>::col_type const & v,\r\n\t\ttmat3x4<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator* (\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat4x3<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x4<T, P> operator* (\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat2x3<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> operator* (\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat3x3<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> operator/ (\r\n\t\ttmat3x4<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> operator/ (\r\n\t\tT const & s,\r\n\t\ttmat3x4<T, P> const & m);\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> const operator-(\r\n\t\ttmat3x4<T, P> const & m);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_mat3x4.inl\"\r\n#endif\r\n\r\n#endif //glm_core_type_mat3x4\r\n"
  },
  {
    "path": "cpu/glm/detail/type_mat3x4.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat3x4.inl\r\n/// @date 2006-08-05 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tmat3x4<T, P>::length() const\r\n\t{\r\n\t\treturn 3;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type &\r\n\ttmat3x4<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t)\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type const &\r\n\ttmat3x4<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t) const\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4()\r\n\t{\r\n\t\tthis->value[0] = col_type(1, 0, 0, 0);\r\n\t\tthis->value[1] = col_type(0, 1, 0, 0);\r\n\t\tthis->value[2] = col_type(0, 0, 1, 0);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t\tthis->value[2] = m.value[2];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(\r\n\t\ttmat3x4<T, Q> const & m)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t\tthis->value[2] = m.value[2];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\tctor\r\n\t)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tvalue_type const Zero(0);\r\n\t\tthis->value[0] = col_type(s, Zero, Zero, Zero);\r\n\t\tthis->value[1] = col_type(Zero, s, Zero, Zero);\r\n\t\tthis->value[2] = col_type(Zero, Zero, s, Zero);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\tT const & x0, T const & y0, T const & z0, T const & w0,\r\n\t\tT const & x1, T const & y1, T const & z1, T const & w1,\r\n\t\tT const & x2, T const & y2, T const & z2, T const & w2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(x0, y0, z0, w0);\r\n\t\tthis->value[1] = col_type(x1, y1, z1, w1);\r\n\t\tthis->value[2] = col_type(x2, y2, z2, w2);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\tcol_type const & v0,\r\n\t\tcol_type const & v1,\r\n\t\tcol_type const & v2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = v0;\r\n\t\tthis->value[1] = v1;\r\n\t\tthis->value[2] = v2;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion constructors\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <\r\n\t\ttypename X1, typename Y1, typename Z1, typename W1,\r\n\t\ttypename X2, typename Y2, typename Z2, typename W2,\r\n\t\ttypename X3, typename Y3, typename Z3, typename W3>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\tX1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,\r\n\t\tX2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,\r\n\t\tX3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1), value_type(w1));\r\n\t\tthis->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2), value_type(w2));\r\n\t\tthis->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3), value_type(w3));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename V1, typename V2, typename V3>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\ttvec4<V1, P> const & v1,\r\n\t\ttvec4<V2, P> const & v2,\r\n\t\ttvec4<V3, P> const & v3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(v1);\r\n\t\tthis->value[1] = col_type(v2);\r\n\t\tthis->value[2] = col_type(v3);\r\n\t}\r\n\t\r\n\t// Conversion\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\ttmat3x4<U, Q> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], detail::tvec2<T, P>(0));\r\n\t\tthis->value[1] = col_type(m[1], detail::tvec2<T, P>(0));\r\n\t\tthis->value[2] = col_type(T(0), T(0), T(1), T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], T(0));\r\n\t\tthis->value[1] = col_type(m[1], T(0));\r\n\t\tthis->value[2] = col_type(m[2], T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], T(0));\r\n\t\tthis->value[1] = col_type(m[1], T(0));\r\n\t\tthis->value[2] = col_type(T(0), T(0), T(1), T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], detail::tvec2<T, P>(0));\r\n\t\tthis->value[1] = col_type(m[1], detail::tvec2<T, P>(0));\r\n\t\tthis->value[2] = col_type(m[2], T(0), T(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(T(0), T(0), T(1), T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], detail::tvec2<T, P>(T(0)));\r\n\t\tthis->value[1] = col_type(m[1], detail::tvec2<T, P>(T(0)));\r\n\t\tthis->value[2] = col_type(m[2], detail::tvec2<T, P>(T(1), T(0)));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\ttmat4x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], T(0));\r\n\t\tthis->value[1] = col_type(m[1], T(0));\r\n\t\tthis->value[2] = col_type(m[2], T(0));\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Unary updatable operators\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator= (tmat3x4<T, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator= (tmat3x4<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator+= (U s)\r\n\t{\r\n\t\tthis->value[0] += s;\r\n\t\tthis->value[1] += s;\r\n\t\tthis->value[2] += s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator+= (tmat3x4<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] += m[0];\r\n\t\tthis->value[1] += m[1];\r\n\t\tthis->value[2] += m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator-= (U s)\r\n\t{\r\n\t\tthis->value[0] -= s;\r\n\t\tthis->value[1] -= s;\r\n\t\tthis->value[2] -= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator-= (tmat3x4<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] -= m[0];\r\n\t\tthis->value[1] -= m[1];\r\n\t\tthis->value[2] -= m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator*= (U s)\r\n\t{\r\n\t\tthis->value[0] *= s;\r\n\t\tthis->value[1] *= s;\r\n\t\tthis->value[2] *= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> & tmat3x4<T, P>::operator/= (U s)\r\n\t{\r\n\t\tthis->value[0] /= s;\r\n\t\tthis->value[1] /= s;\r\n\t\tthis->value[2] /= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator++ ()\r\n\t{\r\n\t\t++this->value[0];\r\n\t\t++this->value[1];\r\n\t\t++this->value[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator-- ()\r\n\t{\r\n\t\t--this->value[0];\r\n\t\t--this->value[1];\r\n\t\t--this->value[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> tmat3x4<T, P>::operator++(int)\r\n\t{\r\n\t\ttmat3x4<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> tmat3x4<T, P>::operator--(int)\r\n\t{\r\n\t\ttmat3x4<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Binary operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> operator+\r\n\t(\r\n\t\ttmat3x4<T, P> const & m, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s,\r\n\t\t\tm[2] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> operator+\r\n\t(\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\tm1[0] + m2[0],\r\n\t\t\tm1[1] + m2[1],\r\n\t\t\tm1[2] + m2[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> operator-\r\n\t(\r\n\t\ttmat3x4<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\tm[0] - s,\r\n\t\t\tm[1] - s,\r\n\t\t\tm[2] - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> operator-\r\n\t(\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\tm1[0] - m2[0],\r\n\t\t\tm1[1] - m2[1],\r\n\t\t\tm1[2] - m2[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> operator*\r\n\t(\r\n\t\ttmat3x4<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> operator*\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type operator*\r\n\t(\r\n\t\ttmat3x4<T, P> const & m,\r\n\t\ttypename tmat3x4<T, P>::row_type const & v\r\n\t)\r\n\t{\r\n\t\treturn typename tmat3x4<T, P>::col_type(\r\n\t\t\tm[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z,\r\n\t\t\tm[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z,\r\n\t\t\tm[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z,\r\n\t\t\tm[0][3] * v.x + m[1][3] * v.y + m[2][3] * v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x4<T, P>::row_type operator*\r\n\t(\r\n\t\ttypename tmat3x4<T, P>::col_type const & v,\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn typename tmat3x4<T, P>::row_type(\r\n\t\t\tv.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2] + v.w * m[0][3],\r\n\t\t\tv.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2] + v.w * m[1][3],\r\n\t\t\tv.x * m[2][0] + v.y * m[2][1] + v.z * m[2][2] + v.w * m[2][3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator*\r\n\t(\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat4x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\tconst T SrcA00 = m1[0][0];\r\n\t\tconst T SrcA01 = m1[0][1];\r\n\t\tconst T SrcA02 = m1[0][2];\r\n\t\tconst T SrcA03 = m1[0][3];\r\n\t\tconst T SrcA10 = m1[1][0];\r\n\t\tconst T SrcA11 = m1[1][1];\r\n\t\tconst T SrcA12 = m1[1][2];\r\n\t\tconst T SrcA13 = m1[1][3];\r\n\t\tconst T SrcA20 = m1[2][0];\r\n\t\tconst T SrcA21 = m1[2][1];\r\n\t\tconst T SrcA22 = m1[2][2];\r\n\t\tconst T SrcA23 = m1[2][3];\r\n\r\n\t\tconst T SrcB00 = m2[0][0];\r\n\t\tconst T SrcB01 = m2[0][1];\r\n\t\tconst T SrcB02 = m2[0][2];\r\n\t\tconst T SrcB10 = m2[1][0];\r\n\t\tconst T SrcB11 = m2[1][1];\r\n\t\tconst T SrcB12 = m2[1][2];\r\n\t\tconst T SrcB20 = m2[2][0];\r\n\t\tconst T SrcB21 = m2[2][1];\r\n\t\tconst T SrcB22 = m2[2][2];\r\n\t\tconst T SrcB30 = m2[3][0];\r\n\t\tconst T SrcB31 = m2[3][1];\r\n\t\tconst T SrcB32 = m2[3][2];\r\n\r\n\t\ttmat4x4<T, P> Result(tmat4x4<T, P>::_null);\r\n\t\tResult[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02;\r\n\t\tResult[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02;\r\n\t\tResult[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02;\r\n\t\tResult[0][3] = SrcA03 * SrcB00 + SrcA13 * SrcB01 + SrcA23 * SrcB02;\r\n\t\tResult[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12;\r\n\t\tResult[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12;\r\n\t\tResult[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11 + SrcA22 * SrcB12;\r\n\t\tResult[1][3] = SrcA03 * SrcB10 + SrcA13 * SrcB11 + SrcA23 * SrcB12;\r\n\t\tResult[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21 + SrcA20 * SrcB22;\r\n\t\tResult[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21 + SrcA21 * SrcB22;\r\n\t\tResult[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21 + SrcA22 * SrcB22;\r\n\t\tResult[2][3] = SrcA03 * SrcB20 + SrcA13 * SrcB21 + SrcA23 * SrcB22;\r\n\t\tResult[3][0] = SrcA00 * SrcB30 + SrcA10 * SrcB31 + SrcA20 * SrcB32;\r\n\t\tResult[3][1] = SrcA01 * SrcB30 + SrcA11 * SrcB31 + SrcA21 * SrcB32;\r\n\t\tResult[3][2] = SrcA02 * SrcB30 + SrcA12 * SrcB31 + SrcA22 * SrcB32;\r\n\t\tResult[3][3] = SrcA03 * SrcB30 + SrcA13 * SrcB31 + SrcA23 * SrcB32;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> operator*\r\n\t(\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat2x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2],\r\n\t\t\tm1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2],\r\n\t\t\tm1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> operator*\r\n\t(\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat3x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2],\r\n\t\t\tm1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2],\r\n\t\t\tm1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2],\r\n\t\t\tm1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2],\r\n\t\t\tm1[0][3] * m2[2][0] + m1[1][3] * m2[2][1] + m1[2][3] * m2[2][2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> operator/\r\n\t(\r\n\t\ttmat3x4<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\tm[0] / s,\r\n\t\t\tm[1] / s,\r\n\t\t\tm[2] / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> operator/\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\ts / m[0],\r\n\t\t\ts / m[1],\r\n\t\t\ts / m[2]);\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> const operator-\r\n\t(\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\t-m[0],\r\n\t\t\t-m[1],\r\n\t\t\t-m[2]);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);\r\n\t}\r\n} //namespace detail\r\n} //namespace glm\r\n"
  },
  {
    "path": "cpu/glm/detail/type_mat4x2.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat4x2.hpp\r\n/// @date 2006-10-01 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_mat4x2\r\n#define glm_core_type_mat4x2\r\n\r\n#include \"../fwd.hpp\"\r\n#include \"type_vec2.hpp\"\r\n#include \"type_vec4.hpp\"\r\n#include \"type_mat.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tmat4x2\r\n\t{\r\n\t\tenum ctor{_null};\r\n\t\ttypedef T value_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\ttypedef tvec2<T, P> col_type;\r\n\t\ttypedef tvec4<T, P> row_type;\r\n\t\ttypedef tmat4x2<T, P> type;\r\n\t\ttypedef tmat2x4<T, P> transpose_type;\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\tprivate:\r\n\t\t// Data \r\n\t\tcol_type value[4];\r\n\r\n\tpublic:\r\n\t\t// Constructors\r\n\t\tGLM_FUNC_DECL tmat4x2();\r\n\t\tGLM_FUNC_DECL tmat4x2(tmat4x2<T, P> const & m);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tmat4x2(tmat4x2<T, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat4x2(\r\n\t\t\tctor Null);\r\n\t\tGLM_FUNC_DECL explicit tmat4x2(\r\n\t\t\tT const & x);\r\n\t\tGLM_FUNC_DECL tmat4x2(\r\n\t\t\tT const & x0, T const & y0,\r\n\t\t\tT const & x1, T const & y1,\r\n\t\t\tT const & x2, T const & y2,\r\n\t\t\tT const & x3, T const & y3);\r\n\t\tGLM_FUNC_DECL tmat4x2(\r\n\t\t\tcol_type const & v0, \r\n\t\t\tcol_type const & v1,\r\n\t\t\tcol_type const & v2,\r\n\t\t\tcol_type const & v3);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversions\r\n\r\n\t\ttemplate<\r\n\t\t\ttypename X1, typename Y1,\r\n\t\t\ttypename X2, typename Y2,\r\n\t\t\ttypename X3, typename Y3,\r\n\t\t\ttypename X4, typename Y4>\r\n\t\tGLM_FUNC_DECL tmat4x2(\r\n\t\t\tX1 const & x1, Y1 const & y1,\r\n\t\t\tX2 const & x2, Y2 const & y2,\r\n\t\t\tX3 const & x3, Y3 const & y3,\r\n\t\t\tX4 const & x4, Y4 const & y4);\r\n\r\n\t\ttemplate <typename V1, typename V2, typename V3, typename V4>\r\n\t\tGLM_FUNC_DECL tmat4x2(\r\n\t\t\ttvec2<V1, P> const & v1,\r\n\t\t\ttvec2<V2, P> const & v2,\r\n\t\t\ttvec2<V3, P> const & v3,\r\n\t\t\ttvec2<V4, P> const & v4);\r\n\r\n\t\t// Matrix conversions\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tmat4x2(tmat4x2<U, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat4x2(tmat2x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x2(tmat3x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x2(tmat4x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x2(tmat2x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x2(tmat3x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x2(tmat2x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x2(tmat4x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x2(tmat3x4<T, P> const & x);\r\n\r\n\t\t// Accesses\r\n\t\tGLM_FUNC_DECL col_type & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL col_type const & operator[](length_t i) const;\r\n\r\n\t\t// Unary updatable operators\r\n\t\tGLM_FUNC_DECL tmat4x2<T, P>& operator=  (tmat4x2<T, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat4x2<T, P>& operator=  (tmat4x2<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat4x2<T, P>& operator+= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat4x2<T, P>& operator+= (tmat4x2<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat4x2<T, P>& operator-= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat4x2<T, P>& operator-= (tmat4x2<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat4x2<T, P>& operator*= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat4x2<T, P>& operator/= (U s);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tmat4x2<T, P> & operator++ ();\r\n\t\tGLM_FUNC_DECL tmat4x2<T, P> & operator-- ();\r\n\t\tGLM_FUNC_DECL tmat4x2<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tmat4x2<T, P> operator--(int);\r\n\t};\r\n\r\n\t// Binary operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> operator+ (\r\n\t\ttmat4x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> operator+ (\r\n\t\ttmat4x2<T, P> const & m1,\r\n\t\ttmat4x2<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> operator- (\r\n\t\ttmat4x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> operator- (\r\n\t\ttmat4x2<T, P> const & m1,\r\n\t\ttmat4x2<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> operator* (\r\n\t\ttmat4x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> operator* (\r\n\t\tT const & s,\r\n\t\ttmat4x2<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat4x2<T, P>::col_type operator* (\r\n\t\ttmat4x2<T, P> const & m,\r\n\t\ttypename tmat4x2<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat4x2<T, P>::row_type operator* (\r\n\t\ttypename tmat4x2<T, P>::col_type const & v,\r\n\t\ttmat4x2<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> operator* (\r\n\t\ttmat4x2<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> operator* (\r\n\t\ttmat4x2<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> operator* (\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> operator/ (\r\n\t\ttmat4x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> operator/ (\r\n\t\tT const & s,\r\n\t\ttmat4x2<T, P> const & m);\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> const operator-(\r\n\t\ttmat4x2<T, P> const & m);\r\n\t\t\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_mat4x2.inl\"\r\n#endif\r\n\r\n#endif //glm_core_type_mat4x2\r\n"
  },
  {
    "path": "cpu/glm/detail/type_mat4x2.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat4x2.inl\r\n/// @date 2006-10-01 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tmat4x2<T, P>::length() const\r\n\t{\r\n\t\treturn 4;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type &\r\n\ttmat4x2<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t)\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type const &\r\n\ttmat4x2<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t) const\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Constructors\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2()\r\n\t{\r\n\t\tvalue_type const Zero(0);\r\n\t\tvalue_type const One(1);\r\n\t\tthis->value[0] = col_type(One, Zero);\r\n\t\tthis->value[1] = col_type(Zero, One);\r\n\t\tthis->value[2] = col_type(Zero, Zero);\r\n\t\tthis->value[3] = col_type(Zero, Zero);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(\r\n\t\ttmat4x2<T, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t\tthis->value[2] = m.value[2];\r\n\t\tthis->value[3] = m.value[3];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(\r\n\t\ttmat4x2<T, Q> const & m)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t\tthis->value[2] = m.value[2];\r\n\t\tthis->value[3] = m.value[3];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(ctor)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tvalue_type const Zero(0);\r\n\t\tthis->value[0] = col_type(s, Zero);\r\n\t\tthis->value[1] = col_type(Zero, s);\r\n\t\tthis->value[2] = col_type(Zero, Zero);\r\n\t\tthis->value[3] = col_type(Zero, Zero);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\tT const & x0, T const & y0,\r\n\t\tT const & x1, T const & y1,\r\n\t\tT const & x2, T const & y2,\r\n\t\tT const & x3, T const & y3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(x0, y0);\r\n\t\tthis->value[1] = col_type(x1, y1);\r\n\t\tthis->value[2] = col_type(x2, y2);\r\n\t\tthis->value[3] = col_type(x3, y3);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\tcol_type const & v0,\r\n\t\tcol_type const & v1,\r\n\t\tcol_type const & v2,\r\n\t\tcol_type const & v3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = v0;\r\n\t\tthis->value[1] = v1;\r\n\t\tthis->value[2] = v2;\r\n\t\tthis->value[3] = v3;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <\r\n\t\ttypename X1, typename Y1,\r\n\t\ttypename X2, typename Y2,\r\n\t\ttypename X3, typename Y3,\r\n\t\ttypename X4, typename Y4>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\tX1 const & x1, Y1 const & y1,\r\n\t\tX2 const & x2, Y2 const & y2,\r\n\t\tX3 const & x3, Y3 const & y3,\r\n\t\tX4 const & x4, Y4 const & y4\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(static_cast<T>(x1), value_type(y1));\r\n\t\tthis->value[1] = col_type(static_cast<T>(x2), value_type(y2));\r\n\t\tthis->value[2] = col_type(static_cast<T>(x3), value_type(y3));\r\n\t\tthis->value[3] = col_type(static_cast<T>(x4), value_type(y4));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename V1, typename V2, typename V3, typename V4>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\ttvec2<V1, P> const & v1,\r\n\t\ttvec2<V2, P> const & v2,\r\n\t\ttvec2<V3, P> const & v3,\r\n\t\ttvec2<V4, P> const & v4\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(v1);\r\n\t\tthis->value[1] = col_type(v2);\r\n\t\tthis->value[2] = col_type(v3);\r\n\t\tthis->value[3] = col_type(v4);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\ttmat4x2<U, Q> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t\tthis->value[3] = col_type(m[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(static_cast<T>(0));\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t\tthis->value[3] = col_type(m[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(static_cast<T>(0));\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(static_cast<T>(0));\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\ttmat4x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t\tthis->value[3] = col_type(m[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Unary updatable operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>& tmat4x2<T, P>::operator=\r\n\t(\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\tthis->value[3] = m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>& tmat4x2<T, P>::operator=\r\n\t(\r\n\t\ttmat4x2<U, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\tthis->value[3] = m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator+= (U s)\r\n\t{\r\n\t\tthis->value[0] += s;\r\n\t\tthis->value[1] += s;\r\n\t\tthis->value[2] += s;\r\n\t\tthis->value[3] += s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator+= (tmat4x2<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] += m[0];\r\n\t\tthis->value[1] += m[1];\r\n\t\tthis->value[2] += m[2];\r\n\t\tthis->value[3] += m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator-= (U s)\r\n\t{\r\n\t\tthis->value[0] -= s;\r\n\t\tthis->value[1] -= s;\r\n\t\tthis->value[2] -= s;\r\n\t\tthis->value[3] -= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator-= (tmat4x2<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] -= m[0];\r\n\t\tthis->value[1] -= m[1];\r\n\t\tthis->value[2] -= m[2];\r\n\t\tthis->value[3] -= m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator*= (U s)\r\n\t{\r\n\t\tthis->value[0] *= s;\r\n\t\tthis->value[1] *= s;\r\n\t\tthis->value[2] *= s;\r\n\t\tthis->value[3] *= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator/= (U s)\r\n\t{\r\n\t\tthis->value[0] /= s;\r\n\t\tthis->value[1] /= s;\r\n\t\tthis->value[2] /= s;\r\n\t\tthis->value[3] /= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator++ ()\r\n\t{\r\n\t\t++this->value[0];\r\n\t\t++this->value[1];\r\n\t\t++this->value[2];\r\n\t\t++this->value[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator-- ()\r\n\t{\r\n\t\t--this->value[0];\r\n\t\t--this->value[1];\r\n\t\t--this->value[2];\r\n\t\t--this->value[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> tmat4x2<T, P>::operator++(int)\r\n\t{\r\n\t\ttmat4x2<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> tmat4x2<T, P>::operator--(int)\r\n\t{\r\n\t\ttmat4x2<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Binary operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> operator+\r\n\t(\r\n\t\ttmat4x2<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s,\r\n\t\t\tm[2] + s,\r\n\t\t\tm[3] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> operator+\r\n\t(\t\r\n\t\ttmat4x2<T, P> const & m1,\r\n\t\ttmat4x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\tm1[0] + m2[0],\r\n\t\t\tm1[1] + m2[1],\r\n\t\t\tm1[2] + m2[2],\r\n\t\t\tm1[3] + m2[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> operator-\r\n\t(\r\n\t\ttmat4x2<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\tm[0] - s,\r\n\t\t\tm[1] - s,\r\n\t\t\tm[2] - s,\r\n\t\t\tm[3] - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> operator-\r\n\t(\t\r\n\t\ttmat4x2<T, P> const & m1,\r\n\t\ttmat4x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\tm1[0] - m2[0],\r\n\t\t\tm1[1] - m2[1],\r\n\t\t\tm1[2] - m2[2],\r\n\t\t\tm1[3] - m2[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> operator*\r\n\t(\r\n\t\ttmat4x2<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s,\r\n\t\t\tm[3] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> operator*\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s,\r\n\t\t\tm[3] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type operator*\r\n\t(\r\n\t\ttmat4x2<T, P> const & m,\r\n\t\ttypename tmat4x2<T, P>::row_type const & v\r\n\t)\r\n\t{\r\n\t\treturn typename tmat4x2<T, P>::col_type(\r\n\t\t\tm[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w,\r\n\t\t\tm[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x2<T, P>::row_type operator*\r\n\t(\r\n\t\ttypename tmat4x2<T, P>::col_type const & v,\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn typename tmat4x2<T, P>::row_type(\r\n\t\t\tv.x * m[0][0] + v.y * m[0][1],\r\n\t\t\tv.x * m[1][0] + v.y * m[1][1],\r\n\t\t\tv.x * m[2][0] + v.y * m[2][1],\r\n\t\t\tv.x * m[3][0] + v.y * m[3][1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator*\r\n\t(\r\n\t\ttmat4x2<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\tT const SrcA00 = m1[0][0];\r\n\t\tT const SrcA01 = m1[0][1];\r\n\t\tT const SrcA10 = m1[1][0];\r\n\t\tT const SrcA11 = m1[1][1];\r\n\t\tT const SrcA20 = m1[2][0];\r\n\t\tT const SrcA21 = m1[2][1];\r\n\t\tT const SrcA30 = m1[3][0];\r\n\t\tT const SrcA31 = m1[3][1];\r\n\r\n\t\tT const SrcB00 = m2[0][0];\r\n\t\tT const SrcB01 = m2[0][1];\r\n\t\tT const SrcB02 = m2[0][2];\r\n\t\tT const SrcB03 = m2[0][3];\r\n\t\tT const SrcB10 = m2[1][0];\r\n\t\tT const SrcB11 = m2[1][1];\r\n\t\tT const SrcB12 = m2[1][2];\r\n\t\tT const SrcB13 = m2[1][3];\r\n\r\n\t\ttmat2x2<T, P> Result(tmat2x2<T, P>::_null);\r\n\t\tResult[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02 + SrcA30 * SrcB03;\r\n\t\tResult[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02 + SrcA31 * SrcB03;\r\n\t\tResult[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12 + SrcA30 * SrcB13;\r\n\t\tResult[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12 + SrcA31 * SrcB13;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> operator*\r\n\t(\r\n\t\ttmat4x2<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> operator*\r\n\t(\r\n\t\ttmat4x2<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3],\r\n\t\t\tm1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2] + m1[3][0] * m2[3][3],\r\n\t\t\tm1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2] + m1[3][1] * m2[3][3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> operator/\r\n\t(\r\n\t\ttmat4x2<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\tm[0] / s,\r\n\t\t\tm[1] / s,\r\n\t\t\tm[2] / s,\r\n\t\t\tm[3] / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> operator/\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\ts / m[0],\r\n\t\t\ts / m[1],\r\n\t\t\ts / m[2],\r\n\t\t\ts / m[3]);\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> const operator-\r\n\t(\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\t-m[0], \r\n\t\t\t-m[1], \r\n\t\t\t-m[2], \r\n\t\t\t-m[3]);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttmat4x2<T, P> const & m1,\r\n\t\ttmat4x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttmat4x2<T, P> const & m1,\r\n\t\ttmat4x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);\r\n\t}\r\n} //namespace detail\r\n} //namespace glm\r\n"
  },
  {
    "path": "cpu/glm/detail/type_mat4x3.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat4x3.hpp\r\n/// @date 2006-08-04 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_mat4x3\r\n#define glm_core_type_mat4x3\r\n\r\n#include \"../fwd.hpp\"\r\n#include \"type_vec3.hpp\"\r\n#include \"type_vec4.hpp\"\r\n#include \"type_mat.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tmat4x3\r\n\t{\r\n\t\tenum ctor{_null};\r\n\t\ttypedef T value_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\ttypedef tvec3<T, P> col_type;\r\n\t\ttypedef tvec4<T, P> row_type;\r\n\t\ttypedef tmat4x3<T, P> type;\r\n\t\ttypedef tmat3x4<T, P> transpose_type;\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\tprivate:\r\n\t\t// Data \r\n\t\tcol_type value[4];\r\n\r\n\tpublic:\r\n\t\t// Constructors\r\n\t\tGLM_FUNC_DECL tmat4x3();\r\n\t\tGLM_FUNC_DECL tmat4x3(tmat4x3<T, P> const & m);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tmat4x3(tmat4x3<T, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat4x3(\r\n\t\t\tctor Null);\r\n\t\tGLM_FUNC_DECL explicit tmat4x3(\r\n\t\t\tT const & x);\r\n\t\tGLM_FUNC_DECL tmat4x3(\r\n\t\t\tT const & x0, T const & y0, T const & z0,\r\n\t\t\tT const & x1, T const & y1, T const & z1,\r\n\t\t\tT const & x2, T const & y2, T const & z2,\r\n\t\t\tT const & x3, T const & y3, T const & z3);\r\n\t\tGLM_FUNC_DECL tmat4x3(\r\n\t\t\tcol_type const & v0,\r\n\t\t\tcol_type const & v1,\r\n\t\t\tcol_type const & v2,\r\n\t\t\tcol_type const & v3);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversions\r\n\r\n\t\ttemplate <\r\n\t\t\ttypename X1, typename Y1, typename Z1,\r\n\t\t\ttypename X2, typename Y2, typename Z2,\r\n\t\t\ttypename X3, typename Y3, typename Z3,\r\n\t\t\ttypename X4, typename Y4, typename Z4>\r\n\t\tGLM_FUNC_DECL tmat4x3(\r\n\t\t\tX1 const & x1, Y1 const & y1, Z1 const & z1,\r\n\t\t\tX2 const & x2, Y2 const & y2, Z2 const & z2,\r\n\t\t\tX3 const & x3, Y3 const & y3, Z3 const & z3,\r\n\t\t\tX4 const & x4, Y4 const & y4, Z4 const & z4);\r\n\t\t\t\r\n\t\ttemplate <typename V1, typename V2, typename V3, typename V4>\r\n\t\tGLM_FUNC_DECL tmat4x3(\r\n\t\t\ttvec3<V1, P> const & v1,\r\n\t\t\ttvec3<V2, P> const & v2,\r\n\t\t\ttvec3<V3, P> const & v3,\r\n\t\t\ttvec3<V4, P> const & v4);\r\n\r\n\t\t// Matrix conversions\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tmat4x3(tmat4x3<U, Q> const & m);\r\n\t\t\t\r\n\t\tGLM_FUNC_DECL explicit tmat4x3(tmat2x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x3(tmat3x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x3(tmat4x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x3(tmat2x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x3(tmat3x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x3(tmat2x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x3(tmat4x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x3(tmat3x4<T, P> const & x);\r\n\r\n\t\t// Accesses\r\n\t\tGLM_FUNC_DECL col_type & operator[](size_type i);\r\n\t\tGLM_FUNC_DECL col_type const & operator[](size_type i) const;\r\n\r\n\t\t// Unary updatable operators\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> & operator=  (tmat4x3<T, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> & operator=  (tmat4x3<U, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> & operator+= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> & operator+= (tmat4x3<U, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> & operator-= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> & operator-= (tmat4x3<U, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> & operator*= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> & operator/= (U s);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> & operator++ ();\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> & operator-- ();\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> operator--(int);\r\n\t};\r\n\r\n\t// Binary operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> operator+ (\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> operator+ (\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat4x3<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> operator- (\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> operator- (\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat4x3<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> operator* (\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> operator* (\r\n\t\tT const & s,\r\n\t\ttmat4x3<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat4x3<T, P>::col_type operator* (\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\ttypename tmat4x3<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat4x3<T, P>::row_type operator* (\r\n\t\ttypename tmat4x3<T, P>::col_type const & v,\r\n\t\ttmat4x3<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> operator* (\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator* (\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> operator* (\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> operator/ (\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> operator/ (\r\n\t\tT const & s,\r\n\t\ttmat4x3<T, P> const & m);\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> const operator- (\r\n\t\ttmat4x3<T, P> const & m);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_mat4x3.inl\"\r\n#endif //GLM_EXTERNAL_TEMPLATE\r\n\r\n#endif//glm_core_type_mat4x3\r\n"
  },
  {
    "path": "cpu/glm/detail/type_mat4x3.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat4x3.inl\r\n/// @date 2006-04-17 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tmat4x3<T, P>::length() const\r\n\t{\r\n\t\treturn 4;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type & \r\n\ttmat4x3<T, P>::operator[]\r\n\t(\r\n\t\tsize_type i\r\n\t)\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type const & \r\n\ttmat4x3<T, P>::operator[]\r\n\t(\r\n\t\tsize_type i\r\n\t) const\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Constructors\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3()\r\n\t{\r\n\t\tvalue_type const Zero(0);\r\n\t\tvalue_type const One(1);\r\n\t\tthis->value[0] = col_type(One, Zero, Zero);\r\n\t\tthis->value[1] = col_type(Zero, One, Zero);\r\n\t\tthis->value[2] = col_type(Zero, Zero, One);\r\n\t\tthis->value[3] = col_type(Zero, Zero, Zero);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(\r\n\t\ttmat4x3<T, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t\tthis->value[2] = m.value[2];\r\n\t\tthis->value[3] = m.value[3];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(\r\n\t\ttmat4x3<T, Q> const & m)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t\tthis->value[2] = m.value[2];\r\n\t\tthis->value[3] = m.value[3];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(ctor)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(\r\n\t\tT const & s)\r\n\t{\r\n\t\tvalue_type const Zero(0);\r\n\t\tthis->value[0] = col_type(s, Zero, Zero);\r\n\t\tthis->value[1] = col_type(Zero, s, Zero);\r\n\t\tthis->value[2] = col_type(Zero, Zero, s);\r\n\t\tthis->value[3] = col_type(Zero, Zero, Zero);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\tT const & x0, T const & y0, T const & z0,\r\n\t\tT const & x1, T const & y1, T const & z1,\r\n\t\tT const & x2, T const & y2, T const & z2,\r\n\t\tT const & x3, T const & y3, T const & z3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(x0, y0, z0);\r\n\t\tthis->value[1] = col_type(x1, y1, z1);\r\n\t\tthis->value[2] = col_type(x2, y2, z2);\r\n\t\tthis->value[3] = col_type(x3, y3, z3);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\tcol_type const & v0, \r\n\t\tcol_type const & v1, \r\n\t\tcol_type const & v2,\r\n\t\tcol_type const & v3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = v0;\r\n\t\tthis->value[1] = v1;\r\n\t\tthis->value[2] = v2;\r\n\t\tthis->value[3] = v3;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion constructors\r\n\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <\r\n\t\ttypename X1, typename Y1, typename Z1,\r\n\t\ttypename X2, typename Y2, typename Z2,\r\n\t\ttypename X3, typename Y3, typename Z3,\r\n\t\ttypename X4, typename Y4, typename Z4>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\tX1 const & x1, Y1 const & y1, Z1 const & z1,\r\n\t\tX2 const & x2, Y2 const & y2, Z2 const & z2,\r\n\t\tX3 const & x3, Y3 const & y3, Z3 const & z3,\r\n\t\tX4 const & x4, Y4 const & y4, Z4 const & z4\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1));\r\n\t\tthis->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2));\r\n\t\tthis->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3));\r\n\t\tthis->value[3] = col_type(static_cast<T>(x4), value_type(y4), value_type(z4));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename V1, typename V2, typename V3, typename V4>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\ttvec3<V1, P> const & v1,\r\n\t\ttvec3<V2, P> const & v2,\r\n\t\ttvec3<V3, P> const & v3,\r\n\t\ttvec3<V4, P> const & v4\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(v1);\r\n\t\tthis->value[1] = col_type(v2);\r\n\t\tthis->value[2] = col_type(v3);\r\n\t\tthis->value[3] = col_type(v4);\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Matrix conversions\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\ttmat4x3<U, Q> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t\tthis->value[3] = col_type(m[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], value_type(0));\r\n\t\tthis->value[1] = col_type(m[1], value_type(0));\r\n\t\tthis->value[2] = col_type(m[2], value_type(1));\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t\tthis->value[3] = col_type(m[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(static_cast<T>(0), value_type(0), value_type(1));\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], value_type(0));\r\n\t\tthis->value[1] = col_type(m[1], value_type(0));\r\n\t\tthis->value[2] = col_type(m[2], value_type(1));\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(static_cast<T>(0), value_type(0), value_type(1));\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], value_type(0));\r\n\t\tthis->value[1] = col_type(m[1], value_type(0));\r\n\t\tthis->value[2] = col_type(m[2], value_type(1));\r\n\t\tthis->value[3] = col_type(m[3], value_type(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Unary updatable operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>& tmat4x3<T, P>::operator=\r\n\t(\r\n\t\ttmat4x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\tthis->value[3] = m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>& tmat4x3<T, P>::operator=\r\n\t(\r\n\t\ttmat4x3<U, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\tthis->value[3] = m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator+= (U s)\r\n\t{\r\n\t\tthis->value[0] += s;\r\n\t\tthis->value[1] += s;\r\n\t\tthis->value[2] += s;\r\n\t\tthis->value[3] += s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator+= (tmat4x3<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] += m[0];\r\n\t\tthis->value[1] += m[1];\r\n\t\tthis->value[2] += m[2];\r\n\t\tthis->value[3] += m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator-= (U s)\r\n\t{\r\n\t\tthis->value[0] -= s;\r\n\t\tthis->value[1] -= s;\r\n\t\tthis->value[2] -= s;\r\n\t\tthis->value[3] -= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator-= (tmat4x3<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] -= m[0];\r\n\t\tthis->value[1] -= m[1];\r\n\t\tthis->value[2] -= m[2];\r\n\t\tthis->value[3] -= m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator*= (U s)\r\n\t{\r\n\t\tthis->value[0] *= s;\r\n\t\tthis->value[1] *= s;\r\n\t\tthis->value[2] *= s;\r\n\t\tthis->value[3] *= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator/= (U s)\r\n\t{\r\n\t\tthis->value[0] /= s;\r\n\t\tthis->value[1] /= s;\r\n\t\tthis->value[2] /= s;\r\n\t\tthis->value[3] /= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator++ ()\r\n\t{\r\n\t\t++this->value[0];\r\n\t\t++this->value[1];\r\n\t\t++this->value[2];\r\n\t\t++this->value[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator-- ()\r\n\t{\r\n\t\t--this->value[0];\r\n\t\t--this->value[1];\r\n\t\t--this->value[2];\r\n\t\t--this->value[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Binary operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> operator+ (\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\tT const & s)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s,\r\n\t\t\tm[2] + s,\r\n\t\t\tm[3] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> operator+ (\r\n\t\ttmat4x3<T, P> const & m1, \r\n\t\ttmat4x3<T, P> const & m2)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm1[0] + m2[0],\r\n\t\t\tm1[1] + m2[1],\r\n\t\t\tm1[2] + m2[2],\r\n\t\t\tm1[3] + m2[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> operator- (\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\tT const & s)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm[0] - s,\r\n\t\t\tm[1] - s,\r\n\t\t\tm[2] - s,\r\n\t\t\tm[3] - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> operator- (\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat4x3<T, P> const & m2)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm1[0] - m2[0],\r\n\t\t\tm1[1] - m2[1],\r\n\t\t\tm1[2] - m2[2],\r\n\t\t\tm1[3] - m2[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> operator* (\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\tT const & s)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s,\r\n\t\t\tm[3] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> operator* (\r\n\t\tT const & s,\r\n\t\ttmat4x3<T, P> const & m)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s,\r\n\t\t\tm[3] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type operator*\r\n\t(\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\ttypename tmat4x3<T, P>::row_type const & v)\r\n\t{\r\n\t\treturn typename tmat4x3<T, P>::col_type(\r\n\t\t\tm[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w,\r\n\t\t\tm[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * v.w,\r\n\t\t\tm[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z + m[3][2] * v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x3<T, P>::row_type operator*\r\n\t(\r\n\t\ttypename tmat4x3<T, P>::col_type const & v,\r\n\t\ttmat4x3<T, P> const & m)\r\n\t{\r\n\t\treturn typename tmat4x3<T, P>::row_type(\r\n\t\t\tv.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2],\r\n\t\t\tv.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2],\r\n\t\t\tv.x * m[2][0] + v.y * m[2][1] + v.z * m[2][2],\r\n\t\t\tv.x * m[3][0] + v.y * m[3][1] + v.z * m[3][2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> operator*\r\n\t(\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator*\r\n\t(\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\tT const SrcA00 = m1[0][0];\r\n\t\tT const SrcA01 = m1[0][1];\r\n\t\tT const SrcA02 = m1[0][2];\r\n\t\tT const SrcA10 = m1[1][0];\r\n\t\tT const SrcA11 = m1[1][1];\r\n\t\tT const SrcA12 = m1[1][2];\r\n\t\tT const SrcA20 = m1[2][0];\r\n\t\tT const SrcA21 = m1[2][1];\r\n\t\tT const SrcA22 = m1[2][2];\r\n\t\tT const SrcA30 = m1[3][0];\r\n\t\tT const SrcA31 = m1[3][1];\r\n\t\tT const SrcA32 = m1[3][2];\r\n\r\n\t\tT const SrcB00 = m2[0][0];\r\n\t\tT const SrcB01 = m2[0][1];\r\n\t\tT const SrcB02 = m2[0][2];\r\n\t\tT const SrcB03 = m2[0][3];\r\n\t\tT const SrcB10 = m2[1][0];\r\n\t\tT const SrcB11 = m2[1][1];\r\n\t\tT const SrcB12 = m2[1][2];\r\n\t\tT const SrcB13 = m2[1][3];\r\n\t\tT const SrcB20 = m2[2][0];\r\n\t\tT const SrcB21 = m2[2][1];\r\n\t\tT const SrcB22 = m2[2][2];\r\n\t\tT const SrcB23 = m2[2][3];\r\n\r\n\t\ttmat3x3<T, P> Result(tmat3x3<T, P>::_null);\r\n\t\tResult[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02 + SrcA30 * SrcB03;\r\n\t\tResult[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02 + SrcA31 * SrcB03;\r\n\t\tResult[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02 + SrcA32 * SrcB03;\r\n\t\tResult[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12 + SrcA30 * SrcB13;\r\n\t\tResult[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12 + SrcA31 * SrcB13;\r\n\t\tResult[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11 + SrcA22 * SrcB12 + SrcA32 * SrcB13;\r\n\t\tResult[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21 + SrcA20 * SrcB22 + SrcA30 * SrcB23;\r\n\t\tResult[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21 + SrcA21 * SrcB22 + SrcA31 * SrcB23;\r\n\t\tResult[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21 + SrcA22 * SrcB22 + SrcA32 * SrcB23;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> operator*\r\n\t(\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3],\r\n\t\t\tm1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2] + m1[3][2] * m2[2][3],\r\n\t\t\tm1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2] + m1[3][0] * m2[3][3],\r\n\t\t\tm1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2] + m1[3][1] * m2[3][3],\r\n\t\t\tm1[0][2] * m2[3][0] + m1[1][2] * m2[3][1] + m1[2][2] * m2[3][2] + m1[3][2] * m2[3][3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> operator/\r\n\t(\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm[0] / s,\r\n\t\t\tm[1] / s,\r\n\t\t\tm[2] / s,\r\n\t\t\tm[3] / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> operator/\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat4x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\ts / m[0],\r\n\t\t\ts / m[1],\r\n\t\t\ts / m[2],\r\n\t\t\ts / m[3]);\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> const operator-\r\n\t(\r\n\t\ttmat4x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\t-m[0],\r\n\t\t\t-m[1],\r\n\t\t\t-m[2],\r\n\t\t\t-m[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> const operator++\r\n\t(\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\tint\r\n\t)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm[0] + T(1),\r\n\t\t\tm[1] + T(1),\r\n\t\t\tm[2] + T(1),\r\n\t\t\tm[3] + T(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> const operator--\r\n\t(\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\tint\r\n\t)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm[0] - T(1),\r\n\t\t\tm[1] - T(1),\r\n\t\t\tm[2] - T(1),\r\n\t\t\tm[3] - T(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> tmat4x3<T, P>::operator++(int)\r\n\t{\r\n\t\ttmat4x3<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> tmat4x3<T, P>::operator--(int)\r\n\t{\r\n\t\ttmat4x3<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat4x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat4x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);\r\n\t}\r\n} //namespace detail\r\n} //namespace glm\r\n\r\n"
  },
  {
    "path": "cpu/glm/detail/type_mat4x4.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat4x4.hpp\r\n/// @date 2005-01-27 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_mat4x4\r\n#define glm_core_type_mat4x4\r\n\r\n#include \"../fwd.hpp\"\r\n#include \"type_vec4.hpp\"\r\n#include \"type_mat.hpp\"\r\n#include <limits>\r\n#include <cstddef>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tmat4x4\r\n\t{\r\n\t\tenum ctor{_null};\r\n\t\ttypedef T value_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\ttypedef tvec4<T, P> col_type;\r\n\t\ttypedef tvec4<T, P> row_type;\r\n\t\ttypedef tmat4x4<T, P> type;\r\n\t\ttypedef tmat4x4<T, P> transpose_type;\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tfriend tvec4<U, Q> operator/(tmat4x4<U, Q> const & m, tvec4<U, Q> const & v);\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tfriend tvec4<U, Q> operator/(tvec4<U, Q> const & v, tmat4x4<U, Q> const & m);\r\n\r\n\tprivate:\r\n\t\t/// @cond DETAIL\r\n\t\tcol_type value[4];\r\n\r\n\tpublic:\r\n\t\t// Constructors\r\n\t\tGLM_FUNC_DECL tmat4x4();\r\n\t\tGLM_FUNC_DECL tmat4x4(tmat4x4<T, P> const & m);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tmat4x4(tmat4x4<T, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat4x4(\r\n\t\t\tctor Null);\r\n\t\tGLM_FUNC_DECL explicit tmat4x4(\r\n\t\t\tT const & x);\r\n\t\tGLM_FUNC_DECL tmat4x4(\r\n\t\t\tT const & x0, T const & y0, T const & z0, T const & w0,\r\n\t\t\tT const & x1, T const & y1, T const & z1, T const & w1,\r\n\t\t\tT const & x2, T const & y2, T const & z2, T const & w2,\r\n\t\t\tT const & x3, T const & y3, T const & z3, T const & w3);\r\n\t\tGLM_FUNC_DECL tmat4x4(\r\n\t\t\tcol_type const & v0,\r\n\t\t\tcol_type const & v1,\r\n\t\t\tcol_type const & v2,\r\n\t\t\tcol_type const & v3);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversions\r\n\r\n\t\ttemplate <\r\n\t\t\ttypename X1, typename Y1, typename Z1, typename W1,\r\n\t\t\ttypename X2, typename Y2, typename Z2, typename W2,\r\n\t\t\ttypename X3, typename Y3, typename Z3, typename W3,\r\n\t\t\ttypename X4, typename Y4, typename Z4, typename W4>\r\n\t\tGLM_FUNC_DECL tmat4x4(\r\n\t\t\tX1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,\r\n\t\t\tX2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,\r\n\t\t\tX3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3,\r\n\t\t\tX4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4);\r\n\t\t\t\r\n\t\ttemplate <typename V1, typename V2, typename V3, typename V4>\r\n\t\tGLM_FUNC_DECL tmat4x4(\r\n\t\t\ttvec4<V1, P> const & v1,\r\n\t\t\ttvec4<V2, P> const & v2,\r\n\t\t\ttvec4<V3, P> const & v3,\r\n\t\t\ttvec4<V4, P> const & v4);\r\n\t\r\n\t\t// Matrix conversions\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tmat4x4(tmat4x4<U, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat4x4(tmat2x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x4(tmat3x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x4(tmat2x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x4(tmat3x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x4(tmat2x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x4(tmat4x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x4(tmat3x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x4(tmat4x3<T, P> const & x);\r\n\r\n\t\t// Accesses\r\n\t\tGLM_FUNC_DECL col_type & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL col_type const & operator[](length_t i) const;\r\n\r\n\t\t// Unary updatable operators\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator=  (tmat4x4<T, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator=  (tmat4x4<U, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator+= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator+= (tmat4x4<U, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator-= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator-= (tmat4x4<U, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator*= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator*= (tmat4x4<U, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator/= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator/= (tmat4x4<U, P> const & m);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator++ ();\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator-- ();\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> operator--(int);\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> compute_inverse_mat4(tmat4x4<T, P> const & m);\r\n\r\n\t// Binary operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator+ (\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator+ (\r\n\t\tT const & s,\r\n\t\ttmat4x4<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator+ (\r\n\t\ttmat4x4<T, P> const & m1, \r\n\t\ttmat4x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator- (\r\n\t\ttmat4x4<T, P> const & m, \r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator- (\r\n\t\tT const & s,\r\n\t\ttmat4x4<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator- (\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator* (\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator* (\r\n\t\tT const & s,\r\n\t\ttmat4x4<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat4x4<T, P>::col_type operator* (\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\ttypename tmat4x4<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat4x4<T, P>::row_type operator* (\r\n\t\ttypename tmat4x4<T, P>::col_type const & v,\r\n\t\ttmat4x4<T, P> const & m);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x4<T, P> operator* (\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> operator* (\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator* (\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator/ (\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator/ (\r\n\t\tT const & s,\r\n\t\ttmat4x4<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat4x4<T, P>::col_type operator/ (\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\ttypename tmat4x4<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat4x4<T, P>::row_type operator/ (\r\n\t\ttypename tmat4x4<T, P>::col_type & v,\r\n\t\ttmat4x4<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator/ (\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2);\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> const operator-  (\r\n\t\ttmat4x4<T, P> const & m);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_mat4x4.inl\"\r\n#endif//GLM_EXTERNAL_TEMPLATE\r\n\r\n#endif//glm_core_type_mat4x4\r\n"
  },
  {
    "path": "cpu/glm/detail/type_mat4x4.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat4x4.inl\r\n/// @date 2005-01-27 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tmat4x4<T, P>::length() const\r\n\t{\r\n\t\treturn 4;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type &\r\n\ttmat4x4<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t)\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type const &\r\n\ttmat4x4<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t) const\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4()\r\n\t{\r\n\t\tT Zero(0);\r\n\t\tT One(1);\r\n\t\tthis->value[0] = col_type(One, Zero, Zero, Zero);\r\n\t\tthis->value[1] = col_type(Zero, One, Zero, Zero);\r\n\t\tthis->value[2] = col_type(Zero, Zero, One, Zero);\r\n\t\tthis->value[3] = col_type(Zero, Zero, Zero, One);\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\tthis->value[3] = m[3];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttmat4x4<T, Q> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\tthis->value[3] = m[3];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\tctor\r\n\t)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tvalue_type const Zero(0);\r\n\t\tthis->value[0] = col_type(s, Zero, Zero, Zero);\r\n\t\tthis->value[1] = col_type(Zero, s, Zero, Zero);\r\n\t\tthis->value[2] = col_type(Zero, Zero, s, Zero);\r\n\t\tthis->value[3] = col_type(Zero, Zero, Zero, s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\tT const & x0, T const & y0, T const & z0, T const & w0,\r\n\t\tT const & x1, T const & y1, T const & z1, T const & w1,\r\n\t\tT const & x2, T const & y2, T const & z2, T const & w2,\r\n\t\tT const & x3, T const & y3, T const & z3, T const & w3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(x0, y0, z0, w0);\r\n\t\tthis->value[1] = col_type(x1, y1, z1, w1);\r\n\t\tthis->value[2] = col_type(x2, y2, z2, w2);\r\n\t\tthis->value[3] = col_type(x3, y3, z3, w3);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\tcol_type const & v0,\r\n\t\tcol_type const & v1,\r\n\t\tcol_type const & v2,\r\n\t\tcol_type const & v3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = v0;\r\n\t\tthis->value[1] = v1;\r\n\t\tthis->value[2] = v2;\r\n\t\tthis->value[3] = v3;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttmat4x4<U, Q> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t\tthis->value[3] = col_type(m[3]);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion constructors\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <\r\n\t\ttypename X1, typename Y1, typename Z1, typename W1,\r\n\t\ttypename X2, typename Y2, typename Z2, typename W2,\r\n\t\ttypename X3, typename Y3, typename Z3, typename W3,\r\n\t\ttypename X4, typename Y4, typename Z4, typename W4>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\tX1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,\r\n\t\tX2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,\r\n\t\tX3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3,\r\n\t\tX4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<X1>::is_iec559 || std::numeric_limits<X1>::is_integer, \"*mat4x4 constructor only takes float and integer types, 1st parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<Y1>::is_iec559 || std::numeric_limits<Y1>::is_integer, \"*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<Z1>::is_iec559 || std::numeric_limits<Z1>::is_integer, \"*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<W1>::is_iec559 || std::numeric_limits<W1>::is_integer, \"*mat4x4 constructor only takes float and integer types, 4th parameter type invalid.\");\r\n\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<X2>::is_iec559 || std::numeric_limits<X2>::is_integer, \"*mat4x4 constructor only takes float and integer types, 5th parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<Y2>::is_iec559 || std::numeric_limits<Y2>::is_integer, \"*mat4x4 constructor only takes float and integer types, 6th parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<Z2>::is_iec559 || std::numeric_limits<Z2>::is_integer, \"*mat4x4 constructor only takes float and integer types, 7th parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<W2>::is_iec559 || std::numeric_limits<W2>::is_integer, \"*mat4x4 constructor only takes float and integer types, 8th parameter type invalid.\");\r\n\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<X3>::is_iec559 || std::numeric_limits<X3>::is_integer, \"*mat4x4 constructor only takes float and integer types, 9th parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<Y3>::is_iec559 || std::numeric_limits<Y3>::is_integer, \"*mat4x4 constructor only takes float and integer types, 10th parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<Z3>::is_iec559 || std::numeric_limits<Z3>::is_integer, \"*mat4x4 constructor only takes float and integer types, 11th parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<W3>::is_iec559 || std::numeric_limits<W3>::is_integer, \"*mat4x4 constructor only takes float and integer types, 12th parameter type invalid.\");\r\n\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<X4>::is_iec559 || std::numeric_limits<X4>::is_integer, \"*mat4x4 constructor only takes float and integer types, 13th parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<Y4>::is_iec559 || std::numeric_limits<Y4>::is_integer, \"*mat4x4 constructor only takes float and integer types, 14th parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<Z4>::is_iec559 || std::numeric_limits<Z4>::is_integer, \"*mat4x4 constructor only takes float and integer types, 15th parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<W4>::is_iec559 || std::numeric_limits<W4>::is_integer, \"*mat4x4 constructor only takes float and integer types, 16th parameter type invalid.\");\r\n\r\n\t\tthis->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1), value_type(w1));\r\n\t\tthis->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2), value_type(w2));\r\n\t\tthis->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3), value_type(w3));\r\n\t\tthis->value[3] = col_type(static_cast<T>(x4), value_type(y4), value_type(z4), value_type(w4));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename V1, typename V2, typename V3, typename V4>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttvec4<V1, P> const & v1,\r\n\t\ttvec4<V2, P> const & v2,\r\n\t\ttvec4<V3, P> const & v3,\r\n\t\ttvec4<V4, P> const & v4\r\n\t)\t\t\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<V1>::is_iec559 || std::numeric_limits<V1>::is_integer, \"*mat4x4 constructor only takes float and integer types, 1st parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<V2>::is_iec559 || std::numeric_limits<V2>::is_integer, \"*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<V3>::is_iec559 || std::numeric_limits<V3>::is_integer, \"*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<V4>::is_iec559 || std::numeric_limits<V4>::is_integer, \"*mat4x4 constructor only takes float and integer types, 4th parameter type invalid.\");\r\n\r\n\t\tthis->value[0] = col_type(v1);\r\n\t\tthis->value[1] = col_type(v2);\r\n\t\tthis->value[2] = col_type(v3);\r\n\t\tthis->value[3] = col_type(v4);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Matrix convertion constructors\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], detail::tvec2<T, P>(0));\r\n\t\tthis->value[1] = col_type(m[1], detail::tvec2<T, P>(0));\r\n\t\tthis->value[2] = col_type(static_cast<T>(0));\r\n\t\tthis->value[3] = col_type(static_cast<T>(0), value_type(0), value_type(0), value_type(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], value_type(0));\r\n\t\tthis->value[1] = col_type(m[1], value_type(0));\r\n\t\tthis->value[2] = col_type(m[2], value_type(0));\r\n\t\tthis->value[3] = col_type(static_cast<T>(0), value_type(0), value_type(0), value_type(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], value_type(0));\r\n\t\tthis->value[1] = col_type(m[1], value_type(0));\r\n\t\tthis->value[2] = col_type(static_cast<T>(0));\r\n\t\tthis->value[3] = col_type(static_cast<T>(0), value_type(0), value_type(0), value_type(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], detail::tvec2<T, P>(0));\r\n\t\tthis->value[1] = col_type(m[1], detail::tvec2<T, P>(0));\r\n\t\tthis->value[2] = col_type(m[2], detail::tvec2<T, P>(0));\r\n\t\tthis->value[3] = col_type(static_cast<T>(0), value_type(0), value_type(0), value_type(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = col_type(T(0));\r\n\t\tthis->value[3] = col_type(T(0), T(0), T(0), T(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], detail::tvec2<T, P>(0));\r\n\t\tthis->value[1] = col_type(m[1], detail::tvec2<T, P>(0));\r\n\t\tthis->value[2] = col_type(T(0));\r\n\t\tthis->value[3] = col_type(T(0), T(0), T(0), T(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\tthis->value[3] = col_type(T(0), T(0), T(0), T(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttmat4x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], T(0));\r\n\t\tthis->value[1] = col_type(m[1], T(0));\r\n\t\tthis->value[2] = col_type(m[2], T(0));\r\n\t\tthis->value[3] = col_type(m[3], T(1));\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator=\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\t//memcpy could be faster\r\n\t\t//memcpy(&this->value, &m.value, 16 * sizeof(valType));\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\tthis->value[3] = m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator=\r\n\t(\r\n\t\ttmat4x4<U, P> const & m\r\n\t)\r\n\t{\r\n\t\t//memcpy could be faster\r\n\t\t//memcpy(&this->value, &m.value, 16 * sizeof(valType));\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\tthis->value[3] = m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator+= (U s)\r\n\t{\r\n\t\tthis->value[0] += s;\r\n\t\tthis->value[1] += s;\r\n\t\tthis->value[2] += s;\r\n\t\tthis->value[3] += s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator+= (tmat4x4<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] += m[0];\r\n\t\tthis->value[1] += m[1];\r\n\t\tthis->value[2] += m[2];\r\n\t\tthis->value[3] += m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator-= (U s)\r\n\t{\r\n\t\tthis->value[0] -= s;\r\n\t\tthis->value[1] -= s;\r\n\t\tthis->value[2] -= s;\r\n\t\tthis->value[3] -= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator-= (tmat4x4<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] -= m[0];\r\n\t\tthis->value[1] -= m[1];\r\n\t\tthis->value[2] -= m[2];\r\n\t\tthis->value[3] -= m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator*= (U s)\r\n\t{\r\n\t\tthis->value[0] *= s;\r\n\t\tthis->value[1] *= s;\r\n\t\tthis->value[2] *= s;\r\n\t\tthis->value[3] *= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator*= (tmat4x4<U, P> const & m)\r\n\t{\r\n\t\treturn (*this = *this * m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator/= (U s)\r\n\t{\r\n\t\tthis->value[0] /= s;\r\n\t\tthis->value[1] /= s;\r\n\t\tthis->value[2] /= s;\r\n\t\tthis->value[3] /= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator/= (tmat4x4<U, P> const & m)\r\n\t{\r\n\t\treturn (*this = *this * detail::compute_inverse<detail::tmat4x4, T, P>::call(m));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator++ ()\r\n\t{\r\n\t\t++this->value[0];\r\n\t\t++this->value[1];\r\n\t\t++this->value[2];\r\n\t\t++this->value[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator-- ()\r\n\t{\r\n\t\t--this->value[0];\r\n\t\t--this->value[1];\r\n\t\t--this->value[2];\r\n\t\t--this->value[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> tmat4x4<T, P>::operator++(int)\r\n\t{\r\n\t\ttmat4x4<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> tmat4x4<T, P>::operator--(int)\r\n\t{\r\n\t\ttmat4x4<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_inverse<detail::tmat4x4, T, P>\r\n\t{\r\n\t\tstatic detail::tmat4x4<T, P> call(detail::tmat4x4<T, P> const & m)\r\n\t\t{\r\n\t\t\tT Coef00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\r\n\t\t\tT Coef02 = m[1][2] * m[3][3] - m[3][2] * m[1][3];\r\n\t\t\tT Coef03 = m[1][2] * m[2][3] - m[2][2] * m[1][3];\r\n\r\n\t\t\tT Coef04 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\r\n\t\t\tT Coef06 = m[1][1] * m[3][3] - m[3][1] * m[1][3];\r\n\t\t\tT Coef07 = m[1][1] * m[2][3] - m[2][1] * m[1][3];\r\n\r\n\t\t\tT Coef08 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\r\n\t\t\tT Coef10 = m[1][1] * m[3][2] - m[3][1] * m[1][2];\r\n\t\t\tT Coef11 = m[1][1] * m[2][2] - m[2][1] * m[1][2];\r\n\r\n\t\t\tT Coef12 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\r\n\t\t\tT Coef14 = m[1][0] * m[3][3] - m[3][0] * m[1][3];\r\n\t\t\tT Coef15 = m[1][0] * m[2][3] - m[2][0] * m[1][3];\r\n\r\n\t\t\tT Coef16 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\r\n\t\t\tT Coef18 = m[1][0] * m[3][2] - m[3][0] * m[1][2];\r\n\t\t\tT Coef19 = m[1][0] * m[2][2] - m[2][0] * m[1][2];\r\n\r\n\t\t\tT Coef20 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\r\n\t\t\tT Coef22 = m[1][0] * m[3][1] - m[3][0] * m[1][1];\r\n\t\t\tT Coef23 = m[1][0] * m[2][1] - m[2][0] * m[1][1];\r\n\r\n\t\t\tdetail::tvec4<T, P> Fac0(Coef00, Coef00, Coef02, Coef03);\r\n\t\t\tdetail::tvec4<T, P> Fac1(Coef04, Coef04, Coef06, Coef07);\r\n\t\t\tdetail::tvec4<T, P> Fac2(Coef08, Coef08, Coef10, Coef11);\r\n\t\t\tdetail::tvec4<T, P> Fac3(Coef12, Coef12, Coef14, Coef15);\r\n\t\t\tdetail::tvec4<T, P> Fac4(Coef16, Coef16, Coef18, Coef19);\r\n\t\t\tdetail::tvec4<T, P> Fac5(Coef20, Coef20, Coef22, Coef23);\r\n\r\n\t\t\tdetail::tvec4<T, P> Vec0(m[1][0], m[0][0], m[0][0], m[0][0]);\r\n\t\t\tdetail::tvec4<T, P> Vec1(m[1][1], m[0][1], m[0][1], m[0][1]);\r\n\t\t\tdetail::tvec4<T, P> Vec2(m[1][2], m[0][2], m[0][2], m[0][2]);\r\n\t\t\tdetail::tvec4<T, P> Vec3(m[1][3], m[0][3], m[0][3], m[0][3]);\r\n\r\n\t\t\tdetail::tvec4<T, P> Inv0(Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2);\r\n\t\t\tdetail::tvec4<T, P> Inv1(Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4);\r\n\t\t\tdetail::tvec4<T, P> Inv2(Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5);\r\n\t\t\tdetail::tvec4<T, P> Inv3(Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5);\r\n\r\n\t\t\tdetail::tvec4<T, P> SignA(+1, -1, +1, -1);\r\n\t\t\tdetail::tvec4<T, P> SignB(-1, +1, -1, +1);\r\n\t\t\tdetail::tmat4x4<T, P> Inverse(Inv0 * SignA, Inv1 * SignB, Inv2 * SignA, Inv3 * SignB);\r\n\r\n\t\t\tdetail::tvec4<T, P> Row0(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]);\r\n\r\n\t\t\tdetail::tvec4<T, P> Dot0(m[0] * Row0);\r\n\t\t\tT Dot1 = (Dot0.x + Dot0.y) + (Dot0.z + Dot0.w);\r\n\r\n\t\t\tT OneOverDeterminant = static_cast<T>(1) / Dot1;\r\n\r\n\t\t\treturn Inverse * OneOverDeterminant;\r\n\t\t}\r\n\t};\r\n\r\n\t// Binary operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator+\r\n\t(\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s,\r\n\t\t\tm[2] + s,\r\n\t\t\tm[3] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator+\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s,\r\n\t\t\tm[2] + s,\r\n\t\t\tm[3] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator+\r\n\t(\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\tm1[0] + m2[0],\r\n\t\t\tm1[1] + m2[1],\r\n\t\t\tm1[2] + m2[2],\r\n\t\t\tm1[3] + m2[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator-\r\n\t(\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\tm[0] - s,\r\n\t\t\tm[1] - s,\r\n\t\t\tm[2] - s,\r\n\t\t\tm[3] - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator-\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\ts - m[0],\r\n\t\t\ts - m[1],\r\n\t\t\ts - m[2],\r\n\t\t\ts - m[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator-\r\n\t(\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\tm1[0] - m2[0],\r\n\t\t\tm1[1] - m2[1],\r\n\t\t\tm1[2] - m2[2],\r\n\t\t\tm1[3] - m2[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator*\r\n\t(\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\tT const  & s\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s,\r\n\t\t\tm[3] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator*\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s,\r\n\t\t\tm[3] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type operator*\r\n\t(\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\ttypename tmat4x4<T, P>::row_type const & v\r\n\t)\r\n\t{\r\n/*\r\n\t\t__m128 v0 = _mm_shuffle_ps(v.data, v.data, _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 v1 = _mm_shuffle_ps(v.data, v.data, _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 v2 = _mm_shuffle_ps(v.data, v.data, _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 v3 = _mm_shuffle_ps(v.data, v.data, _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 m0 = _mm_mul_ps(m[0].data, v0);\r\n\t\t__m128 m1 = _mm_mul_ps(m[1].data, v1);\r\n\t\t__m128 a0 = _mm_add_ps(m0, m1);\r\n\r\n\t\t__m128 m2 = _mm_mul_ps(m[2].data, v2);\r\n\t\t__m128 m3 = _mm_mul_ps(m[3].data, v3);\r\n\t\t__m128 a1 = _mm_add_ps(m2, m3);\r\n\r\n\t\t__m128 a2 = _mm_add_ps(a0, a1);\r\n\r\n\t\treturn typename tmat4x4<T, P>::col_type(a2);\r\n*/\r\n\r\n\t\ttypename tmat4x4<T, P>::col_type const Mov0(v[0]);\r\n\t\ttypename tmat4x4<T, P>::col_type const Mov1(v[1]);\r\n\t\ttypename tmat4x4<T, P>::col_type const Mul0 = m[0] * Mov0;\r\n\t\ttypename tmat4x4<T, P>::col_type const Mul1 = m[1] * Mov1;\r\n\t\ttypename tmat4x4<T, P>::col_type const Add0 = Mul0 + Mul1;\r\n\t\ttypename tmat4x4<T, P>::col_type const Mov2(v[2]);\r\n\t\ttypename tmat4x4<T, P>::col_type const Mov3(v[3]);\r\n\t\ttypename tmat4x4<T, P>::col_type const Mul2 = m[2] * Mov2;\r\n\t\ttypename tmat4x4<T, P>::col_type const Mul3 = m[3] * Mov3;\r\n\t\ttypename tmat4x4<T, P>::col_type const Add1 = Mul2 + Mul3;\r\n\t\ttypename tmat4x4<T, P>::col_type const Add2 = Add0 + Add1;\r\n\t\treturn Add2;\r\n\r\n/*\r\n\t\treturn typename tmat4x4<T, P>::col_type(\r\n\t\t\tm[0][0] * v[0] + m[1][0] * v[1] + m[2][0] * v[2] + m[3][0] * v[3],\r\n\t\t\tm[0][1] * v[0] + m[1][1] * v[1] + m[2][1] * v[2] + m[3][1] * v[3],\r\n\t\t\tm[0][2] * v[0] + m[1][2] * v[1] + m[2][2] * v[2] + m[3][2] * v[3],\r\n\t\t\tm[0][3] * v[0] + m[1][3] * v[1] + m[2][3] * v[2] + m[3][3] * v[3]);\r\n*/\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x4<T, P>::row_type operator*\r\n\t(\r\n\t\ttypename tmat4x4<T, P>::col_type const & v,\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn typename tmat4x4<T, P>::row_type(\r\n\t\t\tm[0][0] * v[0] + m[0][1] * v[1] + m[0][2] * v[2] + m[0][3] * v[3],\r\n\t\t\tm[1][0] * v[0] + m[1][1] * v[1] + m[1][2] * v[2] + m[1][3] * v[3],\r\n\t\t\tm[2][0] * v[0] + m[2][1] * v[1] + m[2][2] * v[2] + m[2][3] * v[3],\r\n\t\t\tm[3][0] * v[0] + m[3][1] * v[1] + m[3][2] * v[2] + m[3][3] * v[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> operator*\r\n\t(\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3],\r\n\t\t\tm1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2] + m1[3][3] * m2[0][3],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3],\r\n\t\t\tm1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2] + m1[3][3] * m2[1][3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> operator*\r\n\t(\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3],\r\n\t\t\tm1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2] + m1[3][3] * m2[0][3],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3],\r\n\t\t\tm1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2] + m1[3][3] * m2[1][3],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3],\r\n\t\t\tm1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2] + m1[3][2] * m2[2][3],\r\n\t\t\tm1[0][3] * m2[2][0] + m1[1][3] * m2[2][1] + m1[2][3] * m2[2][2] + m1[3][3] * m2[2][3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator*\r\n\t(\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\ttypename tmat4x4<T, P>::col_type const SrcA0 = m1[0];\r\n\t\ttypename tmat4x4<T, P>::col_type const SrcA1 = m1[1];\r\n\t\ttypename tmat4x4<T, P>::col_type const SrcA2 = m1[2];\r\n\t\ttypename tmat4x4<T, P>::col_type const SrcA3 = m1[3];\r\n\r\n\t\ttypename tmat4x4<T, P>::col_type const SrcB0 = m2[0];\r\n\t\ttypename tmat4x4<T, P>::col_type const SrcB1 = m2[1];\r\n\t\ttypename tmat4x4<T, P>::col_type const SrcB2 = m2[2];\r\n\t\ttypename tmat4x4<T, P>::col_type const SrcB3 = m2[3];\r\n\r\n\t\ttmat4x4<T, P> Result(tmat4x4<T, P>::_null);\r\n\t\tResult[0] = SrcA0 * SrcB0[0] + SrcA1 * SrcB0[1] + SrcA2 * SrcB0[2] + SrcA3 * SrcB0[3];\r\n\t\tResult[1] = SrcA0 * SrcB1[0] + SrcA1 * SrcB1[1] + SrcA2 * SrcB1[2] + SrcA3 * SrcB1[3];\r\n\t\tResult[2] = SrcA0 * SrcB2[0] + SrcA1 * SrcB2[1] + SrcA2 * SrcB2[2] + SrcA3 * SrcB2[3];\r\n\t\tResult[3] = SrcA0 * SrcB3[0] + SrcA1 * SrcB3[1] + SrcA2 * SrcB3[2] + SrcA3 * SrcB3[3];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator/\r\n\t(\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\tm[0] / s,\r\n\t\t\tm[1] / s,\r\n\t\t\tm[2] / s,\r\n\t\t\tm[3] / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator/\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\ts / m[0],\r\n\t\t\ts / m[1],\r\n\t\t\ts / m[2],\r\n\t\t\ts / m[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type operator/\r\n\t(\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\ttypename tmat4x4<T, P>::row_type const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::compute_inverse<detail::tmat4x4, T, P>::call(m) * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x4<T, P>::row_type operator/\r\n\t(\r\n\t\ttypename tmat4x4<T, P>::col_type const & v,\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn v * detail::compute_inverse<detail::tmat4x4, T, P>::call(m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator/\r\n\t(\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\ttmat4x4<T, P> m1_copy(m1);\r\n\t\treturn m1_copy /= m2;\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> const operator-\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\t-m[0],\r\n\t\t\t-m[1],\r\n\t\t\t-m[2],\r\n\t\t\t-m[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> const operator++\r\n\t(\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\tint\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\tm[0] + static_cast<T>(1),\r\n\t\t\tm[1] + static_cast<T>(1),\r\n\t\t\tm[2] + static_cast<T>(1),\r\n\t\t\tm[3] + static_cast<T>(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> const operator--\r\n\t(\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\tint\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\tm[0] - static_cast<T>(1),\r\n\t\t\tm[1] - static_cast<T>(1),\r\n\t\t\tm[2] - static_cast<T>(1),\r\n\t\t\tm[3] - static_cast<T>(1));\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);\r\n\t}\r\n\r\n} //namespace detail\r\n} //namespace glm\r\n"
  },
  {
    "path": "cpu/glm/detail/type_vec.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_vec.hpp\r\n/// @date 2010-01-26 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_vec\r\n#define glm_core_type_vec\r\n\r\n#include \"precision.hpp\"\r\n#include \"type_int.hpp\"\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P> struct tvec1;\r\n\ttemplate <typename T, precision P> struct tvec2;\r\n\ttemplate <typename T, precision P> struct tvec3;\r\n\ttemplate <typename T, precision P> struct tvec4;\r\n}//namespace detail\r\n\t\r\n\ttypedef detail::tvec1<float, highp>\t\thighp_vec1_t;\r\n\ttypedef detail::tvec1<float, mediump>\tmediump_vec1_t;\r\n\ttypedef detail::tvec1<float, lowp>\t\tlowp_vec1_t;\r\n\ttypedef detail::tvec1<int, highp>\t\thighp_ivec1_t;\r\n\ttypedef detail::tvec1<int, mediump>\t\tmediump_ivec1_t;\r\n\ttypedef detail::tvec1<int, lowp>\t\tlowp_ivec1_t;\r\n\ttypedef detail::tvec1<uint, highp>\t\thighp_uvec1_t;\r\n\ttypedef detail::tvec1<uint, mediump>\tmediump_uvec1_t;\r\n\ttypedef detail::tvec1<uint, lowp>\t\tlowp_uvec1_t;\r\n\ttypedef detail::tvec1<bool, highp>\t\thighp_bvec1_t;\r\n\ttypedef detail::tvec1<bool, mediump>\tmediump_bvec1_t;\r\n\ttypedef detail::tvec1<bool, lowp>\t\tlowp_bvec1_t;\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 2 components vector of high single-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<float, highp>\t\thighp_vec2;\r\n\t\r\n\t/// 2 components vector of medium single-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<float, mediump>\tmediump_vec2;\r\n\t\r\n\t/// 2 components vector of low single-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<float, lowp>\t\tlowp_vec2;\r\n\t\r\n\t/// 2 components vector of high double-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<double, highp>\thighp_dvec2;\r\n\t\r\n\t/// 2 components vector of medium double-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<double, mediump>\tmediump_dvec2;\r\n\t\r\n\t/// 2 components vector of low double-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<double, lowp>\t\tlowp_dvec2;\r\n\t\r\n\t/// 2 components vector of high precision signed integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<int, highp>\t\thighp_ivec2;\r\n\t\r\n\t/// 2 components vector of medium precision signed integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<int, mediump>\t\tmediump_ivec2;\r\n\t\r\n\t/// 2 components vector of low precision signed integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<int, lowp>\t\tlowp_ivec2;\r\n\t\r\n\t/// 2 components vector of high precision unsigned integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<uint, highp>\t\thighp_uvec2;\r\n\t\r\n\t/// 2 components vector of medium precision unsigned integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<uint, mediump>\tmediump_uvec2;\r\n\t\r\n\t/// 2 components vector of low precision unsigned integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<uint, lowp>\t\tlowp_uvec2;\r\n\r\n\t/// 2 components vector of high precision bool numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<bool, highp>\t\thighp_bvec2;\r\n\t\r\n\t/// 2 components vector of medium precision bool numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<bool, mediump>\tmediump_bvec2;\r\n\t\r\n\t/// 2 components vector of low precision bool numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<bool, lowp>\t\tlowp_bvec2;\r\n\t\r\n\t/// @}\r\n\t\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 3 components vector of high single-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<float, highp>\t\thighp_vec3;\r\n\t\r\n\t/// 3 components vector of medium single-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<float, mediump>\tmediump_vec3;\r\n\t\r\n\t/// 3 components vector of low single-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<float, lowp>\t\tlowp_vec3;\r\n\t\r\n\t/// 3 components vector of high double-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<double, highp>\thighp_dvec3;\r\n\t\r\n\t/// 3 components vector of medium double-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<double, mediump>\tmediump_dvec3;\r\n\t\r\n\t/// 3 components vector of low double-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<double, lowp>\t\tlowp_dvec3;\r\n\t\r\n\t/// 3 components vector of high precision signed integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<int, highp>\t\thighp_ivec3;\r\n\t\r\n\t/// 3 components vector of medium precision signed integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<int, mediump>\t\tmediump_ivec3;\r\n\t\r\n\t/// 3 components vector of low precision signed integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<int, lowp>\t\tlowp_ivec3;\r\n\t\r\n\t/// 3 components vector of high precision unsigned integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<uint, highp>\t\thighp_uvec3;\r\n\t\r\n\t/// 3 components vector of medium precision unsigned integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<uint, mediump>\tmediump_uvec3;\r\n\t\r\n\t/// 3 components vector of low precision unsigned integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<uint, lowp>\t\tlowp_uvec3;\r\n\t\r\n\t/// 3 components vector of high precision bool numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<bool, highp>\t\thighp_bvec3;\r\n\t\r\n\t/// 3 components vector of medium precision bool numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<bool, mediump>\tmediump_bvec3;\r\n\t\r\n\t/// 3 components vector of low precision bool numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<bool, lowp>\t\tlowp_bvec3;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\r\n\t/// 4 components vector of high single-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<float, highp>\t\thighp_vec4;\r\n\t\r\n\t/// 4 components vector of medium single-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<float, mediump>\tmediump_vec4;\r\n\t\r\n\t/// 4 components vector of low single-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<float, lowp>\t\tlowp_vec4;\r\n\t\r\n\t/// 4 components vector of high double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<double, highp>\thighp_dvec4;\r\n\t\r\n\t/// 4 components vector of medium double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<double, mediump>\tmediump_dvec4;\r\n\t\r\n\t/// 4 components vector of low double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<double, lowp>\t\tlowp_dvec4;\r\n\t\r\n\t/// 4 components vector of high precision signed integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<int, highp>\t\thighp_ivec4;\r\n\t\r\n\t/// 4 components vector of medium precision signed integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<int, mediump>\t\tmediump_ivec4;\r\n\t\r\n\t/// 4 components vector of low precision signed integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<int, lowp>\t\tlowp_ivec4;\r\n\t\r\n\t/// 4 components vector of high precision unsigned integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<uint, highp>\t\thighp_uvec4;\r\n\t\r\n\t/// 4 components vector of medium precision unsigned integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<uint, mediump>\tmediump_uvec4;\r\n\t\r\n\t/// 4 components vector of low precision unsigned integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<uint, lowp>\t\tlowp_uvec4;\r\n\r\n\t/// 4 components vector of high precision bool numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<bool, highp>\t\thighp_bvec4;\r\n\t\r\n\t/// 4 components vector of medium precision bool numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<bool, mediump>\tmediump_bvec4;\r\n\t\r\n\t/// 4 components vector of low precision bool numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<bool, lowp>\t\tlowp_bvec4;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_types\r\n\t/// @{\r\n\t\r\n\t//////////////////////////\r\n\t// Default float definition\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef lowp_vec2\t\t\tvec2;\r\n\ttypedef lowp_vec3\t\t\tvec3;\r\n\ttypedef lowp_vec4\t\t\tvec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))\r\n\ttypedef mediump_vec2\t\tvec2;\r\n\ttypedef mediump_vec3\t\tvec3;\r\n\ttypedef mediump_vec4\t\tvec4;\r\n#else //defined(GLM_PRECISION_HIGHP_FLOAT)\r\n\t/// 2 components vector of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_vec2\t\t\tvec2;\r\n\t\r\n\t//! 3 components vector of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_vec3\t\t\tvec3;\r\n\t\r\n\t//! 4 components vector of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_vec4\t\t\tvec4;\r\n#endif//GLM_PRECISION\r\n\r\n\t//////////////////////////\r\n\t// Default double definition\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_DOUBLE))\r\n\ttypedef lowp_dvec2\t\t\tdvec2;\r\n\ttypedef lowp_dvec3\t\t\tdvec3;\r\n\ttypedef lowp_dvec4\t\t\tdvec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))\r\n\ttypedef mediump_dvec2\t\tdvec2;\r\n\ttypedef mediump_dvec3\t\tdvec3;\r\n\ttypedef mediump_dvec4\t\tdvec4;\r\n#else //defined(GLM_PRECISION_HIGHP_DOUBLE)\r\n\t/// 2 components vector of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_dvec2\t\t\tdvec2;\r\n\t\r\n\t//! 3 components vector of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_dvec3\t\t\tdvec3;\r\n\t\r\n\t//! 4 components vector of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_dvec4\t\t\tdvec4;\r\n#endif//GLM_PRECISION\r\n\t\r\n\t//////////////////////////\r\n\t// Signed integer definition\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_ivec2\t\t\tivec2;\r\n\ttypedef lowp_ivec3\t\t\tivec3;\r\n\ttypedef lowp_ivec4\t\t\tivec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\ttypedef mediump_ivec2\t\tivec2;\r\n\ttypedef mediump_ivec3\t\tivec3;\r\n\ttypedef mediump_ivec4\t\tivec4;\r\n#else //defined(GLM_PRECISION_HIGHP_INT)\r\n\t//! 2 components vector of signed integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_ivec2\t\t\tivec2;\r\n\t\r\n\t//! 3 components vector of signed integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_ivec3\t\t\tivec3;\r\n\t\r\n\t//! 4 components vector of signed integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_ivec4\t\t\tivec4;\r\n#endif//GLM_PRECISION\r\n\t\r\n\t//////////////////////////\r\n\t// Unsigned integer definition\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_UINT))\r\n\ttypedef lowp_uvec2\t\t\tuvec2;\r\n\ttypedef lowp_uvec3\t\t\tuvec3;\r\n\ttypedef lowp_uvec4\t\t\tuvec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_UINT))\r\n\ttypedef mediump_uvec2\t\tuvec2;\r\n\ttypedef mediump_uvec3\t\tuvec3;\r\n\ttypedef mediump_uvec4\t\tuvec4;\r\n#else //defined(GLM_PRECISION_HIGHP_UINT)\r\n\t/// 2 components vector of unsigned integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_uvec2\t\t\tuvec2;\r\n\t\r\n\t/// 3 components vector of unsigned integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_uvec3\t\t\tuvec3;\r\n\t\r\n\t/// 4 components vector of unsigned integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_uvec4\t\t\tuvec4;\r\n#endif//GLM_PRECISION\r\n\t\r\n\t//////////////////////////\r\n\t// Boolean definition\r\n\r\n#if(defined(GLM_PRECISION_LOWP_BOOL))\r\n\ttypedef lowp_bvec2\t\t\tbvec2;\r\n\ttypedef lowp_bvec3\t\t\tbvec3;\r\n\ttypedef lowp_bvec4\t\t\tbvec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_BOOL))\r\n\ttypedef mediump_bvec2\t\tbvec2;\r\n\ttypedef mediump_bvec3\t\tbvec3;\r\n\ttypedef mediump_bvec4\t\tbvec4;\r\n#else //defined(GLM_PRECISION_HIGHP_BOOL)\r\n\t//! 2 components vector of boolean.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_bvec2\t\t\tbvec2;\r\n\t\r\n\t//! 3 components vector of boolean.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_bvec3\t\t\tbvec3;\r\n\t\r\n\t//! 4 components vector of boolean.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_bvec4\t\t\tbvec4;\r\n#endif//GLM_PRECISION\r\n\t\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#endif//glm_core_type_vec\r\n"
  },
  {
    "path": "cpu/glm/detail/type_vec.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_vec.inl\r\n/// @date 2011-06-15 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n"
  },
  {
    "path": "cpu/glm/detail/type_vec1.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_vec1.hpp\r\n/// @date 2008-08-25 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_gentype1\r\n#define glm_core_type_gentype1\r\n\r\n#include \"../fwd.hpp\"\r\n#include \"type_vec.hpp\"\r\n#ifdef GLM_SWIZZLE\r\n#\tif GLM_HAS_ANONYMOUS_UNION\r\n#\t\tinclude \"_swizzle.hpp\"\r\n#\telse\r\n#\t\tinclude \"_swizzle_func.hpp\"\r\n#\tendif\r\n#endif //GLM_SWIZZLE\r\n#include <cstddef>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tvec1\r\n\t{\r\n\t\t//////////////////////////////////////\r\n\t\t// Implementation detail\r\n\r\n\t\tenum ctor{_null};\r\n\r\n\t\ttypedef tvec1<T, P> type;\r\n\t\ttypedef tvec1<bool, P> bool_type;\r\n\t\ttypedef T value_type;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Helper\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Data\r\n\r\n\t\tunion {T x, r, s;};\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Accesses\r\n\r\n\t\tGLM_FUNC_DECL T & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL T const & operator[](length_t i) const;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Implicit basic constructors\r\n\r\n\t\tGLM_FUNC_DECL tvec1();\r\n\t\tGLM_FUNC_DECL tvec1(tvec1<T, P> const & v);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tvec1(tvec1<T, Q> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Explicit basic constructors\r\n\r\n\t\tGLM_FUNC_DECL explicit tvec1(\r\n\t\t\tctor);\r\n\t\tGLM_FUNC_DECL tvec1(\r\n\t\t\tT const & s);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversion vector constructors\r\n\t\t\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec1(tvec1<U, Q> const & v);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec1(tvec2<U, Q> const & v);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec1(tvec3<U, Q> const & v);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec1(tvec4<U, Q> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Unary arithmetic operators\r\n\r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator= (tvec1<T, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator= (tvec1<U, P> const & v);\r\n\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator+=(U const & s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator+=(tvec1<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator-=(U const & s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator-=(tvec1<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator*=(U const & s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator*=(tvec1<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator/=(U const & s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator/=(tvec1<U, P> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator++();\r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator--();\r\n\t\tGLM_FUNC_DECL tvec1<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tvec1<T, P> operator--(int);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Unary bit operators\r\n\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator%=(U const & s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator%=(tvec1<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator&=(U const & s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator&=(tvec1<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator|=(U const & s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator|=(tvec1<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator^=(U const & s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator^=(tvec1<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator<<=(U const & s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator<<=(tvec1<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator>>=(U const & s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator>>=(tvec1<U, P> const & v);\r\n\t};\r\n\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator+(tvec1<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator+(T const & s, tvec1<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator+(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator-(tvec1<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator-(T const & s, tvec1<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator-\t(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator*(tvec1<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator*(T const & s, tvec1<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator*(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator/(tvec1<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator/(T const & s, tvec1<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator/(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator-(tvec1<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL bool operator==(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL bool operator!=(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator%(tvec1<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator%(T const & s, tvec1<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator%(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator&(tvec1<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator&(T const & s, tvec1<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator&(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator|(tvec1<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator|(T const & s, tvec1<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator|(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator^(tvec1<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator^(T const & s, tvec1<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator^(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator<<(tvec1<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator<<(T const & s, tvec1<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator<<(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator>>(tvec1<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator>>(T const & s, tvec1<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator>>(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_DECL tvec1<T, P> operator~(tvec1<T, P> const & v);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_vec1.inl\"\r\n#endif//GLM_EXTERNAL_TEMPLATE\r\n\r\n#endif//glm_core_type_gentype1\r\n"
  },
  {
    "path": "cpu/glm/detail/type_vec1.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_vec1.inl\r\n/// @date 2008-08-25 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tvec1<T, P>::length() const\r\n\t{\r\n\t\treturn 1;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T & tvec1<T, P>::operator[](length_t i)\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&x)[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const & tvec1<T, P>::operator[](length_t i) const\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&x)[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Implicit basic constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P>::tvec1() :\r\n\t\tx(static_cast<T>(0))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(tvec1<T, P> const & v) :\r\n\t\tx(v.x)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(tvec1<T, Q> const & v) :\r\n\t\tx(v.x)\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Explicit basic constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(ctor)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(T const & s) :\r\n\t\tx(s)\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion vector constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P>::tvec1\r\n\t(\r\n\t\ttvec1<U, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(v.x))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P>::tvec1\r\n\t(\r\n\t\ttvec2<U, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(v.x))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P>::tvec1\r\n\t(\r\n\t\ttvec3<U, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(v.x))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P>::tvec1\r\n\t(\r\n\t\ttvec4<U, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(v.x))\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Unary arithmetic operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator=\r\n\t(\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x = v.x;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator=\r\n\t(\r\n\t\ttvec1<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x = static_cast<T>(v.x);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator+=\r\n\t(\r\n\t\tU const & s\r\n\t)\r\n\t{\r\n\t\tthis->x += static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator+=\r\n\t(\r\n\t\ttvec1<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x += static_cast<T>(v.x);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator-=\r\n\t(\r\n\t\tU const & s\r\n\t)\r\n\t{\r\n\t\tthis->x -= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator-=\r\n\t(\r\n\t\ttvec1<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x -= static_cast<T>(v.x);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator*=\r\n\t(\r\n\t\tU const & s\r\n\t)\r\n\t{\r\n\t\tthis->x *= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator*=\r\n\t(\t\r\n\t\ttvec1<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x *= static_cast<T>(v.x);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator/=\r\n\t(\r\n\t\tU const & s\r\n\t)\r\n\t{\r\n\t\tthis->x /= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator/=\r\n\t(\r\n\t\ttvec1<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x /= static_cast<T>(v.x);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Increment and decrement operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator++()\r\n\t{\r\n\t\t++this->x;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator--()\r\n\t{\r\n\t\t--this->x;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> tvec1<T, P>::operator++(int)\r\n\t{\r\n\t\ttvec1<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> tvec1<T, P>::operator--(int)\r\n\t{\r\n\t\ttvec1<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn (v1.x == v2.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn (v1.x != v2.x);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Unary bit operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator%=\r\n\t(\r\n\t\tU const & s\r\n\t)\r\n\t{\r\n\t\tthis->x %= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator%=\r\n\t(\r\n\t\ttvec1<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x %= static_cast<T>(v.x);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator&=\r\n\t(\r\n\t\tU const & s\r\n\t)\r\n\t{\r\n\t\tthis->x &= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator&=\r\n\t(\r\n\t\ttvec1<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x &= static_cast<T>(v.x);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator|=\r\n\t(\r\n\t\tU const & s\r\n\t)\r\n\t{\r\n\t\tthis->x |= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator|=\r\n\t(\r\n\t\ttvec1<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x |= U(v.x);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator^=\r\n\t(\r\n\t\tU const & s\r\n\t)\r\n\t{\r\n\t\tthis->x ^= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator^=\r\n\t(\r\n\t\ttvec1<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x ^= static_cast<T>(v.x);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator<<=\r\n\t(\r\n\t\tU const & s\r\n\t)\r\n\t{\r\n\t\tthis->x <<= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator<<=\r\n\t(\r\n\t\ttvec1<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x <<= static_cast<T>(v.x);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator>>=\r\n\t(\r\n\t\tU const & s\r\n\t)\r\n\t{\r\n\t\tthis->x >>= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator>>=\r\n\t(\r\n\t\ttvec1<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x >>= static_cast<T>(v.x);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Binary arithmetic operators\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator+\r\n\t(\r\n\t\ttvec1<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator+ \r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\ts + v.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator+\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv1.x + v2.x);\r\n\t}\r\n\r\n\t//operator-\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator-\r\n\t(\r\n\t\ttvec1<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator-\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\ts - v.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator-\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv1.x - v2.x);\r\n\t}\r\n\r\n\t//operator*\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator*\r\n\t(\r\n\t\ttvec1<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator*\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\ts * v.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator*\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv1.x * v2.x);\r\n\t}\r\n\r\n\t//operator/\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator/\r\n\t(\r\n\t\ttvec1<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator/\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\ts / v.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator/\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv1.x / v2.x);\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator-\r\n\t(\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\t-v.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator++\r\n\t(\r\n\t\ttvec1<T, P> const & v,\r\n\t\tint\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x + T(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator--\r\n\t(\r\n\t\ttvec1<T, P> const & v,\r\n\t\tint\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x - T(1));\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Binary bit operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator%\r\n\t(\r\n\t\ttvec1<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x % s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator%\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\ts % v.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator%\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv1.x % v2.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator&\r\n\t(\r\n\t\ttvec1<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x & s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator&\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\ts & v.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator&\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv1.x & v2.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator|\r\n\t(\r\n\t\ttvec1<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x | s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator|\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\ts | v.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator|\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv1.x | v2.x);\r\n\t}\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator^\r\n\t(\r\n\t\ttvec1<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x ^ s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator^\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\ts ^ v.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator^\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv1.x ^ v2.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator<<\r\n\t(\r\n\t\ttvec1<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x << s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator<<\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\ts << v.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator<<\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv1.x << v2.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator>>\r\n\t(\r\n\t\ttvec1<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x >> s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator>>\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\ts >> v.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator>>\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv1.x >> v2.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator~\r\n\t(\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\t~v.x);\r\n\t}\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/detail/type_vec2.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_vec2.hpp\r\n/// @date 2008-08-18 / 2013-08-27\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_gentype2\r\n#define glm_core_type_gentype2\r\n\r\n//#include \"../fwd.hpp\"\r\n#include \"type_vec.hpp\"\r\n#ifdef GLM_SWIZZLE\r\n#\tif GLM_HAS_ANONYMOUS_UNION\r\n#\t\tinclude \"_swizzle.hpp\"\r\n#\telse\r\n#\t\tinclude \"_swizzle_func.hpp\"\r\n#\tendif\r\n#endif //GLM_SWIZZLE\r\n#include <cstddef>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tvec2\r\n\t{\r\n\t\t//////////////////////////////////////\r\n\t\t// Implementation detail\r\n\r\n\t\tenum ctor{_null};\r\n\r\n\t\ttypedef tvec2<T, P> type;\r\n\t\ttypedef tvec2<bool, P> bool_type;\r\n\t\ttypedef T value_type;\r\n\t\ttypedef int size_type;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Helper\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Data\r\n\r\n#\t\tif(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))\r\n\t\t\tunion\r\n\t\t\t{\r\n\t\t\t\tstruct{ T x, y; };\r\n\t\t\t\tstruct{ T r, g; };\r\n\t\t\t\tstruct{ T s, t; };\r\n\r\n\t\t\t\t_GLM_SWIZZLE2_2_MEMBERS(T, P, tvec2, x, y)\r\n\t\t\t\t_GLM_SWIZZLE2_2_MEMBERS(T, P, tvec2, r, g)\r\n\t\t\t\t_GLM_SWIZZLE2_2_MEMBERS(T, P, tvec2, s, t)\r\n\t\t\t\t_GLM_SWIZZLE2_3_MEMBERS(T, P, tvec3, x, y)\r\n\t\t\t\t_GLM_SWIZZLE2_3_MEMBERS(T, P, tvec3, r, g)\r\n\t\t\t\t_GLM_SWIZZLE2_3_MEMBERS(T, P, tvec3, s, t)\r\n\t\t\t\t_GLM_SWIZZLE2_4_MEMBERS(T, P, tvec4, x, y)\r\n\t\t\t\t_GLM_SWIZZLE2_4_MEMBERS(T, P, tvec4, r, g)\r\n\t\t\t\t_GLM_SWIZZLE2_4_MEMBERS(T, P, tvec4, s, t)\r\n\t\t\t};\r\n#\t\telse\r\n\t\t\tunion {T x, r, s;};\r\n\t\t\tunion {T y, g, t;};\r\n\r\n#\t\t\tifdef GLM_SWIZZLE\r\n\t\t\t\tGLM_SWIZZLE_GEN_VEC_FROM_VEC2(T, P, detail::tvec2, detail::tvec2, detail::tvec3, detail::tvec4)\r\n#\t\t\tendif \r\n#\t\tendif\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Accesses\r\n\r\n\t\tGLM_FUNC_DECL T & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL T const & operator[](length_t i) const;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Implicit basic constructors\r\n\r\n\t\tGLM_FUNC_DECL tvec2();\r\n\t\tGLM_FUNC_DECL tvec2(tvec2<T, P> const & v);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tvec2(tvec2<T, Q> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Explicit basic constructors\r\n\r\n\t\tGLM_FUNC_DECL explicit tvec2(\r\n\t\t\tctor);\r\n\t\tGLM_FUNC_DECL explicit tvec2(\r\n\t\t\tT const & s);\r\n\t\tGLM_FUNC_DECL tvec2(\r\n\t\t\tT const & s1,\r\n\t\t\tT const & s2);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Swizzle constructors\r\n\r\n#\t\tif(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))\r\n\t\ttemplate <int E0, int E1>\r\n\t\tGLM_FUNC_DECL tvec2(_swizzle<2,T, P, tvec2<T, P>, E0, E1,-1,-2> const & that)\r\n\t\t{\r\n\t\t\t*this = that();\r\n\t\t}\r\n#\t\tendif//(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversion constructors\r\n\r\n\t\t//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, typename V>\r\n\t\tGLM_FUNC_DECL tvec2(\r\n\t\t\tU const & x,\r\n\t\t\tV const & y);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversion vector constructors\r\n\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL tvec2(tvec2<U, Q> const & v);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec2(tvec3<U, Q> const & v);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec2(tvec4<U, Q> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Unary arithmetic operators\r\n\r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator= (tvec2<T, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator= (tvec2<U, P> const & v);\r\n\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator+=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator+=(tvec2<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator-=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator-=(tvec2<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator*=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator*=(tvec2<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator/=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator/=(tvec2<U, P> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator++();\r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator--();\r\n\t\tGLM_FUNC_DECL tvec2<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tvec2<T, P> operator--(int);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Unary bit operators\r\n\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator%= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator%= (tvec2<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator&= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator&= (tvec2<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator|= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator|= (tvec2<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator^= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator^= (tvec2<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator<<=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator<<=(tvec2<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator>>=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator>>=(tvec2<U, P> const & v);\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator+(tvec2<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator+(T const & s, tvec2<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator+(tvec2<T, P> const & v1, tvec2<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator-(tvec2<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator-(T const & s, tvec2<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator-\t(tvec2<T, P> const & v1, tvec2<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator*(tvec2<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator*(T const & s, tvec2<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator*(tvec2<T, P> const & v1, tvec2<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator/(tvec2<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator/(T const & s, tvec2<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator/(tvec2<T, P> const & v1, tvec2<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator-(tvec2<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator%(tvec2<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator%(T const & s, tvec2<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator%(tvec2<T, P> const & v1, tvec2<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator&(tvec2<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator&(T const & s, tvec2<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator&(tvec2<T, P> const & v1, tvec2<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator|(tvec2<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator|(T const & s, tvec2<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator|(tvec2<T, P> const & v1, tvec2<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator^(tvec2<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator^(T const & s, tvec2<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator^(tvec2<T, P> const & v1, tvec2<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator<<(tvec2<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator<<(T const & s, tvec2<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator<<(tvec2<T, P> const & v1, tvec2<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator>>(tvec2<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator>>(T const & s, tvec2<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator>>(tvec2<T, P> const & v1, tvec2<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator~(tvec2<T, P> const & v);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_vec2.inl\"\r\n#endif//GLM_EXTERNAL_TEMPLATE\r\n\r\n#endif//glm_core_type_gentype2\r\n"
  },
  {
    "path": "cpu/glm/detail/type_vec2.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_tvec2.inl\r\n/// @date 2008-08-18 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tvec2<T, P>::length() const\r\n\t{\r\n\t\treturn 2;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T & tvec2<T, P>::operator[](length_t i)\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&x)[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const & tvec2<T, P>::operator[](length_t i) const\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&x)[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Implicit basic constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P>::tvec2() :\r\n\t\tx(0),\r\n\t\ty(0)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(tvec2<T, P> const & v) :\r\n\t\tx(v.x),\r\n\t\ty(v.y)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(tvec2<T, Q> const & v) :\r\n\t\tx(v.x),\r\n\t\ty(v.y)\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Explicit basic constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(ctor)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(T const & s) :\r\n\t\tx(s),\r\n\t\ty(s)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P>::tvec2\r\n\t(\r\n\t\tT const & s1,\r\n\t\tT const & s2\r\n\t) :\r\n\t\tx(s1),\r\n\t\ty(s2)\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion scalar constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, typename V>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P>::tvec2\r\n\t(\r\n\t\tU const & a,\r\n\t\tV const & b\r\n\t) :\r\n\t\tx(static_cast<T>(a)),\r\n\t\ty(static_cast<T>(b))\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion vector constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P>::tvec2\r\n\t(\r\n\t\ttvec2<U, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(v.x)),\r\n\t\ty(static_cast<T>(v.y))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P>::tvec2\r\n\t(\r\n\t\ttvec3<U, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(v.x)),\r\n\t\ty(static_cast<T>(v.y))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P>::tvec2\r\n\t(\r\n\t\ttvec4<U, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(v.x)),\r\n\t\ty(static_cast<T>(v.y))\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Unary arithmetic operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator=\r\n\t(\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x = v.x;\r\n\t\tthis->y = v.y;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator=\r\n\t(\r\n\t\ttvec2<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x = static_cast<T>(v.x);\r\n\t\tthis->y = static_cast<T>(v.y);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator+=\r\n\t(\r\n\t\tU s\r\n\t)\r\n\t{\r\n\t\tthis->x += static_cast<T>(s);\r\n\t\tthis->y += static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator+=\r\n\t(\r\n\t\ttvec2<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x += static_cast<T>(v.x);\r\n\t\tthis->y += static_cast<T>(v.y);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator-=\r\n\t(\r\n\t\tU s\r\n\t)\r\n\t{\r\n\t\tthis->x -= static_cast<T>(s);\r\n\t\tthis->y -= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator-=\r\n\t(\r\n\t\ttvec2<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x -= static_cast<T>(v.x);\r\n\t\tthis->y -= static_cast<T>(v.y);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator*=\r\n\t(\r\n\t\tU s\r\n\t)\r\n\t{\r\n\t\tthis->x *= static_cast<T>(s);\r\n\t\tthis->y *= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator*=\r\n\t(\r\n\t\ttvec2<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x *= static_cast<T>(v.x);\r\n\t\tthis->y *= static_cast<T>(v.y);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator/=\r\n\t(\r\n\t\tU s\r\n\t)\r\n\t{\r\n\t\tthis->x /= static_cast<T>(s);\r\n\t\tthis->y /= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator/=\r\n\t(\r\n\t\ttvec2<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x /= static_cast<T>(v.x);\r\n\t\tthis->y /= static_cast<T>(v.y);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Increment and decrement operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator++()\r\n\t{\r\n\t\t++this->x;\r\n\t\t++this->y;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator--()\r\n\t{\r\n\t\t--this->x;\r\n\t\t--this->y;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> tvec2<T, P>::operator++(int)\r\n\t{\r\n\t\ttvec2<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> tvec2<T, P>::operator--(int)\r\n\t{\r\n\t\ttvec2<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn (v1.x == v2.x) && (v1.y == v2.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn (v1.x != v2.x) || (v1.y != v2.y);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Unary bit operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator%= (U s)\r\n\t{\r\n\t\tthis->x %= static_cast<T>(s);\r\n\t\tthis->y %= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator%= (tvec2<U, P> const & v)\r\n\t{\r\n\t\tthis->x %= static_cast<T>(v.x);\r\n\t\tthis->y %= static_cast<T>(v.y);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator&= (U s)\r\n\t{\r\n\t\tthis->x &= static_cast<T>(s);\r\n\t\tthis->y &= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator&= (tvec2<U, P> const & v)\r\n\t{\r\n\t\tthis->x &= static_cast<T>(v.x);\r\n\t\tthis->y &= static_cast<T>(v.y);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator|= (U s)\r\n\t{\r\n\t\tthis->x |= static_cast<T>(s);\r\n\t\tthis->y |= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator|= (tvec2<U, P> const & v)\r\n\t{\r\n\t\tthis->x |= static_cast<T>(v.x);\r\n\t\tthis->y |= static_cast<T>(v.y);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator^= (U s)\r\n\t{\r\n\t\tthis->x ^= static_cast<T>(s);\r\n\t\tthis->y ^= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator^= (tvec2<U, P> const & v)\r\n\t{\r\n\t\tthis->x ^= static_cast<T>(v.x);\r\n\t\tthis->y ^= static_cast<T>(v.y);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator<<= (U s)\r\n\t{\r\n\t\tthis->x <<= static_cast<T>(s);\r\n\t\tthis->y <<= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator<<= (tvec2<U, P> const & v)\r\n\t{\r\n\t\tthis->x <<= static_cast<T>(v.x);\r\n\t\tthis->y <<= static_cast<T>(v.y);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator>>= (U s)\r\n\t{\r\n\t\tthis->x >>= static_cast<T>(s);\r\n\t\tthis->y >>= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator>>= (tvec2<U, P> const & v)\r\n\t{\r\n\t\tthis->x >>= static_cast<T>(v.x);\r\n\t\tthis->y >>= static_cast<T>(v.y);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Binary arithmetic operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator+\r\n\t(\r\n\t\ttvec2<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv.x + s,\r\n\t\t\tv.y + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator+\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\ts + v.x,\r\n\t\t\ts + v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator+\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv1.x + v2.x,\r\n\t\t\tv1.y + v2.y);\r\n\t}\r\n\r\n\t//operator-\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator-\r\n\t(\r\n\t\ttvec2<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv.x - s,\r\n\t\t\tv.y - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator- \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\ts - v.x,\r\n\t\t\ts - v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator-\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv1.x - v2.x,\r\n\t\t\tv1.y - v2.y);\r\n\t}\r\n\r\n\t//operator*\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator*\r\n\t(\r\n\t\ttvec2<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv.x * s,\r\n\t\t\tv.y * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator*\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\ts * v.x,\r\n\t\t\ts * v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator*\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv1.x * v2.x,\r\n\t\t\tv1.y * v2.y);\r\n\t}\r\n\r\n\t//operator/\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator/\r\n\t(\r\n\t\ttvec2<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv.x / s,\r\n\t\t\tv.y / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator/\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\ts / v.x,\r\n\t\t\ts / v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator/\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv1.x / v2.x,\r\n\t\t\tv1.y / v2.y);\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator-\r\n\t(\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\t-v.x, \r\n\t\t\t-v.y);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Binary bit operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator%\r\n\t(\r\n\t\ttvec2<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv.x % s,\r\n\t\t\tv.y % s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator%\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\ts % v.x,\r\n\t\t\ts % v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator%\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv1.x % v2.x,\r\n\t\t\tv1.y % v2.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator&\r\n\t(\r\n\t\ttvec2<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv.x & s,\r\n\t\t\tv.y & s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator&\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\ts & v.x,\r\n\t\t\ts & v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator&\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv1.x & v2.x,\r\n\t\t\tv1.y & v2.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator|\r\n\t(\r\n\t\ttvec2<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv.x | s,\r\n\t\t\tv.y | s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator|\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\ts | v.x,\r\n\t\t\ts | v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator|\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv1.x | v2.x,\r\n\t\t\tv1.y | v2.y);\r\n\t}\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator^\r\n\t(\r\n\t\ttvec2<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv.x ^ s,\r\n\t\t\tv.y ^ s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator^\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\ts ^ v.x,\r\n\t\t\ts ^ v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator^\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv1.x ^ v2.x,\r\n\t\t\tv1.y ^ v2.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator<<\r\n\t(\r\n\t\ttvec2<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv.x << s,\r\n\t\t\tv.y << s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator<<\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\ts << v.x,\r\n\t\t\ts << v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator<<\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv1.x << v2.x,\r\n\t\t\tv1.y << v2.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator>>\r\n\t(\r\n\t\ttvec2<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv.x >> s,\r\n\t\t\tv.y >> s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator>>\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\ts >> v.x,\r\n\t\t\ts >> v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator>>\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv1.x >> v2.x,\r\n\t\t\tv1.y >> v2.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator~\r\n\t(\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\t~v.x,\r\n\t\t\t~v.y);\r\n\t}\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/detail/type_vec3.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_vec3.hpp\r\n/// @date 2008-08-22 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_gentype3\r\n#define glm_core_type_gentype3\r\n\r\n//#include \"../fwd.hpp\"\r\n#include \"type_vec.hpp\"\r\n#ifdef GLM_SWIZZLE\r\n#\tif GLM_HAS_ANONYMOUS_UNION\r\n#\t\tinclude \"_swizzle.hpp\"\r\n#\telse\r\n#\t\tinclude \"_swizzle_func.hpp\"\r\n#\tendif\r\n#endif //GLM_SWIZZLE\r\n#include <cstddef>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tvec3\r\n\t{\t\r\n\t\t//////////////////////////////////////\r\n\t\t// Implementation detail\r\n\r\n\t\tenum ctor{_null};\r\n\r\n\t\ttypedef tvec3<T, P> type;\r\n\t\ttypedef tvec3<bool, P> bool_type;\r\n\t\ttypedef T value_type;\r\n\t\ttypedef int size_type;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Helper\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Data\r\n\r\n#\t\tif(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))\r\n\t\t\tunion\r\n\t\t\t{\r\n\t\t\t\tstruct{ T x, y, z; };\r\n\t\t\t\tstruct{ T r, g, b; };\r\n\t\t\t\tstruct{ T s, t, p; };\r\n\r\n\t\t\t\t_GLM_SWIZZLE3_2_MEMBERS(T, P, tvec2, x, y, z)\r\n\t\t\t\t_GLM_SWIZZLE3_2_MEMBERS(T, P, tvec2, r, g, b)\r\n\t\t\t\t_GLM_SWIZZLE3_2_MEMBERS(T, P, tvec2, s, t, p)\r\n\t\t\t\t_GLM_SWIZZLE3_3_MEMBERS(T, P, tvec3, x, y, z)\r\n\t\t\t\t_GLM_SWIZZLE3_3_MEMBERS(T, P, tvec3, r, g, b)\r\n\t\t\t\t_GLM_SWIZZLE3_3_MEMBERS(T, P, tvec3, s, t, p)\r\n\t\t\t\t_GLM_SWIZZLE3_4_MEMBERS(T, P, tvec4, x, y, z)\r\n\t\t\t\t_GLM_SWIZZLE3_4_MEMBERS(T, P, tvec4, r, g, b)\r\n\t\t\t\t_GLM_SWIZZLE3_4_MEMBERS(T, P, tvec4, s, t, p)\r\n\t\t\t};\r\n#\t\telse\r\n\t\t\tunion { T x, r, s; };\r\n\t\t\tunion { T y, g, t; };\r\n\t\t\tunion { T z, b, p; };\r\n\r\n#\t\t\tifdef GLM_SWIZZLE\r\n\t\t\t\tGLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, P, detail::tvec3, detail::tvec2, detail::tvec3, detail::tvec4)\r\n#\t\t\tendif\r\n#\t\tendif//GLM_LANG\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Accesses\r\n\r\n\t\tGLM_FUNC_DECL T & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL T const & operator[](length_t i) const;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Implicit basic constructors\r\n\r\n\t\tGLM_FUNC_DECL tvec3();\r\n\t\tGLM_FUNC_DECL tvec3(tvec3<T, P> const & v);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tvec3(tvec3<T, Q> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Explicit basic constructors\r\n\r\n\t\tGLM_FUNC_DECL explicit tvec3(\r\n\t\t\tctor);\r\n\t\tGLM_FUNC_DECL explicit tvec3(\r\n\t\t\tT const & s);\r\n\t\tGLM_FUNC_DECL tvec3(\r\n\t\t\tT const & s1,\r\n\t\t\tT const & s2,\r\n\t\t\tT const & s3);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversion scalar constructors\r\n\r\n\t\t//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, typename V, typename W>\r\n\t\tGLM_FUNC_DECL tvec3(\r\n\t\t\tU const & x,\r\n\t\t\tV const & y,\r\n\t\t\tW const & z);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversion vector constructors\r\n\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename A, typename B, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec3(tvec2<A, Q> const & v, B const & s);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename A, typename B, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec3(A const & s, tvec2<B, Q> const & v);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec3(tvec3<U, Q> const & v);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec3(tvec4<U, Q> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Swizzle constructors\r\n\r\n#\t\tif(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))\r\n\t\ttemplate <int E0, int E1, int E2>\r\n\t\tGLM_FUNC_DECL tvec3(_swizzle<3, T, P, tvec3<T, P>, E0, E1, E2, -1> const & that)\r\n\t\t{\r\n\t\t\t*this = that();\r\n\t\t}\r\n\r\n\t\ttemplate <int E0, int E1>\r\n\t\tGLM_FUNC_DECL tvec3(_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, T const & s)\r\n\t\t{\r\n\t\t\t*this = tvec3<T, P>(v(), s);\r\n\t\t}\r\n\r\n\t\ttemplate <int E0, int E1>\r\n\t\tGLM_FUNC_DECL tvec3(T const & s, _swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v)\r\n\t\t{\r\n\t\t\t*this = tvec3<T, P>(s, v());\r\n\t\t}\r\n#\t\tendif//(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Unary arithmetic operators\r\n\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator= (tvec3<T, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator= (tvec3<U, P> const & v);\r\n\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator+=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator+=(tvec3<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator-=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator-=(tvec3<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator*=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator*=(tvec3<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator/=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator/=(tvec3<U, P> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator++();\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator--();\r\n\t\tGLM_FUNC_DECL tvec3<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tvec3<T, P> operator--(int);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Unary bit operators\r\n\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator%= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator%= (tvec3<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator&= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator&= (tvec3<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator|= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator|= (tvec3<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator^= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator^= (tvec3<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator<<=(U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator<<=(tvec3<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator>>=(U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator>>=(tvec3<U, P> const & v);\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator+(tvec3<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator+(T const & s, tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator+(tvec3<T, P> const & v1, tvec3<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator-(tvec3<T, P> const & v, \tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator-(T const & s, tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator-\t(tvec3<T, P> const & v1, tvec3<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator*(T const & s, tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v1, tvec3<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator/(tvec3<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator/(T const & s, tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator/(tvec3<T, P> const & v1, tvec3<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator-(tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator%(tvec3<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator%(T const & s, tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator%(tvec3<T, P> const & v1, tvec3<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator&(tvec3<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator&(T const & s, tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator&(tvec3<T, P> const & v1, tvec3<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator|(tvec3<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator|(T const & s, tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator|(tvec3<T, P> const & v1, tvec3<T, P> const & v2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator^(tvec3<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator^(T const & s, tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator^(tvec3<T, P> const & v1, tvec3<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator<<(tvec3<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator<<(T const & s, tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator<<(tvec3<T, P> const & v1, tvec3<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator>>(tvec3<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator>>(T const & s, tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator>>(tvec3<T, P> const & v1, tvec3<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_DECL tvec3<T, P> operator~(tvec3<T, P> const & v);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_vec3.inl\"\r\n#endif//GLM_EXTERNAL_TEMPLATE\r\n\r\n#endif//glm_core_type_gentype3\r\n"
  },
  {
    "path": "cpu/glm/detail/type_vec3.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_tvec3.inl\r\n/// @date 2008-08-22 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tvec3<T, P>::length() const\r\n\t{\r\n\t\treturn 3;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T & tvec3<T, P>::operator[](length_t i)\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&x)[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const & tvec3<T, P>::operator[](length_t i) const\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&x)[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Implicit basic constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>::tvec3() :\r\n\t\tx(0),\r\n\t\ty(0),\r\n\t\tz(0)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec3<T, P> const & v) :\r\n\t\tx(v.x),\r\n\t\ty(v.y),\r\n\t\tz(v.z)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec3<T, Q> const & v) :\r\n\t\tx(v.x),\r\n\t\ty(v.y),\r\n\t\tz(v.z)\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Explicit basic constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(ctor)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(T const & s) :\r\n\t\tx(s),\r\n\t\ty(s),\r\n\t\tz(s)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>::tvec3\r\n\t(\r\n\t\tT const & s0,\r\n\t\tT const & s1,\r\n\t\tT const & s2\r\n\t) :\r\n\t\tx(s0),\r\n\t\ty(s1),\r\n\t\tz(s2)\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion scalar constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename A, typename B, typename C>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>::tvec3\r\n\t(\r\n\t\tA const & x,\r\n\t\tB const & y,\r\n\t\tC const & z\r\n\t) :\r\n\t\tx(static_cast<T>(x)),\r\n\t\ty(static_cast<T>(y)),\r\n\t\tz(static_cast<T>(z))\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion vector constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename A, typename B, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>::tvec3\r\n\t(\r\n\t\ttvec2<A, Q> const & v,\r\n\t\tB const & s\r\n\t) :\r\n\t\tx(static_cast<T>(v.x)),\r\n\t\ty(static_cast<T>(v.y)),\r\n\t\tz(static_cast<T>(s))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename A, typename B, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>::tvec3\r\n\t(\t\r\n\t\tA const & s,\r\n\t\ttvec2<B, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(s)),\r\n\t\ty(static_cast<T>(v.x)),\r\n\t\tz(static_cast<T>(v.y))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>::tvec3\r\n\t(\r\n\t\ttvec3<U, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(v.x)),\r\n\t\ty(static_cast<T>(v.y)),\r\n\t\tz(static_cast<T>(v.z))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>::tvec3\r\n\t(\r\n\t\ttvec4<U, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(v.x)),\r\n\t\ty(static_cast<T>(v.y)),\r\n\t\tz(static_cast<T>(v.z))\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Unary arithmetic operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>& tvec3<T, P>::operator= (tvec3<T, P> const & v)\r\n\t{\r\n\t\tthis->x = v.x;\r\n\t\tthis->y = v.y;\r\n\t\tthis->z = v.z;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>& tvec3<T, P>::operator= (tvec3<U, P> const & v)\r\n\t{\r\n\t\tthis->x = static_cast<T>(v.x);\r\n\t\tthis->y = static_cast<T>(v.y);\r\n\t\tthis->z = static_cast<T>(v.z);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator+= (U s)\r\n\t{\r\n\t\tthis->x += static_cast<T>(s);\r\n\t\tthis->y += static_cast<T>(s);\r\n\t\tthis->z += static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator+= (tvec3<U, P> const & v)\r\n\t{\r\n\t\tthis->x += static_cast<T>(v.x);\r\n\t\tthis->y += static_cast<T>(v.y);\r\n\t\tthis->z += static_cast<T>(v.z);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator-= (U s)\r\n\t{\r\n\t\tthis->x -= static_cast<T>(s);\r\n\t\tthis->y -= static_cast<T>(s);\r\n\t\tthis->z -= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator-= (tvec3<U, P> const & v)\r\n\t{\r\n\t\tthis->x -= static_cast<T>(v.x);\r\n\t\tthis->y -= static_cast<T>(v.y);\r\n\t\tthis->z -= static_cast<T>(v.z);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator*= (U s)\r\n\t{\r\n\t\tthis->x *= static_cast<T>(s);\r\n\t\tthis->y *= static_cast<T>(s);\r\n\t\tthis->z *= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator*= (tvec3<U, P> const & v)\r\n\t{\r\n\t\tthis->x *= static_cast<T>(v.x);\r\n\t\tthis->y *= static_cast<T>(v.y);\r\n\t\tthis->z *= static_cast<T>(v.z);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator/= (U s)\r\n\t{\r\n\t\tthis->x /= static_cast<T>(s);\r\n\t\tthis->y /= static_cast<T>(s);\r\n\t\tthis->z /= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator/= (tvec3<U, P> const & v)\r\n\t{\r\n\t\tthis->x /= static_cast<T>(v.x);\r\n\t\tthis->y /= static_cast<T>(v.y);\r\n\t\tthis->z /= static_cast<T>(v.z);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Increment and decrement operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator++()\r\n\t{\r\n\t\t++this->x;\r\n\t\t++this->y;\r\n\t\t++this->z;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator--()\r\n\t{\r\n\t\t--this->x;\r\n\t\t--this->y;\r\n\t\t--this->z;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> tvec3<T, P>::operator++(int)\r\n\t{\r\n\t\ttvec3<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> tvec3<T, P>::operator--(int)\r\n\t{\r\n\t\ttvec3<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttvec3<T, P> const & v1,\r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn (v1.x == v2.x) && (v1.y == v2.y) && (v1.z == v2.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttvec3<T, P> const & v1,\r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn (v1.x != v2.x) || (v1.y != v2.y) || (v1.z != v2.z);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Unary bit operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator%= (U s)\r\n\t{\r\n\t\tthis->x %= s;\r\n\t\tthis->y %= s;\r\n\t\tthis->z %= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator%= (tvec3<U, P> const & v)\r\n\t{\r\n\t\tthis->x %= v.x;\r\n\t\tthis->y %= v.y;\r\n\t\tthis->z %= v.z;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator&= (U s)\r\n\t{\r\n\t\tthis->x &= s;\r\n\t\tthis->y &= s;\r\n\t\tthis->z &= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator&= (tvec3<U, P> const & v)\r\n\t{\r\n\t\tthis->x &= v.x;\r\n\t\tthis->y &= v.y;\r\n\t\tthis->z &= v.z;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator|= (U s)\r\n\t{\r\n\t\tthis->x |= s;\r\n\t\tthis->y |= s;\r\n\t\tthis->z |= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator|= (tvec3<U, P> const & v)\r\n\t{\r\n\t\tthis->x |= v.x;\r\n\t\tthis->y |= v.y;\r\n\t\tthis->z |= v.z;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator^= (U s)\r\n\t{\r\n\t\tthis->x ^= s;\r\n\t\tthis->y ^= s;\r\n\t\tthis->z ^= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator^= (tvec3<U, P> const & v)\r\n\t{\r\n\t\tthis->x ^= v.x;\r\n\t\tthis->y ^= v.y;\r\n\t\tthis->z ^= v.z;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator<<= (U s)\r\n\t{\r\n\t\tthis->x <<= s;\r\n\t\tthis->y <<= s;\r\n\t\tthis->z <<= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator<<= (tvec3<U, P> const & v)\r\n\t{\r\n\t\tthis->x <<= static_cast<T>(v.x);\r\n\t\tthis->y <<= static_cast<T>(v.y);\r\n\t\tthis->z <<= static_cast<T>(v.z);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator>>= (U s)\r\n\t{\r\n\t\tthis->x >>= static_cast<T>(s);\r\n\t\tthis->y >>= static_cast<T>(s);\r\n\t\tthis->z >>= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator>>= (tvec3<U, P> const & v)\r\n\t{\r\n\t\tthis->x >>= static_cast<T>(v.x);\r\n\t\tthis->y >>= static_cast<T>(v.y);\r\n\t\tthis->z >>= static_cast<T>(v.z);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Binary arithmetic operators\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator+\r\n\t(\r\n\t\ttvec3<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv.x + s,\r\n\t\t\tv.y + s,\r\n\t\t\tv.z + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator+ \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\ts + v.x,\r\n\t\t\ts + v.y,\r\n\t\t\ts + v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator+ \r\n\t(\r\n\t\ttvec3<T, P> const & v1, \r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv1.x + v2.x,\r\n\t\t\tv1.y + v2.y,\r\n\t\t\tv1.z + v2.z);\r\n\t}\r\n\r\n\t//operator-\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator- \r\n\t(\r\n\t\ttvec3<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv.x - s,\r\n\t\t\tv.y - s,\r\n\t\t\tv.z - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator- \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\ts - v.x,\r\n\t\t\ts - v.y,\r\n\t\t\ts - v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator- \r\n\t(\r\n\t\ttvec3<T, P> const & v1, \r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv1.x - v2.x,\r\n\t\t\tv1.y - v2.y,\r\n\t\t\tv1.z - v2.z);\r\n\t}\r\n\r\n\t//operator*\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator*\r\n\t(\r\n\t\ttvec3<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv.x * s,\r\n\t\t\tv.y * s,\r\n\t\t\tv.z * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator* \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\ts * v.x,\r\n\t\t\ts * v.y,\r\n\t\t\ts * v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator* \r\n\t(\r\n\t\ttvec3<T, P> const & v1, \r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv1.x * v2.x,\r\n\t\t\tv1.y * v2.y,\r\n\t\t\tv1.z * v2.z);\r\n\t}\r\n\r\n\t//operator/\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator/\r\n\t(\r\n\t\ttvec3<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv.x / s,\r\n\t\t\tv.y / s,\r\n\t\t\tv.z / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator/ \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\ts / v.x,\r\n\t\t\ts / v.y,\r\n\t\t\ts / v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator/ \r\n\t(\r\n\t\ttvec3<T, P> const & v1, \r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv1.x / v2.x,\r\n\t\t\tv1.y / v2.y,\r\n\t\t\tv1.z / v2.z);\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator- \r\n\t(\r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\t-v.x, \r\n\t\t\t-v.y, \r\n\t\t\t-v.z);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Binary bit operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator% \r\n\t(\r\n\t\ttvec3<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv.x % s,\r\n\t\t\tv.y % s,\r\n\t\t\tv.z % s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator%\r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\ts % v.x,\r\n\t\t\ts % v.y,\r\n\t\t\ts % v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator% \r\n\t(\r\n\t\ttvec3<T, P> const & v1, \r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv1.x % v2.x,\r\n\t\t\tv1.y % v2.y,\r\n\t\t\tv1.z % v2.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator& \r\n\t(\r\n\t\ttvec3<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv.x & s,\r\n\t\t\tv.y & s,\r\n\t\t\tv.z & s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator& \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\ts & v.x,\r\n\t\t\ts & v.y,\r\n\t\t\ts & v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator& \r\n\t(\r\n\t\ttvec3<T, P> const & v1, \r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv1.x & v2.x,\r\n\t\t\tv1.y & v2.y,\r\n\t\t\tv1.z & v2.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator| \r\n\t(\r\n\t\ttvec3<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv.x | s,\r\n\t\t\tv.y | s,\r\n\t\t\tv.z | s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator| \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\ts | v.x,\r\n\t\t\ts | v.y,\r\n\t\t\ts | v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator| \r\n\t(\r\n\t\ttvec3<T, P> const & v1, \r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv1.x | v2.x,\r\n\t\t\tv1.y | v2.y,\r\n\t\t\tv1.z | v2.z);\r\n\t}\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator^ \r\n\t(\r\n\t\ttvec3<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv.x ^ s,\r\n\t\t\tv.y ^ s,\r\n\t\t\tv.z ^ s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator^ \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tT(s) ^ v.x,\r\n\t\t\tT(s) ^ v.y,\r\n\t\t\tT(s) ^ v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator^ \r\n\t(\r\n\t\ttvec3<T, P> const & v1, \r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv1.x ^ T(v2.x),\r\n\t\t\tv1.y ^ T(v2.y),\r\n\t\t\tv1.z ^ T(v2.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator<< \r\n\t(\r\n\t\ttvec3<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv.x << T(s),\r\n\t\t\tv.y << T(s),\r\n\t\t\tv.z << T(s));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator<< \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tT(s) << v.x,\r\n\t\t\tT(s) << v.y,\r\n\t\t\tT(s) << v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator<< \r\n\t(\r\n\t\ttvec3<T, P> const & v1, \r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv1.x << T(v2.x),\r\n\t\t\tv1.y << T(v2.y),\r\n\t\t\tv1.z << T(v2.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator>> \r\n\t(\r\n\t\ttvec3<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv.x >> T(s),\r\n\t\t\tv.y >> T(s),\r\n\t\t\tv.z >> T(s));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator>> \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\ts >> T(v.x),\r\n\t\t\ts >> T(v.y),\r\n\t\t\ts >> T(v.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator>> \r\n\t(\r\n\t\ttvec3<T, P> const & v1, \r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv1.x >> T(v2.x),\r\n\t\t\tv1.y >> T(v2.y),\r\n\t\t\tv1.z >> T(v2.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator~ \r\n\t(\r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\t~v.x,\r\n\t\t\t~v.y,\r\n\t\t\t~v.z);\r\n\t}\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/detail/type_vec4.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_vec4.hpp\r\n/// @date 2008-08-22 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_gentype4\r\n#define glm_core_type_gentype4\r\n\r\n//#include \"../fwd.hpp\"\r\n#include \"setup.hpp\"\r\n#include \"type_vec.hpp\"\r\n#ifdef GLM_SWIZZLE\r\n#\tif GLM_HAS_ANONYMOUS_UNION\r\n#\t\tinclude \"_swizzle.hpp\"\r\n#\telse\r\n#\t\tinclude \"_swizzle_func.hpp\"\r\n#\tendif\r\n#endif //GLM_SWIZZLE\r\n#include <cstddef>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tvec4\r\n\t{\r\n\t\t//////////////////////////////////////\r\n\t\t// Implementation detail\r\n\r\n\t\tenum ctor{_null};\r\n\r\n\t\ttypedef tvec4<T, P> type;\r\n\t\ttypedef tvec4<bool, P> bool_type;\r\n\t\ttypedef T value_type;\r\n\t\ttypedef int size_type;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Helper\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Data\r\n\r\n#\t\tif(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))\r\n\t\t\tunion\r\n\t\t\t{\r\n\t\t\t\tstruct { T r, g, b, a; };\r\n\t\t\t\tstruct { T s, t, p, q; };\r\n\t\t\t\tstruct { T x, y, z, w;};\r\n\r\n\t\t\t\t_GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, x, y, z, w)\r\n\t\t\t\t_GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, r, g, b, a)\r\n\t\t\t\t_GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, s, t, p, q)\r\n\t\t\t\t_GLM_SWIZZLE4_3_MEMBERS(T, P, tvec3, x, y, z, w)\r\n\t\t\t\t_GLM_SWIZZLE4_3_MEMBERS(T, P, tvec3, r, g, b, a)\r\n\t\t\t\t_GLM_SWIZZLE4_3_MEMBERS(T, P, tvec3, s, t, p, q)\r\n\t\t\t\t_GLM_SWIZZLE4_4_MEMBERS(T, P, tvec4, x, y, z, w)\r\n\t\t\t\t_GLM_SWIZZLE4_4_MEMBERS(T, P, tvec4, r, g, b, a)\r\n\t\t\t\t_GLM_SWIZZLE4_4_MEMBERS(T, P, tvec4, s, t, p, q)\r\n\t\t\t};\r\n#\t\telse\r\n\t\t\tunion { T x, r, s; };\r\n\t\t\tunion { T y, g, t; };\r\n\t\t\tunion { T z, b, p; };\r\n\t\t\tunion { T w, a, q; };\r\n\r\n#\t\t\tifdef GLM_SWIZZLE\r\n\t\t\t\tGLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, P, detail::tvec4, detail::tvec2, detail::tvec3, detail::tvec4)\r\n#\t\t\tendif\r\n#\t\tendif//GLM_LANG\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Accesses\r\n\r\n\t\tGLM_FUNC_DECL T & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL T const & operator[](length_t i) const;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Implicit basic constructors\r\n\r\n\t\tGLM_FUNC_DECL tvec4();\r\n\t\tGLM_FUNC_DECL tvec4(type const & v);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tvec4(tvec4<T, Q> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Explicit basic constructors\r\n\r\n\t\tGLM_FUNC_DECL explicit tvec4(\r\n\t\t\tctor);\r\n\t\tGLM_FUNC_DECL explicit tvec4(\r\n\t\t\tT const & s);\r\n\t\tGLM_FUNC_DECL tvec4(\r\n\t\t\tT const & s0,\r\n\t\t\tT const & s1,\r\n\t\t\tT const & s2,\r\n\t\t\tT const & s3);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversion scalar constructors\r\n\r\n\t\t/// Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename A, typename B, typename C, typename D>\r\n\t\tGLM_FUNC_DECL tvec4(\r\n\t\t\tA const & x,\r\n\t\t\tB const & y,\r\n\t\t\tC const & z,\r\n\t\t\tD const & w);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversion vector constructors\r\n\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename A, typename B, typename C, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec4(tvec2<A, Q> const & v, B const & s1, C const & s2);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename A, typename B, typename C, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec4(A const & s1, tvec2<B, Q> const & v, C const & s2);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename A, typename B, typename C, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec4(A const & s1, B const & s2, tvec2<C, Q> const & v);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename A, typename B, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec4(tvec3<A, Q> const & v, B const & s);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename A, typename B, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec4(A const & s, tvec3<B, Q> const & v);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename A, typename B, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec4(tvec2<A, Q> const & v1, tvec2<B, Q> const & v2);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec4(tvec4<U, Q> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Swizzle constructors\r\n\r\n#\t\tif(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))\r\n\t\ttemplate <int E0, int E1, int E2, int E3>\r\n\t\tGLM_FUNC_DECL tvec4(_swizzle<4, T, P, tvec4<T, P>, E0, E1, E2, E3> const & that)\r\n\t\t{\r\n\t\t\t*this = that();\r\n\t\t}\r\n\r\n\t\ttemplate <int E0, int E1, int F0, int F1>\r\n\t\tGLM_FUNC_DECL tvec4(_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, _swizzle<2, T, P, tvec2<T, P>, F0, F1, -1, -2> const & u)\r\n\t\t{\r\n\t\t\t*this = tvec4<T, P>(v(), u());\r\n\t\t}\r\n\r\n\t\ttemplate <int E0, int E1>\r\n\t\tGLM_FUNC_DECL tvec4(T const & x, T const & y, _swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v)\r\n\t\t{\r\n\t\t\t*this = tvec4<T, P>(x, y, v());\r\n\t\t}\r\n\r\n\t\ttemplate <int E0, int E1>\r\n\t\tGLM_FUNC_DECL tvec4(T const & x, _swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, T const & w)\r\n\t\t{\r\n\t\t\t*this = tvec4<T, P>(x, v(), w);\r\n\t\t}\r\n\r\n\t\ttemplate <int E0, int E1>\r\n\t\tGLM_FUNC_DECL tvec4(_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, T const & z, T const & w)\r\n\t\t{\r\n\t\t\t*this = tvec4<T, P>(v(), z, w);\r\n\t\t}\r\n\r\n\t\ttemplate <int E0, int E1, int E2>\r\n\t\tGLM_FUNC_DECL tvec4(_swizzle<3, T, P, tvec3<T, P>, E0, E1, E2, -1> const & v, T const & w)\r\n\t\t{\r\n\t\t\t*this = tvec4<T, P>(v(), w);\r\n\t\t}\r\n\r\n\t\ttemplate <int E0, int E1, int E2>\r\n\t\tGLM_FUNC_DECL tvec4(T const & x, _swizzle<3, T, P, tvec3<T, P>, E0, E1, E2, -1> const & v)\r\n\t\t{\r\n\t\t\t*this = tvec4<T, P>(x, v());\r\n\t\t}\r\n#\t\tendif//(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Unary arithmetic operators\r\n\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator= (tvec4<T, P> const & v);\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator= (tvec4<U, Q> const & v);\r\n\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator+=(U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator+=(tvec4<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator-=(U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator-=(tvec4<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator*=(U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator*=(tvec4<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator/=(U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator/=(tvec4<U, P> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator++();\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator--();\r\n\t\tGLM_FUNC_DECL tvec4<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tvec4<T, P> operator--(int);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Unary bit operators\r\n\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator%= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator%= (tvec4<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator&= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator&= (tvec4<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator|= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator|= (tvec4<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator^= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator^= (tvec4<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator<<=(U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator<<=(tvec4<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator>>=(U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator>>=(tvec4<U, P> const & v);\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator+(T const & s, tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator-(tvec4<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator-(T const & s, tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator-\t(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator*(T const & s, tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator/(tvec4<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator/(T const & s, tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator/(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator-(tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL bool operator==(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL bool operator!=(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator%(tvec4<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator%(T const & s, tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator%(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator&(tvec4<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator&(T const & s, tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator&(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator|(tvec4<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator|(T const & s, tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator|(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator^(tvec4<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator^(T const & s, tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator^(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator<<(tvec4<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator<<(T const & s, tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator<<(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator>>(tvec4<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator>>(T const & s, tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator>>(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_DECL tvec4<T, P> operator~(tvec4<T, P> const & v);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_vec4.inl\"\r\n#endif//GLM_EXTERNAL_TEMPLATE\r\n\r\n#endif//glm_core_type_gentype4\r\n"
  },
  {
    "path": "cpu/glm/detail/type_vec4.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_tvec4.inl\r\n/// @date 2008-08-23 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tvec4<T, P>::length() const\r\n\t{\r\n\t\treturn 4;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T & tvec4<T, P>::operator[](length_t i)\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&x)[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const & tvec4<T, P>::operator[](length_t i) const\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&x)[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Implicit basic constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4() :\r\n\t\tx(0),\r\n\t\ty(0),\r\n\t\tz(0),\r\n\t\tw(0)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec4<T, P> const & v) :\r\n\t\tx(v.x),\r\n\t\ty(v.y),\r\n\t\tz(v.z),\r\n\t\tw(v.w)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec4<T, Q> const & v) :\r\n\t\tx(v.x),\r\n\t\ty(v.y),\r\n\t\tz(v.z),\r\n\t\tw(v.w)\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Explicit basic constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(ctor)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(T const & s) :\r\n\t\tx(s),\r\n\t\ty(s),\r\n\t\tz(s),\r\n\t\tw(s)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4\r\n\t(\r\n\t\tT const & s1,\r\n\t\tT const & s2,\r\n\t\tT const & s3,\r\n\t\tT const & s4\r\n\t) :\r\n\t\tx(s1),\r\n\t\ty(s2),\r\n\t\tz(s3),\r\n\t\tw(s4)\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion scalar constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename A, typename B, typename C, typename D>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4\r\n\t(\r\n\t\tA const & x,\r\n\t\tB const & y,\r\n\t\tC const & z,\r\n\t\tD const & w\r\n\t) :\r\n\t\tx(static_cast<T>(x)),\r\n\t\ty(static_cast<T>(y)),\r\n\t\tz(static_cast<T>(z)),\r\n\t\tw(static_cast<T>(w))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4\r\n\t(\r\n\t\ttvec4<U, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(v.x)),\r\n\t\ty(static_cast<T>(v.y)),\r\n\t\tz(static_cast<T>(v.z)),\r\n\t\tw(static_cast<T>(v.w))\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion vector constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename A, typename B, typename C, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4\r\n\t(\r\n\t\ttvec2<A, Q> const & v,\r\n\t\tB const & s1,\r\n\t\tC const & s2\r\n\t) :\r\n\t\tx(static_cast<T>(v.x)),\r\n\t\ty(static_cast<T>(v.y)),\r\n\t\tz(static_cast<T>(s1)),\r\n\t\tw(static_cast<T>(s2))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename A, typename B, typename C, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4\r\n\t(\r\n\t\tA const & s1,\r\n\t\ttvec2<B, Q> const & v,\r\n\t\tC const & s2\r\n\t) :\r\n\t\tx(static_cast<T>(s1)),\r\n\t\ty(static_cast<T>(v.x)),\r\n\t\tz(static_cast<T>(v.y)),\r\n\t\tw(static_cast<T>(s2))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename A, typename B, typename C, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4\r\n\t(\r\n\t\tA const & s1,\r\n\t\tB const & s2,\r\n\t\ttvec2<C, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(s1)),\r\n\t\ty(static_cast<T>(s2)),\r\n\t\tz(static_cast<T>(v.x)),\r\n\t\tw(static_cast<T>(v.y))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename A, typename B, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4\r\n\t(\r\n\t\ttvec3<A, Q> const & v,\r\n\t\tB const & s\r\n\t) :\r\n\t\tx(static_cast<T>(v.x)),\r\n\t\ty(static_cast<T>(v.y)),\r\n\t\tz(static_cast<T>(v.z)),\r\n\t\tw(static_cast<T>(s))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename A, typename B, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4\r\n\t(\r\n\t\tA const & s,\r\n\t\ttvec3<B, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(s)),\r\n\t\ty(static_cast<T>(v.x)),\r\n\t\tz(static_cast<T>(v.y)),\r\n\t\tw(static_cast<T>(v.z))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename A, typename B, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4\r\n\t(\r\n\t\ttvec2<A, Q> const & v1,\r\n\t\ttvec2<B, Q> const & v2\r\n\t) :\r\n\t\tx(static_cast<T>(v1.x)),\r\n\t\ty(static_cast<T>(v1.y)),\r\n\t\tz(static_cast<T>(v2.x)),\r\n\t\tw(static_cast<T>(v2.y))\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Unary arithmetic operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator= (tvec4<T, P> const & v)\r\n\t{\r\n\t\tthis->x = v.x;\r\n\t\tthis->y = v.y;\r\n\t\tthis->z = v.z;\r\n\t\tthis->w = v.w;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator= (tvec4<U, Q> const & v)\r\n\t{\r\n\t\tthis->x = static_cast<T>(v.x);\r\n\t\tthis->y = static_cast<T>(v.y);\r\n\t\tthis->z = static_cast<T>(v.z);\r\n\t\tthis->w = static_cast<T>(v.w);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator+= (U s)\r\n\t{\r\n\t\tthis->x += static_cast<T>(s);\r\n\t\tthis->y += static_cast<T>(s);\r\n\t\tthis->z += static_cast<T>(s);\r\n\t\tthis->w += static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator+= (tvec4<U, P> const & v)\r\n\t{\r\n\t\tthis->x += static_cast<T>(v.x);\r\n\t\tthis->y += static_cast<T>(v.y);\r\n\t\tthis->z += static_cast<T>(v.z);\r\n\t\tthis->w += static_cast<T>(v.w);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator-= (U s)\r\n\t{\r\n\t\tthis->x -= static_cast<T>(s);\r\n\t\tthis->y -= static_cast<T>(s);\r\n\t\tthis->z -= static_cast<T>(s);\r\n\t\tthis->w -= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator-= (tvec4<U, P> const & v)\r\n\t{\r\n\t\tthis->x -= static_cast<T>(v.x);\r\n\t\tthis->y -= static_cast<T>(v.y);\r\n\t\tthis->z -= static_cast<T>(v.z);\r\n\t\tthis->w -= static_cast<T>(v.w);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator*= (U s)\r\n\t{\r\n\t\tthis->x *= static_cast<T>(s);\r\n\t\tthis->y *= static_cast<T>(s);\r\n\t\tthis->z *= static_cast<T>(s);\r\n\t\tthis->w *= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator*= (tvec4<U, P> const & v)\r\n\t{\r\n\t\tthis->x *= static_cast<T>(v.x);\r\n\t\tthis->y *= static_cast<T>(v.y);\r\n\t\tthis->z *= static_cast<T>(v.z);\r\n\t\tthis->w *= static_cast<T>(v.w);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator/= (U s)\r\n\t{\r\n\t\tthis->x /= static_cast<T>(s);\r\n\t\tthis->y /= static_cast<T>(s);\r\n\t\tthis->z /= static_cast<T>(s);\r\n\t\tthis->w /= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator/= (tvec4<U, P> const & v)\r\n\t{\r\n\t\tthis->x /= static_cast<T>(v.x);\r\n\t\tthis->y /= static_cast<T>(v.y);\r\n\t\tthis->z /= static_cast<T>(v.z);\r\n\t\tthis->w /= static_cast<T>(v.w);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Increment and decrement operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator++()\r\n\t{\r\n\t\t++this->x;\r\n\t\t++this->y;\r\n\t\t++this->z;\r\n\t\t++this->w;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator--()\r\n\t{\r\n\t\t--this->x;\r\n\t\t--this->y;\r\n\t\t--this->z;\r\n\t\t--this->w;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> tvec4<T, P>::operator++(int)\r\n\t{\r\n\t\ttvec4<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> tvec4<T, P>::operator--(int)\r\n\t{\r\n\t\ttvec4<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Unary bit operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator%= (U s)\r\n\t{\r\n\t\tthis->x %= static_cast<T>(s);\r\n\t\tthis->y %= static_cast<T>(s);\r\n\t\tthis->z %= static_cast<T>(s);\r\n\t\tthis->w %= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator%= (tvec4<U, P> const & v)\r\n\t{\r\n\t\tthis->x %= static_cast<T>(v.x);\r\n\t\tthis->y %= static_cast<T>(v.y);\r\n\t\tthis->z %= static_cast<T>(v.z);\r\n\t\tthis->w %= static_cast<T>(v.w);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator&= (U s)\r\n\t{\r\n\t\tthis->x &= static_cast<T>(s);\r\n\t\tthis->y &= static_cast<T>(s);\r\n\t\tthis->z &= static_cast<T>(s);\r\n\t\tthis->w &= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator&= (tvec4<U, P> const & v)\r\n\t{\r\n\t\tthis->x &= static_cast<T>(v.x);\r\n\t\tthis->y &= static_cast<T>(v.y);\r\n\t\tthis->z &= static_cast<T>(v.z);\r\n\t\tthis->w &= static_cast<T>(v.w);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator|= (U s)\r\n\t{\r\n\t\tthis->x |= static_cast<T>(s);\r\n\t\tthis->y |= static_cast<T>(s);\r\n\t\tthis->z |= static_cast<T>(s);\r\n\t\tthis->w |= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator|= (tvec4<U, P> const & v)\r\n\t{\r\n\t\tthis->x |= static_cast<T>(v.x);\r\n\t\tthis->y |= static_cast<T>(v.y);\r\n\t\tthis->z |= static_cast<T>(v.z);\r\n\t\tthis->w |= static_cast<T>(v.w);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator^= (U s)\r\n\t{\r\n\t\tthis->x ^= static_cast<T>(s);\r\n\t\tthis->y ^= static_cast<T>(s);\r\n\t\tthis->z ^= static_cast<T>(s);\r\n\t\tthis->w ^= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator^= (tvec4<U, P> const & v)\r\n\t{\r\n\t\tthis->x ^= static_cast<T>(v.x);\r\n\t\tthis->y ^= static_cast<T>(v.y);\r\n\t\tthis->z ^= static_cast<T>(v.z);\r\n\t\tthis->w ^= static_cast<T>(v.w);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator<<= (U s)\r\n\t{\r\n\t\tthis->x <<= static_cast<T>(s);\r\n\t\tthis->y <<= static_cast<T>(s);\r\n\t\tthis->z <<= static_cast<T>(s);\r\n\t\tthis->w <<= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator<<= (tvec4<U, P> const & v)\r\n\t{\r\n\t\tthis->x <<= static_cast<T>(v.x);\r\n\t\tthis->y <<= static_cast<T>(v.y);\r\n\t\tthis->z <<= static_cast<T>(v.z);\r\n\t\tthis->w <<= static_cast<T>(v.w);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator>>= (U s)\r\n\t{\r\n\t\tthis->x >>= static_cast<T>(s);\r\n\t\tthis->y >>= static_cast<T>(s);\r\n\t\tthis->z >>= static_cast<T>(s);\r\n\t\tthis->w >>= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator>>= (tvec4<U, P> const & v)\r\n\t{\r\n\t\tthis->x >>= static_cast<T>(v.x);\r\n\t\tthis->y >>= static_cast<T>(v.y);\r\n\t\tthis->z >>= static_cast<T>(v.z);\r\n\t\tthis->w >>= static_cast<T>(v.w);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Binary arithmetic operators\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator+ \r\n\t(\r\n\t\ttvec4<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv.x + s,\r\n\t\t\tv.y + s,\r\n\t\t\tv.z + s,\r\n\t\t\tv.w + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator+ \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\ts + v.x,\r\n\t\t\ts + v.y,\r\n\t\t\ts + v.z,\r\n\t\t\ts + v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator+ \r\n\t(\r\n\t\ttvec4<T, P> const & v1, \r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv1.x + v2.x,\r\n\t\t\tv1.y + v2.y,\r\n\t\t\tv1.z + v2.z,\r\n\t\t\tv1.w + v2.w);\r\n\t}\r\n\r\n\t//operator-\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator- \r\n\t(\r\n\t\ttvec4<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv.x - s,\r\n\t\t\tv.y - s,\r\n\t\t\tv.z - s,\r\n\t\t\tv.w - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator- \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\ts - v.x,\r\n\t\t\ts - v.y,\r\n\t\t\ts - v.z,\r\n\t\t\ts - v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator- \r\n\t(\r\n\t\ttvec4<T, P> const & v1, \r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv1.x - v2.x,\r\n\t\t\tv1.y - v2.y,\r\n\t\t\tv1.z - v2.z,\r\n\t\t\tv1.w - v2.w);\r\n\t}\r\n\r\n\t//operator*\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator* \r\n\t(\r\n\t\ttvec4<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv.x * s,\r\n\t\t\tv.y * s,\r\n\t\t\tv.z * s,\r\n\t\t\tv.w * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator* \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\ts * v.x,\r\n\t\t\ts * v.y,\r\n\t\t\ts * v.z,\r\n\t\t\ts * v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator*\r\n\t(\r\n\t\ttvec4<T, P> const & v1, \r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv1.x * v2.x,\r\n\t\t\tv1.y * v2.y,\r\n\t\t\tv1.z * v2.z,\r\n\t\t\tv1.w * v2.w);\r\n\t}\r\n\r\n\t//operator/\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator/ \r\n\t(\r\n\t\ttvec4<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv.x / s,\r\n\t\t\tv.y / s,\r\n\t\t\tv.z / s,\r\n\t\t\tv.w / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator/ \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\ts / v.x,\r\n\t\t\ts / v.y,\r\n\t\t\ts / v.z,\r\n\t\t\ts / v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator/ \r\n\t(\r\n\t\ttvec4<T, P> const & v1, \r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv1.x / v2.x,\r\n\t\t\tv1.y / v2.y,\r\n\t\t\tv1.z / v2.z,\r\n\t\t\tv1.w / v2.w);\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator- \r\n\t(\r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\t-v.x, \r\n\t\t\t-v.y, \r\n\t\t\t-v.z, \r\n\t\t\t-v.w);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttvec4<T, P> const & v1, \r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn (v1.x == v2.x) && (v1.y == v2.y) && (v1.z == v2.z) && (v1.w == v2.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttvec4<T, P> const & v1, \r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn (v1.x != v2.x) || (v1.y != v2.y) || (v1.z != v2.z) || (v1.w != v2.w);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Binary bit operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator% \r\n\t(\r\n\t\ttvec4<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv.x % s,\r\n\t\t\tv.y % s,\r\n\t\t\tv.z % s,\r\n\t\t\tv.w % s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator% \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\ts % v.x,\r\n\t\t\ts % v.y,\r\n\t\t\ts % v.z,\r\n\t\t\ts % v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator%\r\n\t(\r\n\t\ttvec4<T, P> const & v1, \r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv1.x % v2.x,\r\n\t\t\tv1.y % v2.y,\r\n\t\t\tv1.z % v2.z,\r\n\t\t\tv1.w % v2.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator& \r\n\t(\r\n\t\ttvec4<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv.x & s,\r\n\t\t\tv.y & s,\r\n\t\t\tv.z & s,\r\n\t\t\tv.w & s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator& \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\ts & v.x,\r\n\t\t\ts & v.y,\r\n\t\t\ts & v.z,\r\n\t\t\ts & v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator&\r\n\t(\r\n\t\ttvec4<T, P> const & v1,\r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv1.x & v2.x,\r\n\t\t\tv1.y & v2.y,\r\n\t\t\tv1.z & v2.z,\r\n\t\t\tv1.w & v2.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator|\r\n\t(\r\n\t\ttvec4<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv.x | s,\r\n\t\t\tv.y | s,\r\n\t\t\tv.z | s,\r\n\t\t\tv.w | s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator|\r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\ts | v.x,\r\n\t\t\ts | v.y,\r\n\t\t\ts | v.z,\r\n\t\t\ts | v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator|\r\n\t(\r\n\t\ttvec4<T, P> const & v1,\r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv1.x | v2.x,\r\n\t\t\tv1.y | v2.y,\r\n\t\t\tv1.z | v2.z,\r\n\t\t\tv1.w | v2.w);\r\n\t}\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator^\r\n\t(\r\n\t\ttvec4<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv.x ^ s,\r\n\t\t\tv.y ^ s,\r\n\t\t\tv.z ^ s,\r\n\t\t\tv.w ^ s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator^\r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\ts ^ v.x,\r\n\t\t\ts ^ v.y,\r\n\t\t\ts ^ v.z,\r\n\t\t\ts ^ v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator^\r\n\t(\r\n\t\ttvec4<T, P> const & v1,\r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv1.x ^ v2.x,\r\n\t\t\tv1.y ^ v2.y,\r\n\t\t\tv1.z ^ v2.z,\r\n\t\t\tv1.w ^ v2.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator<<\r\n\t(\r\n\t\ttvec4<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv.x << s,\r\n\t\t\tv.y << s,\r\n\t\t\tv.z << s,\r\n\t\t\tv.w << s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator<<\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\ts << v.x,\r\n\t\t\ts << v.y,\r\n\t\t\ts << v.z,\r\n\t\t\ts << v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator<<\r\n\t(\r\n\t\ttvec4<T, P> const & v1,\r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv1.x << v2.x,\r\n\t\t\tv1.y << v2.y,\r\n\t\t\tv1.z << v2.z,\r\n\t\t\tv1.w << v2.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator>>\r\n\t(\r\n\t\ttvec4<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv.x >> s,\r\n\t\t\tv.y >> s,\r\n\t\t\tv.z >> s,\r\n\t\t\tv.w >> s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator>>\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\ts >> v.x,\r\n\t\t\ts >> v.y,\r\n\t\t\ts >> v.z,\r\n\t\t\ts >> v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator>>\r\n\t(\r\n\t\ttvec4<T, P> const & v1,\r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv1.x >> v2.x,\r\n\t\t\tv1.y >> v2.y,\r\n\t\t\tv1.z >> v2.z,\r\n\t\t\tv1.w >> v2.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator~\r\n\t(\r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\t~v.x,\r\n\t\t\t~v.y,\r\n\t\t\t~v.z,\r\n\t\t\t~v.w);\r\n\t}\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/exponential.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/exponential.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_EXPONENTIAL_INCLUDED\r\n#define GLM_EXPONENTIAL_INCLUDED\r\n\r\n#include \"detail/func_exponential.hpp\"\r\n\r\n#endif//GLM_EXPONENTIAL_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/ext.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @file glm/glm.hpp\r\n/// @date 2009-05-01 / 2011-05-16\r\n/// @author Christophe Riccio\r\n///\r\n/// @ref core (Dependence)\r\n/// \r\n/// @defgroup gtc GTC Extensions (Stable)\r\n///\r\n/// @brief Functions and types that the GLSL specification doesn't define, but useful to have for a C++ program.\r\n/// \r\n/// GTC extensions aim to be stable. \r\n/// \r\n/// Even if it's highly unrecommended, it's possible to include all the extensions at once by\r\n/// including <glm/ext.hpp>. Otherwise, each extension needs to be included  a specific file.\r\n/// \r\n/// @defgroup gtx GTX Extensions (Experimental)\r\n/// \r\n/// @brief Functions and types that the GLSL specification doesn't define, but \r\n/// useful to have for a C++ program.\r\n/// \r\n/// Experimental extensions are useful functions and types, but the development of\r\n/// their API and functionality is not necessarily stable. They can change \r\n/// substantially between versions. Backwards compatibility is not much of an issue\r\n/// for them.\r\n/// \r\n/// Even if it's highly unrecommended, it's possible to include all the extensions \r\n/// at once by including <glm/ext.hpp>. Otherwise, each extension needs to be \r\n/// included  a specific file.\r\n/// \r\n/// @defgroup virtrev VIRTREV Extensions\r\n/// \r\n/// @brief Extensions develop and maintain by Mathieu [matrem] Roumillac\r\n/// (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showprofile&User=22660).\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_EXT_INCLUDED\r\n#define GLM_EXT_INCLUDED\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_EXT_INCLUDED_DISPLAYED))\r\n#\tdefine GLM_MESSAGE_EXT_INCLUDED_DISPLAYED\r\n#\tpragma message(\"GLM: All extensions included (not recommanded)\")\r\n#endif//GLM_MESSAGES\r\n\r\n#include \"./gtc/constants.hpp\"\r\n#include \"./gtc/epsilon.hpp\"\r\n#include \"./gtc/matrix_access.hpp\"\r\n#include \"./gtc/matrix_integer.hpp\"\r\n#include \"./gtc/matrix_inverse.hpp\"\r\n#include \"./gtc/matrix_transform.hpp\"\r\n#include \"./gtc/noise.hpp\"\r\n#include \"./gtc/packing.hpp\"\r\n#include \"./gtc/quaternion.hpp\"\r\n#include \"./gtc/random.hpp\"\r\n#include \"./gtc/reciprocal.hpp\"\r\n#include \"./gtc/type_precision.hpp\"\r\n#include \"./gtc/type_ptr.hpp\"\r\n#include \"./gtc/ulp.hpp\"\r\n\r\n#include \"./gtx/associated_min_max.hpp\"\r\n#include \"./gtx/bit.hpp\"\r\n#include \"./gtx/closest_point.hpp\"\r\n#include \"./gtx/color_space.hpp\"\r\n#include \"./gtx/color_space_YCoCg.hpp\"\r\n#include \"./gtx/compatibility.hpp\"\r\n#include \"./gtx/component_wise.hpp\"\r\n#include \"./gtx/dual_quaternion.hpp\"\r\n#include \"./gtx/euler_angles.hpp\"\r\n#include \"./gtx/extend.hpp\"\r\n#include \"./gtx/extented_min_max.hpp\"\r\n#include \"./gtx/fast_exponential.hpp\"\r\n#include \"./gtx/fast_square_root.hpp\"\r\n#include \"./gtx/fast_trigonometry.hpp\"\r\n#include \"./gtx/gradient_paint.hpp\"\r\n#include \"./gtx/handed_coordinate_space.hpp\"\r\n#include \"./gtx/inertia.hpp\"\r\n#include \"./gtx/int_10_10_10_2.hpp\"\r\n#include \"./gtx/integer.hpp\"\r\n#include \"./gtx/intersect.hpp\"\r\n#include \"./gtx/log_base.hpp\"\r\n#include \"./gtx/matrix_cross_product.hpp\"\r\n#include \"./gtx/matrix_interpolation.hpp\"\r\n#include \"./gtx/matrix_major_storage.hpp\"\r\n#include \"./gtx/matrix_operation.hpp\"\r\n#include \"./gtx/matrix_query.hpp\"\r\n#include \"./gtx/mixed_product.hpp\"\r\n#include \"./gtx/multiple.hpp\"\r\n#include \"./gtx/norm.hpp\"\r\n#include \"./gtx/normal.hpp\"\r\n#include \"./gtx/normalize_dot.hpp\"\r\n#include \"./gtx/number_precision.hpp\"\r\n#include \"./gtx/optimum_pow.hpp\"\r\n#include \"./gtx/orthonormalize.hpp\"\r\n#include \"./gtx/perpendicular.hpp\"\r\n#include \"./gtx/polar_coordinates.hpp\"\r\n#include \"./gtx/projection.hpp\"\r\n#include \"./gtx/quaternion.hpp\"\r\n#include \"./gtx/raw_data.hpp\"\r\n#include \"./gtx/rotate_vector.hpp\"\r\n#include \"./gtx/spline.hpp\"\r\n#include \"./gtx/std_based_type.hpp\"\r\n#include \"./gtx/string_cast.hpp\"\r\n#include \"./gtx/transform.hpp\"\r\n#include \"./gtx/transform2.hpp\"\r\n#include \"./gtx/vec1.hpp\"\r\n#include \"./gtx/vector_angle.hpp\"\r\n#include \"./gtx/vector_query.hpp\"\r\n#include \"./gtx/wrap.hpp\"\r\n\r\n#if(GLM_ARCH & GLM_ARCH_SSE2)\r\n#\tinclude \"./gtx/simd_vec4.hpp\"\r\n#\tinclude \"./gtx/simd_mat4.hpp\"\r\n#endif\r\n\r\n#endif //GLM_EXT_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/fwd.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n///\r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n///\r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/fwd.hpp\r\n/// @date 2013-03-30 / 2013-03-31\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_FWD_INCLUDED\r\n#define GLM_FWD_INCLUDED\r\n\r\n#include \"detail/type_int.hpp\"\r\n#include \"detail/type_float.hpp\"\r\n#include \"detail/type_vec.hpp\"\r\n#include \"detail/type_mat.hpp\"\r\n\r\n//////////////////////\r\n// GLM_GTC_quaternion\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P> struct tquat;\r\n}//namespace detail\r\n\r\n\t\r\n\t/// Quaternion of low single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttypedef detail::tquat<float, lowp>\t\tlowp_quat;\r\n\t\r\n\t/// Quaternion of medium single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttypedef detail::tquat<float, mediump>\tmediump_quat;\r\n\t\r\n\t/// Quaternion of high single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttypedef detail::tquat<float, highp>\t\thighp_quat;\r\n\t\r\n#if(defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef highp_quat\t\t\tquat;\r\n#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef mediump_quat\t\tquat;\r\n#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef lowp_quat\t\t\tquat;\r\n#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))\r\n\t/// Quaternion of default single-precision floating-point numbers.\r\n\ttypedef highp_quat\t\t\tquat;\r\n#endif\r\n\t\r\n\t/// Quaternion of low single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttypedef lowp_quat\t\t\tlowp_fquat;\r\n\t\r\n\t/// Quaternion of medium single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttypedef mediump_quat\t\tmediump_fquat;\r\n\t\r\n\t/// Quaternion of high single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttypedef highp_quat\t\t\thighp_fquat;\r\n\t\r\n\t/// Quaternion of default single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttypedef quat\t\t\t\tfquat;\r\n\t\r\n\r\n\t/// Quaternion of low double-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttypedef detail::tquat<double, lowp>\t\tlowp_dquat;\r\n\t\r\n\t/// Quaternion of medium double-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttypedef detail::tquat<double, mediump>\tmediump_dquat;\r\n\t\r\n\t/// Quaternion of high double-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttypedef detail::tquat<double, highp>\thighp_dquat;\r\n\t\r\n#if(defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))\r\n\ttypedef highp_dquat\t\t\tdquat;\r\n#elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))\r\n\ttypedef mediump_dquat\t\tdquat;\r\n#elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && defined(GLM_PRECISION_LOWP_DOUBLE))\r\n\ttypedef lowp_dquat\t\t\tdquat;\r\n#elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))\r\n\t/// Quaternion of default double-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttypedef highp_dquat\t\t\tdquat;\r\n#endif\r\n\r\n}//namespace glm\r\n\r\n//////////////////////\r\n// GLM_GTC_precision\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_type_precision\r\n\t/// @{\r\n\r\n\t/// Low precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 lowp_int8;\r\n\t\r\n\t/// Low precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 lowp_int16;\r\n\r\n\t/// Low precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 lowp_int32;\r\n\r\n\t/// Low precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 lowp_int64;\r\n\r\n\t/// Low precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 lowp_int8_t;\r\n\t\r\n\t/// Low precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 lowp_int16_t;\r\n\r\n\t/// Low precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 lowp_int32_t;\r\n\r\n\t/// Low precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 lowp_int64_t;\r\n\r\n\t/// Low precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 lowp_i8;\r\n\t\r\n\t/// Low precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 lowp_i16;\r\n\r\n\t/// Low precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 lowp_i32;\r\n\r\n\t/// Low precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 lowp_i64;\r\n\r\n\t/// Medium precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 mediump_int8;\r\n\t\r\n\t/// Medium precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 mediump_int16;\r\n\r\n\t/// Medium precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 mediump_int32;\r\n\r\n\t/// Medium precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 mediump_int64;\r\n\r\n\t/// Medium precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 mediump_int8_t;\r\n\t\r\n\t/// Medium precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 mediump_int16_t;\r\n\r\n\t/// Medium precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 mediump_int32_t;\r\n\r\n\t/// Medium precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 mediump_int64_t;\r\n\r\n\t/// Medium precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 mediump_i8;\r\n\t\r\n\t/// Medium precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 mediump_i16;\r\n\r\n\t/// Medium precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 mediump_i32;\r\n\r\n\t/// Medium precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 mediump_i64;\r\n\r\n\t/// High precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 highp_int8;\r\n\t\r\n\t/// High precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 highp_int16;\r\n\r\n\t/// High precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 highp_int32;\r\n\r\n\t/// High precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 highp_int64;\r\n\r\n\t/// High precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 highp_int8_t;\r\n\t\r\n\t/// High precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 highp_int16_t;\r\n\r\n\t/// 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 highp_int32_t;\r\n\r\n\t/// High precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 highp_int64_t;\r\n\r\n\t/// High precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 highp_i8;\r\n\t\r\n\t/// High precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 highp_i16;\r\n\r\n\t/// High precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 highp_i32;\r\n\r\n\t/// High precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 highp_i64;\r\n\t\r\n\r\n\t/// 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 int8;\r\n\t\r\n\t/// 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 int16;\r\n\r\n\t/// 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 int32;\r\n\r\n\t/// 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 int64;\r\n\r\n\t/// 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 int8_t;\r\n\t\r\n\t/// 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 int16_t;\r\n\r\n\t/// 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 int32_t;\r\n\r\n\t/// 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 int64_t;\r\n\r\n\t/// 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 i8;\r\n\t\r\n\t/// 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 i16;\r\n\r\n\t/// 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 i32;\r\n\r\n\t/// 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 i64;\r\n\t\r\n\t\r\n\t\r\n\t/// Low precision 8 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i8, lowp> lowp_i8vec1;\r\n\t\r\n\t/// Low precision 8 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i8, lowp> lowp_i8vec2;\r\n\t\r\n\t/// Low precision 8 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i8, lowp> lowp_i8vec3;\r\n\t\r\n\t/// Low precision 8 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i8, lowp> lowp_i8vec4;\r\n\t\r\n\r\n\t/// Medium precision 8 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i8, mediump> mediump_i8vec1;\r\n\t\r\n\t/// Medium precision 8 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i8, mediump> mediump_i8vec2;\r\n\t\r\n\t/// Medium precision 8 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i8, mediump> mediump_i8vec3;\r\n\t\r\n\t/// Medium precision 8 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i8, mediump> mediump_i8vec4;\r\n\t\r\n\t\r\n\t/// High precision 8 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i8, highp> highp_i8vec1;\r\n\t\r\n\t/// High precision 8 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i8, highp> highp_i8vec2;\r\n\t\r\n\t/// High precision 8 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i8, highp> highp_i8vec3;\r\n\t\r\n\t/// High precision 8 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i8, highp> highp_i8vec4;\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_i8vec1\t\t\t\ti8vec1;\r\n\ttypedef lowp_i8vec2\t\t\t\ti8vec2;\r\n\ttypedef lowp_i8vec3\t\t\t\ti8vec3;\r\n\ttypedef lowp_i8vec4\t\t\t\ti8vec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\ttypedef mediump_i8vec1\t\t\ti8vec1;\r\n\ttypedef mediump_i8vec2\t\t\ti8vec2;\r\n\ttypedef mediump_i8vec3\t\t\ti8vec3;\r\n\ttypedef mediump_i8vec4\t\t\ti8vec4;\t\r\n#else\r\n\t/// Default precision 8 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i8vec1\t\t\ti8vec1;\r\n\t\r\n\t/// Default precision 8 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i8vec2\t\t\ti8vec2;\r\n\t\r\n\t/// Default precision 8 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i8vec3\t\t\ti8vec3;\r\n\t\r\n\t/// Default precision 8 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i8vec4\t\t\ti8vec4;\r\n#endif\r\n\t\r\n\t\r\n\t/// Low precision 16 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i16, lowp>\t\tlowp_i16vec1;\r\n\t\r\n\t/// Low precision 16 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i16, lowp>\t\tlowp_i16vec2;\r\n\t\r\n\t/// Low precision 16 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i16, lowp>\t\tlowp_i16vec3;\r\n\t\r\n\t/// Low precision 16 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i16, lowp>\t\tlowp_i16vec4;\r\n\t\r\n\t\r\n\t/// Medium precision 16 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i16, mediump>\t\tmediump_i16vec1;\r\n\t\r\n\t/// Medium precision 16 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i16, mediump>\t\tmediump_i16vec2;\r\n\t\r\n\t/// Medium precision 16 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i16, mediump>\t\tmediump_i16vec3;\r\n\t\r\n\t/// Medium precision 16 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i16, mediump>\t\tmediump_i16vec4;\r\n\t\r\n\t\r\n\t/// High precision 16 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i16, highp>\t\thighp_i16vec1;\r\n\t\r\n\t/// High precision 16 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i16, highp>\t\thighp_i16vec2;\r\n\t\r\n\t/// High precision 16 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i16, highp>\t\thighp_i16vec3;\r\n\t\r\n\t/// High precision 16 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i16, highp>\t\thighp_i16vec4;\r\n\t\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_i16vec1\t\t\ti16vec1;\r\n\ttypedef lowp_i16vec2\t\t\ti16vec2;\r\n\ttypedef lowp_i16vec3\t\t\ti16vec3;\r\n\ttypedef lowp_i16vec4\t\t\ti16vec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\ttypedef mediump_i16vec1\t\t\ti16vec1;\r\n\ttypedef mediump_i16vec2\t\t\ti16vec2;\r\n\ttypedef mediump_i16vec3\t\t\ti16vec3;\r\n\ttypedef mediump_i16vec4\t\t\ti16vec4;\r\n#else\r\n\t/// Default precision 16 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i16vec1\t\t\ti16vec1;\r\n\t\r\n\t/// Default precision 16 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i16vec2\t\t\ti16vec2;\r\n\t\r\n\t/// Default precision 16 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i16vec3\t\t\ti16vec3;\r\n\t\r\n\t/// Default precision 16 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i16vec4\t\t\ti16vec4;\r\n#endif\r\n\r\n\r\n\t/// Low precision 32 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i32, lowp>\t\tlowp_i32vec1;\r\n\t\r\n\t/// Low precision 32 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i32, lowp>\t\tlowp_i32vec2;\r\n\t\r\n\t/// Low precision 32 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i32, lowp>\t\tlowp_i32vec3;\r\n\t\r\n\t/// Low precision 32 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i32, lowp>\t\tlowp_i32vec4;\r\n\t\r\n\t\r\n\t/// Medium precision 32 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i32, mediump>\t\tmediump_i32vec1;\r\n\t\r\n\t/// Medium precision 32 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i32, mediump>\t\tmediump_i32vec2;\r\n\t\r\n\t/// Medium precision 32 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i32, mediump>\t\tmediump_i32vec3;\r\n\t\r\n\t/// Medium precision 32 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i32, mediump>\t\tmediump_i32vec4;\r\n\t\r\n\t\r\n\t/// High precision 32 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i32, highp>\t\thighp_i32vec1;\r\n\t\r\n\t/// High precision 32 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i32, highp>\t\thighp_i32vec2;\r\n\t\r\n\t/// High precision 32 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i32, highp>\t\thighp_i32vec3;\r\n\t\r\n\t/// High precision 32 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i32, highp>\t\thighp_i32vec4;\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_i32vec1\t\t\ti32vec1;\r\n\ttypedef lowp_i32vec2\t\t\ti32vec2;\r\n\ttypedef lowp_i32vec3\t\t\ti32vec3;\r\n\ttypedef lowp_i32vec4\t\t\ti32vec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\ttypedef mediump_i32vec1\t\t\ti32vec1;\r\n\ttypedef mediump_i32vec2\t\t\ti32vec2;\r\n\ttypedef mediump_i32vec3\t\t\ti32vec3;\r\n\ttypedef mediump_i32vec4\t\t\ti32vec4;\r\n#else\r\n\t/// Default precision 32 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i32vec1\t\t\ti32vec1;\r\n\t\r\n\t/// Default precision 32 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i32vec2\t\t\ti32vec2;\r\n\t\r\n\t/// Default precision 32 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i32vec3\t\t\ti32vec3;\r\n\t\r\n\t/// Default precision 32 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i32vec4\t\t\ti32vec4;\r\n#endif\r\n\r\n\r\n\t/// Low precision 32 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i32, lowp>\t\tlowp_i32vec1;\r\n\t\r\n\t/// Low precision 32 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i32, lowp>\t\tlowp_i32vec2;\r\n\t\r\n\t/// Low precision 32 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i32, lowp>\t\tlowp_i32vec3;\r\n\t\r\n\t/// Low precision 32 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i32, lowp>\t\tlowp_i32vec4;\r\n\t\r\n\t\r\n\t/// Medium precision 32 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i32, mediump>\t\tmediump_i32vec1;\r\n\t\r\n\t/// Medium precision 32 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i32, mediump>\t\tmediump_i32vec2;\r\n\t\r\n\t/// Medium precision 32 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i32, mediump>\t\tmediump_i32vec3;\r\n\t\r\n\t/// Medium precision 32 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i32, mediump>\t\tmediump_i32vec4;\r\n\t\r\n\t\r\n\t/// High precision 32 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i32, highp>\t\thighp_i32vec1;\r\n\t\r\n\t/// High precision 32 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i32, highp>\t\thighp_i32vec2;\r\n\t\r\n\t/// High precision 32 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i32, highp>\t\thighp_i32vec3;\r\n\t\r\n\t/// High precision 32 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i32, highp>\t\thighp_i32vec4;\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_i32vec1\t\t\ti32vec1;\r\n\ttypedef lowp_i32vec2\t\t\ti32vec2;\r\n\ttypedef lowp_i32vec3\t\t\ti32vec3;\r\n\ttypedef lowp_i32vec4\t\t\ti32vec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\ttypedef mediump_i32vec1\t\t\ti32vec1;\r\n\ttypedef mediump_i32vec2\t\t\ti32vec2;\r\n\ttypedef mediump_i32vec3\t\t\ti32vec3;\r\n\ttypedef mediump_i32vec4\t\t\ti32vec4;\r\n#else\r\n\t/// Default precision 32 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i32vec1\t\t\ti32vec1;\r\n\r\n\t/// Default precision 32 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i32vec2\t\t\ti32vec2;\r\n\t\r\n\t/// Default precision 32 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i32vec3\t\t\ti32vec3;\r\n\t\r\n\t/// Default precision 32 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i32vec4\t\t\ti32vec4;\r\n#endif\r\n\r\n\r\n\t\r\n\t/// Low precision 64 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i64, lowp>\t\tlowp_i64vec1;\r\n\t\r\n\t/// Low precision 64 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i64, lowp>\t\tlowp_i64vec2;\r\n\t\r\n\t/// Low precision 64 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i64, lowp>\t\tlowp_i64vec3;\r\n\t\r\n\t/// Low precision 64 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i64, lowp>\t\tlowp_i64vec4;\r\n\t\r\n\t\r\n\t/// Medium precision 64 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i64, mediump>\t\tmediump_i64vec1;\r\n\t\r\n\t/// Medium precision 64 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i64, mediump>\t\tmediump_i64vec2;\r\n\t\r\n\t/// Medium precision 64 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i64, mediump>\t\tmediump_i64vec3;\r\n\t\r\n\t/// Medium precision 64 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i64, mediump>\t\tmediump_i64vec4;\r\n\t\r\n\t\r\n\t/// High precision 64 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i64, highp>\t\thighp_i64vec1;\r\n\t\r\n\t/// High precision 64 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i64, highp>\t\thighp_i64vec2;\r\n\t\r\n\t/// High precision 64 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i64, highp>\t\thighp_i64vec3;\r\n\t\r\n\t/// High precision 64 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i64, highp>\t\thighp_i64vec4;\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_i64vec1\t\t\ti64vec1;\r\n\ttypedef lowp_i64vec2\t\t\ti64vec2;\r\n\ttypedef lowp_i64vec3\t\t\ti64vec3;\r\n\ttypedef lowp_i64vec4\t\t\ti64vec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\ttypedef mediump_i64vec1\t\t\ti64vec1;\r\n\ttypedef mediump_i64vec2\t\t\ti64vec2;\r\n\ttypedef mediump_i64vec3\t\t\ti64vec3;\r\n\ttypedef mediump_i64vec4\t\t\ti64vec4;\r\n#else\r\n\t/// Default precision 64 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i64vec1\t\t\ti64vec1;\r\n\r\n\t/// Default precision 64 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i64vec2\t\t\ti64vec2;\r\n\t\r\n\t/// Default precision 64 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i64vec3\t\t\ti64vec3;\r\n\t\r\n\t/// Default precision 64 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i64vec4\t\t\ti64vec4;\r\n#endif\r\n\t\r\n\t\r\n\t/////////////////////////////\r\n\t// Unsigned int vector types\r\n\t\r\n\t/// Low precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 lowp_uint8;\r\n\t\r\n\t/// Low precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 lowp_uint16;\r\n\t\r\n\t/// Low precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 lowp_uint32;\r\n\t\r\n\t/// Low precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 lowp_uint64;\r\n\t\r\n\t\r\n\t/// Low precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 lowp_uint8_t;\r\n\t\r\n\t/// Low precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 lowp_uint16_t;\r\n\t\r\n\t/// Low precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 lowp_uint32_t;\r\n\t\r\n\t/// Low precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 lowp_uint64_t;\r\n\t\r\n\t\r\n\t/// Low precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 lowp_u8;\r\n\t\r\n\t/// Low precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 lowp_u16;\r\n\t\r\n\t/// Low precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 lowp_u32;\r\n\t\r\n\t/// Low precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 lowp_u64;\r\n\t\r\n\t\r\n\t\r\n\t/// Medium precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 mediump_uint8;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 mediump_uint16;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 mediump_uint32;\r\n\t\r\n\t/// Medium precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 mediump_uint64;\r\n\t\r\n\t/// Medium precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 mediump_uint8_t;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 mediump_uint16_t;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 mediump_uint32_t;\r\n\t\r\n\t/// Medium precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 mediump_uint64_t;\r\n\t\r\n\t/// Medium precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 mediump_u8;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 mediump_u16;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 mediump_u32;\r\n\t\r\n\t/// Medium precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 mediump_u64;\r\n\t\t\r\n\t\r\n\t\r\n\t/// Medium precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 highp_uint8;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 highp_uint16;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 highp_uint32;\r\n\t\r\n\t/// Medium precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 highp_uint64;\r\n\t\r\n\t/// Medium precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 highp_uint8_t;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 highp_uint16_t;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 highp_uint32_t;\r\n\t\r\n\t/// Medium precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 highp_uint64_t;\r\n\t\r\n\t/// Medium precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 highp_u8;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 highp_u16;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 highp_u32;\r\n\t\r\n\t/// Medium precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 highp_u64;\r\n\t\r\n\t\r\n\t\r\n\t/// 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 uint8;\r\n\t\r\n\t/// 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 uint16;\r\n\t\r\n\t/// 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 uint32;\r\n\t\r\n\t/// 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 uint64;\r\n\t\r\n\t/// 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 uint8_t;\r\n\t\r\n\t/// 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 uint16_t;\r\n\t\r\n\t/// 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 uint32_t;\r\n\t\r\n\t/// 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 uint64_t;\r\n\t\r\n\t/// 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 u8;\r\n\t\r\n\t/// 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 u16;\r\n\t\r\n\t/// 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 u32;\r\n\t\r\n\t/// 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 u64;\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t/// Low precision 8 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u8, lowp> lowp_u8vec1;\r\n\t\r\n\t/// Low precision 8 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u8, lowp> lowp_u8vec2;\r\n\t\r\n\t/// Low precision 8 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u8, lowp> lowp_u8vec3;\r\n\t\r\n\t/// Low precision 8 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u8, lowp> lowp_u8vec4;\r\n\t\r\n\r\n\t/// Medium precision 8 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u8, mediump> mediump_u8vec1;\r\n\t\r\n\t/// Medium precision 8 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u8, mediump> mediump_u8vec2;\r\n\t\r\n\t/// Medium precision 8 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u8, mediump> mediump_u8vec3;\r\n\t\r\n\t/// Medium precision 8 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u8, mediump> mediump_u8vec4;\r\n\t\r\n\t\r\n\t/// High precision 8 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u8, highp> highp_u8vec1;\r\n\t\r\n\t/// High precision 8 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u8, highp> highp_u8vec2;\r\n\t\r\n\t/// High precision 8 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u8, highp> highp_u8vec3;\r\n\t\r\n\t/// High precision 8 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u8, highp> highp_u8vec4;\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_u8vec1\t\t\t\tu8vec1;\r\n\ttypedef lowp_u8vec2\t\t\t\tu8vec2;\r\n\ttypedef lowp_u8vec3\t\t\t\tu8vec3;\r\n\ttypedef lowp_u8vec4\t\t\t\tu8vec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\ttypedef mediump_u8vec1\t\t\tu8vec1;\r\n\ttypedef mediump_u8vec2\t\t\tu8vec2;\r\n\ttypedef mediump_u8vec3\t\t\tu8vec3;\r\n\ttypedef mediump_u8vec4\t\t\tu8vec4;\t\r\n#else\r\n\t/// Default precision 8 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u8vec1\t\t\tu8vec1;\r\n\t\r\n\t/// Default precision 8 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u8vec2\t\t\tu8vec2;\r\n\t\r\n\t/// Default precision 8 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u8vec3\t\t\tu8vec3;\r\n\t\r\n\t/// Default precision 8 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u8vec4\t\t\tu8vec4;\r\n#endif\r\n\t\r\n\t\r\n\t/// Low precision 16 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u16, lowp>\t\tlowp_u16vec1;\r\n\t\r\n\t/// Low precision 16 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u16, lowp>\t\tlowp_u16vec2;\r\n\t\r\n\t/// Low precision 16 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u16, lowp>\t\tlowp_u16vec3;\r\n\t\r\n\t/// Low precision 16 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u16, lowp>\t\tlowp_u16vec4;\r\n\t\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u16, mediump>\t\tmediump_u16vec1;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u16, mediump>\t\tmediump_u16vec2;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u16, mediump>\t\tmediump_u16vec3;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u16, mediump>\t\tmediump_u16vec4;\r\n\t\r\n\t\r\n\t/// High precision 16 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u16, highp>\t\thighp_u16vec1;\r\n\t\r\n\t/// High precision 16 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u16, highp>\t\thighp_u16vec2;\r\n\t\r\n\t/// High precision 16 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u16, highp>\t\thighp_u16vec3;\r\n\t\r\n\t/// High precision 16 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u16, highp>\t\thighp_u16vec4;\r\n\t\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_u16vec1\t\t\tu16vec1;\r\n\ttypedef lowp_u16vec2\t\t\tu16vec2;\r\n\ttypedef lowp_u16vec3\t\t\tu16vec3;\r\n\ttypedef lowp_u16vec4\t\t\tu16vec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\ttypedef mediump_u16vec1\t\t\tu16vec1;\r\n\ttypedef mediump_u16vec2\t\t\tu16vec2;\r\n\ttypedef mediump_u16vec3\t\t\tu16vec3;\r\n\ttypedef mediump_u16vec4\t\t\tu16vec4;\r\n#else\r\n\t/// Default precision 16 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u16vec1\t\t\tu16vec1;\r\n\t\r\n\t/// Default precision 16 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u16vec2\t\t\tu16vec2;\r\n\t\r\n\t/// Default precision 16 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u16vec3\t\t\tu16vec3;\r\n\t\r\n\t/// Default precision 16 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u16vec4\t\t\tu16vec4;\r\n#endif\r\n\r\n\r\n\t/// Low precision 32 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u32, lowp>\t\tlowp_u32vec1;\r\n\t\r\n\t/// Low precision 32 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u32, lowp>\t\tlowp_u32vec2;\r\n\t\r\n\t/// Low precision 32 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u32, lowp>\t\tlowp_u32vec3;\r\n\t\r\n\t/// Low precision 32 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u32, lowp>\t\tlowp_u32vec4;\r\n\t\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u32, mediump>\t\tmediump_u32vec1;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u32, mediump>\t\tmediump_u32vec2;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u32, mediump>\t\tmediump_u32vec3;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u32, mediump>\t\tmediump_u32vec4;\r\n\t\r\n\t\r\n\t/// High precision 32 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u32, highp>\t\thighp_u32vec1;\r\n\t\r\n\t/// High precision 32 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u32, highp>\t\thighp_u32vec2;\r\n\t\r\n\t/// High precision 32 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u32, highp>\t\thighp_u32vec3;\r\n\t\r\n\t/// High precision 32 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u32, highp>\t\thighp_u32vec4;\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_u32vec1\t\t\tu32vec1;\r\n\ttypedef lowp_u32vec2\t\t\tu32vec2;\r\n\ttypedef lowp_u32vec3\t\t\tu32vec3;\r\n\ttypedef lowp_u32vec4\t\t\tu32vec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\ttypedef mediump_u32vec1\t\t\tu32vec1;\r\n\ttypedef mediump_u32vec2\t\t\tu32vec2;\r\n\ttypedef mediump_u32vec3\t\t\tu32vec3;\r\n\ttypedef mediump_u32vec4\t\t\tu32vec4;\r\n#else\r\n\t/// Default precision 32 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u32vec1\t\t\tu32vec1;\r\n\t\r\n\t/// Default precision 32 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u32vec2\t\t\tu32vec2;\r\n\t\r\n\t/// Default precision 32 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u32vec3\t\t\tu32vec3;\r\n\t\r\n\t/// Default precision 32 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u32vec4\t\t\tu32vec4;\r\n#endif\r\n\r\n\r\n\t/// Low precision 32 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u32, lowp>\t\tlowp_u32vec1;\r\n\t\r\n\t/// Low precision 32 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u32, lowp>\t\tlowp_u32vec2;\r\n\t\r\n\t/// Low precision 32 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u32, lowp>\t\tlowp_u32vec3;\r\n\t\r\n\t/// Low precision 32 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u32, lowp>\t\tlowp_u32vec4;\r\n\t\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u32, mediump>\t\tmediump_u32vec1;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u32, mediump>\t\tmediump_u32vec2;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u32, mediump>\t\tmediump_u32vec3;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u32, mediump>\t\tmediump_u32vec4;\r\n\t\r\n\t\r\n\t/// High precision 32 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u32, highp>\t\thighp_u32vec1;\r\n\t\r\n\t/// High precision 32 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u32, highp>\t\thighp_u32vec2;\r\n\t\r\n\t/// High precision 32 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u32, highp>\t\thighp_u32vec3;\r\n\t\r\n\t/// High precision 32 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u32, highp>\t\thighp_u32vec4;\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_u32vec1\t\t\tu32vec1;\r\n\ttypedef lowp_u32vec2\t\t\tu32vec2;\r\n\ttypedef lowp_u32vec3\t\t\tu32vec3;\r\n\ttypedef lowp_u32vec4\t\t\tu32vec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\ttypedef mediump_u32vec1\t\t\tu32vec1;\r\n\ttypedef mediump_u32vec2\t\t\tu32vec2;\r\n\ttypedef mediump_u32vec3\t\t\tu32vec3;\r\n\ttypedef mediump_u32vec4\t\t\tu32vec4;\r\n#else\r\n\t/// Default precision 32 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u32vec1\t\t\tu32vec1;\r\n\r\n\t/// Default precision 32 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u32vec2\t\t\tu32vec2;\r\n\t\r\n\t/// Default precision 32 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u32vec3\t\t\tu32vec3;\r\n\t\r\n\t/// Default precision 32 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u32vec4\t\t\tu32vec4;\r\n#endif\r\n\r\n\r\n\t\r\n\t/// Low precision 64 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u64, lowp>\t\tlowp_u64vec1;\r\n\t\r\n\t/// Low precision 64 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u64, lowp>\t\tlowp_u64vec2;\r\n\t\r\n\t/// Low precision 64 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u64, lowp>\t\tlowp_u64vec3;\r\n\t\r\n\t/// Low precision 64 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u64, lowp>\t\tlowp_u64vec4;\r\n\t\r\n\t\r\n\t/// Medium precision 64 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u64, mediump>\t\tmediump_u64vec1;\r\n\t\r\n\t/// Medium precision 64 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u64, mediump>\t\tmediump_u64vec2;\r\n\t\r\n\t/// Medium precision 64 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u64, mediump>\t\tmediump_u64vec3;\r\n\t\r\n\t/// Medium precision 64 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u64, mediump>\t\tmediump_u64vec4;\r\n\t\r\n\t\r\n\t/// High precision 64 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u64, highp>\t\thighp_u64vec1;\r\n\t\r\n\t/// High precision 64 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u64, highp>\t\thighp_u64vec2;\r\n\t\r\n\t/// High precision 64 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u64, highp>\t\thighp_u64vec3;\r\n\t\r\n\t/// High precision 64 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u64, highp>\t\thighp_u64vec4;\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_UINT))\r\n\ttypedef lowp_u64vec1\t\t\tu64vec1;\r\n\ttypedef lowp_u64vec2\t\t\tu64vec2;\r\n\ttypedef lowp_u64vec3\t\t\tu64vec3;\r\n\ttypedef lowp_u64vec4\t\t\tu64vec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_UINT))\r\n\ttypedef mediump_u64vec1\t\t\tu64vec1;\r\n\ttypedef mediump_u64vec2\t\t\tu64vec2;\r\n\ttypedef mediump_u64vec3\t\t\tu64vec3;\r\n\ttypedef mediump_u64vec4\t\t\tu64vec4;\r\n#else\r\n\t/// Default precision 64 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u64vec1\t\t\tu64vec1;\r\n\r\n\t/// Default precision 64 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u64vec2\t\t\tu64vec2;\r\n\t\r\n\t/// Default precision 64 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u64vec3\t\t\tu64vec3;\r\n\t\r\n\t/// Default precision 64 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u64vec4\t\t\tu64vec4;\r\n#endif\r\n\t\r\n\t\r\n\t//////////////////////\r\n\t// Float vector types\r\n\t\r\n\t/// Low 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 lowp_float32;\r\n\t\r\n\t/// Low 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 lowp_float64;\r\n\t\r\n\t/// Low 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 lowp_float32_t;\r\n\t\r\n\t/// Low 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 lowp_float64_t;\r\n\t\r\n\t/// Low 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float32 lowp_f32;\r\n\t\r\n\t/// Low 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float64 lowp_f64;\r\n\t\r\n\t/// Low 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 lowp_float32;\r\n\t\r\n\t/// Low 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 lowp_float64;\r\n\t\t\r\n\t/// Low 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 lowp_float32_t;\r\n\t\r\n\t/// Low 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 lowp_float64_t;\r\n\t\r\n\t/// Low 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float32 lowp_f32;\r\n\t\r\n\t/// Low 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float64 lowp_f64;\r\n\r\n\r\n\t/// Low 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 lowp_float32;\r\n\t\r\n\t/// Low 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 lowp_float64;\r\n\t\t\r\n\t/// Low 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 lowp_float32_t;\r\n\t\r\n\t/// Low 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 lowp_float64_t;\r\n\t\t\r\n\t/// Low 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float32 lowp_f32;\r\n\t\r\n\t/// Low 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float64 lowp_f64;\r\n\r\n\t\r\n\t/// Medium 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 mediump_float32;\r\n\t\r\n\t/// Medium 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 mediump_float64;\r\n\t\t\r\n\t/// Medium 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 mediump_float32_t;\r\n\t\r\n\t/// Medium 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 mediump_float64_t;\r\n\t\r\n\t/// Medium 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float32 mediump_f32;\r\n\t\r\n\t/// Medium 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float64 mediump_f64;\r\n\r\n\t\r\n\t/// High 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 highp_float32;\r\n\t\r\n\t/// High 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 highp_float64;\r\n\t\r\n\t/// High 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 highp_float32_t;\r\n\t\r\n\t/// High 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 highp_float64_t;\r\n\t\r\n\t/// High 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float32 highp_f32;\r\n\t\r\n\t/// High 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float64 highp_f64;\r\n\r\n\r\n#if(defined(GLM_PRECISION_LOWP_FLOAT))\r\n\t/// Default 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_float32 float32;\r\n\t\r\n\t/// Default 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_float64 float64;\r\n\t\r\n\t/// Default 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_float32_t float32_t;\r\n\t\r\n\t/// Default 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_float64_t float64_t;\r\n\t\r\n\t/// Default 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_f32 f32;\r\n\t\r\n\t/// Default 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_f64 f64;\r\n\r\n#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))\r\n\t\r\n\t/// Default 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_float32 float32;\r\n\t\r\n\t/// Default 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_float64 float64;\r\n\t\r\n\t/// Default 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_float32 float32_t;\r\n\t\r\n\t/// Default 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_float64 float64_t;\r\n\t\r\n\t/// Default 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_float32 f32;\r\n\t\r\n\t/// Default 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_float64 f64;\r\n\r\n#else//(defined(GLM_PRECISION_HIGHP_FLOAT))\r\n\t\r\n\t/// Default 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_float32 float32;\r\n\t\r\n\t/// Default 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_float64 float64;\r\n\t\r\n\t/// Default 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_float32_t float32_t;\r\n\t\r\n\t/// Default 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_float64_t float64_t;\r\n\t\r\n\t/// Default 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_float32_t f32;\r\n\t\r\n\t/// Default 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_float64_t f64;\r\n#endif\r\n\r\n\r\n\t/// Low single-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<float, lowp> lowp_vec1;\r\n\t\r\n\t/// Low single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<float, lowp> lowp_vec2;\r\n\t\r\n\t/// Low single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<float, lowp> lowp_vec3;\r\n\t\r\n\t/// Low single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<float, lowp> lowp_vec4;\r\n\t\r\n\t/// Low single-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<float, lowp> lowp_fvec1;\r\n\t\r\n\t/// Low single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<float, lowp> lowp_fvec2;\r\n\t\r\n\t/// Low single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<float, lowp> lowp_fvec3;\r\n\t\r\n\t/// Low single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<float, lowp> lowp_fvec4;\r\n\t\r\n\t\r\n\t\r\n\t/// Medium single-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<float, mediump> mediump_vec1;\r\n\t\r\n\t/// Medium Single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<float, mediump> mediump_vec2;\r\n\t\r\n\t/// Medium Single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<float, mediump> mediump_vec3;\r\n\t\r\n\t/// Medium Single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<float, mediump> mediump_vec4;\r\n\t\r\n\t/// Medium single-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<float, mediump> mediump_fvec1;\r\n\t\r\n\t/// Medium Single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<float, mediump> mediump_fvec2;\r\n\t\r\n\t/// Medium Single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<float, mediump> mediump_fvec3;\r\n\t\r\n\t/// Medium Single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<float, mediump> mediump_fvec4;\r\n\t\r\n\r\n\r\n\t/// High single-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<float, highp> highp_vec1;\r\n\t\r\n\t/// High Single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<float, highp> highp_vec2;\r\n\t\r\n\t/// High Single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<float, highp> highp_vec3;\r\n\t\r\n\t/// High Single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<float, highp> highp_vec4;\r\n\t\r\n\t/// High single-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<float, highp> highp_fvec1;\r\n\t\r\n\t/// High Single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<float, highp> highp_fvec2;\r\n\t\r\n\t/// High Single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<float, highp> highp_fvec3;\r\n\t\r\n\t/// High Single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<float, highp> highp_fvec4;\r\n\t\r\n\t\r\n\t/// Low single-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<f32, lowp> lowp_f32vec1;\r\n\t\r\n\t/// Low single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<f32, lowp> lowp_f32vec2;\r\n\t\r\n\t/// Low single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<f32, lowp> lowp_f32vec3;\r\n\t\r\n\t/// Low single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<f32, lowp> lowp_f32vec4;\r\n\t\t\r\n\t/// Medium single-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<f32, mediump> mediump_f32vec1;\r\n\t\r\n\t/// Medium single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<f32, mediump> mediump_f32vec2;\r\n\t\r\n\t/// Medium single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<f32, mediump> mediump_f32vec3;\r\n\t\r\n\t/// Medium single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<f32, mediump> mediump_f32vec4;\r\n\r\n\t/// High single-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<f32, highp> highp_f32vec1;\r\n\t\r\n\t/// High single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<f32, highp> highp_f32vec2;\r\n\t\r\n\t/// High single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<f32, highp> highp_f32vec3;\r\n\t\r\n\t/// High single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<f32, highp> highp_f32vec4;\r\n\r\n\t\r\n\t/// Low double-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<f64, lowp> lowp_f64vec1;\r\n\t\r\n\t/// Low double-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<f64, lowp> lowp_f64vec2;\r\n\t\r\n\t/// Low double-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<f64, lowp> lowp_f64vec3;\r\n\t\r\n\t/// Low double-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<f64, lowp> lowp_f64vec4;\r\n\t\r\n\t/// Medium double-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<f64, mediump> mediump_f64vec1;\r\n\t\r\n\t/// Medium double-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<f64, mediump> mediump_f64vec2;\r\n\t\r\n\t/// Medium double-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<f64, mediump> mediump_f64vec3;\r\n\t\r\n\t/// Medium double-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<f64, mediump> mediump_f64vec4;\r\n\t\r\n\t/// High double-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<f64, highp> highp_f64vec1;\r\n\t\r\n\t/// High double-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<f64, highp> highp_f64vec2;\r\n\t\r\n\t/// High double-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<f64, highp> highp_f64vec3;\r\n\t\r\n\t/// High double-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<f64, highp> highp_f64vec4;\r\n\t\r\n\t\r\n\t//////////////////////\r\n\t// Float matrix types\r\n\t\r\n\t/// Low single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef lowp_f32 lowp_fmat1x1;\r\n\t\r\n\t/// Low single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f32, lowp> lowp_fmat2x2;\r\n\t\r\n\t/// Low single-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f32, lowp> lowp_fmat2x3;\r\n\t\r\n\t/// Low single-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f32, lowp> lowp_fmat2x4;\r\n\t\r\n\t/// Low single-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f32, lowp> lowp_fmat3x2;\r\n\t\r\n\t/// Low single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f32, lowp> lowp_fmat3x3;\r\n\t\r\n\t/// Low single-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f32, lowp> lowp_fmat3x4;\r\n\t\r\n\t/// Low single-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f32, lowp> lowp_fmat4x2;\r\n\t\r\n\t/// Low single-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f32, lowp> lowp_fmat4x3;\r\n\t\r\n\t/// Low single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f32, lowp> lowp_fmat4x4;\r\n\t\r\n\t/// Low single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef lowp_fmat1x1 lowp_fmat1;\r\n\t\r\n\t/// Low single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_fmat2x2 lowp_fmat2;\r\n\t\r\n\t/// Low single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_fmat3x3 lowp_fmat3;\r\n\t\r\n\t/// Low single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_fmat4x4 lowp_fmat4;\r\n\t\r\n\t\r\n\t/// Medium single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef mediump_f32 mediump_fmat1x1;\r\n\t\r\n\t/// Medium single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f32, mediump> mediump_fmat2x2;\r\n\t\r\n\t/// Medium single-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f32, mediump> mediump_fmat2x3;\r\n\t\r\n\t/// Medium single-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f32, mediump> mediump_fmat2x4;\r\n\t\r\n\t/// Medium single-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f32, mediump> mediump_fmat3x2;\r\n\t\r\n\t/// Medium single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f32, mediump> mediump_fmat3x3;\r\n\t\r\n\t/// Medium single-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f32, mediump> mediump_fmat3x4;\r\n\t\r\n\t/// Medium single-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f32, mediump> mediump_fmat4x2;\r\n\t\r\n\t/// Medium single-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f32, mediump> mediump_fmat4x3;\r\n\t\r\n\t/// Medium single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f32, mediump> mediump_fmat4x4;\r\n\t\r\n\t/// Medium single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef mediump_fmat1x1 mediump_fmat1;\r\n\t\r\n\t/// Medium single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_fmat2x2 mediump_fmat2;\r\n\t\r\n\t/// Medium single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_fmat3x3 mediump_fmat3;\r\n\t\r\n\t/// Medium single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_fmat4x4 mediump_fmat4;\r\n\t\r\n\r\n\t\r\n\t/// High single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef highp_f32 highp_fmat1x1;\r\n\t\r\n\t/// High single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f32, highp> highp_fmat2x2;\r\n\t\r\n\t/// High single-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f32, highp> highp_fmat2x3;\r\n\t\r\n\t/// High single-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f32, highp> highp_fmat2x4;\r\n\t\r\n\t/// High single-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f32, highp> highp_fmat3x2;\r\n\t\r\n\t/// High single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f32, highp> highp_fmat3x3;\r\n\t\r\n\t/// High single-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f32, highp> highp_fmat3x4;\r\n\t\r\n\t/// High single-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f32, highp> highp_fmat4x2;\r\n\t\r\n\t/// High single-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f32, highp> highp_fmat4x3;\r\n\t\r\n\t/// High single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f32, highp> highp_fmat4x4;\r\n\t\r\n\t/// High single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef highp_fmat1x1 highp_fmat1;\r\n\t\r\n\t/// High single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_fmat2x2 highp_fmat2;\r\n\t\r\n\t/// High single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_fmat3x3 highp_fmat3;\r\n\t\r\n\t/// High single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_fmat4x4 highp_fmat4;\r\n\r\n\r\n\t/// Low single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef f32 lowp_f32mat1x1;\r\n\t\r\n\t/// Low single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f32, lowp> lowp_f32mat2x2;\r\n\t\r\n\t/// Low single-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f32, lowp> lowp_f32mat2x3;\r\n\t\r\n\t/// Low single-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f32, lowp> lowp_f32mat2x4;\r\n\t\r\n\t/// Low single-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f32, lowp> lowp_f32mat3x2;\r\n\t\r\n\t/// Low single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f32, lowp> lowp_f32mat3x3;\r\n\t\r\n\t/// Low single-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f32, lowp> lowp_f32mat3x4;\r\n\t\r\n\t/// Low single-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f32, lowp> lowp_f32mat4x2;\r\n\t\r\n\t/// Low single-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f32, lowp> lowp_f32mat4x3;\r\n\t\r\n\t/// Low single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f32, lowp> lowp_f32mat4x4;\r\n\t\r\n\t/// Low single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef detail::tmat1x1<f32, lowp> lowp_f32mat1;\r\n\t\r\n\t/// Low single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_f32mat2x2 lowp_f32mat2;\r\n\t\r\n\t/// Low single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_f32mat3x3 lowp_f32mat3;\r\n\t\r\n\t/// Low single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_f32mat4x4 lowp_f32mat4;\r\n\r\n\r\n\r\n\t/// High single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef f32 mediump_f32mat1x1;\r\n\t\r\n\t/// Low single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f32, mediump> mediump_f32mat2x2;\r\n\t\r\n\t/// Medium single-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f32, mediump> mediump_f32mat2x3;\r\n\t\r\n\t/// Medium single-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f32, mediump> mediump_f32mat2x4;\r\n\t\r\n\t/// Medium single-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f32, mediump> mediump_f32mat3x2;\r\n\t\r\n\t/// Medium single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f32, mediump> mediump_f32mat3x3;\r\n\t\r\n\t/// Medium single-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f32, mediump> mediump_f32mat3x4;\r\n\t\r\n\t/// Medium single-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f32, mediump> mediump_f32mat4x2;\r\n\t\r\n\t/// Medium single-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f32, mediump> mediump_f32mat4x3;\r\n\t\r\n\t/// Medium single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f32, mediump> mediump_f32mat4x4;\r\n\t\r\n\t/// Medium single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef detail::tmat1x1<f32, mediump> f32mat1;\r\n\t\r\n\t/// Medium single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_f32mat2x2 mediump_f32mat2;\r\n\t\r\n\t/// Medium single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_f32mat3x3 mediump_f32mat3;\r\n\t\r\n\t/// Medium single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_f32mat4x4 mediump_f32mat4;\r\n\r\n\r\n\r\n\t\r\n\t/// High single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef f32 highp_f32mat1x1;\r\n\t\r\n\t/// High single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f32, highp> highp_f32mat2x2;\r\n\t\r\n\t/// High single-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f32, highp> highp_f32mat2x3;\r\n\t\r\n\t/// High single-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f32, highp> highp_f32mat2x4;\r\n\t\r\n\t/// High single-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f32, highp> highp_f32mat3x2;\r\n\t\r\n\t/// High single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f32, highp> highp_f32mat3x3;\r\n\t\r\n\t/// High single-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f32, highp> highp_f32mat3x4;\r\n\t\r\n\t/// High single-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f32, highp> highp_f32mat4x2;\r\n\t\r\n\t/// High single-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f32, highp> highp_f32mat4x3;\r\n\t\r\n\t/// High single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f32, highp> highp_f32mat4x4;\r\n\t\r\n\t/// High single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef detail::tmat1x1<f32, highp> f32mat1;\r\n\t\r\n\t/// High single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat2x2 highp_f32mat2;\r\n\t\r\n\t/// High single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat3x3 highp_f32mat3;\r\n\t\r\n\t/// High single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat4x4 highp_f32mat4;\r\n\t\r\n\r\n\r\n\t/// Low double-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef f64 lowp_f64mat1x1;\r\n\t\r\n\t/// Low double-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f64, lowp> lowp_f64mat2x2;\r\n\t\r\n\t/// Low double-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f64, lowp> lowp_f64mat2x3;\r\n\t\r\n\t/// Low double-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f64, lowp> lowp_f64mat2x4;\r\n\t\r\n\t/// Low double-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f64, lowp> lowp_f64mat3x2;\r\n\t\r\n\t/// Low double-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f64, lowp> lowp_f64mat3x3;\r\n\t\r\n\t/// Low double-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f64, lowp> lowp_f64mat3x4;\r\n\t\r\n\t/// Low double-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f64, lowp> lowp_f64mat4x2;\r\n\t\r\n\t/// Low double-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f64, lowp> lowp_f64mat4x3;\r\n\t\r\n\t/// Low double-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f64, lowp> lowp_f64mat4x4;\r\n\r\n\t/// Low double-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef lowp_f64mat1x1 lowp_f64mat1;\r\n\t\r\n\t/// Low double-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_f64mat2x2 lowp_f64mat2;\r\n\t\r\n\t/// Low double-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_f64mat3x3 lowp_f64mat3;\r\n\t\r\n\t/// Low double-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_f64mat4x4 lowp_f64mat4;\r\n\r\n\t\r\n\t\r\n\t/// Medium double-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef f64 Highp_f64mat1x1;\r\n\t\r\n\t/// Medium double-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f64, mediump> mediump_f64mat2x2;\r\n\t\r\n\t/// Medium double-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f64, mediump> mediump_f64mat2x3;\r\n\t\r\n\t/// Medium double-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f64, mediump> mediump_f64mat2x4;\r\n\t\r\n\t/// Medium double-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f64, mediump> mediump_f64mat3x2;\r\n\t\r\n\t/// Medium double-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f64, mediump> mediump_f64mat3x3;\r\n\t\r\n\t/// Medium double-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f64, mediump> mediump_f64mat3x4;\r\n\t\r\n\t/// Medium double-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f64, mediump> mediump_f64mat4x2;\r\n\t\r\n\t/// Medium double-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f64, mediump> mediump_f64mat4x3;\r\n\t\r\n\t/// Medium double-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f64, mediump> mediump_f64mat4x4;\r\n\r\n\t/// Medium double-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef mediump_f64mat1x1 mediump_f64mat1;\r\n\t\r\n\t/// Medium double-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_f64mat2x2 mediump_f64mat2;\r\n\t\r\n\t/// Medium double-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_f64mat3x3 mediump_f64mat3;\r\n\t\r\n\t/// Medium double-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_f64mat4x4 mediump_f64mat4;\r\n\t\r\n\t/// High double-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef f64 highp_f64mat1x1;\r\n\t\r\n\t/// High double-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f64, highp> highp_f64mat2x2;\r\n\t\r\n\t/// High double-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f64, highp> highp_f64mat2x3;\r\n\t\r\n\t/// High double-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f64, highp> highp_f64mat2x4;\r\n\t\r\n\t/// High double-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f64, highp> highp_f64mat3x2;\r\n\t\r\n\t/// High double-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f64, highp> highp_f64mat3x3;\r\n\t\r\n\t/// High double-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f64, highp> highp_f64mat3x4;\r\n\t\r\n\t/// High double-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f64, highp> highp_f64mat4x2;\r\n\t\r\n\t/// High double-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f64, highp> highp_f64mat4x3;\r\n\t\r\n\t/// High double-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f64, highp> highp_f64mat4x4;\r\n\r\n\t/// High double-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef highp_f64mat1x1 highp_f64mat1;\r\n\t\r\n\t/// High double-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat2x2 highp_f64mat2;\r\n\t\r\n\t/// High double-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat3x3 highp_f64mat3;\r\n\t\r\n\t/// High double-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat4x4 highp_f64mat4;\r\n\t\r\n\t//////////////////////////\r\n\t// Quaternion types\r\n\r\n\t/// Low single-precision floating-point quaternion.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tquat<f32, lowp> lowp_f32quat;\r\n\t\r\n\t/// Low double-precision floating-point quaternion.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tquat<f64, lowp> lowp_f64quat;\r\n\t\r\n\t/// Medium single-precision floating-point quaternion.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tquat<f32, mediump> mediump_f32quat;\r\n\t\r\n\t/// Medium double-precision floating-point quaternion.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tquat<f64, mediump> mediump_f64quat;\r\n\t\r\n\t/// High single-precision floating-point quaternion.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tquat<f32, highp> highp_f32quat;\r\n\t\r\n\t/// High double-precision floating-point quaternion.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tquat<f64, highp> highp_f64quat;\r\n\t\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef lowp_f32vec1\t\t\tfvec1;\r\n\ttypedef lowp_f32vec2\t\t\tfvec2;\r\n\ttypedef lowp_f32vec3\t\t\tfvec3;\r\n\ttypedef lowp_f32vec4\t\t\tfvec4;\r\n\ttypedef lowp_f32mat2\t\t\tfmat2;\r\n\ttypedef lowp_f32mat3\t\t\tfmat3;\r\n\ttypedef lowp_f32mat4\t\t\tfmat4;\r\n\ttypedef lowp_f32mat2x2\t\t\tfmat2x2;\r\n\ttypedef lowp_f32mat3x2\t\t\tfmat3x2;\r\n\ttypedef lowp_f32mat4x2\t\t\tfmat4x2;\r\n\ttypedef lowp_f32mat2x3\t\t\tfmat2x3;\r\n\ttypedef lowp_f32mat3x3\t\t\tfmat3x3;\r\n\ttypedef lowp_f32mat4x3\t\t\tfmat4x3;\r\n\ttypedef lowp_f32mat2x4\t\t\tfmat2x4;\r\n\ttypedef lowp_f32mat3x4\t\t\tfmat3x4;\r\n\ttypedef lowp_f32mat4x4\t\t\tfmat4x4;\r\n\ttypedef lowp_f32quat\t\t\tfquat;\r\n\r\n\ttypedef lowp_f32vec1\t\t\tf32vec1;\r\n\ttypedef lowp_f32vec2\t\t\tf32vec2;\r\n\ttypedef lowp_f32vec3\t\t\tf32vec3;\r\n\ttypedef lowp_f32vec4\t\t\tf32vec4;\r\n\ttypedef lowp_f32mat2\t\t\tf32mat2;\r\n\ttypedef lowp_f32mat3\t\t\tf32mat3;\r\n\ttypedef lowp_f32mat4\t\t\tf32mat4;\r\n\ttypedef lowp_f32mat2x2\t\t\tf32mat2x2;\r\n\ttypedef lowp_f32mat3x2\t\t\tf32mat3x2;\r\n\ttypedef lowp_f32mat4x2\t\t\tf32mat4x2;\r\n\ttypedef lowp_f32mat2x3\t\t\tf32mat2x3;\r\n\ttypedef lowp_f32mat3x3\t\t\tf32mat3x3;\r\n\ttypedef lowp_f32mat4x3\t\t\tf32mat4x3;\r\n\ttypedef lowp_f32mat2x4\t\t\tf32mat2x4;\r\n\ttypedef lowp_f32mat3x4\t\t\tf32mat3x4;\r\n\ttypedef lowp_f32mat4x4\t\t\tf32mat4x4;\r\n\ttypedef lowp_f32quat\t\t\tf32quat;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))\r\n\ttypedef mediump_f32vec1\t\t\tfvec1;\r\n\ttypedef mediump_f32vec2\t\t\tfvec2;\r\n\ttypedef mediump_f32vec3\t\t\tfvec3;\r\n\ttypedef mediump_f32vec4\t\t\tfvec4;\r\n\ttypedef mediump_f32mat2\t\t\tfmat2;\r\n\ttypedef mediump_f32mat3\t\t\tfmat3;\r\n\ttypedef mediump_f32mat4\t\t\tfmat4;\r\n\ttypedef mediump_f32mat2x2\t\tfmat2x2;\r\n\ttypedef mediump_f32mat3x2\t\tfmat3x2;\r\n\ttypedef mediump_f32mat4x2\t\tfmat4x2;\r\n\ttypedef mediump_f32mat2x3\t\tfmat2x3;\r\n\ttypedef mediump_f32mat3x3\t\tfmat3x3;\r\n\ttypedef mediump_f32mat4x3\t\tfmat4x3;\r\n\ttypedef mediump_f32mat2x4\t\tfmat2x4;\r\n\ttypedef mediump_f32mat3x4\t\tfmat3x4;\r\n\ttypedef mediump_f32mat4x4\t\tfmat4x4;\r\n\ttypedef mediump_f32quat\t\t\tfquat;\r\n\r\n\ttypedef mediump_f32vec1\t\t\tf32vec1;\r\n\ttypedef mediump_f32vec2\t\t\tf32vec2;\r\n\ttypedef mediump_f32vec3\t\t\tf32vec3;\r\n\ttypedef mediump_f32vec4\t\t\tf32vec4;\r\n\ttypedef mediump_f32mat2\t\t\tf32mat2;\r\n\ttypedef mediump_f32mat3\t\t\tf32mat3;\r\n\ttypedef mediump_f32mat4\t\t\tf32mat4;\r\n\ttypedef mediump_f32mat2x2\t\tf32mat2x2;\r\n\ttypedef mediump_f32mat3x2\t\tf32mat3x2;\r\n\ttypedef mediump_f32mat4x2\t\tf32mat4x2;\r\n\ttypedef mediump_f32mat2x3\t\tf32mat2x3;\r\n\ttypedef mediump_f32mat3x3\t\tf32mat3x3;\r\n\ttypedef mediump_f32mat4x3\t\tf32mat4x3;\r\n\ttypedef mediump_f32mat2x4\t\tf32mat2x4;\r\n\ttypedef mediump_f32mat3x4\t\tf32mat3x4;\r\n\ttypedef mediump_f32mat4x4\t\tf32mat4x4;\r\n\ttypedef mediump_f32quat\t\t\tf32quat;\r\n#else//if(defined(GLM_PRECISION_HIGHP_FLOAT))\r\n\t/// Default single-precision floating-point vector of 1 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32vec1\t\t\tfvec1;\r\n\r\n\t/// Default single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32vec2\t\t\tfvec2;\r\n\t\r\n\t/// Default single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32vec3\t\t\tfvec3;\r\n\t\r\n\t/// Default single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32vec4\t\t\tfvec4;\r\n\r\n\t/// Default single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat2x2\t\t\tfmat2x2;\r\n\r\n\t/// Default single-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat2x3\t\t\tfmat2x3;\r\n\t\t\r\n\t/// Default single-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat2x4\t\t\tfmat2x4;\r\n\r\n\t/// Default single-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat3x2\t\t\tfmat3x2;\r\n\r\n\t/// Default single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat3x3\t\t\tfmat3x3;\r\n\t\t\r\n\t/// Default single-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat3x4\t\t\tfmat3x4;\r\n\r\n\t/// Default single-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat4x2\t\t\tfmat4x2;\r\n\r\n\t/// Default single-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat4x3\t\t\tfmat4x3;\r\n\t\t\r\n\t/// Default single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat4x4\t\t\tfmat4x4;\r\n\t\r\n\t/// Default single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef fmat2x2\t\t\t\t\tfmat2;\r\n\r\n\t/// Default single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef fmat3x3\t\t\t\t\tfmat3;\r\n\r\n\t/// Default single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef fmat4x4\t\t\t\t\tfmat4;\r\n\t\r\n\t/// Default single-precision floating-point quaternion.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_fquat\t\t\t\tfquat;\r\n\t\r\n\r\n\r\n\t/// Default single-precision floating-point vector of 1 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32vec1\t\t\tf32vec1;\r\n\r\n\t/// Default single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32vec2\t\t\tf32vec2;\r\n\t\r\n\t/// Default single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32vec3\t\t\tf32vec3;\r\n\t\r\n\t/// Default single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32vec4\t\t\tf32vec4;\r\n\r\n\t/// Default single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat2x2\t\t\tf32mat2x2;\r\n\r\n\t/// Default single-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat2x3\t\t\tf32mat2x3;\r\n\t\t\r\n\t/// Default single-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat2x4\t\t\tf32mat2x4;\r\n\r\n\t/// Default single-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat3x2\t\t\tf32mat3x2;\r\n\r\n\t/// Default single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat3x3\t\t\tf32mat3x3;\r\n\t\t\r\n\t/// Default single-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat3x4\t\t\tf32mat3x4;\r\n\r\n\t/// Default single-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat4x2\t\t\tf32mat4x2;\r\n\r\n\t/// Default single-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat4x3\t\t\tf32mat4x3;\r\n\t\t\r\n\t/// Default single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat4x4\t\t\tf32mat4x4;\r\n\t\r\n\t/// Default single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef f32mat2x2\t\t\t\tf32mat2;\r\n\r\n\t/// Default single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef f32mat3x3\t\t\t\tf32mat3;\r\n\r\n\t/// Default single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef f32mat4x4\t\t\t\tf32mat4;\r\n\t\r\n\t/// Default single-precision floating-point quaternion.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32quat\t\t\tf32quat;\r\n#endif\r\n\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_DOUBLE))\r\n\ttypedef lowp_f64vec1\t\t\tf64vec1;\r\n\ttypedef lowp_f64vec2\t\t\tf64vec2;\r\n\ttypedef lowp_f64vec3\t\t\tf64vec3;\r\n\ttypedef lowp_f64vec4\t\t\tf64vec4;\r\n\ttypedef lowp_f64mat2\t\t\tf64mat2;\r\n\ttypedef lowp_f64mat3\t\t\tf64mat3;\r\n\ttypedef lowp_f64mat4\t\t\tf64mat4;\r\n\ttypedef lowp_f64mat2x2\t\t\tf64mat2x2;\r\n\ttypedef lowp_f64mat3x2\t\t\tf64mat3x2;\r\n\ttypedef lowp_f64mat4x2\t\t\tf64mat4x2;\r\n\ttypedef lowp_f64mat2x3\t\t\tf64mat2x3;\r\n\ttypedef lowp_f64mat3x3\t\t\tf64mat3x3;\r\n\ttypedef lowp_f64mat4x3\t\t\tf64mat4x3;\r\n\ttypedef lowp_f64mat2x4\t\t\tf64mat2x4;\r\n\ttypedef lowp_f64mat3x4\t\t\tf64mat3x4;\r\n\ttypedef lowp_f64mat4x4\t\t\tf64mat4x4;\r\n\ttypedef lowp_f64quat\t\t\tf64quat;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))\r\n\ttypedef mediump_f64vec1\t\t\tf64vec1;\r\n\ttypedef mediump_f64vec2\t\t\tf64vec2;\r\n\ttypedef mediump_f64vec3\t\t\tf64vec3;\r\n\ttypedef mediump_f64vec4\t\t\tf64vec4;\r\n\ttypedef mediump_f64mat2\t\t\tf64mat2;\r\n\ttypedef mediump_f64mat3\t\t\tf64mat3;\r\n\ttypedef mediump_f64mat4\t\t\tf64mat4;\r\n\ttypedef mediump_f64mat2x2\t\tf64mat2x2;\r\n\ttypedef mediump_f64mat3x2\t\tf64mat3x2;\r\n\ttypedef mediump_f64mat4x2\t\tf64mat4x2;\r\n\ttypedef mediump_f64mat2x3\t\tf64mat2x3;\r\n\ttypedef mediump_f64mat3x3\t\tf64mat3x3;\r\n\ttypedef mediump_f64mat4x3\t\tf64mat4x3;\r\n\ttypedef mediump_f64mat2x4\t\tf64mat2x4;\r\n\ttypedef mediump_f64mat3x4\t\tf64mat3x4;\r\n\ttypedef mediump_f64mat4x4\t\tf64mat4x4;\r\n\ttypedef mediump_f64quat\t\t\tf64quat;\r\n#else\r\n\t/// Default double-precision floating-point vector of 1 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64vec1\t\t\tf64vec1;\r\n\r\n\t/// Default double-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64vec2\t\t\tf64vec2;\r\n\t\r\n\t/// Default double-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64vec3\t\t\tf64vec3;\r\n\t\r\n\t/// Default double-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64vec4\t\t\tf64vec4;\r\n\r\n\t/// Default double-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat2x2\t\t\tf64mat2x2;\r\n\r\n\t/// Default double-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat2x3\t\t\tf64mat2x3;\r\n\t\t\r\n\t/// Default double-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat2x4\t\t\tf64mat2x4;\r\n\r\n\t/// Default double-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat3x2\t\t\tf64mat3x2;\r\n\r\n\t/// Default double-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat3x3\t\t\tf64mat3x3;\r\n\r\n\t/// Default double-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat3x4\t\t\tf64mat3x4;\r\n\r\n\t/// Default double-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat4x2\t\t\tf64mat4x2;\r\n\r\n\t/// Default double-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat4x3\t\t\tf64mat4x3;\r\n\r\n\t/// Default double-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat4x4\t\t\tf64mat4x4;\r\n\r\n\t/// Default double-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef f64mat2x2\t\t\t\tf64mat2;\r\n\r\n\t/// Default double-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef f64mat3x3\t\t\t\tf64mat3;\r\n\r\n\t/// Default double-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef f64mat4x4\t\t\t\tf64mat4;\r\n\r\n\t/// Default double-precision floating-point quaternion.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64quat\t\t\tf64quat;\r\n#endif\r\n}//namespace glm\r\n\r\n#endif//GLM_FWD_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/geometric.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/geometric.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GEOMETRIC_INCLUDED\r\n#define GLM_GEOMETRIC_INCLUDED\r\n\r\n#include \"detail/func_geometric.hpp\"\r\n\r\n#endif//GLM_GEOMETRIC_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/glm.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/glm.hpp\r\n/// @date 2005-01-14 / 2011-10-24\r\n/// @author Christophe Riccio\r\n///\r\n///\t@defgroup core GLM Core\r\n///\t\r\n///\t@brief The core of GLM, which implements exactly and only the GLSL specification to the degree possible.\r\n///\r\n/// The GLM core consists of @ref core_types \"C++ types that mirror GLSL types\" and\r\n/// C++ functions that mirror the GLSL functions. It also includes \r\n/// @ref core_precision \"a set of precision-based types\" that can be used in the appropriate\r\n/// functions. The C++ types are all based on a basic set of @ref core_template \"template types\".\r\n/// \r\n/// The best documentation for GLM Core is the current GLSL specification,\r\n/// <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.clean.pdf\">version 4.2\r\n/// (pdf file)</a>.\r\n/// There are a few @ref pg_differences \"differences\" between GLM core and GLSL.\r\n/// \r\n/// GLM core functionnalities require <glm/glm.hpp> to be included to be used.\r\n/// \r\n/// @defgroup core_types Types\r\n/// \r\n/// @brief The standard types defined by the specification.\r\n/// \r\n/// These types are all typedefs of more generalized, template types. To see the definiton\r\n/// of these template types, go to @ref core_template.\r\n/// \r\n/// @ingroup core\r\n/// \r\n/// @defgroup core_precision Precision types\r\n/// \r\n/// @brief Non-GLSL types that are used to define precision-based types.\r\n/// \r\n/// The GLSL language allows the user to define the precision of a particular variable.\r\n/// In OpenGL's GLSL, these precision qualifiers have no effect; they are there for compatibility\r\n/// with OpenGL ES's precision qualifiers, where they @em do have an effect.\r\n/// \r\n/// C++ has no language equivalent to precision qualifiers. So GLM provides the next-best thing:\r\n/// a number of typedefs of the @ref core_template that use a particular precision.\r\n/// \r\n/// None of these types make any guarantees about the actual precision used.\r\n/// \r\n/// @ingroup core\r\n/// \r\n/// @defgroup core_template Template types\r\n/// \r\n/// @brief The generic template types used as the basis for the core types. \r\n/// \r\n/// These types are all templates used to define the actual @ref core_types.\r\n/// These templetes are implementation details of GLM types and should not be used explicitly.\r\n/// \r\n/// @ingroup core\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"detail/_fixes.hpp\"\r\n\r\n#ifndef GLM_INCLUDED\r\n#define GLM_INCLUDED\r\n\r\n#include <cmath>\r\n#include <climits>\r\n#include <cfloat>\r\n#include <limits>\r\n#include <cassert>\r\n#include \"fwd.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_CORE_INCLUDED_DISPLAYED))\r\n#\tdefine GLM_MESSAGE_CORE_INCLUDED_DISPLAYED\r\n#\tpragma message(\"GLM: Core library included\")\r\n#endif//GLM_MESSAGE\r\n\r\n#include \"vec2.hpp\"\r\n#include \"vec3.hpp\"\r\n#include \"vec4.hpp\"\r\n#include \"mat2x2.hpp\"\r\n#include \"mat2x3.hpp\"\r\n#include \"mat2x4.hpp\"\r\n#include \"mat3x2.hpp\"\r\n#include \"mat3x3.hpp\"\r\n#include \"mat3x4.hpp\"\r\n#include \"mat4x2.hpp\"\r\n#include \"mat4x3.hpp\"\r\n#include \"mat4x4.hpp\"\r\n\r\n#include \"trigonometric.hpp\"\r\n#include \"exponential.hpp\"\r\n#include \"common.hpp\"\r\n#include \"packing.hpp\"\r\n#include \"geometric.hpp\"\r\n#include \"matrix.hpp\"\r\n#include \"vector_relational.hpp\"\r\n#include \"integer.hpp\"\r\n\r\n#endif//GLM_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/gtc/constants.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_constants\r\n/// @file glm/gtc/constants.hpp\r\n/// @date 2011-09-30 / 2012-01-25\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_half_float (dependence)\r\n///\r\n/// @defgroup gtc_constants GLM_GTC_constants\r\n/// @ingroup gtc\r\n/// \r\n/// @brief Provide a list of constants and precomputed useful values.\r\n/// \r\n/// <glm/gtc/constants.hpp> need to be included to use these features.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_constants\r\n#define GLM_GTC_constants\r\n\r\n// Dependencies\r\n#include \"../detail/setup.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_constants extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_constants\r\n\t/// @{\r\n\r\n\t/// Return the epsilon constant for floating point types.\r\n\t/// @todo Implement epsilon for half-precision floating point type.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType epsilon();\r\n\r\n\t/// Return 0.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType zero();\r\n\r\n\t/// Return 1.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType one();\r\n\r\n\t/// Return the pi constant.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType pi();\r\n\r\n\t/// Return square root of pi.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType root_pi();\r\n\r\n\t/// Return pi / 2.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType half_pi();\r\n\r\n\t/// Return pi / 4.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType quarter_pi();\r\n\r\n\t/// Return 1 / pi.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType one_over_pi();\r\n\r\n\t/// Return 2 / pi.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType two_over_pi();\r\n\r\n\t/// Return 2 / sqrt(pi).\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType two_over_root_pi();\r\n\r\n\t/// Return 1 / sqrt(2).\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType one_over_root_two();\r\n\r\n\t/// Return sqrt(pi / 2).\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType root_half_pi();\r\n\r\n\t/// Return sqrt(2 * pi).\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType root_two_pi();\r\n\r\n\t/// Return sqrt(ln(4)).\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType root_ln_four();\r\n\r\n\t/// Return e constant.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType e();\r\n\r\n\t/// Return Euler's constant.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType euler();\r\n\r\n\t/// Return sqrt(2).\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType root_two();\r\n\r\n\t/// Return sqrt(3).\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType root_three();\r\n\r\n\t/// Return sqrt(5).\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType root_five();\r\n\r\n\t/// Return ln(2).\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType ln_two();\r\n\r\n\t/// Return ln(10).\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType ln_ten();\r\n\r\n\t/// Return ln(ln(2)).\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType ln_ln_two();\r\n\r\n\t/// Return 1 / 3.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType third();\r\n\r\n\t/// Return 2 / 3.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType two_thirds();\r\n\r\n\t/// Return the golden ratio constant.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType golden_ratio();\r\n\r\n\t/// @}\r\n} //namespace glm\r\n\r\n#include \"constants.inl\"\r\n\r\n#endif//GLM_GTC_constants\r\n"
  },
  {
    "path": "cpu/glm/gtc/constants.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_constants\r\n/// @file glm/gtx/constants.inl\r\n/// @date 2011-10-14 / 2012-01-25\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include <limits>\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType epsilon()\r\n\t{\r\n\t\treturn std::numeric_limits<genType>::epsilon();\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType zero()\r\n\t{\r\n\t\treturn genType(0);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType one()\r\n\t{\r\n\t\treturn genType(1);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType pi()\r\n\t{\r\n\t\treturn genType(3.14159265358979323846264338327950288);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType root_pi()\r\n\t{\r\n\t\treturn genType(1.772453850905516027);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType half_pi()\r\n\t{\r\n\t\treturn genType(1.57079632679489661923132169163975144);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType quarter_pi()\r\n\t{\r\n\t\treturn genType(0.785398163397448309615660845819875721);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType one_over_pi()\r\n\t{\r\n\t\treturn genType(0.318309886183790671537767526745028724);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType two_over_pi()\r\n\t{\r\n\t\treturn genType(0.636619772367581343075535053490057448);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType two_over_root_pi()\r\n\t{\r\n\t\treturn genType(1.12837916709551257389615890312154517);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType one_over_root_two()\r\n\t{\r\n\t\treturn genType(0.707106781186547524400844362104849039);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType root_half_pi()\r\n\t{\r\n\t\treturn genType(1.253314137315500251);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType root_two_pi()\r\n\t{\r\n\t\treturn genType(2.506628274631000502);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType root_ln_four()\r\n\t{\r\n\t\treturn genType(1.17741002251547469);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType e()\r\n\t{\r\n\t\treturn genType(2.71828182845904523536);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType euler()\r\n\t{\r\n\t\treturn genType(0.577215664901532860606);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType root_two()\r\n\t{\r\n\t\treturn genType(1.41421356237309504880168872420969808);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType root_three()\r\n\t{\r\n\t\treturn genType(1.73205080756887729352744634150587236);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType root_five()\r\n\t{\r\n\t\treturn genType(2.23606797749978969640917366873127623);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType ln_two()\r\n\t{\r\n\t\treturn genType(0.693147180559945309417232121458176568);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType ln_ten()\r\n\t{\r\n\t\treturn genType(2.30258509299404568401799145468436421);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType ln_ln_two()\r\n\t{\r\n\t\treturn genType(-0.3665129205816643);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType third()\r\n\t{\r\n\t\treturn genType(0.3333333333333333333333333333333333333333);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType two_thirds()\r\n\t{\r\n\t\treturn genType(0.666666666666666666666666666666666666667);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType golden_ratio()\r\n\t{\r\n\t\treturn genType(1.61803398874989484820458683436563811);\r\n\t}\r\n} //namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtc/epsilon.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_epsilon\r\n/// @file glm/gtc/epsilon.hpp\r\n/// @date 2012-04-07 / 2012-04-07\r\n/// @author Christophe Riccio\r\n/// \r\n/// @see core (dependence)\r\n/// @see gtc_half_float (dependence)\r\n/// @see gtc_quaternion (dependence)\r\n///\r\n/// @defgroup gtc_epsilon GLM_GTC_epsilon\r\n/// @ingroup gtc\r\n/// \r\n/// @brief Comparison functions for a user defined epsilon values.\r\n/// \r\n/// <glm/gtc/epsilon.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_epsilon\r\n#define GLM_GTC_epsilon\r\n\r\n// Dependencies\r\n#include \"../detail/setup.hpp\"\r\n#include \"../detail/precision.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_epsilon extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_epsilon\r\n\t/// @{\r\n\r\n\t/// Returns the component-wise comparison of |x - y| < epsilon.\r\n\t/// True if this expression is satisfied.\r\n\t///\r\n\t/// @see gtc_epsilon\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL vecType<bool, P> epsilonEqual(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y,\r\n\t\tT const & epsilon);\r\n\r\n\t/// Returns the component-wise comparison of |x - y| < epsilon.\r\n\t/// True if this expression is satisfied.\r\n\t///\r\n\t/// @see gtc_epsilon\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL bool epsilonEqual(\r\n\t\tgenType const & x,\r\n\t\tgenType const & y,\r\n\t\tgenType const & epsilon);\r\n\r\n\t/// Returns the component-wise comparison of |x - y| < epsilon.\r\n\t/// True if this expression is not satisfied.\r\n\t///\r\n\t/// @see gtc_epsilon\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL typename genType::boolType epsilonNotEqual(\r\n\t\tgenType const & x,\r\n\t\tgenType const & y,\r\n\t\ttypename genType::value_type const & epsilon);\r\n\r\n\t/// Returns the component-wise comparison of |x - y| >= epsilon.\r\n\t/// True if this expression is not satisfied.\r\n\t///\r\n\t/// @see gtc_epsilon\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL bool epsilonNotEqual(\r\n\t\tgenType const & x,\r\n\t\tgenType const & y,\r\n\t\tgenType const & epsilon);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"epsilon.inl\"\r\n\r\n#endif//GLM_GTC_epsilon\r\n"
  },
  {
    "path": "cpu/glm/gtc/epsilon.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_epsilon\r\n/// @file glm/gtc/epsilon.inl\r\n/// @date 2012-04-07 / 2012-04-07\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n// Dependency:\r\n#include \"quaternion.hpp\"\r\n#include \"../vector_relational.hpp\"\r\n#include \"../common.hpp\"\r\n#include \"../vec2.hpp\"\r\n#include \"../vec3.hpp\"\r\n#include \"../vec4.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER bool epsilonEqual\r\n\t(\r\n\t\tfloat const & x,\r\n\t\tfloat const & y,\r\n\t\tfloat const & epsilon\r\n\t)\r\n\t{\r\n\t\treturn abs(x - y) < epsilon;\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER bool epsilonEqual\r\n\t(\r\n\t\tdouble const & x,\r\n\t\tdouble const & y,\r\n\t\tdouble const & epsilon\r\n\t)\r\n\t{\r\n\t\treturn abs(x - y) < epsilon;\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER bool epsilonNotEqual\r\n\t(\r\n\t\tfloat const & x,\r\n\t\tfloat const & y,\r\n\t\tfloat const & epsilon\r\n\t)\r\n\t{\r\n\t\treturn abs(x - y) >= epsilon;\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER bool epsilonNotEqual\r\n\t(\r\n\t\tdouble const & x,\r\n\t\tdouble const & y,\r\n\t\tdouble const & epsilon\r\n\t)\r\n\t{\r\n\t\treturn abs(x - y) >= epsilon;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<bool, P> epsilonEqual\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\treturn lessThan(abs(x - y), vecType<T, P>(epsilon));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<bool, P> epsilonEqual\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y,\r\n\t\tvecType<T, P> const & epsilon\r\n\t)\r\n\t{\r\n\t\treturn lessThan(abs(x - y), vecType<T, P>(epsilon));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<bool, P> epsilonNotEqual\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\treturn greaterThanEqual(abs(x - y), vecType<T, P>(epsilon));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<bool, P> epsilonNotEqual\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y,\r\n\t\tvecType<T, P> const & epsilon\r\n\t)\r\n\t{\r\n\t\treturn greaterThanEqual(abs(x - y), vecType<T, P>(epsilon));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P> epsilonEqual\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<T, P> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w);\r\n\t\treturn lessThan(abs(v), detail::tvec4<T, P>(epsilon));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P> epsilonNotEqual\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<T, P> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w);\r\n\t\treturn greaterThanEqual(abs(v), detail::tvec4<T, P>(epsilon));\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtc/matrix_access.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n/// \r\n/// @ref gtc_matrix_access\r\n/// @file glm/gtc/matrix_access.hpp\r\n/// @date 2005-12-27 / 2011-05-16\r\n/// @author Christophe Riccio\r\n/// \r\n/// @see core (dependence)\r\n/// \r\n/// @defgroup gtc_matrix_access GLM_GTC_matrix_access\r\n/// @ingroup gtc\r\n/// \r\n/// Defines functions to access rows or columns of a matrix easily.\r\n/// <glm/gtc/matrix_access.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_matrix_access\r\n#define GLM_GTC_matrix_access\r\n\r\n// Dependency:\r\n#include \"../detail/setup.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_matrix_access extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_matrix_access\r\n\t/// @{\r\n\r\n\t/// Get a specific row of a matrix.\r\n\t/// @see gtc_matrix_access\r\n\ttemplate <typename genType>\r\n\ttypename genType::row_type row(\r\n\t\tgenType const & m, \r\n\t\tlength_t const & index);\r\n\r\n\t/// Set a specific row to a matrix.\r\n\t/// @see gtc_matrix_access\r\n\ttemplate <typename genType>\r\n\tgenType row(\r\n\t\tgenType const & m,\r\n\t\tlength_t const & index,\r\n\t\ttypename genType::row_type const & x);\r\n\r\n\t/// Get a specific column of a matrix.\r\n\t/// @see gtc_matrix_access\r\n\ttemplate <typename genType>\r\n\ttypename genType::col_type column(\r\n\t\tgenType const & m,\r\n\t\tlength_t const & index);\r\n\r\n\t/// Set a specific column to a matrix.\r\n\t/// @see gtc_matrix_access\r\n\ttemplate <typename genType>\r\n\tgenType column(\r\n\t\tgenType const & m,\r\n\t\tlength_t const & index,\r\n\t\ttypename genType::col_type const & x);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"matrix_access.inl\"\r\n\r\n#endif//GLM_GTC_matrix_access\r\n"
  },
  {
    "path": "cpu/glm/gtc/matrix_access.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_matrix_access\r\n/// @file glm/gtc/matrix_access.inl\r\n/// @date 2005-12-27 / 2011-06-05\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType row\r\n\t(\r\n\t\tgenType const & m,\r\n\t\tlength_t const & index,\r\n\t\ttypename genType::row_type const & x\r\n\t)\r\n\t{\r\n\t\tassert(index >= 0 && index < m[0].length());\r\n\r\n\t\tgenType Result = m;\r\n\t\tfor(length_t i = 0; i < m.length(); ++i)\r\n\t\t\tResult[i][index] = x[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER typename genType::row_type row\r\n\t(\r\n\t\tgenType const & m,\r\n\t\tlength_t const & index\r\n\t)\r\n\t{\r\n\t\tassert(index >= 0 && index < m[0].length());\r\n\r\n\t\ttypename genType::row_type Result;\r\n\t\tfor(length_t i = 0; i < m.length(); ++i)\r\n\t\t\tResult[i] = m[i][index];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType column\r\n\t(\r\n\t\tgenType const & m,\r\n\t\tlength_t const & index,\r\n\t\ttypename genType::col_type const & x\r\n\t)\r\n\t{\r\n\t\tassert(index >= 0 && index < m.length());\r\n\r\n\t\tgenType Result = m;\r\n\t\tResult[index] = x;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER typename genType::col_type column\r\n\t(\r\n\t\tgenType const & m,\r\n\t\tlength_t const & index\r\n\t)\r\n\t{\r\n\t\tassert(index >= 0 && index < m.length());\r\n\r\n\t\treturn m[index];\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtc/matrix_integer.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_matrix_integer\r\n/// @file glm/gtc/matrix_integer.hpp\r\n/// @date 2011-01-20 / 2011-06-05\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtc_matrix_integer GLM_GTC_matrix_integer\r\n/// @ingroup gtc\r\n/// \r\n/// Defines a number of matrices with integer types.\r\n/// <glm/gtc/matrix_integer.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_matrix_integer\r\n#define GLM_GTC_matrix_integer\r\n\r\n// Dependency:\r\n#include \"../mat2x2.hpp\"\r\n#include \"../mat2x3.hpp\"\r\n#include \"../mat2x4.hpp\"\r\n#include \"../mat3x2.hpp\"\r\n#include \"../mat3x3.hpp\"\r\n#include \"../mat3x4.hpp\"\r\n#include \"../mat4x2.hpp\"\r\n#include \"../mat4x3.hpp\"\r\n#include \"../mat4x4.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_matrix_integer extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_matrix_integer\r\n\t/// @{\r\n\r\n\t/// High-precision signed integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<int, highp>\t\t\t\thighp_imat2;\r\n\r\n\t/// High-precision signed integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<int, highp>\t\t\t\thighp_imat3;\r\n\r\n\t/// High-precision signed integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<int, highp>\t\t\t\thighp_imat4;\r\n\r\n\t/// High-precision signed integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<int, highp>\t\t\t\thighp_imat2x2;\r\n\r\n\t/// High-precision signed integer 2x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x3<int, highp>\t\t\t\thighp_imat2x3;\r\n\r\n\t/// High-precision signed integer 2x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x4<int, highp>\t\t\t\thighp_imat2x4;\r\n\r\n\t/// High-precision signed integer 3x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x2<int, highp>\t\t\t\thighp_imat3x2;\r\n\r\n\t/// High-precision signed integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<int, highp>\t\t\t\thighp_imat3x3;\r\n\r\n\t/// High-precision signed integer 3x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x4<int, highp>\t\t\t\thighp_imat3x4;\r\n\r\n\t/// High-precision signed integer 4x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x2<int, highp>\t\t\t\thighp_imat4x2;\r\n\r\n\t/// High-precision signed integer 4x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x3<int, highp>\t\t\t\thighp_imat4x3;\r\n\r\n\t/// High-precision signed integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<int, highp>\t\t\t\thighp_imat4x4;\r\n\r\n\r\n\t/// Medium-precision signed integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<int, mediump>\t\t\tmediump_imat2;\r\n\r\n\t/// Medium-precision signed integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<int, mediump>\t\t\tmediump_imat3;\r\n\r\n\t/// Medium-precision signed integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<int, mediump>\t\t\tmediump_imat4;\r\n\r\n\r\n\t/// Medium-precision signed integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<int, mediump>\t\t\tmediump_imat2x2;\r\n\r\n\t/// Medium-precision signed integer 2x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x3<int, mediump>\t\t\tmediump_imat2x3;\r\n\r\n\t/// Medium-precision signed integer 2x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x4<int, mediump>\t\t\tmediump_imat2x4;\r\n\r\n\t/// Medium-precision signed integer 3x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x2<int, mediump>\t\t\tmediump_imat3x2;\r\n\r\n\t/// Medium-precision signed integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<int, mediump>\t\t\tmediump_imat3x3;\r\n\r\n\t/// Medium-precision signed integer 3x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x4<int, mediump>\t\t\tmediump_imat3x4;\r\n\r\n\t/// Medium-precision signed integer 4x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x2<int, mediump>\t\t\tmediump_imat4x2;\r\n\r\n\t/// Medium-precision signed integer 4x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x3<int, mediump>\t\t\tmediump_imat4x3;\r\n\r\n\t/// Medium-precision signed integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<int, mediump>\t\t\tmediump_imat4x4;\r\n\r\n\r\n\t/// Low-precision signed integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<int, lowp>\t\t\t\tlowp_imat2;\r\n\t\r\n\t/// Low-precision signed integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<int, lowp>\t\t\t\tlowp_imat3;\r\n\r\n\t/// Low-precision signed integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<int, lowp>\t\t\t\tlowp_imat4;\r\n\r\n\r\n\t/// Low-precision signed integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<int, lowp>\t\t\t\tlowp_imat2x2;\r\n\r\n\t/// Low-precision signed integer 2x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x3<int, lowp>\t\t\t\tlowp_imat2x3;\r\n\r\n\t/// Low-precision signed integer 2x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x4<int, lowp>\t\t\t\tlowp_imat2x4;\r\n\r\n\t/// Low-precision signed integer 3x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x2<int, lowp>\t\t\t\tlowp_imat3x2;\r\n\r\n\t/// Low-precision signed integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<int, lowp>\t\t\t\tlowp_imat3x3;\r\n\r\n\t/// Low-precision signed integer 3x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x4<int, lowp>\t\t\t\tlowp_imat3x4;\r\n\r\n\t/// Low-precision signed integer 4x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x2<int, lowp>\t\t\t\tlowp_imat4x2;\r\n\r\n\t/// Low-precision signed integer 4x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x3<int, lowp>\t\t\t\tlowp_imat4x3;\r\n\r\n\t/// Low-precision signed integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<int, lowp>\t\t\t\tlowp_imat4x4;\r\n\r\n\r\n\t/// High-precision unsigned integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<uint, highp>\t\t\t\thighp_umat2;\t\r\n\r\n\t/// High-precision unsigned integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<uint, highp>\t\t\t\thighp_umat3;\r\n\r\n\t/// High-precision unsigned integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<uint, highp>\t\t\t\thighp_umat4;\r\n\r\n\t/// High-precision unsigned integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<uint, highp>\t\t\t\thighp_umat2x2;\r\n\r\n\t/// High-precision unsigned integer 2x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x3<uint, highp>\t\t\t\thighp_umat2x3;\r\n\r\n\t/// High-precision unsigned integer 2x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x4<uint, highp>\t\t\t\thighp_umat2x4;\r\n\r\n\t/// High-precision unsigned integer 3x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x2<uint, highp>\t\t\t\thighp_umat3x2;\r\n\r\n\t/// High-precision unsigned integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<uint, highp>\t\t\t\thighp_umat3x3;\r\n\r\n\t/// High-precision unsigned integer 3x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x4<uint, highp>\t\t\t\thighp_umat3x4;\r\n\r\n\t/// High-precision unsigned integer 4x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x2<uint, highp>\t\t\t\thighp_umat4x2;\r\n\r\n\t/// High-precision unsigned integer 4x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x3<uint, highp>\t\t\t\thighp_umat4x3;\r\n\r\n\t/// High-precision unsigned integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<uint, highp>\t\t\t\thighp_umat4x4;\r\n\r\n\r\n\t/// Medium-precision unsigned integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<uint, mediump>\t\t\tmediump_umat2;\r\n\r\n\t/// Medium-precision unsigned integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<uint, mediump>\t\t\tmediump_umat3;\r\n\r\n\t/// Medium-precision unsigned integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<uint, mediump>\t\t\tmediump_umat4;\r\n\r\n\r\n\t/// Medium-precision unsigned integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<uint, mediump>\t\t\tmediump_umat2x2;\r\n\r\n\t/// Medium-precision unsigned integer 2x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x3<uint, mediump>\t\t\tmediump_umat2x3;\r\n\r\n\t/// Medium-precision unsigned integer 2x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x4<uint, mediump>\t\t\tmediump_umat2x4;\r\n\r\n\t/// Medium-precision unsigned integer 3x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x2<uint, mediump>\t\t\tmediump_umat3x2;\r\n\r\n\t/// Medium-precision unsigned integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<uint, mediump>\t\t\tmediump_umat3x3;\r\n\r\n\t/// Medium-precision unsigned integer 3x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x4<uint, mediump>\t\t\tmediump_umat3x4;\r\n\r\n\t/// Medium-precision unsigned integer 4x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x2<uint, mediump>\t\t\tmediump_umat4x2;\r\n\r\n\t/// Medium-precision unsigned integer 4x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x3<uint, mediump>\t\t\tmediump_umat4x3;\r\n\r\n\t/// Medium-precision unsigned integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<uint, mediump>\t\t\tmediump_umat4x4;\r\n\r\n\r\n\t/// Low-precision unsigned integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<uint, lowp>\t\t\t\tlowp_umat2;\r\n\t\r\n\t/// Low-precision unsigned integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<uint, lowp>\t\t\t\tlowp_umat3;\r\n\r\n\t/// Low-precision unsigned integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<uint, lowp>\t\t\t\tlowp_umat4;\r\n\r\n\r\n\t/// Low-precision unsigned integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<uint, lowp>\t\t\t\tlowp_umat2x2;\r\n\r\n\t/// Low-precision unsigned integer 2x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x3<uint, lowp>\t\t\t\tlowp_umat2x3;\r\n\r\n\t/// Low-precision unsigned integer 2x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x4<uint, lowp>\t\t\t\tlowp_umat2x4;\r\n\r\n\t/// Low-precision unsigned integer 3x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x2<uint, lowp>\t\t\t\tlowp_umat3x2;\r\n\r\n\t/// Low-precision unsigned integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<uint, lowp>\t\t\t\tlowp_umat3x3;\r\n\r\n\t/// Low-precision unsigned integer 3x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x4<uint, lowp>\t\t\t\tlowp_umat3x4;\r\n\r\n\t/// Low-precision unsigned integer 4x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x2<uint, lowp>\t\t\t\tlowp_umat4x2;\r\n\r\n\t/// Low-precision unsigned integer 4x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x3<uint, lowp>\t\t\t\tlowp_umat4x3;\r\n\r\n\t/// Low-precision unsigned integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<uint, lowp>\t\t\t\tlowp_umat4x4;\r\n\r\n#if(defined(GLM_PRECISION_HIGHP_INT))\r\n\ttypedef highp_imat2\t\t\t\t\t\t\t\timat2;\r\n\ttypedef highp_imat3\t\t\t\t\t\t\t\timat3;\r\n\ttypedef highp_imat4\t\t\t\t\t\t\t\timat4;\r\n\ttypedef highp_imat2x2\t\t\t\t\t\t\timat2x2;\r\n\ttypedef highp_imat2x3\t\t\t\t\t\t\timat2x3;\r\n\ttypedef highp_imat2x4\t\t\t\t\t\t\timat2x4;\r\n\ttypedef highp_imat3x2\t\t\t\t\t\t\timat3x2;\r\n\ttypedef highp_imat3x3\t\t\t\t\t\t\timat3x3;\r\n\ttypedef highp_imat3x4\t\t\t\t\t\t\timat3x4;\r\n\ttypedef highp_imat4x2\t\t\t\t\t\t\timat4x2;\r\n\ttypedef highp_imat4x3\t\t\t\t\t\t\timat4x3;\r\n\ttypedef highp_imat4x4\t\t\t\t\t\t\timat4x4;\r\n#elif(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_imat2\t\t\t\t\t\t\t\timat2;\r\n\ttypedef lowp_imat3\t\t\t\t\t\t\t\timat3;\r\n\ttypedef lowp_imat4\t\t\t\t\t\t\t\timat4;\r\n\ttypedef lowp_imat2x2\t\t\t\t\t\t\timat2x2;\r\n\ttypedef lowp_imat2x3\t\t\t\t\t\t\timat2x3;\r\n\ttypedef lowp_imat2x4\t\t\t\t\t\t\timat2x4;\r\n\ttypedef lowp_imat3x2\t\t\t\t\t\t\timat3x2;\r\n\ttypedef lowp_imat3x3\t\t\t\t\t\t\timat3x3;\r\n\ttypedef lowp_imat3x4\t\t\t\t\t\t\timat3x4;\r\n\ttypedef lowp_imat4x2\t\t\t\t\t\t\timat4x2;\r\n\ttypedef lowp_imat4x3\t\t\t\t\t\t\timat4x3;\r\n\ttypedef lowp_imat4x4\t\t\t\t\t\t\timat4x4;\r\n#else //if(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\r\n\t/// Signed integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat2\t\t\t\t\t\t\timat2;\r\n\r\n\t/// Signed integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat3\t\t\t\t\t\t\timat3;\r\n\r\n\t/// Signed integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat4\t\t\t\t\t\t\timat4;\r\n\r\n\t/// Signed integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat2x2\t\t\t\t\t\t\timat2x2;\r\n\r\n\t/// Signed integer 2x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat2x3\t\t\t\t\t\t\timat2x3;\r\n\r\n\t/// Signed integer 2x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat2x4\t\t\t\t\t\t\timat2x4;\r\n\r\n\t/// Signed integer 3x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat3x2\t\t\t\t\t\t\timat3x2;\r\n\r\n\t/// Signed integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat3x3\t\t\t\t\t\t\timat3x3;\r\n\r\n\t/// Signed integer 3x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat3x4\t\t\t\t\t\t\timat3x4;\r\n\r\n\t/// Signed integer 4x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat4x2\t\t\t\t\t\t\timat4x2;\r\n\r\n\t/// Signed integer 4x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat4x3\t\t\t\t\t\t\timat4x3;\r\n\r\n\t/// Signed integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat4x4\t\t\t\t\t\t\timat4x4;\r\n#endif//GLM_PRECISION\r\n\r\n#if(defined(GLM_PRECISION_HIGHP_UINT))\r\n\ttypedef highp_umat2\t\t\t\t\t\t\t\tumat2;\r\n\ttypedef highp_umat3\t\t\t\t\t\t\t\tumat3;\r\n\ttypedef highp_umat4\t\t\t\t\t\t\t\tumat4;\r\n\ttypedef highp_umat2x2\t\t\t\t\t\t\tumat2x2;\r\n\ttypedef highp_umat2x3\t\t\t\t\t\t\tumat2x3;\r\n\ttypedef highp_umat2x4\t\t\t\t\t\t\tumat2x4;\r\n\ttypedef highp_umat3x2\t\t\t\t\t\t\tumat3x2;\r\n\ttypedef highp_umat3x3\t\t\t\t\t\t\tumat3x3;\r\n\ttypedef highp_umat3x4\t\t\t\t\t\t\tumat3x4;\r\n\ttypedef highp_umat4x2\t\t\t\t\t\t\tumat4x2;\r\n\ttypedef highp_umat4x3\t\t\t\t\t\t\tumat4x3;\r\n\ttypedef highp_umat4x4\t\t\t\t\t\t\tumat4x4;\r\n#elif(defined(GLM_PRECISION_LOWP_UINT))\r\n\ttypedef lowp_umat2\t\t\t\t\t\t\t\tumat2;\r\n\ttypedef lowp_umat3\t\t\t\t\t\t\t\tumat3;\r\n\ttypedef lowp_umat4\t\t\t\t\t\t\t\tumat4;\r\n\ttypedef lowp_umat2x2\t\t\t\t\t\t\tumat2x2;\r\n\ttypedef lowp_umat2x3\t\t\t\t\t\t\tumat2x3;\r\n\ttypedef lowp_umat2x4\t\t\t\t\t\t\tumat2x4;\r\n\ttypedef lowp_umat3x2\t\t\t\t\t\t\tumat3x2;\r\n\ttypedef lowp_umat3x3\t\t\t\t\t\t\tumat3x3;\r\n\ttypedef lowp_umat3x4\t\t\t\t\t\t\tumat3x4;\r\n\ttypedef lowp_umat4x2\t\t\t\t\t\t\tumat4x2;\r\n\ttypedef lowp_umat4x3\t\t\t\t\t\t\tumat4x3;\r\n\ttypedef lowp_umat4x4\t\t\t\t\t\t\tumat4x4;\r\n#else //if(defined(GLM_PRECISION_MEDIUMP_UINT))\r\n\t\r\n\t/// Unsigned integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat2\t\t\t\t\t\t\tumat2;\r\n\r\n\t/// Unsigned integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat3\t\t\t\t\t\t\tumat3;\r\n\r\n\t/// Unsigned integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat4\t\t\t\t\t\t\tumat4;\r\n\r\n\t/// Unsigned integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat2x2\t\t\t\t\t\t\tumat2x2;\r\n\r\n\t/// Unsigned integer 2x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat2x3\t\t\t\t\t\t\tumat2x3;\r\n\r\n\t/// Unsigned integer 2x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat2x4\t\t\t\t\t\t\tumat2x4;\r\n\r\n\t/// Unsigned integer 3x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat3x2\t\t\t\t\t\t\tumat3x2;\r\n\r\n\t/// Unsigned integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat3x3\t\t\t\t\t\t\tumat3x3;\r\n\r\n\t/// Unsigned integer 3x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat3x4\t\t\t\t\t\t\tumat3x4;\r\n\r\n\t/// Unsigned integer 4x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat4x2\t\t\t\t\t\t\tumat4x2;\r\n\r\n\t/// Unsigned integer 4x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat4x3\t\t\t\t\t\t\tumat4x3;\r\n\r\n\t/// Unsigned integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat4x4\t\t\t\t\t\t\tumat4x4;\r\n#endif//GLM_PRECISION\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#endif//GLM_GTC_matrix_integer\r\n"
  },
  {
    "path": "cpu/glm/gtc/matrix_inverse.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_matrix_inverse\r\n/// @file glm/gtc/matrix_inverse.hpp\r\n/// @date 2005-12-21 / 2011-06-05\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// \r\n/// @defgroup gtc_matrix_inverse GLM_GTC_matrix_inverse\r\n/// @ingroup gtc\r\n/// \r\n/// Defines additional matrix inverting functions.\r\n/// <glm/gtc/matrix_inverse.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_matrix_inverse\r\n#define GLM_GTC_matrix_inverse\r\n\r\n// Dependencies\r\n#include \"../detail/setup.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_matrix_inverse extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_matrix_inverse\r\n\t/// @{\r\n\r\n\t/// Fast matrix inverse for affine matrix.\r\n\t/// \r\n\t/// @param m Input matrix to invert.\r\n\t/// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-precision floating point value is highly innacurate.\r\n\t/// @see gtc_matrix_inverse\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType affineInverse(genType const & m);\r\n\r\n\t/// Compute the inverse transpose of a matrix.\r\n\t/// \r\n\t/// @param m Input matrix to invert transpose.\r\n\t/// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-precision floating point value is highly innacurate.\r\n\t/// @see gtc_matrix_inverse\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER typename genType::value_type inverseTranspose(\r\n\t\tgenType const & m);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"matrix_inverse.inl\"\r\n\r\n#endif//GLM_GTC_matrix_inverse\r\n"
  },
  {
    "path": "cpu/glm/gtc/matrix_inverse.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_matrix_inverse\r\n/// @file glm/gtc/matrix_inverse.inl\r\n/// @date 2005-12-21 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../mat2x2.hpp\"\r\n#include \"../mat3x3.hpp\"\r\n#include \"../mat4x4.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> affineInverse\r\n\t(\r\n\t\tdetail::tmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> Result(m);\r\n\t\tResult[2] = detail::tvec3<T, P>(0, 0, 1);\r\n\t\tResult = transpose(Result);\r\n\t\tdetail::tvec3<T, P> Translation = Result * detail::tvec3<T, P>(-detail::tvec2<T, P>(m[2]), m[2][2]);\r\n\t\tResult[2] = Translation;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> affineInverse\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> Result(m);\r\n\t\tResult[3] = detail::tvec4<T, P>(0, 0, 0, 1);\r\n\t\tResult = transpose(Result);\r\n\t\tdetail::tvec4<T, P> Translation = Result * detail::tvec4<T, P>(-detail::tvec3<T, P>(m[3]), m[3][3]);\r\n\t\tResult[3] = Translation;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat2x2<T, P> inverseTranspose\r\n\t(\r\n\t\tdetail::tmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tT Determinant = m[0][0] * m[1][1] - m[1][0] * m[0][1];\r\n\r\n\t\tdetail::tmat2x2<T, P> Inverse(\r\n\t\t\t+ m[1][1] / Determinant,\r\n\t\t\t- m[0][1] / Determinant,\r\n\t\t\t- m[1][0] / Determinant,\r\n\t\t\t+ m[0][0] / Determinant);\r\n\r\n\t\treturn Inverse;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> inverseTranspose\r\n\t(\r\n\t\tdetail::tmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tT Determinant =\r\n\t\t\t+ m[0][0] * (m[1][1] * m[2][2] - m[1][2] * m[2][1])\r\n\t\t\t- m[0][1] * (m[1][0] * m[2][2] - m[1][2] * m[2][0])\r\n\t\t\t+ m[0][2] * (m[1][0] * m[2][1] - m[1][1] * m[2][0]);\r\n\r\n\t\tdetail::tmat3x3<T, P> Inverse;\r\n\t\tInverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]);\r\n\t\tInverse[0][1] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]);\r\n\t\tInverse[0][2] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]);\r\n\t\tInverse[1][0] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]);\r\n\t\tInverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]);\r\n\t\tInverse[1][2] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]);\r\n\t\tInverse[2][0] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]);\r\n\t\tInverse[2][1] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]);\r\n\t\tInverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]);\r\n\t\tInverse /= Determinant;\r\n\r\n\t\treturn Inverse;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> inverseTranspose\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tT SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\r\n\t\tT SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\r\n\t\tT SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\r\n\t\tT SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\r\n\t\tT SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\r\n\t\tT SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\r\n\t\tT SubFactor06 = m[1][2] * m[3][3] - m[3][2] * m[1][3];\r\n\t\tT SubFactor07 = m[1][1] * m[3][3] - m[3][1] * m[1][3];\r\n\t\tT SubFactor08 = m[1][1] * m[3][2] - m[3][1] * m[1][2];\r\n\t\tT SubFactor09 = m[1][0] * m[3][3] - m[3][0] * m[1][3];\r\n\t\tT SubFactor10 = m[1][0] * m[3][2] - m[3][0] * m[1][2];\r\n\t\tT SubFactor11 = m[1][1] * m[3][3] - m[3][1] * m[1][3];\r\n\t\tT SubFactor12 = m[1][0] * m[3][1] - m[3][0] * m[1][1];\r\n\t\tT SubFactor13 = m[1][2] * m[2][3] - m[2][2] * m[1][3];\r\n\t\tT SubFactor14 = m[1][1] * m[2][3] - m[2][1] * m[1][3];\r\n\t\tT SubFactor15 = m[1][1] * m[2][2] - m[2][1] * m[1][2];\r\n\t\tT SubFactor16 = m[1][0] * m[2][3] - m[2][0] * m[1][3];\r\n\t\tT SubFactor17 = m[1][0] * m[2][2] - m[2][0] * m[1][2];\r\n\t\tT SubFactor18 = m[1][0] * m[2][1] - m[2][0] * m[1][1];\r\n\r\n\t\tdetail::tmat4x4<T, P> Inverse;\r\n\t\tInverse[0][0] = + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02);\r\n\t\tInverse[0][1] = - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04);\r\n\t\tInverse[0][2] = + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05);\r\n\t\tInverse[0][3] = - (m[1][0] * SubFactor02 - m[1][1] * SubFactor04 + m[1][2] * SubFactor05);\r\n\r\n\t\tInverse[1][0] = - (m[0][1] * SubFactor00 - m[0][2] * SubFactor01 + m[0][3] * SubFactor02);\r\n\t\tInverse[1][1] = + (m[0][0] * SubFactor00 - m[0][2] * SubFactor03 + m[0][3] * SubFactor04);\r\n\t\tInverse[1][2] = - (m[0][0] * SubFactor01 - m[0][1] * SubFactor03 + m[0][3] * SubFactor05);\r\n\t\tInverse[1][3] = + (m[0][0] * SubFactor02 - m[0][1] * SubFactor04 + m[0][2] * SubFactor05);\r\n\r\n\t\tInverse[2][0] = + (m[0][1] * SubFactor06 - m[0][2] * SubFactor07 + m[0][3] * SubFactor08);\r\n\t\tInverse[2][1] = - (m[0][0] * SubFactor06 - m[0][2] * SubFactor09 + m[0][3] * SubFactor10);\r\n\t\tInverse[2][2] = + (m[0][0] * SubFactor11 - m[0][1] * SubFactor09 + m[0][3] * SubFactor12);\r\n\t\tInverse[2][3] = - (m[0][0] * SubFactor08 - m[0][1] * SubFactor10 + m[0][2] * SubFactor12);\r\n\r\n\t\tInverse[3][0] = - (m[0][1] * SubFactor13 - m[0][2] * SubFactor14 + m[0][3] * SubFactor15);\r\n\t\tInverse[3][1] = + (m[0][0] * SubFactor13 - m[0][2] * SubFactor16 + m[0][3] * SubFactor17);\r\n\t\tInverse[3][2] = - (m[0][0] * SubFactor14 - m[0][1] * SubFactor16 + m[0][3] * SubFactor18);\r\n\t\tInverse[3][3] = + (m[0][0] * SubFactor15 - m[0][1] * SubFactor17 + m[0][2] * SubFactor18);\r\n\r\n\t\tT Determinant =\r\n\t\t\t+ m[0][0] * Inverse[0][0]\r\n\t\t\t+ m[0][1] * Inverse[0][1]\r\n\t\t\t+ m[0][2] * Inverse[0][2]\r\n\t\t\t+ m[0][3] * Inverse[0][3];\r\n\r\n\t\tInverse /= Determinant;\r\n\r\n\t\treturn Inverse;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtc/matrix_transform.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_matrix_transform\r\n/// @file glm/gtc/matrix_transform.hpp\r\n/// @date 2009-04-29 / 2011-05-16\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_transform\r\n/// @see gtx_transform2\r\n/// \r\n/// @defgroup gtc_matrix_transform GLM_GTC_matrix_transform\r\n/// @ingroup gtc\r\n/// \r\n/// @brief Defines functions that generate common transformation matrices.\r\n/// \r\n/// The matrices generated by this extension use standard OpenGL fixed-function\r\n/// conventions. For example, the lookAt function generates a transform from world\r\n/// space into the specific eye space that the projective matrix functions \r\n/// (perspective, ortho, etc) are designed to expect. The OpenGL compatibility\r\n/// specifications defines the particular layout of this eye space.\r\n/// \r\n/// <glm/gtc/matrix_transform.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_matrix_transform\r\n#define GLM_GTC_matrix_transform\r\n\r\n// Dependency:\r\n#include \"../mat4x4.hpp\"\r\n#include \"../vec2.hpp\"\r\n#include \"../vec3.hpp\"\r\n#include \"../vec4.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_matrix_transform extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_matrix_transform\r\n\t/// @{\r\n\r\n\t/// Builds a translation 4 * 4 matrix created from a vector of 3 components.\r\n\t/// \r\n\t/// @param m Input matrix multiplied by this translation matrix.\r\n\t/// @param v Coordinates of a translation vector.\r\n\t/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.\r\n\t/// @code\r\n\t/// #include <glm/glm.hpp>\r\n\t/// #include <glm/gtc/matrix_transform.hpp>\r\n\t/// ...\r\n\t/// glm::mat4 m = glm::translate(glm::mat4(1.0f), glm::vec3(1.0f));\r\n\t/// // m[0][0] == 1.0f, m[0][1] == 0.0f, m[0][2] == 0.0f, m[0][3] == 0.0f\r\n\t/// // m[1][0] == 0.0f, m[1][1] == 1.0f, m[1][2] == 0.0f, m[1][3] == 0.0f\r\n\t/// // m[2][0] == 0.0f, m[2][1] == 0.0f, m[2][2] == 1.0f, m[2][3] == 0.0f\r\n\t/// // m[3][0] == 1.0f, m[3][1] == 1.0f, m[3][2] == 1.0f, m[3][3] == 1.0f\r\n\t/// @endcode\r\n\t/// @see gtc_matrix_transform\r\n\t/// @see gtx_transform\r\n\t/// @see - translate(T x, T y, T z)\r\n\t/// @see - translate(detail::tmat4x4<T, P> const & m, T x, T y, T z)\r\n\t/// @see - translate(detail::tvec3<T, P> const & v)\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, P> translate(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\t\t\r\n\t/// Builds a rotation 4 * 4 matrix created from an axis vector and an angle. \r\n\t/// \r\n\t/// @param m Input matrix multiplied by this rotation matrix.\r\n\t/// @param angle Rotation angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.\r\n\t/// @param axis Rotation axis, recommanded to be normalized.\r\n\t/// @tparam T Value type used to build the matrix. Supported: half, float or double.\r\n\t/// @see gtc_matrix_transform\r\n\t/// @see gtx_transform\r\n\t/// @see - rotate(T angle, T x, T y, T z) \r\n\t/// @see - rotate(detail::tmat4x4<T, P> const & m, T angle, T x, T y, T z) \r\n\t/// @see - rotate(T angle, detail::tvec3<T, P> const & v) \r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, P> rotate(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & axis);\r\n\r\n\t/// Builds a scale 4 * 4 matrix created from 3 scalars. \r\n\t/// \r\n\t/// @param m Input matrix multiplied by this scale matrix.\r\n\t/// @param v Ratio of scaling for each axis.\r\n\t/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.\r\n\t/// @see gtc_matrix_transform\r\n\t/// @see gtx_transform\r\n\t/// @see - scale(T x, T y, T z) scale(T const & x, T const & y, T const & z)\r\n\t/// @see - scale(detail::tmat4x4<T, P> const & m, T x, T y, T z)\r\n\t/// @see - scale(detail::tvec3<T, P> const & v)\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, P> scale(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\r\n\t/// Creates a matrix for an orthographic parallel viewing volume.\r\n\t/// \r\n\t/// @param left \r\n\t/// @param right \r\n\t/// @param bottom \r\n\t/// @param top \r\n\t/// @param zNear \r\n\t/// @param zFar \r\n\t/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.\r\n\t/// @see gtc_matrix_transform\r\n\t/// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top)\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, defaultp> ortho(\r\n\t\tT const & left,\r\n\t\tT const & right,\r\n\t\tT const & bottom,\r\n\t\tT const & top,\r\n\t\tT const & zNear,\r\n\t\tT const & zFar);\r\n\r\n\t/// Creates a matrix for projecting two-dimensional coordinates onto the screen.\r\n\t/// \r\n\t/// @param left \r\n\t/// @param right \r\n\t/// @param bottom \r\n\t/// @param top \r\n\t/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.\r\n\t/// @see gtc_matrix_transform\r\n\t/// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar)\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, defaultp> ortho(\r\n\t\tT const & left,\r\n\t\tT const & right,\r\n\t\tT const & bottom,\r\n\t\tT const & top);\r\n\r\n\t/// Creates a frustum matrix.\r\n\t/// \r\n\t/// @param left \r\n\t/// @param right \r\n\t/// @param bottom \r\n\t/// @param top \r\n\t/// @param near \r\n\t/// @param far \r\n\t/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.\r\n\t/// @see gtc_matrix_transform\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, P> frustum(\r\n\t\tT const & left,\r\n\t\tT const & right,\r\n\t\tT const & bottom,\r\n\t\tT const & top,\r\n\t\tT const & near,\r\n\t\tT const & far);\r\n\r\n\t/// Creates a matrix for a symetric perspective-view frustum.\r\n\t/// \r\n\t/// @param fovy Expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.\r\n\t/// @param aspect \r\n\t/// @param near \r\n\t/// @param far \r\n\t/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.\r\n\t/// @see gtc_matrix_transform\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, P> perspective(\r\n\t\tT const & fovy,\r\n\t\tT const & aspect,\r\n\t\tT const & near,\r\n\t\tT const & far);\r\n\r\n\t/// Builds a perspective projection matrix based on a field of view.\r\n\t/// \r\n\t/// @param fov Expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.\r\n\t/// @param width \r\n\t/// @param height \r\n\t/// @param near \r\n\t/// @param far \r\n\t/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.\r\n\t/// @see gtc_matrix_transform\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, P> perspectiveFov(\r\n\t\tT const & fov,\r\n\t\tT const & width,\r\n\t\tT const & height,\r\n\t\tT const & near,\r\n\t\tT const & far);\r\n\r\n\t/// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite.\r\n\t/// \r\n\t/// @param fovy Expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.\r\n\t/// @param aspect \r\n\t/// @param near \r\n\t/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.\r\n\t/// @see gtc_matrix_transform\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, P> infinitePerspective(\r\n\t\tT fovy, T aspect, T near);\r\n\r\n\t/// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping.\r\n\t/// \r\n\t/// @param fovy Expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.\r\n\t/// @param aspect \r\n\t/// @param near \r\n\t/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.\r\n\t/// @see gtc_matrix_transform\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, P> tweakedInfinitePerspective(\r\n\t\tT fovy, T aspect, T near);\r\n\r\n\t/// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.\r\n\t/// \r\n\t/// @param obj \r\n\t/// @param model \r\n\t/// @param proj\r\n\t/// @param viewport \r\n\t/// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double.\r\n\t/// @tparam U Currently supported: Floating-point types and integer types.\r\n\t/// @see gtc_matrix_transform\r\n\ttemplate <typename T, typename U, precision P>\r\n\tGLM_FUNC_DECL detail::tvec3<T, P> project(\r\n\t\tdetail::tvec3<T, P> const & obj,\r\n\t\tdetail::tmat4x4<T, P> const & model,\r\n\t\tdetail::tmat4x4<T, P> const & proj,\r\n\t\tdetail::tvec4<U, P> const & viewport);\r\n\r\n\t/// Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.\r\n\t///\r\n\t/// @param win\r\n\t/// @param model\r\n\t/// @param proj\r\n\t/// @param viewport\r\n\t/// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double.\r\n\t/// @tparam U Currently supported: Floating-point types and integer types.\r\n\t/// @see gtc_matrix_transform\r\n\ttemplate <typename T, typename U, precision P>\r\n\tGLM_FUNC_DECL detail::tvec3<T, P> unProject(\r\n\t\tdetail::tvec3<T, P> const & win,\r\n\t\tdetail::tmat4x4<T, P> const & model,\r\n\t\tdetail::tmat4x4<T, P> const & proj,\r\n\t\tdetail::tvec4<U, P> const & viewport);\r\n\r\n\t/// Define a picking region\r\n\t///\r\n\t/// @param center\r\n\t/// @param delta\r\n\t/// @param viewport\r\n\t/// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double.\r\n\t/// @tparam U Currently supported: Floating-point types and integer types.\r\n\t/// @see gtc_matrix_transform\r\n\ttemplate <typename T, precision P, typename U>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, P> pickMatrix(\r\n\t\tdetail::tvec2<T, P> const & center,\r\n\t\tdetail::tvec2<T, P> const & delta,\r\n\t\tdetail::tvec4<U, P> const & viewport);\r\n\r\n\t/// Build a look at view matrix.\r\n\t///\r\n\t/// @param eye Position of the camera\r\n\t/// @param center Position where the camera is looking at\r\n\t/// @param up Normalized up vector, how the camera is oriented. Typically (0, 0, 1)\r\n\t/// @see gtc_matrix_transform\r\n\t/// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal)\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, P> lookAt(\r\n\t\tdetail::tvec3<T, P> const & eye,\r\n\t\tdetail::tvec3<T, P> const & center,\r\n\t\tdetail::tvec3<T, P> const & up);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"matrix_transform.inl\"\r\n\r\n#endif//GLM_GTC_matrix_transform\r\n"
  },
  {
    "path": "cpu/glm/gtc/matrix_transform.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_matrix_transform\r\n/// @file glm/gtc/matrix_transform.inl\r\n/// @date 2009-04-29 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../geometric.hpp\"\r\n#include \"../trigonometric.hpp\"\r\n#include \"../matrix.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> translate\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> Result(m);\r\n\t\tResult[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3];\r\n\t\treturn Result;\r\n\t}\r\n\t\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> translate_slow\r\n\t\t(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> Result(T(1));\r\n\t\tResult[3] = detail::tvec4<T, P>(v, T(1));\r\n\t\treturn m * Result;\r\n\r\n\t\t//detail::tmat4x4<valType> Result(m);\r\n\t\tResult[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3];\r\n\t\t//Result[3][0] = m[0][0] * v[0] + m[1][0] * v[1] + m[2][0] * v[2] + m[3][0];\r\n\t\t//Result[3][1] = m[0][1] * v[0] + m[1][1] * v[1] + m[2][1] * v[2] + m[3][1];\r\n\t\t//Result[3][2] = m[0][2] * v[0] + m[1][2] * v[1] + m[2][2] * v[2] + m[3][2];\r\n\t\t//Result[3][3] = m[0][3] * v[0] + m[1][3] * v[1] + m[2][3] * v[2] + m[3][3];\r\n\t\t//return Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> rotate\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT a = angle;\r\n#else\r\n#\t\tpragma message(\"GLM: rotate function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT a = radians(angle);\r\n#endif\r\n\t\tT c = cos(a);\r\n\t\tT s = sin(a);\r\n\r\n\t\tdetail::tvec3<T, P> axis(normalize(v));\r\n\t\tdetail::tvec3<T, P> temp((T(1) - c) * axis);\r\n\r\n\t\tdetail::tmat4x4<T, P> Rotate(detail::tmat4x4<T, P>::_null);\r\n\t\tRotate[0][0] = c + temp[0] * axis[0];\r\n\t\tRotate[0][1] = 0 + temp[0] * axis[1] + s * axis[2];\r\n\t\tRotate[0][2] = 0 + temp[0] * axis[2] - s * axis[1];\r\n\r\n\t\tRotate[1][0] = 0 + temp[1] * axis[0] - s * axis[2];\r\n\t\tRotate[1][1] = c + temp[1] * axis[1];\r\n\t\tRotate[1][2] = 0 + temp[1] * axis[2] + s * axis[0];\r\n\r\n\t\tRotate[2][0] = 0 + temp[2] * axis[0] + s * axis[1];\r\n\t\tRotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0];\r\n\t\tRotate[2][2] = c + temp[2] * axis[2];\r\n\r\n\t\tdetail::tmat4x4<T, P> Result(detail::tmat4x4<T, P>::_null);\r\n\t\tResult[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2];\r\n\t\tResult[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2];\r\n\t\tResult[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2];\r\n\t\tResult[3] = m[3];\r\n\t\treturn Result;\r\n\t}\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> rotate_slow\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tT const & angle, \r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const a = angle;\r\n#else\r\n#\t\tpragma message(\"GLM: rotate_slow function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const a = radians(angle);\r\n#endif\r\n\t\tT c = cos(a);\r\n\t\tT s = sin(a);\r\n\t\tdetail::tmat4x4<T, P> Result;\r\n\r\n\t\tdetail::tvec3<T, P> axis = normalize(v);\r\n\r\n\t\tResult[0][0] = c + (1 - c)      * axis.x     * axis.x;\r\n\t\tResult[0][1] = (1 - c) * axis.x * axis.y + s * axis.z;\r\n\t\tResult[0][2] = (1 - c) * axis.x * axis.z - s * axis.y;\r\n\t\tResult[0][3] = 0;\r\n\r\n\t\tResult[1][0] = (1 - c) * axis.y * axis.x - s * axis.z;\r\n\t\tResult[1][1] = c + (1 - c) * axis.y * axis.y;\r\n\t\tResult[1][2] = (1 - c) * axis.y * axis.z + s * axis.x;\r\n\t\tResult[1][3] = 0;\r\n\r\n\t\tResult[2][0] = (1 - c) * axis.z * axis.x + s * axis.y;\r\n\t\tResult[2][1] = (1 - c) * axis.z * axis.y - s * axis.x;\r\n\t\tResult[2][2] = c + (1 - c) * axis.z * axis.z;\r\n\t\tResult[2][3] = 0;\r\n\r\n\t\tResult[3] = detail::tvec4<T, P>(0, 0, 0, 1);\r\n\t\treturn m * Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> scale\r\n\t\t(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> Result(detail::tmat4x4<T, P>::_null);\r\n\t\tResult[0] = m[0] * v[0];\r\n\t\tResult[1] = m[1] * v[1];\r\n\t\tResult[2] = m[2] * v[2];\r\n\t\tResult[3] = m[3];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> scale_slow\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> Result(T(1));\r\n\t\tResult[0][0] = v.x;\r\n\t\tResult[1][1] = v.y;\r\n\t\tResult[2][2] = v.z;\r\n\t\treturn m * Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> ortho\r\n\t(\r\n\t\tT const & left,\r\n\t\tT const & right,\r\n\t\tT const & bottom,\r\n\t\tT const & top,\r\n\t\tT const & zNear,\r\n\t\tT const & zFar\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, defaultp> Result(1);\r\n\t\tResult[0][0] = static_cast<T>(2) / (right - left);\r\n\t\tResult[1][1] = static_cast<T>(2) / (top - bottom);\r\n\t\tResult[2][2] = - T(2) / (zFar - zNear);\r\n\t\tResult[3][0] = - (right + left) / (right - left);\r\n\t\tResult[3][1] = - (top + bottom) / (top - bottom);\r\n\t\tResult[3][2] = - (zFar + zNear) / (zFar - zNear);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> ortho\r\n\t(\r\n\t\tT const & left,\r\n\t\tT const & right,\r\n\t\tT const & bottom,\r\n\t\tT const & top\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, defaultp> Result(1);\r\n\t\tResult[0][0] = static_cast<T>(2) / (right - left);\r\n\t\tResult[1][1] = static_cast<T>(2) / (top - bottom);\r\n\t\tResult[2][2] = - T(1);\r\n\t\tResult[3][0] = - (right + left) / (right - left);\r\n\t\tResult[3][1] = - (top + bottom) / (top - bottom);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename valType>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<valType, defaultp> frustum\r\n\t(\r\n\t\tvalType const & left,\r\n\t\tvalType const & right,\r\n\t\tvalType const & bottom,\r\n\t\tvalType const & top,\r\n\t\tvalType const & nearVal,\r\n\t\tvalType const & farVal\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x4<valType, defaultp> Result(0);\r\n\t\tResult[0][0] = (valType(2) * nearVal) / (right - left);\r\n\t\tResult[1][1] = (valType(2) * nearVal) / (top - bottom);\r\n\t\tResult[2][0] = (right + left) / (right - left);\r\n\t\tResult[2][1] = (top + bottom) / (top - bottom);\r\n\t\tResult[2][2] = -(farVal + nearVal) / (farVal - nearVal);\r\n\t\tResult[2][3] = valType(-1);\r\n\t\tResult[3][2] = -(valType(2) * farVal * nearVal) / (farVal - nearVal);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename valType>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<valType, defaultp> perspective\r\n\t(\r\n\t\tvalType const & fovy,\r\n\t\tvalType const & aspect,\r\n\t\tvalType const & zNear,\r\n\t\tvalType const & zFar\r\n\t)\r\n\t{\r\n\t\tassert(aspect != valType(0));\r\n\t\tassert(zFar != zNear);\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tvalType const rad = fovy;\r\n#else\r\n#\t\tpragma message(\"GLM: perspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tvalType const rad = glm::radians(fovy);\r\n#endif\r\n\r\n\t\tvalType tanHalfFovy = tan(rad / valType(2));\r\n\r\n\t\tdetail::tmat4x4<valType, defaultp> Result(valType(0));\r\n\t\tResult[0][0] = valType(1) / (aspect * tanHalfFovy);\r\n\t\tResult[1][1] = valType(1) / (tanHalfFovy);\r\n\t\tResult[2][2] = - (zFar + zNear) / (zFar - zNear);\r\n\t\tResult[2][3] = - valType(1);\r\n\t\tResult[3][2] = - (valType(2) * zFar * zNear) / (zFar - zNear);\r\n\t\treturn Result;\r\n\t}\r\n\t\r\n\ttemplate <typename valType>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<valType, defaultp> perspectiveFov\r\n\t(\r\n\t\tvalType const & fov,\r\n\t\tvalType const & width,\r\n\t\tvalType const & height,\r\n\t\tvalType const & zNear,\r\n\t\tvalType const & zFar\r\n\t)\r\n\t{\r\n\t\tassert(width > valType(0));\r\n\t\tassert(height > valType(0));\r\n\t\tassert(fov > valType(0));\r\n\t\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tvalType rad = fov;\r\n#else\r\n#\t\tpragma message(\"GLM: perspectiveFov function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tvalType rad = glm::radians(fov);\r\n#endif\r\n\t\tvalType h = glm::cos(valType(0.5) * rad) / glm::sin(valType(0.5) * rad);\r\n\t\tvalType w = h * height / width; ///todo max(width , Height) / min(width , Height)?\r\n\r\n\t\tdetail::tmat4x4<valType, defaultp> Result(valType(0));\r\n\t\tResult[0][0] = w;\r\n\t\tResult[1][1] = h;\r\n\t\tResult[2][2] = - (zFar + zNear) / (zFar - zNear);\r\n\t\tResult[2][3] = - valType(1);\r\n\t\tResult[3][2] = - (valType(2) * zFar * zNear) / (zFar - zNear);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> infinitePerspective\r\n\t(\r\n\t\tT fovy,\r\n\t\tT aspect,\r\n\t\tT zNear\r\n\t)\r\n\t{\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const range = tan(fovy / T(2)) * zNear;\t\r\n#else\r\n#\t\tpragma message(\"GLM: infinitePerspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const range = tan(radians(fovy / T(2))) * zNear;\t\r\n#endif\r\n\t\tT left = -range * aspect;\r\n\t\tT right = range * aspect;\r\n\t\tT bottom = -range;\r\n\t\tT top = range;\r\n\r\n\t\tdetail::tmat4x4<T, defaultp> Result(T(0));\r\n\t\tResult[0][0] = (T(2) * zNear) / (right - left);\r\n\t\tResult[1][1] = (T(2) * zNear) / (top - bottom);\r\n\t\tResult[2][2] = - T(1);\r\n\t\tResult[2][3] = - T(1);\r\n\t\tResult[3][2] = - T(2) * zNear;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> tweakedInfinitePerspective\r\n\t(\r\n\t\tT fovy,\r\n\t\tT aspect,\r\n\t\tT zNear\r\n\t)\r\n\t{\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT range = tan(fovy / T(2)) * zNear;\t\r\n#else\r\n#\t\tpragma message(\"GLM: tweakedInfinitePerspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT range = tan(radians(fovy / T(2))) * zNear;\t\r\n#endif\r\n\t\tT left = -range * aspect;\r\n\t\tT right = range * aspect;\r\n\t\tT bottom = -range;\r\n\t\tT top = range;\r\n\r\n\t\tdetail::tmat4x4<T, defaultp> Result(T(0));\r\n\t\tResult[0][0] = (T(2) * zNear) / (right - left);\r\n\t\tResult[1][1] = (T(2) * zNear) / (top - bottom);\r\n\t\tResult[2][2] = static_cast<T>(0.0001) - T(1);\r\n\t\tResult[2][3] = static_cast<T>(-1);\r\n\t\tResult[3][2] = - (T(0.0001) - T(2)) * zNear;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, typename U, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> project\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & obj,\r\n\t\tdetail::tmat4x4<T, P> const & model,\r\n\t\tdetail::tmat4x4<T, P> const & proj,\r\n\t\tdetail::tvec4<U, P> const & viewport\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<T, P> tmp = detail::tvec4<T, P>(obj, T(1));\r\n\t\ttmp = model * tmp;\r\n\t\ttmp = proj * tmp;\r\n\r\n\t\ttmp /= tmp.w;\r\n\t\ttmp = tmp * T(0.5) + T(0.5);\r\n\t\ttmp[0] = tmp[0] * T(viewport[2]) + T(viewport[0]);\r\n\t\ttmp[1] = tmp[1] * T(viewport[3]) + T(viewport[1]);\r\n\r\n\t\treturn detail::tvec3<T, P>(tmp);\r\n\t}\r\n\r\n\ttemplate <typename T, typename U, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> unProject\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & win,\r\n\t\tdetail::tmat4x4<T, P> const & model,\r\n\t\tdetail::tmat4x4<T, P> const & proj,\r\n\t\tdetail::tvec4<U, P> const & viewport\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> Inverse = inverse(proj * model);\r\n\r\n\t\tdetail::tvec4<T, P> tmp = detail::tvec4<T, P>(win, T(1));\r\n\t\ttmp.x = (tmp.x - T(viewport[0])) / T(viewport[2]);\r\n\t\ttmp.y = (tmp.y - T(viewport[1])) / T(viewport[3]);\r\n\t\ttmp = tmp * T(2) - T(1);\r\n\r\n\t\tdetail::tvec4<T, P> obj = Inverse * tmp;\r\n\t\tobj /= obj.w;\r\n\r\n\t\treturn detail::tvec3<T, P>(obj);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, typename U>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> pickMatrix\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & center,\r\n\t\tdetail::tvec2<T, P> const & delta,\r\n\t\tdetail::tvec4<U, P> const & viewport\r\n\t)\r\n\t{\r\n\t\tassert(delta.x > T(0) && delta.y > T(0));\r\n\t\tdetail::tmat4x4<T, P> Result(1.0f);\r\n\r\n\t\tif(!(delta.x > T(0) && delta.y > T(0)))\r\n\t\t\treturn Result; // Error\r\n\r\n\t\tdetail::tvec3<T, P> Temp(\r\n\t\t\t(T(viewport[2]) - T(2) * (center.x - T(viewport[0]))) / delta.x,\r\n\t\t\t(T(viewport[3]) - T(2) * (center.y - T(viewport[1]))) / delta.y,\r\n\t\t\tT(0));\r\n\r\n\t\t// Translate and scale the picked region to the entire window\r\n\t\tResult = translate(Result, Temp);\r\n\t\treturn scale(Result, detail::tvec3<T, P>(T(viewport[2]) / delta.x, T(viewport[3]) / delta.y, T(1)));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> lookAt\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & eye,\r\n\t\tdetail::tvec3<T, P> const & center,\r\n\t\tdetail::tvec3<T, P> const & up\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> f(normalize(center - eye));\r\n\t\tdetail::tvec3<T, P> s(normalize(cross(f, up)));\r\n\t\tdetail::tvec3<T, P> u(cross(s, f));\r\n\r\n\t\tdetail::tmat4x4<T, P> Result(1);\r\n\t\tResult[0][0] = s.x;\r\n\t\tResult[1][0] = s.y;\r\n\t\tResult[2][0] = s.z;\r\n\t\tResult[0][1] = u.x;\r\n\t\tResult[1][1] = u.y;\r\n\t\tResult[2][1] = u.z;\r\n\t\tResult[0][2] =-f.x;\r\n\t\tResult[1][2] =-f.y;\r\n\t\tResult[2][2] =-f.z;\r\n\t\tResult[3][0] =-dot(s, eye);\r\n\t\tResult[3][1] =-dot(u, eye);\r\n\t\tResult[3][2] = dot(f, eye);\r\n\t\treturn Result;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtc/noise.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_noise\r\n/// @file glm/gtc/noise.hpp\r\n/// @date 2011-04-21 / 2011-09-27\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtc_noise GLM_GTC_noise\r\n/// @ingroup gtc\r\n/// \r\n/// Defines 2D, 3D and 4D procedural noise functions \r\n/// Based on the work of Stefan Gustavson and Ashima Arts on \"webgl-noise\": \r\n/// https://github.com/ashima/webgl-noise \r\n/// Following Stefan Gustavson's paper \"Simplex noise demystified\": \r\n/// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf\r\n/// <glm/gtc/noise.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_noise\r\n#define GLM_GTC_noise\r\n\r\n// Dependencies\r\n#include \"../detail/setup.hpp\"\r\n#include \"../detail/precision.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_noise extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_noise\r\n\t/// @{\r\n\r\n\t/// Classic perlin noise.\r\n\t/// @see gtc_noise\r\n\ttemplate <typename T, precision P, template<typename, precision> class vecType>\r\n\tT perlin(\r\n\t\tvecType<T, P> const & p);\r\n\t\t\r\n\t/// Periodic perlin noise.\r\n\t/// @see gtc_noise\r\n\ttemplate <typename T, precision P, template<typename, precision> class vecType>\r\n\tT perlin(\r\n\t\tvecType<T, P> const & p,\r\n\t\tvecType<T, P> const & rep);\r\n\r\n\t/// Simplex noise.\r\n\t/// @see gtc_noise\r\n\ttemplate <typename T, precision P, template<typename, precision> class vecType>\r\n\tT simplex(\r\n\t\tvecType<T, P> const & p);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"noise.inl\"\r\n\r\n#endif//GLM_GTC_noise\r\n"
  },
  {
    "path": "cpu/glm/gtc/noise.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_noise\r\n/// @file glm/gtc/noise.inl\r\n/// @date 2011-04-21 / 2012-04-07\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n// Based on the work of Stefan Gustavson and Ashima Arts on \"webgl-noise\": \r\n// https://github.com/ashima/webgl-noise \r\n// Following Stefan Gustavson's paper \"Simplex noise demystified\": \r\n// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../geometric.hpp\"\r\n#include \"../common.hpp\"\r\n#include \"../vector_relational.hpp\"\r\n#include \"../detail/_noise.hpp\"\r\n\r\nnamespace glm{\r\nnamespace gtc\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> grad4(T const & j, detail::tvec4<T, P> const & ip)\r\n\t{\r\n\t\tdetail::tvec3<T, P> pXYZ = floor(fract(detail::tvec3<T, P>(j) * detail::tvec3<T, P>(ip)) * T(7)) * ip[2] - T(1);\r\n\t\tT pW = static_cast<T>(1.5) - dot(abs(pXYZ), detail::tvec3<T, P>(1));\r\n\t\tdetail::tvec4<T, P> s = detail::tvec4<T, P>(lessThan(detail::tvec4<T, P>(pXYZ, pW), detail::tvec4<T, P>(0.0)));\r\n\t\tpXYZ = pXYZ + (detail::tvec3<T, P>(s) * T(2) - T(1)) * s.w; \r\n\t\treturn detail::tvec4<T, P>(pXYZ, pW);\r\n\t}\r\n}//namespace gtc\r\n\r\n\t// Classic Perlin noise\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T perlin(detail::tvec2<T, P> const & Position)\r\n\t{\r\n\t\tdetail::tvec4<T, P> Pi = glm::floor(detail::tvec4<T, P>(Position.x, Position.y, Position.x, Position.y)) + detail::tvec4<T, P>(0.0, 0.0, 1.0, 1.0);\r\n\t\tdetail::tvec4<T, P> Pf = glm::fract(detail::tvec4<T, P>(Position.x, Position.y, Position.x, Position.y)) - detail::tvec4<T, P>(0.0, 0.0, 1.0, 1.0);\r\n\t\tPi = mod(Pi, detail::tvec4<T, P>(289)); // To avoid truncation effects in permutation\r\n\t\tdetail::tvec4<T, P> ix(Pi.x, Pi.z, Pi.x, Pi.z);\r\n\t\tdetail::tvec4<T, P> iy(Pi.y, Pi.y, Pi.w, Pi.w);\r\n\t\tdetail::tvec4<T, P> fx(Pf.x, Pf.z, Pf.x, Pf.z);\r\n\t\tdetail::tvec4<T, P> fy(Pf.y, Pf.y, Pf.w, Pf.w);\r\n\r\n\t\tdetail::tvec4<T, P> i = detail::permute(detail::permute(ix) + iy);\r\n\r\n\t\tdetail::tvec4<T, P> gx = static_cast<T>(2) * glm::fract(i / T(41)) - T(1);\r\n\t\tdetail::tvec4<T, P> gy = glm::abs(gx) - T(0.5);\r\n\t\tdetail::tvec4<T, P> tx = glm::floor(gx + T(0.5));\r\n\t\tgx = gx - tx;\r\n\r\n\t\tdetail::tvec2<T, P> g00(gx.x, gy.x);\r\n\t\tdetail::tvec2<T, P> g10(gx.y, gy.y);\r\n\t\tdetail::tvec2<T, P> g01(gx.z, gy.z);\r\n\t\tdetail::tvec2<T, P> g11(gx.w, gy.w);\r\n\r\n\t\tdetail::tvec4<T, P> norm = taylorInvSqrt(detail::tvec4<T, P>(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11)));\r\n\t\tg00 *= norm.x;  \r\n\t\tg01 *= norm.y;  \r\n\t\tg10 *= norm.z;  \r\n\t\tg11 *= norm.w;  \r\n\r\n\t\tT n00 = dot(g00, detail::tvec2<T, P>(fx.x, fy.x));\r\n\t\tT n10 = dot(g10, detail::tvec2<T, P>(fx.y, fy.y));\r\n\t\tT n01 = dot(g01, detail::tvec2<T, P>(fx.z, fy.z));\r\n\t\tT n11 = dot(g11, detail::tvec2<T, P>(fx.w, fy.w));\r\n\r\n\t\tdetail::tvec2<T, P> fade_xy = fade(detail::tvec2<T, P>(Pf.x, Pf.y));\r\n\t\tdetail::tvec2<T, P> n_x = mix(detail::tvec2<T, P>(n00, n01), detail::tvec2<T, P>(n10, n11), fade_xy.x);\r\n\t\tT n_xy = mix(n_x.x, n_x.y, fade_xy.y);\r\n\t\treturn T(2.3) * n_xy;\r\n\t}\r\n\r\n\t// Classic Perlin noise\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T perlin(detail::tvec3<T, P> const & Position)\r\n\t{\r\n\t\tdetail::tvec3<T, P> Pi0 = floor(Position); // Integer part for indexing\r\n\t\tdetail::tvec3<T, P> Pi1 = Pi0 + T(1); // Integer part + 1\r\n\t\tPi0 = mod289(Pi0);\r\n\t\tPi1 = mod289(Pi1);\r\n\t\tdetail::tvec3<T, P> Pf0 = fract(Position); // Fractional part for interpolation\r\n\t\tdetail::tvec3<T, P> Pf1 = Pf0 - T(1); // Fractional part - 1.0\r\n\t\tdetail::tvec4<T, P> ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\r\n\t\tdetail::tvec4<T, P> iy = detail::tvec4<T, P>(detail::tvec2<T, P>(Pi0.y), detail::tvec2<T, P>(Pi1.y));\r\n\t\tdetail::tvec4<T, P> iz0(Pi0.z);\r\n\t\tdetail::tvec4<T, P> iz1(Pi1.z);\r\n\r\n\t\tdetail::tvec4<T, P> ixy = detail::permute(detail::permute(ix) + iy);\r\n\t\tdetail::tvec4<T, P> ixy0 = detail::permute(ixy + iz0);\r\n\t\tdetail::tvec4<T, P> ixy1 = detail::permute(ixy + iz1);\r\n\r\n\t\tdetail::tvec4<T, P> gx0 = ixy0 * T(1.0 / 7.0);\r\n\t\tdetail::tvec4<T, P> gy0 = fract(floor(gx0) * T(1.0 / 7.0)) - T(0.5);\r\n\t\tgx0 = fract(gx0);\r\n\t\tdetail::tvec4<T, P> gz0 = detail::tvec4<T, P>(0.5) - abs(gx0) - abs(gy0);\r\n\t\tdetail::tvec4<T, P> sz0 = step(gz0, detail::tvec4<T, P>(0.0));\r\n\t\tgx0 -= sz0 * (step(T(0), gx0) - T(0.5));\r\n\t\tgy0 -= sz0 * (step(T(0), gy0) - T(0.5));\r\n\r\n\t\tdetail::tvec4<T, P> gx1 = ixy1 * T(1.0 / 7.0);\r\n\t\tdetail::tvec4<T, P> gy1 = fract(floor(gx1) * T(1.0 / 7.0)) - T(0.5);\r\n\t\tgx1 = fract(gx1);\r\n\t\tdetail::tvec4<T, P> gz1 = detail::tvec4<T, P>(0.5) - abs(gx1) - abs(gy1);\r\n\t\tdetail::tvec4<T, P> sz1 = step(gz1, detail::tvec4<T, P>(0.0));\r\n\t\tgx1 -= sz1 * (step(T(0), gx1) - T(0.5));\r\n\t\tgy1 -= sz1 * (step(T(0), gy1) - T(0.5));\r\n\r\n\t\tdetail::tvec3<T, P> g000(gx0.x, gy0.x, gz0.x);\r\n\t\tdetail::tvec3<T, P> g100(gx0.y, gy0.y, gz0.y);\r\n\t\tdetail::tvec3<T, P> g010(gx0.z, gy0.z, gz0.z);\r\n\t\tdetail::tvec3<T, P> g110(gx0.w, gy0.w, gz0.w);\r\n\t\tdetail::tvec3<T, P> g001(gx1.x, gy1.x, gz1.x);\r\n\t\tdetail::tvec3<T, P> g101(gx1.y, gy1.y, gz1.y);\r\n\t\tdetail::tvec3<T, P> g011(gx1.z, gy1.z, gz1.z);\r\n\t\tdetail::tvec3<T, P> g111(gx1.w, gy1.w, gz1.w);\r\n\r\n\t\tdetail::tvec4<T, P> norm0 = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\r\n\t\tg000 *= norm0.x;\r\n\t\tg010 *= norm0.y;\r\n\t\tg100 *= norm0.z;\r\n\t\tg110 *= norm0.w;\r\n\t\tdetail::tvec4<T, P> norm1 = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\r\n\t\tg001 *= norm1.x;\r\n\t\tg011 *= norm1.y;\r\n\t\tg101 *= norm1.z;\r\n\t\tg111 *= norm1.w;\r\n\r\n\t\tT n000 = dot(g000, Pf0);\r\n\t\tT n100 = dot(g100, detail::tvec3<T, P>(Pf1.x, Pf0.y, Pf0.z));\r\n\t\tT n010 = dot(g010, detail::tvec3<T, P>(Pf0.x, Pf1.y, Pf0.z));\r\n\t\tT n110 = dot(g110, detail::tvec3<T, P>(Pf1.x, Pf1.y, Pf0.z));\r\n\t\tT n001 = dot(g001, detail::tvec3<T, P>(Pf0.x, Pf0.y, Pf1.z));\r\n\t\tT n101 = dot(g101, detail::tvec3<T, P>(Pf1.x, Pf0.y, Pf1.z));\r\n\t\tT n011 = dot(g011, detail::tvec3<T, P>(Pf0.x, Pf1.y, Pf1.z));\r\n\t\tT n111 = dot(g111, Pf1);\r\n\r\n\t\tdetail::tvec3<T, P> fade_xyz = fade(Pf0);\r\n\t\tdetail::tvec4<T, P> n_z = mix(detail::tvec4<T, P>(n000, n100, n010, n110), detail::tvec4<T, P>(n001, n101, n011, n111), fade_xyz.z);\r\n\t\tdetail::tvec2<T, P> n_yz = mix(detail::tvec2<T, P>(n_z.x, n_z.y), detail::tvec2<T, P>(n_z.z, n_z.w), fade_xyz.y);\r\n\t\tT n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); \r\n\t\treturn T(2.2) * n_xyz;\r\n\t}\r\n\t/*\r\n\t// Classic Perlin noise\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T perlin(detail::tvec3<T, P> const & P)\r\n\t{\r\n\t\tdetail::tvec3<T, P> Pi0 = floor(P); // Integer part for indexing\r\n\t\tdetail::tvec3<T, P> Pi1 = Pi0 + T(1); // Integer part + 1\r\n\t\tPi0 = mod(Pi0, T(289));\r\n\t\tPi1 = mod(Pi1, T(289));\r\n\t\tdetail::tvec3<T, P> Pf0 = fract(P); // Fractional part for interpolation\r\n\t\tdetail::tvec3<T, P> Pf1 = Pf0 - T(1); // Fractional part - 1.0\r\n\t\tdetail::tvec4<T, P> ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\r\n\t\tdetail::tvec4<T, P> iy(Pi0.y, Pi0.y, Pi1.y, Pi1.y);\r\n\t\tdetail::tvec4<T, P> iz0(Pi0.z);\r\n\t\tdetail::tvec4<T, P> iz1(Pi1.z);\r\n\r\n\t\tdetail::tvec4<T, P> ixy = permute(permute(ix) + iy);\r\n\t\tdetail::tvec4<T, P> ixy0 = permute(ixy + iz0);\r\n\t\tdetail::tvec4<T, P> ixy1 = permute(ixy + iz1);\r\n\r\n\t\tdetail::tvec4<T, P> gx0 = ixy0 / T(7);\r\n\t\tdetail::tvec4<T, P> gy0 = fract(floor(gx0) / T(7)) - T(0.5);\r\n\t\tgx0 = fract(gx0);\r\n\t\tdetail::tvec4<T, P> gz0 = detail::tvec4<T, P>(0.5) - abs(gx0) - abs(gy0);\r\n\t\tdetail::tvec4<T, P> sz0 = step(gz0, detail::tvec4<T, P>(0.0));\r\n\t\tgx0 -= sz0 * (step(0.0, gx0) - T(0.5));\r\n\t\tgy0 -= sz0 * (step(0.0, gy0) - T(0.5));\r\n\r\n\t\tdetail::tvec4<T, P> gx1 = ixy1 / T(7);\r\n\t\tdetail::tvec4<T, P> gy1 = fract(floor(gx1) / T(7)) - T(0.5);\r\n\t\tgx1 = fract(gx1);\r\n\t\tdetail::tvec4<T, P> gz1 = detail::tvec4<T, P>(0.5) - abs(gx1) - abs(gy1);\r\n\t\tdetail::tvec4<T, P> sz1 = step(gz1, detail::tvec4<T, P>(0.0));\r\n\t\tgx1 -= sz1 * (step(T(0), gx1) - T(0.5));\r\n\t\tgy1 -= sz1 * (step(T(0), gy1) - T(0.5));\r\n\r\n\t\tdetail::tvec3<T, P> g000(gx0.x, gy0.x, gz0.x);\r\n\t\tdetail::tvec3<T, P> g100(gx0.y, gy0.y, gz0.y);\r\n\t\tdetail::tvec3<T, P> g010(gx0.z, gy0.z, gz0.z);\r\n\t\tdetail::tvec3<T, P> g110(gx0.w, gy0.w, gz0.w);\r\n\t\tdetail::tvec3<T, P> g001(gx1.x, gy1.x, gz1.x);\r\n\t\tdetail::tvec3<T, P> g101(gx1.y, gy1.y, gz1.y);\r\n\t\tdetail::tvec3<T, P> g011(gx1.z, gy1.z, gz1.z);\r\n\t\tdetail::tvec3<T, P> g111(gx1.w, gy1.w, gz1.w);\r\n\r\n\t\tdetail::tvec4<T, P> norm0 = taylorInvSqrt(detail::tvec4<T, P>(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\r\n\t\tg000 *= norm0.x;\r\n\t\tg010 *= norm0.y;\r\n\t\tg100 *= norm0.z;\r\n\t\tg110 *= norm0.w;\r\n\t\tdetail::tvec4<T, P> norm1 = taylorInvSqrt(detail::tvec4<T, P>(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\r\n\t\tg001 *= norm1.x;\r\n\t\tg011 *= norm1.y;\r\n\t\tg101 *= norm1.z;\r\n\t\tg111 *= norm1.w;\r\n\r\n\t\tT n000 = dot(g000, Pf0);\r\n\t\tT n100 = dot(g100, detail::tvec3<T, P>(Pf1.x, Pf0.y, Pf0.z));\r\n\t\tT n010 = dot(g010, detail::tvec3<T, P>(Pf0.x, Pf1.y, Pf0.z));\r\n\t\tT n110 = dot(g110, detail::tvec3<T, P>(Pf1.x, Pf1.y, Pf0.z));\r\n\t\tT n001 = dot(g001, detail::tvec3<T, P>(Pf0.x, Pf0.y, Pf1.z));\r\n\t\tT n101 = dot(g101, detail::tvec3<T, P>(Pf1.x, Pf0.y, Pf1.z));\r\n\t\tT n011 = dot(g011, detail::tvec3<T, P>(Pf0.x, Pf1.y, Pf1.z));\r\n\t\tT n111 = dot(g111, Pf1);\r\n\r\n\t\tdetail::tvec3<T, P> fade_xyz = fade(Pf0);\r\n\t\tdetail::tvec4<T, P> n_z = mix(detail::tvec4<T, P>(n000, n100, n010, n110), detail::tvec4<T, P>(n001, n101, n011, n111), fade_xyz.z);\r\n\t\tdetail::tvec2<T, P> n_yz = mix(\r\n\t\t\tdetail::tvec2<T, P>(n_z.x, n_z.y), \r\n\t\t\tdetail::tvec2<T, P>(n_z.z, n_z.w), fade_xyz.y);\r\n\t\tT n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); \r\n\t\treturn T(2.2) * n_xyz;\r\n\t}\r\n\t*/\r\n\t// Classic Perlin noise\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T perlin(detail::tvec4<T, P> const & Position)\r\n\t{\r\n\t\tdetail::tvec4<T, P> Pi0 = floor(Position);\t// Integer part for indexing\r\n\t\tdetail::tvec4<T, P> Pi1 = Pi0 + T(1);\t\t// Integer part + 1\r\n\t\tPi0 = mod(Pi0, detail::tvec4<T, P>(289));\r\n\t\tPi1 = mod(Pi1, detail::tvec4<T, P>(289));\r\n\t\tdetail::tvec4<T, P> Pf0 = fract(Position);\t// Fractional part for interpolation\r\n\t\tdetail::tvec4<T, P> Pf1 = Pf0 - T(1);\t\t// Fractional part - 1.0\r\n\t\tdetail::tvec4<T, P> ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\r\n\t\tdetail::tvec4<T, P> iy(Pi0.y, Pi0.y, Pi1.y, Pi1.y);\r\n\t\tdetail::tvec4<T, P> iz0(Pi0.z);\r\n\t\tdetail::tvec4<T, P> iz1(Pi1.z);\r\n\t\tdetail::tvec4<T, P> iw0(Pi0.w);\r\n\t\tdetail::tvec4<T, P> iw1(Pi1.w);\r\n\r\n\t\tdetail::tvec4<T, P> ixy = detail::permute(detail::permute(ix) + iy);\r\n\t\tdetail::tvec4<T, P> ixy0 = detail::permute(ixy + iz0);\r\n\t\tdetail::tvec4<T, P> ixy1 = detail::permute(ixy + iz1);\r\n\t\tdetail::tvec4<T, P> ixy00 = detail::permute(ixy0 + iw0);\r\n\t\tdetail::tvec4<T, P> ixy01 = detail::permute(ixy0 + iw1);\r\n\t\tdetail::tvec4<T, P> ixy10 = detail::permute(ixy1 + iw0);\r\n\t\tdetail::tvec4<T, P> ixy11 = detail::permute(ixy1 + iw1);\r\n\r\n\t\tdetail::tvec4<T, P> gx00 = ixy00 / T(7);\r\n\t\tdetail::tvec4<T, P> gy00 = floor(gx00) / T(7);\r\n\t\tdetail::tvec4<T, P> gz00 = floor(gy00) / T(6);\r\n\t\tgx00 = fract(gx00) - T(0.5);\r\n\t\tgy00 = fract(gy00) - T(0.5);\r\n\t\tgz00 = fract(gz00) - T(0.5);\r\n\t\tdetail::tvec4<T, P> gw00 = detail::tvec4<T, P>(0.75) - abs(gx00) - abs(gy00) - abs(gz00);\r\n\t\tdetail::tvec4<T, P> sw00 = step(gw00, detail::tvec4<T, P>(0.0));\r\n\t\tgx00 -= sw00 * (step(T(0), gx00) - T(0.5));\r\n\t\tgy00 -= sw00 * (step(T(0), gy00) - T(0.5));\r\n\r\n\t\tdetail::tvec4<T, P> gx01 = ixy01 / T(7);\r\n\t\tdetail::tvec4<T, P> gy01 = floor(gx01) / T(7);\r\n\t\tdetail::tvec4<T, P> gz01 = floor(gy01) / T(6);\r\n\t\tgx01 = fract(gx01) - T(0.5);\r\n\t\tgy01 = fract(gy01) - T(0.5);\r\n\t\tgz01 = fract(gz01) - T(0.5);\r\n\t\tdetail::tvec4<T, P> gw01 = detail::tvec4<T, P>(0.75) - abs(gx01) - abs(gy01) - abs(gz01);\r\n\t\tdetail::tvec4<T, P> sw01 = step(gw01, detail::tvec4<T, P>(0.0));\r\n\t\tgx01 -= sw01 * (step(T(0), gx01) - T(0.5));\r\n\t\tgy01 -= sw01 * (step(T(0), gy01) - T(0.5));\r\n\r\n\t\tdetail::tvec4<T, P> gx10 = ixy10 / T(7);\r\n\t\tdetail::tvec4<T, P> gy10 = floor(gx10) / T(7);\r\n\t\tdetail::tvec4<T, P> gz10 = floor(gy10) / T(6);\r\n\t\tgx10 = fract(gx10) - T(0.5);\r\n\t\tgy10 = fract(gy10) - T(0.5);\r\n\t\tgz10 = fract(gz10) - T(0.5);\r\n\t\tdetail::tvec4<T, P> gw10 = detail::tvec4<T, P>(0.75) - abs(gx10) - abs(gy10) - abs(gz10);\r\n\t\tdetail::tvec4<T, P> sw10 = step(gw10, detail::tvec4<T, P>(0));\r\n\t\tgx10 -= sw10 * (step(T(0), gx10) - T(0.5));\r\n\t\tgy10 -= sw10 * (step(T(0), gy10) - T(0.5));\r\n\r\n\t\tdetail::tvec4<T, P> gx11 = ixy11 / T(7);\r\n\t\tdetail::tvec4<T, P> gy11 = floor(gx11) / T(7);\r\n\t\tdetail::tvec4<T, P> gz11 = floor(gy11) / T(6);\r\n\t\tgx11 = fract(gx11) - T(0.5);\r\n\t\tgy11 = fract(gy11) - T(0.5);\r\n\t\tgz11 = fract(gz11) - T(0.5);\r\n\t\tdetail::tvec4<T, P> gw11 = detail::tvec4<T, P>(0.75) - abs(gx11) - abs(gy11) - abs(gz11);\r\n\t\tdetail::tvec4<T, P> sw11 = step(gw11, detail::tvec4<T, P>(0.0));\r\n\t\tgx11 -= sw11 * (step(T(0), gx11) - T(0.5));\r\n\t\tgy11 -= sw11 * (step(T(0), gy11) - T(0.5));\r\n\r\n\t\tdetail::tvec4<T, P> g0000(gx00.x, gy00.x, gz00.x, gw00.x);\r\n\t\tdetail::tvec4<T, P> g1000(gx00.y, gy00.y, gz00.y, gw00.y);\r\n\t\tdetail::tvec4<T, P> g0100(gx00.z, gy00.z, gz00.z, gw00.z);\r\n\t\tdetail::tvec4<T, P> g1100(gx00.w, gy00.w, gz00.w, gw00.w);\r\n\t\tdetail::tvec4<T, P> g0010(gx10.x, gy10.x, gz10.x, gw10.x);\r\n\t\tdetail::tvec4<T, P> g1010(gx10.y, gy10.y, gz10.y, gw10.y);\r\n\t\tdetail::tvec4<T, P> g0110(gx10.z, gy10.z, gz10.z, gw10.z);\r\n\t\tdetail::tvec4<T, P> g1110(gx10.w, gy10.w, gz10.w, gw10.w);\r\n\t\tdetail::tvec4<T, P> g0001(gx01.x, gy01.x, gz01.x, gw01.x);\r\n\t\tdetail::tvec4<T, P> g1001(gx01.y, gy01.y, gz01.y, gw01.y);\r\n\t\tdetail::tvec4<T, P> g0101(gx01.z, gy01.z, gz01.z, gw01.z);\r\n\t\tdetail::tvec4<T, P> g1101(gx01.w, gy01.w, gz01.w, gw01.w);\r\n\t\tdetail::tvec4<T, P> g0011(gx11.x, gy11.x, gz11.x, gw11.x);\r\n\t\tdetail::tvec4<T, P> g1011(gx11.y, gy11.y, gz11.y, gw11.y);\r\n\t\tdetail::tvec4<T, P> g0111(gx11.z, gy11.z, gz11.z, gw11.z);\r\n\t\tdetail::tvec4<T, P> g1111(gx11.w, gy11.w, gz11.w, gw11.w);\r\n\r\n\t\tdetail::tvec4<T, P> norm00 = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100)));\r\n\t\tg0000 *= norm00.x;\r\n\t\tg0100 *= norm00.y;\r\n\t\tg1000 *= norm00.z;\r\n\t\tg1100 *= norm00.w;\r\n\r\n\t\tdetail::tvec4<T, P> norm01 = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101)));\r\n\t\tg0001 *= norm01.x;\r\n\t\tg0101 *= norm01.y;\r\n\t\tg1001 *= norm01.z;\r\n\t\tg1101 *= norm01.w;\r\n\r\n\t\tdetail::tvec4<T, P> norm10 = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110)));\r\n\t\tg0010 *= norm10.x;\r\n\t\tg0110 *= norm10.y;\r\n\t\tg1010 *= norm10.z;\r\n\t\tg1110 *= norm10.w;\r\n\r\n\t\tdetail::tvec4<T, P> norm11 = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111)));\r\n\t\tg0011 *= norm11.x;\r\n\t\tg0111 *= norm11.y;\r\n\t\tg1011 *= norm11.z;\r\n\t\tg1111 *= norm11.w;\r\n\r\n\t\tT n0000 = dot(g0000, Pf0);\r\n\t\tT n1000 = dot(g1000, detail::tvec4<T, P>(Pf1.x, Pf0.y, Pf0.z, Pf0.w));\r\n\t\tT n0100 = dot(g0100, detail::tvec4<T, P>(Pf0.x, Pf1.y, Pf0.z, Pf0.w));\r\n\t\tT n1100 = dot(g1100, detail::tvec4<T, P>(Pf1.x, Pf1.y, Pf0.z, Pf0.w));\r\n\t\tT n0010 = dot(g0010, detail::tvec4<T, P>(Pf0.x, Pf0.y, Pf1.z, Pf0.w));\r\n\t\tT n1010 = dot(g1010, detail::tvec4<T, P>(Pf1.x, Pf0.y, Pf1.z, Pf0.w));\r\n\t\tT n0110 = dot(g0110, detail::tvec4<T, P>(Pf0.x, Pf1.y, Pf1.z, Pf0.w));\r\n\t\tT n1110 = dot(g1110, detail::tvec4<T, P>(Pf1.x, Pf1.y, Pf1.z, Pf0.w));\r\n\t\tT n0001 = dot(g0001, detail::tvec4<T, P>(Pf0.x, Pf0.y, Pf0.z, Pf1.w));\r\n\t\tT n1001 = dot(g1001, detail::tvec4<T, P>(Pf1.x, Pf0.y, Pf0.z, Pf1.w));\r\n\t\tT n0101 = dot(g0101, detail::tvec4<T, P>(Pf0.x, Pf1.y, Pf0.z, Pf1.w));\r\n\t\tT n1101 = dot(g1101, detail::tvec4<T, P>(Pf1.x, Pf1.y, Pf0.z, Pf1.w));\r\n\t\tT n0011 = dot(g0011, detail::tvec4<T, P>(Pf0.x, Pf0.y, Pf1.z, Pf1.w));\r\n\t\tT n1011 = dot(g1011, detail::tvec4<T, P>(Pf1.x, Pf0.y, Pf1.z, Pf1.w));\r\n\t\tT n0111 = dot(g0111, detail::tvec4<T, P>(Pf0.x, Pf1.y, Pf1.z, Pf1.w));\r\n\t\tT n1111 = dot(g1111, Pf1);\r\n\r\n\t\tdetail::tvec4<T, P> fade_xyzw = fade(Pf0);\r\n\t\tdetail::tvec4<T, P> n_0w = mix(detail::tvec4<T, P>(n0000, n1000, n0100, n1100), detail::tvec4<T, P>(n0001, n1001, n0101, n1101), fade_xyzw.w);\r\n\t\tdetail::tvec4<T, P> n_1w = mix(detail::tvec4<T, P>(n0010, n1010, n0110, n1110), detail::tvec4<T, P>(n0011, n1011, n0111, n1111), fade_xyzw.w);\r\n\t\tdetail::tvec4<T, P> n_zw = mix(n_0w, n_1w, fade_xyzw.z);\r\n\t\tdetail::tvec2<T, P> n_yzw = mix(detail::tvec2<T, P>(n_zw.x, n_zw.y), detail::tvec2<T, P>(n_zw.z, n_zw.w), fade_xyzw.y);\r\n\t\tT n_xyzw = mix(n_yzw.x, n_yzw.y, fade_xyzw.x);\r\n\t\treturn T(2.2) * n_xyzw;\r\n\t}\r\n\r\n\t// Classic Perlin noise, periodic variant\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T perlin(detail::tvec2<T, P> const & Position, detail::tvec2<T, P> const & rep)\r\n\t{\r\n\t\tdetail::tvec4<T, P> Pi = floor(detail::tvec4<T, P>(Position.x, Position.y, Position.x, Position.y)) + detail::tvec4<T, P>(0.0, 0.0, 1.0, 1.0);\r\n\t\tdetail::tvec4<T, P> Pf = fract(detail::tvec4<T, P>(Position.x, Position.y, Position.x, Position.y)) - detail::tvec4<T, P>(0.0, 0.0, 1.0, 1.0);\r\n\t\tPi = mod(Pi, detail::tvec4<T, P>(rep.x, rep.y, rep.x, rep.y)); // To create noise with explicit period\r\n\t\tPi = mod(Pi, detail::tvec4<T, P>(289)); // To avoid truncation effects in permutation\r\n\t\tdetail::tvec4<T, P> ix(Pi.x, Pi.z, Pi.x, Pi.z);\r\n\t\tdetail::tvec4<T, P> iy(Pi.y, Pi.y, Pi.w, Pi.w);\r\n\t\tdetail::tvec4<T, P> fx(Pf.x, Pf.z, Pf.x, Pf.z);\r\n\t\tdetail::tvec4<T, P> fy(Pf.y, Pf.y, Pf.w, Pf.w);\r\n\r\n\t\tdetail::tvec4<T, P> i = detail::permute(detail::permute(ix) + iy);\r\n\r\n\t\tdetail::tvec4<T, P> gx = static_cast<T>(2) * fract(i / T(41)) - T(1);\r\n\t\tdetail::tvec4<T, P> gy = abs(gx) - T(0.5);\r\n\t\tdetail::tvec4<T, P> tx = floor(gx + T(0.5));\r\n\t\tgx = gx - tx;\r\n\r\n\t\tdetail::tvec2<T, P> g00(gx.x, gy.x);\r\n\t\tdetail::tvec2<T, P> g10(gx.y, gy.y);\r\n\t\tdetail::tvec2<T, P> g01(gx.z, gy.z);\r\n\t\tdetail::tvec2<T, P> g11(gx.w, gy.w);\r\n\r\n\t\tdetail::tvec4<T, P> norm = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11)));\r\n\t\tg00 *= norm.x;\r\n\t\tg01 *= norm.y;\r\n\t\tg10 *= norm.z;\r\n\t\tg11 *= norm.w;\r\n\r\n\t\tT n00 = dot(g00, detail::tvec2<T, P>(fx.x, fy.x));\r\n\t\tT n10 = dot(g10, detail::tvec2<T, P>(fx.y, fy.y));\r\n\t\tT n01 = dot(g01, detail::tvec2<T, P>(fx.z, fy.z));\r\n\t\tT n11 = dot(g11, detail::tvec2<T, P>(fx.w, fy.w));\r\n\r\n\t\tdetail::tvec2<T, P> fade_xy = fade(detail::tvec2<T, P>(Pf.x, Pf.y));\r\n\t\tdetail::tvec2<T, P> n_x = mix(detail::tvec2<T, P>(n00, n01), detail::tvec2<T, P>(n10, n11), fade_xy.x);\r\n\t\tT n_xy = mix(n_x.x, n_x.y, fade_xy.y);\r\n\t\treturn T(2.3) * n_xy;\r\n\t}\r\n\r\n\t// Classic Perlin noise, periodic variant\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T perlin(detail::tvec3<T, P> const & Position, detail::tvec3<T, P> const & rep)\r\n\t{\r\n\t\tdetail::tvec3<T, P> Pi0 = mod(floor(Position), rep); // Integer part, modulo period\r\n\t\tdetail::tvec3<T, P> Pi1 = mod(Pi0 + detail::tvec3<T, P>(T(1)), rep); // Integer part + 1, mod period\r\n\t\tPi0 = mod(Pi0, detail::tvec3<T, P>(289));\r\n\t\tPi1 = mod(Pi1, detail::tvec3<T, P>(289));\r\n\t\tdetail::tvec3<T, P> Pf0 = fract(Position); // Fractional part for interpolation\r\n\t\tdetail::tvec3<T, P> Pf1 = Pf0 - detail::tvec3<T, P>(T(1)); // Fractional part - 1.0\r\n\t\tdetail::tvec4<T, P> ix = detail::tvec4<T, P>(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\r\n\t\tdetail::tvec4<T, P> iy = detail::tvec4<T, P>(Pi0.y, Pi0.y, Pi1.y, Pi1.y);\r\n\t\tdetail::tvec4<T, P> iz0(Pi0.z);\r\n\t\tdetail::tvec4<T, P> iz1(Pi1.z);\r\n\r\n\t\tdetail::tvec4<T, P> ixy = detail::permute(detail::permute(ix) + iy);\r\n\t\tdetail::tvec4<T, P> ixy0 = detail::permute(ixy + iz0);\r\n\t\tdetail::tvec4<T, P> ixy1 = detail::permute(ixy + iz1);\r\n\r\n\t\tdetail::tvec4<T, P> gx0 = ixy0 / T(7);\r\n\t\tdetail::tvec4<T, P> gy0 = fract(floor(gx0) / T(7)) - T(0.5);\r\n\t\tgx0 = fract(gx0);\r\n\t\tdetail::tvec4<T, P> gz0 = detail::tvec4<T, P>(0.5) - abs(gx0) - abs(gy0);\r\n\t\tdetail::tvec4<T, P> sz0 = step(gz0, detail::tvec4<T, P>(0));\r\n\t\tgx0 -= sz0 * (step(T(0), gx0) - T(0.5));\r\n\t\tgy0 -= sz0 * (step(T(0), gy0) - T(0.5));\r\n\r\n\t\tdetail::tvec4<T, P> gx1 = ixy1 / T(7);\r\n\t\tdetail::tvec4<T, P> gy1 = fract(floor(gx1) / T(7)) - T(0.5);\r\n\t\tgx1 = fract(gx1);\r\n\t\tdetail::tvec4<T, P> gz1 = detail::tvec4<T, P>(0.5) - abs(gx1) - abs(gy1);\r\n\t\tdetail::tvec4<T, P> sz1 = step(gz1, detail::tvec4<T, P>(T(0)));\r\n\t\tgx1 -= sz1 * (step(T(0), gx1) - T(0.5));\r\n\t\tgy1 -= sz1 * (step(T(0), gy1) - T(0.5));\r\n\r\n\t\tdetail::tvec3<T, P> g000 = detail::tvec3<T, P>(gx0.x, gy0.x, gz0.x);\r\n\t\tdetail::tvec3<T, P> g100 = detail::tvec3<T, P>(gx0.y, gy0.y, gz0.y);\r\n\t\tdetail::tvec3<T, P> g010 = detail::tvec3<T, P>(gx0.z, gy0.z, gz0.z);\r\n\t\tdetail::tvec3<T, P> g110 = detail::tvec3<T, P>(gx0.w, gy0.w, gz0.w);\r\n\t\tdetail::tvec3<T, P> g001 = detail::tvec3<T, P>(gx1.x, gy1.x, gz1.x);\r\n\t\tdetail::tvec3<T, P> g101 = detail::tvec3<T, P>(gx1.y, gy1.y, gz1.y);\r\n\t\tdetail::tvec3<T, P> g011 = detail::tvec3<T, P>(gx1.z, gy1.z, gz1.z);\r\n\t\tdetail::tvec3<T, P> g111 = detail::tvec3<T, P>(gx1.w, gy1.w, gz1.w);\r\n\r\n\t\tdetail::tvec4<T, P> norm0 = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\r\n\t\tg000 *= norm0.x;\r\n\t\tg010 *= norm0.y;\r\n\t\tg100 *= norm0.z;\r\n\t\tg110 *= norm0.w;\r\n\t\tdetail::tvec4<T, P> norm1 = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\r\n\t\tg001 *= norm1.x;\r\n\t\tg011 *= norm1.y;\r\n\t\tg101 *= norm1.z;\r\n\t\tg111 *= norm1.w;\r\n\r\n\t\tT n000 = dot(g000, Pf0);\r\n\t\tT n100 = dot(g100, detail::tvec3<T, P>(Pf1.x, Pf0.y, Pf0.z));\r\n\t\tT n010 = dot(g010, detail::tvec3<T, P>(Pf0.x, Pf1.y, Pf0.z));\r\n\t\tT n110 = dot(g110, detail::tvec3<T, P>(Pf1.x, Pf1.y, Pf0.z));\r\n\t\tT n001 = dot(g001, detail::tvec3<T, P>(Pf0.x, Pf0.y, Pf1.z));\r\n\t\tT n101 = dot(g101, detail::tvec3<T, P>(Pf1.x, Pf0.y, Pf1.z));\r\n\t\tT n011 = dot(g011, detail::tvec3<T, P>(Pf0.x, Pf1.y, Pf1.z));\r\n\t\tT n111 = dot(g111, Pf1);\r\n\r\n\t\tdetail::tvec3<T, P> fade_xyz = fade(Pf0);\r\n\t\tdetail::tvec4<T, P> n_z = mix(detail::tvec4<T, P>(n000, n100, n010, n110), detail::tvec4<T, P>(n001, n101, n011, n111), fade_xyz.z);\r\n\t\tdetail::tvec2<T, P> n_yz = mix(detail::tvec2<T, P>(n_z.x, n_z.y), detail::tvec2<T, P>(n_z.z, n_z.w), fade_xyz.y);\r\n\t\tT n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\r\n\t\treturn T(2.2) * n_xyz;\r\n\t}\r\n\r\n\t// Classic Perlin noise, periodic version\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T perlin(detail::tvec4<T, P> const & Position, detail::tvec4<T, P> const & rep)\r\n\t{\r\n\t\tdetail::tvec4<T, P> Pi0 = mod(floor(Position), rep); // Integer part modulo rep\r\n\t\tdetail::tvec4<T, P> Pi1 = mod(Pi0 + T(1), rep); // Integer part + 1 mod rep\r\n\t\tdetail::tvec4<T, P> Pf0 = fract(Position); // Fractional part for interpolation\r\n\t\tdetail::tvec4<T, P> Pf1 = Pf0 - T(1); // Fractional part - 1.0\r\n\t\tdetail::tvec4<T, P> ix = detail::tvec4<T, P>(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\r\n\t\tdetail::tvec4<T, P> iy = detail::tvec4<T, P>(Pi0.y, Pi0.y, Pi1.y, Pi1.y);\r\n\t\tdetail::tvec4<T, P> iz0(Pi0.z);\r\n\t\tdetail::tvec4<T, P> iz1(Pi1.z);\r\n\t\tdetail::tvec4<T, P> iw0(Pi0.w);\r\n\t\tdetail::tvec4<T, P> iw1(Pi1.w);\r\n\r\n\t\tdetail::tvec4<T, P> ixy = detail::permute(detail::permute(ix) + iy);\r\n\t\tdetail::tvec4<T, P> ixy0 = detail::permute(ixy + iz0);\r\n\t\tdetail::tvec4<T, P> ixy1 = detail::permute(ixy + iz1);\r\n\t\tdetail::tvec4<T, P> ixy00 = detail::permute(ixy0 + iw0);\r\n\t\tdetail::tvec4<T, P> ixy01 = detail::permute(ixy0 + iw1);\r\n\t\tdetail::tvec4<T, P> ixy10 = detail::permute(ixy1 + iw0);\r\n\t\tdetail::tvec4<T, P> ixy11 = detail::permute(ixy1 + iw1);\r\n\r\n\t\tdetail::tvec4<T, P> gx00 = ixy00 / T(7);\r\n\t\tdetail::tvec4<T, P> gy00 = floor(gx00) / T(7);\r\n\t\tdetail::tvec4<T, P> gz00 = floor(gy00) / T(6);\r\n\t\tgx00 = fract(gx00) - T(0.5);\r\n\t\tgy00 = fract(gy00) - T(0.5);\r\n\t\tgz00 = fract(gz00) - T(0.5);\r\n\t\tdetail::tvec4<T, P> gw00 = detail::tvec4<T, P>(0.75) - abs(gx00) - abs(gy00) - abs(gz00);\r\n\t\tdetail::tvec4<T, P> sw00 = step(gw00, detail::tvec4<T, P>(0));\r\n\t\tgx00 -= sw00 * (step(T(0), gx00) - T(0.5));\r\n\t\tgy00 -= sw00 * (step(T(0), gy00) - T(0.5));\r\n\r\n\t\tdetail::tvec4<T, P> gx01 = ixy01 / T(7);\r\n\t\tdetail::tvec4<T, P> gy01 = floor(gx01) / T(7);\r\n\t\tdetail::tvec4<T, P> gz01 = floor(gy01) / T(6);\r\n\t\tgx01 = fract(gx01) - T(0.5);\r\n\t\tgy01 = fract(gy01) - T(0.5);\r\n\t\tgz01 = fract(gz01) - T(0.5);\r\n\t\tdetail::tvec4<T, P> gw01 = detail::tvec4<T, P>(0.75) - abs(gx01) - abs(gy01) - abs(gz01);\r\n\t\tdetail::tvec4<T, P> sw01 = step(gw01, detail::tvec4<T, P>(0.0));\r\n\t\tgx01 -= sw01 * (step(T(0), gx01) - T(0.5));\r\n\t\tgy01 -= sw01 * (step(T(0), gy01) - T(0.5));\r\n\r\n\t\tdetail::tvec4<T, P> gx10 = ixy10 / T(7);\r\n\t\tdetail::tvec4<T, P> gy10 = floor(gx10) / T(7);\r\n\t\tdetail::tvec4<T, P> gz10 = floor(gy10) / T(6);\r\n\t\tgx10 = fract(gx10) - T(0.5);\r\n\t\tgy10 = fract(gy10) - T(0.5);\r\n\t\tgz10 = fract(gz10) - T(0.5);\r\n\t\tdetail::tvec4<T, P> gw10 = detail::tvec4<T, P>(0.75) - abs(gx10) - abs(gy10) - abs(gz10);\r\n\t\tdetail::tvec4<T, P> sw10 = step(gw10, detail::tvec4<T, P>(0.0));\r\n\t\tgx10 -= sw10 * (step(T(0), gx10) - T(0.5));\r\n\t\tgy10 -= sw10 * (step(T(0), gy10) - T(0.5));\r\n\r\n\t\tdetail::tvec4<T, P> gx11 = ixy11 / T(7);\r\n\t\tdetail::tvec4<T, P> gy11 = floor(gx11) / T(7);\r\n\t\tdetail::tvec4<T, P> gz11 = floor(gy11) / T(6);\r\n\t\tgx11 = fract(gx11) - T(0.5);\r\n\t\tgy11 = fract(gy11) - T(0.5);\r\n\t\tgz11 = fract(gz11) - T(0.5);\r\n\t\tdetail::tvec4<T, P> gw11 = detail::tvec4<T, P>(0.75) - abs(gx11) - abs(gy11) - abs(gz11);\r\n\t\tdetail::tvec4<T, P> sw11 = step(gw11, detail::tvec4<T, P>(T(0)));\r\n\t\tgx11 -= sw11 * (step(T(0), gx11) - T(0.5));\r\n\t\tgy11 -= sw11 * (step(T(0), gy11) - T(0.5));\r\n\r\n\t\tdetail::tvec4<T, P> g0000(gx00.x, gy00.x, gz00.x, gw00.x);\r\n\t\tdetail::tvec4<T, P> g1000(gx00.y, gy00.y, gz00.y, gw00.y);\r\n\t\tdetail::tvec4<T, P> g0100(gx00.z, gy00.z, gz00.z, gw00.z);\r\n\t\tdetail::tvec4<T, P> g1100(gx00.w, gy00.w, gz00.w, gw00.w);\r\n\t\tdetail::tvec4<T, P> g0010(gx10.x, gy10.x, gz10.x, gw10.x);\r\n\t\tdetail::tvec4<T, P> g1010(gx10.y, gy10.y, gz10.y, gw10.y);\r\n\t\tdetail::tvec4<T, P> g0110(gx10.z, gy10.z, gz10.z, gw10.z);\r\n\t\tdetail::tvec4<T, P> g1110(gx10.w, gy10.w, gz10.w, gw10.w);\r\n\t\tdetail::tvec4<T, P> g0001(gx01.x, gy01.x, gz01.x, gw01.x);\r\n\t\tdetail::tvec4<T, P> g1001(gx01.y, gy01.y, gz01.y, gw01.y);\r\n\t\tdetail::tvec4<T, P> g0101(gx01.z, gy01.z, gz01.z, gw01.z);\r\n\t\tdetail::tvec4<T, P> g1101(gx01.w, gy01.w, gz01.w, gw01.w);\r\n\t\tdetail::tvec4<T, P> g0011(gx11.x, gy11.x, gz11.x, gw11.x);\r\n\t\tdetail::tvec4<T, P> g1011(gx11.y, gy11.y, gz11.y, gw11.y);\r\n\t\tdetail::tvec4<T, P> g0111(gx11.z, gy11.z, gz11.z, gw11.z);\r\n\t\tdetail::tvec4<T, P> g1111(gx11.w, gy11.w, gz11.w, gw11.w);\r\n\r\n\t\tdetail::tvec4<T, P> norm00 = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100)));\r\n\t\tg0000 *= norm00.x;\r\n\t\tg0100 *= norm00.y;\r\n\t\tg1000 *= norm00.z;\r\n\t\tg1100 *= norm00.w;\r\n\r\n\t\tdetail::tvec4<T, P> norm01 = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101)));\r\n\t\tg0001 *= norm01.x;\r\n\t\tg0101 *= norm01.y;\r\n\t\tg1001 *= norm01.z;\r\n\t\tg1101 *= norm01.w;\r\n\r\n\t\tdetail::tvec4<T, P> norm10 = taylorInvSqrt(detail::tvec4<T, P>(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110)));\r\n\t\tg0010 *= norm10.x;\r\n\t\tg0110 *= norm10.y;\r\n\t\tg1010 *= norm10.z;\r\n\t\tg1110 *= norm10.w;\r\n\r\n\t\tdetail::tvec4<T, P> norm11 = taylorInvSqrt(detail::tvec4<T, P>(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111)));\r\n\t\tg0011 *= norm11.x;\r\n\t\tg0111 *= norm11.y;\r\n\t\tg1011 *= norm11.z;\r\n\t\tg1111 *= norm11.w;\r\n\r\n\t\tT n0000 = dot(g0000, Pf0);\r\n\t\tT n1000 = dot(g1000, detail::tvec4<T, P>(Pf1.x, Pf0.y, Pf0.z, Pf0.w));\r\n\t\tT n0100 = dot(g0100, detail::tvec4<T, P>(Pf0.x, Pf1.y, Pf0.z, Pf0.w));\r\n\t\tT n1100 = dot(g1100, detail::tvec4<T, P>(Pf1.x, Pf1.y, Pf0.z, Pf0.w));\r\n\t\tT n0010 = dot(g0010, detail::tvec4<T, P>(Pf0.x, Pf0.y, Pf1.z, Pf0.w));\r\n\t\tT n1010 = dot(g1010, detail::tvec4<T, P>(Pf1.x, Pf0.y, Pf1.z, Pf0.w));\r\n\t\tT n0110 = dot(g0110, detail::tvec4<T, P>(Pf0.x, Pf1.y, Pf1.z, Pf0.w));\r\n\t\tT n1110 = dot(g1110, detail::tvec4<T, P>(Pf1.x, Pf1.y, Pf1.z, Pf0.w));\r\n\t\tT n0001 = dot(g0001, detail::tvec4<T, P>(Pf0.x, Pf0.y, Pf0.z, Pf1.w));\r\n\t\tT n1001 = dot(g1001, detail::tvec4<T, P>(Pf1.x, Pf0.y, Pf0.z, Pf1.w));\r\n\t\tT n0101 = dot(g0101, detail::tvec4<T, P>(Pf0.x, Pf1.y, Pf0.z, Pf1.w));\r\n\t\tT n1101 = dot(g1101, detail::tvec4<T, P>(Pf1.x, Pf1.y, Pf0.z, Pf1.w));\r\n\t\tT n0011 = dot(g0011, detail::tvec4<T, P>(Pf0.x, Pf0.y, Pf1.z, Pf1.w));\r\n\t\tT n1011 = dot(g1011, detail::tvec4<T, P>(Pf1.x, Pf0.y, Pf1.z, Pf1.w));\r\n\t\tT n0111 = dot(g0111, detail::tvec4<T, P>(Pf0.x, Pf1.y, Pf1.z, Pf1.w));\r\n\t\tT n1111 = dot(g1111, Pf1);\r\n\r\n\t\tdetail::tvec4<T, P> fade_xyzw = fade(Pf0);\r\n\t\tdetail::tvec4<T, P> n_0w = mix(detail::tvec4<T, P>(n0000, n1000, n0100, n1100), detail::tvec4<T, P>(n0001, n1001, n0101, n1101), fade_xyzw.w);\r\n\t\tdetail::tvec4<T, P> n_1w = mix(detail::tvec4<T, P>(n0010, n1010, n0110, n1110), detail::tvec4<T, P>(n0011, n1011, n0111, n1111), fade_xyzw.w);\r\n\t\tdetail::tvec4<T, P> n_zw = mix(n_0w, n_1w, fade_xyzw.z);\r\n\t\tdetail::tvec2<T, P> n_yzw = mix(detail::tvec2<T, P>(n_zw.x, n_zw.y), detail::tvec2<T, P>(n_zw.z, n_zw.w), fade_xyzw.y);\r\n\t\tT n_xyzw = mix(n_yzw.x, n_yzw.y, fade_xyzw.x);\r\n\t\treturn T(2.2) * n_xyzw;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T simplex(glm::detail::tvec2<T, P> const & v)\r\n\t{\r\n\t\tdetail::tvec4<T, P> const C = detail::tvec4<T, P>(\r\n\t\t\tT( 0.211324865405187),  // (3.0 -  sqrt(3.0)) / 6.0\r\n\t\t\tT( 0.366025403784439),  //  0.5 * (sqrt(3.0)  - 1.0)\r\n\t\t\tT(-0.577350269189626),\t// -1.0 + 2.0 * C.x\r\n\t\t\tT( 0.024390243902439)); //  1.0 / 41.0\r\n\r\n\t\t// First corner\r\n\t\tdetail::tvec2<T, P> i  = floor(v + dot(v, detail::tvec2<T, P>(C[1])));\r\n\t\tdetail::tvec2<T, P> x0 = v -   i + dot(i, detail::tvec2<T, P>(C[0]));\r\n\r\n\t\t// Other corners\r\n\t\t//i1.x = step( x0.y, x0.x ); // x0.x > x0.y ? 1.0 : 0.0\r\n\t\t//i1.y = 1.0 - i1.x;\r\n\t\tdetail::tvec2<T, P> i1 = (x0.x > x0.y) ? detail::tvec2<T, P>(1, 0) : detail::tvec2<T, P>(0, 1);\r\n\t\t// x0 = x0 - 0.0 + 0.0 * C.xx ;\r\n\t\t// x1 = x0 - i1 + 1.0 * C.xx ;\r\n\t\t// x2 = x0 - 1.0 + 2.0 * C.xx ;\r\n\t\tdetail::tvec4<T, P> x12 = detail::tvec4<T, P>(x0.x, x0.y, x0.x, x0.y) + detail::tvec4<T, P>(C.x, C.x, C.z, C.z);\r\n\t\tx12 = detail::tvec4<T, P>(detail::tvec2<T, P>(x12) - i1, x12.z, x12.w);\r\n\r\n\t\t// Permutations\r\n\t\ti = mod(i, detail::tvec2<T, P>(289)); // Avoid truncation effects in permutation\r\n\t\tdetail::tvec3<T, P> p = detail::permute(\r\n\t\t\tdetail::permute(i.y + detail::tvec3<T, P>(T(0), i1.y, T(1)))\r\n\t\t\t+ i.x + detail::tvec3<T, P>(T(0), i1.x, T(1)));\r\n\r\n\t\tdetail::tvec3<T, P> m = max(detail::tvec3<T, P>(0.5) - detail::tvec3<T, P>(\r\n\t\t\tdot(x0, x0),\r\n\t\t\tdot(detail::tvec2<T, P>(x12.x, x12.y), detail::tvec2<T, P>(x12.x, x12.y)), \r\n\t\t\tdot(detail::tvec2<T, P>(x12.z, x12.w), detail::tvec2<T, P>(x12.z, x12.w))), detail::tvec3<T, P>(0));\r\n\t\tm = m * m ;\r\n\t\tm = m * m ;\r\n\r\n\t\t// Gradients: 41 points uniformly over a line, mapped onto a diamond.\r\n\t\t// The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287)\r\n\r\n\t\tdetail::tvec3<T, P> x = static_cast<T>(2) * fract(p * C.w) - T(1);\r\n\t\tdetail::tvec3<T, P> h = abs(x) - T(0.5);\r\n\t\tdetail::tvec3<T, P> ox = floor(x + T(0.5));\r\n\t\tdetail::tvec3<T, P> a0 = x - ox;\r\n\r\n\t\t// Normalise gradients implicitly by scaling m\r\n\t\t// Inlined for speed: m *= taylorInvSqrt( a0*a0 + h*h );\r\n\t\tm *= static_cast<T>(1.79284291400159) - T(0.85373472095314) * (a0 * a0 + h * h);\r\n\r\n\t\t// Compute final noise value at P\r\n\t\tdetail::tvec3<T, P> g;\r\n\t\tg.x  = a0.x  * x0.x  + h.x  * x0.y;\r\n\t\t//g.yz = a0.yz * x12.xz + h.yz * x12.yw;\r\n\t\tg.y = a0.y * x12.x + h.y * x12.y;\r\n\t\tg.z = a0.z * x12.z + h.z * x12.w;\r\n\t\treturn T(130) * dot(m, g);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T simplex(detail::tvec3<T, P> const & v)\r\n\t{\r\n\t\tdetail::tvec2<T, P> const C(1.0 / 6.0, 1.0 / 3.0);\r\n\t\tdetail::tvec4<T, P> const D(0.0, 0.5, 1.0, 2.0);\r\n\r\n\t\t// First corner\r\n\t\tdetail::tvec3<T, P> i(floor(v + dot(v, detail::tvec3<T, P>(C.y))));\r\n\t\tdetail::tvec3<T, P> x0(v - i + dot(i, detail::tvec3<T, P>(C.x)));\r\n\r\n\t\t// Other corners\r\n\t\tdetail::tvec3<T, P> g(step(detail::tvec3<T, P>(x0.y, x0.z, x0.x), x0));\r\n\t\tdetail::tvec3<T, P> l(T(1) - g);\r\n\t\tdetail::tvec3<T, P> i1(min(g, detail::tvec3<T, P>(l.z, l.x, l.y)));\r\n\t\tdetail::tvec3<T, P> i2(max(g, detail::tvec3<T, P>(l.z, l.x, l.y)));\r\n\r\n\t\t//   x0 = x0 - 0.0 + 0.0 * C.xxx;\r\n\t\t//   x1 = x0 - i1  + 1.0 * C.xxx;\r\n\t\t//   x2 = x0 - i2  + 2.0 * C.xxx;\r\n\t\t//   x3 = x0 - 1.0 + 3.0 * C.xxx;\r\n\t\tdetail::tvec3<T, P> x1(x0 - i1 + C.x);\r\n\t\tdetail::tvec3<T, P> x2(x0 - i2 + C.y); // 2.0*C.x = 1/3 = C.y\r\n\t\tdetail::tvec3<T, P> x3(x0 - D.y);      // -1.0+3.0*C.x = -0.5 = -D.y\r\n\r\n\t\t// Permutations\r\n\t\ti = mod289(i); \r\n\t\tdetail::tvec4<T, P> p(detail::permute(detail::permute(detail::permute(\r\n\t\t\ti.z + detail::tvec4<T, P>(T(0), i1.z, i2.z, T(1))) +\r\n\t\t\ti.y + detail::tvec4<T, P>(T(0), i1.y, i2.y, T(1))) +\r\n\t\t\ti.x + detail::tvec4<T, P>(T(0), i1.x, i2.x, T(1))));\r\n\r\n\t\t// Gradients: 7x7 points over a square, mapped onto an octahedron.\r\n\t\t// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\r\n\t\tT n_ = static_cast<T>(0.142857142857); // 1.0/7.0\r\n\t\tdetail::tvec3<T, P> ns(n_ * detail::tvec3<T, P>(D.w, D.y, D.z) - detail::tvec3<T, P>(D.x, D.z, D.x));\r\n\r\n\t\tdetail::tvec4<T, P> j(p - T(49) * floor(p * ns.z * ns.z));  //  mod(p,7*7)\r\n\r\n\t\tdetail::tvec4<T, P> x_(floor(j * ns.z));\r\n\t\tdetail::tvec4<T, P> y_(floor(j - T(7) * x_));    // mod(j,N)\r\n\r\n\t\tdetail::tvec4<T, P> x(x_ * ns.x + ns.y);\r\n\t\tdetail::tvec4<T, P> y(y_ * ns.x + ns.y);\r\n\t\tdetail::tvec4<T, P> h(T(1) - abs(x) - abs(y));\r\n\r\n\t\tdetail::tvec4<T, P> b0(x.x, x.y, y.x, y.y);\r\n\t\tdetail::tvec4<T, P> b1(x.z, x.w, y.z, y.w);\r\n\r\n\t\t// vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\r\n\t\t// vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\r\n\t\tdetail::tvec4<T, P> s0(floor(b0) * T(2) + T(1));\r\n\t\tdetail::tvec4<T, P> s1(floor(b1) * T(2) + T(1));\r\n\t\tdetail::tvec4<T, P> sh(-step(h, detail::tvec4<T, P>(0.0)));\r\n\r\n\t\tdetail::tvec4<T, P> a0 = detail::tvec4<T, P>(b0.x, b0.z, b0.y, b0.w) + detail::tvec4<T, P>(s0.x, s0.z, s0.y, s0.w) * detail::tvec4<T, P>(sh.x, sh.x, sh.y, sh.y);\r\n\t\tdetail::tvec4<T, P> a1 = detail::tvec4<T, P>(b1.x, b1.z, b1.y, b1.w) + detail::tvec4<T, P>(s1.x, s1.z, s1.y, s1.w) * detail::tvec4<T, P>(sh.z, sh.z, sh.w, sh.w);\r\n\r\n\t\tdetail::tvec3<T, P> p0(a0.x, a0.y, h.x);\r\n\t\tdetail::tvec3<T, P> p1(a0.z, a0.w, h.y);\r\n\t\tdetail::tvec3<T, P> p2(a1.x, a1.y, h.z);\r\n\t\tdetail::tvec3<T, P> p3(a1.z, a1.w, h.w);\r\n\r\n\t\t// Normalise gradients\r\n\t\tdetail::tvec4<T, P> norm = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3)));\r\n\t\tp0 *= norm.x;\r\n\t\tp1 *= norm.y;\r\n\t\tp2 *= norm.z;\r\n\t\tp3 *= norm.w;\r\n\r\n\t\t// Mix final noise value\r\n\t\tdetail::tvec4<T, P> m = max(T(0.6) - detail::tvec4<T, P>(dot(x0, x0), dot(x1, x1), dot(x2, x2), dot(x3, x3)), detail::tvec4<T, P>(0));\r\n\t\tm = m * m;\r\n\t\treturn T(42) * dot(m * m, detail::tvec4<T, P>(dot(p0, x0), dot(p1, x1), dot(p2, x2), dot(p3, x3)));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T simplex(detail::tvec4<T, P> const & v)\r\n\t{\r\n\t\tdetail::tvec4<T, P> const C(\r\n\t\t\t0.138196601125011,  // (5 - sqrt(5))/20  G4\r\n\t\t\t0.276393202250021,  // 2 * G4\r\n\t\t\t0.414589803375032,  // 3 * G4\r\n\t\t\t-0.447213595499958); // -1 + 4 * G4\r\n\r\n\t\t// (sqrt(5) - 1)/4 = F4, used once below\r\n\t\tT const F4 = static_cast<T>(0.309016994374947451);\r\n\r\n\t\t// First corner\r\n\t\tdetail::tvec4<T, P> i  = floor(v + dot(v, vec4(F4)));\r\n\t\tdetail::tvec4<T, P> x0 = v -   i + dot(i, vec4(C.x));\r\n\r\n\t\t// Other corners\r\n\r\n\t\t// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)\r\n\t\tdetail::tvec4<T, P> i0;\r\n\t\tdetail::tvec3<T, P> isX = step(detail::tvec3<T, P>(x0.y, x0.z, x0.w), detail::tvec3<T, P>(x0.x));\r\n\t\tdetail::tvec3<T, P> isYZ = step(detail::tvec3<T, P>(x0.z, x0.w, x0.w), detail::tvec3<T, P>(x0.y, x0.y, x0.z));\r\n\t\t//  i0.x = dot(isX, vec3(1.0));\r\n\t\t//i0.x = isX.x + isX.y + isX.z;\r\n\t\t//i0.yzw = static_cast<T>(1) - isX;\r\n\t\ti0 = detail::tvec4<T, P>(isX.x + isX.y + isX.z, T(1) - isX);\r\n\t\t//  i0.y += dot(isYZ.xy, vec2(1.0));\r\n\t\ti0.y += isYZ.x + isYZ.y;\r\n\t\t//i0.zw += 1.0 - detail::tvec2<T, P>(isYZ.x, isYZ.y);\r\n\t\ti0.z += static_cast<T>(1) - isYZ.x;\r\n\t\ti0.w += static_cast<T>(1) - isYZ.y;\r\n\t\ti0.z += isYZ.z;\r\n\t\ti0.w += static_cast<T>(1) - isYZ.z;\r\n\r\n\t\t// i0 now contains the unique values 0,1,2,3 in each channel\r\n\t\tdetail::tvec4<T, P> i3 = clamp(i0, T(0), T(1));\r\n\t\tdetail::tvec4<T, P> i2 = clamp(i0 - T(1), T(0), T(1));\r\n\t\tdetail::tvec4<T, P> i1 = clamp(i0 - T(2), T(0), T(1));\r\n\r\n\t\t//  x0 = x0 - 0.0 + 0.0 * C.xxxx\r\n\t\t//  x1 = x0 - i1  + 0.0 * C.xxxx\r\n\t\t//  x2 = x0 - i2  + 0.0 * C.xxxx\r\n\t\t//  x3 = x0 - i3  + 0.0 * C.xxxx\r\n\t\t//  x4 = x0 - 1.0 + 4.0 * C.xxxx\r\n\t\tdetail::tvec4<T, P> x1 = x0 - i1 + C.x;\r\n\t\tdetail::tvec4<T, P> x2 = x0 - i2 + C.y;\r\n\t\tdetail::tvec4<T, P> x3 = x0 - i3 + C.z;\r\n\t\tdetail::tvec4<T, P> x4 = x0 + C.w;\r\n\r\n\t\t// Permutations\r\n\t\ti = mod(i, detail::tvec4<T, P>(289)); \r\n\t\tT j0 = detail::permute(detail::permute(detail::permute(detail::permute(i.w) + i.z) + i.y) + i.x);\r\n\t\tdetail::tvec4<T, P> j1 = detail::permute(detail::permute(detail::permute(detail::permute(\r\n\t\t\ti.w + detail::tvec4<T, P>(i1.w, i2.w, i3.w, T(1))) +\r\n\t\t\ti.z + detail::tvec4<T, P>(i1.z, i2.z, i3.z, T(1))) +\r\n\t\t\ti.y + detail::tvec4<T, P>(i1.y, i2.y, i3.y, T(1))) +\r\n\t\t\ti.x + detail::tvec4<T, P>(i1.x, i2.x, i3.x, T(1)));\r\n\r\n\t\t// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope\r\n\t\t// 7*7*6 = 294, which is close to the ring size 17*17 = 289.\r\n\t\tdetail::tvec4<T, P> ip = detail::tvec4<T, P>(T(1) / T(294), T(1) / T(49), T(1) / T(7), T(0));\r\n\r\n\t\tdetail::tvec4<T, P> p0 = gtc::grad4(j0,   ip);\r\n\t\tdetail::tvec4<T, P> p1 = gtc::grad4(j1.x, ip);\r\n\t\tdetail::tvec4<T, P> p2 = gtc::grad4(j1.y, ip);\r\n\t\tdetail::tvec4<T, P> p3 = gtc::grad4(j1.z, ip);\r\n\t\tdetail::tvec4<T, P> p4 = gtc::grad4(j1.w, ip);\r\n\r\n\t\t// Normalise gradients\r\n\t\tdetail::tvec4<T, P> norm = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3)));\r\n\t\tp0 *= norm.x;\r\n\t\tp1 *= norm.y;\r\n\t\tp2 *= norm.z;\r\n\t\tp3 *= norm.w;\r\n\t\tp4 *= detail::taylorInvSqrt(dot(p4, p4));\r\n\r\n\t\t// Mix contributions from the five corners\r\n\t\tdetail::tvec3<T, P> m0 = max(T(0.6) - detail::tvec3<T, P>(dot(x0, x0), dot(x1, x1), dot(x2, x2)), detail::tvec3<T, P>(0));\r\n\t\tdetail::tvec2<T, P> m1 = max(T(0.6) - detail::tvec2<T, P>(dot(x3, x3), dot(x4, x4)             ), detail::tvec2<T, P>(0));\r\n\t\tm0 = m0 * m0;\r\n\t\tm1 = m1 * m1;\r\n\t\treturn T(49) * \r\n\t\t\t(dot(m0 * m0, detail::tvec3<T, P>(dot(p0, x0), dot(p1, x1), dot(p2, x2))) + \r\n\t\t\tdot(m1 * m1, detail::tvec2<T, P>(dot(p3, x3), dot(p4, x4))));\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtc/packing.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_packing\r\n/// @file glm/gtc/packing.hpp\r\n/// @date 2013-08-08 / 2013-08-08\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtc_packing GLM_GTC_packing\r\n/// @ingroup gtc\r\n/// \r\n/// @brief This extension provides a set of function to convert vertors to packed\r\n/// formats.\r\n/// \r\n/// <glm/gtc/packing.hpp> need to be included to use these features.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_packing\r\n#define GLM_GTC_packing\r\n\r\n// Dependency:\r\n#include \"type_precision.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_packing extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_packing\r\n\t/// @{\r\n\r\n\t/// First, converts the normalized floating-point value v into a 8-bit integer value.\r\n\t/// Then, the results are packed into the returned 8-bit unsigned integer.\r\n\t///\r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packUnorm1x8:\tround(clamp(c, 0, +1) * 255.0)\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see uint16 packUnorm2x8(vec2 const & v)\r\n\t/// @see uint32 packUnorm4x8(vec4 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml\">GLSL packUnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint8 packUnorm1x8(float const & v);\r\n\r\n\t/// Convert a single 8-bit integer to a normalized floating-point value.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackUnorm4x8: f / 255.0\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see vec2 unpackUnorm2x8(uint16 p)\r\n\t/// @see vec4 unpackUnorm4x8(uint32 p)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml\">GLSL unpackUnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL float unpackUnorm1x8(uint8 const & p);\r\n\r\n\t/// First, converts each component of the normalized floating-point value v into 8-bit integer values.\r\n\t/// Then, the results are packed into the returned 16-bit unsigned integer.\r\n\t///\r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packUnorm2x8:\tround(clamp(c, 0, +1) * 255.0)\r\n\t///\r\n\t/// The first component of the vector will be written to the least significant bits of the output;\r\n\t/// the last component will be written to the most significant bits.\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see uint8 packUnorm1x8(float const & v)\r\n\t/// @see uint32 packUnorm4x8(vec4 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml\">GLSL packUnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint16 packUnorm2x8(vec2 const & v);\r\n\r\n\t/// First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit unsigned integers. \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned two-component vector.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackUnorm4x8: f / 255.0\r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see float unpackUnorm1x8(uint8 v)\r\n\t/// @see vec4 unpackUnorm4x8(uint32 p)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml\">GLSL unpackUnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL vec2 unpackUnorm2x8(uint16 const & p);\r\n\t\r\n\t/// First, converts the normalized floating-point value v into 8-bit integer value.\r\n\t/// Then, the results are packed into the returned 8-bit unsigned integer.\r\n\t///\r\n\t/// The conversion to fixed point is done as follows:\r\n\t/// packSnorm1x8:\tround(clamp(s, -1, +1) * 127.0)\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see uint16 packSnorm2x8(vec2 const & v)\r\n\t/// @see uint32 packSnorm4x8(vec4 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml\">GLSL packSnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint8 packSnorm1x8(float const & s);\r\n\r\n\t/// First, unpacks a single 8-bit unsigned integer p into a single 8-bit signed integers. \r\n\t/// Then, the value is converted to a normalized floating-point value to generate the returned scalar.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackSnorm1x8: clamp(f / 127.0, -1, +1)\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see vec2 unpackSnorm2x8(uint16 p)\r\n\t/// @see vec4 unpackSnorm4x8(uint32 p)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml\">GLSL unpackSnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL float unpackSnorm1x8(uint8 const & p);\r\n\t\r\n\t/// First, converts each component of the normalized floating-point value v into 8-bit integer values.\r\n\t/// Then, the results are packed into the returned 16-bit unsigned integer.\r\n\t///\r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packSnorm2x8:\tround(clamp(c, -1, +1) * 127.0)\r\n\t///\r\n\t/// The first component of the vector will be written to the least significant bits of the output;\r\n\t/// the last component will be written to the most significant bits.\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see uint8 packSnorm1x8(float const & v)\r\n\t/// @see uint32 packSnorm4x8(vec4 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml\">GLSL packSnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint16 packSnorm2x8(vec2 const & v);\r\n\r\n\t/// First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit signed integers. \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned two-component vector.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackSnorm2x8: clamp(f / 127.0, -1, +1)\r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see float unpackSnorm1x8(uint8 p)\r\n\t/// @see vec4 unpackSnorm4x8(uint32 p)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml\">GLSL unpackSnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL vec2 unpackSnorm2x8(uint16 const & p);\r\n\t\r\n\t/// First, converts the normalized floating-point value v into a 16-bit integer value.\r\n\t/// Then, the results are packed into the returned 16-bit unsigned integer.\r\n\t///\r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packUnorm1x16:\tround(clamp(c, 0, +1) * 65535.0)\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see uint16 packSnorm1x16(float const & v)\r\n\t/// @see uint64 packSnorm4x16(vec4 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml\">GLSL packUnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint16 packUnorm1x16(float const & v);\r\n\r\n\t/// First, unpacks a single 16-bit unsigned integer p into a of 16-bit unsigned integers. \r\n\t/// Then, the value is converted to a normalized floating-point value to generate the returned scalar.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackUnorm1x16: f / 65535.0 \r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see vec2 unpackUnorm2x16(uint32 p)\r\n\t/// @see vec4 unpackUnorm4x16(uint64 p)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml\">GLSL unpackUnorm2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL float unpackUnorm1x16(uint16 const & p);\r\n\r\n\t/// First, converts each component of the normalized floating-point value v into 16-bit integer values.\r\n\t/// Then, the results are packed into the returned 64-bit unsigned integer.\r\n\t///\r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packUnorm4x16:\tround(clamp(c, 0, +1) * 65535.0)\r\n\t///\r\n\t/// The first component of the vector will be written to the least significant bits of the output;\r\n\t/// the last component will be written to the most significant bits.\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see uint16 packUnorm1x16(float const & v)\r\n\t/// @see uint32 packUnorm2x16(vec2 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml\">GLSL packUnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint64 packUnorm4x16(vec4 const & v);\r\n\r\n\t/// First, unpacks a single 64-bit unsigned integer p into four 16-bit unsigned integers. \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackUnormx4x16: f / 65535.0 \r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see float unpackUnorm1x16(uint16 p)\r\n\t/// @see vec2 unpackUnorm2x16(uint32 p)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml\">GLSL unpackUnorm2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL vec4 unpackUnorm4x16(uint64 const & p);\r\n\r\n\t/// First, converts the normalized floating-point value v into 16-bit integer value.\r\n\t/// Then, the results are packed into the returned 16-bit unsigned integer.\r\n\t///\r\n\t/// The conversion to fixed point is done as follows:\r\n\t/// packSnorm1x8:\tround(clamp(s, -1, +1) * 32767.0)\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see uint32 packSnorm2x16(vec2 const & v)\r\n\t/// @see uint64 packSnorm4x16(vec4 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml\">GLSL packSnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint16 packSnorm1x16(float const & v);\r\n\r\n\t/// First, unpacks a single 16-bit unsigned integer p into a single 16-bit signed integers. \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned scalar.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackSnorm1x16: clamp(f / 32767.0, -1, +1)\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see vec2 unpackSnorm2x16(uint32 p)\r\n\t/// @see vec4 unpackSnorm4x16(uint64 p)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm1x16.xml\">GLSL unpackSnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL float unpackSnorm1x16(uint16 const & p);\r\n\r\n\t/// First, converts each component of the normalized floating-point value v into 16-bit integer values.\r\n\t/// Then, the results are packed into the returned 64-bit unsigned integer.\r\n\t///\r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packSnorm2x8:\tround(clamp(c, -1, +1) * 32767.0)\r\n\t///\r\n\t/// The first component of the vector will be written to the least significant bits of the output;\r\n\t/// the last component will be written to the most significant bits.\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see uint16 packSnorm1x16(float const & v)\r\n\t/// @see uint32 packSnorm2x16(vec2 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml\">GLSL packSnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint64 packSnorm4x16(vec4 const & v);\r\n\r\n\t/// First, unpacks a single 64-bit unsigned integer p into four 16-bit signed integers. \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackSnorm4x16: clamp(f / 32767.0, -1, +1)\r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see float unpackSnorm1x16(uint16 p)\r\n\t/// @see vec2 unpackSnorm2x16(uint32 p)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm2x16.xml\">GLSL unpackSnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL vec4 unpackSnorm4x16(uint64 const & p);\r\n\t\r\n\t/// Returns an unsigned integer obtained by converting the components of a floating-point scalar\r\n\t/// to the 16-bit floating-point representation found in the OpenGL Specification,\r\n\t/// and then packing this 16-bit value into a 16-bit unsigned integer.\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see uint32 packHalf2x16(vec2 const & v)\r\n\t/// @see uint64 packHalf4x16(vec4 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml\">GLSL packHalf2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint16 packHalf1x16(float const & v);\r\n\t\r\n\t/// Returns a floating-point scalar with components obtained by unpacking a 16-bit unsigned integer into a 16-bit value,\r\n\t/// interpreted as a 16-bit floating-point number according to the OpenGL Specification,\r\n\t/// and converting it to 32-bit floating-point values.\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see vec2 unpackHalf2x16(uint32 const & v)\r\n\t/// @see vec4 unpackHalf4x16(uint64 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml\">GLSL unpackHalf2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL float unpackHalf1x16(uint16 const & v);\r\n\r\n\t/// Returns an unsigned integer obtained by converting the components of a four-component floating-point vector \r\n\t/// to the 16-bit floating-point representation found in the OpenGL Specification, \r\n\t/// and then packing these four 16-bit values into a 64-bit unsigned integer.\r\n\t/// The first vector component specifies the 16 least-significant bits of the result; \r\n\t/// the forth component specifies the 16 most-significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see uint16 packHalf1x16(float const & v)\r\n\t/// @see uint32 packHalf2x16(vec2 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml\">GLSL packHalf2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint64 packHalf4x16(vec4 const & v);\r\n\t\r\n\t/// Returns a four-component floating-point vector with components obtained by unpacking a 64-bit unsigned integer into four 16-bit values,\r\n\t/// interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification, \r\n\t/// and converting them to 32-bit floating-point values.\r\n\t/// The first component of the vector is obtained from the 16 least-significant bits of v; \r\n\t/// the forth component is obtained from the 16 most-significant bits of v.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see float unpackHalf1x16(uint16 const & v)\r\n\t/// @see vec2 unpackHalf2x16(uint32 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml\">GLSL unpackHalf2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL vec4 unpackHalf4x16(uint64 const & p);\r\n\r\n\t/// Returns an unsigned integer obtained by converting the components of a four-component signed integer vector \r\n\t/// to the 10-10-10-2-bit signed integer representation found in the OpenGL Specification, \r\n\t/// and then packing these four values into a 32-bit unsigned integer.\r\n\t/// The first vector component specifies the 10 least-significant bits of the result; \r\n\t/// the forth component specifies the 2 most-significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see uint32 packI3x10_1x2(uvec4 const & v)\r\n\t/// @see uint32 packSnorm3x10_1x2(vec4 const & v)\r\n\t/// @see uint32 packUnorm3x10_1x2(vec4 const & v)\r\n\t/// @see ivec4 unpackI3x10_1x2(uint32 const & p)\r\n\tGLM_FUNC_DECL uint32 packI3x10_1x2(ivec4 const & v);\r\n\r\n\t/// Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit signed integers. \r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see uint32 packU3x10_1x2(uvec4 const & v)\r\n\t/// @see vec4 unpackSnorm3x10_1x2(uint32 const & p);\r\n\t/// @see uvec4 unpackI3x10_1x2(uint32 const & p);\r\n\tGLM_FUNC_DECL ivec4 unpackI3x10_1x2(uint32 const & p);\r\n\r\n\t/// Returns an unsigned integer obtained by converting the components of a four-component unsigned integer vector \r\n\t/// to the 10-10-10-2-bit unsigned integer representation found in the OpenGL Specification, \r\n\t/// and then packing these four values into a 32-bit unsigned integer.\r\n\t/// The first vector component specifies the 10 least-significant bits of the result; \r\n\t/// the forth component specifies the 2 most-significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see uint32 packI3x10_1x2(ivec4 const & v)\r\n\t/// @see uint32 packSnorm3x10_1x2(vec4 const & v)\r\n\t/// @see uint32 packUnorm3x10_1x2(vec4 const & v)\r\n\t/// @see ivec4 unpackU3x10_1x2(uint32 const & p)\r\n\tGLM_FUNC_DECL uint32 packU3x10_1x2(uvec4 const & v);\r\n\r\n\t/// Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit unsigned integers. \r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see uint32 packU3x10_1x2(uvec4 const & v)\r\n\t/// @see vec4 unpackSnorm3x10_1x2(uint32 const & p);\r\n\t/// @see uvec4 unpackI3x10_1x2(uint32 const & p);\r\n\tGLM_FUNC_DECL uvec4 unpackU3x10_1x2(uint32 const & p);\r\n\r\n\t/// First, converts the first three components of the normalized floating-point value v into 10-bit signed integer values.\r\n\t/// Then, converts the forth component of the normalized floating-point value v into 2-bit signed integer values.\r\n\t/// Then, the results are packed into the returned 32-bit unsigned integer.\r\n\t///\r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packSnorm3x10_1x2(xyz):\tround(clamp(c, -1, +1) * 511.0)\r\n\t/// packSnorm3x10_1x2(w):\tround(clamp(c, -1, +1) * 1.0)\r\n\t///\r\n\t/// The first vector component specifies the 10 least-significant bits of the result; \r\n\t/// the forth component specifies the 2 most-significant bits.\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see vec4 unpackSnorm3x10_1x2(uint32 const & p)\r\n\t/// @see uint32 packUnorm3x10_1x2(vec4 const & v)\r\n\t/// @see uint32 packU3x10_1x2(uvec4 const & v)\r\n\t/// @see uint32 packI3x10_1x2(ivec4 const & v)\r\n\tGLM_FUNC_DECL uint32 packSnorm3x10_1x2(vec4 const & v);\r\n\r\n\t/// First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers. \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackSnorm3x10_1x2(xyz): clamp(f / 511.0, -1, +1)\r\n\t/// unpackSnorm3x10_1x2(w): clamp(f / 511.0, -1, +1)\r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see uint32 packSnorm3x10_1x2(vec4 const & v)\r\n\t/// @see vec4 unpackUnorm3x10_1x2(uint32 const & p))\r\n\t/// @see uvec4 unpackI3x10_1x2(uint32 const & p)\r\n\t/// @see uvec4 unpackU3x10_1x2(uint32 const & p)\r\n\tGLM_FUNC_DECL vec4 unpackSnorm3x10_1x2(uint32 const & p);\r\n\r\n\t/// First, converts the first three components of the normalized floating-point value v into 10-bit unsigned integer values.\r\n\t/// Then, converts the forth component of the normalized floating-point value v into 2-bit signed uninteger values.\r\n\t/// Then, the results are packed into the returned 32-bit unsigned integer.\r\n\t///\r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packUnorm3x10_1x2(xyz):\tround(clamp(c, 0, +1) * 1023.0)\r\n\t/// packUnorm3x10_1x2(w):\tround(clamp(c, 0, +1) * 3.0)\r\n\t///\r\n\t/// The first vector component specifies the 10 least-significant bits of the result; \r\n\t/// the forth component specifies the 2 most-significant bits.\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see vec4 unpackUnorm3x10_1x2(uint32 const & p)\r\n\t/// @see uint32 packUnorm3x10_1x2(vec4 const & v)\r\n\t/// @see uint32 packU3x10_1x2(uvec4 const & v)\r\n\t/// @see uint32 packI3x10_1x2(ivec4 const & v)\r\n\tGLM_FUNC_DECL uint32 packUnorm3x10_1x2(vec4 const & v);\r\n\r\n\t/// First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers. \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackSnorm3x10_1x2(xyz): clamp(f / 1023.0, 0, +1)\r\n\t/// unpackSnorm3x10_1x2(w): clamp(f / 3.0, 0, +1)\r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see uint32 packSnorm3x10_1x2(vec4 const & v)\r\n\t/// @see vec4 unpackInorm3x10_1x2(uint32 const & p))\r\n\t/// @see uvec4 unpackI3x10_1x2(uint32 const & p)\r\n\t/// @see uvec4 unpackU3x10_1x2(uint32 const & p)\r\n\tGLM_FUNC_DECL vec4 unpackUnorm3x10_1x2(uint32 const & p);\r\n\r\n\t/// First, converts the first two components of the normalized floating-point value v into 11-bit signless floating-point values.\r\n\t/// Then, converts the third component of the normalized floating-point value v into a 10-bit signless floating-point value.\r\n\t/// Then, the results are packed into the returned 32-bit unsigned integer.\r\n\t///\r\n\t/// The first vector component specifies the 11 least-significant bits of the result; \r\n\t/// the last component specifies the 10 most-significant bits.\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see vec3 unpackF2x11_1x10(uint32 const & p)\r\n\tGLM_FUNC_DECL uint32 packF2x11_1x10(vec3 const & v);\r\n\r\n\t/// First, unpacks a single 32-bit unsigned integer p into two 11-bit signless floating-point values and one 10-bit signless floating-point value . \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned three-component vector.\r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see uint32 packF2x11_1x10(vec3 const & v)\r\n\tGLM_FUNC_DECL vec3 unpackF2x11_1x10(uint32 const & p);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"packing.inl\"\r\n\r\n#endif//GLM_GTC_packing\r\n\r\n"
  },
  {
    "path": "cpu/glm/gtc/packing.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_packing\r\n/// @file glm/gtc/packing.inl\r\n/// @date 2013-08-08 / 2013-08-08\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../common.hpp\"\r\n#include \"../vec2.hpp\"\r\n#include \"../vec3.hpp\"\r\n#include \"../vec4.hpp\"\r\n#include \"../detail/type_half.hpp\"\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\tGLM_FUNC_QUALIFIER glm::uint16 float2half(glm::uint32 const & f)\r\n\t{\r\n\t\t// 10 bits    =>                         EE EEEFFFFF\r\n\t\t// 11 bits    =>                        EEE EEFFFFFF\r\n\t\t// Half bits  =>                   SEEEEEFF FFFFFFFF\r\n\t\t// Float bits => SEEEEEEE EFFFFFFF FFFFFFFF FFFFFFFF\r\n\r\n\t\t// 0x00007c00 => 00000000 00000000 01111100 00000000\r\n\t\t// 0x000003ff => 00000000 00000000 00000011 11111111\r\n\t\t// 0x38000000 => 00111000 00000000 00000000 00000000\r\n\t\t// 0x7f800000 => 01111111 10000000 00000000 00000000\r\n\t\t// 0x00008000 => 00000000 00000000 10000000 00000000\r\n\t\treturn\r\n\t\t\t((f >> 16) & 0x8000) | // sign\r\n\t\t\t((((f & 0x7f800000) - 0x38000000) >> 13) & 0x7c00) | // exponential\r\n\t\t\t((f >> 13) & 0x03ff); // Mantissa\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER glm::uint32 float2packed11(glm::uint32 const & f)\r\n\t{\r\n\t\t// 10 bits    =>                         EE EEEFFFFF\r\n\t\t// 11 bits    =>                        EEE EEFFFFFF\r\n\t\t// Half bits  =>                   SEEEEEFF FFFFFFFF\r\n\t\t// Float bits => SEEEEEEE EFFFFFFF FFFFFFFF FFFFFFFF\r\n\r\n\t\t// 0x000007c0 => 00000000 00000000 00000111 11000000\r\n\t\t// 0x00007c00 => 00000000 00000000 01111100 00000000\r\n\t\t// 0x000003ff => 00000000 00000000 00000011 11111111\r\n\t\t// 0x38000000 => 00111000 00000000 00000000 00000000\r\n\t\t// 0x7f800000 => 01111111 10000000 00000000 00000000\r\n\t\t// 0x00008000 => 00000000 00000000 10000000 00000000\r\n\t\treturn\r\n\t\t\t((((f & 0x7f800000) - 0x38000000) >> 17) & 0x07c0) | // exponential\r\n\t\t\t((f >> 17) & 0x003f); // Mantissa\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER glm::uint32 packed11ToFloat(glm::uint32 const & p)\r\n\t{\r\n\t\t// 10 bits    =>                         EE EEEFFFFF\r\n\t\t// 11 bits    =>                        EEE EEFFFFFF\r\n\t\t// Half bits  =>                   SEEEEEFF FFFFFFFF\r\n\t\t// Float bits => SEEEEEEE EFFFFFFF FFFFFFFF FFFFFFFF\r\n\r\n\t\t// 0x000007c0 => 00000000 00000000 00000111 11000000\r\n\t\t// 0x00007c00 => 00000000 00000000 01111100 00000000\r\n\t\t// 0x000003ff => 00000000 00000000 00000011 11111111\r\n\t\t// 0x38000000 => 00111000 00000000 00000000 00000000\r\n\t\t// 0x7f800000 => 01111111 10000000 00000000 00000000\r\n\t\t// 0x00008000 => 00000000 00000000 10000000 00000000\r\n\t\treturn\r\n\t\t\t((((p & 0x07c0) << 17) + 0x38000000) & 0x7f800000) | // exponential\r\n\t\t\t((p & 0x003f) << 17); // Mantissa\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER glm::uint32 float2packed10(glm::uint32 const & f)\r\n\t{\r\n\t\t// 10 bits    =>                         EE EEEFFFFF\r\n\t\t// 11 bits    =>                        EEE EEFFFFFF\r\n\t\t// Half bits  =>                   SEEEEEFF FFFFFFFF\r\n\t\t// Float bits => SEEEEEEE EFFFFFFF FFFFFFFF FFFFFFFF\r\n\r\n\t\t// 0x0000001F => 00000000 00000000 00000000 00011111\r\n\t\t// 0x0000003F => 00000000 00000000 00000000 00111111\r\n\t\t// 0x000003E0 => 00000000 00000000 00000011 11100000\r\n\t\t// 0x000007C0 => 00000000 00000000 00000111 11000000\r\n\t\t// 0x00007C00 => 00000000 00000000 01111100 00000000\r\n\t\t// 0x000003FF => 00000000 00000000 00000011 11111111\r\n\t\t// 0x38000000 => 00111000 00000000 00000000 00000000\r\n\t\t// 0x7f800000 => 01111111 10000000 00000000 00000000\r\n\t\t// 0x00008000 => 00000000 00000000 10000000 00000000\r\n\t\treturn\r\n\t\t\t((((f & 0x7f800000) - 0x38000000) >> 18) & 0x03E0) | // exponential\r\n\t\t\t((f >> 18) & 0x001f); // Mantissa\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER glm::uint32 packed10ToFloat(glm::uint32 const & p)\r\n\t{\r\n\t\t// 10 bits    =>                         EE EEEFFFFF\r\n\t\t// 11 bits    =>                        EEE EEFFFFFF\r\n\t\t// Half bits  =>                   SEEEEEFF FFFFFFFF\r\n\t\t// Float bits => SEEEEEEE EFFFFFFF FFFFFFFF FFFFFFFF\r\n\r\n\t\t// 0x0000001F => 00000000 00000000 00000000 00011111\r\n\t\t// 0x0000003F => 00000000 00000000 00000000 00111111\r\n\t\t// 0x000003E0 => 00000000 00000000 00000011 11100000\r\n\t\t// 0x000007C0 => 00000000 00000000 00000111 11000000\r\n\t\t// 0x00007C00 => 00000000 00000000 01111100 00000000\r\n\t\t// 0x000003FF => 00000000 00000000 00000011 11111111\r\n\t\t// 0x38000000 => 00111000 00000000 00000000 00000000\r\n\t\t// 0x7f800000 => 01111111 10000000 00000000 00000000\r\n\t\t// 0x00008000 => 00000000 00000000 10000000 00000000\r\n\t\treturn\r\n\t\t\t((((p & 0x03E0) << 18) + 0x38000000) & 0x7f800000) | // exponential\r\n\t\t\t((p & 0x001f) << 18); // Mantissa\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER glm::uint half2float(glm::uint const & h)\r\n\t{\r\n\t\treturn ((h & 0x8000) << 16) | ((( h & 0x7c00) + 0x1C000) << 13) | ((h & 0x03FF) << 13);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER glm::uint floatTo11bit(float x)\r\n\t{\r\n\t\tif(x == 0.0f)\r\n\t\t\treturn 0;\r\n\t\telse if(glm::isnan(x))\r\n\t\t\treturn ~0;\r\n\t\telse if(glm::isinf(x))\r\n\t\t\treturn 0x1f << 6;\r\n\r\n\t\treturn float2packed11(reinterpret_cast<uint&>(x));\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER float packed11bitToFloat(glm::uint x)\r\n\t{\r\n\t\tif(x == 0)\r\n\t\t\treturn 0.0f;\r\n\t\telse if(x == ((1 << 11) - 1))\r\n\t\t\treturn ~0;//NaN\r\n\t\telse if(x == (0x1f << 6))\r\n\t\t\treturn ~0;//Inf\r\n\r\n\t\tuint result = packed11ToFloat(x);\r\n\t\treturn reinterpret_cast<float&>(result);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER glm::uint floatTo10bit(float x)\r\n\t{\r\n\t\tif(x == 0.0f)\r\n\t\t\treturn 0;\r\n\t\telse if(glm::isnan(x))\r\n\t\t\treturn ~0;\r\n\t\telse if(glm::isinf(x))\r\n\t\t\treturn 0x1f << 5;\r\n\r\n\t\treturn float2packed10(reinterpret_cast<uint&>(x));\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER float packed10bitToFloat(glm::uint x)\r\n\t{\r\n\t\tif(x == 0)\r\n\t\t\treturn 0.0f;\r\n\t\telse if(x == ((1 << 10) - 1))\r\n\t\t\treturn ~0;//NaN\r\n\t\telse if(x == (0x1f << 5))\r\n\t\t\treturn ~0;//Inf\r\n\r\n\t\tuint result = packed10ToFloat(x);\r\n\t\treturn reinterpret_cast<float&>(result);\r\n\t}\r\n\r\n//\tGLM_FUNC_QUALIFIER glm::uint f11_f11_f10(float x, float y, float z)\r\n//\t{\r\n//\t\treturn ((floatTo11bit(x) & ((1 << 11) - 1)) << 0) |  ((floatTo11bit(y) & ((1 << 11) - 1)) << 11) | ((floatTo10bit(z) & ((1 << 10) - 1)) << 22);\r\n//\t}\r\n\r\n\tunion u10u10u10u2\r\n\t{\r\n\t\tstruct\r\n\t\t{\r\n\t\t\tuint x : 10;\r\n\t\t\tuint y : 10;\r\n\t\t\tuint z : 10;\r\n\t\t\tuint w : 2;\r\n\t\t} data;\r\n\t\tuint32 pack;\r\n\t};\r\n\r\n\tunion i10i10i10i2\r\n\t{\r\n\t\tstruct\r\n\t\t{\r\n\t\t\tint x : 10;\r\n\t\t\tint y : 10;\r\n\t\t\tint z : 10;\r\n\t\t\tint w : 2;\r\n\t\t} data;\r\n\t\tuint32 pack;\r\n\t};\r\n\r\n}//namespace detail\r\n\r\n\tGLM_FUNC_QUALIFIER uint8 packUnorm1x8(float const & v)\r\n\t{\r\n\t\treturn static_cast<uint8>(round(clamp(v, 0.0f, 1.0f) * 255.0f));\r\n\t}\r\n\t\r\n\tGLM_FUNC_QUALIFIER float unpackUnorm1x8(uint8 const & p)\r\n\t{\r\n\t\tfloat Unpack(static_cast<float>(p));\r\n\t\treturn Unpack * static_cast<float>(0.0039215686274509803921568627451); // 1 / 255\r\n\t}\r\n\t\r\n\tGLM_FUNC_QUALIFIER uint16 packUnorm2x8(vec2 const & v)\r\n\t{\r\n\t\tu8vec2 Topack(round(clamp(v, 0.0f, 1.0f) * 255.0f));\r\n\t\tuint16* Packed = reinterpret_cast<uint16*>(&Topack);\r\n\t\treturn *Packed;\r\n\t}\r\n\t\r\n\tGLM_FUNC_QUALIFIER vec2 unpackUnorm2x8(uint16 const & p)\r\n\t{\r\n\t\tu8vec2* Unpacked = reinterpret_cast<u8vec2*>(const_cast<uint16*>(&p));\r\n\t\treturn vec2(*Unpacked) * float(0.0039215686274509803921568627451); // 1 / 255\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint8 packSnorm1x8(float const & v)\r\n\t{\r\n\t\tint8 Topack(static_cast<int8>(round(clamp(v ,-1.0f, 1.0f) * 127.0f)));\r\n\t\tuint8* Packed = reinterpret_cast<uint8*>(&Topack);\r\n\t\treturn *Packed;\r\n\t}\r\n\t\r\n\tGLM_FUNC_QUALIFIER float unpackSnorm1x8(uint8 const & p)\r\n\t{\r\n\t\tfloat Unpack(static_cast<float>(*const_cast<uint8*>(&p)));\r\n\t\treturn clamp(\r\n\t\t\tUnpack * 0.00787401574803149606299212598425f, // 1.0f / 127.0f\r\n\t\t\t-1.0f, 1.0f);\r\n\t}\r\n\t\r\n\tGLM_FUNC_QUALIFIER uint16 packSnorm2x8(vec2 const & v)\r\n\t{\r\n\t\ti8vec2 Topack(round(clamp(v ,-1.0f, 1.0f) * 127.0f));\r\n\t\tuint16* Packed = reinterpret_cast<uint16*>(&Topack);\r\n\t\treturn *Packed;\r\n\t}\r\n\t\r\n\tGLM_FUNC_QUALIFIER vec2 unpackSnorm2x8(uint16 const & p)\r\n\t{\r\n\t\ti8vec2* Unpack = reinterpret_cast<i8vec2*>(const_cast<uint16*>(&p));\r\n\t\treturn clamp(\r\n\t\t\tvec2(*Unpack) * 0.00787401574803149606299212598425f, // 1.0f / 127.0f\r\n\t\t\t-1.0f, 1.0f);\r\n\t}\r\n\t\r\n\tGLM_FUNC_QUALIFIER uint16 packUnorm1x16(float const & s)\r\n\t{\r\n\t\treturn static_cast<uint16>(round(clamp(s, 0.0f, 1.0f) * 65535.0f));\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER float unpackUnorm1x16(uint16 const & p)\r\n\t{\r\n\t\tfloat Unpack = static_cast<float>(*const_cast<uint16*>(&p));\r\n\t\treturn Unpack * 1.5259021896696421759365224689097e-5f; // 1.0 / 65535.0\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint64 packUnorm4x16(vec4 const & v)\r\n\t{\r\n\t\tu16vec4 Topack(round(clamp(v , 0.0f, 1.0f) * 65535.0f));\r\n\t\tuint64* Packed = reinterpret_cast<uint64*>(&Topack);\r\n\t\treturn *Packed;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER vec4 unpackUnorm4x16(uint64 const & p)\r\n\t{\r\n\t\tu16vec4* Unpack = reinterpret_cast<u16vec4*>(const_cast<uint64*>(&p));\r\n\t\treturn vec4(*Unpack) * 1.5259021896696421759365224689097e-5f; // 1.0 / 65535.0\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint16 packSnorm1x16(float const & v)\r\n\t{\r\n\t\tint16 Topack = static_cast<int16>(round(clamp(v ,-1.0f, 1.0f) * 32767.0f));\r\n\t\tuint16* Packed = reinterpret_cast<uint16*>(&Topack);\r\n\t\treturn *Packed;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER float unpackSnorm1x16(uint16 const & p)\r\n\t{\r\n\t\tfloat Unpack = static_cast<float>(*const_cast<uint16*>(&p));\r\n\t\treturn clamp(\r\n\t\t\tUnpack * 3.0518509475997192297128208258309e-5f, //1.0f / 32767.0f, \r\n\t\t\t-1.0f, 1.0f);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint64 packSnorm4x16(vec4 const & v)\r\n\t{\r\n\t\ti16vec4 Topack = static_cast<i16vec4>(round(clamp(v ,-1.0f, 1.0f) * 32767.0f));\r\n\t\tuint64* Packed = reinterpret_cast<uint64*>(&Topack);\r\n\t\treturn *Packed;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER vec4 unpackSnorm4x16(uint64 const & p)\r\n\t{\r\n\t\ti16vec4* Unpack(reinterpret_cast<i16vec4*>(const_cast<uint64*>(&p)));\r\n\t\treturn clamp(\r\n\t\t\tvec4(*Unpack) * 3.0518509475997192297128208258309e-5f, //1.0f / 32767.0f,\r\n\t\t\t-1.0f, 1.0f);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint16 packHalf1x16(float const & v)\r\n\t{\r\n\t\tint16 Topack = detail::toFloat16(v);\r\n\t\tuint16* Packed = reinterpret_cast<uint16*>(&Topack);\r\n\t\treturn *Packed;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER float unpackHalf1x16(uint16 const & v)\r\n\t{\r\n\t\tint16* Unpack = reinterpret_cast<int16*>(const_cast<uint16*>(&v));\r\n\t\treturn detail::toFloat32(*Unpack);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint64 packHalf4x16(glm::vec4 const & v)\r\n\t{\r\n\t\ti16vec4 Unpack(\r\n\t\t\tdetail::toFloat16(v.x),\r\n\t\t\tdetail::toFloat16(v.y),\r\n\t\t\tdetail::toFloat16(v.z),\r\n\t\t\tdetail::toFloat16(v.w));\r\n\r\n\t\tuint64* Packed = reinterpret_cast<uint64*>(&Unpack);\r\n\t\treturn *Packed;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER glm::vec4 unpackHalf4x16(uint64 const & v)\r\n\t{\r\n\t\ti16vec4* p = reinterpret_cast<i16vec4*>(const_cast<uint64*>(&v));\r\n\t\ti16vec4 Unpack(*p);\r\n\t\r\n\t\treturn vec4(\r\n\t\t\tdetail::toFloat32(Unpack.x), \r\n\t\t\tdetail::toFloat32(Unpack.y), \r\n\t\t\tdetail::toFloat32(Unpack.z), \r\n\t\t\tdetail::toFloat32(Unpack.w));\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint32 packI3x10_1x2(ivec4 const & v)\r\n\t{\r\n\t\tdetail::i10i10i10i2 Result;\r\n\t\tResult.data.x = v.x;\r\n\t\tResult.data.y = v.y;\r\n\t\tResult.data.z = v.z;\r\n\t\tResult.data.w = v.w;\r\n\t\treturn Result.pack; \r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER ivec4 unpackI3x10_1x2(uint32 const & v)\r\n\t{\r\n\t\tdetail::i10i10i10i2 Unpack;\r\n\t\tUnpack.pack = v;\r\n\t\treturn ivec4(\r\n\t\t\tUnpack.data.x,\r\n\t\t\tUnpack.data.y,\r\n\t\t\tUnpack.data.z,\r\n\t\t\tUnpack.data.w);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint32 packU3x10_1x2(uvec4 const & v)\r\n\t{\r\n\t\tdetail::u10u10u10u2 Result;\r\n\t\tResult.data.x = v.x;\r\n\t\tResult.data.y = v.y;\r\n\t\tResult.data.z = v.z;\r\n\t\tResult.data.w = v.w;\r\n\t\treturn Result.pack; \r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uvec4 unpackU3x10_1x2(uint32 const & v)\r\n\t{\r\n\t\tdetail::u10u10u10u2 Unpack;\r\n\t\tUnpack.pack = v;\r\n\t\treturn uvec4(\r\n\t\t\tUnpack.data.x,\r\n\t\t\tUnpack.data.y,\r\n\t\t\tUnpack.data.z,\r\n\t\t\tUnpack.data.w);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint32 packSnorm3x10_1x2(vec4 const & v)\r\n\t{\r\n\t\tdetail::i10i10i10i2 Result;\r\n\t\tResult.data.x = int(round(clamp(v.x,-1.0f, 1.0f) * 511.f));\r\n\t\tResult.data.y = int(round(clamp(v.y,-1.0f, 1.0f) * 511.f));\r\n\t\tResult.data.z = int(round(clamp(v.z,-1.0f, 1.0f) * 511.f));\r\n\t\tResult.data.w = int(round(clamp(v.w,-1.0f, 1.0f) *   1.f));\r\n\t\treturn Result.pack;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER vec4 unpackSnorm3x10_1x2(uint32 const & v)\r\n\t{\r\n\t\tdetail::i10i10i10i2 Unpack;\r\n\t\tUnpack.pack = v;\r\n\t\tvec4 Result;\r\n\t\tResult.x = clamp(float(Unpack.data.x) / 511.f, -1.0f, 1.0f);\r\n\t\tResult.y = clamp(float(Unpack.data.y) / 511.f, -1.0f, 1.0f);\r\n\t\tResult.z = clamp(float(Unpack.data.z) / 511.f, -1.0f, 1.0f);\r\n\t\tResult.w = clamp(float(Unpack.data.w) /   1.f, -1.0f, 1.0f);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint32 packUnorm3x10_1x2(vec4 const & v)\r\n\t{\r\n\t\tdetail::i10i10i10i2 Result;\r\n\t\tResult.data.x = int(round(clamp(v.x, 0.0f, 1.0f) * 1023.f));\r\n\t\tResult.data.y = int(round(clamp(v.y, 0.0f, 1.0f) * 1023.f));\r\n\t\tResult.data.z = int(round(clamp(v.z, 0.0f, 1.0f) * 1023.f));\r\n\t\tResult.data.w = int(round(clamp(v.w, 0.0f, 1.0f) *    3.f));\r\n\t\treturn Result.pack;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER vec4 unpackUnorm3x10_1x2(uint32 const & v)\r\n\t{\r\n\t\tdetail::i10i10i10i2 Unpack;\r\n\t\tUnpack.pack = v;\r\n\t\tvec4 Result;\r\n\t\tResult.x = float(Unpack.data.x) / 1023.f;\r\n\t\tResult.y = float(Unpack.data.y) / 1023.f;\r\n\t\tResult.z = float(Unpack.data.z) / 1023.f;\r\n\t\tResult.w = float(Unpack.data.w) /   3.f;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint32 packF2x11_1x10(vec3 const & v)\r\n\t{\r\n\t\treturn \r\n\t\t\t((detail::floatTo11bit(v.x) & ((1 << 11) - 1)) <<  0) |\r\n\t\t\t((detail::floatTo11bit(v.y) & ((1 << 11) - 1)) << 11) |\r\n\t\t\t((detail::floatTo10bit(v.z) & ((1 << 10) - 1)) << 22);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER vec3 unpackF2x11_1x10(uint32 const & v)\r\n\t{\r\n\t\treturn vec3(\r\n\t\t\tdetail::packed11bitToFloat(v >> 0), \r\n\t\t\tdetail::packed11bitToFloat(v >> 11), \r\n\t\t\tdetail::packed10bitToFloat(v >> 22));\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtc/quaternion.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_quaternion\r\n/// @file glm/gtc/quaternion.hpp\r\n/// @date 2009-05-21 / 2012-12-20\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_half_float (dependence)\r\n/// @see gtc_constants (dependence)\r\n///\r\n/// @defgroup gtc_quaternion GLM_GTC_quaternion\r\n/// @ingroup gtc\r\n/// \r\n/// @brief Defines a templated quaternion type and several quaternion operations.\r\n/// \r\n/// <glm/gtc/quaternion.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_quaternion\r\n#define GLM_GTC_quaternion\r\n\r\n// Dependency:\r\n#include \"../mat3x3.hpp\"\r\n#include \"../mat4x4.hpp\"\r\n#include \"../vec3.hpp\"\r\n#include \"../vec4.hpp\"\r\n#include \"../gtc/constants.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_quaternion extension included\")\r\n#endif\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tquat\r\n\t{\r\n\t\tenum ctor{null};\r\n\r\n\t\ttypedef tvec4<bool, P> bool_type;\r\n\r\n\tpublic:\r\n\t\tT x, y, z, w;\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\t\t// Constructors\r\n\t\tGLM_FUNC_DECL tquat();\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tquat(\r\n\t\t\ttquat<U, Q> const & q);\r\n\t\tGLM_FUNC_DECL tquat(\r\n\t\t\tT const & s,\r\n\t\t\ttvec3<T, P> const & v);\r\n\t\tGLM_FUNC_DECL tquat(\r\n\t\t\tT const & w,\r\n\t\t\tT const & x,\r\n\t\t\tT const & y,\r\n\t\t\tT const & z);\r\n\r\n\t\t// Convertions\r\n\r\n\t\t/// Create a quaternion from two normalized axis\r\n\t\t/// \r\n\t\t/// @param u A first normalized axis\r\n\t\t/// @param v A second normalized axis\r\n\t\t/// @see gtc_quaternion\r\n\t\t/// @see http://lolengine.net/blog/2013/09/18/beautiful-maths-quaternion-from-vectors\r\n\t\tGLM_FUNC_DECL explicit tquat(\r\n\t\t\tdetail::tvec3<T, P> const & u,\r\n\t\t\tdetail::tvec3<T, P> const & v);\r\n\t\t/// Build a quaternion from euler angles (pitch, yaw, roll), in radians.\r\n\t\tGLM_FUNC_DECL explicit tquat(\r\n\t\t\ttvec3<T, P> const & eulerAngles);\r\n\t\tGLM_FUNC_DECL explicit tquat(\r\n\t\t\ttmat3x3<T, P> const & m);\r\n\t\tGLM_FUNC_DECL explicit tquat(\r\n\t\t\ttmat4x4<T, P> const & m);\r\n\r\n\t\t// Accesses\r\n\t\tGLM_FUNC_DECL T & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL T const & operator[](length_t i) const;\r\n\r\n\t\t// Operators\r\n\t\tGLM_FUNC_DECL tquat<T, P> & operator+=(tquat<T, P> const & q);\r\n\t\tGLM_FUNC_DECL tquat<T, P> & operator*=(tquat<T, P> const & q);\r\n\t\tGLM_FUNC_DECL tquat<T, P> & operator*=(T const & s);\r\n\t\tGLM_FUNC_DECL tquat<T, P> & operator/=(T const & s);\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> operator- (\r\n\t\tdetail::tquat<T, P> const & q);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> operator+ (\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tquat<T, P> const & p);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> operator* (\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tquat<T, P> const & p);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec3<T, P> operator* (\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec3<T, P> operator* (\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tdetail::tquat<T, P> const & q);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec4<T, P> operator* (\r\n\t\tdetail::tquat<T, P> const & q, \r\n\t\tdetail::tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec4<T, P> operator* (\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tdetail::tquat<T, P> const & q);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> operator* (\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> operator* (\r\n\t\tT const & s,\r\n\t\tdetail::tquat<T, P> const & q);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> operator/ (\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tT const & s);\r\n\r\n} //namespace detail\r\n\r\n\t/// @addtogroup gtc_quaternion\r\n\t/// @{\r\n\r\n\t/// Returns the length of the quaternion.\r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL T length(\r\n\t\tdetail::tquat<T, P> const & q);\r\n\r\n\t/// Returns the normalized quaternion.\r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> normalize(\r\n\t\tdetail::tquat<T, P> const & q);\r\n\t\t\r\n\t/// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ...\r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P, template <typename, precision> class quatType>\r\n\tGLM_FUNC_DECL T dot(\r\n\t\tquatType<T, P> const & x,\r\n\t\tquatType<T, P> const & y);\r\n\r\n\t/// Spherical linear interpolation of two quaternions.\r\n\t/// The interpolation is oriented and the rotation is performed at constant speed.\r\n\t/// For short path spherical linear interpolation, use the slerp function.\r\n\t/// \r\n\t/// @param x A quaternion\r\n\t/// @param y A quaternion\r\n\t/// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1].\r\n\t/// @tparam T Value type used to build the quaternion. Supported: half, float or double.\r\n\t/// @see gtc_quaternion\r\n\t/// @see - slerp(detail::tquat<T, P> const & x, detail::tquat<T, P> const & y, T const & a)\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> mix(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y,\r\n\t\tT const & a);\r\n\r\n\t/// Linear interpolation of two quaternions.\r\n\t/// The interpolation is oriented.\r\n\t/// \r\n\t/// @param x A quaternion\r\n\t/// @param y A quaternion\r\n\t/// @param a Interpolation factor. The interpolation is defined in the range [0, 1].\r\n\t/// @tparam T Value type used to build the quaternion. Supported: half, float or double.\r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> lerp(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y,\r\n\t\tT const & a);\r\n\r\n\t/// Spherical linear interpolation of two quaternions.\r\n\t/// The interpolation always take the short path and the rotation is performed at constant speed.\r\n\t/// \r\n\t/// @param x A quaternion\r\n\t/// @param y A quaternion\r\n\t/// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1].\r\n\t/// @tparam T Value type used to build the quaternion. Supported: half, float or double.\r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> slerp(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y,\r\n\t\tT const & a);\r\n\r\n\t/// Returns the q conjugate.\r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> conjugate(\r\n\t\tdetail::tquat<T, P> const & q);\r\n\r\n\t/// Returns the q inverse.\r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> inverse(\r\n\t\tdetail::tquat<T, P> const & q);\r\n\r\n\t/// Rotates a quaternion from a vector of 3 components axis and an angle.\r\n\t/// \r\n\t/// @param q Source orientation\r\n\t/// @param angle Angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.\r\n\t/// @param axis Axis of the rotation\r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> rotate(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & axis);\r\n\r\n\t/// Returns euler angles, yitch as x, yaw as y, roll as z.\r\n\t/// The result is expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise.\r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec3<T, P> eulerAngles(\r\n\t\tdetail::tquat<T, P> const & x);\r\n\r\n\t/// Returns roll value of euler angles expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL T roll(detail::tquat<T, P> const & x);\r\n\r\n\t/// Returns pitch value of euler angles expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL T pitch(detail::tquat<T, P> const & x);\r\n\r\n\t/// Returns yaw value of euler angles expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL T yaw(detail::tquat<T, P> const & x);\r\n\r\n\t/// Converts a quaternion to a 3 * 3 matrix.\r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tmat3x3<T, P> mat3_cast(\r\n\t\tdetail::tquat<T, P> const & x);\r\n\r\n\t/// Converts a quaternion to a 4 * 4 matrix.\r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, P> mat4_cast(\r\n\t\tdetail::tquat<T, P> const & x);\r\n\r\n\t/// Converts a 3 * 3 matrix to a quaternion.\r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> quat_cast(\r\n\t\tdetail::tmat3x3<T, P> const & x);\r\n\r\n\t/// Converts a 4 * 4 matrix to a quaternion.\r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> quat_cast(\r\n\t\tdetail::tmat4x4<T, P> const & x);\r\n\r\n\t/// Returns the quaternion rotation angle.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL T angle(detail::tquat<T, P> const & x);\r\n\r\n\t/// Returns the q rotation axis.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec3<T, P> axis(\r\n\t\tdetail::tquat<T, P> const & x);\r\n\r\n\t/// Build a quaternion from an angle and a normalized axis.\r\n\t///\r\n\t/// @param angle Angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.\r\n\t/// @param axis Axis of the quaternion, must be normalized.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> angleAxis(\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & axis);\r\n\r\n\t/// Returns the component-wise comparison result of x < y.\r\n\t/// \r\n\t/// @tparam quatType Floating-point quaternion types.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec4<bool, P> lessThan(\r\n\t\tdetail::tquat<T, P> const & x, \r\n\t\tdetail::tquat<T, P> const & y);\r\n\r\n\t/// Returns the component-wise comparison of result x <= y.\r\n\t///\r\n\t/// @tparam quatType Floating-point quaternion types.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec4<bool, P> lessThanEqual(\r\n\t\tdetail::tquat<T, P> const & x, \r\n\t\tdetail::tquat<T, P> const & y);\r\n\r\n\t/// Returns the component-wise comparison of result x > y.\r\n\t///\r\n\t/// @tparam quatType Floating-point quaternion types.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec4<bool, P> greaterThan(\r\n\t\tdetail::tquat<T, P> const & x, \r\n\t\tdetail::tquat<T, P> const & y);\r\n\r\n\t/// Returns the component-wise comparison of result x >= y.\r\n\t///\r\n\t/// @tparam quatType Floating-point quaternion types.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec4<bool, P> greaterThanEqual(\r\n\t\tdetail::tquat<T, P> const & x, \r\n\t\tdetail::tquat<T, P> const & y);\r\n\r\n\t/// Returns the component-wise comparison of result x == y.\r\n\t///\r\n\t/// @tparam quatType Floating-point quaternion types.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec4<bool, P> equal(\r\n\t\tdetail::tquat<T, P> const & x, \r\n\t\tdetail::tquat<T, P> const & y);\r\n\r\n\t/// Returns the component-wise comparison of result x != y.\r\n\t/// \r\n\t/// @tparam quatType Floating-point quaternion types.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec4<bool, P> notEqual(\r\n\t\tdetail::tquat<T, P> const & x, \r\n\t\tdetail::tquat<T, P> const & y);\r\n\r\n\t/// @}\r\n} //namespace glm\r\n\r\n#include \"quaternion.inl\"\r\n\r\n#endif//GLM_GTC_quaternion\r\n"
  },
  {
    "path": "cpu/glm/gtc/quaternion.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_quaternion\r\n/// @file glm/gtc/quaternion.inl\r\n/// @date 2009-05-21 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../trigonometric.hpp\"\r\n#include \"../geometric.hpp\"\r\n#include \"../exponential.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tquat<T, P>::length() const\r\n\t{\r\n\t\treturn 4;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tquat<T, P>::tquat() :\r\n\t\tx(0),\r\n\t\ty(0),\r\n\t\tz(0),\r\n\t\tw(1)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tquat<T, P>::tquat\r\n\t(\r\n\t\ttquat<U, Q> const & q\r\n\t) :\r\n\t\tx(q.x),\r\n\t\ty(q.y),\r\n\t\tz(q.z),\r\n\t\tw(q.w)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tquat<T, P>::tquat\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec3<T, P> const & v\r\n\t) :\r\n\t\tx(v.x),\r\n\t\ty(v.y),\r\n\t\tz(v.z),\r\n\t\tw(s)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tquat<T, P>::tquat\r\n\t(\r\n\t\tT const & w,\r\n\t\tT const & x,\r\n\t\tT const & y,\r\n\t\tT const & z\r\n\t) :\r\n\t\tx(x),\r\n\t\ty(y),\r\n\t\tz(z),\r\n\t\tw(w)\r\n\t{}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// tquat conversions\r\n\r\n\t//template <typename valType> \r\n\t//GLM_FUNC_QUALIFIER tquat<valType>::tquat\r\n\t//(\r\n\t//\tvalType const & pitch,\r\n\t//\tvalType const & yaw,\r\n\t//\tvalType const & roll\r\n\t//)\r\n\t//{\r\n\t//\ttvec3<valType> eulerAngle(pitch * valType(0.5), yaw * valType(0.5), roll * valType(0.5));\r\n\t//\ttvec3<valType> c = glm::cos(eulerAngle * valType(0.5));\r\n\t//\ttvec3<valType> s = glm::sin(eulerAngle * valType(0.5));\r\n\t//\t\r\n\t//\tthis->w = c.x * c.y * c.z + s.x * s.y * s.z;\r\n\t//\tthis->x = s.x * c.y * c.z - c.x * s.y * s.z;\r\n\t//\tthis->y = c.x * s.y * c.z + s.x * c.y * s.z;\r\n\t//\tthis->z = c.x * c.y * s.z - s.x * s.y * c.z;\r\n\t//}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tquat<T, P>::tquat\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & u,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> w = cross(u, v);\r\n\t\tT Dot = detail::compute_dot<detail::tvec3, T, P>::call(u, v);\r\n\t\tdetail::tquat<T, P> q(T(1) + Dot, w.x, w.y, w.z);\r\n\r\n\t\t*this = normalize(q);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tquat<T, P>::tquat\r\n\t(\r\n\t\ttvec3<T, P> const & eulerAngle\r\n\t)\r\n\t{\r\n\t\ttvec3<T, P> c = glm::cos(eulerAngle * T(0.5));\r\n\t\ttvec3<T, P> s = glm::sin(eulerAngle * T(0.5));\r\n\t\t\r\n\t\tthis->w = c.x * c.y * c.z + s.x * s.y * s.z;\r\n\t\tthis->x = s.x * c.y * c.z - c.x * s.y * s.z;\r\n\t\tthis->y = c.x * s.y * c.z + s.x * c.y * s.z;\r\n\t\tthis->z = c.x * c.y * s.z - s.x * s.y * c.z;\t\t\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tquat<T, P>::tquat\r\n\t(\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\t*this = quat_cast(m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tquat<T, P>::tquat\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\t*this = quat_cast(m);\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// tquat<T, P> accesses\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER T & tquat<T, P>::operator[] (length_t i)\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&x)[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const & tquat<T, P>::operator[] (length_t i) const\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&x)[i];\r\n\t}\r\n}//namespace detail\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> conjugate\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn detail::tquat<T, P>(q.w, -q.x, -q.y, -q.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> inverse\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn conjugate(q) / dot(q, q);\r\n\t}\r\n\r\nnamespace detail\r\n{\r\n\t//////////////////////////////////////////////////////////////\r\n\t// tquat<valType> operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator +=\r\n\t(\r\n\t\ttquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\tthis->w += q.w;\r\n\t\tthis->x += q.x;\r\n\t\tthis->y += q.y;\r\n\t\tthis->z += q.z;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator *=\r\n\t(\r\n\t\ttquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\ttquat<T, P> const p(*this);\r\n\r\n\t\tthis->w = p.w * q.w - p.x * q.x - p.y * q.y - p.z * q.z;\r\n\t\tthis->x = p.w * q.x + p.x * q.w + p.y * q.z - p.z * q.y;\r\n\t\tthis->y = p.w * q.y + p.y * q.w + p.z * q.x - p.x * q.z;\r\n\t\tthis->z = p.w * q.z + p.z * q.w + p.x * q.y - p.y * q.x;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator *=\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tthis->w *= s;\r\n\t\tthis->x *= s;\r\n\t\tthis->y *= s;\r\n\t\tthis->z *= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator /=\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tthis->w /= s;\r\n\t\tthis->x /= s;\r\n\t\tthis->y /= s;\r\n\t\tthis->z /= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// tquat<T, P> external functions\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_dot<tquat, T, P>\r\n\t{\r\n\t\tstatic T call(tquat<T, P> const & x, tquat<T, P> const & y)\r\n\t\t{\r\n\t\t\ttvec4<T, P> tmp(x.x * y.x, x.y * y.y, x.z * y.z, x.w * y.w);\r\n\t\t\treturn (tmp.x + tmp.y) + (tmp.z + tmp.w);\r\n\t\t}\r\n\t};\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// tquat<T, P> external operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> operator-\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn detail::tquat<T, P>(-q.w, -q.x, -q.y, -q.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> operator+\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tquat<T, P> const & p\r\n\t)\r\n\t{\r\n\t\treturn detail::tquat<T, P>(q) += p;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> operator*\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tquat<T, P> const & p\r\n\t)\r\n\t{\r\n\t\treturn detail::tquat<T, P>(q) *= p;\r\n\t}\r\n\r\n\t// Transformation\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> operator*\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tT Two(2);\r\n\r\n\t\tdetail::tvec3<T, P> uv, uuv;\r\n\t\tdetail::tvec3<T, P> QuatVector(q.x, q.y, q.z);\r\n\t\tuv = glm::cross(QuatVector, v);\r\n\t\tuuv = glm::cross(QuatVector, uv);\r\n\t\tuv *= (Two * q.w);\r\n\t\tuuv *= Two;\r\n\r\n\t\treturn v + uv + uuv;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> operator*\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn glm::inverse(q) * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> operator*\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(q * detail::tvec3<T, P>(v), v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> operator*\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn glm::inverse(q) * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> operator*\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn detail::tquat<T, P>(\r\n\t\t\tq.w * s, q.x * s, q.y * s, q.z * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> operator*\r\n\t(\r\n\t\tT const & s,\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn q * s;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> operator/\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn detail::tquat<T, P>(\r\n\t\t\tq.w / s, q.x / s, q.y / s, q.z / s);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q1,\r\n\t\tdetail::tquat<T, P> const & q2\r\n\t)\r\n\t{\r\n\t\treturn (q1.x == q2.x) && (q1.y == q2.y) && (q1.z == q2.z) && (q1.w == q2.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q1,\r\n\t\tdetail::tquat<T, P> const & q2\r\n\t)\r\n\t{\r\n\t\treturn (q1.x != q2.x) || (q1.y != q2.y) || (q1.z != q2.z) || (q1.w != q2.w);\r\n\t}\r\n\r\n}//namespace detail\r\n\r\n\t////////////////////////////////////////////////////////\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T length\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn glm::sqrt(dot(q, q));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> normalize\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\tT len = length(q);\r\n\t\tif(len <= T(0)) // Problem\r\n\t\t\treturn detail::tquat<T, P>(1, 0, 0, 0);\r\n\t\tT oneOverLen = T(1) / len;\r\n\t\treturn detail::tquat<T, P>(q.w * oneOverLen, q.x * oneOverLen, q.y * oneOverLen, q.z * oneOverLen);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> cross\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q1,\r\n\t\tdetail::tquat<T, P> const & q2\r\n\t)\r\n\t{\r\n\t\treturn detail::tquat<T, P>(\r\n\t\t\tq1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z,\r\n\t\t\tq1.w * q2.x + q1.x * q2.w + q1.y * q2.z - q1.z * q2.y,\r\n\t\t\tq1.w * q2.y + q1.y * q2.w + q1.z * q2.x - q1.x * q2.z,\r\n\t\t\tq1.w * q2.z + q1.z * q2.w + q1.x * q2.y - q1.y * q2.x);\r\n\t}\r\n/*\r\n\t// (x * sin(1 - a) * angle / sin(angle)) + (y * sin(a) * angle / sin(angle))\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> mix\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x, \r\n\t\tdetail::tquat<T, P> const & y, \r\n\t\tT const & a\r\n\t)\r\n\t{\r\n\t\tif(a <= T(0)) return x;\r\n\t\tif(a >= T(1)) return y;\r\n\r\n\t\tfloat fCos = dot(x, y);\r\n\t\tdetail::tquat<T, P> y2(y); //BUG!!! tquat<T, P> y2;\r\n\t\tif(fCos < T(0))\r\n\t\t{\r\n\t\t\ty2 = -y;\r\n\t\t\tfCos = -fCos;\r\n\t\t}\r\n\r\n\t\t//if(fCos > 1.0f) // problem\r\n\t\tfloat k0, k1;\r\n\t\tif(fCos > T(0.9999))\r\n\t\t{\r\n\t\t\tk0 = T(1) - a;\r\n\t\t\tk1 = T(0) + a; //BUG!!! 1.0f + a;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tT fSin = sqrt(T(1) - fCos * fCos);\r\n\t\t\tT fAngle = atan(fSin, fCos);\r\n\t\t\tT fOneOverSin = static_cast<T>(1) / fSin;\r\n\t\t\tk0 = sin((T(1) - a) * fAngle) * fOneOverSin;\r\n\t\t\tk1 = sin((T(0) + a) * fAngle) * fOneOverSin;\r\n\t\t}\r\n\r\n\t\treturn detail::tquat<T, P>(\r\n\t\t\tk0 * x.w + k1 * y2.w,\r\n\t\t\tk0 * x.x + k1 * y2.x,\r\n\t\t\tk0 * x.y + k1 * y2.y,\r\n\t\t\tk0 * x.z + k1 * y2.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> mix2\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x, \r\n\t\tdetail::tquat<T, P> const & y, \r\n\t\tT const & a\r\n\t)\r\n\t{\r\n\t\tbool flip = false;\r\n\t\tif(a <= static_cast<T>(0)) return x;\r\n\t\tif(a >= static_cast<T>(1)) return y;\r\n\r\n\t\tT cos_t = dot(x, y);\r\n\t\tif(cos_t < T(0))\r\n\t\t{\r\n\t\t\tcos_t = -cos_t;\r\n\t\t\tflip = true;\r\n\t\t}\r\n\r\n\t\tT alpha(0), beta(0);\r\n\r\n\t\tif(T(1) - cos_t < 1e-7)\r\n\t\t\tbeta = static_cast<T>(1) - alpha;\r\n\t\telse\r\n\t\t{\r\n\t\t\tT theta = acos(cos_t);\r\n\t\t\tT sin_t = sin(theta);\r\n\t\t\tbeta = sin(theta * (T(1) - alpha)) / sin_t;\r\n\t\t\talpha = sin(alpha * theta) / sin_t;\r\n\t\t}\r\n\r\n\t\tif(flip)\r\n\t\t\talpha = -alpha;\r\n\t\t\r\n\t\treturn normalize(beta * x + alpha * y);\r\n\t}\r\n*/\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> mix\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y,\r\n\t\tT const & a\r\n\t)\r\n\t{\r\n\t\tT cosTheta = dot(x, y);\r\n\r\n\t\t// Perform a linear interpolation when cosTheta is close to 1 to avoid side effect of sin(angle) becoming a zero denominator\r\n\t\tif(cosTheta > T(1) - epsilon<T>())\r\n\t\t{\r\n\t\t\t// Linear interpolation\r\n\t\t\treturn detail::tquat<T, P>(\r\n\t\t\t\tmix(x.w, y.w, a),\r\n\t\t\t\tmix(x.x, y.x, a),\r\n\t\t\t\tmix(x.y, y.y, a),\r\n\t\t\t\tmix(x.z, y.z, a));\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Essential Mathematics, page 467\r\n\t\t\tT angle = acos(cosTheta);\r\n\t\t\treturn (sin((T(1) - a) * angle) * x + sin(a * angle) * y) / sin(angle);\r\n\t\t}\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> lerp\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x, \r\n\t\tdetail::tquat<T, P> const & y, \r\n\t\tT const & a\r\n\t)\r\n\t{\r\n\t\t// Lerp is only defined in [0, 1]\r\n\t\tassert(a >= static_cast<T>(0));\r\n\t\tassert(a <= static_cast<T>(1));\r\n\r\n\t\treturn x * (T(1) - a) + (y * a);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> slerp\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y,\r\n\t\tT const & a\r\n\t)\r\n\t{\r\n\t\tdetail::tquat<T, P> z = y;\r\n\r\n\t\tT cosTheta = dot(x, y);\r\n\r\n\t\t// If cosTheta < 0, the interpolation will take the long way around the sphere. \r\n\t\t// To fix this, one quat must be negated.\r\n\t\tif (cosTheta < T(0))\r\n\t\t{\r\n\t\t\tz        = -y;\r\n\t\t\tcosTheta = -cosTheta;\r\n\t\t}\r\n\r\n\t\t// Perform a linear interpolation when cosTheta is close to 1 to avoid side effect of sin(angle) becoming a zero denominator\r\n\t\tif(cosTheta > T(1) - epsilon<T>())\r\n\t\t{\r\n\t\t\t// Linear interpolation\r\n\t\t\treturn detail::tquat<T, P>(\r\n\t\t\t\tmix(x.w, y.w, a),\r\n\t\t\t\tmix(x.x, y.x, a),\r\n\t\t\t\tmix(x.y, y.y, a),\r\n\t\t\t\tmix(x.z, y.z, a));\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Essential Mathematics, page 467\r\n\t\t\tT angle = acos(cosTheta);\r\n\t\t\treturn (sin((T(1) - a) * angle) * x + sin(a * angle) * z) / sin(angle);\r\n\t\t}\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> rotate\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> Tmp = v;\r\n\r\n\t\t// Axis of rotation must be normalised\r\n\t\tT len = glm::length(Tmp);\r\n\t\tif(abs(len - T(1)) > T(0.001))\r\n\t\t{\r\n\t\t\tT oneOverLen = static_cast<T>(1) / len;\r\n\t\t\tTmp.x *= oneOverLen;\r\n\t\t\tTmp.y *= oneOverLen;\r\n\t\t\tTmp.z *= oneOverLen;\r\n\t\t}\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const AngleRad(angle);\r\n#else\r\n#\t\tpragma message(\"GLM: rotate function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const AngleRad = radians(angle);\r\n#endif\r\n\t\tT const Sin = sin(AngleRad * T(0.5));\r\n\r\n\t\treturn q * detail::tquat<T, P>(cos(AngleRad * T(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin);\r\n\t\t//return gtc::quaternion::cross(q, detail::tquat<T, P>(cos(AngleRad * T(0.5)), Tmp.x * fSin, Tmp.y * fSin, Tmp.z * fSin));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> eulerAngles\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(pitch(x), yaw(x), roll(x));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T roll\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\treturn T(atan(T(2) * (q.x * q.y + q.w * q.z), q.w * q.w + q.x * q.x - q.y * q.y - q.z * q.z));\r\n#else\r\n#\t\tpragma message(\"GLM: roll function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\treturn glm::degrees(atan(T(2) * (q.x * q.y + q.w * q.z), q.w * q.w + q.x * q.x - q.y * q.y - q.z * q.z));\r\n#endif\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T pitch\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\treturn T(atan(T(2) * (q.y * q.z + q.w * q.x), q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z));\r\n#else\r\n#\t\tpragma message(\"GLM: pitch function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\treturn glm::degrees(atan(T(2) * (q.y * q.z + q.w * q.x), q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z));\r\n#endif\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T yaw\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\treturn asin(T(-2) * (q.x * q.z - q.w * q.y));\r\n#else\r\n#\t\tpragma message(\"GLM: yaw function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\treturn glm::degrees(asin(T(-2) * (q.x * q.z - q.w * q.y)));\r\n#endif\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> mat3_cast\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> Result(T(1));\r\n\t\tT qxx(q.x * q.x);\r\n\t\tT qyy(q.y * q.y);\r\n\t\tT qzz(q.z * q.z);\r\n\t\tT qxz(q.x * q.z);\r\n\t\tT qxy(q.x * q.y);\r\n\t\tT qyz(q.y * q.z);\r\n\t\tT qwx(q.w * q.x);\r\n\t\tT qwy(q.w * q.y);\r\n\t\tT qwz(q.w * q.z);\r\n\r\n\t\tResult[0][0] = 1 - 2 * (qyy +  qzz);\r\n\t\tResult[0][1] = 2 * (qxy + qwz);\r\n\t\tResult[0][2] = 2 * (qxz - qwy);\r\n\r\n\t\tResult[1][0] = 2 * (qxy - qwz);\r\n\t\tResult[1][1] = 1 - 2 * (qxx +  qzz);\r\n\t\tResult[1][2] = 2 * (qyz + qwx);\r\n\r\n\t\tResult[2][0] = 2 * (qxz + qwy);\r\n\t\tResult[2][1] = 2 * (qyz - qwx);\r\n\t\tResult[2][2] = 1 - 2 * (qxx +  qyy);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> mat4_cast\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn detail::tmat4x4<T, P>(mat3_cast(q));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> quat_cast\r\n\t(\r\n\t\tdetail::tmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tT fourXSquaredMinus1 = m[0][0] - m[1][1] - m[2][2];\r\n\t\tT fourYSquaredMinus1 = m[1][1] - m[0][0] - m[2][2];\r\n\t\tT fourZSquaredMinus1 = m[2][2] - m[0][0] - m[1][1];\r\n\t\tT fourWSquaredMinus1 = m[0][0] + m[1][1] + m[2][2];\r\n\r\n\t\tint biggestIndex = 0;\r\n\t\tT fourBiggestSquaredMinus1 = fourWSquaredMinus1;\r\n\t\tif(fourXSquaredMinus1 > fourBiggestSquaredMinus1)\r\n\t\t{\r\n\t\t\tfourBiggestSquaredMinus1 = fourXSquaredMinus1;\r\n\t\t\tbiggestIndex = 1;\r\n\t\t}\r\n\t\tif(fourYSquaredMinus1 > fourBiggestSquaredMinus1)\r\n\t\t{\r\n\t\t\tfourBiggestSquaredMinus1 = fourYSquaredMinus1;\r\n\t\t\tbiggestIndex = 2;\r\n\t\t}\r\n\t\tif(fourZSquaredMinus1 > fourBiggestSquaredMinus1)\r\n\t\t{\r\n\t\t\tfourBiggestSquaredMinus1 = fourZSquaredMinus1;\r\n\t\t\tbiggestIndex = 3;\r\n\t\t}\r\n\r\n\t\tT biggestVal = sqrt(fourBiggestSquaredMinus1 + T(1)) * T(0.5);\r\n\t\tT mult = static_cast<T>(0.25) / biggestVal;\r\n\r\n\t\tdetail::tquat<T, P> Result;\r\n\t\tswitch(biggestIndex)\r\n\t\t{\r\n\t\tcase 0:\r\n\t\t\tResult.w = biggestVal;\r\n\t\t\tResult.x = (m[1][2] - m[2][1]) * mult;\r\n\t\t\tResult.y = (m[2][0] - m[0][2]) * mult;\r\n\t\t\tResult.z = (m[0][1] - m[1][0]) * mult;\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tResult.w = (m[1][2] - m[2][1]) * mult;\r\n\t\t\tResult.x = biggestVal;\r\n\t\t\tResult.y = (m[0][1] + m[1][0]) * mult;\r\n\t\t\tResult.z = (m[2][0] + m[0][2]) * mult;\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tResult.w = (m[2][0] - m[0][2]) * mult;\r\n\t\t\tResult.x = (m[0][1] + m[1][0]) * mult;\r\n\t\t\tResult.y = biggestVal;\r\n\t\t\tResult.z = (m[1][2] + m[2][1]) * mult;\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tResult.w = (m[0][1] - m[1][0]) * mult;\r\n\t\t\tResult.x = (m[2][0] + m[0][2]) * mult;\r\n\t\t\tResult.y = (m[1][2] + m[2][1]) * mult;\r\n\t\t\tResult.z = biggestVal;\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tdefault:\t\t\t\t\t// Silence a -Wswitch-default warning in GCC. Should never actually get here. Assert is just for sanity.\r\n\t\t\tassert(false);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> quat_cast\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & m4\r\n\t)\r\n\t{\r\n\t\treturn quat_cast(detail::tmat3x3<T, P>(m4));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T angle\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x\r\n\t)\r\n\t{\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\treturn acos(x.w) * T(2);\r\n#else\r\n#\t\tpragma message(\"GLM: angle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\treturn glm::degrees(acos(x.w) * T(2));\r\n#endif\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> axis\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tT tmp1 = static_cast<T>(1) - x.w * x.w;\r\n\t\tif(tmp1 <= static_cast<T>(0))\r\n\t\t\treturn detail::tvec3<T, P>(0, 0, 1);\r\n\t\tT tmp2 = static_cast<T>(1) / sqrt(tmp1);\r\n\t\treturn detail::tvec3<T, P>(x.x * tmp2, x.y * tmp2, x.z * tmp2);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> angleAxis\r\n\t(\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tquat<T, P> result;\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const a(angle);\r\n#else\r\n#\t\tpragma message(\"GLM: angleAxis function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const a(glm::radians(angle));\r\n#endif\r\n\t\tT s = glm::sin(a * T(0.5));\r\n\r\n\t\tresult.w = glm::cos(a * T(0.5));\r\n\t\tresult.x = v.x * s;\r\n\t\tresult.y = v.y * s;\r\n\t\tresult.z = v.z * s;\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P> lessThan\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<bool, P> Result;\r\n\t\tfor(length_t i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] < y[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P> lessThanEqual\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<bool, P> Result;\r\n\t\tfor(length_t i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] <= y[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P> greaterThan\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<bool, P> Result;\r\n\t\tfor(length_t i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] > y[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P> greaterThanEqual\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<bool, P> Result;\r\n\t\tfor(length_t i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] >= y[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P> equal\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<bool, P> Result;\r\n\t\tfor(length_t i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] == y[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P>  notEqual\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<bool, P> Result;\r\n\t\tfor(length_t i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] != y[i];\r\n\t\treturn Result;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtc/random.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_random\r\n/// @file glm/gtc/random.hpp\r\n/// @date 2011-09-18 / 2011-09-18\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_half_float (dependence)\r\n/// @see gtx_random (extended)\r\n///\r\n/// @defgroup gtc_random GLM_GTC_random\r\n/// @ingroup gtc\r\n/// \r\n/// @brief Generate random number from various distribution methods.\r\n/// \r\n/// <glm/gtc/random.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_random\r\n#define GLM_GTC_random\r\n\r\n// Dependency:\r\n#include \"../vec2.hpp\"\r\n#include \"../vec3.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_random extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_random\r\n\t/// @{\r\n\t\r\n\t/// Generate random numbers in the interval [Min, Max], according a linear distribution \r\n\t/// \r\n\t/// @param Min \r\n\t/// @param Max \r\n\t/// @tparam genType Value type. Currently supported: half (not recommanded), float or double scalars and vectors.\r\n\t/// @see gtc_random\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType linearRand(\r\n\t\tgenType const & Min,\r\n\t\tgenType const & Max);\r\n\r\n\t/// Generate random numbers in the interval [Min, Max], according a gaussian distribution \r\n\t/// \r\n\t/// @param Mean\r\n\t/// @param Deviation\r\n\t/// @see gtc_random\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType gaussRand(\r\n\t\tgenType const & Mean,\r\n\t\tgenType const & Deviation);\r\n\t\r\n\t/// Generate a random 2D vector which coordinates are regulary distributed on a circle of a given radius\r\n\t/// \r\n\t/// @param Radius \r\n\t/// @see gtc_random\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_DECL detail::tvec2<T, defaultp> circularRand(\r\n\t\tT const & Radius);\r\n\t\r\n\t/// Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius\r\n\t/// \r\n\t/// @param Radius\r\n\t/// @see gtc_random\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_DECL detail::tvec3<T, defaultp> sphericalRand(\r\n\t\tT const & Radius);\r\n\t\r\n\t/// Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a given radius\r\n\t/// \r\n\t/// @param Radius\r\n\t/// @see gtc_random\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_DECL detail::tvec2<T, defaultp> diskRand(\r\n\t\tT const & Radius);\r\n\t\r\n\t/// Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of a given radius\r\n\t/// \r\n\t/// @param Radius\r\n\t/// @see gtc_random\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_DECL detail::tvec3<T, defaultp> ballRand(\r\n\t\tT const & Radius);\r\n\t\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"random.inl\"\r\n\r\n#endif//GLM_GTC_random\r\n"
  },
  {
    "path": "cpu/glm/gtc/random.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_random\r\n/// @file glm/gtc/random.inl\r\n/// @date 2011-09-19 / 2012-04-07\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../geometric.hpp\"\r\n#include \"../exponential.hpp\"\r\n#include <cstdlib>\r\n#include <ctime>\r\n#include <cassert>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\tstruct compute_linearRand\r\n\t{\r\n\t\ttemplate <typename T>\r\n\t\tGLM_FUNC_QUALIFIER T operator() (T const & Min, T const & Max) const;\r\n/*\r\n\t\t{\r\n\t\t\tGLM_STATIC_ASSERT(0, \"'linearRand' invalid template parameter type. GLM_GTC_random only supports floating-point template types.\");\r\n\t\t\treturn Min;\r\n\t\t}\r\n*/\r\n\t};\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER float compute_linearRand::operator()<float> (float const & Min, float const & Max) const\r\n\t{\r\n\t\treturn float(std::rand()) / float(RAND_MAX) * (Max - Min) + Min;\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER double compute_linearRand::operator()<double> (double const & Min, double const & Max) const\r\n\t{\r\n\t\treturn double(std::rand()) / double(RAND_MAX) * (Max - Min) + Min;\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER long double compute_linearRand::operator()<long double> (long double const & Min, long double const & Max) const\r\n\t{\r\n\t\treturn (long double)(std::rand()) / (long double)(RAND_MAX) * (Max - Min) + Min;\r\n\t}\r\n}//namespace detail\r\n\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType linearRand\r\n\t(\r\n\t\tgenType const & Min,\r\n\t\tgenType const & Max\r\n\t)\r\n\t{\r\n\t\treturn detail::compute_linearRand()(Min, Max);\r\n\t}\r\n\r\n\tVECTORIZE_VEC_VEC(linearRand)\r\n\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType gaussRand\r\n\t(\r\n\t\tgenType const & Mean,\t\r\n\t\tgenType const & Deviation\r\n\t)\r\n\t{\r\n\t\tgenType w, x1, x2;\r\n\t\r\n\t\tdo\r\n\t\t{\r\n\t\t\tx1 = linearRand(genType(-1), genType(1));\r\n\t\t\tx2 = linearRand(genType(-1), genType(1));\r\n\t\t\r\n\t\t\tw = x1 * x1 + x2 * x2;\r\n\t\t} while(w > genType(1));\r\n\t\r\n\t\treturn x2 * Deviation * Deviation * sqrt((genType(-2) * log(w)) / w) + Mean;\r\n\t}\r\n\r\n\tVECTORIZE_VEC_VEC(gaussRand)\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, defaultp> diskRand\r\n\t(\r\n\t\tT const & Radius\r\n\t)\r\n\t{\t\t\r\n\t\tdetail::tvec2<T, defaultp> Result(T(0));\r\n\t\tT LenRadius(T(0));\r\n\t\t\r\n\t\tdo\r\n\t\t{\r\n\t\t\tResult = linearRand(\r\n\t\t\t\tdetail::tvec2<T, defaultp>(-Radius),\r\n\t\t\t\tdetail::tvec2<T, defaultp>(Radius));\r\n\t\t\tLenRadius = length(Result);\r\n\t\t}\r\n\t\twhile(LenRadius > Radius);\r\n\t\t\r\n\t\treturn Result;\r\n\t}\r\n\t\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, defaultp> ballRand\r\n\t(\r\n\t\tT const & Radius\r\n\t)\r\n\t{\t\t\r\n\t\tdetail::tvec3<T, defaultp> Result(T(0));\r\n\t\tT LenRadius(T(0));\r\n\t\t\r\n\t\tdo\r\n\t\t{\r\n\t\t\tResult = linearRand(\r\n\t\t\t\tdetail::tvec3<T, defaultp>(-Radius),\r\n\t\t\t\tdetail::tvec3<T, defaultp>(Radius));\r\n\t\t\tLenRadius = length(Result);\r\n\t\t}\r\n\t\twhile(LenRadius > Radius);\r\n\t\t\r\n\t\treturn Result;\r\n\t}\r\n\t\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, defaultp> circularRand\r\n\t(\r\n\t\tT const & Radius\r\n\t)\r\n\t{\r\n\t\tT a = linearRand(T(0), T(6.283185307179586476925286766559f));\r\n\t\treturn detail::tvec2<T, defaultp>(cos(a), sin(a)) * Radius;\t\t\r\n\t}\r\n\t\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, defaultp> sphericalRand\r\n\t(\r\n\t\tT const & Radius\r\n\t)\r\n\t{\r\n\t\tT z = linearRand(T(-1), T(1));\r\n\t\tT a = linearRand(T(0), T(6.283185307179586476925286766559f));\r\n\t\r\n\t\tT r = sqrt(T(1) - z * z);\r\n\t\r\n\t\tT x = r * cos(a);\r\n\t\tT y = r * sin(a);\r\n\t\r\n\t\treturn detail::tvec3<T, defaultp>(x, y, z) * Radius;\t\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtc/reciprocal.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_reciprocal\r\n/// @file glm/gtc/reciprocal.hpp\r\n/// @date 2008-10-09 / 2012-01-25\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtc_reciprocal GLM_GTC_reciprocal\r\n/// @ingroup gtc\r\n/// \r\n/// @brief Define secant, cosecant and cotangent functions.\r\n/// \r\n/// <glm/gtc/reciprocal.hpp> need to be included to use these features.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_reciprocal\r\n#define GLM_GTC_reciprocal\r\n\r\n// Dependencies\r\n#include \"../detail/setup.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_reciprocal extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_reciprocal\r\n\t/// @{\r\n\r\n\t/// Secant function. \r\n\t/// hypotenuse / adjacent or 1 / cos(x)\r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType sec(genType const & angle);\r\n\r\n\t/// Cosecant function. \r\n\t/// hypotenuse / opposite or 1 / sin(x)\r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType csc(genType const & angle);\r\n\t\t\r\n\t/// Cotangent function. \r\n\t/// adjacent / opposite or 1 / tan(x)\r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType cot(genType const & angle);\r\n\r\n\t/// Inverse secant function. \r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType asec(genType const & x);\r\n\r\n\t/// Inverse cosecant function. \r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType acsc(genType const & x);\r\n\t\t\r\n\t/// Inverse cotangent function. \r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType acot(genType const & x);\r\n\r\n\t/// Secant hyperbolic function. \r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType sech(genType const & angle);\r\n\r\n\t/// Cosecant hyperbolic function. \r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType csch(genType const & angle);\r\n\t\t\r\n\t/// Cotangent hyperbolic function. \r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType coth(genType const & angle);\r\n\r\n\t/// Inverse secant hyperbolic function. \r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType asech(genType const & x);\r\n\r\n\t/// Inverse cosecant hyperbolic function. \r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType acsch(genType const & x);\r\n\t\t\r\n\t/// Inverse cotangent hyperbolic function. \r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType acoth(genType const & x);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"reciprocal.inl\"\r\n\r\n#endif//GLM_GTC_reciprocal\r\n"
  },
  {
    "path": "cpu/glm/gtc/reciprocal.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_reciprocal\r\n/// @file glm/gtc/reciprocal.inl\r\n/// @date 2008-10-09 / 2012-04-07\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../trigonometric.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm\r\n{\r\n\t// sec\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType sec\r\n\t(\r\n\t\tgenType const & angle\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'sec' only accept floating-point values\");\r\n\r\n\t\treturn genType(1) / glm::cos(angle);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(sec)\r\n\r\n\t// csc\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType csc\r\n\t(\r\n\t\tgenType const & angle\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'csc' only accept floating-point values\");\r\n\r\n\t\treturn genType(1) / glm::sin(angle);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(csc)\r\n\r\n\t// cot\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType cot\r\n\t(\r\n\t\tgenType const & angle\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'cot' only accept floating-point values\");\r\n\r\n\t\treturn genType(1) / glm::tan(angle);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(cot)\r\n\r\n\t// asec\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType asec\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'asec' only accept floating-point values\");\r\n\t\r\n\t\treturn acos(genType(1) / x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(asec)\r\n\r\n\t// acsc\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType acsc\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'acsc' only accept floating-point values\");\r\n\r\n\t\treturn asin(genType(1) / x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(acsc)\r\n\r\n\t// acot\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType acot\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'acot' only accept floating-point values\");\r\n\r\n\t\tgenType const pi_over_2 = genType(3.1415926535897932384626433832795 / 2.0);\r\n\t\treturn pi_over_2 - atan(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(acot)\r\n\r\n\t// sech\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType sech\r\n\t(\r\n\t\tgenType const & angle\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'sech' only accept floating-point values\");\r\n\r\n\t\treturn genType(1) / glm::cosh(angle);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(sech)\r\n\r\n\t// csch\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType csch\r\n\t(\r\n\t\tgenType const & angle\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'csch' only accept floating-point values\");\r\n\r\n\t\treturn genType(1) / glm::sinh(angle);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(csch)\r\n\r\n\t// coth\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType coth\r\n\t(\r\n\t\tgenType const & angle\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'coth' only accept floating-point values\");\r\n\r\n\t\treturn glm::cosh(angle) / glm::sinh(angle);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(coth)\r\n\r\n\t// asech\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType asech\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'asech' only accept floating-point values\");\r\n\r\n\t\treturn acosh(genType(1) / x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(asech)\r\n\r\n\t// acsch\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType acsch\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'acsch' only accept floating-point values\");\r\n\r\n\t\treturn asinh(genType(1) / x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(acsch)\r\n\r\n\t// acoth\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType acoth\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'acoth' only accept floating-point values\");\r\n\r\n\t\treturn atanh(genType(1) / x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(acoth)\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtc/type_precision.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n/// \r\n/// @ref gtc_type_precision\r\n/// @file glm/gtc/type_precision.hpp\r\n/// @date 2009-06-04 / 2011-12-07\r\n/// @author Christophe Riccio\r\n/// \r\n/// @see core (dependence)\r\n/// @see gtc_half_float (dependence)\r\n/// @see gtc_quaternion (dependence)\r\n/// \r\n/// @defgroup gtc_type_precision GLM_GTC_type_precision\r\n/// @ingroup gtc\r\n/// \r\n/// @brief Defines specific C++-based precision types.\r\n/// \r\n/// @ref core_precision defines types based on GLSL's precision qualifiers. This\r\n/// extension defines types based on explicitly-sized C++ data types.\r\n/// \r\n/// <glm/gtc/type_precision.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_type_precision\r\n#define GLM_GTC_type_precision\r\n\r\n// Dependency:\r\n#include \"../gtc/quaternion.hpp\"\r\n#include \"../vec2.hpp\"\r\n#include \"../vec3.hpp\"\r\n#include \"../vec4.hpp\"\r\n#include \"../mat2x2.hpp\"\r\n#include \"../mat2x3.hpp\"\r\n#include \"../mat2x4.hpp\"\r\n#include \"../mat3x2.hpp\"\r\n#include \"../mat3x3.hpp\"\r\n#include \"../mat3x4.hpp\"\r\n#include \"../mat4x2.hpp\"\r\n#include \"../mat4x3.hpp\"\r\n#include \"../mat4x4.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_type_precision extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t///////////////////////////\r\n\t// Signed int vector types \r\n\r\n\t/// @addtogroup gtc_type_precision\r\n\t/// @{\r\n\r\n\t/// Low precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 lowp_int8;\r\n\t\r\n\t/// Low precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 lowp_int16;\r\n\r\n\t/// Low precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 lowp_int32;\r\n\r\n\t/// Low precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 lowp_int64;\r\n\r\n\t/// Low precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 lowp_int8_t;\r\n\t\r\n\t/// Low precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 lowp_int16_t;\r\n\r\n\t/// Low precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 lowp_int32_t;\r\n\r\n\t/// Low precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 lowp_int64_t;\r\n\r\n\t/// Low precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 lowp_i8;\r\n\t\r\n\t/// Low precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 lowp_i16;\r\n\r\n\t/// Low precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 lowp_i32;\r\n\r\n\t/// Low precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 lowp_i64;\r\n\r\n\t/// Medium precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 mediump_int8;\r\n\t\r\n\t/// Medium precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 mediump_int16;\r\n\r\n\t/// Medium precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 mediump_int32;\r\n\r\n\t/// Medium precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 mediump_int64;\r\n\r\n\t/// Medium precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 mediump_int8_t;\r\n\t\r\n\t/// Medium precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 mediump_int16_t;\r\n\r\n\t/// Medium precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 mediump_int32_t;\r\n\r\n\t/// Medium precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 mediump_int64_t;\r\n\r\n\t/// Medium precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 mediump_i8;\r\n\t\r\n\t/// Medium precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 mediump_i16;\r\n\r\n\t/// Medium precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 mediump_i32;\r\n\r\n\t/// Medium precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 mediump_i64;\r\n\r\n\t/// High precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 highp_int8;\r\n\t\r\n\t/// High precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 highp_int16;\r\n\r\n\t/// High precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 highp_int32;\r\n\r\n\t/// High precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 highp_int64;\r\n\r\n\t/// High precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 highp_int8_t;\r\n\t\r\n\t/// High precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 highp_int16_t;\r\n\r\n\t/// 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 highp_int32_t;\r\n\r\n\t/// High precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 highp_int64_t;\r\n\r\n\t/// High precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 highp_i8;\r\n\t\r\n\t/// High precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 highp_i16;\r\n\r\n\t/// High precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 highp_i32;\r\n\r\n\t/// High precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 highp_i64;\r\n\t\r\n\r\n\t/// 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 int8;\r\n\t\r\n\t/// 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 int16;\r\n\r\n\t/// 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 int32;\r\n\r\n\t/// 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 int64;\r\n\r\n\t/// 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 int8_t;\r\n\t\r\n\t/// 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 int16_t;\r\n\r\n\t/// 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 int32_t;\r\n\r\n\t/// 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 int64_t;\r\n\r\n\t/// 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 i8;\r\n\t\r\n\t/// 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 i16;\r\n\r\n\t/// 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 i32;\r\n\r\n\t/// 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 i64;\r\n\r\n\r\n\t/// 8 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i8, defaultp> i8vec1;\r\n\t\r\n\t/// 8 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i8, defaultp> i8vec2;\r\n\r\n\t/// 8 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i8, defaultp> i8vec3;\r\n\r\n\t/// 8 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i8, defaultp> i8vec4;\r\n\r\n\r\n\t/// 16 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i16, defaultp> i16vec1;\r\n\t\r\n\t/// 16 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i16, defaultp> i16vec2;\r\n\r\n\t/// 16 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i16, defaultp> i16vec3;\r\n\r\n\t/// 16 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i16, defaultp> i16vec4;\r\n\r\n\r\n\t/// 32 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i32, defaultp> i32vec1;\r\n\t\r\n\t/// 32 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i32, defaultp> i32vec2;\r\n\r\n\t/// 32 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i32, defaultp> i32vec3;\r\n\r\n\t/// 32 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i32, defaultp> i32vec4;\r\n\r\n\r\n\t/// 64 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i64, defaultp> i64vec1;\r\n\t\r\n\t/// 64 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i64, defaultp> i64vec2;\r\n\r\n\t/// 64 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i64, defaultp> i64vec3;\r\n\r\n\t/// 64 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i64, defaultp> i64vec4;\r\n\r\n\r\n\t/////////////////////////////\r\n\t// Unsigned int vector types\r\n\r\n\t/// Low precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 lowp_uint8;\r\n\t\r\n\t/// Low precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 lowp_uint16;\r\n\r\n\t/// Low precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 lowp_uint32;\r\n\r\n\t/// Low precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 lowp_uint64;\r\n\r\n\t/// Low precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 lowp_uint8_t;\r\n\t\r\n\t/// Low precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 lowp_uint16_t;\r\n\r\n\t/// Low precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 lowp_uint32_t;\r\n\r\n\t/// Low precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 lowp_uint64_t;\r\n\r\n\t/// Low precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 lowp_u8;\r\n\t\r\n\t/// Low precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 lowp_u16;\r\n\r\n\t/// Low precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 lowp_u32;\r\n\r\n\t/// Low precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 lowp_u64;\r\n\t\r\n\t/// Medium precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 mediump_uint8;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 mediump_uint16;\r\n\r\n\t/// Medium precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 mediump_uint32;\r\n\r\n\t/// Medium precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 mediump_uint64;\r\n\r\n\t/// Medium precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 mediump_uint8_t;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 mediump_uint16_t;\r\n\r\n\t/// Medium precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 mediump_uint32_t;\r\n\r\n\t/// Medium precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 mediump_uint64_t;\r\n\r\n\t/// Medium precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 mediump_u8;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 mediump_u16;\r\n\r\n\t/// Medium precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 mediump_u32;\r\n\r\n\t/// Medium precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 mediump_u64;\r\n\t\r\n\t/// High precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 highp_uint8;\r\n\t\r\n\t/// High precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 highp_uint16;\r\n\r\n\t/// High precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 highp_uint32;\r\n\r\n\t/// High precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 highp_uint64;\r\n\r\n\t/// High precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 highp_uint8_t;\r\n\t\r\n\t/// High precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 highp_uint16_t;\r\n\r\n\t/// High precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 highp_uint32_t;\r\n\r\n\t/// High precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 highp_uint64_t;\r\n\r\n\t/// High precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 highp_u8;\r\n\t\r\n\t/// High precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 highp_u16;\r\n\r\n\t/// High precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 highp_u32;\r\n\r\n\t/// High precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 highp_u64;\r\n\r\n\t/// Default precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 uint8;\r\n\t\r\n\t/// Default precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 uint16;\r\n\r\n\t/// Default precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 uint32;\r\n\r\n\t/// Default precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 uint64;\r\n\r\n\t/// Default precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 uint8_t;\r\n\t\r\n\t/// Default precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 uint16_t;\r\n\r\n\t/// Default precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 uint32_t;\r\n\r\n\t/// Default precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 uint64_t;\r\n\r\n\t/// Default precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 u8;\r\n\t\r\n\t/// Default precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 u16;\r\n\r\n\t/// Default precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 u32;\r\n\r\n\t/// Default precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 u64;\r\n\r\n\r\n\r\n\t/// Default precision 8 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u8, defaultp> u8vec1;\r\n\t\r\n\t/// Default precision 8 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u8, defaultp> u8vec2;\r\n\r\n\t/// Default precision 8 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u8, defaultp> u8vec3;\r\n\r\n\t/// Default precision 8 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u8, defaultp> u8vec4;\r\n\r\n\r\n\t/// Default precision 16 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u16, defaultp> u16vec1;\r\n\t\r\n\t/// Default precision 16 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u16, defaultp> u16vec2;\r\n\r\n\t/// Default precision 16 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u16, defaultp> u16vec3;\r\n\r\n\t/// Default precision 16 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u16, defaultp> u16vec4;\r\n\r\n\r\n\t/// Default precision 32 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u32, defaultp> u32vec1;\r\n\t\r\n\t/// Default precision 32 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u32, defaultp> u32vec2;\r\n\r\n\t/// Default precision 32 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u32, defaultp> u32vec3;\r\n\r\n\t/// Default precision 32 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u32, defaultp> u32vec4;\r\n\r\n\r\n\t/// Default precision 64 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u64, defaultp> u64vec1;\r\n\t\r\n\t/// Default precision 64 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u64, defaultp> u64vec2;\r\n\r\n\t/// Default precision 64 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u64, defaultp> u64vec3;\r\n\r\n\t/// Default precision 64 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u64, defaultp> u64vec4;\r\n\r\n\r\n\t//////////////////////\r\n\t// Float vector types\r\n\r\n\t/// 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 float32;\r\n\r\n\t/// 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 float64;\r\n\r\n\r\n\t/// 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 float32_t;\r\n\r\n\t/// 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 float64_t;\r\n\r\n\r\n\t/// 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float32 f32;\r\n\r\n\t/// 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float64 f64;\r\n\r\n\r\n\t/// Single-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<float, defaultp> fvec1;\r\n\r\n\t/// Single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<float, defaultp> fvec2;\r\n\r\n\t/// Single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<float, defaultp> fvec3;\r\n\r\n\t/// Single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<float, defaultp> fvec4;\r\n\r\n\t\r\n\t/// Single-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<f32, defaultp> f32vec1;\r\n\r\n\t/// Single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<f32, defaultp> f32vec2;\r\n\r\n\t/// Single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<f32, defaultp> f32vec3;\r\n\r\n\t/// Single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<f32, defaultp> f32vec4;\r\n\r\n\r\n\t/// Double-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<f64, defaultp> f64vec1;\r\n\r\n\t/// Double-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<f64, defaultp> f64vec2;\r\n\r\n\t/// Double-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<f64, defaultp> f64vec3;\r\n\r\n\t/// Double-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<f64, defaultp> f64vec4;\r\n\r\n\r\n\t//////////////////////\r\n\t// Float matrix types \r\n\r\n\t/// Single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef detail::tmat1x1<f32> fmat1;\r\n\r\n\t/// Single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f32, defaultp> fmat2;\r\n\r\n\t/// Single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f32, defaultp> fmat3;\r\n\r\n\t/// Single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f32, defaultp> fmat4;\r\n\r\n\r\n\t/// Single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef f32 fmat1x1;\r\n\r\n\t/// Single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f32, defaultp> fmat2x2;\r\n\r\n\t/// Single-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f32, defaultp> fmat2x3;\r\n\r\n\t/// Single-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f32, defaultp> fmat2x4;\r\n\r\n\t/// Single-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f32, defaultp> fmat3x2;\r\n\r\n\t/// Single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f32, defaultp> fmat3x3;\r\n\r\n\t/// Single-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f32, defaultp> fmat3x4;\r\n\r\n\t/// Single-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f32, defaultp> fmat4x2;\r\n\r\n\t/// Single-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f32, defaultp> fmat4x3;\r\n\r\n\t/// Single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f32, defaultp> fmat4x4;\r\n\r\n\r\n\t/// Single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef detail::tmat1x1<f32, defaultp> f32mat1;\r\n\r\n\t/// Single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f32, defaultp> f32mat2;\r\n\r\n\t/// Single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f32, defaultp> f32mat3;\r\n\r\n\t/// Single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f32, defaultp> f32mat4;\r\n\r\n\r\n\t/// Single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef f32 f32mat1x1;\r\n\r\n\t/// Single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f32, defaultp> f32mat2x2;\r\n\r\n\t/// Single-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f32, defaultp> f32mat2x3;\r\n\r\n\t/// Single-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f32, defaultp> f32mat2x4;\r\n\r\n\t/// Single-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f32, defaultp> f32mat3x2;\r\n\r\n\t/// Single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f32, defaultp> f32mat3x3;\r\n\r\n\t/// Single-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f32, defaultp> f32mat3x4;\r\n\r\n\t/// Single-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f32, defaultp> f32mat4x2;\r\n\r\n\t/// Single-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f32, defaultp> f32mat4x3;\r\n\r\n\t/// Single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f32, defaultp> f32mat4x4;\r\n\r\n\r\n\t/// Double-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef detail::tmat1x1<f64, defaultp> f64mat1;\r\n\r\n\t/// Double-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f64, defaultp> f64mat2;\r\n\r\n\t/// Double-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f64, defaultp> f64mat3;\r\n\r\n\t/// Double-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f64, defaultp> f64mat4;\r\n\r\n\r\n\t/// Double-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef f64 f64mat1x1;\r\n\r\n\t/// Double-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f64, defaultp> f64mat2x2;\r\n\r\n\t/// Double-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f64, defaultp> f64mat2x3;\r\n\r\n\t/// Double-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f64, defaultp> f64mat2x4;\r\n\r\n\t/// Double-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f64, defaultp> f64mat3x2;\r\n\r\n\t/// Double-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f64, defaultp> f64mat3x3;\r\n\r\n\t/// Double-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f64, defaultp> f64mat3x4;\r\n\r\n\t/// Double-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f64, defaultp> f64mat4x2;\r\n\r\n\t/// Double-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f64, defaultp> f64mat4x3;\r\n\r\n\t/// Double-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f64, defaultp> f64mat4x4;\r\n\r\n\r\n\t//////////////////////////\r\n\t// Quaternion types\r\n\r\n\t/// Single-precision floating-point quaternion.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tquat<f32, defaultp> f32quat;\r\n\r\n\t/// Double-precision floating-point quaternion.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tquat<f64, defaultp> f64quat;\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"type_precision.inl\"\r\n\r\n#endif//GLM_GTC_type_precision\r\n"
  },
  {
    "path": "cpu/glm/gtc/type_precision.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_swizzle\r\n/// @file glm/gtc/swizzle.inl\r\n/// @date 2009-06-14 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\r\n}\r\n"
  },
  {
    "path": "cpu/glm/gtc/type_ptr.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_type_ptr\r\n/// @file glm/gtc/type_ptr.hpp\r\n/// @date 2009-05-06 / 2011-06-05\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_half_float (dependence)\r\n/// @see gtc_quaternion (dependence)\r\n///\r\n/// @defgroup gtc_type_ptr GLM_GTC_type_ptr\r\n/// @ingroup gtc\r\n///\r\n/// @brief Handles the interaction between pointers and vector, matrix types.\r\n/// \r\n/// This extension defines an overloaded function, glm::value_ptr, which\r\n/// takes any of the \\ref core_template \"core template types\". It returns\r\n/// a pointer to the memory layout of the object. Matrix types store their values\r\n/// in column-major order.\r\n/// \r\n/// This is useful for uploading data to matrices or copying data to buffer objects.\r\n///\r\n/// Example:\r\n/// @code\r\n/// #include <glm/glm.hpp>\r\n/// #include <glm/gtc/type_ptr.hpp>\r\n/// \r\n/// glm::vec3 aVector(3);\r\n/// glm::mat4 someMatrix(1.0);\r\n/// \r\n/// glUniform3fv(uniformLoc, 1, glm::value_ptr(aVector));\r\n/// glUniformMatrix4fv(uniformMatrixLoc, 1, GL_FALSE, glm::value_ptr(someMatrix));\r\n/// @endcode\r\n/// \r\n/// <glm/gtc/type_ptr.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_type_ptr\r\n#define GLM_GTC_type_ptr\r\n\r\n// Dependency:\r\n#include \"../gtc/quaternion.hpp\"\r\n#include \"../vec2.hpp\"\r\n#include \"../vec3.hpp\"\r\n#include \"../vec4.hpp\"\r\n#include \"../mat2x2.hpp\"\r\n#include \"../mat2x3.hpp\"\r\n#include \"../mat2x4.hpp\"\r\n#include \"../mat3x2.hpp\"\r\n#include \"../mat3x3.hpp\"\r\n#include \"../mat3x4.hpp\"\r\n#include \"../mat4x2.hpp\"\r\n#include \"../mat4x3.hpp\"\r\n#include \"../mat4x4.hpp\"\r\n#include <cstring>\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_type_ptr extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_type_ptr\r\n\t/// @{\r\n\r\n\t/// Return the constant address to the data of the input parameter.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename genType>\r\n\tGLM_FUNC_DECL typename genType::value_type const * value_ptr(genType const & vec);\r\n\r\n\t/// Build a vector from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tvec2<T, defaultp> make_vec2(T const * const ptr);\r\n\r\n\t/// Build a vector from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tvec3<T, defaultp> make_vec3(T const * const ptr);\r\n\r\n\t/// Build a vector from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tvec4<T, defaultp> make_vec4(T const * const ptr);\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat2x2<T, defaultp> make_mat2x2(T const * const ptr);\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat2x3<T, defaultp> make_mat2x3(T const * const ptr);\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat2x4<T, defaultp> make_mat2x4(T const * const ptr);\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat3x2<T, defaultp> make_mat3x2(T const * const ptr);\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat3x3<T, defaultp> make_mat3x3(T const * const ptr);\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat3x4<T, defaultp> make_mat3x4(T const * const ptr);\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat4x2<T, defaultp> make_mat4x2(\r\n\t\tT const * const ptr);\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat4x3<T, defaultp> make_mat4x3(T const * const ptr);\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, defaultp> make_mat4x4(T const * const ptr);\r\n\t\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat2x2<T, defaultp> make_mat2(T const * const ptr);\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat3x3<T, defaultp> make_mat3(T const * const ptr);\r\n\t\t\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, defaultp> make_mat4(T const * const ptr);\r\n\r\n\t/// Build a quaternion from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tquat<T, defaultp> make_quat(T const * const ptr);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"type_ptr.inl\"\r\n\r\n#endif//GLM_GTC_type_ptr\r\n\r\n"
  },
  {
    "path": "cpu/glm/gtc/type_ptr.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_type_ptr\r\n/// @file glm/gtc/type_ptr.inl\r\n/// @date 2011-06-15 / 2011-12-07\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include <cstring>\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_type_ptr\r\n\t/// @{\r\n\r\n\t/// Return the constant address to the data of the vector input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & vec\r\n\t)\r\n\t{\r\n\t\treturn &(vec.x);\r\n\t}\r\n\r\n\t//! Return the address to the data of the vector input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\r\n\t\tdetail::tvec2<T, P> & vec\r\n\t)\r\n\t{\r\n\t\treturn &(vec.x);\r\n\t}\r\n\r\n\t/// Return the constant address to the data of the vector input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & vec\r\n\t)\r\n\t{\r\n\t\treturn &(vec.x);\r\n\t}\r\n\r\n\t//! Return the address to the data of the vector input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\r\n\t\tdetail::tvec3<T, P> & vec\r\n\t)\r\n\t{\r\n\t\treturn &(vec.x);\r\n\t}\r\n\t\t\r\n\t/// Return the constant address to the data of the vector input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\t\r\n\t\tdetail::tvec4<T, P> const & vec\r\n\t)\r\n\t{\r\n\t\treturn &(vec.x);\r\n\t}\r\n\r\n\t//! Return the address to the data of the vector input.\r\n\t//! From GLM_GTC_type_ptr extension.\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\t\r\n\t\tdetail::tvec4<T, P> & vec\r\n\t)\r\n\t{\r\n\t\treturn &(vec.x);\r\n\t}\r\n\r\n\t/// Return the constant address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tmat2x2<T, P> const & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\r\n\t//! Return the address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\r\n\t\tdetail::tmat2x2<T, P> & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\t\t\r\n\t/// Return the constant address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tmat3x3<T, P> const & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\r\n\t//! Return the address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\r\n\t\tdetail::tmat3x3<T, P> & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\t\t\r\n\t/// Return the constant address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\r\n\t//! Return the address to the data of the matrix input.\r\n\t//! From GLM_GTC_type_ptr extension.\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\r\n\t/// Return the constant address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tmat2x3<T, P> const & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\r\n\t//! Return the address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\r\n\t\tdetail::tmat2x3<T, P> & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\t\t\r\n\t/// Return the constant address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tmat3x2<T, P> const & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\r\n\t//! Return the address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\r\n\t\tdetail::tmat3x2<T, P> & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\t\t\r\n\t/// Return the constant address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tmat2x4<T, P> const & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\r\n\t//! Return the address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\r\n\t\tdetail::tmat2x4<T, P> & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\t\t\r\n\t/// Return the constant address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tmat4x2<T, P> const & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\r\n\t//! Return the address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\t\r\n\t\tdetail::tmat4x2<T, P> & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\t\t\r\n\t/// Return the constant address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tmat3x4<T, P> const & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\r\n\t//! Return the address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\r\n\t\tdetail::tmat3x4<T, P> & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\t\t\r\n\t/// Return the constant address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tmat4x3<T, P> const & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\r\n\t/// Return the address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr(detail::tmat4x3<T, P> & mat)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\r\n\t/// Return the constant address to the data of the input parameter.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn &(q[0]);\r\n\t}\r\n\r\n\t/// Return the address to the data of the quaternion input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\r\n\t\tdetail::tquat<T, P> & q\r\n\t)\r\n\t{\r\n\t\treturn &(q[0]);\r\n\t}\r\n\r\n\t/// Build a vector from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, defaultp> make_vec2(T const * const ptr)\r\n\t{\r\n\t\tdetail::tvec2<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tvec2<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t/// Build a vector from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, defaultp> make_vec3(T const * const ptr)\r\n\t{\r\n\t\tdetail::tvec3<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tvec3<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t/// Build a vector from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, defaultp> make_vec4(T const * const ptr)\r\n\t{\r\n\t\tdetail::tvec4<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tvec4<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat2x2<T, defaultp> make_mat2x2(T const * const ptr)\r\n\t{\r\n\t\tdetail::tmat2x2<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x2<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat2x3<T, defaultp> make_mat2x3(T const * const ptr)\r\n\t{\r\n\t\tdetail::tmat2x3<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x3<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat2x4<T, defaultp> make_mat2x4(T const * const ptr)\r\n\t{\r\n\t\tdetail::tmat2x4<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x4<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x2<T, defaultp> make_mat3x2(T const * const ptr)\r\n\t{\r\n\t\tdetail::tmat3x2<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x2<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//! Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, defaultp> make_mat3x3(T const * const ptr)\r\n\t{\r\n\t\tdetail::tmat3x3<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x3<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//! Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x4<T, defaultp> make_mat3x4(T const * const ptr)\r\n\t{\r\n\t\tdetail::tmat3x4<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x4<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//! Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x2<T, defaultp> make_mat4x2(T const * const ptr)\r\n\t{\r\n\t\tdetail::tmat4x2<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x2<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//! Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x3<T, defaultp> make_mat4x3(T const * const ptr)\r\n\t{\r\n\t\tdetail::tmat4x3<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x3<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//! Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> make_mat4x4(T const * const ptr)\r\n\t{\r\n\t\tdetail::tmat4x4<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x4<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//! Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat2x2<T, defaultp> make_mat2(T const * const ptr)\r\n\t{\r\n\t\treturn make_mat2x2(ptr);\r\n\t}\r\n\r\n\t//! Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, defaultp> make_mat3(T const * const ptr)\r\n\t{\r\n\t\treturn make_mat3x3(ptr);\r\n\t}\r\n\t\t\r\n\t//! Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> make_mat4(T const * const ptr)\r\n\t{\r\n\t\treturn make_mat4x4(ptr);\r\n\t}\r\n\r\n\t//! Build a quaternion from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, defaultp> make_quat(T const * const ptr)\r\n\t{\r\n\t\tdetail::tquat<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tquat<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n"
  },
  {
    "path": "cpu/glm/gtc/ulp.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_ulp\r\n/// @file glm/gtc/ulp.hpp\r\n/// @date 2011-02-21 / 2011-12-12\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtc_ulp GLM_GTC_ulp\r\n/// @ingroup gtc\r\n/// \r\n/// @brief Allow the measurement of the accuracy of a function against a reference \r\n/// implementation. This extension works on floating-point data and provide results \r\n/// in ULP.\r\n/// <glm/gtc/ulp.hpp> need to be included to use these features.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_ulp\r\n#define GLM_GTC_ulp\r\n\r\n// Dependencies\r\n#include \"../detail/setup.hpp\"\r\n#include \"../detail/precision.hpp\"\r\n#include \"../detail/type_int.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_ulp extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_ulp\r\n\t/// @{\r\n\r\n\t/// Return the next ULP value(s) after the input value(s).\r\n\t/// @see gtc_ulp\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType next_float(genType const & x);\r\n\r\n\t/// Return the previous ULP value(s) before the input value(s).\r\n\t/// @see gtc_ulp\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType prev_float(genType const & x);\r\n\r\n\t/// Return the value(s) ULP distance after the input value(s).\r\n\t/// @see gtc_ulp\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType next_float(genType const & x, uint const & Distance);\r\n\r\n\t/// Return the value(s) ULP distance before the input value(s).\r\n\t/// @see gtc_ulp\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType prev_float(genType const & x, uint const & Distance);\r\n\t\r\n\t/// Return the distance in the number of ULP between 2 scalars.\r\n\t/// @see gtc_ulp\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_DECL uint float_distance(T const & x, T const & y);\r\n\r\n\t/// Return the distance in the number of ULP between 2 vectors.\r\n\t/// @see gtc_ulp\r\n\ttemplate<typename T, template<typename> class vecType>\r\n\tGLM_FUNC_DECL vecType<uint> float_distance(vecType<T> const & x, vecType<T> const & y);\r\n\t\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"ulp.inl\"\r\n\r\n#endif//GLM_GTC_ulp\r\n\r\n"
  },
  {
    "path": "cpu/glm/gtc/ulp.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_ulp\r\n/// @file glm/gtc/ulp.inl\r\n/// @date 2011-03-07 / 2012-04-07\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n/// Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\r\n///\r\n/// Developed at SunPro, a Sun Microsystems, Inc. business.\r\n/// Permission to use, copy, modify, and distribute this\r\n/// software is freely granted, provided that this notice\r\n/// is preserved.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../detail/type_int.hpp\"\r\n#include <cmath>\r\n#include <cfloat>\r\n#include <limits>\r\n\r\n#if(GLM_COMPILER & GLM_COMPILER_VC)\r\n#\tpragma warning(push)\r\n#\tpragma warning(disable : 4127)\r\n#endif\r\n\r\ntypedef union\r\n{\r\n\tfloat value;\r\n\t/* FIXME: Assumes 32 bit int.  */\r\n\tunsigned int word;\r\n} ieee_float_shape_type;\r\n\r\ntypedef union\r\n{\r\n\tdouble value;\r\n\tstruct\r\n\t{\r\n\t\tglm::detail::int32 lsw;\r\n\t\tglm::detail::int32 msw;\r\n\t} parts;\r\n} ieee_double_shape_type;\r\n\r\n#define GLM_EXTRACT_WORDS(ix0,ix1,d)\t\t\\\r\n\tdo {\t\t\t\t\t\t\t\t\t\\\r\n\t\tieee_double_shape_type ew_u;\t\t\\\r\n\t\tew_u.value = (d);\t\t\t\t\t\\\r\n\t\t(ix0) = ew_u.parts.msw;\t\t\t\t\\\r\n\t\t(ix1) = ew_u.parts.lsw;\t\t\t\t\\\r\n\t} while (0)\r\n\r\n#define GLM_GET_FLOAT_WORD(i,d)\t\t\t\t\\\r\n\tdo {\t\t\t\t\t\t\t\t\t\\\r\n\t\tieee_float_shape_type gf_u;\t\t\t\\\r\n\t\tgf_u.value = (d);\t\t\t\t\t\\\r\n\t\t(i) = gf_u.word;\t\t\t\t\t\\\r\n\t} while (0)\r\n\r\n#define GLM_SET_FLOAT_WORD(d,i)\t\t\t\t\\\r\n\tdo {\t\t\t\t\t\t\t\t\t\\\r\n\t\tieee_float_shape_type sf_u;\t\t\t\\\r\n\t\tsf_u.word = (i);\t\t\t\t\t\\\r\n\t\t(d) = sf_u.value;\t\t\t\t\t\\\r\n\t} while (0)\r\n\r\n#define GLM_INSERT_WORDS(d,ix0,ix1)\t\t\t\\\r\n\tdo {\t\t\t\t\t\t\t\t\t\\\r\n\t\tieee_double_shape_type iw_u;\t\t\\\r\n\t\tiw_u.parts.msw = (ix0);\t\t\t\t\\\r\n\t\tiw_u.parts.lsw = (ix1);\t\t\t\t\\\r\n\t\t(d) = iw_u.value;\t\t\t\t\t\\\r\n\t} while (0)\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\tGLM_FUNC_QUALIFIER float nextafterf(float x, float y)\r\n\t{\r\n\t\tvolatile float t;\r\n\t\tglm::detail::int32 hx, hy, ix, iy;\r\n\r\n\t\tGLM_GET_FLOAT_WORD(hx, x);\r\n\t\tGLM_GET_FLOAT_WORD(hy, y);\r\n\t\tix = hx&0x7fffffff;\t\t// |x|\r\n\t\tiy = hy&0x7fffffff;\t\t// |y|\r\n\r\n\t\tif((ix>0x7f800000) ||\t// x is nan \r\n\t\t\t(iy>0x7f800000))\t// y is nan \r\n\t\t\treturn x+y;\r\n\t\tif(x==y) return y;\t\t// x=y, return y\r\n\t\tif(ix==0) {\t\t\t\t// x == 0\r\n\t\t\tGLM_SET_FLOAT_WORD(x,(hy&0x80000000)|1);// return +-minsubnormal\r\n\t\t\tt = x*x;\r\n\t\t\tif(t==x) return t; else return x;\t// raise underflow flag\r\n\t\t}\r\n\t\tif(hx>=0) {\t\t\t\t// x > 0 \r\n\t\t\tif(hx>hy) {\t\t\t// x > y, x -= ulp\r\n\t\t\t\thx -= 1;\r\n\t\t\t} else {\t\t\t// x < y, x += ulp\r\n\t\t\t\thx += 1;\r\n\t\t\t}\r\n\t\t} else {\t\t\t\t// x < 0\r\n\t\t\tif(hy>=0||hx>hy){\t// x < y, x -= ulp\r\n\t\t\t\thx -= 1;\r\n\t\t\t} else {\t\t\t// x > y, x += ulp\r\n\t\t\t\thx += 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\thy = hx&0x7f800000;\r\n\t\tif(hy>=0x7f800000) return x+x;  // overflow\r\n\t\tif(hy<0x00800000) {             // underflow\r\n\t\t\tt = x*x;\r\n\t\t\tif(t!=x) {          // raise underflow flag\r\n\t\t\t\tGLM_SET_FLOAT_WORD(y,hx);\r\n\t\t\t\treturn y;\r\n\t\t\t}\r\n\t\t}\r\n\t\tGLM_SET_FLOAT_WORD(x,hx);\r\n\t\treturn x;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER double nextafter(double x, double y)\r\n\t{\r\n\t\tvolatile double t;\r\n\t\tglm::detail::int32 hx, hy, ix, iy;\r\n\t\tglm::detail::uint32 lx, ly;\r\n\r\n\t\tGLM_EXTRACT_WORDS(hx, lx, x);\r\n\t\tGLM_EXTRACT_WORDS(hy, ly, y);\r\n\t\tix = hx & 0x7fffffff;             // |x| \r\n\t\tiy = hy & 0x7fffffff;             // |y| \r\n\r\n\t\tif(((ix>=0x7ff00000)&&((ix-0x7ff00000)|lx)!=0) ||   // x is nan\r\n\t\t\t((iy>=0x7ff00000)&&((iy-0x7ff00000)|ly)!=0))     // y is nan\r\n\t\t\treturn x+y;\r\n\t\tif(x==y) return y;              // x=y, return y\r\n\t\tif((ix|lx)==0) {                        // x == 0 \r\n\t\t\tGLM_INSERT_WORDS(x, hy & 0x80000000, 1);    // return +-minsubnormal\r\n\t\t\tt = x*x;\r\n\t\t\tif(t==x) return t; else return x;   // raise underflow flag \r\n\t\t}\r\n\t\tif(hx>=0) {                             // x > 0 \r\n\t\t\tif(hx>hy||((hx==hy)&&(lx>ly))) {    // x > y, x -= ulp \r\n\t\t\t\tif(lx==0) hx -= 1;\r\n\t\t\t\tlx -= 1;\r\n\t\t\t} else {                            // x < y, x += ulp\r\n\t\t\t\tlx += 1;\r\n\t\t\t\tif(lx==0) hx += 1;\r\n\t\t\t}\r\n\t\t} else {                                // x < 0 \r\n\t\t\tif(hy>=0||hx>hy||((hx==hy)&&(lx>ly))){// x < y, x -= ulp\r\n\t\t\t\tif(lx==0) hx -= 1;\r\n\t\t\t\tlx -= 1;\r\n\t\t\t} else {                            // x > y, x += ulp\r\n\t\t\t\tlx += 1;\r\n\t\t\t\tif(lx==0) hx += 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\thy = hx&0x7ff00000;\r\n\t\tif(hy>=0x7ff00000) return x+x;  // overflow\r\n\t\tif(hy<0x00100000) {             // underflow\r\n\t\t\tt = x*x;\r\n\t\t\tif(t!=x) {          // raise underflow flag\r\n\t\t\t\tGLM_INSERT_WORDS(y,hx,lx);\r\n\t\t\t\treturn y;\r\n\t\t\t}\r\n\t\t}\r\n\t\tGLM_INSERT_WORDS(x,hx,lx);\r\n\t\treturn x;\r\n\t}\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#if(GLM_COMPILER & GLM_COMPILER_VC)\r\n#\tpragma warning(pop)\r\n#endif\r\n\r\n#if((GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS)))\r\n#\tdefine GLM_NEXT_AFTER_FLT(x, toward) glm::detail::nextafterf((x), (toward))\r\n#\tdefine GLM_NEXT_AFTER_DBL(x, toward) _nextafter((x), (toward))\r\n#else\r\n#\tdefine GLM_NEXT_AFTER_FLT(x, toward) nextafterf((x), (toward))\r\n#\tdefine GLM_NEXT_AFTER_DBL(x, toward) nextafter((x), (toward))\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\tGLM_FUNC_QUALIFIER float next_float(float const & x)\r\n\t{\r\n\t\treturn GLM_NEXT_AFTER_FLT(x, std::numeric_limits<float>::max());\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER double next_float(double const & x)\r\n\t{\r\n\t\treturn GLM_NEXT_AFTER_DBL(x, std::numeric_limits<double>::max());\r\n\t}\r\n\r\n\ttemplate<typename T, precision P, template<typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> next_float(vecType<T, P> const & x)\r\n\t{\r\n\t\tvecType<T, P> Result;\r\n\t\tfor(length_t i = 0; i < Result.length(); ++i)\r\n\t\t\tResult[i] = next_float(x[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER float prev_float(float const & x)\r\n\t{\r\n\t\treturn GLM_NEXT_AFTER_FLT(x, std::numeric_limits<float>::min());\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER double prev_float(double const & x)\r\n\t{\r\n\t\treturn GLM_NEXT_AFTER_DBL(x, std::numeric_limits<double>::min());\r\n\t}\r\n\r\n\ttemplate<typename T, precision P, template<typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> prev_float(vecType<T, P> const & x)\r\n\t{\r\n\t\tvecType<T, P> Result;\r\n\t\tfor(length_t i = 0; i < Result.length(); ++i)\r\n\t\t\tResult[i] = prev_float(x[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T next_float(T const & x, uint const & ulps)\r\n\t{\r\n\t\tT temp = x;\r\n\t\tfor(uint i = 0; i < ulps; ++i)\r\n\t\t\ttemp = next_float(temp);\r\n\t\treturn temp;\r\n\t}\r\n\r\n\ttemplate<typename T, precision P, template<typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> next_float(vecType<T, P> const & x, vecType<uint, P> const & ulps)\r\n\t{\r\n\t\tvecType<T, P> Result;\r\n\t\tfor(uint i = 0; i < Result.length(); ++i)\r\n\t\t\tResult[i] = next_float(x[i], ulps[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T prev_float(T const & x, uint const & ulps)\r\n\t{\r\n\t\tT temp = x;\r\n\t\tfor(uint i = 0; i < ulps; ++i)\r\n\t\t\ttemp = prev_float(temp);\r\n\t\treturn temp;\r\n\t}\r\n\r\n\ttemplate<typename T, precision P, template<typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> prev_float(vecType<T, P> const & x, vecType<uint, P> const & ulps)\r\n\t{\r\n\t\tvecType<T, P> Result;\r\n\t\tfor(length_t i = 0; i < Result.length(); ++i)\r\n\t\t\tResult[i] = prev_float(x[i], ulps[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER uint float_distance(T const & x, T const & y)\r\n\t{\r\n\t\tuint ulp = 0;\r\n\r\n\t\tif(x < y)\r\n\t\t{\r\n\t\t\tT temp = x;\r\n\t\t\twhile(temp != y)// && ulp < std::numeric_limits<std::size_t>::max())\r\n\t\t\t{\r\n\t\t\t\t++ulp;\r\n\t\t\t\ttemp = next_float(temp);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(y < x)\r\n\t\t{\r\n\t\t\tT temp = y;\r\n\t\t\twhile(temp != x)// && ulp < std::numeric_limits<std::size_t>::max())\r\n\t\t\t{\r\n\t\t\t\t++ulp;\r\n\t\t\t\ttemp = next_float(temp);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse // ==\r\n\t\t{\r\n\r\n\t\t}\r\n\r\n\t\treturn ulp;\r\n\t}\r\n\r\n\ttemplate<typename T, precision P, template<typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<uint, P> float_distance(vecType<T, P> const & x, vecType<T, P> const & y)\r\n\t{\r\n\t\tvecType<uint, P> Result;\r\n\t\tfor(length_t i = 0; i < Result.length(); ++i)\r\n\t\t\tResult[i] = float_distance(x[i], y[i]);\r\n\t\treturn Result;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/associated_min_max.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_associated_min_max\r\n/// @file glm/gtx/associated_min_max.hpp\r\n/// @date 2008-03-10 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_extented_min_max (dependence)\r\n///\r\n/// @defgroup gtx_associated_min_max GLM_GTX_associated_min_max\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Min and max functions that return associated values not the compared onces.\r\n/// <glm/gtx/associated_min_max.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_associated_min_max\r\n#define GLM_GTX_associated_min_max\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_associated_min_max extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_associated_min_max\r\n\t/// @{\r\n\r\n\t/// Min comparison between 2 variables\r\n\t/// @see gtx_associated_min_max\r\n\ttemplate<typename genTypeT, typename genTypeU>\r\n\tgenTypeU associatedMin(\r\n\t\tconst genTypeT& x, const genTypeU& a, \r\n\t\tconst genTypeT& y, const genTypeU& b);\r\n\r\n\t/// Min comparison between 3 variables\r\n\t/// @see gtx_associated_min_max\r\n\ttemplate<typename genTypeT, typename genTypeU>\r\n\tgenTypeU associatedMin(\r\n\t\tconst genTypeT& x, const genTypeU& a, \r\n\t\tconst genTypeT& y, const genTypeU& b, \r\n\t\tconst genTypeT& z, const genTypeU& c);\r\n\r\n\t/// Min comparison between 4 variables\r\n\t/// @see gtx_associated_min_max\r\n\ttemplate<typename genTypeT, typename genTypeU>\r\n\tgenTypeU associatedMin(\r\n\t\tconst genTypeT& x, const genTypeU& a, \r\n\t\tconst genTypeT& y, const genTypeU& b, \r\n\t\tconst genTypeT& z, const genTypeU& c, \r\n\t\tconst genTypeT& w, const genTypeU& d);\r\n\r\n\t/// Max comparison between 2 variables\r\n\t/// @see gtx_associated_min_max\r\n\ttemplate<typename genTypeT, typename genTypeU>\r\n\tgenTypeU associatedMax(\r\n\t\tconst genTypeT& x, const genTypeU& a, \r\n\t\tconst genTypeT& y, const genTypeU& b);\r\n\r\n\t/// Max comparison between 3 variables\r\n\t/// @see gtx_associated_min_max\r\n\ttemplate<typename genTypeT, typename genTypeU>\r\n\tgenTypeU associatedMax(\r\n\t\tconst genTypeT& x, const genTypeU& a, \r\n\t\tconst genTypeT& y, const genTypeU& b, \r\n\t\tconst genTypeT& z, const genTypeU& c);\r\n\r\n\t/// Max comparison between 4 variables\r\n\t/// @see gtx_associated_min_max\r\n\ttemplate<typename genTypeT, typename genTypeU>\r\n\tgenTypeU associatedMax(\r\n\t\tconst genTypeT& x, const genTypeU& a, \r\n\t\tconst genTypeT& y, const genTypeU& b, \r\n\t\tconst genTypeT& z, const genTypeU& c, \r\n\t\tconst genTypeT& w, const genTypeU& d);\r\n\r\n\t/// @}\r\n} //namespace glm\r\n\r\n#include \"associated_min_max.inl\"\r\n\r\n#endif//GLM_GTX_associated_min_max\r\n"
  },
  {
    "path": "cpu/glm/gtx/associated_min_max.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2008-03-10\r\n// Updated : 2008-03-15\r\n// Licence : This source is under MIT License\r\n// File    : gtx_associated_min_max.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\n\r\n// Min comparison between 2 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER U associatedMin(T x, U a, T y, U b)\r\n{\r\n\treturn x < y ? a : b;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMin\r\n(\r\n\tconst detail::tvec2<T, P>& x, const detail::tvec2<U, P>& a,\r\n\tconst detail::tvec2<T, P>& y, const detail::tvec2<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\t//Result.x = x[0] < y[0] ? a[0] : b[0];\r\n\t//Result.y = x[1] < y[1] ? a[1] : b[1];\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] < y[i] ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMin\r\n(\r\n\tconst detail::tvec3<T, P>& x, const detail::tvec3<U, P>& a,\r\n\tconst detail::tvec3<T, P>& y, const detail::tvec3<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] < y[i] ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMin\r\n(\r\n\tconst detail::tvec4<T, P>& x, const detail::tvec4<U, P>& a,\r\n\tconst detail::tvec4<T, P>& y, const detail::tvec4<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] < y[i] ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMin\r\n(\r\n\tT x, const detail::tvec2<U, P>& a,\r\n\tT y, const detail::tvec2<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x < y ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMin\r\n(\r\n\tT x, const detail::tvec3<U, P>& a,\r\n\tT y, const detail::tvec3<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x < y ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMin\r\n(\r\n\tT x, const detail::tvec4<U, P>& a,\r\n\tT y, const detail::tvec4<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x < y ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMin\r\n(\r\n\tdetail::tvec2<T, P> const & x, U a,\r\n\tdetail::tvec2<T, P> const & y, U b\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] < y[i] ? a : b;\r\n\treturn Result;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMin\r\n(\r\n\tconst detail::tvec3<T, P>& x, U a,\r\n\tconst detail::tvec3<T, P>& y, U b\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] < y[i] ? a : b;\r\n\treturn Result;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMin\r\n(\r\n\tconst detail::tvec4<T, P>& x, U a,\r\n\tconst detail::tvec4<T, P>& y, U b\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] < y[i] ? a : b;\r\n\treturn Result;\r\n}\r\n\r\n// Min comparison between 3 variables\r\ntemplate<typename T, typename U>\r\nGLM_FUNC_QUALIFIER U associatedMin\r\n(\r\n\tT x, U a,\r\n\tT y, U b,\r\n\tT z, U c\r\n)\r\n{\r\n\tU Result = x < y ? (x < z ? a : c) : (y < z ? b : c);\r\n\treturn Result;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMin\r\n(\r\n\tconst detail::tvec2<T, P>& x, const detail::tvec2<U, P>& a,\r\n\tconst detail::tvec2<T, P>& y, const detail::tvec2<U, P>& b,\r\n\tconst detail::tvec2<T, P>& z, const detail::tvec2<U, P>& c\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]);\r\n\treturn Result;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMin\r\n(\r\n\tconst detail::tvec3<T, P>& x, const detail::tvec3<U, P>& a,\r\n\tconst detail::tvec3<T, P>& y, const detail::tvec3<U, P>& b,\r\n\tconst detail::tvec3<T, P>& z, const detail::tvec3<U, P>& c\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]);\r\n\treturn Result;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMin\r\n(\r\n\tconst detail::tvec4<T, P>& x, const detail::tvec4<U, P>& a,\r\n\tconst detail::tvec4<T, P>& y, const detail::tvec4<U, P>& b,\r\n\tconst detail::tvec4<T, P>& z, const detail::tvec4<U, P>& c\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]);\r\n\treturn Result;\r\n}\r\n\r\n// Min comparison between 4 variables\r\ntemplate<typename T, typename U>\r\nGLM_FUNC_QUALIFIER U associatedMin\r\n(\r\n\tT x, U a,\r\n\tT y, U b,\r\n\tT z, U c,\r\n\tT w, U d\r\n)\r\n{\r\n\tT Test1 = min(x, y);\r\n\tT Test2 = min(z, w);;\r\n\tU Result1 = x < y ? a : b;\r\n\tU Result2 = z < w ? c : d;\r\n\tU Result = Test1 < Test2 ? Result1 : Result2;\r\n\treturn Result;\r\n}\r\n\r\n// Min comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMin\r\n(\r\n\tconst detail::tvec2<T, P>& x, const detail::tvec2<U, P>& a,\r\n\tconst detail::tvec2<T, P>& y, const detail::tvec2<U, P>& b,\r\n\tconst detail::tvec2<T, P>& z, const detail::tvec2<U, P>& c,\r\n\tconst detail::tvec2<T, P>& w, const detail::tvec2<U, P>& d\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tT Test1 = min(x[i], y[i]);\r\n\t\tT Test2 = min(z[i], w[i]);\r\n\t\tU Result1 = x[i] < y[i] ? a[i] : b[i];\r\n\t\tU Result2 = z[i] < w[i] ? c[i] : d[i];\r\n\t\tResult[i] = Test1 < Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Min comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMin\r\n(\r\n\tconst detail::tvec3<T, P>& x, const detail::tvec3<U, P>& a,\r\n\tconst detail::tvec3<T, P>& y, const detail::tvec3<U, P>& b,\r\n\tconst detail::tvec3<T, P>& z, const detail::tvec3<U, P>& c,\r\n\tconst detail::tvec3<T, P>& w, const detail::tvec3<U, P>& d\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tT Test1 = min(x[i], y[i]);\r\n\t\tT Test2 = min(z[i], w[i]);\r\n\t\tU Result1 = x[i] < y[i] ? a[i] : b[i];\r\n\t\tU Result2 = z[i] < w[i] ? c[i] : d[i];\r\n\t\tResult[i] = Test1 < Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Min comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMin\r\n(\r\n\tconst detail::tvec4<T, P>& x, const detail::tvec4<U, P>& a,\r\n\tconst detail::tvec4<T, P>& y, const detail::tvec4<U, P>& b,\r\n\tconst detail::tvec4<T, P>& z, const detail::tvec4<U, P>& c,\r\n\tconst detail::tvec4<T, P>& w, const detail::tvec4<U, P>& d\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tT Test1 = min(x[i], y[i]);\r\n\t\tT Test2 = min(z[i], w[i]);\r\n\t\tU Result1 = x[i] < y[i] ? a[i] : b[i];\r\n\t\tU Result2 = z[i] < w[i] ? c[i] : d[i];\r\n\t\tResult[i] = Test1 < Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Min comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMin\r\n(\r\n\tT x, const detail::tvec2<U, P>& a,\r\n\tT y, const detail::tvec2<U, P>& b,\r\n\tT z, const detail::tvec2<U, P>& c,\r\n\tT w, const detail::tvec2<U, P>& d\r\n)\r\n{\r\n\tT Test1 = min(x, y);\r\n\tT Test2 = min(z, w);\r\n\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tU Result1 = x < y ? a[i] : b[i];\r\n\t\tU Result2 = z < w ? c[i] : d[i];\r\n\t\tResult[i] = Test1 < Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Min comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMin\r\n(\r\n\tT x, const detail::tvec3<U, P>& a,\r\n\tT y, const detail::tvec3<U, P>& b,\r\n\tT z, const detail::tvec3<U, P>& c,\r\n\tT w, const detail::tvec3<U, P>& d\r\n)\r\n{\r\n\tT Test1 = min(x, y);\r\n\tT Test2 = min(z, w);\r\n\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < detail::tvec3<U, P>::value_size; ++i)\r\n\t{\r\n\t\tU Result1 = x < y ? a[i] : b[i];\r\n\t\tU Result2 = z < w ? c[i] : d[i];\r\n\t\tResult[i] = Test1 < Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Min comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMin\r\n(\r\n\tT x, const detail::tvec4<U, P>& a,\r\n\tT y, const detail::tvec4<U, P>& b,\r\n\tT z, const detail::tvec4<U, P>& c,\r\n\tT w, const detail::tvec4<U, P>& d\r\n)\r\n{\r\n\tT Test1 = min(x, y);\r\n\tT Test2 = min(z, w);\r\n\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < detail::tvec4<U, P>::value_size; ++i)\r\n\t{\r\n\t\tU Result1 = x < y ? a[i] : b[i];\r\n\t\tU Result2 = z < w ? c[i] : d[i];\r\n\t\tResult[i] = Test1 < Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Min comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMin\r\n(\r\n\tconst detail::tvec2<T, P>& x, U a,\r\n\tconst detail::tvec2<T, P>& y, U b,\r\n\tconst detail::tvec2<T, P>& z, U c,\r\n\tconst detail::tvec2<T, P>& w, U d\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<T, P>::size_type i = 0; i < detail::tvec2<T, P>::value_size(); ++i)\r\n\t{\r\n\t\tT Test1 = min(x[i], y[i]);\r\n\t\tT Test2 = min(z[i], w[i]);;\r\n\t\tU Result1 = x[i] < y[i] ? a : b;\r\n\t\tU Result2 = z[i] < w[i] ? c : d;\r\n\t\tResult[i] = Test1 < Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Min comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMin\r\n(\r\n\tconst detail::tvec3<T, P>& x, U a,\r\n\tconst detail::tvec3<T, P>& y, U b,\r\n\tconst detail::tvec3<T, P>& z, U c,\r\n\tconst detail::tvec3<T, P>& w, U d\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<T, P>::size_type i = 0; i < detail::tvec3<T, P>::value_size(); ++i)\r\n\t{\r\n\t\tT Test1 = min(x[i], y[i]);\r\n\t\tT Test2 = min(z[i], w[i]);;\r\n\t\tU Result1 = x[i] < y[i] ? a : b;\r\n\t\tU Result2 = z[i] < w[i] ? c : d;\r\n\t\tResult[i] = Test1 < Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Min comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMin\r\n(\r\n\tconst detail::tvec4<T, P>& x, U a,\r\n\tconst detail::tvec4<T, P>& y, U b,\r\n\tconst detail::tvec4<T, P>& z, U c,\r\n\tconst detail::tvec4<T, P>& w, U d\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<T, P>::size_type i = 0; i < detail::tvec4<T, P>::value_size(); ++i)\r\n\t{\r\n\t\tT Test1 = min(x[i], y[i]);\r\n\t\tT Test2 = min(z[i], w[i]);;\r\n\t\tU Result1 = x[i] < y[i] ? a : b;\r\n\t\tU Result2 = z[i] < w[i] ? c : d;\r\n\t\tResult[i] = Test1 < Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 2 variables\r\ntemplate<typename T, typename U>\r\nGLM_FUNC_QUALIFIER U associatedMax(T x, U a, T y, U b)\r\n{\r\n\treturn x > y ? a : b;\r\n}\r\n\r\n// Max comparison between 2 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMax\r\n(\r\n\tconst detail::tvec2<T, P>& x, const detail::tvec2<U, P>& a,\r\n\tconst detail::tvec2<T, P>& y, const detail::tvec2<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 2 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMax\r\n(\r\n\tconst detail::tvec3<T, P>& x, const detail::tvec3<U, P>& a,\r\n\tconst detail::tvec3<T, P>& y, const detail::tvec3<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 2 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMax\r\n(\r\n\tconst detail::tvec4<T, P>& x, const detail::tvec4<U, P>& a,\r\n\tconst detail::tvec4<T, P>& y, const detail::tvec4<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 2 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMax\r\n(\r\n\tT x, const detail::tvec2<U, P>& a,\r\n\tT y, const detail::tvec2<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x > y ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 2 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMax\r\n(\r\n\tT x, const detail::tvec3<U, P>& a,\r\n\tT y, const detail::tvec3<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x > y ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 2 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMax\r\n(\r\n\tT x, const detail::tvec4<U, P>& a,\r\n\tT y, const detail::tvec4<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x > y ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 2 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMax\r\n(\r\n\tconst detail::tvec2<T, P>& x, U a,\r\n\tconst detail::tvec2<T, P>& y, U b\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<T, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? a : b;\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 2 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMax\r\n(\r\n\tconst detail::tvec3<T, P>& x, U a,\r\n\tconst detail::tvec3<T, P>& y, U b\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<T, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? a : b;\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 2 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMax\r\n(\r\n\tconst detail::tvec4<T, P>& x, U a,\r\n\tconst detail::tvec4<T, P>& y, U b\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<T, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? a : b;\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 3 variables\r\ntemplate<typename T, typename U>\r\nGLM_FUNC_QUALIFIER U associatedMax\r\n(\r\n\tT x, U a,\r\n\tT y, U b,\r\n\tT z, U c\r\n)\r\n{\r\n\tU Result = x > y ? (x > z ? a : c) : (y > z ? b : c);\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 3 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMax\r\n(\r\n\tconst detail::tvec2<T, P>& x, const detail::tvec2<U, P>& a,\r\n\tconst detail::tvec2<T, P>& y, const detail::tvec2<U, P>& b,\r\n\tconst detail::tvec2<T, P>& z, const detail::tvec2<U, P>& c\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]);\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 3 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMax\r\n(\r\n\tconst detail::tvec3<T, P>& x, const detail::tvec3<U, P>& a,\r\n\tconst detail::tvec3<T, P>& y, const detail::tvec3<U, P>& b,\r\n\tconst detail::tvec3<T, P>& z, const detail::tvec3<U, P>& c\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]);\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 3 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMax\r\n(\r\n\tconst detail::tvec4<T, P>& x, const detail::tvec4<U, P>& a,\r\n\tconst detail::tvec4<T, P>& y, const detail::tvec4<U, P>& b,\r\n\tconst detail::tvec4<T, P>& z, const detail::tvec4<U, P>& c\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]);\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 3 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMax\r\n(\r\n\tT x, const detail::tvec2<U, P>& a,\r\n\tT y, const detail::tvec2<U, P>& b,\r\n\tT z, const detail::tvec2<U, P>& c\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]);\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 3 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMax\r\n(\r\n\tT x, const detail::tvec3<U, P>& a,\r\n\tT y, const detail::tvec3<U, P>& b,\r\n\tT z, const detail::tvec3<U, P>& c\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]);\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 3 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMax\r\n(\r\n\tT x, const detail::tvec4<U, P>& a,\r\n\tT y, const detail::tvec4<U, P>& b,\r\n\tT z, const detail::tvec4<U, P>& c\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]);\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 3 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMax\r\n(\r\n\tconst detail::tvec2<T, P>& x, U a,\r\n\tconst detail::tvec2<T, P>& y, U b,\r\n\tconst detail::tvec2<T, P>& z, U c\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<T, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c);\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 3 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMax\r\n(\r\n\tconst detail::tvec3<T, P>& x, U a,\r\n\tconst detail::tvec3<T, P>& y, U b,\r\n\tconst detail::tvec3<T, P>& z, U c\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<T, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c);\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 3 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMax\r\n(\r\n\tconst detail::tvec4<T, P>& x, U a,\r\n\tconst detail::tvec4<T, P>& y, U b,\r\n\tconst detail::tvec4<T, P>& z, U c\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<T, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c);\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 4 variables\r\ntemplate<typename T, typename U>\r\nGLM_FUNC_QUALIFIER U associatedMax\r\n(\r\n\tT x, U a,\r\n\tT y, U b,\r\n\tT z, U c,\r\n\tT w, U d\r\n)\r\n{\r\n\tT Test1 = max(x, y);\r\n\tT Test2 = max(z, w);;\r\n\tU Result1 = x > y ? a : b;\r\n\tU Result2 = z > w ? c : d;\r\n\tU Result = Test1 > Test2 ? Result1 : Result2;\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMax\r\n(\r\n\tconst detail::tvec2<T, P>& x, const detail::tvec2<U, P>& a,\r\n\tconst detail::tvec2<T, P>& y, const detail::tvec2<U, P>& b,\r\n\tconst detail::tvec2<T, P>& z, const detail::tvec2<U, P>& c,\r\n\tconst detail::tvec2<T, P>& w, const detail::tvec2<U, P>& d\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tT Test1 = max(x[i], y[i]);\r\n\t\tT Test2 = max(z[i], w[i]);\r\n\t\tU Result1 = x[i] > y[i] ? a[i] : b[i];\r\n\t\tU Result2 = z[i] > w[i] ? c[i] : d[i];\r\n\t\tResult[i] = Test1 > Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMax\r\n(\r\n\tconst detail::tvec3<T, P>& x, const detail::tvec3<U, P>& a,\r\n\tconst detail::tvec3<T, P>& y, const detail::tvec3<U, P>& b,\r\n\tconst detail::tvec3<T, P>& z, const detail::tvec3<U, P>& c,\r\n\tconst detail::tvec3<T, P>& w, const detail::tvec3<U, P>& d\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tT Test1 = max(x[i], y[i]);\r\n\t\tT Test2 = max(z[i], w[i]);\r\n\t\tU Result1 = x[i] > y[i] ? a[i] : b[i];\r\n\t\tU Result2 = z[i] > w[i] ? c[i] : d[i];\r\n\t\tResult[i] = Test1 > Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMax\r\n(\r\n\tconst detail::tvec4<T, P>& x, const detail::tvec4<U, P>& a,\r\n\tconst detail::tvec4<T, P>& y, const detail::tvec4<U, P>& b,\r\n\tconst detail::tvec4<T, P>& z, const detail::tvec4<U, P>& c,\r\n\tconst detail::tvec4<T, P>& w, const detail::tvec4<U, P>& d\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tT Test1 = max(x[i], y[i]);\r\n\t\tT Test2 = max(z[i], w[i]);\r\n\t\tU Result1 = x[i] > y[i] ? a[i] : b[i];\r\n\t\tU Result2 = z[i] > w[i] ? c[i] : d[i];\r\n\t\tResult[i] = Test1 > Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMax\r\n(\r\n\tT x, const detail::tvec2<U, P>& a,\r\n\tT y, const detail::tvec2<U, P>& b,\r\n\tT z, const detail::tvec2<U, P>& c,\r\n\tT w, const detail::tvec2<U, P>& d\r\n)\r\n{\r\n\tT Test1 = max(x, y);\r\n\tT Test2 = max(z, w);\r\n\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tU Result1 = x > y ? a[i] : b[i];\r\n\t\tU Result2 = z > w ? c[i] : d[i];\r\n\t\tResult[i] = Test1 > Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMax\r\n(\r\n\tT x, const detail::tvec3<U, P>& a,\r\n\tT y, const detail::tvec3<U, P>& b,\r\n\tT z, const detail::tvec3<U, P>& c,\r\n\tT w, const detail::tvec3<U, P>& d\r\n)\r\n{\r\n\tT Test1 = max(x, y);\r\n\tT Test2 = max(z, w);\r\n\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tU Result1 = x > y ? a[i] : b[i];\r\n\t\tU Result2 = z > w ? c[i] : d[i];\r\n\t\tResult[i] = Test1 > Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMax\r\n(\r\n\tT x, const detail::tvec4<U, P>& a,\r\n\tT y, const detail::tvec4<U, P>& b,\r\n\tT z, const detail::tvec4<U, P>& c,\r\n\tT w, const detail::tvec4<U, P>& d\r\n)\r\n{\r\n\tT Test1 = max(x, y);\r\n\tT Test2 = max(z, w);\r\n\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tU Result1 = x > y ? a[i] : b[i];\r\n\t\tU Result2 = z > w ? c[i] : d[i];\r\n\t\tResult[i] = Test1 > Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMax\r\n(\r\n\tconst detail::tvec2<T, P>& x, U a,\r\n\tconst detail::tvec2<T, P>& y, U b,\r\n\tconst detail::tvec2<T, P>& z, U c,\r\n\tconst detail::tvec2<T, P>& w, U d\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<T, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tT Test1 = max(x[i], y[i]);\r\n\t\tT Test2 = max(z[i], w[i]);;\r\n\t\tU Result1 = x[i] > y[i] ? a : b;\r\n\t\tU Result2 = z[i] > w[i] ? c : d;\r\n\t\tResult[i] = Test1 > Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMax\r\n(\r\n\tconst detail::tvec3<T, P>& x, U a,\r\n\tconst detail::tvec3<T, P>& y, U b,\r\n\tconst detail::tvec3<T, P>& z, U c,\r\n\tconst detail::tvec3<T, P>& w, U d\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<T, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tT Test1 = max(x[i], y[i]);\r\n\t\tT Test2 = max(z[i], w[i]);;\r\n\t\tU Result1 = x[i] > y[i] ? a : b;\r\n\t\tU Result2 = z[i] > w[i] ? c : d;\r\n\t\tResult[i] = Test1 > Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMax\r\n(\r\n\tconst detail::tvec4<T, P>& x, U a,\r\n\tconst detail::tvec4<T, P>& y, U b,\r\n\tconst detail::tvec4<T, P>& z, U c,\r\n\tconst detail::tvec4<T, P>& w, U d\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<T, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tT Test1 = max(x[i], y[i]);\r\n\t\tT Test2 = max(z[i], w[i]);;\r\n\t\tU Result1 = x[i] > y[i] ? a : b;\r\n\t\tU Result2 = z[i] > w[i] ? c : d;\r\n\t\tResult[i] = Test1 > Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/bit.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_bit\r\n/// @file glm/gtx/bit.hpp\r\n/// @date 2007-03-14 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_half_float (dependence)\r\n///\r\n/// @defgroup gtx_bit GLM_GTX_bit\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Allow to perform bit operations on integer values\r\n/// \r\n/// <glm/gtx/bit.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_bit\r\n#define GLM_GTX_bit\r\n\r\n// Dependencies\r\n#include \"../detail/type_int.hpp\"\r\n#include \"../detail/setup.hpp\"\r\n#include <cstddef>\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_bit extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_bit\r\n\t/// @{\r\n\r\n\t/// Build a mask of 'count' bits\r\n\t/// @see gtx_bit\r\n\ttemplate <typename genIType>\r\n\tGLM_FUNC_DECL genIType mask(genIType const & count);\r\n\r\n\t//! Find the highest bit set to 1 in a integer variable and return its value. \r\n\t/// @see gtx_bit\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType highestBitValue(genType const & value);\r\n\r\n\t//! Return true if the value is a power of two number. \r\n\t/// @see gtx_bit\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL bool isPowerOfTwo(genType const & value);\r\n\r\n\t//! Return the power of two number which value is just higher the input value.\r\n\t/// @see gtx_bit\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType powerOfTwoAbove(genType const & value);\r\n\r\n\t//! Return the power of two number which value is just lower the input value. \r\n\t/// @see gtx_bit\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType powerOfTwoBelow(genType const & value);\r\n\r\n\t//! Return the power of two number which value is the closet to the input value. \r\n\t/// @see gtx_bit\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType powerOfTwoNearest(genType const & value);\r\n\r\n\t//! Revert all bits of any integer based type. \r\n\t/// @see gtx_bit\r\n\ttemplate <typename genType> \r\n\tGLM_DEPRECATED GLM_FUNC_DECL genType bitRevert(genType const & value);\r\n\r\n\t//! Rotate all bits to the right.\r\n\t/// @see gtx_bit\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType bitRotateRight(genType const & In, std::size_t Shift);\r\n\r\n\t//! Rotate all bits to the left.\r\n\t/// @see gtx_bit\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType bitRotateLeft(genType const & In, std::size_t Shift);\r\n\r\n\t//! Set to 1 a range of bits.\r\n\t/// @see gtx_bit\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_DECL genIUType fillBitfieldWithOne(\r\n\t\tgenIUType const & Value,\r\n\t\tint const & FromBit, \r\n\t\tint const & ToBit);\r\n\r\n\t//! Set to 0 a range of bits.\r\n\t/// @see gtx_bit\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_DECL genIUType fillBitfieldWithZero(\r\n\t\tgenIUType const & Value,\r\n\t\tint const & FromBit, \r\n\t\tint const & ToBit);\r\n\r\n\t/// Interleaves the bits of x and y. \r\n\t/// The first bit is the first bit of x followed by the first bit of y.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL int16 bitfieldInterleave(int8 x, int8 y);\r\n\r\n\t/// Interleaves the bits of x and y. \r\n\t/// The first bit is the first bit of x followed by the first bit of y.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL uint16 bitfieldInterleave(uint8 x, uint8 y);\r\n\r\n\t/// Interleaves the bits of x and y. \r\n\t/// The first bit is the first bit of x followed by the first bit of y.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL int32 bitfieldInterleave(int16 x, int16 y);\r\n\r\n\t/// Interleaves the bits of x and y. \r\n\t/// The first bit is the first bit of x followed by the first bit of y.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL uint32 bitfieldInterleave(uint16 x, uint16 y);\r\n\r\n\t/// Interleaves the bits of x and y. \r\n\t/// The first bit is the first bit of x followed by the first bit of y.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL int64 bitfieldInterleave(int32 x, int32 y);\r\n\r\n\t/// Interleaves the bits of x and y. \r\n\t/// The first bit is the first bit of x followed by the first bit of y.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL uint64 bitfieldInterleave(uint32 x, uint32 y);\r\n\r\n\t/// Interleaves the bits of x, y and z. \r\n\t/// The first bit is the first bit of x followed by the first bit of y and the first bit of z.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL int32 bitfieldInterleave(int8 x, int8 y, int8 z);\r\n\r\n\t/// Interleaves the bits of x, y and z. \r\n\t/// The first bit is the first bit of x followed by the first bit of y and the first bit of z.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z);\r\n\r\n\t/// Interleaves the bits of x, y and z. \r\n\t/// The first bit is the first bit of x followed by the first bit of y and the first bit of z.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL int64 bitfieldInterleave(int16 x, int16 y, int16 z);\r\n\r\n\t/// Interleaves the bits of x, y and z. \r\n\t/// The first bit is the first bit of x followed by the first bit of y and the first bit of z.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z);\r\n\r\n\t/// Interleaves the bits of x, y and z. \r\n\t/// The first bit is the first bit of x followed by the first bit of y and the first bit of z.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL int64 bitfieldInterleave(int32 x, int32 y, int32 z);\r\n\r\n\t/// Interleaves the bits of x, y and z. \r\n\t/// The first bit is the first bit of x followed by the first bit of y and the first bit of z.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL uint64 bitfieldInterleave(uint32 x, uint32 y, uint32 z);\r\n\r\n\t/// Interleaves the bits of x, y, z and w. \r\n\t/// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL int32 bitfieldInterleave(int8 x, int8 y, int8 z, int8 w);\r\n\r\n\t/// Interleaves the bits of x, y, z and w. \r\n\t/// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z, uint8 w);\r\n\r\n\t/// Interleaves the bits of x, y, z and w. \r\n\t/// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL int64 bitfieldInterleave(int16 x, int16 y, int16 z, int16 w);\r\n\r\n\t/// Interleaves the bits of x, y, z and w. \r\n\t/// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w);\r\n\r\n\t/// @}\r\n} //namespace glm\r\n\r\n#include \"bit.inl\"\r\n\r\n#endif//GLM_GTX_bit\r\n"
  },
  {
    "path": "cpu/glm/gtx/bit.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-03-14\r\n// Updated : 2013-12-25\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/bit.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../detail/_vectorize.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename genIType>\r\n\tGLM_FUNC_QUALIFIER genIType mask\r\n\t(\r\n\t\tgenIType const & count\r\n\t)\r\n\t{\r\n\t\treturn ((genIType(1) << (count)) - genIType(1));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(mask)\r\n\r\n\t// highestBitValue\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType highestBitValue\r\n\t(\r\n\t\tgenType const & value\r\n\t)\r\n\t{\r\n\t\tgenType tmp = value;\r\n\t\tgenType result = genType(0);\r\n\t\twhile(tmp)\r\n\t\t{\r\n\t\t\tresult = (tmp & (~tmp + 1)); // grab lowest bit\r\n\t\t\ttmp &= ~result; // clear lowest bit\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<int, P> highestBitValue\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<int, P>(\r\n\t\t\thighestBitValue(value[0]),\r\n\t\t\thighestBitValue(value[1]));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<int, P> highestBitValue\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<int, P>(\r\n\t\t\thighestBitValue(value[0]),\r\n\t\t\thighestBitValue(value[1]),\r\n\t\t\thighestBitValue(value[2]));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<int, P> highestBitValue\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<int, P>(\r\n\t\t\thighestBitValue(value[0]),\r\n\t\t\thighestBitValue(value[1]),\r\n\t\t\thighestBitValue(value[2]),\r\n\t\t\thighestBitValue(value[3]));\r\n\t}\r\n\r\n\t// isPowerOfTwo\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER bool isPowerOfTwo(genType const & Value)\r\n\t{\r\n\t\t//detail::If<std::numeric_limits<genType>::is_signed>::apply(abs, Value);\r\n\t\t//return !(Value & (Value - 1));\r\n\r\n\t\t// For old complier?\r\n\t\tgenType Result = Value;\r\n\t\tif(std::numeric_limits<genType>::is_signed)\r\n\t\t\tResult = abs(Result);\r\n\t\treturn !(Result & (Result - 1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<bool, P> isPowerOfTwo\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<bool, P>(\r\n\t\t\tisPowerOfTwo(value[0]),\r\n\t\t\tisPowerOfTwo(value[1]));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<bool, P> isPowerOfTwo\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<bool, P>(\r\n\t\t\tisPowerOfTwo(value[0]),\r\n\t\t\tisPowerOfTwo(value[1]),\r\n\t\t\tisPowerOfTwo(value[2]));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P> isPowerOfTwo\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<bool, P>(\r\n\t\t\tisPowerOfTwo(value[0]),\r\n\t\t\tisPowerOfTwo(value[1]),\r\n\t\t\tisPowerOfTwo(value[2]),\r\n\t\t\tisPowerOfTwo(value[3]));\r\n\t}\r\n\r\n\t// powerOfTwoAbove\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType powerOfTwoAbove(genType const & value)\r\n\t{\r\n\t\treturn isPowerOfTwo(value) ? value : highestBitValue(value) << 1;\r\n\t}\r\n\r\n\tVECTORIZE_VEC(powerOfTwoAbove)\r\n\r\n\t// powerOfTwoBelow\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType powerOfTwoBelow\r\n\t(\r\n\t\tgenType const & value\r\n\t)\r\n\t{\r\n\t\treturn isPowerOfTwo(value) ? value : highestBitValue(value);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(powerOfTwoBelow)\r\n\r\n\t// powerOfTwoNearest\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType powerOfTwoNearest\r\n\t(\r\n\t\tgenType const & value\r\n\t)\r\n\t{\r\n\t\tif(isPowerOfTwo(value))\r\n\t\t\treturn value;\r\n\r\n\t\tgenType prev = highestBitValue(value);\r\n\t\tgenType next = prev << 1;\r\n\t\treturn (next - value) < (value - prev) ? next : prev;\r\n\t}\r\n\r\n\tVECTORIZE_VEC(powerOfTwoNearest)\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType bitRevert(genType const & In)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_integer, \"'bitRevert' only accept integer values\");\r\n\r\n\t\tgenType Out = 0;\r\n\t\tstd::size_t BitSize = sizeof(genType) * 8;\r\n\t\tfor(std::size_t i = 0; i < BitSize; ++i)\r\n\t\t\tif(In & (genType(1) << i))\r\n\t\t\t\tOut |= genType(1) << (BitSize - 1 - i);\r\n\t\treturn Out;\r\n\t}\r\n\r\n\tVECTORIZE_VEC(bitRevert)\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType bitRotateRight(genType const & In, std::size_t Shift)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_integer, \"'bitRotateRight' only accept integer values\");\r\n\r\n\t\tstd::size_t BitSize = sizeof(genType) * 8;\r\n\t\treturn (In << Shift) | (In >> (BitSize - Shift));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> bitRotateRight\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & Value, \r\n\t\tstd::size_t Shift\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tbitRotateRight(Value[0], Shift),\r\n\t\t\tbitRotateRight(Value[1], Shift));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> bitRotateRight\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & Value, \r\n\t\tstd::size_t Shift\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tbitRotateRight(Value[0], Shift),\r\n\t\t\tbitRotateRight(Value[1], Shift),\r\n\t\t\tbitRotateRight(Value[2], Shift));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> bitRotateRight\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & Value, \r\n\t\tstd::size_t Shift\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tbitRotateRight(Value[0], Shift),\r\n\t\t\tbitRotateRight(Value[1], Shift),\r\n\t\t\tbitRotateRight(Value[2], Shift),\r\n\t\t\tbitRotateRight(Value[3], Shift));\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType bitRotateLeft(genType const & In, std::size_t Shift)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_integer, \"'bitRotateLeft' only accept integer values\");\r\n\r\n\t\tstd::size_t BitSize = sizeof(genType) * 8;\r\n\t\treturn (In >> Shift) | (In << (BitSize - Shift));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> bitRotateLeft\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & Value, \r\n\t\tstd::size_t Shift\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tbitRotateLeft(Value[0], Shift),\r\n\t\t\tbitRotateLeft(Value[1], Shift));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> bitRotateLeft\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & Value, \r\n\t\tstd::size_t Shift\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tbitRotateLeft(Value[0], Shift),\r\n\t\t\tbitRotateLeft(Value[1], Shift),\r\n\t\t\tbitRotateLeft(Value[2], Shift));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> bitRotateLeft\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & Value, \r\n\t\tstd::size_t Shift\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tbitRotateLeft(Value[0], Shift),\r\n\t\t\tbitRotateLeft(Value[1], Shift),\r\n\t\t\tbitRotateLeft(Value[2], Shift),\r\n\t\t\tbitRotateLeft(Value[3], Shift));\r\n\t}\r\n\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_QUALIFIER genIUType fillBitfieldWithOne\r\n\t(\r\n\t\tgenIUType const & Value,\r\n\t\tint const & FromBit, \r\n\t\tint const & ToBit\r\n\t)\r\n\t{\r\n\t\tassert(FromBit <= ToBit);\r\n\t\tassert(ToBit <= sizeof(genIUType) * std::size_t(8));\r\n\r\n\t\tgenIUType Result = Value;\r\n\t\tfor(std::size_t i = 0; i <= ToBit; ++i)\r\n\t\t\tResult |= (1 << i);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_QUALIFIER genIUType fillBitfieldWithZero\r\n\t(\r\n\t\tgenIUType const & Value,\r\n\t\tint const & FromBit, \r\n\t\tint const & ToBit\r\n\t)\r\n\t{\r\n\t\tassert(FromBit <= ToBit);\r\n\t\tassert(ToBit <= sizeof(genIUType) * std::size_t(8));\r\n\r\n\t\tgenIUType Result = Value;\r\n\t\tfor(std::size_t i = 0; i <= ToBit; ++i)\r\n\t\t\tResult &= ~(1 << i);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\tnamespace detail\r\n\t{\r\n\t\ttemplate <typename PARAM, typename RET>\r\n\t\tRET bitfieldInterleave(PARAM x, PARAM y);\r\n\r\n\t\ttemplate <typename PARAM, typename RET>\r\n\t\tRET bitfieldInterleave(PARAM x, PARAM y, PARAM z);\r\n\r\n\t\ttemplate <typename PARAM, typename RET>\r\n\t\tRET bitfieldInterleave(PARAM x, PARAM y, PARAM z, PARAM w);\r\n\r\n/*\r\n\t\ttemplate <typename PARAM, typename RET>\r\n\t\tinline RET bitfieldInterleave(PARAM x, PARAM y)\r\n\t\t{\r\n\t\t\tRET Result = 0; \r\n\t\t\tfor (int i = 0; i < sizeof(PARAM) * 8; i++)\r\n\t\t\t\tResult |= (x & 1U << i) << i | (y & 1U << i) << (i + 1);\r\n\t\t\treturn Result;\r\n\t\t}\r\n\r\n\t\ttemplate <typename PARAM, typename RET>\r\n\t\tinline RET bitfieldInterleave(PARAM x, PARAM y, PARAM z)\r\n\t\t{\r\n\t\t\tRET Result = 0; \r\n\t\t\tfor (RET i = 0; i < sizeof(PARAM) * 8; i++)\r\n\t\t\t{\r\n\t\t\t\tResult |= ((RET(x) & (RET(1) << i)) << ((i << 1) + 0));\r\n\t\t\t\tResult |= ((RET(y) & (RET(1) << i)) << ((i << 1) + 1));\r\n\t\t\t\tResult |= ((RET(z) & (RET(1) << i)) << ((i << 1) + 2));\r\n\t\t\t}\r\n\t\t\treturn Result;\r\n\t\t}\r\n\r\n\t\ttemplate <typename PARAM, typename RET>\r\n\t\tinline RET bitfieldInterleave(PARAM x, PARAM y, PARAM z, PARAM w)\r\n\t\t{\r\n\t\t\tRET Result = 0; \r\n\t\t\tfor (int i = 0; i < sizeof(PARAM) * 8; i++)\r\n\t\t\t{\r\n\t\t\t\tResult |= ((((RET(x) >> i) & RET(1))) << RET((i << 2) + 0));\r\n\t\t\t\tResult |= ((((RET(y) >> i) & RET(1))) << RET((i << 2) + 1));\r\n\t\t\t\tResult |= ((((RET(z) >> i) & RET(1))) << RET((i << 2) + 2));\r\n\t\t\t\tResult |= ((((RET(w) >> i) & RET(1))) << RET((i << 2) + 3));\r\n\t\t\t}\r\n\t\t\treturn Result;\r\n\t\t}\r\n*/\r\n\t\ttemplate <>\r\n\t\tinline glm::uint16 bitfieldInterleave(glm::uint8 x, glm::uint8 y)\r\n\t\t{\r\n\t\t\tglm::uint16 REG1(x);\r\n\t\t\tglm::uint16 REG2(y);\r\n\r\n\t\t\tREG1 = ((REG1 <<  4) | REG1) & glm::uint16(0x0F0F);\r\n\t\t\tREG2 = ((REG2 <<  4) | REG2) & glm::uint16(0x0F0F);\r\n\r\n\t\t\tREG1 = ((REG1 <<  2) | REG1) & glm::uint16(0x3333);\r\n\t\t\tREG2 = ((REG2 <<  2) | REG2) & glm::uint16(0x3333);\r\n\r\n\t\t\tREG1 = ((REG1 <<  1) | REG1) & glm::uint16(0x5555);\r\n\t\t\tREG2 = ((REG2 <<  1) | REG2) & glm::uint16(0x5555);\r\n\r\n\t\t\treturn REG1 | (REG2 << 1);\r\n\t\t}\r\n\r\n\t\ttemplate <>\r\n\t\tinline glm::uint32 bitfieldInterleave(glm::uint16 x, glm::uint16 y)\r\n\t\t{\r\n\t\t\tglm::uint32 REG1(x);\r\n\t\t\tglm::uint32 REG2(y);\r\n\r\n\t\t\tREG1 = ((REG1 <<  8) | REG1) & glm::uint32(0x00FF00FF);\r\n\t\t\tREG2 = ((REG2 <<  8) | REG2) & glm::uint32(0x00FF00FF);\r\n\r\n\t\t\tREG1 = ((REG1 <<  4) | REG1) & glm::uint32(0x0F0F0F0F);\r\n\t\t\tREG2 = ((REG2 <<  4) | REG2) & glm::uint32(0x0F0F0F0F);\r\n\r\n\t\t\tREG1 = ((REG1 <<  2) | REG1) & glm::uint32(0x33333333);\r\n\t\t\tREG2 = ((REG2 <<  2) | REG2) & glm::uint32(0x33333333);\r\n\r\n\t\t\tREG1 = ((REG1 <<  1) | REG1) & glm::uint32(0x55555555);\r\n\t\t\tREG2 = ((REG2 <<  1) | REG2) & glm::uint32(0x55555555);\r\n\r\n\t\t\treturn REG1 | (REG2 << 1);\r\n\t\t}\r\n\r\n\t\ttemplate <>\r\n\t\tinline glm::uint64 bitfieldInterleave(glm::uint32 x, glm::uint32 y)\r\n\t\t{\r\n\t\t\tglm::uint64 REG1(x);\r\n\t\t\tglm::uint64 REG2(y);\r\n\r\n\t\t\tREG1 = ((REG1 << 16) | REG1) & glm::uint64(0x0000FFFF0000FFFF);\r\n\t\t\tREG2 = ((REG2 << 16) | REG2) & glm::uint64(0x0000FFFF0000FFFF);\r\n\r\n\t\t\tREG1 = ((REG1 <<  8) | REG1) & glm::uint64(0x00FF00FF00FF00FF);\r\n\t\t\tREG2 = ((REG2 <<  8) | REG2) & glm::uint64(0x00FF00FF00FF00FF);\r\n\r\n\t\t\tREG1 = ((REG1 <<  4) | REG1) & glm::uint64(0x0F0F0F0F0F0F0F0F);\r\n\t\t\tREG2 = ((REG2 <<  4) | REG2) & glm::uint64(0x0F0F0F0F0F0F0F0F);\r\n\r\n\t\t\tREG1 = ((REG1 <<  2) | REG1) & glm::uint64(0x3333333333333333);\r\n\t\t\tREG2 = ((REG2 <<  2) | REG2) & glm::uint64(0x3333333333333333);\r\n\r\n\t\t\tREG1 = ((REG1 <<  1) | REG1) & glm::uint64(0x5555555555555555);\r\n\t\t\tREG2 = ((REG2 <<  1) | REG2) & glm::uint64(0x5555555555555555);\r\n\r\n\t\t\treturn REG1 | (REG2 << 1);\r\n\t\t}\r\n\r\n\t\ttemplate <>\r\n\t\tinline glm::uint64 bitfieldInterleave(glm::uint32 x, glm::uint32 y, glm::uint32 z)\r\n\t\t{\r\n\t\t\tglm::uint64 REG1(x);\r\n\t\t\tglm::uint64 REG2(y);\r\n\t\t\tglm::uint64 REG3(z);\r\n\r\n\t\t\tREG1 = ((REG1 << 32) | REG1) & glm::uint64(0xFFFF00000000FFFF);\r\n\t\t\tREG2 = ((REG2 << 32) | REG2) & glm::uint64(0xFFFF00000000FFFF);\r\n\t\t\tREG3 = ((REG3 << 32) | REG3) & glm::uint64(0xFFFF00000000FFFF);\r\n\r\n\t\t\tREG1 = ((REG1 << 16) | REG1) & glm::uint64(0x00FF0000FF0000FF);\r\n\t\t\tREG2 = ((REG2 << 16) | REG2) & glm::uint64(0x00FF0000FF0000FF);\r\n\t\t\tREG3 = ((REG3 << 16) | REG3) & glm::uint64(0x00FF0000FF0000FF);\r\n\r\n\t\t\tREG1 = ((REG1 <<  8) | REG1) & glm::uint64(0xF00F00F00F00F00F);\r\n\t\t\tREG2 = ((REG2 <<  8) | REG2) & glm::uint64(0xF00F00F00F00F00F);\r\n\t\t\tREG3 = ((REG3 <<  8) | REG3) & glm::uint64(0xF00F00F00F00F00F);\r\n\r\n\t\t\tREG1 = ((REG1 <<  4) | REG1) & glm::uint64(0x30C30C30C30C30C3);\r\n\t\t\tREG2 = ((REG2 <<  4) | REG2) & glm::uint64(0x30C30C30C30C30C3);\r\n\t\t\tREG3 = ((REG3 <<  4) | REG3) & glm::uint64(0x30C30C30C30C30C3);\r\n\r\n\t\t\tREG1 = ((REG1 <<  2) | REG1) & glm::uint64(0x9249249249249249);\r\n\t\t\tREG2 = ((REG2 <<  2) | REG2) & glm::uint64(0x9249249249249249);\r\n\t\t\tREG3 = ((REG3 <<  2) | REG3) & glm::uint64(0x9249249249249249);\r\n\r\n\t\t\treturn REG1 | (REG2 << 1) | (REG3 << 2);\r\n\t\t}\r\n\r\n\t\ttemplate <>\r\n\t\tinline glm::uint64 bitfieldInterleave(glm::uint16 x, glm::uint16 y, glm::uint16 z, glm::uint16 w)\r\n\t\t{\r\n\t\t\tglm::uint64 REG1(x);\r\n\t\t\tglm::uint64 REG2(y);\r\n\t\t\tglm::uint64 REG3(z);\r\n\t\t\tglm::uint64 REG4(w);\r\n\r\n\t\t\tREG1 = ((REG1 << 24) | REG1) & glm::uint64(0x000000FF000000FF);\r\n\t\t\tREG2 = ((REG2 << 24) | REG2) & glm::uint64(0x000000FF000000FF);\r\n\t\t\tREG3 = ((REG3 << 24) | REG3) & glm::uint64(0x000000FF000000FF);\r\n\t\t\tREG4 = ((REG4 << 24) | REG4) & glm::uint64(0x000000FF000000FF);\r\n\r\n\t\t\tREG1 = ((REG1 << 12) | REG1) & glm::uint64(0x000F000F000F000F);\r\n\t\t\tREG2 = ((REG2 << 12) | REG2) & glm::uint64(0x000F000F000F000F);\r\n\t\t\tREG3 = ((REG3 << 12) | REG3) & glm::uint64(0x000F000F000F000F);\r\n\t\t\tREG4 = ((REG4 << 12) | REG4) & glm::uint64(0x000F000F000F000F);\r\n\r\n\t\t\tREG1 = ((REG1 <<  6) | REG1) & glm::uint64(0x0303030303030303);\r\n\t\t\tREG2 = ((REG2 <<  6) | REG2) & glm::uint64(0x0303030303030303);\r\n\t\t\tREG3 = ((REG3 <<  6) | REG3) & glm::uint64(0x0303030303030303);\r\n\t\t\tREG4 = ((REG4 <<  6) | REG4) & glm::uint64(0x0303030303030303);\r\n\r\n\t\t\tREG1 = ((REG1 <<  3) | REG1) & glm::uint64(0x1111111111111111);\r\n\t\t\tREG2 = ((REG2 <<  3) | REG2) & glm::uint64(0x1111111111111111);\r\n\t\t\tREG3 = ((REG3 <<  3) | REG3) & glm::uint64(0x1111111111111111);\r\n\t\t\tREG4 = ((REG4 <<  3) | REG4) & glm::uint64(0x1111111111111111);\r\n\r\n\t\t\treturn REG1 | (REG2 << 1) | (REG3 << 2) | (REG4 << 3);\r\n\t\t}\r\n\t}//namespace detail\r\n\r\n\tinline int16 bitfieldInterleave(int8 x, int8 y)\r\n\t{\r\n\t\tunion sign8\r\n\t\t{\r\n\t\t\tint8 i;\r\n\t\t\tuint8 u;\r\n\t\t} sign_x, sign_y;\r\n\r\n\t\tunion sign16\r\n\t\t{\r\n\t\t\tint16 i;\r\n\t\t\tuint16 u;\r\n\t\t} result;\r\n\r\n\t\tsign_x.i = x;\r\n\t\tsign_y.i = y;\r\n\t\tresult.u = bitfieldInterleave(sign_x.u, sign_y.u);\r\n\r\n\t\treturn result.i;\r\n\t}\r\n\r\n\tinline uint16 bitfieldInterleave(uint8 x, uint8 y)\r\n\t{\r\n\t\treturn detail::bitfieldInterleave<uint8, uint16>(x, y);\r\n\t}\r\n\r\n\tinline int32 bitfieldInterleave(int16 x, int16 y)\r\n\t{\r\n\t\tunion sign16\r\n\t\t{\r\n\t\t\tint16 i;\r\n\t\t\tuint16 u;\r\n\t\t} sign_x, sign_y;\r\n\r\n\t\tunion sign32\r\n\t\t{\r\n\t\t\tint32 i;\r\n\t\t\tuint32 u;\r\n\t\t} result;\r\n\r\n\t\tsign_x.i = x;\r\n\t\tsign_y.i = y;\r\n\t\tresult.u = bitfieldInterleave(sign_x.u, sign_y.u);\r\n\r\n\t\treturn result.i;\r\n\t}\r\n\r\n\tinline uint32 bitfieldInterleave(uint16 x, uint16 y)\r\n\t{\r\n\t\treturn detail::bitfieldInterleave<uint16, uint32>(x, y);\r\n\t}\r\n\r\n\tinline int64 bitfieldInterleave(int32 x, int32 y)\r\n\t{\r\n\t\tunion sign32\r\n\t\t{\r\n\t\t\tint32 i;\r\n\t\t\tuint32 u;\r\n\t\t} sign_x, sign_y;\r\n\r\n\t\tunion sign64\r\n\t\t{\r\n\t\t\tint64 i;\r\n\t\t\tuint64 u;\r\n\t\t} result;\r\n\r\n\t\tsign_x.i = x;\r\n\t\tsign_y.i = y;\r\n\t\tresult.u = bitfieldInterleave(sign_x.u, sign_y.u);\r\n\r\n\t\treturn result.i;\r\n\t}\r\n\r\n\tinline uint64 bitfieldInterleave(uint32 x, uint32 y)\r\n\t{\r\n\t\treturn detail::bitfieldInterleave<uint32, uint64>(x, y);\r\n\t}\r\n\r\n\tinline int32 bitfieldInterleave(int8 x, int8 y, int8 z)\r\n\t{\r\n\t\tunion sign8\r\n\t\t{\r\n\t\t\tint8 i;\r\n\t\t\tuint8 u;\r\n\t\t} sign_x, sign_y, sign_z;\r\n\r\n\t\tunion sign32\r\n\t\t{\r\n\t\t\tint32 i;\r\n\t\t\tuint32 u;\r\n\t\t} result;\r\n\r\n\t\tsign_x.i = x;\r\n\t\tsign_y.i = y;\r\n\t\tsign_z.i = z;\r\n\t\tresult.u = bitfieldInterleave(sign_x.u, sign_y.u, sign_z.u);\r\n\r\n\t\treturn result.i;\r\n\t}\r\n\r\n\tinline uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z)\r\n\t{\r\n\t\treturn detail::bitfieldInterleave<uint8, uint32>(x, y, z);\r\n\t}\r\n\r\n\tinline int64 bitfieldInterleave(int16 x, int16 y, int16 z)\r\n\t{\r\n\t\tunion sign16\r\n\t\t{\r\n\t\t\tint16 i;\r\n\t\t\tuint16 u;\r\n\t\t} sign_x, sign_y, sign_z;\r\n\r\n\t\tunion sign64\r\n\t\t{\r\n\t\t\tint64 i;\r\n\t\t\tuint64 u;\r\n\t\t} result;\r\n\r\n\t\tsign_x.i = x;\r\n\t\tsign_y.i = y;\r\n\t\tsign_z.i = z;\r\n\t\tresult.u = bitfieldInterleave(sign_x.u, sign_y.u, sign_z.u);\r\n\r\n\t\treturn result.i;\r\n\t}\r\n\r\n\tinline uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z)\r\n\t{\r\n\t\treturn detail::bitfieldInterleave<uint32, uint64>(x, y, z);\r\n\t}\r\n\r\n\tinline int64 bitfieldInterleave(int32 x, int32 y, int32 z)\r\n\t{\r\n\t\tunion sign16\r\n\t\t{\r\n\t\t\tint32 i;\r\n\t\t\tuint32 u;\r\n\t\t} sign_x, sign_y, sign_z;\r\n\r\n\t\tunion sign64\r\n\t\t{\r\n\t\t\tint64 i;\r\n\t\t\tuint64 u;\r\n\t\t} result;\r\n\r\n\t\tsign_x.i = x;\r\n\t\tsign_y.i = y;\r\n\t\tsign_z.i = z;\r\n\t\tresult.u = bitfieldInterleave(sign_x.u, sign_y.u, sign_z.u);\r\n\r\n\t\treturn result.i;\r\n\t}\r\n\r\n\tinline uint64 bitfieldInterleave(uint32 x, uint32 y, uint32 z)\r\n\t{\r\n\t\treturn detail::bitfieldInterleave<uint32, uint64>(x, y, z);\r\n\t}\r\n\r\n\tinline int32 bitfieldInterleave(int8 x, int8 y, int8 z, int8 w)\r\n\t{\r\n\t\tunion sign8\r\n\t\t{\r\n\t\t\tint8 i;\r\n\t\t\tuint8 u;\r\n\t\t} sign_x, sign_y, sign_z, sign_w;\r\n\r\n\t\tunion sign32\r\n\t\t{\r\n\t\t\tint32 i;\r\n\t\t\tuint32 u;\r\n\t\t} result;\r\n\r\n\t\tsign_x.i = x;\r\n\t\tsign_y.i = y;\r\n\t\tsign_z.i = z;\r\n\t\tsign_w.i = w;\r\n\t\tresult.u = bitfieldInterleave(sign_x.u, sign_y.u, sign_z.u);\r\n\r\n\t\treturn result.i;\r\n\t}\r\n\r\n\tinline uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z, uint8 w)\r\n\t{\r\n\t\treturn detail::bitfieldInterleave<uint8, uint32>(x, y, z);\r\n\t}\r\n\r\n\tinline int64 bitfieldInterleave(int16 x, int16 y, int16 z, int16 w)\r\n\t{\r\n\t\tunion sign16\r\n\t\t{\r\n\t\t\tint16 i;\r\n\t\t\tuint16 u;\r\n\t\t} sign_x, sign_y, sign_z, sign_w;\r\n\r\n\t\tunion sign64\r\n\t\t{\r\n\t\t\tint64 i;\r\n\t\t\tuint64 u;\r\n\t\t} result;\r\n\r\n\t\tsign_x.i = x;\r\n\t\tsign_y.i = y;\r\n\t\tsign_z.i = z;\r\n\t\tsign_w.i = w;\r\n\t\tresult.u = bitfieldInterleave(sign_x.u, sign_y.u, sign_z.u);\r\n\r\n\t\treturn result.i;\r\n\t}\r\n\r\n\tinline uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w)\r\n\t{\r\n\t\treturn detail::bitfieldInterleave<uint16, uint64>(x, y, z, w);\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/closest_point.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_bit\r\n/// @file glm/gtx/bit.hpp\r\n/// @date 2005-12-30 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_closest_point GLM_GTX_closest_point\r\n/// @ingroup gtx\r\n///\r\n/// @brief Find the point on a straight line which is the closet of a point.\r\n/// \r\n/// <glm/gtx/closest_point.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_closest_point\r\n#define GLM_GTX_closest_point\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_closest_point extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_closest_point\r\n\t/// @{\r\n\r\n\t/// Find the point on a straight line which is the closet of a point. \r\n\t/// @see gtx_closest_point\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> closestPointOnLine(\r\n\t\tdetail::tvec3<T, P> const & point,\r\n\t\tdetail::tvec3<T, P> const & a, \r\n\t\tdetail::tvec3<T, P> const & b);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"closest_point.inl\"\r\n\r\n#endif//GLM_GTX_closest_point\r\n"
  },
  {
    "path": "cpu/glm/gtx/closest_point.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-30\r\n// Updated : 2008-10-05\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/closest_point.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_gtx_closest_point\r\n#define glm_gtx_closest_point\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> closestPointOnLine\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & point,\r\n\t\tdetail::tvec3<T, P> const & a,\r\n\t\tdetail::tvec3<T, P> const & b\r\n\t)\r\n\t{\r\n\t\tT LineLength = distance(a, b);\r\n\t\tdetail::tvec3<T, P> Vector = point - a;\r\n\t\tdetail::tvec3<T, P> LineDirection = (b - a) / LineLength;\r\n\r\n\t\t// Project Vector to LineDirection to get the distance of point from a\r\n\t\tT Distance = dot(Vector, LineDirection);\r\n\r\n\t\tif(Distance <= T(0)) return a;\r\n\t\tif(Distance >= LineLength) return b;\r\n\t\treturn a + LineDirection * Distance;\r\n\t}\r\n}//namespace glm\r\n\r\n#endif//glm_gtx_closest_point\r\n"
  },
  {
    "path": "cpu/glm/gtx/color_space.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_color_space\r\n/// @file glm/gtx/color_space.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_color_space GLM_GTX_color_space\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Related to RGB to HSV conversions and operations.\r\n/// \r\n/// <glm/gtx/color_space.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_color_space\r\n#define GLM_GTX_color_space\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_color_space extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_color_space\r\n\t/// @{\r\n\r\n\t/// Converts a color from HSV color space to its color in RGB color space.\r\n\t/// @see gtx_color_space\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> rgbColor(\r\n\t\tdetail::tvec3<T, P> const & hsvValue);\r\n\r\n\t/// Converts a color from RGB color space to its color in HSV color space.\r\n\t/// @see gtx_color_space\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> hsvColor(\r\n\t\tdetail::tvec3<T, P> const & rgbValue);\r\n\t\t\r\n\t/// Build a saturation matrix.\r\n\t/// @see gtx_color_space\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> saturation(\r\n\t\tT const s);\r\n\r\n\t/// Modify the saturation of a color.\r\n\t/// @see gtx_color_space\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> saturation(\r\n\t\tT const s,\r\n\t\tdetail::tvec3<T, P> const & color);\r\n\t\t\r\n\t/// Modify the saturation of a color.\r\n\t/// @see gtx_color_space\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec4<T, P> saturation(\r\n\t\tT const s,\r\n\t\tdetail::tvec4<T, P> const & color);\r\n\t\t\r\n\t/// Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals.\r\n\t/// @see gtx_color_space\r\n\ttemplate <typename T, precision P>\r\n\tT luminosity(\r\n\t\tdetail::tvec3<T, P> const & color);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"color_space.inl\"\r\n\r\n#endif//GLM_GTX_color_space\r\n"
  },
  {
    "path": "cpu/glm/gtx/color_space.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2007-02-22\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/color_space.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> rgbColor(const detail::tvec3<T, P>& hsvColor)\r\n\t{\r\n\t\tdetail::tvec3<T, P> hsv = hsvColor;\r\n\t\tdetail::tvec3<T, P> rgbColor;\r\n\r\n\t\tif(hsv.y == static_cast<T>(0))\r\n\t\t\t// achromatic (grey)\r\n\t\t\trgbColor = detail::tvec3<T, P>(hsv.z);\r\n\t\telse\r\n\t\t{\r\n\t\t\tT sector = floor(hsv.x / T(60));\r\n\t\t\tT frac = (hsv.x / T(60)) - sector;\r\n\t\t\t// factorial part of h\r\n\t\t\tT o = hsv.z * (T(1) - hsv.y);\r\n\t\t\tT p = hsv.z * (T(1) - hsv.y * frac);\r\n\t\t\tT q = hsv.z * (T(1) - hsv.y * (T(1) - frac));\r\n\r\n\t\t\tswitch(int(sector))\r\n\t\t\t{\r\n\t\t\tdefault:\r\n\t\t\tcase 0:\r\n\t\t\t\trgbColor.r = hsv.z;\r\n\t\t\t\trgbColor.g = q;\r\n\t\t\t\trgbColor.b = o;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\trgbColor.r = p;\r\n\t\t\t\trgbColor.g = hsv.z;\r\n\t\t\t\trgbColor.b = o;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\trgbColor.r = o;\r\n\t\t\t\trgbColor.g = hsv.z;\r\n\t\t\t\trgbColor.b = q;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\trgbColor.r = o;\r\n\t\t\t\trgbColor.g = p;\r\n\t\t\t\trgbColor.b = hsv.z;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\trgbColor.r = q; \r\n\t\t\t\trgbColor.g = o; \r\n\t\t\t\trgbColor.b = hsv.z;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 5:\r\n\t\t\t\trgbColor.r = hsv.z; \r\n\t\t\t\trgbColor.g = o; \r\n\t\t\t\trgbColor.b = p;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn rgbColor;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> hsvColor(const detail::tvec3<T, P>& rgbColor)\r\n\t{\r\n\t\tdetail::tvec3<T, P> hsv = rgbColor;\r\n\t\tfloat Min   = min(min(rgbColor.r, rgbColor.g), rgbColor.b);\r\n\t\tfloat Max   = max(max(rgbColor.r, rgbColor.g), rgbColor.b);\r\n\t\tfloat Delta = Max - Min;\r\n\r\n\t\thsv.z = Max;                               \r\n\r\n\t\tif(Max != static_cast<T>(0))\r\n\t\t{\r\n\t\t\thsv.y = Delta / hsv.z;    \r\n\t\t\tT h = static_cast<T>(0);\r\n\r\n\t\t\tif(rgbColor.r == Max)\r\n\t\t\t\t// between yellow & magenta\r\n\t\t\t\th = static_cast<T>(0) + T(60) * (rgbColor.g - rgbColor.b) / Delta;\r\n\t\t\telse if(rgbColor.g == Max)\r\n\t\t\t\t// between cyan & yellow\r\n\t\t\t\th = static_cast<T>(120) + T(60) * (rgbColor.b - rgbColor.r) / Delta;\r\n\t\t\telse\r\n\t\t\t\t// between magenta & cyan\r\n\t\t\t\th = static_cast<T>(240) + T(60) * (rgbColor.r - rgbColor.g) / Delta;\r\n\r\n\t\t\tif(h < T(0)) \r\n\t\t\t\thsv.x = h + T(360);\r\n\t\t\telse\r\n\t\t\t\thsv.x = h;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// If r = g = b = 0 then s = 0, h is undefined\r\n\t\t\thsv.y = static_cast<T>(0);\r\n\t\t\thsv.x = static_cast<T>(0);\r\n\t\t}\r\n\r\n\t\treturn hsv;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> saturation(const T s)\r\n\t{\r\n\t\tdetail::tvec3<T, P> rgbw = detail::tvec3<T, P>(T(0.2126), T(0.7152), T(0.0722));\r\n\r\n\t\tT col0 = (T(1) - s) * rgbw.r;\r\n\t\tT col1 = (T(1) - s) * rgbw.g;\r\n\t\tT col2 = (T(1) - s) * rgbw.b;\r\n\r\n\t\tdetail::tmat4x4<T, P> result(T(1));\r\n\t\tresult[0][0] = col0 + s;\r\n\t\tresult[0][1] = col0;\r\n\t\tresult[0][2] = col0;\r\n\t\tresult[1][0] = col1;\r\n\t\tresult[1][1] = col1 + s;\r\n\t\tresult[1][2] = col1;\r\n\t\tresult[2][0] = col2;\r\n\t\tresult[2][1] = col2;\r\n\t\tresult[2][2] = col2 + s;\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> saturation(const T s, const detail::tvec3<T, P>& color)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(saturation(s) * detail::tvec4<T, P>(color, T(0)));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> saturation(const T s, const detail::tvec4<T, P>& color)\r\n\t{\r\n\t\treturn saturation(s) * color;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER T luminosity(const detail::tvec3<T, P>& color)\r\n\t{\r\n\t\tconst detail::tvec3<T, P> tmp = detail::tvec3<T, P>(0.33, 0.59, 0.11);\r\n\t\treturn dot(color, tmp);\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/color_space_YCoCg.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_color_space_YCoCg\r\n/// @file glm/gtx/color_space_YCoCg.hpp\r\n/// @date 2008-10-28 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_color_space_YCoCg GLM_GTX_color_space_YCoCg\r\n/// @ingroup gtx\r\n///\r\n/// @brief RGB to YCoCg conversions and operations\r\n/// \r\n/// <glm/gtx/color_space_YCoCg.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_gtx_color_space_YCoCg\r\n#define glm_gtx_color_space_YCoCg\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_color_space_YCoCg extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_color_space_YCoCg\r\n\t/// @{\r\n\r\n\t/// Convert a color from RGB color space to YCoCg color space.\r\n\t/// @see gtx_color_space_YCoCg\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> rgb2YCoCg(\r\n\t\tdetail::tvec3<T, P> const & rgbColor);\r\n\r\n\t/// Convert a color from YCoCg color space to RGB color space.\r\n\t/// @see gtx_color_space_YCoCg\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> YCoCg2rgb(\r\n\t\tdetail::tvec3<T, P> const & YCoCgColor);\r\n\r\n\t/// Convert a color from RGB color space to YCoCgR color space.\r\n\t/// @see \"YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range\"\r\n\t/// @see gtx_color_space_YCoCg\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> rgb2YCoCgR(\r\n\t\tdetail::tvec3<T, P> const & rgbColor);\r\n\r\n\t/// Convert a color from YCoCgR color space to RGB color space.\r\n\t/// @see \"YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range\"\r\n\t/// @see gtx_color_space_YCoCg\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> YCoCgR2rgb(\r\n\t\tdetail::tvec3<T, P> const & YCoCgColor);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"color_space_YCoCg.inl\"\r\n\r\n#endif//glm_gtx_color_space_YCoCg\r\n"
  },
  {
    "path": "cpu/glm/gtx/color_space_YCoCg.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2008-10-28\r\n// Updated : 2008-10-28\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/color_space_YCoCg.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> rgb2YCoCg\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & rgbColor\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> result;\r\n\t\tresult.x/*Y */ =   rgbColor.r / T(4) + rgbColor.g / T(2) + rgbColor.b / T(4);\r\n\t\tresult.y/*Co*/ =   rgbColor.r / T(2) + rgbColor.g * T(0) - rgbColor.b / T(2);\r\n\t\tresult.z/*Cg*/ = - rgbColor.r / T(4) + rgbColor.g / T(2) - rgbColor.b / T(4);\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> rgb2YCoCgR\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & rgbColor\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> result;\r\n\t\tresult.x/*Y */ = rgbColor.g / T(2) + (rgbColor.r + rgbColor.b) / T(4);\r\n\t\tresult.y/*Co*/ = rgbColor.r - rgbColor.b;\r\n\t\tresult.z/*Cg*/ = rgbColor.g - (rgbColor.r + rgbColor.b) / T(2);\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> YCoCg2rgb\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & YCoCgColor\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> result;\r\n\t\tresult.r = YCoCgColor.x + YCoCgColor.y - YCoCgColor.z;\r\n\t\tresult.g = YCoCgColor.x                + YCoCgColor.z;\r\n\t\tresult.b = YCoCgColor.x - YCoCgColor.y - YCoCgColor.z;\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> YCoCgR2rgb\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & YCoCgRColor\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> result;\r\n\t\tT tmp = YCoCgRColor.x - (YCoCgRColor.z / T(2));\r\n\t\tresult.g = YCoCgRColor.z + tmp;\r\n\t\tresult.b = tmp - (YCoCgRColor.y / T(2));\r\n\t\tresult.r = result.b + YCoCgRColor.y;\r\n\t\treturn result;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/compatibility.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_compatibility\r\n/// @file glm/gtx/compatibility.hpp\r\n/// @date 2007-01-24 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_half_float (dependence)\r\n///\r\n/// @defgroup gtx_compatibility GLM_GTX_compatibility\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Provide functions to increase the compatibility with Cg and HLSL languages\r\n/// \r\n/// <glm/gtx/compatibility.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_compatibility\r\n#define GLM_GTX_compatibility\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"  \r\n#include \"../gtc/quaternion.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_compatibility extension included\")\r\n#endif\r\n\r\n#if(GLM_COMPILER & GLM_COMPILER_VC)\r\n#\tinclude <cfloat>\r\n#elif(GLM_COMPILER & GLM_COMPILER_GCC)\r\n#\tinclude <cmath>\r\n#\tif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)\r\n#\t\tundef isfinite\r\n#\tendif\r\n#endif//GLM_COMPILER\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_compatibility\r\n\t/// @{\r\n\r\n\ttemplate <typename T> GLM_FUNC_QUALIFIER T lerp(T x, T y, T a){return mix(x, y, a);}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//!< \\brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec2<T, P> lerp(const detail::tvec2<T, P>& x, const detail::tvec2<T, P>& y, T a){return mix(x, y, a);}\t\t\t\t\t\t\t//!< \\brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)\r\n\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec3<T, P> lerp(const detail::tvec3<T, P>& x, const detail::tvec3<T, P>& y, T a){return mix(x, y, a);}\t\t\t\t\t\t\t//!< \\brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec4<T, P> lerp(const detail::tvec4<T, P>& x, const detail::tvec4<T, P>& y, T a){return mix(x, y, a);}\t\t\t\t\t\t\t//!< \\brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec2<T, P> lerp(const detail::tvec2<T, P>& x, const detail::tvec2<T, P>& y, const detail::tvec2<T, P>& a){return mix(x, y, a);}\t//!< \\brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec3<T, P> lerp(const detail::tvec3<T, P>& x, const detail::tvec3<T, P>& y, const detail::tvec3<T, P>& a){return mix(x, y, a);}\t//!< \\brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec4<T, P> lerp(const detail::tvec4<T, P>& x, const detail::tvec4<T, P>& y, const detail::tvec4<T, P>& a){return mix(x, y, a);}\t//!< \\brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)\r\n\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER T slerp(detail::tquat<T, P> const & x, detail::tquat<T, P> const & y, T const & a){return mix(x, y, a);} //!< \\brief Returns the slurp interpolation between two quaternions.\r\n\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER T saturate(T x){return clamp(x, T(0), T(1));}\t\t\t\t\t\t\t\t\t\t\t\t\t\t//!< \\brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec2<T, P> saturate(const detail::tvec2<T, P>& x){return clamp(x, T(0), T(1));}\t\t\t\t\t//!< \\brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec3<T, P> saturate(const detail::tvec3<T, P>& x){return clamp(x, T(0), T(1));}\t\t\t\t\t//!< \\brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec4<T, P> saturate(const detail::tvec4<T, P>& x){return clamp(x, T(0), T(1));}\t\t\t\t\t//!< \\brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)\r\n\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER T atan2(T x, T y){return atan(x, y);}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//!< \\brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec2<T, P> atan2(const detail::tvec2<T, P>& x, const detail::tvec2<T, P>& y){return atan(x, y);}\t//!< \\brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec3<T, P> atan2(const detail::tvec3<T, P>& x, const detail::tvec3<T, P>& y){return atan(x, y);}\t//!< \\brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec4<T, P> atan2(const detail::tvec4<T, P>& x, const detail::tvec4<T, P>& y){return atan(x, y);}\t//!< \\brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)\r\n\r\n\ttemplate <typename genType> bool isfinite(genType const & x);\t\t\t\t\t\t\t\t\t\t\t//!< \\brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> detail::tvec2<bool, P> isfinite(const detail::tvec2<T, P>& x);\t\t\t\t//!< \\brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> detail::tvec3<bool, P> isfinite(const detail::tvec3<T, P>& x);\t\t\t\t//!< \\brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> detail::tvec4<bool, P> isfinite(const detail::tvec4<T, P>& x);\t\t\t\t//!< \\brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)\r\n\r\n\ttypedef bool\t\t\t\t\t\tbool1;\t\t\t//!< \\brief boolean type with 1 component. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec2<bool, highp>\t\t\tbool2;\t\t\t//!< \\brief boolean type with 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec3<bool, highp>\t\t\tbool3;\t\t\t//!< \\brief boolean type with 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec4<bool, highp>\t\t\tbool4;\t\t\t//!< \\brief boolean type with 4 components. (From GLM_GTX_compatibility extension)\r\n\r\n\ttypedef bool\t\t\t\t\t\tbool1x1;\t\t//!< \\brief boolean matrix with 1 x 1 component. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x2<bool, highp>\t\tbool2x2;\t\t//!< \\brief boolean matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x3<bool, highp>\t\tbool2x3;\t\t//!< \\brief boolean matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x4<bool, highp>\t\tbool2x4;\t\t//!< \\brief boolean matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x2<bool, highp>\t\tbool3x2;\t\t//!< \\brief boolean matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x3<bool, highp>\t\tbool3x3;\t\t//!< \\brief boolean matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x4<bool, highp>\t\tbool3x4;\t\t//!< \\brief boolean matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x2<bool, highp>\t\tbool4x2;\t\t//!< \\brief boolean matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x3<bool, highp>\t\tbool4x3;\t\t//!< \\brief boolean matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x4<bool, highp>\t\tbool4x4;\t\t//!< \\brief boolean matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)\r\n\r\n\ttypedef int\t\t\t\t\t\t\tint1;\t\t\t//!< \\brief integer vector with 1 component. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec2<int, highp>\t\t\tint2;\t\t\t//!< \\brief integer vector with 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec3<int, highp>\t\t\tint3;\t\t\t//!< \\brief integer vector with 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec4<int, highp>\t\t\tint4;\t\t\t//!< \\brief integer vector with 4 components. (From GLM_GTX_compatibility extension)\r\n\r\n\ttypedef int\t\t\t\t\t\t\tint1x1;\t\t\t//!< \\brief integer matrix with 1 component. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x2<int, highp>\t\tint2x2;\t\t\t//!< \\brief integer matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x3<int, highp>\t\tint2x3;\t\t\t//!< \\brief integer matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x4<int, highp>\t\tint2x4;\t\t\t//!< \\brief integer matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x2<int, highp>\t\tint3x2;\t\t\t//!< \\brief integer matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x3<int, highp>\t\tint3x3;\t\t\t//!< \\brief integer matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x4<int, highp>\t\tint3x4;\t\t\t//!< \\brief integer matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x2<int, highp>\t\tint4x2;\t\t\t//!< \\brief integer matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x3<int, highp>\t\tint4x3;\t\t\t//!< \\brief integer matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x4<int, highp>\t\tint4x4;\t\t\t//!< \\brief integer matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)\r\n\r\n\ttypedef float\t\t\t\t\t\tfloat1;\t\t\t//!< \\brief single-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec2<float, highp>\t\tfloat2;\t\t\t//!< \\brief single-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec3<float, highp>\t\tfloat3;\t\t\t//!< \\brief single-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec4<float, highp>\t\tfloat4;\t\t\t//!< \\brief single-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension)\r\n\r\n\ttypedef float\t\t\t\t\t\tfloat1x1;\t\t//!< \\brief single-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x2<float, highp>\t\tfloat2x2;\t\t//!< \\brief single-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x3<float, highp>\t\tfloat2x3;\t\t//!< \\brief single-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x4<float, highp>\t\tfloat2x4;\t\t//!< \\brief single-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x2<float, highp>\t\tfloat3x2;\t\t//!< \\brief single-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x3<float, highp>\t\tfloat3x3;\t\t//!< \\brief single-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x4<float, highp>\t\tfloat3x4;\t\t//!< \\brief single-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x2<float, highp>\t\tfloat4x2;\t\t//!< \\brief single-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x3<float, highp>\t\tfloat4x3;\t\t//!< \\brief single-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x4<float, highp>\t\tfloat4x4;\t\t//!< \\brief single-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)\r\n\r\n\ttypedef double\t\t\t\t\t\tdouble1;\t\t//!< \\brief double-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec2<double, highp>\t\tdouble2;\t\t//!< \\brief double-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec3<double, highp>\t\tdouble3;\t\t//!< \\brief double-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec4<double, highp>\t\tdouble4;\t\t//!< \\brief double-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension)\r\n\r\n\ttypedef double\t\t\t\t\t\tdouble1x1;\t\t//!< \\brief double-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x2<double, highp>\t\tdouble2x2;\t\t//!< \\brief double-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x3<double, highp>\t\tdouble2x3;\t\t//!< \\brief double-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x4<double, highp>\t\tdouble2x4;\t\t//!< \\brief double-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x2<double, highp>\t\tdouble3x2;\t\t//!< \\brief double-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x3<double, highp>\t\tdouble3x3;\t\t//!< \\brief double-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x4<double, highp>\t\tdouble3x4;\t\t//!< \\brief double-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x2<double, highp>\t\tdouble4x2;\t\t//!< \\brief double-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x3<double, highp>\t\tdouble4x3;\t\t//!< \\brief double-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x4<double, highp>\t\tdouble4x4;\t\t//!< \\brief double-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"compatibility.inl\"\r\n\r\n#endif//GLM_GTX_compatibility\r\n\r\n"
  },
  {
    "path": "cpu/glm/gtx/compatibility.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-03-16\r\n// Updated : 2008-10-24\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/compatibility.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\t// isfinite\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER bool isfinite(\r\n\t\tgenType const & x)\r\n\t{\r\n#\t\tif(GLM_COMPILER & GLM_COMPILER_VC)\r\n\t\t\treturn _finite(x);\r\n#\t\telif(GLM_COMPILER & GLM_COMPILER_GCC)\r\n#\t\t\tif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)\r\n\t\t\t\treturn _isfinite(x) != 0;\r\n#\t\t\telse\r\n\t\t\t\treturn std::isfinite(x) != 0;\r\n#\t\t\tendif\r\n#\t\telse\r\n\t\t\treturn std::isfinite(x) != 0;\r\n#\t\tendif\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<bool, P> isfinite(\r\n\t\tdetail::tvec2<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec2<bool, P>(\r\n\t\t\tisfinite(x.x),\r\n\t\t\tisfinite(x.y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<bool, P> isfinite(\r\n\t\tdetail::tvec3<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec3<bool, P>(\r\n\t\t\tisfinite(x.x),\r\n\t\t\tisfinite(x.y),\r\n\t\t\tisfinite(x.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P> isfinite(\r\n\t\tdetail::tvec4<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec4<bool, P>(\r\n\t\t\tisfinite(x.x),\r\n\t\t\tisfinite(x.y),\r\n\t\t\tisfinite(x.z),\r\n\t\t\tisfinite(x.w));\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/component_wise.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_component_wise\r\n/// @file glm/gtx/component_wise.hpp\r\n/// @date 2007-05-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n/// \r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_component_wise GLM_GTX_component_wise\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Operations between components of a type\r\n/// \r\n/// <glm/gtx/component_wise.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_component_wise\r\n#define GLM_GTX_component_wise\r\n\r\n// Dependencies\r\n#include \"../detail/setup.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_component_wise extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_component_wise\r\n\t/// @{\r\n\r\n\t/// Add all vector components together. \r\n\t/// @see gtx_component_wise\r\n\ttemplate <typename genType> \r\n\ttypename genType::value_type compAdd(\r\n\t\tgenType const & v);\r\n\r\n\t/// Multiply all vector components together. \r\n\t/// @see gtx_component_wise\r\n\ttemplate <typename genType> \r\n\ttypename genType::value_type compMul(\r\n\t\tgenType const & v);\r\n\r\n\t/// Find the minimum value between single vector components.\r\n\t/// @see gtx_component_wise\r\n\ttemplate <typename genType> \r\n\ttypename genType::value_type compMin(\r\n\t\tgenType const & v);\r\n\r\n\t/// Find the maximum value between single vector components.\r\n\t/// @see gtx_component_wise\r\n\ttemplate <typename genType> \r\n\ttypename genType::value_type compMax(\r\n\t\tgenType const & v);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"component_wise.inl\"\r\n\r\n#endif//GLM_GTX_component_wise\r\n"
  },
  {
    "path": "cpu/glm/gtx/component_wise.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-05-21\r\n// Updated : 2010-02-12\r\n// Licence : This source is under MIT License\r\n// File    : gtx_component_wise.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER T compAdd(vecType<T, P> const & v)\r\n\t{\r\n\t\tT result(0);\r\n\t\tfor(length_t i = 0; i < v.length(); ++i)\r\n\t\t\tresult += v[i];\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER T compMul(vecType<T, P> const & v)\r\n\t{\r\n\t\tT result(1);\r\n\t\tfor(length_t i = 0; i < v.length(); ++i)\r\n\t\t\tresult *= v[i];\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER T compMin(vecType<T, P> const & v)\r\n\t{\r\n\t\tT result(v[0]);\r\n\t\tfor(length_t i = 1; i < v.length(); ++i)\r\n\t\t\tresult = min(result, v[i]);\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER T compMax(vecType<T, P> const & v)\r\n\t{\r\n\t\tT result(v[0]);\r\n\t\tfor(length_t i = 1; i < v.length(); ++i)\r\n\t\t\tresult = max(result, v[i]);\r\n\t\treturn result;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/constants.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_constants\r\n#define GLM_GTX_constants\r\n\r\n#include \"../gtc/constants.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES))\r\n#\tpragma message(\"GLM: GLM_GTX_constants extension is deprecated, include GLM_GTC_constants (glm/gtc/constants.hpp) instead\")\r\n#endif\r\n\r\n#endif//GLM_GTX_constants\r\n"
  },
  {
    "path": "cpu/glm/gtx/dual_quaternion.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n///\r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n///\r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_dual_quaternion\r\n/// @file glm/gtx/dual_quaternion.hpp\r\n/// @date 2013-02-10 / 2013-02-20\r\n/// @author Maksim Vorobiev (msomeone@gmail.com)\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_half_float (dependence)\r\n/// @see gtc_constants (dependence)\r\n/// @see gtc_quaternion (dependence)\r\n///\r\n/// @defgroup gtc_dual_quaternion GLM_GTX_dual_quaternion\r\n/// @ingroup gtc\r\n///\r\n/// @brief Defines a templated dual-quaternion type and several dual-quaternion operations.\r\n///\r\n/// <glm/gtx/dual_quaternion.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_dual_quaternion\r\n#define GLM_GTX_dual_quaternion\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtc/constants.hpp\"\r\n#include \"../gtc/quaternion.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_dual_quaternion extension included\")\r\n#endif\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tdualquat\r\n\t{\r\n\t\tenum ctor{null};\r\n\t\t\r\n\t\ttypedef glm::detail::tquat<T, P> part_type;\r\n\t\t\r\n\tpublic:\r\n\t\tglm::detail::tquat<T, P> real, dual;\r\n\t\t\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR int length() const;\r\n\t\t\r\n\t\t// Constructors\r\n\t\ttdualquat();\r\n\t\texplicit tdualquat(tquat<T, P> const & real);\r\n\t\ttdualquat(tquat<T, P> const & real,tquat<T, P> const & dual);\r\n\t\ttdualquat(tquat<T, P> const & orientation,tvec3<T, P> const& translation);\r\n\t\t\r\n\t\t//////////////////////////////////////////////////////////////\r\n\t\t// tdualquat conversions\r\n\t\texplicit tdualquat(tmat2x4<T, P> const & holder_mat);\r\n\t\texplicit tdualquat(tmat3x4<T, P> const & aug_mat);\r\n\t\t\r\n\t\t// Accesses\r\n\t\tpart_type & operator[](int i);\r\n\t\tpart_type const & operator[](int i) const;\r\n\t\t\r\n\t\t// Operators\r\n\t\ttdualquat<T, P> & operator*=(T const & s);\r\n\t\ttdualquat<T, P> & operator/=(T const & s);\r\n\t};\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tquat<T, P> operator- (\r\n\t\tdetail::tquat<T, P> const & q);\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tdualquat<T, P> operator+ (\r\n\t\tdetail::tdualquat<T, P> const & q,\r\n\t\tdetail::tdualquat<T, P> const & p);\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tdualquat<T, P> operator* (\r\n\t\tdetail::tdualquat<T, P> const & q,\r\n\t\tdetail::tdualquat<T, P> const & p);\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> operator* (\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> operator* (\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tdetail::tquat<T, P> const & q);\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec4<T, P> operator* (\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tvec4<T, P> const & v);\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec4<T, P> operator* (\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tdetail::tquat<T, P> const & q);\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tdualquat<T, P> operator* (\r\n\t\tdetail::tdualquat<T, P> const & q,\r\n\t\tT const & s);\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tdualquat<T, P> operator* (\r\n\t\tT const & s,\r\n\t\tdetail::tdualquat<T, P> const & q);\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tdualquat<T, P> operator/ (\r\n\t\tdetail::tdualquat<T, P> const & q,\r\n\t\tT const & s);\r\n} //namespace detail\r\n\t\r\n\t/// @addtogroup gtc_dual_quaternion\r\n\t/// @{\r\n\r\n\t/// Returns the normalized quaternion.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tdualquat<T, P> normalize(\r\n\t\tdetail::tdualquat<T, P> const & q);\r\n\r\n\t/// Returns the linear interpolation of two dual quaternion.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tdualquat<T, P> lerp(\r\n\t\tdetail::tdualquat<T, P> const & x,\r\n\t\tdetail::tdualquat<T, P> const & y,\r\n\t\tT const & a);\r\n\r\n\t/// Returns the q inverse.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tdualquat<T, P> inverse(\r\n\t\tdetail::tdualquat<T, P> const & q);\r\n\r\n\t/*\r\n\t/// Extracts a rotation part from dual-quaternion to a 3 * 3 matrix.\r\n\t/// TODO\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> mat3_cast(\r\n\t\tdetail::tdualquat<T, P> const & x);\r\n\t*/\r\n\t\r\n\t/// Converts a quaternion to a 2 * 4 matrix.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat2x4<T, P> mat2x4_cast(\r\n\t\tdetail::tdualquat<T, P> const & x);\r\n\r\n\t/// Converts a quaternion to a 3 * 4 matrix.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x4<T, P> mat3x4_cast(\r\n\t\tdetail::tdualquat<T, P> const & x);\r\n\r\n\t/// Converts a 2 * 4 matrix (matrix which holds real and dual parts) to a quaternion.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tdualquat<T, P> dualquat_cast(\r\n\t\tdetail::tmat2x4<T, P> const & x);\r\n\r\n\t/// Converts a 3 * 4 matrix (augmented matrix rotation + translation) to a quaternion.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tdualquat<T, P> dualquat_cast(\r\n\t\tdetail::tmat3x4<T, P> const & x);\r\n\r\n\t\r\n\t/// Dual-quaternion of low single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef detail::tdualquat<float, lowp>\t\tlowp_dualquat;\r\n\t\r\n\t/// Dual-quaternion of medium single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef detail::tdualquat<float, mediump>\tmediump_dualquat;\r\n\t\r\n\t/// Dual-quaternion of high single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef detail::tdualquat<float, highp>\t\thighp_dualquat;\r\n\r\n\r\n\t/// Dual-quaternion of low single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef detail::tdualquat<float, lowp>\t\tlowp_fdualquat;\r\n\t\r\n\t/// Dual-quaternion of medium single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef detail::tdualquat<float, mediump>\tmediump_fdualquat;\r\n\t\r\n\t/// Dual-quaternion of high single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef detail::tdualquat<float, highp>\t\thighp_fdualquat;\r\n\t\r\n\t\r\n\t/// Dual-quaternion of low double-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef detail::tdualquat<double, lowp>\t\tlowp_ddualquat;\r\n\t\r\n\t/// Dual-quaternion of medium double-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef detail::tdualquat<double, mediump>\tmediump_ddualquat;\r\n\t\r\n\t/// Dual-quaternion of high double-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef detail::tdualquat<double, highp>\thighp_ddualquat;\r\n\r\n\t\r\n#if(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))\r\n\t/// Dual-quaternion of floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef highp_fdualquat\t\t\tdualquat;\r\n\t\r\n\t/// Dual-quaternion of single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef highp_fdualquat\t\t\tfdualquat;\r\n#elif(defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef highp_fdualquat\t\t\tdualquat;\r\n\ttypedef highp_fdualquat\t\t\tfdualquat;\r\n#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef mediump_fdualquat\t\tdualquat;\r\n\ttypedef mediump_fdualquat\t\tfdualquat;\r\n#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef lowp_fdualquat\t\t\tdualquat;\r\n\ttypedef lowp_fdualquat\t\t\tfdualquat;\r\n#else\r\n#\terror \"GLM error: multiple default precision requested for single-precision floating-point types\"\r\n#endif\r\n\t\r\n\r\n#if(!defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))\r\n\t/// Dual-quaternion of default double-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef highp_ddualquat\t\t\tddualquat;\r\n#elif(defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))\r\n\ttypedef highp_ddualquat\t\t\tddualquat;\r\n#elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))\r\n\ttypedef mediump_ddualquat\t\tddualquat;\r\n#elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && defined(GLM_PRECISION_LOWP_DOUBLE))\r\n\ttypedef lowp_ddualquat\t\t\tddualquat;\r\n#else\r\n#\terror \"GLM error: Multiple default precision requested for double-precision floating-point types\"\r\n#endif\r\n\r\n\t/// @}\r\n} //namespace glm\r\n\r\n#include \"dual_quaternion.inl\"\r\n\r\n#endif//GLM_GTX_dual_quaternion\r\n"
  },
  {
    "path": "cpu/glm/gtx/dual_quaternion.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_dual_quaternion\r\n/// @file glm/gtx/dual_quaternion.inl\r\n/// @date 2013-02-10 / 2013-02-13\r\n/// @author Maksim Vorobiev (msomeone@gmail.com)\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../geometric.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR int tdualquat<T, P>::length() const\r\n\t{\r\n\t\treturn 8;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat() :\r\n\t\treal(tquat<T, P>()),\r\n\t\tdual(tquat<T, P>(T(0), T(0), T(0), T(0)))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat\r\n\t(\r\n\t\ttquat<T, P> const & r\r\n\t) :\r\n\t\treal(r),\r\n\t\tdual(tquat<T, P>(T(0), T(0), T(0), T(0)))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat\r\n\t(\r\n\t\ttquat<T, P> const & r,\r\n\t\ttquat<T, P> const & d\r\n\t) :\r\n\t\treal(r),\r\n\t\tdual(d)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat\r\n\t(\r\n\t\ttquat<T, P> const & q,\r\n\t\ttvec3<T, P> const& p\r\n\t) :\r\n\t\treal(q),\r\n\t\tdual(\r\n\t\t\tT(-0.5) * ( p.x*q.x + p.y*q.y + p.z*q.z),\r\n\t\t\tT(+0.5) * ( p.x*q.w + p.y*q.z - p.z*q.y),\r\n\t\t\tT(+0.5) * (-p.x*q.z + p.y*q.w + p.z*q.x),\r\n\t\t\tT(+0.5) * ( p.x*q.y - p.y*q.x + p.z*q.w))\r\n\t{}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// tdualquat conversions\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat\r\n\t(\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\t*this = dualquat_cast(m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat\r\n\t(\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\t*this = dualquat_cast(m);\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// tdualquat<T, P> accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tdualquat<T, P>::part_type & tdualquat<T, P>::operator [] (int i)\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&real)[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tdualquat<T, P>::part_type const & tdualquat<T, P>::operator [] (int i) const\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&real)[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// tdualquat<valType> operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tdualquat<T, P> & tdualquat<T, P>::operator *=\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tthis->real *= s;\r\n\t\tthis->dual *= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tdualquat<T, P> & tdualquat<T, P>::operator /=\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tthis->real /= s;\r\n\t\tthis->dual /= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// tquat<valType> external operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tdualquat<T, P> operator-\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn detail::tdualquat<T, P>(-q.real,-q.dual);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tdualquat<T, P> operator+\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & q,\r\n\t\tdetail::tdualquat<T, P> const & p\r\n\t)\r\n\t{\r\n\t\treturn detail::tdualquat<T, P>(q.real + p.real,q.dual + p.dual);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tdualquat<T, P> operator*\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & p,\r\n\t\tdetail::tdualquat<T, P> const & o\r\n\t)\r\n\t{\r\n\t\treturn detail::tdualquat<T, P>(p.real * o.real,p.real * o.dual + p.dual * o.real);\r\n\t}\r\n\r\n\t// Transformation\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> operator*\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & q,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> const real_v3(q.real.x,q.real.y,q.real.z);\r\n\t\tdetail::tvec3<T, P> const dual_v3(q.dual.x,q.dual.y,q.dual.z);\r\n\t\treturn (cross(real_v3, cross(real_v3,v) + v * q.real.w + dual_v3) + dual_v3 * q.real.w - real_v3 * q.dual.w) * T(2) + v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> operator*\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tdetail::tdualquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn glm::inverse(q) * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> operator*\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & q,\r\n\t\tdetail::tvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(q * detail::tvec3<T, P>(v), v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> operator*\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tdetail::tdualquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn glm::inverse(q) * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tdualquat<T, P> operator*\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & q,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn detail::tdualquat<T, P>(q.real * s, q.dual * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tdualquat<T, P> operator*\r\n\t(\r\n\t\tT const & s,\r\n\t\tdetail::tdualquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn q * s;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tdualquat<T, P> operator/\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & q,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn detail::tdualquat<T, P>(q.real / s, q.dual / s);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & q1,\r\n\t\tdetail::tdualquat<T, P> const & q2\r\n\t)\r\n\t{\r\n\t\treturn (q1.real == q2.real) && (q1.dual == q2.dual);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & q1,\r\n\t\tdetail::tdualquat<T, P> const & q2\r\n\t)\r\n\t{\r\n\t\treturn (q1.real != q2.dual) || (q1.real != q2.dual);\r\n\t}\r\n\t}//namespace detail\r\n\r\n\t////////////////////////////////////////////////////////\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tdualquat<T, P> normalize\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn q / length(q.real);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tdualquat<T, P> lerp\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & x,\r\n\t\tdetail::tdualquat<T, P> const & y,\r\n\t\tT const & a\r\n\t)\r\n\t{\r\n\t\t// Dual Quaternion Linear blend aka DLB:\r\n\t\t// Lerp is only defined in [0, 1]\r\n\t\tassert(a >= static_cast<T>(0));\r\n\t\tassert(a <= static_cast<T>(1));\r\n\t\tT const k = dot(x.real,y.real) < static_cast<T>(0) ? -a : a;\r\n\t\tT const one(1);\r\n\t\treturn detail::tdualquat<T, P>(x * (one - a) + y * k);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tdualquat<T, P> inverse\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\tconst glm::detail::tquat<T, P> real = conjugate(q.real);\r\n\t\tconst glm::detail::tquat<T, P> dual = conjugate(q.dual);\r\n\t\treturn detail::tdualquat<T, P>(real, dual + (real * (-2.0f * dot(real,dual))));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat2x4<T, P> mat2x4_cast\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::tmat2x4<T, P>( x[0].x, x[0].y, x[0].z, x[0].w, x[1].x, x[1].y, x[1].z, x[1].w );\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x4<T, P> mat3x4_cast\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tdetail::tquat<T, P> r = x.real / length2(x.real);\r\n\t\t\r\n\t\tdetail::tquat<T, P> const rr(r.w * x.real.w, r.x * x.real.x, r.y * x.real.y, r.z * x.real.z);\r\n\t\tr *= static_cast<T>(2);\r\n\t\t\r\n\t\tT const xy = r.x * x.real.y;\r\n\t\tT const xz = r.x * x.real.z;\r\n\t\tT const yz = r.y * x.real.z;\r\n\t\tT const wx = r.w * x.real.x;\r\n\t\tT const wy = r.w * x.real.y;\r\n\t\tT const wz = r.w * x.real.z;\r\n\t\t\r\n\t\tdetail::tvec4<T, P> const a(\r\n\t\t\trr.w + rr.x - rr.y - rr.z,\r\n\t\t\txy - wz,\r\n\t\t\txz + wy,\r\n\t\t\t-(x.dual.w * r.x - x.dual.x * r.w + x.dual.y * r.z - x.dual.z * r.y));\r\n\t\t\r\n\t\tdetail::tvec4<T, P> const b(\r\n\t\t\txy + wz,\r\n\t\t\trr.w + rr.y - rr.x - rr.z,\r\n\t\t\tyz - wx,\r\n\t\t\t-(x.dual.w * r.y - x.dual.x * r.z - x.dual.y * r.w + x.dual.z * r.x));\r\n\t\t\r\n\t\tdetail::tvec4<T, P> const c(\r\n\t\t\txz - wy,\r\n\t\t\tyz + wx,\r\n\t\t\trr.w + rr.z - rr.x - rr.y,\r\n\t\t\t-(x.dual.w * r.z + x.dual.x * r.y - x.dual.y * r.x - x.dual.z * r.w));\r\n\t\t\r\n\t\treturn detail::tmat3x4<T, P>(a, b, c);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tdualquat<T, P> dualquat_cast\r\n\t(\r\n\t\tdetail::tmat2x4<T, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::tdualquat<T, P>(\r\n\t\t\tdetail::tquat<T, P>( x[0].w, x[0].x, x[0].y, x[0].z ),\r\n\t\t\tdetail::tquat<T, P>( x[1].w, x[1].x, x[1].y, x[1].z ));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tdualquat<T, P> dualquat_cast\r\n\t(\r\n\t\tdetail::tmat3x4<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tdetail::tquat<T, P> real;\r\n\t\t\r\n\t\tT const trace = x[0].x + x[1].y + x[2].z;\r\n\t\tif(trace > T(0))\r\n\t\t{\r\n\t\t\tT const r = sqrt(T(1) + trace);\r\n\t\t\tT const invr = static_cast<T>(0.5) / r;\r\n\t\t\treal.w = static_cast<T>(0.5) * r;\r\n\t\t\treal.x = (x[2].y - x[1].z) * invr;\r\n\t\t\treal.y = (x[0].z - x[2].x) * invr;\r\n\t\t\treal.z = (x[1].x - x[0].y) * invr;\r\n\t\t}\r\n\t\telse if(x[0].x > x[1].y && x[0].x > x[2].z)\r\n\t\t{\r\n\t\t\tT const r = sqrt(T(1) + x[0].x - x[1].y - x[2].z);\r\n\t\t\tT const invr = static_cast<T>(0.5) / r;\r\n\t\t\treal.x = static_cast<T>(0.5)*r;\r\n\t\t\treal.y = (x[1].x + x[0].y) * invr;\r\n\t\t\treal.z = (x[0].z + x[2].x) * invr;\r\n\t\t\treal.w = (x[2].y - x[1].z) * invr;\r\n\t\t}\r\n\t\telse if(x[1].y > x[2].z)\r\n\t\t{\r\n\t\t\tT const r = sqrt(T(1) + x[1].y - x[0].x - x[2].z);\r\n\t\t\tT const invr = static_cast<T>(0.5) / r;\r\n\t\t\treal.x = (x[1].x + x[0].y) * invr;\r\n\t\t\treal.y = static_cast<T>(0.5) * r;\r\n\t\t\treal.z = (x[2].y + x[1].z) * invr;\r\n\t\t\treal.w = (x[0].z - x[2].x) * invr;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tT const r = sqrt(T(1) + x[2].z - x[0].x - x[1].y);\r\n\t\t\tT const invr = static_cast<T>(0.5) / r;\r\n\t\t\treal.x = (x[0].z + x[2].x) * invr;\r\n\t\t\treal.y = (x[2].y + x[1].z) * invr;\r\n\t\t\treal.z = static_cast<T>(0.5) * r;\r\n\t\t\treal.w = (x[1].x - x[0].y) * invr;\r\n\t\t}\r\n\t\t\r\n\t\tdetail::tquat<T, P> dual;\r\n\t\tdual.x =  T(0.5) * ( x[0].w * real.w + x[1].w * real.z - x[2].w * real.y);\r\n\t\tdual.y =  T(0.5) * (-x[0].w * real.z + x[1].w * real.w + x[2].w * real.x);\r\n\t\tdual.z =  T(0.5) * ( x[0].w * real.y - x[1].w * real.x + x[2].w * real.w);\r\n\t\tdual.w = -T(0.5) * ( x[0].w * real.x + x[1].w * real.y + x[2].w * real.z);\r\n\t\treturn detail::tdualquat<T, P>(real, dual);\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/epsilon.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#if(defined(GLM_MESSAGES))\r\n#\tpragma message(\"GLM: GLM_GTX_epsilon extension is deprecated, include GLM_GTC_epsilon (glm/gtc/epsilon) instead\")\r\n#endif\r\n\r\n// Promoted:\r\n#include \"../gtc/epsilon.hpp\"\r\n"
  },
  {
    "path": "cpu/glm/gtx/euler_angles.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_euler_angles\r\n/// @file glm/gtx/euler_angles.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_half_float (dependence)\r\n///\r\n/// @defgroup gtx_euler_angles GLM_GTX_euler_angles\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Build matrices from Euler angles.\r\n/// \r\n/// <glm/gtx/euler_angles.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_euler_angles\r\n#define GLM_GTX_euler_angles\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_euler_angles extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_euler_angles\r\n\t/// @{\r\n\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X.\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat4x4<T, defaultp> eulerAngleX(\r\n\t\tT const & angleX);\r\n\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y.\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat4x4<T, defaultp> eulerAngleY(\r\n\t\tT const & angleY);\r\n\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z.\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat4x4<T, defaultp> eulerAngleZ(\r\n\t\tT const & angleZ);\r\n\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y).\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat4x4<T, defaultp> eulerAngleXY(\r\n\t\tT const & angleX,\r\n\t\tT const & angleY);\r\n\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X).\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat4x4<T, defaultp> eulerAngleYX(\r\n\t\tT const & angleY,\r\n\t\tT const & angleX);\r\n\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z).\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat4x4<T, defaultp> eulerAngleXZ(\r\n\t\tT const & angleX,\r\n\t\tT const & angleZ);\r\n\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X).\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat4x4<T, defaultp> eulerAngleZX(\r\n\t\tT const & angle,\r\n\t\tT const & angleX);\r\n\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z).\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat4x4<T, defaultp> eulerAngleYZ(\r\n\t\tT const & angleY,\r\n\t\tT const & angleZ);\r\n\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y).\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat4x4<T, defaultp> eulerAngleZY(\r\n\t\tT const & angleZ,\r\n\t\tT const & angleY);\r\n\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat4x4<T, defaultp> eulerAngleYXZ(\r\n\t\tT const & yaw,\r\n\t\tT const & pitch,\r\n\t\tT const & roll);\r\n\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat4x4<T, defaultp> yawPitchRoll(\r\n\t\tT const & yaw,\r\n\t\tT const & pitch,\r\n\t\tT const & roll);\r\n\r\n\t/// Creates a 2D 2 * 2 rotation matrix from an euler angle.\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat2x2<T, defaultp> orientate2(T const & angle);\r\n\r\n\t/// Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle.\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat3x3<T, defaultp> orientate3(T const & angle);\r\n\r\n\t/// Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z). \r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> orientate3(detail::tvec3<T, P> const & angles);\r\n\t\t\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> orientate4(detail::tvec3<T, P> const & angles);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"euler_angles.inl\"\r\n\r\n#endif//GLM_GTX_euler_angles\r\n"
  },
  {
    "path": "cpu/glm/gtx/euler_angles.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2007-08-14\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/euler_angles.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> eulerAngleX\r\n\t(\r\n\t\tT const & angleX\r\n\t)\r\n\t{\r\n\t\tT cosX = glm::cos(angleX);\r\n\t\tT sinX = glm::sin(angleX);\r\n\t\r\n\t\treturn detail::tmat4x4<T, defaultp>(\r\n\t\t\tT(1), T(0), T(0), T(0),\r\n\t\t\tT(0), cosX, sinX, T(0),\r\n\t\t\tT(0),-sinX, cosX, T(0),\r\n\t\t\tT(0), T(0), T(0), T(1));\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> eulerAngleY\r\n\t(\r\n\t\tT const & angleY\r\n\t)\r\n\t{\r\n\t\tT cosY = glm::cos(angleY);\r\n\t\tT sinY = glm::sin(angleY);\r\n\r\n\t\treturn detail::tmat4x4<T, defaultp>(\r\n\t\t\tcosY,\tT(0),\t-sinY,\tT(0),\r\n\t\t\tT(0),\tT(1),\tT(0),\tT(0),\r\n\t\t\tsinY,\tT(0),\tcosY,\tT(0),\r\n\t\t\tT(0),\tT(0),\tT(0),\tT(1));\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> eulerAngleZ\r\n\t(\r\n\t\tT const & angleZ\r\n\t)\r\n\t{\r\n\t\tT cosZ = glm::cos(angleZ);\r\n\t\tT sinZ = glm::sin(angleZ);\r\n\r\n\t\treturn detail::tmat4x4<T, defaultp>(\r\n\t\t\tcosZ,\tsinZ,\tT(0), T(0),\r\n\t\t\t-sinZ,\tcosZ,\tT(0), T(0),\r\n\t\t\tT(0),\tT(0),\tT(1), T(0),\r\n\t\t\tT(0),\tT(0),\tT(0), T(1));\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> eulerAngleXY\r\n\t(\r\n\t\tT const & angleX,\r\n\t\tT const & angleY\r\n\t)\r\n\t{\r\n\t\tT cosX = glm::cos(angleX);\r\n\t\tT sinX = glm::sin(angleX);\r\n\t\tT cosY = glm::cos(angleY);\r\n\t\tT sinY = glm::sin(angleY);\r\n\r\n\t\treturn detail::tmat4x4<T, defaultp>(\r\n\t\t\tcosY,\t-sinX * sinY,\tcosX * sinY,\tT(0),\r\n\t\t\tT(0),\tcosX,\t\t\tsinX,\t\t\tT(0),\r\n\t\t\t-sinY,\t-sinX * cosY,\tcosX * cosY,\tT(0),\r\n\t\t\tT(0),\tT(0),\t\t\tT(0),\t\t\tT(1));\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> eulerAngleYX\r\n\t(\r\n\t\tT const & angleY,\r\n\t\tT const & angleX\r\n\t)\r\n\t{\r\n\t\tT cosX = glm::cos(angleX);\r\n\t\tT sinX = glm::sin(angleX);\r\n\t\tT cosY = glm::cos(angleY);\r\n\t\tT sinY = glm::sin(angleY);\r\n\r\n\t\treturn detail::tmat4x4<T, defaultp>(\r\n\t\t\tcosY,\t\t\tT(0),\t\tsinY,\t\t\tT(0),\r\n\t\t\t-sinX * sinY,\tcosX,\t\tsinX * cosY,\tT(0),\r\n\t\t\t-cosX * sinY,\t-sinX,\t\tcosX * cosY,\tT(0),\r\n\t\t\tT(0),\t\t\tT(0),\t\tT(0),\t\t\tT(1));\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> eulerAngleXZ\r\n\t(\r\n\t\tT const & angleX,\r\n\t\tT const & angleZ\r\n\t)\r\n\t{\r\n\t\treturn eulerAngleX(angleX) * eulerAngleZ(angleZ);\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> eulerAngleZX\r\n\t(\r\n\t\tT const & angleZ,\r\n\t\tT const & angleX\r\n\t)\r\n\t{\r\n\t\treturn eulerAngleZ(angleZ) * eulerAngleX(angleX);\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> eulerAngleYXZ\r\n\t(\r\n\t\tT const & yaw,\r\n\t\tT const & pitch,\r\n\t\tT const & roll\r\n\t)\r\n\t{\r\n\t\tT tmp_ch = glm::cos(yaw);\r\n\t\tT tmp_sh = glm::sin(yaw);\r\n\t\tT tmp_cp = glm::cos(pitch);\r\n\t\tT tmp_sp = glm::sin(pitch);\r\n\t\tT tmp_cb = glm::cos(roll);\r\n\t\tT tmp_sb = glm::sin(roll);\r\n\r\n\t\tdetail::tmat4x4<T, defaultp> Result;\r\n\t\tResult[0][0] = tmp_ch * tmp_cb + tmp_sh * tmp_sp * tmp_sb;\r\n\t\tResult[0][1] = tmp_sb * tmp_cp;\r\n\t\tResult[0][2] = -tmp_sh * tmp_cb + tmp_ch * tmp_sp * tmp_sb;\r\n\t\tResult[0][3] = static_cast<T>(0);\r\n\t\tResult[1][0] = -tmp_ch * tmp_sb + tmp_sh * tmp_sp * tmp_cb;\r\n\t\tResult[1][1] = tmp_cb * tmp_cp;\r\n\t\tResult[1][2] = tmp_sb * tmp_sh + tmp_ch * tmp_sp * tmp_cb;\r\n\t\tResult[1][3] = static_cast<T>(0);\r\n\t\tResult[2][0] = tmp_sh * tmp_cp;\r\n\t\tResult[2][1] = -tmp_sp;\r\n\t\tResult[2][2] = tmp_ch * tmp_cp;\r\n\t\tResult[2][3] = static_cast<T>(0);\r\n\t\tResult[3][0] = static_cast<T>(0);\r\n\t\tResult[3][1] = static_cast<T>(0);\r\n\t\tResult[3][2] = static_cast<T>(0);\r\n\t\tResult[3][3] = static_cast<T>(1);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> yawPitchRoll\r\n\t(\r\n\t\tT const & yaw,\r\n\t\tT const & pitch,\r\n\t\tT const & roll\r\n\t)\r\n\t{\r\n\t\tT tmp_ch = glm::cos(yaw);\r\n\t\tT tmp_sh = glm::sin(yaw);\r\n\t\tT tmp_cp = glm::cos(pitch);\r\n\t\tT tmp_sp = glm::sin(pitch);\r\n\t\tT tmp_cb = glm::cos(roll);\r\n\t\tT tmp_sb = glm::sin(roll);\r\n\r\n\t\tdetail::tmat4x4<T, defaultp> Result;\r\n\t\tResult[0][0] = tmp_ch * tmp_cb + tmp_sh * tmp_sp * tmp_sb;\r\n\t\tResult[0][1] = tmp_sb * tmp_cp;\r\n\t\tResult[0][2] = -tmp_sh * tmp_cb + tmp_ch * tmp_sp * tmp_sb;\r\n\t\tResult[0][3] = static_cast<T>(0);\r\n\t\tResult[1][0] = -tmp_ch * tmp_sb + tmp_sh * tmp_sp * tmp_cb;\r\n\t\tResult[1][1] = tmp_cb * tmp_cp;\r\n\t\tResult[1][2] = tmp_sb * tmp_sh + tmp_ch * tmp_sp * tmp_cb;\r\n\t\tResult[1][3] = static_cast<T>(0);\r\n\t\tResult[2][0] = tmp_sh * tmp_cp;\r\n\t\tResult[2][1] = -tmp_sp;\r\n\t\tResult[2][2] = tmp_ch * tmp_cp;\r\n\t\tResult[2][3] = static_cast<T>(0);\r\n\t\tResult[3][0] = static_cast<T>(0);\r\n\t\tResult[3][1] = static_cast<T>(0);\r\n\t\tResult[3][2] = static_cast<T>(0);\r\n\t\tResult[3][3] = static_cast<T>(1);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat2x2<T, defaultp> orientate2\r\n\t(\r\n\t\tT const & angle\r\n\t)\r\n\t{\r\n\t\tT c = glm::cos(angle);\r\n\t\tT s = glm::sin(angle);\r\n\r\n\t\tdetail::tmat2x2<T, defaultp> Result;\r\n\t\tResult[0][0] = c;\r\n\t\tResult[0][1] = s;\r\n\t\tResult[1][0] = -s;\r\n\t\tResult[1][1] = c;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, defaultp> orientate3\r\n\t(\r\n\t\tT const & angle\r\n\t)\r\n\t{\r\n\t\tT c = glm::cos(angle);\r\n\t\tT s = glm::sin(angle);\r\n\r\n\t\tdetail::tmat3x3<T, defaultp> Result;\r\n\t\tResult[0][0] = c;\r\n\t\tResult[0][1] = s;\r\n\t\tResult[0][2] = 0.0f;\r\n\t\tResult[1][0] = -s;\r\n\t\tResult[1][1] = c;\r\n\t\tResult[1][2] = 0.0f;\r\n\t\tResult[2][0] = 0.0f;\r\n\t\tResult[2][1] = 0.0f;\r\n\t\tResult[2][2] = 1.0f;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> orientate3\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & angles\r\n\t)\r\n\t{\r\n\t\treturn detail::tmat3x3<T, P>(yawPitchRoll(angles.x, angles.y, angles.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> orientate4\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & angles\r\n\t)\r\n\t{\r\n\t\treturn yawPitchRoll(angles.z, angles.x, angles.y);\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/extend.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_extend\r\n/// @file glm/gtx/extend.hpp\r\n/// @date 2006-01-07 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_extend GLM_GTX_extend\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Extend a position from a source to a position at a defined length.\r\n/// \r\n/// <glm/gtx/extend.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_extend\r\n#define GLM_GTX_extend\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_extend extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_extend\r\n\t/// @{\r\n\r\n\t/// Extends of Length the Origin position using the (Source - Origin) direction.\r\n\t/// @see gtx_extend\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType extend(\r\n\t\tgenType const & Origin, \r\n\t\tgenType const & Source, \r\n\t\ttypename genType::value_type const Length);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"extend.inl\"\r\n\r\n#endif//GLM_GTX_extend\r\n"
  },
  {
    "path": "cpu/glm/gtx/extend.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2006-01-07\r\n// Updated : 2008-10-05\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/extend.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType extend\r\n\t(\r\n\t\tgenType const & Origin, \r\n\t\tgenType const & Source, \r\n\t\tgenType const & Distance\r\n\t)\r\n\t{\r\n\t\treturn Origin + (Source - Origin) * Distance;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> extend\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & Origin,\r\n\t\tdetail::tvec2<T, P> const & Source,\r\n\t\tT const & Distance\r\n\t)\r\n\t{\r\n\t\treturn Origin + (Source - Origin) * Distance;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> extend\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & Origin,\r\n\t\tdetail::tvec3<T, P> const & Source,\r\n\t\tT const & Distance\r\n\t)\r\n\t{\r\n\t\treturn Origin + (Source - Origin) * Distance;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> extend\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & Origin,\r\n\t\tdetail::tvec4<T, P> const & Source,\r\n\t\tT const & Distance\r\n\t)\r\n\t{\r\n\t\treturn Origin + (Source - Origin) * Distance;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/extented_min_max.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_extented_min_max\r\n/// @file glm/gtx/extented_min_max.hpp\r\n/// @date 2007-03-14 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_half_float (dependence)\r\n///\r\n/// @defgroup gtx_extented_min_max GLM_GTX_extented_min_max\r\n/// @ingroup gtx\r\n/// \r\n/// Min and max functions for 3 to 4 parameters.\r\n/// \r\n/// <glm/gtx/extented_min_max.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_extented_min_max\r\n#define GLM_GTX_extented_min_max\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_extented_min_max extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_extented_min_max\r\n\t/// @{\r\n\r\n\t/// Return the minimum component-wise values of 3 inputs \r\n\t/// @see gtx_extented_min_max\r\n\ttemplate <typename T>\r\n\tT min(\r\n\t\tT const & x, \r\n\t\tT const & y, \r\n\t\tT const & z);\r\n\r\n\t/// Return the minimum component-wise values of 3 inputs\r\n\t/// @see gtx_extented_min_max\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tC<T> min(\r\n\t\tC<T> const & x, \r\n\t\ttypename C<T>::T const & y, \r\n\t\ttypename C<T>::T const & z);\r\n\r\n\t/// Return the minimum component-wise values of 3 inputs \r\n\t/// @see gtx_extented_min_max\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tC<T> min(\r\n\t\tC<T> const & x, \r\n\t\tC<T> const & y, \r\n\t\tC<T> const & z);\r\n\r\n\t/// Return the minimum component-wise values of 4 inputs \r\n\t/// @see gtx_extented_min_max\r\n\ttemplate <typename T>\r\n\tT min(\r\n\t\tT const & x, \r\n\t\tT const & y, \r\n\t\tT const & z, \r\n\t\tT const & w);\r\n\r\n\t/// Return the minimum component-wise values of 4 inputs \r\n\t/// @see gtx_extented_min_max\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tC<T> min(\r\n\t\tC<T> const & x, \r\n\t\ttypename C<T>::T const & y, \r\n\t\ttypename C<T>::T const & z, \r\n\t\ttypename C<T>::T const & w);\r\n\r\n\t/// Return the minimum component-wise values of 4 inputs\r\n\t/// @see gtx_extented_min_max\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tC<T> min(\r\n\t\tC<T> const & x, \r\n\t\tC<T> const & y, \r\n\t\tC<T> const & z,\r\n\t\tC<T> const & w);\r\n\r\n\t/// Return the maximum component-wise values of 3 inputs \r\n\t/// @see gtx_extented_min_max\r\n\ttemplate <typename T>\r\n\tT max(\r\n\t\tT const & x, \r\n\t\tT const & y, \r\n\t\tT const & z);\r\n\r\n\t/// Return the maximum component-wise values of 3 inputs\r\n\t/// @see gtx_extented_min_max\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tC<T> max(\r\n\t\tC<T> const & x, \r\n\t\ttypename C<T>::T const & y, \r\n\t\ttypename C<T>::T const & z);\r\n\r\n\t/// Return the maximum component-wise values of 3 inputs \r\n\t/// @see gtx_extented_min_max\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tC<T> max(\r\n\t\tC<T> const & x, \r\n\t\tC<T> const & y, \r\n\t\tC<T> const & z);\r\n\r\n\t/// Return the maximum component-wise values of 4 inputs\r\n\t/// @see gtx_extented_min_max\r\n\ttemplate <typename T>\r\n\tT max(\r\n\t\tT const & x, \r\n\t\tT const & y, \r\n\t\tT const & z, \r\n\t\tT const & w);\r\n\r\n\t/// Return the maximum component-wise values of 4 inputs \r\n\t/// @see gtx_extented_min_max\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tC<T> max(\r\n\t\tC<T> const & x, \r\n\t\ttypename C<T>::T const & y, \r\n\t\ttypename C<T>::T const & z, \r\n\t\ttypename C<T>::T const & w);\r\n\r\n\t/// Return the maximum component-wise values of 4 inputs \r\n\t/// @see gtx_extented_min_max\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tC<T> max(\r\n\t\tC<T> const & x, \r\n\t\tC<T> const & y, \r\n\t\tC<T> const & z, \r\n\t\tC<T> const & w);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"extented_min_max.inl\"\r\n\r\n#endif//GLM_GTX_extented_min_max\r\n"
  },
  {
    "path": "cpu/glm/gtx/extented_min_max.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-03-14\r\n// Updated : 2010-02-19\r\n// Licence : This source is under MIT License\r\n// File    : gtx_extented_min_max.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T min(\r\n\t\tT const & x, \r\n\t\tT const & y, \r\n\t\tT const & z)\r\n\t{\r\n\t\treturn glm::min(glm::min(x, y), z);\r\n\t}\r\n\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tGLM_FUNC_QUALIFIER C<T> min\r\n\t(\r\n\t\tC<T> const & x, \r\n\t\ttypename C<T>::T const & y, \r\n\t\ttypename C<T>::T const & z\r\n\t)\r\n\t{\r\n\t\treturn glm::min(glm::min(x, y), z);\r\n\t}\r\n\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tGLM_FUNC_QUALIFIER C<T> min\r\n\t(\r\n\t\tC<T> const & x, \r\n\t\tC<T> const & y, \r\n\t\tC<T> const & z\r\n\t)\r\n\t{\r\n\t\treturn glm::min(glm::min(x, y), z);\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T min\r\n\t(\r\n\t\tT const & x, \r\n\t\tT const & y, \r\n\t\tT const & z, \r\n\t\tT const & w\r\n\t)\r\n\t{\r\n\t\treturn glm::min(glm::min(x, y), glm::min(z, w));\r\n\t}\r\n\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tGLM_FUNC_QUALIFIER C<T> min\r\n\t(\r\n\t\tC<T> const & x, \r\n\t\ttypename C<T>::T const & y, \r\n\t\ttypename C<T>::T const & z, \r\n\t\ttypename C<T>::T const & w\r\n\t)\r\n\t{\r\n\t\treturn glm::min(glm::min(x, y), glm::min(z, w));\r\n\t}\r\n\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tGLM_FUNC_QUALIFIER C<T> min\r\n\t(\r\n\t\tC<T> const & x, \r\n\t\tC<T> const & y, \r\n\t\tC<T> const & z, \r\n\t\tC<T> const & w\r\n\t)\r\n\t{\r\n\t\treturn glm::min(glm::min(x, y), glm::min(z, w));\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T max(\r\n\t\tT const & x, \r\n\t\tT const & y, \r\n\t\tT const & z)\r\n\t{\r\n\t\treturn glm::max(glm::max(x, y), z);\r\n\t}\r\n\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tGLM_FUNC_QUALIFIER C<T> max\r\n\t(\r\n\t\tC<T> const & x, \r\n\t\ttypename C<T>::T const & y, \r\n\t\ttypename C<T>::T const & z\r\n\t)\r\n\t{\r\n\t\treturn glm::max(glm::max(x, y), z);\r\n\t}\r\n\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tGLM_FUNC_QUALIFIER C<T> max\r\n\t(\r\n\t\tC<T> const & x, \r\n\t\tC<T> const & y, \r\n\t\tC<T> const & z\r\n\t)\r\n\t{\r\n\t\treturn glm::max(glm::max(x, y), z);\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T max\r\n\t(\r\n\t\tT const & x, \r\n\t\tT const & y, \r\n\t\tT const & z, \r\n\t\tT const & w\r\n\t)\r\n\t{\r\n\t\treturn glm::max(glm::max(x, y), glm::max(z, w));\r\n\t}\r\n\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tGLM_FUNC_QUALIFIER C<T> max\r\n\t(\r\n\t\tC<T> const & x, \r\n\t\ttypename C<T>::T const & y, \r\n\t\ttypename C<T>::T const & z, \r\n\t\ttypename C<T>::T const & w\r\n\t)\r\n\t{\r\n\t\treturn glm::max(glm::max(x, y), glm::max(z, w));\r\n\t}\r\n\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tGLM_FUNC_QUALIFIER C<T> max\r\n\t(\r\n\t\tC<T> const & x, \r\n\t\tC<T> const & y, \r\n\t\tC<T> const & z, \r\n\t\tC<T> const & w\r\n\t)\r\n\t{\r\n\t\treturn glm::max(glm::max(x, y), glm::max(z, w));\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/fast_exponential.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_fast_exponential\r\n/// @file glm/gtx/fast_exponential.hpp\r\n/// @date 2006-01-09 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_half_float (dependence)\r\n///\r\n/// @defgroup gtx_fast_exponential GLM_GTX_fast_exponential\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Fast but less accurate implementations of exponential based functions.\r\n/// \r\n/// <glm/gtx/fast_exponential.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_fast_exponential\r\n#define GLM_GTX_fast_exponential\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_fast_exponential extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_fast_exponential\r\n\t/// @{\r\n\r\n\t/// Faster than the common pow function but less accurate.\r\n\t/// @see gtx_fast_exponential\r\n\ttemplate <typename genType> \r\n\tgenType fastPow(\r\n\t\tgenType const & x, \r\n\t\tgenType const & y);\r\n\r\n\t/// Faster than the common pow function but less accurate.\r\n\t/// @see gtx_fast_exponential\r\n\ttemplate <typename genTypeT, typename genTypeU> \r\n\tgenTypeT fastPow(\r\n\t\tgenTypeT const & x, \r\n\t\tgenTypeU const & y);\r\n\t\t\r\n\t/// Faster than the common exp function but less accurate.\r\n\t/// @see gtx_fast_exponential\r\n\ttemplate <typename T> \r\n\tT fastExp(const T& x);\r\n\t\t\r\n\t/// Faster than the common log function but less accurate.\r\n\t/// @see gtx_fast_exponential\r\n\ttemplate <typename T> \r\n\tT fastLog(const T& x);\r\n\r\n\t/// Faster than the common exp2 function but less accurate.\r\n\t/// @see gtx_fast_exponential\r\n\ttemplate <typename T> \r\n\tT fastExp2(const T& x);\r\n\t\t\r\n\t/// Faster than the common log2 function but less accurate.\r\n\t/// @see gtx_fast_exponential\r\n\ttemplate <typename T> \r\n\tT fastLog2(const T& x);\r\n\r\n\t/// Faster than the common ln function but less accurate.\r\n\t/// @see gtx_fast_exponential\r\n\ttemplate <typename T> \r\n\tT fastLn(const T& x);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"fast_exponential.inl\"\r\n\r\n#endif//GLM_GTX_fast_exponential\r\n"
  },
  {
    "path": "cpu/glm/gtx/fast_exponential.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2006-01-09\r\n// Updated : 2006-01-09\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/fast_exponential.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\t// fastPow:\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType fastPow(genType const & x, genType const & y)\r\n\t{\r\n\t\treturn exp(y * log(x));\r\n\t}\r\n\r\n\tVECTORIZE_VEC_VEC(fastPow)\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T fastPow(const T x, int y)\r\n\t{\r\n\t\tT f = static_cast<T>(1);\r\n\t\tfor(int i = 0; i < y; ++i)\r\n\t\t\tf *= x;\r\n\t\treturn f;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> fastPow(\r\n\t\tconst detail::tvec2<T, P>& x, \r\n\t\tconst detail::tvec2<int, P>& y)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tfastPow(x.x, y.x),\r\n\t\t\tfastPow(x.y, y.y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> fastPow(\r\n\t\tconst detail::tvec3<T, P>& x, \r\n\t\tconst detail::tvec3<int, P>& y)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tfastPow(x.x, y.x),\r\n\t\t\tfastPow(x.y, y.y),\r\n\t\t\tfastPow(x.z, y.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> fastPow(\r\n\t\tconst detail::tvec4<T, P>& x, \r\n\t\tconst detail::tvec4<int, P>& y)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tfastPow(x.x, y.x),\r\n\t\t\tfastPow(x.y, y.y),\r\n\t\t\tfastPow(x.z, y.z),\r\n\t\t\tfastPow(x.w, y.w));\r\n\t}\r\n\r\n\t// fastExp\r\n\t// Note: This function provides accurate results only for value between -1 and 1, else avoid it.\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T fastExp(const T x)\r\n\t{\r\n\t\t// This has a better looking and same performance in release mode than the following code. However, in debug mode it's slower.\r\n\t\t// return 1.0f + x * (1.0f + x * 0.5f * (1.0f + x * 0.3333333333f * (1.0f + x * 0.25 * (1.0f + x * 0.2f))));\r\n\t\tT x2 = x * x;\r\n\t\tT x3 = x2 * x;\r\n\t\tT x4 = x3 * x;\r\n\t\tT x5 = x4 * x;\r\n\t\treturn T(1) + x + (x2 * T(0.5)) + (x3 * T(0.1666666667)) + (x4 * T(0.041666667)) + (x5 * T(0.008333333333));\r\n\t}\r\n\t/*  // Try to handle all values of float... but often shower than std::exp, glm::floor and the loop kill the performance\r\n\tGLM_FUNC_QUALIFIER float fastExp(float x)\r\n\t{\r\n\t\tconst float e = 2.718281828f;\r\n\t\tconst float IntegerPart = floor(x);\r\n\t\tconst float FloatPart = x - IntegerPart;\r\n\t\tfloat z = 1.f;\r\n\r\n\t\tfor(int i = 0; i < int(IntegerPart); ++i)\r\n\t\t\tz *= e;\r\n\r\n\t\tconst float x2 = FloatPart * FloatPart;\r\n\t\tconst float x3 = x2 * FloatPart;\r\n\t\tconst float x4 = x3 * FloatPart;\r\n\t\tconst float x5 = x4 * FloatPart;\r\n\t\treturn z * (1.0f + FloatPart + (x2 * 0.5f) + (x3 * 0.1666666667f) + (x4 * 0.041666667f) + (x5 * 0.008333333333f));\r\n\t}\r\n\r\n\t// Increase accuracy on number bigger that 1 and smaller than -1 but it's not enough for high and negative numbers\r\n\tGLM_FUNC_QUALIFIER float fastExp(float x)\r\n\t{\r\n\t\t// This has a better looking and same performance in release mode than the following code. However, in debug mode it's slower.\r\n\t\t// return 1.0f + x * (1.0f + x * 0.5f * (1.0f + x * 0.3333333333f * (1.0f + x * 0.25 * (1.0f + x * 0.2f))));\r\n\t\tfloat x2 = x * x;\r\n\t\tfloat x3 = x2 * x;\r\n\t\tfloat x4 = x3 * x;\r\n\t\tfloat x5 = x4 * x;\r\n\t\tfloat x6 = x5 * x;\r\n\t\tfloat x7 = x6 * x;\r\n\t\tfloat x8 = x7 * x;\r\n\t\treturn 1.0f + x + (x2 * 0.5f) + (x3 * 0.1666666667f) + (x4 * 0.041666667f) + (x5 * 0.008333333333f)+ (x6 * 0.00138888888888f) + (x7 * 0.000198412698f) + (x8 * 0.0000248015873f);;\r\n\t}\r\n\t*/\r\n\r\n\tVECTORIZE_VEC(fastExp)\r\n\r\n\t// fastLog\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType fastLog(genType const & x)\r\n\t{\r\n\t\treturn std::log(x);\r\n\t}\r\n\r\n\t/* Slower than the VC7.1 function...\r\n\tGLM_FUNC_QUALIFIER float fastLog(float x)\r\n\t{\r\n\t\tfloat y1 = (x - 1.0f) / (x + 1.0f);\r\n\t\tfloat y2 = y1 * y1;\r\n\t\treturn 2.0f * y1 * (1.0f + y2 * (0.3333333333f + y2 * (0.2f + y2 * 0.1428571429f)));\r\n\t}\r\n\t*/\r\n\r\n\tVECTORIZE_VEC(fastLog)\r\n\r\n\t//fastExp2, ln2 = 0.69314718055994530941723212145818f\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType fastExp2(genType const & x)\r\n\t{\r\n\t\treturn fastExp(0.69314718055994530941723212145818f * x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(fastExp2)\r\n\r\n\t// fastLog2, ln2 = 0.69314718055994530941723212145818f\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType fastLog2(genType const & x)\r\n\t{\r\n\t\treturn fastLog(x) / 0.69314718055994530941723212145818f;\r\n\t}\r\n\r\n\tVECTORIZE_VEC(fastLog2)\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/fast_square_root.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_fast_square_root\r\n/// @file glm/gtx/fast_square_root.hpp\r\n/// @date 2006-01-04 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_fast_square_root GLM_GTX_fast_square_root\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Fast but less accurate implementations of square root based functions.\r\n/// - Sqrt optimisation based on Newton's method, \r\n/// www.gamedev.net/community/forums/topic.asp?topic id=139956\r\n/// \r\n/// <glm/gtx/fast_square_root.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_fast_square_root\r\n#define GLM_GTX_fast_square_root\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_fast_square_root extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_fast_square_root\r\n\t/// @{\r\n\r\n\t//! Faster than the common sqrt function but less accurate.\r\n\t//! From GLM_GTX_fast_square_root extension.\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType fastSqrt(genType const & x);\r\n\r\n\t//! Faster than the common inversesqrt function but less accurate.\r\n\t//! From GLM_GTX_fast_square_root extension.\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType fastInverseSqrt(genType const & x);\r\n\r\n\t//! Faster than the common inversesqrt function but less accurate.\r\n\t//! From GLM_GTX_fast_square_root extension.\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL vecType<T, P> fastInverseSqrt(vecType<T, P> const & x);\r\n\r\n\t//! Faster than the common length function but less accurate.\r\n\t//! From GLM_GTX_fast_square_root extension.\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL typename genType::value_type fastLength(genType const & x);\r\n\r\n\t//! Faster than the common distance function but less accurate.\r\n\t//! From GLM_GTX_fast_square_root extension.\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL typename genType::value_type fastDistance(genType const & x, genType const & y);\r\n\r\n\t//! Faster than the common normalize function but less accurate.\r\n\t//! From GLM_GTX_fast_square_root extension.\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType fastNormalize(genType const & x);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"fast_square_root.inl\"\r\n\r\n#endif//GLM_GTX_fast_square_root\r\n"
  },
  {
    "path": "cpu/glm/gtx/fast_square_root.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2006-01-04\r\n// Updated : 2011-10-14\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/fast_square_root.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\t// fastSqrt\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType fastSqrt\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'fastSqrt' only accept floating-point input\");\r\n\r\n\t\treturn genType(1) / fastInverseSqrt(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(fastSqrt)\r\n\r\n\t// fastInversesqrt\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER float fastInverseSqrt<float>(float const & x)\r\n\t{\r\n\t\treturn detail::compute_inversesqrt<detail::tvec1, float, lowp>::call(detail::tvec1<float, lowp>(x)).x;\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER double fastInverseSqrt<double>(double const & x)\r\n\t{\r\n\t\treturn detail::compute_inversesqrt<detail::tvec1, double, lowp>::call(detail::tvec1<double, lowp>(x)).x;\r\n\t}\r\n\r\n\ttemplate <template <class, precision> class vecType, typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> fastInverseSqrt\r\n\t(\r\n\t\tvecType<T, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::compute_inversesqrt<vecType, T, P>::call(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(fastInverseSqrt)\r\n\r\n\t// fastLength\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType fastLength\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\treturn abs(x);\r\n\t}\r\n\r\n\ttemplate <typename valType, precision P>\r\n\tGLM_FUNC_QUALIFIER valType fastLength\r\n\t(\r\n\t\tdetail::tvec2<valType, P> const & x\r\n\t)\r\n\t{\r\n\t\tvalType sqr = x.x * x.x + x.y * x.y;\r\n\t\treturn fastSqrt(sqr);\r\n\t}\r\n\r\n\ttemplate <typename valType, precision P>\r\n\tGLM_FUNC_QUALIFIER valType fastLength\r\n\t(\r\n\t\tdetail::tvec3<valType, P> const & x\r\n\t)\r\n\t{\r\n\t\tvalType sqr = x.x * x.x + x.y * x.y + x.z * x.z;\r\n\t\treturn fastSqrt(sqr);\r\n\t}\r\n\r\n\ttemplate <typename valType, precision P>\r\n\tGLM_FUNC_QUALIFIER valType fastLength\r\n\t(\r\n\t\tdetail::tvec4<valType, P> const & x\r\n\t)\r\n\t{\r\n\t\tvalType sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w;\r\n\t\treturn fastSqrt(sqr);\r\n\t}\r\n\r\n\t// fastDistance\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType fastDistance\r\n\t(\r\n\t\tgenType const & x, \r\n\t\tgenType const & y\r\n\t)\r\n\t{\r\n\t\treturn fastLength(y - x);\r\n\t}\r\n\r\n\t// fastNormalize\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType fastNormalize\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\treturn x > genType(0) ? genType(1) : -genType(1);\r\n\t}\r\n\r\n\ttemplate <typename valType, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<valType, P> fastNormalize\r\n\t(\r\n\t\tdetail::tvec2<valType, P> const & x\r\n\t)\r\n\t{\r\n\t\tvalType sqr = x.x * x.x + x.y * x.y;\r\n\t\treturn x * fastInverseSqrt(sqr);\r\n\t}\r\n\r\n\ttemplate <typename valType, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<valType, P> fastNormalize\r\n\t(\r\n\t\tdetail::tvec3<valType, P> const & x\r\n\t)\r\n\t{\r\n\t\tvalType sqr = x.x * x.x + x.y * x.y + x.z * x.z;\r\n\t\treturn x * fastInverseSqrt(sqr);\r\n\t}\r\n\r\n\ttemplate <typename valType, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<valType, P> fastNormalize\r\n\t(\r\n\t\tdetail::tvec4<valType, P> const & x\r\n\t)\r\n\t{\r\n\t\tvalType sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w;\r\n\t\treturn x * fastInverseSqrt(sqr);\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/fast_trigonometry.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_fast_trigonometry\r\n/// @file glm/gtx/fast_trigonometry.hpp\r\n/// @date 2006-01-08 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_fast_trigonometry GLM_GTX_fast_trigonometry\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Fast but less accurate implementations of trigonometric functions.\r\n/// \r\n/// <glm/gtx/fast_trigonometry.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_fast_trigonometry\r\n#define GLM_GTX_fast_trigonometry\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_fast_trigonometry extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_fast_trigonometry\r\n\t/// @{\r\n\r\n\t//! Faster than the common sin function but less accurate. \r\n\t//! Defined between -2pi and 2pi. \r\n\t//! From GLM_GTX_fast_trigonometry extension.\r\n    template <typename T> \r\n\tT fastSin(const T& angle);\r\n\r\n    //! Faster than the common cos function but less accurate.\r\n\t//! Defined between -2pi and 2pi.\r\n\t//! From GLM_GTX_fast_trigonometry extension.\r\n\ttemplate <typename T> \r\n\tT fastCos(const T& angle);\r\n\r\n    //! Faster than the common tan function but less accurate. \r\n\t//! Defined between -2pi and 2pi. \r\n\t//! From GLM_GTX_fast_trigonometry extension.\r\n\ttemplate <typename T> \r\n\tT fastTan(const T& angle);\r\n\r\n    //! Faster than the common asin function but less accurate. \r\n\t//! Defined between -2pi and 2pi.\r\n\t//! From GLM_GTX_fast_trigonometry extension.\r\n\ttemplate <typename T> \r\n\tT fastAsin(const T& angle);\r\n\r\n\t//! Faster than the common acos function but less accurate. \r\n\t//! Defined between -2pi and 2pi. \r\n\t//! From GLM_GTX_fast_trigonometry extension.\r\n    template <typename T> \r\n\tT fastAcos(const T& angle);\r\n\r\n\t//! Faster than the common atan function but less accurate.\r\n\t//! Defined between -2pi and 2pi. \r\n\t//! From GLM_GTX_fast_trigonometry extension.\r\n\ttemplate <typename T> \r\n\tT fastAtan(const T& y, const T& x);\r\n\r\n\t//! Faster than the common atan function but less accurate. \r\n\t//! Defined between -2pi and 2pi.\r\n\t//! From GLM_GTX_fast_trigonometry extension.\r\n    template <typename T> \r\n\tT fastAtan(const T& angle);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"fast_trigonometry.inl\"\r\n\r\n#endif//GLM_GTX_fast_trigonometry\r\n"
  },
  {
    "path": "cpu/glm/gtx/fast_trigonometry.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2006-01-08\r\n// Updated : 2011-10-14\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/fast_trigonometry.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\t// sin\r\n\ttemplate <typename T> \r\n\tGLM_FUNC_QUALIFIER T fastSin(T const & x)\r\n\t{\r\n\t\treturn x - ((x * x * x) / T(6)) + ((x * x * x * x * x) / T(120)) - ((x * x * x * x * x * x * x) / T(5040));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(fastSin)\r\n\r\n\t// cos\r\n\ttemplate <typename T> \r\n\tGLM_FUNC_QUALIFIER T fastCos(T const & x)\r\n\t{\r\n\t\treturn T(1) - (x * x * T(0.5)) + (x * x * x * x * T(0.041666666666)) - (x * x * x * x * x * x * T(0.00138888888888));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(fastCos)\r\n\r\n\t// tan\r\n\ttemplate <typename T> \r\n\tGLM_FUNC_QUALIFIER T fastTan(T const & x)\r\n\t{\r\n\t\treturn x + (x * x * x * T(0.3333333333)) + (x * x * x * x * x * T(0.1333333333333)) + (x * x * x * x * x * x * x * T(0.0539682539));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(fastTan)\r\n\r\n\t// asin\r\n\ttemplate <typename T> \r\n\tGLM_FUNC_QUALIFIER T fastAsin(T const & x)\r\n\t{\r\n\t\treturn x + (x * x * x * T(0.166666667)) + (x * x * x * x * x * T(0.075)) + (x * x * x * x * x * x * x * T(0.0446428571)) + (x * x * x * x * x * x * x * x * x * T(0.0303819444));// + (x * x * x * x * x * x * x * x * x * x * x * T(0.022372159));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(fastAsin)\r\n\r\n\t// acos\r\n\ttemplate <typename T> \r\n\tGLM_FUNC_QUALIFIER T fastAcos(T const & x)\r\n\t{\r\n\t\treturn T(1.5707963267948966192313216916398) - fastAsin(x); //(PI / 2)\r\n\t}\r\n\r\n\tVECTORIZE_VEC(fastAcos)\r\n\r\n\t// atan\r\n\ttemplate <typename T> \r\n\tGLM_FUNC_QUALIFIER T fastAtan(T const & y, T const & x)\r\n\t{\r\n\t\tT sgn = sign(y) * sign(x);\r\n\t\treturn abs(fastAtan(y / x)) * sgn;\r\n\t}\r\n\r\n\tVECTORIZE_VEC_VEC(fastAtan)\r\n\r\n\ttemplate <typename T> \r\n\tGLM_FUNC_QUALIFIER T fastAtan(T const & x)\r\n\t{\r\n\t\treturn x - (x * x * x * T(0.333333333333)) + (x * x * x * x * x * T(0.2)) - (x * x * x * x * x * x * x * T(0.1428571429)) + (x * x * x * x * x * x * x * x * x * T(0.111111111111)) - (x * x * x * x * x * x * x * x * x * x * x * T(0.0909090909));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(fastAtan)\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/gradient_paint.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_gradient_paint\r\n/// @file glm/gtx/gradient_paint.hpp\r\n/// @date 2009-03-06 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_optimum_pow (dependence)\r\n///\r\n/// @defgroup gtx_gradient_paint GLM_GTX_gradient_paint\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Functions that return the color of procedural gradient for specific coordinates.\r\n/// <glm/gtx/gradient_paint.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_gradient_paint\r\n#define GLM_GTX_gradient_paint\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtx/optimum_pow.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_gradient_paint extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_gradient_paint\r\n\t/// @{\r\n\r\n\t/// Return a color from a radial gradient.\r\n\t/// @see - gtx_gradient_paint\r\n\ttemplate <typename T, precision P>\r\n\tT radialGradient(\r\n\t\tdetail::tvec2<T, P> const & Center,\r\n\t\tT const & Radius,\r\n\t\tdetail::tvec2<T, P> const & Focal,\r\n\t\tdetail::tvec2<T, P> const & Position);\r\n\r\n\t/// Return a color from a linear gradient.\r\n\t/// @see - gtx_gradient_paint\r\n\ttemplate <typename T, precision P>\r\n\tT linearGradient(\r\n\t\tdetail::tvec2<T, P> const & Point0,\r\n\t\tdetail::tvec2<T, P> const & Point1,\r\n\t\tdetail::tvec2<T, P> const & Position);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"gradient_paint.inl\"\r\n\r\n#endif//GLM_GTX_gradient_paint\r\n"
  },
  {
    "path": "cpu/glm/gtx/gradient_paint.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2009-03-06\r\n// Updated : 2013-04-09\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/gradient_paint.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tT radialGradient\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & Center,\r\n\t\tT const & Radius,\r\n\t\tdetail::tvec2<T, P> const & Focal,\r\n\t\tdetail::tvec2<T, P> const & Position\r\n\t)\r\n\t{\r\n\t\tdetail::tvec2<T, P> F = Focal - Center;\r\n\t\tdetail::tvec2<T, P> D = Position - Focal;\r\n\t\tT Radius2 = pow2(Radius);\r\n\t\tT Fx2 = pow2(F.x);\r\n\t\tT Fy2 = pow2(F.y);\r\n\r\n\t\tT Numerator = (D.x * F.x + D.y * F.y) + sqrt(Radius2 * (pow2(D.x) + pow2(D.y)) - pow2(D.x * F.y - D.y * F.x));\r\n\t\tT Denominator = Radius2 - (Fx2 + Fy2);\r\n\t\treturn Numerator / Denominator;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tT linearGradient\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & Point0,\r\n\t\tdetail::tvec2<T, P> const & Point1,\r\n\t\tdetail::tvec2<T, P> const & Position\r\n\t)\r\n\t{\r\n\t\tdetail::tvec2<T, P> Dist = Point1 - Point0;\r\n\t\treturn (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist);\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/handed_coordinate_space.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_handed_coordinate_space\r\n/// @file glm/gtx/handed_coordinate_space.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_handed_coordinate_space GLM_GTX_handed_coordinate_space\r\n/// @ingroup gtx\r\n/// \r\n/// @brief To know if a set of three basis vectors defines a right or left-handed coordinate system.\r\n/// \r\n/// <glm/gtx/handed_coordinate_system.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_handed_coordinate_space\r\n#define GLM_GTX_handed_coordinate_space\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_handed_coordinate_space extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_handed_coordinate_space\r\n\t/// @{\r\n\r\n\t//! Return if a trihedron right handed or not.\r\n\t//! From GLM_GTX_handed_coordinate_space extension.\r\n\ttemplate <typename T, precision P>\r\n\tbool rightHanded(\r\n\t\tdetail::tvec3<T, P> const & tangent,\r\n\t\tdetail::tvec3<T, P> const & binormal,\r\n\t\tdetail::tvec3<T, P> const & normal);\r\n\r\n\t//! Return if a trihedron left handed or not.\r\n\t//! From GLM_GTX_handed_coordinate_space extension.\r\n\ttemplate <typename T, precision P>\r\n\tbool leftHanded(\r\n\t\tdetail::tvec3<T, P> const & tangent,\r\n\t\tdetail::tvec3<T, P> const & binormal,\r\n\t\tdetail::tvec3<T, P> const & normal);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"handed_coordinate_space.inl\"\r\n\r\n#endif//GLM_GTX_handed_coordinate_space\r\n"
  },
  {
    "path": "cpu/glm/gtx/handed_coordinate_space.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2009-02-19\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/handed_coordinate_space.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool rightHanded\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & tangent,\r\n\t\tdetail::tvec3<T, P> const & binormal,\r\n\t\tdetail::tvec3<T, P> const & normal\r\n\t)\r\n\t{\r\n\t\treturn dot(cross(normal, tangent), binormal) > T(0);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool leftHanded\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & tangent,\r\n\t\tdetail::tvec3<T, P> const & binormal,\r\n\t\tdetail::tvec3<T, P> const & normal\r\n\t)\r\n\t{\r\n\t\treturn dot(cross(normal, tangent), binormal) < T(0);\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/inertia.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_inertia\r\n/// @file glm/gtx/inertia.hpp\r\n/// @date 2006-04-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_extented_min_max (dependence)\r\n///\r\n/// @defgroup gtx_inertia GLM_GTX_inertia\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Create inertia matrices\r\n/// \r\n/// <glm/gtx/inertia.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_inertia\r\n#define GLM_GTX_inertia\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_inertia extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/*\r\n\t/// @addtogroup gtx_inertia\r\n\t/// @{\r\n\r\n\t//! Build an inertia matrix for a box.\r\n\t//! From GLM_GTX_inertia extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> boxInertia3(\r\n\t\tT const & Mass, \r\n\t\tdetail::tvec3<T, P> const & Scale);\r\n\t\t\r\n\t//! Build an inertia matrix for a box.\r\n\t//! From GLM_GTX_inertia extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> boxInertia4(\r\n\t\tT const & Mass, \r\n\t\tdetail::tvec3<T, P> const & Scale);\r\n\t\t\r\n\t//! Build an inertia matrix for a disk.\r\n\t//! From GLM_GTX_inertia extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> diskInertia3(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius);\r\n\r\n\t//! Build an inertia matrix for a disk.\r\n\t//! From GLM_GTX_inertia extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> diskInertia4(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius);\r\n\r\n\t//! Build an inertia matrix for a ball.\r\n\t//! From GLM_GTX_inertia extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> ballInertia3(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius);\r\n\t\t\r\n\t//! Build an inertia matrix for a ball.\r\n\t//! From GLM_GTX_inertia extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> ballInertia4(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius);\r\n\r\n\t//! Build an inertia matrix for a sphere.\r\n\t//! From GLM_GTX_inertia extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> sphereInertia3(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius);\r\n\r\n\t//! Build an inertia matrix for a sphere.\r\n\t//! From GLM_GTX_inertia extension.\r\n\ttemplate <typename T, precision P> \r\n\tdetail::tmat4x4<T, P> sphereInertia4(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius);\r\n\t*/\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"inertia.inl\"\r\n\r\n#endif//GLM_GTX_inertia\r\n"
  },
  {
    "path": "cpu/glm/gtx/inertia.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2006-04-21\r\n// Updated : 2006-12-06\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/inertia.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n/*\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> boxInertia3\r\n\t(\r\n\t\tT const & Mass, \r\n\t\tdetail::tvec3<T, P> const & Scale\r\n\t)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> Result(T(1));\r\n\t\tResult[0][0] = (Scale.y * Scale.y + Scale.z * Scale.z) * Mass / T(12);\r\n\t\tResult[1][1] = (Scale.x * Scale.x + Scale.z * Scale.z) * Mass / T(12);\r\n\t\tResult[2][2] = (Scale.x * Scale.x + Scale.y * Scale.y) * Mass / T(12);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> boxInertia4\r\n\t(\r\n\t\tT const & Mass, \r\n\t\tdetail::tvec3<T, P> const & Scale\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> Result(T(1));\r\n\t\tResult[0][0] = (Scale.y * Scale.y + Scale.z * Scale.z) * Mass / T(12);\r\n\t\tResult[1][1] = (Scale.x * Scale.x + Scale.z * Scale.z) * Mass / T(12);\r\n\t\tResult[2][2] = (Scale.x * Scale.x + Scale.y * Scale.y) * Mass / T(12);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> diskInertia3\r\n\t(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius\r\n\t)\r\n\t{\r\n\t\tT a = Mass * Radius * Radius / T(2);\r\n\t\tdetail::tmat3x3<T, P> Result(a);\r\n\t\tResult[2][2] *= static_cast<T>(2);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> diskInertia4\r\n\t(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius\r\n\t)\r\n\t{\r\n\t\tT a = Mass * Radius * Radius / T(2);\r\n\t\tdetail::tmat4x4<T, P> Result(a);\r\n\t\tResult[2][2] *= static_cast<T>(2);\r\n\t\tResult[3][3] = static_cast<T>(1);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> ballInertia3\r\n\t(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius\r\n\t)\r\n\t{\r\n\t\tT a = static_cast<T>(2) * Mass * Radius * Radius / T(5);\r\n\t\treturn detail::tmat3x3<T, P>(a);\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> ballInertia4\r\n\t(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius\r\n\t)\r\n\t{\r\n\t\tT a = static_cast<T>(2) * Mass * Radius * Radius / T(5);\r\n\t\tdetail::tmat4x4<T, P> Result(a);\r\n\t\tResult[3][3] = static_cast<T>(1);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> sphereInertia3\r\n\t(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius\r\n\t)\r\n\t{\r\n\t\tT a = static_cast<T>(2) * Mass * Radius * Radius / T(3);\r\n\t\treturn detail::tmat3x3<T, P>(a);\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> sphereInertia4\r\n\t(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius\r\n\t)\r\n\t{\r\n\t\tT a = static_cast<T>(2) * Mass * Radius * Radius / T(3);\r\n\t\tdetail::tmat4x4<T, P> Result(a);\r\n\t\tResult[3][3] = static_cast<T>(1);\r\n\t\treturn Result;\r\n\t}\r\n */\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/int_10_10_10_2.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_int_10_10_10_2\r\n#define GLM_GTX_int_10_10_10_2\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtx/raw_data.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES))\r\n#\tpragma message(\"GLM: GLM_GTX_int_10_10_10_2 extension is deprecated, include GLM_GTC_packing (glm/gtc/packing.hpp) instead\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t//! Deprecated, use packUnorm3x10_1x2 instead.\r\n\tGLM_DEPRECATED dword uint10_10_10_2_cast(glm::vec4 const & v);\r\n\r\n}//namespace glm\r\n\r\n#include \"int_10_10_10_2.inl\"\r\n\r\n#endif//GLM_GTX_int_10_10_10_2\r\n"
  },
  {
    "path": "cpu/glm/gtx/int_10_10_10_2.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\tGLM_FUNC_QUALIFIER dword uint10_10_10_2_cast\r\n\t(\r\n\t\tglm::vec4 const & v\r\n\t)\r\n\t{\r\n\t\treturn dword(uint(v.x * 2047.f) << 0 | uint(v.y * 2047.f) << 10 | uint(v.z * 2047.f) << 20 | uint(v.w * 3.f) << 30);\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/integer.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_integer\r\n/// @file glm/gtx/integer.hpp\r\n/// @date 2005-12-24 / 2011-10-13\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_integer GLM_GTX_integer\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Add support for integer for core functions\r\n/// \r\n/// <glm/gtx/integer.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_integer\r\n#define GLM_GTX_integer\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_integer extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_integer\r\n\t/// @{\r\n\r\n\t//! Returns x raised to the y power. \r\n\t//! From GLM_GTX_integer extension.\r\n\tint pow(int x, int y);\r\n\r\n\t//! Returns the positive square root of x.\r\n\t//! From GLM_GTX_integer extension.\r\n\tint sqrt(int x);\r\n\r\n\t//! Returns the log2 of x. Can be reliably using to compute mipmap count from the texture size.\r\n\t//! From GLM_GTX_integer extension.\r\n\ttemplate <typename genIUType>\r\n\tgenIUType log2(genIUType x);\r\n\r\n\t//! Returns the floor log2 of x.\r\n\t//! From GLM_GTX_integer extension.\r\n\tunsigned int floor_log2(unsigned int x);\r\n\r\n\t//! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y.\r\n\t//! From GLM_GTX_integer extension.\r\n\tint mod(int x, int y);\r\n\r\n\t//! Return the factorial value of a number (!12 max, integer only)\r\n\t//! From GLM_GTX_integer extension.\r\n\ttemplate <typename genType> \r\n\tgenType factorial(genType const & x);\r\n\r\n\t//! 32bit signed integer. \r\n\t//! From GLM_GTX_integer extension.\r\n\ttypedef signed int\t\t\t\t\tsint;\r\n\r\n\t//! Returns x raised to the y power.\r\n\t//! From GLM_GTX_integer extension.\r\n\tuint pow(uint x, uint y);\r\n\r\n\t//! Returns the positive square root of x. \r\n\t//! From GLM_GTX_integer extension.\r\n\tuint sqrt(uint x);\r\n\r\n\t//! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y.\r\n\t//! From GLM_GTX_integer extension.\r\n\tuint mod(uint x, uint y);\r\n\r\n\t//! Returns the number of leading zeros.\r\n\t//! From GLM_GTX_integer extension.\r\n\tuint nlz(uint x);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"integer.inl\"\r\n\r\n#endif//GLM_GTX_integer\r\n"
  },
  {
    "path": "cpu/glm/gtx/integer.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-24\r\n// Updated : 2011-10-13\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/integer.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\t// pow\r\n\tGLM_FUNC_QUALIFIER int pow(int x, int y)\r\n\t{\r\n\t\tif(y == 0)\r\n\t\t\treturn 1;\r\n\t\tint result = x;\r\n\t\tfor(int i = 1; i < y; ++i)\r\n\t\t\tresult *= x;\r\n\t\treturn result;\r\n\t}\r\n\r\n\t// sqrt: From Christopher J. Musial, An integer square root, Graphics Gems, 1990, page 387\r\n\tGLM_FUNC_QUALIFIER int sqrt(int x)\r\n\t{\r\n\t\tif(x <= 1) return x;\r\n\r\n\t\tint NextTrial = x >> 1;\r\n\t\tint CurrentAnswer;\r\n\r\n\t\tdo\r\n\t\t{\r\n\t\t\tCurrentAnswer = NextTrial;\r\n\t\t\tNextTrial = (NextTrial + x / NextTrial) >> 1;\r\n\t\t} while(NextTrial < CurrentAnswer);\r\n\r\n\t\treturn CurrentAnswer;\r\n\t}\r\n\r\n// Henry Gordon Dietz: http://aggregate.org/MAGIC/\r\nnamespace detail\r\n{\r\n\tGLM_FUNC_QUALIFIER unsigned int ones32(unsigned int x)\r\n\t{\r\n\t\t/* 32-bit recursive reduction using SWAR...\r\n\t\tbut first step is mapping 2-bit values\r\n\t\tinto sum of 2 1-bit values in sneaky way\r\n\t\t*/\r\n\t\tx -= ((x >> 1) & 0x55555555);\r\n\t\tx = (((x >> 2) & 0x33333333) + (x & 0x33333333));\r\n\t\tx = (((x >> 4) + x) & 0x0f0f0f0f);\r\n\t\tx += (x >> 8);\r\n\t\tx += (x >> 16);\r\n\t\treturn(x & 0x0000003f);\r\n\t}\r\n\r\n\ttemplate <>\r\n\tstruct compute_log2<false>\r\n\t{\r\n\t\ttemplate <typename T>\r\n\t\tGLM_FUNC_QUALIFIER T operator() (T const & Value) const\r\n\t\t{\r\n#if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_GCC))\r\n\t\t\treturn Value <= static_cast<T>(1) ? T(0) : T(32) - nlz(Value - T(1));\r\n#else\r\n\t\t\treturn T(32) - nlz(Value - T(1));\r\n#endif\r\n\t\t}\r\n\t};\r\n}//namespace _detail\r\n\r\n\t// Henry Gordon Dietz: http://aggregate.org/MAGIC/\r\n/*\r\n\tGLM_FUNC_QUALIFIER unsigned int floor_log2(unsigned int x)\r\n\t{\r\n\t\tx |= (x >> 1);\r\n\t\tx |= (x >> 2);\r\n\t\tx |= (x >> 4);\r\n\t\tx |= (x >> 8);\r\n\t\tx |= (x >> 16);\r\n\r\n\t\treturn _detail::ones32(x) >> 1;\r\n\t}\r\n*/\r\n\t// mod\r\n\tGLM_FUNC_QUALIFIER int mod(int x, int y)\r\n\t{\r\n\t\treturn x - y * (x / y);\r\n\t}\r\n\r\n\t// factorial (!12 max, integer only)\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType factorial(genType const & x)\r\n\t{\r\n\t\tgenType Temp = x;\r\n\t\tgenType Result;\r\n\t\tfor(Result = 1; Temp > 1; --Temp)\r\n\t\t\tResult *= Temp;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> factorial(\r\n\t\tdetail::tvec2<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tfactorial(x.x),\r\n\t\t\tfactorial(x.y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> factorial(\r\n\t\tdetail::tvec3<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tfactorial(x.x),\r\n\t\t\tfactorial(x.y),\r\n\t\t\tfactorial(x.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> factorial(\r\n\t\tdetail::tvec4<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tfactorial(x.x),\r\n\t\t\tfactorial(x.y),\r\n\t\t\tfactorial(x.z),\r\n\t\t\tfactorial(x.w));\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint pow(uint x, uint y)\r\n\t{\r\n\t\tuint result = x;\r\n\t\tfor(uint i = 1; i < y; ++i)\r\n\t\t\tresult *= x;\r\n\t\treturn result;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint sqrt(uint x)\r\n\t{\r\n\t\tif(x <= 1) return x;\r\n\r\n\t\tuint NextTrial = x >> 1;\r\n\t\tuint CurrentAnswer;\r\n\r\n\t\tdo\r\n\t\t{\r\n\t\t\tCurrentAnswer = NextTrial;\r\n\t\t\tNextTrial = (NextTrial + x / NextTrial) >> 1;\r\n\t\t} while(NextTrial < CurrentAnswer);\r\n\r\n\t\treturn CurrentAnswer;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint mod(uint x, uint y)\r\n\t{\r\n\t\treturn x - y * (x / y);\r\n\t}\r\n\r\n#if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_GCC))\r\n\r\n\tGLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x) \r\n\t{\r\n\t\treturn 31u - findMSB(x);\r\n\t}\r\n\r\n#else\r\n\r\n\t// Hackers Delight: http://www.hackersdelight.org/HDcode/nlz.c.txt\r\n\tGLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x) \r\n\t{\r\n\t\tint y, m, n;\r\n\r\n\t\ty = -int(x >> 16);      // If left half of x is 0,\r\n\t\tm = (y >> 16) & 16;  // set n = 16.  If left half\r\n\t\tn = 16 - m;          // is nonzero, set n = 0 and\r\n\t\tx = x >> m;          // shift x right 16.\r\n\t\t\t\t\t\t\t// Now x is of the form 0000xxxx.\r\n\t\ty = x - 0x100;       // If positions 8-15 are 0,\r\n\t\tm = (y >> 16) & 8;   // add 8 to n and shift x left 8.\r\n\t\tn = n + m;\r\n\t\tx = x << m;\r\n\r\n\t\ty = x - 0x1000;      // If positions 12-15 are 0,\r\n\t\tm = (y >> 16) & 4;   // add 4 to n and shift x left 4.\r\n\t\tn = n + m;\r\n\t\tx = x << m;\r\n\r\n\t\ty = x - 0x4000;      // If positions 14-15 are 0,\r\n\t\tm = (y >> 16) & 2;   // add 2 to n and shift x left 2.\r\n\t\tn = n + m;\r\n\t\tx = x << m;\r\n\r\n\t\ty = x >> 14;         // Set y = 0, 1, 2, or 3.\r\n\t\tm = y & ~(y >> 1);   // Set m = 0, 1, 2, or 2 resp.\r\n\t\treturn unsigned(n + 2 - m);\r\n\t}\r\n\r\n#endif//(GLM_COMPILER)\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/intersect.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_intersect\r\n/// @file glm/gtx/intersect.hpp\r\n/// @date 2007-04-03 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_closest_point (dependence)\r\n///\r\n/// @defgroup gtx_intersect GLM_GTX_intersect\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Add intersection functions\r\n/// \r\n/// <glm/gtx/intersect.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_intersect\r\n#define GLM_GTX_intersect\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtx/closest_point.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_closest_point extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_intersect\r\n\t/// @{\r\n\r\n\t//! Compute the intersection of a ray and a triangle.\r\n\t//! Ray direction and plane normal must be unit length.\r\n\t//! From GLM_GTX_intersect extension.\r\n\ttemplate <typename genType>\r\n\tbool intersectRayPlane(\r\n\t\tgenType const & orig, genType const & dir,\r\n\t\tgenType const & planeOrig, genType const & planeNormal,\r\n\t\ttypename genType::value_type & intersectionDistance);\r\n\r\n\t//! Compute the intersection of a ray and a triangle.\r\n\t//! From GLM_GTX_intersect extension.\r\n\ttemplate <typename genType>\r\n\tbool intersectRayTriangle(\r\n\t\tgenType const & orig, genType const & dir,\r\n\t\tgenType const & vert0, genType const & vert1, genType const & vert2,\r\n\t\tgenType & baryPosition);\r\n\r\n\t//! Compute the intersection of a line and a triangle.\r\n\t//! From GLM_GTX_intersect extension.\r\n\ttemplate <typename genType>\r\n\tbool intersectLineTriangle(\r\n\t\tgenType const & orig, genType const & dir,\r\n\t\tgenType const & vert0, genType const & vert1, genType const & vert2,\r\n\t\tgenType & position);\r\n\r\n\t//! Compute the intersection distance of a ray and a sphere. \r\n\t//! The ray direction vector is unit length.\r\n\t//! From GLM_GTX_intersect extension.\r\n\ttemplate <typename genType>\r\n\tbool intersectRaySphere(\r\n\t\tgenType const & rayStarting, genType const & rayNormalizedDirection,\r\n\t\tgenType const & sphereCenter, typename genType::value_type const sphereRadiusSquered,\r\n\t\ttypename genType::value_type & intersectionDistance);\r\n\r\n\t//! Compute the intersection of a ray and a sphere.\r\n\t//! From GLM_GTX_intersect extension.\r\n\ttemplate <typename genType>\r\n\tbool intersectRaySphere(\r\n\t\tgenType const & rayStarting, genType const & rayNormalizedDirection,\r\n\t\tgenType const & sphereCenter, const typename genType::value_type sphereRadius,\r\n\t\tgenType & intersectionPosition, genType & intersectionNormal);\r\n\r\n\t//! Compute the intersection of a line and a sphere.\r\n\t//! From GLM_GTX_intersect extension\r\n\ttemplate <typename genType>\r\n\tbool intersectLineSphere(\r\n\t\tgenType const & point0, genType const & point1,\r\n\t\tgenType const & sphereCenter, typename genType::value_type sphereRadius,\r\n\t\tgenType & intersectionPosition1, genType & intersectionNormal1, \r\n\t\tgenType & intersectionPosition2 = genType(), genType & intersectionNormal2 = genType());\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"intersect.inl\"\r\n\r\n#endif//GLM_GTX_intersect\r\n"
  },
  {
    "path": "cpu/glm/gtx/intersect.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-04-03\r\n// Updated : 2009-01-20\r\n// Licence : This source is under MIT licence\r\n// File    : glm/gtx/intersect.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../geometric.hpp\"\r\n#include <cfloat>\r\n#include <limits>\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER bool intersectRayPlane\r\n\t(\r\n\t\tgenType const & orig, genType const & dir,\r\n\t\tgenType const & planeOrig, genType const & planeNormal,\r\n\t\ttypename genType::value_type & intersectionDistance\r\n\t)\r\n\t{\r\n\t\ttypename genType::value_type d = glm::dot(dir, planeNormal);\r\n\t\ttypename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();\r\n\r\n\t\tif(d < Epsilon)\r\n\t\t{\r\n\t\t\tintersectionDistance = glm::dot(planeOrig - orig, planeNormal) / d;\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER bool intersectRayTriangle\r\n\t(\r\n\t\tgenType const & orig, genType const & dir,\r\n\t\tgenType const & v0, genType const & v1, genType const & v2,\r\n\t\tgenType & baryPosition\r\n\t)\r\n\t{\r\n\t\tgenType e1 = v1 - v0;\r\n\t\tgenType e2 = v2 - v0;\r\n\r\n\t\tgenType p = glm::cross(dir, e2);\r\n\r\n\t\ttypename genType::value_type a = glm::dot(e1, p);\r\n\r\n\t\ttypename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();\r\n\t\tif(a < Epsilon)\r\n\t\t\treturn false;\r\n\r\n\t\ttypename genType::value_type f = typename genType::value_type(1.0f) / a;\r\n\r\n\t\tgenType s = orig - v0;\r\n\t\tbaryPosition.x = f * glm::dot(s, p);\r\n\t\tif(baryPosition.x < typename genType::value_type(0.0f))\r\n\t\t\treturn false;\r\n\t\tif(baryPosition.x > typename genType::value_type(1.0f))\r\n\t\t\treturn false;\r\n\r\n\t\tgenType q = glm::cross(s, e1);\r\n\t\tbaryPosition.y = f * glm::dot(dir, q);\r\n\t\tif(baryPosition.y < typename genType::value_type(0.0f))\r\n\t\t\treturn false;\r\n\t\tif(baryPosition.y + baryPosition.x > typename genType::value_type(1.0f))\r\n\t\t\treturn false;\r\n\r\n\t\tbaryPosition.z = f * glm::dot(e2, q);\r\n\r\n\t\treturn baryPosition.z >= typename genType::value_type(0.0f);\r\n\t}\r\n\r\n\t//template <typename genType>\r\n\t//GLM_FUNC_QUALIFIER bool intersectRayTriangle\r\n\t//(\r\n\t//\tgenType const & orig, genType const & dir,\r\n\t//\tgenType const & vert0, genType const & vert1, genType const & vert2,\r\n\t//\tgenType & position\r\n\t//)\r\n\t//{\r\n\t//\ttypename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();\r\n\t//\r\n\t//\tgenType edge1 = vert1 - vert0;\r\n\t//\tgenType edge2 = vert2 - vert0;\r\n\t//\r\n\t//\tgenType pvec = cross(dir, edge2);\r\n\t//\r\n\t//\tfloat det = dot(edge1, pvec);\r\n\t//\tif(det < Epsilon)\r\n\t//\t\treturn false;\r\n\t//\r\n\t//\tgenType tvec = orig - vert0;\r\n\t//\r\n\t//\tposition.y = dot(tvec, pvec);\r\n\t//\tif (position.y < typename genType::value_type(0) || position.y > det)\r\n\t//\t\treturn typename genType::value_type(0);\r\n\t//\r\n\t//\tgenType qvec = cross(tvec, edge1);\r\n\t//\r\n\t//\tposition.z = dot(dir, qvec);\r\n\t//\tif (position.z < typename genType::value_type(0) || position.y + position.z > det)\r\n\t//\t\treturn typename genType::value_type(0);\r\n\t//\r\n\t//\tposition.x = dot(edge2, qvec);\r\n\t//\tposition *= typename genType::value_type(1) / det;\r\n\t//\r\n\t//\treturn typename genType::value_type(1);\r\n\t//}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER bool intersectLineTriangle\r\n\t(\r\n\t\tgenType const & orig, genType const & dir,\r\n\t\tgenType const & vert0, genType const & vert1, genType const & vert2,\r\n\t\tgenType & position\r\n\t)\r\n\t{\r\n\t\ttypename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();\r\n\r\n\t\tgenType edge1 = vert1 - vert0;\r\n\t\tgenType edge2 = vert2 - vert0;\r\n\r\n\t\tgenType pvec = cross(dir, edge2);\r\n\r\n\t\tfloat det = dot(edge1, pvec);\r\n\r\n\t\tif (det > -Epsilon && det < Epsilon)\r\n\t\t\treturn false;\r\n\t\tfloat inv_det = typename genType::value_type(1) / det;\r\n\r\n\t\tgenType tvec = orig - vert0;\r\n\r\n\t\tposition.y = dot(tvec, pvec) * inv_det;\r\n\t\tif (position.y < typename genType::value_type(0) || position.y > typename genType::value_type(1))\r\n\t\t\treturn false;\r\n\r\n\t\tgenType qvec = cross(tvec, edge1);\r\n\r\n\t\tposition.z = dot(dir, qvec) * inv_det;\r\n\t\tif (position.z < typename genType::value_type(0) || position.y + position.z > typename genType::value_type(1))\r\n\t\t\treturn false;\r\n\r\n\t\tposition.x = dot(edge2, qvec) * inv_det;\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER bool intersectRaySphere\r\n\t(\r\n\t\tgenType const & rayStarting, genType const & rayNormalizedDirection,\r\n\t\tgenType const & sphereCenter, const typename genType::value_type sphereRadiusSquered,\r\n\t\ttypename genType::value_type & intersectionDistance\r\n\t)\r\n\t{\r\n\t\ttypename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();\r\n\t\tgenType diff = sphereCenter - rayStarting;\r\n\t\ttypename genType::value_type t0 = dot(diff, rayNormalizedDirection);\r\n\t\ttypename genType::value_type dSquared = dot(diff, diff) - t0 * t0;\r\n\t\tif( dSquared > sphereRadiusSquered )\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\ttypename genType::value_type t1 = sqrt( sphereRadiusSquered - dSquared );\r\n\t\tintersectionDistance = t0 > t1 + Epsilon ? t0 - t1 : t0 + t1;\r\n\t\treturn intersectionDistance > Epsilon;\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER bool intersectRaySphere\r\n\t(\r\n\t\tgenType const & rayStarting, genType const & rayNormalizedDirection,\r\n\t\tgenType const & sphereCenter, const typename genType::value_type sphereRadius,\r\n\t\tgenType & intersectionPosition, genType & intersectionNormal\r\n\t)\r\n\t{\r\n\t\ttypename genType::value_type distance;\r\n\t\tif( intersectRaySphere( rayStarting, rayNormalizedDirection, sphereCenter, sphereRadius * sphereRadius, distance ) )\r\n\t\t{\r\n\t\t\tintersectionPosition = rayStarting + rayNormalizedDirection * distance;\r\n\t\t\tintersectionNormal = (intersectionPosition - sphereCenter) / sphereRadius;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER bool intersectLineSphere\r\n\t(\r\n\t\tgenType const & point0, genType const & point1,\r\n\t\tgenType const & sphereCenter, typename genType::value_type sphereRadius,\r\n\t\tgenType & intersectionPoint1, genType & intersectionNormal1, \r\n\t\tgenType & intersectionPoint2, genType & intersectionNormal2\r\n\t)\r\n\t{\r\n\t\ttypename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();\r\n\t\tgenType dir = normalize(point1 - point0);\r\n\t\tgenType diff = sphereCenter - point0;\r\n\t\ttypename genType::value_type t0 = dot(diff, dir);\r\n\t\ttypename genType::value_type dSquared = dot(diff, diff) - t0 * t0;\r\n\t\tif( dSquared > sphereRadius * sphereRadius )\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\ttypename genType::value_type t1 = sqrt( sphereRadius * sphereRadius - dSquared );\r\n\t\tif( t0 < t1 + Epsilon )\r\n\t\t\tt1 = -t1;\r\n\t\tintersectionPoint1 = point0 + dir * (t0 - t1);\r\n\t\tintersectionNormal1 = (intersectionPoint1 - sphereCenter) / sphereRadius;\r\n\t\tintersectionPoint2 = point0 + dir * (t0 + t1);\r\n\t\tintersectionNormal2 = (intersectionPoint2 - sphereCenter) / sphereRadius;\r\n\t\treturn true;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/io.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_io\r\n/// @file glm/gtx/io.hpp\r\n/// @date 2013-11-22\r\n/// @author Jan P Springer (regnirpsj@gmail.com)\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_quaternion (dependence)\r\n///\r\n/// @defgroup gtx_io GLM_GTX_io\r\n/// @ingroup gtx\r\n/// \r\n/// @brief std::[w]ostream support for glm types\r\n///\r\n/// <glm/gtx/io.hpp> needs to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_io\r\n#define GLM_GTX_io\r\n\r\n// Dependency:\r\n#include \"../detail/setup.hpp\"\r\n#include \"../gtc/quaternion.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_io extension included\")\r\n#endif\r\n\r\n#include <iosfwd>  // std::basic_ostream<> (fwd)\r\n#include <utility> // std::pair<>\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_io\r\n\t/// @{\r\n  \r\n  namespace io\r\n  {\r\n    \r\n    class precision_guard {\r\n\r\n    public:\r\n      \r\n      GLM_FUNC_DECL explicit precision_guard();\r\n      GLM_FUNC_DECL         ~precision_guard();\r\n                \r\n    private:\r\n\r\n      unsigned precision_;\r\n      unsigned value_width_;\r\n      \r\n    };\r\n\r\n    class format_guard\r\n\t{\r\n\tpublic:\r\n\t\tenum order_t { column_major, row_major, };\r\n\r\n\t\tGLM_FUNC_DECL explicit format_guard();\r\n\t\tGLM_FUNC_DECL         ~format_guard();\r\n\r\n\tprivate:\r\n\r\n\t\torder_t order_;\r\n\t\tchar    cr_;\r\n\t};\r\n\r\n    // decimal places (dflt: 3)\r\n    GLM_FUNC_DECL unsigned& precision();\r\n\r\n    // sign + value + '.' + decimals (dflt: 1 + 4 + 1 + precision())\r\n    GLM_FUNC_DECL unsigned& value_width();\r\n\r\n    // matrix output order (dflt: row_major)\r\n    GLM_FUNC_DECL format_guard::order_t& order();\r\n\r\n    // carriage/return char (dflt: '\\n')\r\n    GLM_FUNC_DECL char& cr();\r\n\r\n    // matrix output order -> column_major\r\n    GLM_FUNC_DECL std::ios_base& column_major(std::ios_base&);\r\n\r\n    // matrix output order -> row_major\r\n    GLM_FUNC_DECL std::ios_base& row_major   (std::ios_base&);\r\n\r\n    // carriage/return char -> '\\n'\r\n    GLM_FUNC_DECL std::ios_base& formatted   (std::ios_base&);\r\n\r\n    // carriage/return char -> ' '\r\n    GLM_FUNC_DECL std::ios_base& unformatted (std::ios_base&);\r\n\r\n  }//namespace io\r\n\r\n  namespace detail\r\n  {\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tquat<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tvec2<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tvec3<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tvec4<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x2<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x3<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x4<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat3x2<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat3x3<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat3x4<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat4x2<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat4x3<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat4x4<T,P> const&);\r\n\r\n\t/// @}  \r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#include \"io.inl\"\r\n\r\n#endif//GLM_GTX_io\r\n"
  },
  {
    "path": "cpu/glm/gtx/io.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2013-11-22\r\n// Updated : 2013-11-22\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/inl.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../matrix.hpp\"\r\n// #include <boost/io/ios_state.hpp> // boost::io::ios_all_saver\r\n#include <iomanip>                // std::setfill<>, std::fixed, std::setprecision, std::right,\r\n                                  // std::setw\r\n#include <ostream>                // std::basic_ostream<>\r\n\r\nnamespace glm{\r\nnamespace io\r\n{\r\n  \r\n    /* explicit */ GLM_FUNC_QUALIFIER\r\n    precision_guard::precision_guard()\r\n      : precision_  (precision()),\r\n        value_width_(value_width())\r\n    {}\r\n\r\n    GLM_FUNC_QUALIFIER\r\n    precision_guard::~precision_guard()\r\n    {\r\n      value_width() = value_width_;\r\n      precision()   = precision_;\r\n    }\r\n\r\n    /* explicit */ GLM_FUNC_QUALIFIER\r\n    format_guard::format_guard()\r\n      : order_(order()),\r\n        cr_   (cr())\r\n    {}\r\n\r\n    GLM_FUNC_QUALIFIER\r\n    format_guard::~format_guard()\r\n    {\r\n      cr()    = cr_;\r\n      order() = order_;\r\n    }\r\n\r\n    GLM_FUNC_QUALIFIER unsigned& precision()\r\n    {\r\n      static unsigned p(3);\r\n\r\n      return p;\r\n    }\r\n    \r\n    GLM_FUNC_QUALIFIER unsigned& value_width()\r\n    {\r\n      static unsigned p(9);\r\n\r\n      return p;\r\n    }\r\n    \r\n    GLM_FUNC_QUALIFIER format_guard::order_t& order()\r\n    {\r\n      static format_guard::order_t p(format_guard::row_major);\r\n\r\n      return p;\r\n    }\r\n    \r\n    GLM_FUNC_QUALIFIER char&\r\n    cr()\r\n    {\r\n      static char p('\\n'); return p;\r\n    }\r\n    \r\n    GLM_FUNC_QUALIFIER std::ios_base& column_major(std::ios_base& os)\r\n    {\r\n      order() = format_guard::column_major;\r\n      \r\n      return os;\r\n    }\r\n    \r\n    GLM_FUNC_QUALIFIER std::ios_base& row_major(std::ios_base& os)\r\n    {\r\n      order() = format_guard::row_major;\r\n      \r\n      return os;\r\n    }\r\n\r\n    GLM_FUNC_QUALIFIER std::ios_base& formatted(std::ios_base& os)\r\n    {\r\n      cr() = '\\n';\r\n      \r\n      return os;\r\n    }\r\n    \r\n    GLM_FUNC_QUALIFIER std::ios_base& unformatted(std::ios_base& os)\r\n    {\r\n      cr() = ' ';\r\n      \r\n      return os;\r\n    }\r\n    \r\n} // namespace io\r\nnamespace detail\r\n{\r\n    // functions, inlined (inline)\r\n\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tquat<T,P> const& a)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n        // boost::io::ios_all_saver const ias(os);\r\n      \r\n        os << std::fixed << std::setprecision(io::precision())\r\n           << '['\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.w << ','\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.x << ','\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.y << ','\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.z\r\n           << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n    \r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tvec2<T,P> const& a)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n        // boost::io::ios_all_saver const ias(os);\r\n      \r\n        os << std::fixed << std::setprecision(io::precision())\r\n           << '['\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.x << ','\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.y\r\n           << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n  \r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tvec3<T,P> const& a)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n        // boost::io::ios_all_saver const ias(os);\r\n      \r\n        os << std::fixed << std::setprecision(io::precision())\r\n           << '['\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.x << ','\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.y << ','\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.z\r\n           << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tvec4<T,P> const& a)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n        // boost::io::ios_all_saver const ias(os);\r\n      \r\n        os << std::fixed << std::setprecision(io::precision())\r\n           << '['\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.x << ','\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.y << ','\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.z << ','\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.w\r\n           << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x2<T,P> const& m)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n        \r\n        os << io::cr()\r\n           << '[' << m[0] << io::cr()\r\n           << ' ' << m[1] << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x3<T,P> const& m)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n\r\n        os << io::cr()\r\n           << '[' << m[0] << io::cr()\r\n           << ' ' << m[1] << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x4<T,P> const& m)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n\r\n        os << io::cr()\r\n           << '[' << m[0] << io::cr()\r\n           << ' ' << m[1] << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x2<T,P> const& m)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n\r\n        os << io::cr()\r\n           << '[' << m[0] << io::cr()\r\n           << ' ' << m[1] << io::cr()\r\n           << ' ' << m[2] << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x3<T,P> const& m)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n\r\n        os << io::cr()\r\n           << '[' << m[0] << io::cr()\r\n           << ' ' << m[1] << io::cr()\r\n           << ' ' << m[2] << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x4<T,P> const& m)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n\r\n        os << io::cr()\r\n           << '[' << m[0] << io::cr()\r\n           << ' ' << m[1] << io::cr()\r\n           << ' ' << m[2] << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x2<T,P> const& m)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n\r\n        os << io::cr()\r\n           << '[' << m[0] << io::cr()\r\n           << ' ' << m[1] << io::cr()\r\n           << ' ' << m[2] << io::cr()\r\n           << ' ' << m[3] << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x3<T,P> const& m)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n\r\n        os << io::cr()\r\n           << '[' << m[0] << io::cr()\r\n           << ' ' << m[1] << io::cr()\r\n           << ' ' << m[2] << io::cr()\r\n           << ' ' << m[3] << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x4<T,P> const& m)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n\r\n        os << io::cr()\r\n           << '[' << m[0] << io::cr()\r\n           << ' ' << m[1] << io::cr()\r\n           << ' ' << m[2] << io::cr()\r\n           << ' ' << m[3] << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/log_base.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_log_base\r\n/// @file glm/gtx/log_base.hpp\r\n/// @date 2008-10-24 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_log_base GLM_GTX_log_base\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Logarithm for any base. base can be a vector or a scalar.\r\n/// \r\n/// <glm/gtx/log_base.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_log_base\r\n#define GLM_GTX_log_base\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_log_base extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_log_base\r\n\t/// @{\r\n\r\n\t//! Logarithm for any base.\r\n\t//! From GLM_GTX_log_base.\r\n\ttemplate <typename genType> \r\n\tgenType log(\r\n\t\tgenType const & x, \r\n\t\tgenType const & base);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"log_base.inl\"\r\n\r\n#endif//GLM_GTX_log_base\r\n"
  },
  {
    "path": "cpu/glm/gtx/log_base.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2008-10-24\r\n// Updated : 2008-10-24\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/log_base.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType log(\r\n\t\tgenType const & x, \r\n\t\tgenType const & base)\r\n\t{\r\n\t\tassert(x != genType(0));\r\n\r\n\t\treturn glm::log(x) / glm::log(base);\r\n\t}\r\n\r\n\tVECTORIZE_VEC_SCA(log)\r\n\tVECTORIZE_VEC_VEC(log)\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/matrix_cross_product.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_matrix_cross_product\r\n/// @file glm/gtx/matrix_cross_product.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_extented_min_max (dependence)\r\n///\r\n/// @defgroup gtx_matrix_cross_product GLM_GTX_matrix_cross_product\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Build cross product matrices\r\n/// \r\n/// <glm/gtx/matrix_cross_product.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_matrix_cross_product\r\n#define GLM_GTX_matrix_cross_product\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_matrix_cross_product extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_matrix_cross_product\r\n\t/// @{\r\n\r\n\t//! Build a cross product matrix.\r\n\t//! From GLM_GTX_matrix_cross_product extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> matrixCross3(\r\n\t\tdetail::tvec3<T, P> const & x);\r\n\t\t\r\n\t//! Build a cross product matrix.\r\n\t//! From GLM_GTX_matrix_cross_product extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> matrixCross4(\r\n\t\tdetail::tvec3<T, P> const & x);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"matrix_cross_product.inl\"\r\n\r\n#endif//GLM_GTX_matrix_cross_product\r\n"
  },
  {
    "path": "cpu/glm/gtx/matrix_cross_product.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2005-12-21\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/matrix_cross_product.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> matrixCross3\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> Result(T(0));\r\n\t\tResult[0][1] = x.z;\r\n\t\tResult[1][0] = -x.z;\r\n\t\tResult[0][2] = -x.y;\r\n\t\tResult[2][0] = x.y;\r\n\t\tResult[1][2] = x.x;\r\n\t\tResult[2][1] = -x.x;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> matrixCross4\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> Result(T(0));\r\n\t\tResult[0][1] = x.z;\r\n\t\tResult[1][0] = -x.z;\r\n\t\tResult[0][2] = -x.y;\r\n\t\tResult[2][0] = x.y;\r\n\t\tResult[1][2] = x.x;\r\n\t\tResult[2][1] = -x.x;\r\n\t\treturn Result;\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/matrix_interpolation.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_matrix_interpolation\r\n/// @file glm/gtx/matrix_interpolation.hpp\r\n/// @date 2011-03-05 / 2011-06-07\r\n/// @author Ghenadii Ursachi (the.asteroth@gmail.com)\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_matrix_interpolation GLM_GTX_matrix_interpolation\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Allows to directly interpolate two exiciting matrices.\r\n/// \r\n/// <glm/gtx/matrix_interpolation.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_matrix_interpolation\r\n#define GLM_GTX_matrix_interpolation\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_matrix_interpolation extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_matrix_interpolation\r\n\t/// @{\r\n\r\n\t/// Get the axis and angle of the rotation from a matrix.\r\n\t/// From GLM_GTX_matrix_interpolation extension.\r\n\ttemplate <typename T, precision P>\r\n\tvoid axisAngle(\r\n\t\tdetail::tmat4x4<T, P> const & mat,\r\n\t\tdetail::tvec3<T, P> & axis,\r\n\t\tT & angle);\r\n\r\n\t/// Build a matrix from axis and angle.\r\n\t/// From GLM_GTX_matrix_interpolation extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> axisAngleMatrix(\r\n\t\tdetail::tvec3<T, P> const & axis,\r\n\t\tT const angle);\r\n\r\n\t/// Extracts the rotation part of a matrix.\r\n\t/// From GLM_GTX_matrix_interpolation extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> extractMatrixRotation(\r\n\t\tdetail::tmat4x4<T, P> const & mat);\r\n\r\n\t/// Build a interpolation of 4 * 4 matrixes.\r\n\t/// From GLM_GTX_matrix_interpolation extension.\r\n\t/// Warning! works only with rotation and/or translation matrixes, scale will generate unexpected results.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> interpolate(\r\n\t\tdetail::tmat4x4<T, P> const & m1,\r\n\t\tdetail::tmat4x4<T, P> const & m2,\r\n\t\tT const delta);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"matrix_interpolation.inl\"\r\n\r\n#endif//GLM_GTX_matrix_interpolation\r\n"
  },
  {
    "path": "cpu/glm/gtx/matrix_interpolation.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2011-03-05\r\n// Updated : 2011-03-05\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/matrix_interpolation.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER void axisAngle\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & mat,\r\n\t\tdetail::tvec3<T, P> & axis,\r\n\t\tT & angle\r\n\t)\r\n\t{\r\n\t\tT epsilon = (T)0.01;\r\n\t\tT epsilon2 = (T)0.1;\r\n\r\n\t\tif((abs(mat[1][0] - mat[0][1]) < epsilon) && (abs(mat[2][0] - mat[0][2]) < epsilon) && (abs(mat[2][1] - mat[1][2]) < epsilon))\r\n\t\t{\r\n\t\t\tif ((abs(mat[1][0] + mat[0][1]) < epsilon2) && (abs(mat[2][0] + mat[0][2]) < epsilon2) && (abs(mat[2][1] + mat[1][2]) < epsilon2) && (abs(mat[0][0] + mat[1][1] + mat[2][2] - (T)3.0) < epsilon2))\r\n\t\t\t{\r\n\t\t\t\tangle = (T)0.0;\r\n\t\t\t\taxis.x = (T)1.0;\r\n\t\t\t\taxis.y = (T)0.0;\r\n\t\t\t\taxis.z = (T)0.0;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tangle = static_cast<T>(3.1415926535897932384626433832795);\r\n\t\t\tT xx = (mat[0][0] + (T)1.0) / (T)2.0;\r\n\t\t\tT yy = (mat[1][1] + (T)1.0) / (T)2.0;\r\n\t\t\tT zz = (mat[2][2] + (T)1.0) / (T)2.0;\r\n\t\t\tT xy = (mat[1][0] + mat[0][1]) / (T)4.0;\r\n\t\t\tT xz = (mat[2][0] + mat[0][2]) / (T)4.0;\r\n\t\t\tT yz = (mat[2][1] + mat[1][2]) / (T)4.0;\r\n\t\t\tif((xx > yy) && (xx > zz))\r\n\t\t\t{\r\n\t\t\t\tif (xx < epsilon) {\r\n\t\t\t\t\taxis.x = (T)0.0;\r\n\t\t\t\t\taxis.y = (T)0.7071;\r\n\t\t\t\t\taxis.z = (T)0.7071;\r\n\t\t\t\t} else {\r\n\t\t\t\t\taxis.x = sqrt(xx);\r\n\t\t\t\t\taxis.y = xy / axis.x;\r\n\t\t\t\t\taxis.z = xz / axis.x;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (yy > zz)\r\n\t\t\t{\r\n\t\t\t\tif (yy < epsilon) {\r\n\t\t\t\t\taxis.x = (T)0.7071;\r\n\t\t\t\t\taxis.y = (T)0.0;\r\n\t\t\t\t\taxis.z = (T)0.7071;\r\n\t\t\t\t} else {\r\n\t\t\t\t\taxis.y = sqrt(yy);\r\n\t\t\t\t\taxis.x = xy / axis.y;\r\n\t\t\t\t\taxis.z = yz / axis.y;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif (zz < epsilon) {\r\n\t\t\t\t\taxis.x = (T)0.7071;\r\n\t\t\t\t\taxis.y = (T)0.7071;\r\n\t\t\t\t\taxis.z = (T)0.0;\r\n\t\t\t\t} else {\r\n\t\t\t\t\taxis.z = sqrt(zz);\r\n\t\t\t\t\taxis.x = xz / axis.z;\r\n\t\t\t\t\taxis.y = yz / axis.z;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tT s = sqrt((mat[2][1] - mat[1][2]) * (mat[2][1] - mat[1][2]) + (mat[2][0] - mat[0][2]) * (mat[2][0] - mat[0][2]) + (mat[1][0] - mat[0][1]) * (mat[1][0] - mat[0][1]));\r\n\t\tif (glm::abs(s) < T(0.001))\r\n\t\t\ts = (T)1.0;\r\n\t\tangle = acos((mat[0][0] + mat[1][1] + mat[2][2] - (T)1.0) / (T)2.0);\r\n\t\taxis.x = (mat[1][2] - mat[2][1]) / s;\r\n\t\taxis.y = (mat[2][0] - mat[0][2]) / s;\r\n\t\taxis.z = (mat[0][1] - mat[1][0]) / s;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> axisAngleMatrix\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & axis,\r\n\t\tT const angle\r\n\t)\r\n\t{\r\n\t\tT c = cos(angle);\r\n\t\tT s = sin(angle);\r\n\t\tT t = static_cast<T>(1) - c;\r\n\t\tdetail::tvec3<T, P> n = normalize(axis);\r\n\r\n\t\treturn detail::tmat4x4<T, P>(\r\n\t\t\tt * n.x * n.x + c,          t * n.x * n.y + n.z * s,    t * n.x * n.z - n.y * s,    T(0),\r\n\t\t\tt * n.x * n.y - n.z * s,    t * n.y * n.y + c,          t * n.y * n.z + n.x * s,    T(0),\r\n\t\t\tt * n.x * n.z + n.y * s,    t * n.y * n.z - n.x * s,    t * n.z * n.z + c,          T(0),\r\n\t\t\tT(0),                        T(0),                        T(0),                     T(1)\r\n\t\t);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> extractMatrixRotation\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & mat\r\n\t)\r\n\t{\r\n\t\treturn detail::tmat4x4<T, P>(\r\n\t\t\tmat[0][0], mat[0][1], mat[0][2], 0.0,\r\n\t\t\tmat[1][0], mat[1][1], mat[1][2], 0.0,\r\n\t\t\tmat[2][0], mat[2][1], mat[2][2], 0.0,\r\n\t\t\t0.0,       0.0,       0.0,       1.0\r\n\t\t);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> interpolate\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & m1,\r\n\t\tdetail::tmat4x4<T, P> const & m2,\r\n\t\tT const delta\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> m1rot = extractMatrixRotation(m1);\r\n\t\tdetail::tmat4x4<T, P> dltRotation = m2 * transpose(m1rot);\r\n\t\tdetail::tvec3<T, P> dltAxis;\r\n\t\tT dltAngle;\r\n\t\taxisAngle(dltRotation, dltAxis, dltAngle);\r\n\t\tdetail::tmat4x4<T, P> out = axisAngleMatrix(dltAxis, dltAngle * delta) * m1rot;\r\n\t\tout[3][0] = m1[3][0] + delta * (m2[3][0] - m1[3][0]);\r\n\t\tout[3][1] = m1[3][1] + delta * (m2[3][1] - m1[3][1]);\r\n\t\tout[3][2] = m1[3][2] + delta * (m2[3][2] - m1[3][2]);\r\n\t\treturn out;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/matrix_major_storage.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_matrix_major_storage\r\n/// @file glm/gtx/matrix_major_storage.hpp\r\n/// @date 2006-04-19 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_extented_min_max (dependence)\r\n///\r\n/// @defgroup gtx_matrix_major_storage GLM_GTX_matrix_major_storage\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Build matrices with specific matrix order, row or column\r\n/// \r\n/// <glm/gtx/matrix_major_storage.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_matrix_major_storage\r\n#define GLM_GTX_matrix_major_storage\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_matrix_major_storage extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_matrix_major_storage\r\n\t/// @{\r\n\r\n\t//! Build a row major matrix from row vectors.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat2x2<T, P> rowMajor2(\r\n\t\tdetail::tvec2<T, P> const & v1, \r\n\t\tdetail::tvec2<T, P> const & v2);\r\n\t\t\r\n\t//! Build a row major matrix from other matrix.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat2x2<T, P> rowMajor2(\r\n\t\tdetail::tmat2x2<T, P> const & m);\r\n\r\n\t//! Build a row major matrix from row vectors.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> rowMajor3(\r\n\t\tdetail::tvec3<T, P> const & v1, \r\n\t\tdetail::tvec3<T, P> const & v2, \r\n\t\tdetail::tvec3<T, P> const & v3);\r\n\r\n\t//! Build a row major matrix from other matrix.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> rowMajor3(\r\n\t\tdetail::tmat3x3<T, P> const & m);\r\n\r\n\t//! Build a row major matrix from row vectors.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> rowMajor4(\r\n\t\tdetail::tvec4<T, P> const & v1, \r\n\t\tdetail::tvec4<T, P> const & v2,\r\n\t\tdetail::tvec4<T, P> const & v3, \r\n\t\tdetail::tvec4<T, P> const & v4);\r\n\r\n\t//! Build a row major matrix from other matrix.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> rowMajor4(\r\n\t\tdetail::tmat4x4<T, P> const & m);\r\n\r\n\t//! Build a column major matrix from column vectors.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat2x2<T, P> colMajor2(\r\n\t\tdetail::tvec2<T, P> const & v1, \r\n\t\tdetail::tvec2<T, P> const & v2);\r\n\t\t\r\n\t//! Build a column major matrix from other matrix.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat2x2<T, P> colMajor2(\r\n\t\tdetail::tmat2x2<T, P> const & m);\r\n\r\n\t//! Build a column major matrix from column vectors.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> colMajor3(\r\n\t\tdetail::tvec3<T, P> const & v1, \r\n\t\tdetail::tvec3<T, P> const & v2, \r\n\t\tdetail::tvec3<T, P> const & v3);\r\n\t\t\r\n\t//! Build a column major matrix from other matrix.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> colMajor3(\r\n\t\tdetail::tmat3x3<T, P> const & m);\r\n\t\t\r\n\t//! Build a column major matrix from column vectors.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> colMajor4(\r\n\t\tdetail::tvec4<T, P> const & v1, \r\n\t\tdetail::tvec4<T, P> const & v2, \r\n\t\tdetail::tvec4<T, P> const & v3, \r\n\t\tdetail::tvec4<T, P> const & v4);\r\n\t\t\t\t\r\n\t//! Build a column major matrix from other matrix.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P> \r\n\tdetail::tmat4x4<T, P> colMajor4(\r\n\t\tdetail::tmat4x4<T, P> const & m);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"matrix_major_storage.inl\"\r\n\r\n#endif//GLM_GTX_matrix_major_storage\r\n"
  },
  {
    "path": "cpu/glm/gtx/matrix_major_storage.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2006-04-19\r\n// Updated : 2009-02-19\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/matrix_major_storage.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat2x2<T, P> rowMajor2\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & v1, \r\n\t\tdetail::tvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\tdetail::tmat2x2<T, P> Result;\r\n\t\tResult[0][0] = v1.x;\r\n\t\tResult[1][0] = v1.y;\r\n\t\tResult[0][1] = v2.x;\r\n\t\tResult[1][1] = v2.y;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat2x2<T, P> rowMajor2(\r\n\t\tconst detail::tmat2x2<T, P>& m)\r\n\t{\r\n\t\tdetail::tmat2x2<T, P> Result;\r\n\t\tResult[0][0] = m[0][0];\r\n\t\tResult[0][1] = m[1][0];\r\n\t\tResult[1][0] = m[0][1];\r\n\t\tResult[1][1] = m[1][1];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> rowMajor3(\r\n\t\tconst detail::tvec3<T, P>& v1, \r\n\t\tconst detail::tvec3<T, P>& v2, \r\n\t\tconst detail::tvec3<T, P>& v3)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> Result;\r\n\t\tResult[0][0] = v1.x;\r\n\t\tResult[1][0] = v1.y;\r\n\t\tResult[2][0] = v1.z;\r\n\t\tResult[0][1] = v2.x;\r\n\t\tResult[1][1] = v2.y;\r\n\t\tResult[2][1] = v2.z;\r\n\t\tResult[0][2] = v3.x;\r\n\t\tResult[1][2] = v3.y;\r\n\t\tResult[2][2] = v3.z;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> rowMajor3(\r\n\t\tconst detail::tmat3x3<T, P>& m)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> Result;\r\n\t\tResult[0][0] = m[0][0];\r\n\t\tResult[0][1] = m[1][0];\r\n\t\tResult[0][2] = m[2][0];\r\n\t\tResult[1][0] = m[0][1];\r\n\t\tResult[1][1] = m[1][1];\r\n\t\tResult[1][2] = m[2][1];\r\n\t\tResult[2][0] = m[0][2];\r\n\t\tResult[2][1] = m[1][2];\r\n\t\tResult[2][2] = m[2][2];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> rowMajor4(\r\n\t\tconst detail::tvec4<T, P>& v1, \r\n\t\tconst detail::tvec4<T, P>& v2, \r\n\t\tconst detail::tvec4<T, P>& v3, \r\n\t\tconst detail::tvec4<T, P>& v4)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> Result;\r\n\t\tResult[0][0] = v1.x;\r\n\t\tResult[1][0] = v1.y;\r\n\t\tResult[2][0] = v1.z;\r\n\t\tResult[3][0] = v1.w;\r\n\t\tResult[0][1] = v2.x;\r\n\t\tResult[1][1] = v2.y;\r\n\t\tResult[2][1] = v2.z;\r\n\t\tResult[3][1] = v2.w;\r\n\t\tResult[0][2] = v3.x;\r\n\t\tResult[1][2] = v3.y;\r\n\t\tResult[2][2] = v3.z;\r\n\t\tResult[3][2] = v3.w;\r\n\t\tResult[0][3] = v4.x;\r\n\t\tResult[1][3] = v4.y;\r\n\t\tResult[2][3] = v4.z;\r\n\t\tResult[3][3] = v4.w;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> rowMajor4(\r\n\t\tconst detail::tmat4x4<T, P>& m)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> Result;\r\n\t\tResult[0][0] = m[0][0];\r\n\t\tResult[0][1] = m[1][0];\r\n\t\tResult[0][2] = m[2][0];\r\n\t\tResult[0][3] = m[3][0];\r\n\t\tResult[1][0] = m[0][1];\r\n\t\tResult[1][1] = m[1][1];\r\n\t\tResult[1][2] = m[2][1];\r\n\t\tResult[1][3] = m[3][1];\r\n\t\tResult[2][0] = m[0][2];\r\n\t\tResult[2][1] = m[1][2];\r\n\t\tResult[2][2] = m[2][2];\r\n\t\tResult[2][3] = m[3][2];\r\n\t\tResult[3][0] = m[0][3];\r\n\t\tResult[3][1] = m[1][3];\r\n\t\tResult[3][2] = m[2][3];\r\n\t\tResult[3][3] = m[3][3];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat2x2<T, P> colMajor2(\r\n\t\tconst detail::tvec2<T, P>& v1, \r\n\t\tconst detail::tvec2<T, P>& v2)\r\n\t{\r\n\t\treturn detail::tmat2x2<T, P>(v1, v2);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat2x2<T, P> colMajor2(\r\n\t\tconst detail::tmat2x2<T, P>& m)\r\n\t{\r\n\t\treturn detail::tmat2x2<T, P>(m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> colMajor3(\r\n\t\tconst detail::tvec3<T, P>& v1, \r\n\t\tconst detail::tvec3<T, P>& v2, \r\n\t\tconst detail::tvec3<T, P>& v3)\r\n\t{\r\n\t\treturn detail::tmat3x3<T, P>(v1, v2, v3);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> colMajor3(\r\n\t\tconst detail::tmat3x3<T, P>& m)\r\n\t{\r\n\t\treturn detail::tmat3x3<T, P>(m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> colMajor4(\r\n\t\tconst detail::tvec4<T, P>& v1, \r\n\t\tconst detail::tvec4<T, P>& v2, \r\n\t\tconst detail::tvec4<T, P>& v3, \r\n\t\tconst detail::tvec4<T, P>& v4)\r\n\t{\r\n\t\treturn detail::tmat4x4<T, P>(v1, v2, v3, v4);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> colMajor4(\r\n\t\tconst detail::tmat4x4<T, P>& m)\r\n\t{\r\n\t\treturn detail::tmat4x4<T, P>(m);\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/matrix_operation.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_matrix_operation\r\n/// @file glm/gtx/matrix_operation.hpp\r\n/// @date 2009-08-29 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_matrix_operation GLM_GTX_matrix_operation\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Build diagonal matrices from vectors.\r\n/// \r\n/// <glm/gtx/matrix_operation.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_matrix_operation\r\n#define GLM_GTX_matrix_operation\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_matrix_operation extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_matrix_operation\r\n\t/// @{\r\n\r\n\t//! Build a diagonal matrix.\r\n\t//! From GLM_GTX_matrix_operation extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat2x2<T, P> diagonal2x2(\r\n\t\tdetail::tvec2<T, P> const & v);\r\n\r\n\t//! Build a diagonal matrix.\r\n\t//! From GLM_GTX_matrix_operation extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat2x3<T, P> diagonal2x3(\r\n\t\tdetail::tvec2<T, P> const & v);\r\n\r\n\t//! Build a diagonal matrix.\r\n\t//! From GLM_GTX_matrix_operation extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat2x4<T, P> diagonal2x4(\r\n\t\tdetail::tvec2<T, P> const & v);\r\n\r\n\t//! Build a diagonal matrix.\r\n\t//! From GLM_GTX_matrix_operation extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x2<T, P> diagonal3x2(\r\n\t\tdetail::tvec2<T, P> const & v);\r\n\r\n\t//! Build a diagonal matrix.\r\n\t//! From GLM_GTX_matrix_operation extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> diagonal3x3(\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\r\n\t//! Build a diagonal matrix.\r\n\t//! From GLM_GTX_matrix_operation extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x4<T, P> diagonal3x4(\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\r\n\t//! Build a diagonal matrix.\r\n\t//! From GLM_GTX_matrix_operation extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x2<T, P> diagonal4x2(\r\n\t\tdetail::tvec2<T, P> const & v);\r\n\r\n\t//! Build a diagonal matrix.\r\n\t//! From GLM_GTX_matrix_operation extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x3<T, P> diagonal4x3(\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\r\n\t//! Build a diagonal matrix.\r\n\t//! From GLM_GTX_matrix_operation extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> diagonal4x4(\r\n\t\tdetail::tvec4<T, P> const & v);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"matrix_operation.inl\"\r\n\r\n#endif//GLM_GTX_matrix_operation\r\n"
  },
  {
    "path": "cpu/glm/gtx/matrix_operation.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2009-08-29\r\n// Updated : 2009-08-29\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/matrix_operation.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat2x2<T, P> diagonal2x2\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tmat2x2<T, P> Result(static_cast<T>(1));\r\n\t\tResult[0][0] = v[0];\r\n\t\tResult[1][1] = v[1];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat2x3<T, P> diagonal2x3\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tmat2x3<T, P> Result(static_cast<T>(1));\r\n\t\tResult[0][0] = v[0];\r\n\t\tResult[1][1] = v[1];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat2x4<T, P> diagonal2x4\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tmat2x4<T, P> Result(static_cast<T>(1));\r\n\t\tResult[0][0] = v[0];\r\n\t\tResult[1][1] = v[1];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x2<T, P> diagonal3x2\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tmat3x2<T, P> Result(static_cast<T>(1));\r\n\t\tResult[0][0] = v[0];\r\n\t\tResult[1][1] = v[1];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> diagonal3x3\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> Result(static_cast<T>(1));\r\n\t\tResult[0][0] = v[0];\r\n\t\tResult[1][1] = v[1];\r\n\t\tResult[2][2] = v[2];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x4<T, P> diagonal3x4\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tmat3x4<T, P> Result(static_cast<T>(1));\r\n\t\tResult[0][0] = v[0];\r\n\t\tResult[1][1] = v[1];\r\n\t\tResult[2][2] = v[2];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> diagonal4x4\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> Result(static_cast<T>(1));\r\n\t\tResult[0][0] = v[0];\r\n\t\tResult[1][1] = v[1];\r\n\t\tResult[2][2] = v[2];\r\n\t\tResult[3][3] = v[3];\r\n\t\treturn Result;\t\t\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x3<T, P> diagonal4x3\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x3<T, P> Result(static_cast<T>(1));\r\n\t\tResult[0][0] = v[0];\r\n\t\tResult[1][1] = v[1];\r\n\t\tResult[2][2] = v[2];\r\n\t\treturn Result;\t\t\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x2<T, P> diagonal4x2\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x2<T, P> Result(static_cast<T>(1));\r\n\t\tResult[0][0] = v[0];\r\n\t\tResult[1][1] = v[1];\r\n\t\treturn Result;\t\t\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/matrix_query.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_matrix_query\r\n/// @file glm/gtx/matrix_query.hpp\r\n/// @date 2007-03-05 / 2011-08-28\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_vector_query (dependence)\r\n///\r\n/// @defgroup gtx_matrix_query GLM_GTX_matrix_query\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Query to evaluate matrix properties\r\n/// \r\n/// <glm/gtx/matrix_query.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_matrix_query\r\n#define GLM_GTX_matrix_query\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtx/vector_query.hpp\"\r\n#include <limits>\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_matrix_query extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_matrix_query\r\n\t/// @{\r\n\r\n\t/// Return whether a matrix a null matrix.\r\n\t/// From GLM_GTX_matrix_query extension.\r\n\ttemplate<typename T, precision P>\r\n\tbool isNull(detail::tmat2x2<T, P> const & m, T const & epsilon);\r\n\t\t\r\n\t/// Return whether a matrix a null matrix.\r\n\t/// From GLM_GTX_matrix_query extension.\r\n\ttemplate<typename T, precision P>\r\n\tbool isNull(detail::tmat3x3<T, P> const & m, T const & epsilon);\r\n\t\t\r\n\t/// Return whether a matrix is a null matrix.\r\n\t/// From GLM_GTX_matrix_query extension.\r\n\ttemplate<typename T, precision P>\r\n\tbool isNull(detail::tmat4x4<T, P> const & m, T const & epsilon);\r\n\t\t\t\r\n\t/// Return whether a matrix is an identity matrix.\r\n\t/// From GLM_GTX_matrix_query extension.\r\n\ttemplate<typename T, precision P, template <typename, precision> class matType>\r\n\tbool isIdentity(matType<T, P> const & m, T const & epsilon);\r\n\r\n\t/// Return whether a matrix is a normalized matrix.\r\n\t/// From GLM_GTX_matrix_query extension.\r\n\ttemplate<typename T, precision P>\r\n\tbool isNormalized(detail::tmat2x2<T, P> const & m, T const & epsilon);\r\n\r\n\t/// Return whether a matrix is a normalized matrix.\r\n\t/// From GLM_GTX_matrix_query extension.\r\n\ttemplate<typename T, precision P>\r\n\tbool isNormalized(detail::tmat3x3<T, P> const & m, T const & epsilon);\r\n\r\n\t/// Return whether a matrix is a normalized matrix.\r\n\t/// From GLM_GTX_matrix_query extension.\r\n\ttemplate<typename T, precision P>\r\n\tbool isNormalized(detail::tmat4x4<T, P> const & m, T const & epsilon);\r\n\r\n\t/// Return whether a matrix is an orthonormalized matrix.\r\n\t/// From GLM_GTX_matrix_query extension.\r\n\ttemplate<typename T, precision P, template <typename, precision> class matType>\r\n\tbool isOrthogonal(matType<T, P> const & m, T const & epsilon);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"matrix_query.inl\"\r\n\r\n#endif//GLM_GTX_matrix_query\r\n"
  },
  {
    "path": "cpu/glm/gtx/matrix_query.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-03-05\r\n// Updated : 2007-03-05\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/matrix_query.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Dependency:\r\n// - GLM core\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool isNull\r\n\t(\r\n\t\tdetail::tmat2x2<T, P> const & m,\r\n\t\tT const & epsilon)\r\n\t{\r\n\t\tbool result = true;\r\n\t\tfor(length_t i = 0; result && i < 2 ; ++i)\r\n\t\t\tresult = isNull(m[i], epsilon);\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool isNull\r\n\t(\r\n\t\tdetail::tmat3x3<T, P> const & m,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tbool result = true;\r\n\t\tfor(length_t i = 0; result && i < 3 ; ++i)\r\n\t\t\tresult = isNull(m[i], epsilon);\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool isNull\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tbool result = true;\r\n\t\tfor(length_t i = 0; result && i < 4 ; ++i)\r\n\t\t\tresult = isNull(m[i], epsilon);\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate<typename T, precision P, template <typename, precision> class matType>\r\n\tGLM_FUNC_QUALIFIER bool isIdentity\r\n\t(\r\n\t\tmatType<T, P> const & m,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tbool result = true;\r\n\t\tfor(length_t i(0); result && i < m[0].length(); ++i)\r\n\t\t{\r\n\t\t\tfor(length_t j(0); result && j < i ; ++j)\r\n\t\t\t\tresult = abs(m[i][j]) <= epsilon;\r\n\t\t\tif(result)\r\n\t\t\t\tresult = abs(m[i][i] - 1) <= epsilon;\r\n\t\t\tfor(length_t j(i + 1); result && j < m.length(); ++j)\r\n\t\t\t\tresult = abs(m[i][j]) <= epsilon;\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool isNormalized\r\n\t(\r\n\t\tdetail::tmat2x2<T, P> const & m,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tbool result(true);\r\n\t\tfor(length_t i(0); result && i < m.length(); ++i)\r\n\t\t\tresult = isNormalized(m[i], epsilon);\r\n\t\tfor(length_t i(0); result && i < m.length(); ++i)\r\n\t\t{\r\n\t\t\ttypename detail::tmat2x2<T, P>::col_type v;\r\n\t\t\tfor(length_t j(0); j < m.length(); ++j)\r\n\t\t\t\tv[j] = m[j][i];\r\n\t\t\tresult = isNormalized(v, epsilon);\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool isNormalized\r\n\t(\r\n\t\tdetail::tmat3x3<T, P> const & m,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tbool result(true);\r\n\t\tfor(length_t i(0); result && i < m.length(); ++i)\r\n\t\t\tresult = isNormalized(m[i], epsilon);\r\n\t\tfor(length_t i(0); result && i < m.length(); ++i)\r\n\t\t{\r\n\t\t\ttypename detail::tmat3x3<T, P>::col_type v;\r\n\t\t\tfor(length_t j(0); j < m.length(); ++j)\r\n\t\t\t\tv[j] = m[j][i];\r\n\t\t\tresult = isNormalized(v, epsilon);\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool isNormalized\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tbool result(true);\r\n\t\tfor(length_t i(0); result && i < m.length(); ++i)\r\n\t\t\tresult = isNormalized(m[i], epsilon);\r\n\t\tfor(length_t i(0); result && i < m.length(); ++i)\r\n\t\t{\r\n\t\t\ttypename detail::tmat4x4<T, P>::col_type v;\r\n\t\t\tfor(length_t j(0); j < m.length(); ++j)\r\n\t\t\t\tv[j] = m[j][i];\r\n\t\t\tresult = isNormalized(v, epsilon);\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate<typename T, precision P, template <typename, precision> class matType>\r\n\tGLM_FUNC_QUALIFIER bool isOrthogonal\r\n\t(\r\n\t\tmatType<T, P> const & m,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tbool result(true);\r\n\t\tfor(length_t i(0); result && i < m.length() - 1; ++i)\r\n\t\tfor(length_t j(i + 1); result && j < m.length(); ++j)\r\n\t\t\tresult = areOrthogonal(m[i], m[j], epsilon);\r\n\r\n\t\tif(result)\r\n\t\t{\r\n\t\t\tmatType<T, P> tmp = transpose(m);\r\n\t\t\tfor(length_t i(0); result && i < m.length() - 1 ; ++i)\r\n\t\t\tfor(length_t j(i + 1); result && j < m.length(); ++j)\r\n\t\t\t\tresult = areOrthogonal(tmp[i], tmp[j], epsilon);\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/mixed_product.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_mixed_product\r\n/// @file glm/gtx/mixed_product.hpp\r\n/// @date 2007-04-03 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_mixed_product GLM_GTX_mixed_producte\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Mixed product of 3 vectors.\r\n/// \r\n/// <glm/gtx/mixed_product.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_mixed_product\r\n#define GLM_GTX_mixed_product\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_mixed_product extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_mixed_product\r\n\t/// @{\r\n\r\n\t/// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension)\r\n\ttemplate <typename T, precision P> \r\n\tT mixedProduct(\r\n\t\tdetail::tvec3<T, P> const & v1, \r\n\t\tdetail::tvec3<T, P> const & v2, \r\n\t\tdetail::tvec3<T, P> const & v3);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"mixed_product.inl\"\r\n\r\n#endif//GLM_GTX_mixed_product\r\n"
  },
  {
    "path": "cpu/glm/gtx/mixed_product.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-04-03\r\n// Updated : 2008-09-17\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/mixed_product.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T mixedProduct\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v1,\r\n\t\tdetail::tvec3<T, P> const & v2,\r\n\t\tdetail::tvec3<T, P> const & v3\r\n\t)\r\n\t{\r\n\t\treturn dot(cross(v1, v2), v3);\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/multiple.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_multiple\r\n/// @file glm/gtx/multiple.hpp\r\n/// @date 2009-10-26 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_extented_min_max (dependence)\r\n///\r\n/// @defgroup gtx_multiple GLM_GTX_multiple\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Find the closest number of a number multiple of other number.\r\n/// \r\n/// <glm/gtx/multiple.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_multiple\r\n#define GLM_GTX_multiple\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_multiple extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_multiple\r\n\t/// @{\r\n\r\n\t/// Higher multiple number of Source.\r\n\t///\r\n\t/// @tparam genType Floating-point or integer scalar or vector types.\r\n\t/// @param Source \r\n\t/// @param Multiple Must be a null or positive value\r\n\t///\r\n\t/// @see gtx_multiple\r\n\ttemplate <typename genType>\r\n\tgenType higherMultiple(\r\n\t\tgenType const & Source,\r\n\t\tgenType const & Multiple);\r\n\r\n\t/// Lower multiple number of Source.\r\n\t///\r\n\t/// @tparam genType Floating-point or integer scalar or vector types.\r\n\t/// @param Source \r\n\t/// @param Multiple Must be a null or positive value\r\n\t///\r\n\t/// @see gtx_multiple\r\n\ttemplate <typename genType>\r\n\tgenType lowerMultiple(\r\n\t\tgenType const & Source,\r\n\t\tgenType const & Multiple);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"multiple.inl\"\r\n\r\n#endif//GLM_GTX_multiple\r\n"
  },
  {
    "path": "cpu/glm/gtx/multiple.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2009-10-26\r\n// Updated : 2011-06-07\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/multiple.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Dependency:\r\n// - GLM core\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <bool Signed>\r\n\tstruct higherMultiple\r\n\t{\r\n\t\ttemplate <typename genType>\r\n\t\tGLM_FUNC_QUALIFIER genType operator()\r\n\t\t(\r\n\t\t\tgenType const & Source,\r\n\t\t\tgenType const & Multiple\r\n\t\t)\r\n\t\t{\r\n\t\t\tif (Source > genType(0))\r\n\t\t\t{\r\n\t\t\t\tgenType Tmp = Source - genType(1);\r\n\t\t\t\treturn Tmp + (Multiple - (Tmp % Multiple));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\treturn Source + (-Source % Multiple);\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <>\r\n\tstruct higherMultiple<false>\r\n\t{\r\n\t\ttemplate <typename genType>\r\n\t\tGLM_FUNC_QUALIFIER genType operator()\r\n\t\t(\r\n\t\t\tgenType const & Source,\r\n\t\t\tgenType const & Multiple\r\n\t\t)\r\n\t\t{\r\n\t\t\tgenType Tmp = Source - genType(1);\r\n\t\t\treturn Tmp + (Multiple - (Tmp % Multiple));\r\n\t\t}\r\n\t};\r\n}//namespace detail\r\n\r\n\t//////////////////////\r\n\t// higherMultiple\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType higherMultiple\r\n\t(\r\n\t\tgenType const & Source,\r\n\t\tgenType const & Multiple\r\n\t)\r\n\t{\r\n\t\tdetail::higherMultiple<std::numeric_limits<genType>::is_signed> Compute;\r\n\t\treturn Compute(Source, Multiple);\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER float higherMultiple\r\n\t(\t\r\n\t\tfloat const & Source,\r\n\t\tfloat const & Multiple\r\n\t)\r\n\t{\r\n\t\tif (Source > float(0))\r\n\t\t{\r\n\t\t\tfloat Tmp = Source - float(1);\r\n\t\t\treturn Tmp + (Multiple - std::fmod(Tmp, Multiple));\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn Source + std::fmod(-Source, Multiple);\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER double higherMultiple\r\n\t(\r\n\t\tdouble const & Source,\r\n\t\tdouble const & Multiple\r\n\t)\r\n\t{\r\n\t\tif (Source > double(0))\r\n\t\t{\r\n\t\t\tdouble Tmp = Source - double(1);\r\n\t\t\treturn Tmp + (Multiple - std::fmod(Tmp, Multiple));\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn Source + std::fmod(-Source, Multiple);\r\n\t}\r\n\r\n\tVECTORIZE_VEC_VEC(higherMultiple)\r\n\r\n\t//////////////////////\r\n\t// lowerMultiple\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType lowerMultiple\r\n\t(\r\n\t\tgenType const & Source,\r\n\t\tgenType const & Multiple\r\n\t)\r\n\t{\r\n\t\tif (Source >= genType(0))\r\n\t\t\treturn Source - Source % Multiple;\r\n\t\telse\r\n\t\t{\r\n\t\t\tgenType Tmp = Source + genType(1);\r\n\t\t\treturn Tmp - Tmp % Multiple - Multiple;\r\n\t\t}\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER float lowerMultiple\r\n\t(\r\n\t\tfloat const & Source,\r\n\t\tfloat const & Multiple\r\n\t)\r\n\t{\r\n\t\tif (Source >= float(0))\r\n\t\t\treturn Source - std::fmod(Source, Multiple);\r\n\t\telse\r\n\t\t{\r\n\t\t\tfloat Tmp = Source + float(1);\r\n\t\t\treturn Tmp - std::fmod(Tmp, Multiple) - Multiple;\r\n\t\t}\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER double lowerMultiple\r\n\t(\r\n\t\tdouble const & Source,\r\n\t\tdouble const & Multiple\r\n\t)\r\n\t{\r\n\t\tif (Source >= double(0))\r\n\t\t\treturn Source - std::fmod(Source, Multiple);\r\n\t\telse\r\n\t\t{\r\n\t\t\tdouble Tmp = Source + double(1);\r\n\t\t\treturn Tmp - std::fmod(Tmp, Multiple) - Multiple;\r\n\t\t}\r\n\t}\r\n\r\n\tVECTORIZE_VEC_VEC(lowerMultiple)\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/noise.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#if(defined(GLM_MESSAGES))\r\n#\tpragma message(\"GLM: GLM_GTX_random extension is deprecated, include GLM_GTC_random (glm/gtc/noise.hpp) instead\")\r\n#endif\r\n\r\n// Promoted:\r\n#include \"../gtc/noise.hpp\"\r\n"
  },
  {
    "path": "cpu/glm/gtx/norm.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_norm\r\n/// @file glm/gtx/norm.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_quaternion (dependence)\r\n///\r\n/// @defgroup gtx_norm GLM_GTX_norm\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Various ways to compute vector norms.\r\n/// \r\n/// <glm/gtx/norm.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_norm\r\n#define GLM_GTX_norm\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtx/quaternion.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_norm extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_norm\r\n\t/// @{\r\n\r\n\t//! Returns the squared length of x.\r\n\t//! From GLM_GTX_norm extension.\r\n\ttemplate <typename T>\r\n\tT length2(\r\n\t\tT const & x);\r\n\r\n\t//! Returns the squared length of x.\r\n\t//! From GLM_GTX_norm extension.\r\n\ttemplate <typename genType>\r\n\ttypename genType::value_type length2(\r\n\t\tgenType const & x);\r\n\t\t\r\n\t//! Returns the squared distance between p0 and p1, i.e., length(p0 - p1).\r\n\t//! From GLM_GTX_norm extension.\r\n\ttemplate <typename T>\r\n\tT distance2(\r\n\t\tT const & p0,\r\n\t\tT const & p1);\r\n\t\t\r\n\t//! Returns the squared distance between p0 and p1, i.e., length(p0 - p1).\r\n\t//! From GLM_GTX_norm extension.\r\n\ttemplate <typename genType>\r\n\ttypename genType::value_type distance2(\r\n\t\tgenType const & p0,\r\n\t\tgenType const & p1);\r\n\r\n\t//! Returns the L1 norm between x and y.\r\n\t//! From GLM_GTX_norm extension.\r\n\ttemplate <typename T, precision P>\r\n\tT l1Norm(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<T, P> const & y);\r\n\t\t\r\n\t//! Returns the L1 norm of v.\r\n\t//! From GLM_GTX_norm extension.\r\n\ttemplate <typename T, precision P>\r\n\tT l1Norm(\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\t\t\r\n\t//! Returns the L2 norm between x and y.\r\n\t//! From GLM_GTX_norm extension.\r\n\ttemplate <typename T, precision P>\r\n\tT l2Norm(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<T, P> const & y);\r\n\t\t\r\n\t//! Returns the L2 norm of v.\r\n\t//! From GLM_GTX_norm extension.\r\n\ttemplate <typename T, precision P>\r\n\tT l2Norm(\r\n\t\tdetail::tvec3<T, P> const & x);\r\n\t\t\r\n\t//! Returns the L norm between x and y.\r\n\t//! From GLM_GTX_norm extension.\r\n\ttemplate <typename T, precision P>\r\n\tT lxNorm(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<T, P> const & y,\r\n\t\tunsigned int Depth);\r\n\r\n\t//! Returns the L norm of v.\r\n\t//! From GLM_GTX_norm extension.\r\n\ttemplate <typename T, precision P>\r\n\tT lxNorm(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tunsigned int Depth);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"norm.inl\"\r\n\r\n#endif//GLM_GTX_norm\r\n"
  },
  {
    "path": "cpu/glm/gtx/norm.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2008-07-24\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/norm.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T length2\r\n\t(\r\n\t\tT const & x\r\n\t)\r\n\t{\r\n\t\treturn x * x;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T length2\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn dot(x, x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T length2\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn dot(x, x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T length2\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn dot(x, x);\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T distance2\r\n\t(\r\n\t\tT const & p0,\r\n\t\tT const & p1\r\n\t)\r\n\t{\r\n\t\treturn length2(p1 - p0);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T distance2\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & p0,\r\n\t\tdetail::tvec2<T, P> const & p1\r\n\t)\r\n\t{\r\n\t\treturn length2(p1 - p0);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T distance2\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & p0,\r\n\t\tdetail::tvec3<T, P> const & p1\r\n\t)\r\n\t{\r\n\t\treturn length2(p1 - p0);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T distance2\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & p0,\r\n\t\tdetail::tvec4<T, P> const & p1\r\n\t)\r\n\t{\r\n\t\treturn length2(p1 - p0);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T l1Norm\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & a,\r\n\t\tdetail::tvec3<T, P> const & b\r\n\t)\r\n\t{\r\n\t\treturn abs(b.x - a.x) + abs(b.y - a.y) + abs(b.z - a.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T l1Norm\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn abs(v.x) + abs(v.y) + abs(v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T l2Norm\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & a,\r\n\t\tdetail::tvec3<T, P> const & b\r\n\t)\r\n\t{\r\n\t\treturn length(b - a);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T l2Norm\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn length(v);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T lxNorm\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<T, P> const & y,\r\n\t\tunsigned int Depth\r\n\t)\r\n\t{\r\n\t\treturn pow(pow(y.x - x.x, T(Depth)) + pow(y.y - x.y, T(Depth)) + pow(y.z - x.z, T(Depth)), T(1) / T(Depth));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T lxNorm\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tunsigned int Depth\r\n\t)\r\n\t{\r\n\t\treturn pow(pow(v.x, T(Depth)) + pow(v.y, T(Depth)) + pow(v.z, T(Depth)), T(1) / T(Depth));\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/normal.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_normal\r\n/// @file glm/gtx/normal.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_extented_min_max (dependence)\r\n///\r\n/// @defgroup gtx_normal GLM_GTX_normal\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Compute the normal of a triangle.\r\n/// \r\n/// <glm/gtx/normal.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_normal\r\n#define GLM_GTX_normal\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_normal extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_normal\r\n\t/// @{\r\n\r\n\t//! Computes triangle normal from triangle points. \r\n\t//! From GLM_GTX_normal extension.\r\n    template <typename T, precision P> \r\n\tdetail::tvec3<T, P> triangleNormal(\r\n\t\tdetail::tvec3<T, P> const & p1, \r\n\t\tdetail::tvec3<T, P> const & p2, \r\n\t\tdetail::tvec3<T, P> const & p3);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"normal.inl\"\r\n\r\n#endif//GLM_GTX_normal\r\n"
  },
  {
    "path": "cpu/glm/gtx/normal.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2011-06-07\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/normal.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> triangleNormal\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & p1, \r\n\t\tdetail::tvec3<T, P> const & p2, \r\n\t\tdetail::tvec3<T, P> const & p3\r\n\t)\r\n\t{\r\n\t\treturn normalize(cross(p1 - p2, p1 - p3));\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/normalize_dot.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_normalize_dot\r\n/// @file glm/gtx/normalize_dot.hpp\r\n/// @date 2007-09-28 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_fast_square_root (dependence)\r\n///\r\n/// @defgroup gtx_normalize_dot GLM_GTX_normalize_dot\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Dot product of vectors that need to be normalize with a single square root.\r\n/// \r\n/// <glm/gtx/normalized_dot.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_normalize_dot\r\n#define GLM_GTX_normalize_dot\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtx/fast_square_root.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_normalize_dot extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_normalize_dot\r\n\t/// @{\r\n\r\n\t//! Normalize parameters and returns the dot product of x and y.\r\n\t//! It's faster that dot(normalize(x), normalize(y)).\r\n\t//! From GLM_GTX_normalize_dot extension.\r\n\ttemplate <typename genType> \r\n\ttypename genType::value_type normalizeDot(\r\n\t\tgenType const & x, \r\n\t\tgenType const & y);\r\n\r\n\t//! Normalize parameters and returns the dot product of x and y.\r\n\t//! Faster that dot(fastNormalize(x), fastNormalize(y)).\r\n\t//! From GLM_GTX_normalize_dot extension.\r\n\ttemplate <typename genType> \r\n\ttypename genType::value_type fastNormalizeDot(\r\n\t\tgenType const & x, \r\n\t\tgenType const & y);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"normalize_dot.inl\"\r\n\r\n#endif//GLM_GTX_normalize_dot\r\n"
  },
  {
    "path": "cpu/glm/gtx/normalize_dot.inl",
    "content": "//////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n//////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-09-28\r\n// Updated : 2008-10-07\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/normalize_dot.inl\r\n//////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType normalizeDot\r\n\t(\r\n\t\tgenType const & x, \r\n\t\tgenType const & y\r\n\t)\r\n\t{\r\n\t\treturn \r\n\t\t\tglm::dot(x, y) * \r\n\t\t\tglm::inversesqrt(glm::dot(x, x) * \r\n\t\t\tglm::dot(y, y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T normalizeDot\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x, \r\n\t\tdetail::tvec2<T, P> const & y\r\n\t)\r\n\t{\r\n\t\treturn \r\n\t\t\tglm::dot(x, y) * \r\n\t\t\tglm::inversesqrt(glm::dot(x, x) * \r\n\t\t\tglm::dot(y, y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T normalizeDot\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x, \r\n\t\tdetail::tvec3<T, P> const & y\r\n\t)\r\n\t{\r\n\t\treturn \r\n\t\t\tglm::dot(x, y) * \r\n\t\t\tglm::inversesqrt(glm::dot(x, x) * \r\n\t\t\tglm::dot(y, y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T normalizeDot\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & x, \r\n\t\tdetail::tvec4<T, P> const & y\r\n\t)\r\n\t{\r\n\t\treturn \r\n\t\t\tglm::dot(x, y) * \r\n\t\t\tglm::inversesqrt(glm::dot(x, x) * \r\n\t\t\tglm::dot(y, y));\r\n\t}\r\n\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType fastNormalizeDot\r\n\t(\r\n\t\tgenType const & x, \r\n\t\tgenType const & y\r\n\t)\r\n\t{\r\n\t\treturn \r\n\t\t\tglm::dot(x, y) * \r\n\t\t\tfastInverseSqrt(glm::dot(x, x) * \r\n\t\t\tglm::dot(y, y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T fastNormalizeDot\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x, \r\n\t\tdetail::tvec2<T, P> const & y\r\n\t)\r\n\t{\r\n\t\treturn \r\n\t\t\tglm::dot(x, y) * \r\n\t\t\tfastInverseSqrt(glm::dot(x, x) * \r\n\t\t\tglm::dot(y, y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T fastNormalizeDot\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x, \r\n\t\tdetail::tvec3<T, P> const & y\r\n\t)\r\n\t{\r\n\t\treturn \r\n\t\t\tglm::dot(x, y) * \r\n\t\t\tfastInverseSqrt(glm::dot(x, x) * \r\n\t\t\tglm::dot(y, y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T fastNormalizeDot\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & x, \r\n\t\tdetail::tvec4<T, P> const & y\r\n\t)\r\n\t{\r\n\t\treturn \r\n\t\t\tglm::dot(x, y) * \r\n\t\t\tfastInverseSqrt(glm::dot(x, x) * \r\n\t\t\tglm::dot(y, y));\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/number_precision.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_number_precision\r\n/// @file glm/gtx/number_precision.hpp\r\n/// @date 2007-05-10 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_type_precision (dependence)\r\n/// @see gtc_quaternion (dependence)\r\n///\r\n/// @defgroup gtx_number_precision GLM_GTX_number_precision\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Defined size types.\r\n/// \r\n/// <glm/gtx/number_precision.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_number_precision\r\n#define GLM_GTX_number_precision\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtc/type_precision.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_number_precision extension included\")\r\n#endif\r\n\r\nnamespace glm{\r\nnamespace gtx\r\n{\r\n\t/////////////////////////////\r\n\t// Unsigned int vector types \r\n\r\n\t/// @addtogroup gtx_number_precision\r\n\t/// @{\r\n\r\n\ttypedef u8\t\t\tu8vec1;\t\t//!< \\brief 8bit unsigned integer scalar. (from GLM_GTX_number_precision extension)\r\n\ttypedef u16\t\t\tu16vec1;    //!< \\brief 16bit unsigned integer scalar. (from GLM_GTX_number_precision extension)\r\n\ttypedef u32\t\t\tu32vec1;    //!< \\brief 32bit unsigned integer scalar. (from GLM_GTX_number_precision extension)\r\n\ttypedef u64\t\t\tu64vec1;    //!< \\brief 64bit unsigned integer scalar. (from GLM_GTX_number_precision extension)\r\n\r\n\t//////////////////////\r\n\t// Float vector types \r\n\r\n\ttypedef f32\t\t\tf32vec1;    //!< \\brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension)\r\n\ttypedef f64\t\t\tf64vec1;    //!< \\brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension)\r\n\r\n\t//////////////////////\r\n\t// Float matrix types \r\n\r\n\ttypedef f32\t\t\tf32mat1;\t//!< \\brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension)\r\n\ttypedef f32\t\t\tf32mat1x1;\t//!< \\brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension)\r\n\ttypedef f64\t\t\tf64mat1;\t//!< \\brief Double-precision floating-point scalar. (from GLM_GTX_number_precision extension)\r\n\ttypedef f64\t\t\tf64mat1x1;\t//!< \\brief Double-precision floating-point scalar. (from GLM_GTX_number_precision extension)\r\n\r\n\t/// @}\r\n}//namespace gtx\r\n}//namespace glm\r\n\r\n#include \"number_precision.inl\"\r\n\r\n#endif//GLM_GTX_number_precision\r\n"
  },
  {
    "path": "cpu/glm/gtx/number_precision.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-05-10\r\n// Updated : 2007-05-10\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/number_precision.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\r\n}\r\n"
  },
  {
    "path": "cpu/glm/gtx/optimum_pow.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_optimum_pow\r\n/// @file glm/gtx/optimum_pow.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_optimum_pow GLM_GTX_optimum_pow\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Integer exponentiation of power functions.\r\n/// \r\n/// <glm/gtx/optimum_pow.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_optimum_pow\r\n#define GLM_GTX_optimum_pow\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_optimum_pow extension included\")\r\n#endif\r\n\r\nnamespace glm{\r\nnamespace gtx\r\n{\r\n\t/// @addtogroup gtx_optimum_pow\r\n\t/// @{\r\n\r\n\t//! Returns x raised to the power of 2.\r\n\t//! From GLM_GTX_optimum_pow extension.\r\n\ttemplate <typename genType>\r\n\tgenType pow2(const genType& x);\r\n\r\n\t//! Returns x raised to the power of 3.\r\n\t//! From GLM_GTX_optimum_pow extension.\r\n\ttemplate <typename genType>\r\n\tgenType pow3(const genType& x);\r\n\r\n\t//! Returns x raised to the power of 4.\r\n\t//! From GLM_GTX_optimum_pow extension.\r\n\ttemplate <typename genType>\r\n\tgenType pow4(const genType& x);\r\n\r\n\t//! Checks if the parameter is a power of 2 number.\r\n\t//! From GLM_GTX_optimum_pow extension.\r\n\tbool powOfTwo(int num);\r\n\r\n\t//! Checks to determine if the parameter component are power of 2 numbers.\r\n\t//! From GLM_GTX_optimum_pow extension.\r\n\ttemplate <precision P>\r\n\tdetail::tvec2<bool, P> powOfTwo(detail::tvec2<int, P> const & x);\r\n\r\n\t//! Checks to determine if the parameter component are power of 2 numbers.\r\n\t//! From GLM_GTX_optimum_pow extension.\r\n\ttemplate <precision P>\r\n\tdetail::tvec3<bool, P> powOfTwo(detail::tvec3<int, P> const & x);\r\n\r\n\t//! Checks to determine if the parameter component are power of 2 numbers.\r\n\t//! From GLM_GTX_optimum_pow extension.\r\n\ttemplate <precision P>\r\n\tdetail::tvec4<bool, P> powOfTwo(detail::tvec4<int, P> const & x);\r\n\r\n\t/// @}\r\n}//namespace gtx\r\n}//namespace glm\r\n\r\n#include \"optimum_pow.inl\"\r\n\r\n#endif//GLM_GTX_optimum_pow\r\n"
  },
  {
    "path": "cpu/glm/gtx/optimum_pow.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2005-12-27\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/optimum_pow.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType pow2(genType const & x)\r\n\t{\r\n\t\treturn x * x;\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType pow3(genType const & x)\r\n\t{\r\n\t\treturn x * x * x;\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType pow4(genType const & x)\r\n\t{\r\n\t\treturn (x * x) * (x * x);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER bool powOfTwo(int x)\r\n\t{\r\n\t\treturn !(x & (x - 1));\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<bool, P> powOfTwo(detail::tvec2<int, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec2<bool, P>(\r\n\t\t\tpowOfTwo(x.x),\r\n\t\t\tpowOfTwo(x.y));\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<bool, P> powOfTwo(detail::tvec3<int, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec3<bool, P>(\r\n\t\t\tpowOfTwo(x.x),\r\n\t\t\tpowOfTwo(x.y),\r\n\t\t\tpowOfTwo(x.z));\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P> powOfTwo(detail::tvec4<int, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec4<bool, P>(\r\n\t\t\tpowOfTwo(x.x),\r\n\t\t\tpowOfTwo(x.y),\r\n\t\t\tpowOfTwo(x.z),\r\n\t\t\tpowOfTwo(x.w));\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/orthonormalize.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_orthonormalize\r\n/// @file glm/gtx/orthonormalize.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_extented_min_max (dependence)\r\n///\r\n/// @defgroup gtx_orthonormalize GLM_GTX_orthonormalize\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Orthonormalize matrices.\r\n/// \r\n/// <glm/gtx/orthonormalize.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_orthonormalize\r\n#define GLM_GTX_orthonormalize\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_orthonormalize extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_orthonormalize\r\n\t/// @{\r\n\r\n\t//! Returns the orthonormalized matrix of m.\r\n\t//! From GLM_GTX_orthonormalize extension.\r\n\ttemplate <typename T, precision P> \r\n\tdetail::tmat3x3<T, P> orthonormalize(\r\n\t\tconst detail::tmat3x3<T, P>& m);\r\n\t\t\r\n    //! Orthonormalizes x according y.\r\n\t//! From GLM_GTX_orthonormalize extension.\r\n\ttemplate <typename T, precision P> \r\n\tdetail::tvec3<T, P> orthonormalize(\r\n\t\tconst detail::tvec3<T, P>& x, \r\n\t\tconst detail::tvec3<T, P>& y);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"orthonormalize.inl\"\r\n\r\n#endif//GLM_GTX_orthonormalize\r\n"
  },
  {
    "path": "cpu/glm/gtx/orthonormalize.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2005-12-21\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/orthonormalize.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> orthonormalize\r\n\t(\r\n\t\tconst detail::tmat3x3<T, P>& m\r\n\t)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> r = m;\r\n\r\n\t\tr[0] = normalize(r[0]);\r\n\r\n\t\tfloat d0 = dot(r[0], r[1]);\r\n\t\tr[1] -= r[0] * d0;\r\n\t\tr[1] = normalize(r[1]);\r\n\r\n\t\tfloat d1 = dot(r[1], r[2]);\r\n\t\td0 = dot(r[0], r[2]);\r\n\t\tr[2] -= r[0] * d0 + r[1] * d1;\r\n\t\tr[2] = normalize(r[2]);\r\n\r\n\t\treturn r;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> orthonormalize\r\n\t(\r\n\t\tconst detail::tvec3<T, P>& x, \r\n\t\tconst detail::tvec3<T, P>& y\r\n\t)\r\n\t{\r\n\t\treturn normalize(x - y * dot(y, x));\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/perpendicular.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_perpendicular\r\n/// @file glm/gtx/perpendicular.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_projection (dependence)\r\n///\r\n/// @defgroup gtx_perpendicular GLM_GTX_perpendicular\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Perpendicular of a vector from other one\r\n/// \r\n/// <glm/gtx/perpendicular.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_perpendicular\r\n#define GLM_GTX_perpendicular\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtx/projection.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_perpendicular extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_perpendicular\r\n\t/// @{\r\n\r\n\t//! Projects x a perpendicular axis of Normal.\r\n\t//! From GLM_GTX_perpendicular extension.\r\n\ttemplate <typename vecType> \r\n\tvecType perp(\r\n\t\tvecType const & x, \r\n\t\tvecType const & Normal);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"perpendicular.inl\"\r\n\r\n#endif//GLM_GTX_perpendicular\r\n"
  },
  {
    "path": "cpu/glm/gtx/perpendicular.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2009-03-06\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/perpendicular.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename vecType> \r\n\tGLM_FUNC_QUALIFIER vecType perp\r\n\t(\r\n\t\tvecType const & x, \r\n\t\tvecType const & Normal\r\n\t)\r\n\t{\r\n\t\treturn x - proj(x, Normal);\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/polar_coordinates.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_polar_coordinates\r\n/// @file glm/gtx/polar_coordinates.hpp\r\n/// @date 2007-03-06 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_polar_coordinates GLM_GTX_polar_coordinates\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Conversion from Euclidean space to polar space and revert.\r\n/// \r\n/// <glm/gtx/polar_coordinates.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_polar_coordinates\r\n#define GLM_GTX_polar_coordinates\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_polar_coordinates extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_polar_coordinates\r\n\t/// @{\r\n\r\n\t/// Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude.\r\n\t///\r\n\t/// @see gtx_polar_coordinates\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> polar(\r\n\t\tdetail::tvec3<T, P> const & euclidean);\r\n\r\n\t/// Convert Polar to Euclidean coordinates.\r\n\t///\r\n\t/// @see gtx_polar_coordinates\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> euclidean(\r\n\t\tdetail::tvec2<T, P> const & polar);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"polar_coordinates.inl\"\r\n\r\n#endif//GLM_GTX_polar_coordinates\r\n"
  },
  {
    "path": "cpu/glm/gtx/polar_coordinates.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-03-06\r\n// Updated : 2009-05-01\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/polar_coordinates.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> polar\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & euclidean\r\n\t)\r\n\t{\r\n\t\tT const Length(length(euclidean));\r\n\t\tdetail::tvec3<T, P> const tmp(euclidean / Length);\r\n\t\tT const xz_dist(sqrt(tmp.x * tmp.x + tmp.z * tmp.z));\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tatan(xz_dist, tmp.y),\t// latitude\r\n\t\t\tatan(tmp.x, tmp.z),\t\t// longitude\r\n\t\t\txz_dist);\t\t\t\t// xz distance\r\n#else\r\n#\t\tpragma message(\"GLM: polar function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tdegrees(atan(xz_dist, tmp.y)),\t// latitude\r\n\t\t\tdegrees(atan(tmp.x, tmp.z)),\t// longitude\r\n\t\t\txz_dist);\t\t\t\t\t\t// xz distance\r\n#endif\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> euclidean\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & polar\r\n\t)\r\n\t{\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const latitude(polar.x);\r\n\t\tT const longitude(polar.y);\r\n#else\r\n#\t\tpragma message(\"GLM: euclidean function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const latitude(radians(polar.x));\r\n\t\tT const longitude(radians(polar.y));\r\n#endif\r\n\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tcos(latitude) * sin(longitude),\r\n\t\t\tsin(latitude),\r\n\t\t\tcos(latitude) * cos(longitude));\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/projection.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_projection\r\n/// @file glm/gtx/projection.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_projection GLM_GTX_projection\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Projection of a vector to other one\r\n/// \r\n/// <glm/gtx/projection.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_projection\r\n#define GLM_GTX_projection\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_projection extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_projection\r\n\t/// @{\r\n\r\n\t//! Projects x on Normal.\r\n\t//! From GLM_GTX_projection extension.\r\n\ttemplate <typename vecType> \r\n\tvecType proj(\r\n\t\tvecType const & x, \r\n\t\tvecType const & Normal);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"projection.inl\"\r\n\r\n#endif//GLM_GTX_projection\r\n"
  },
  {
    "path": "cpu/glm/gtx/projection.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2009-03-06\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/projection.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename vecType> \r\n\tGLM_FUNC_QUALIFIER vecType proj\r\n\t(\r\n\t\tvecType const & x, \r\n\t\tvecType const & Normal\r\n\t)\r\n\t{\r\n\t\treturn glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/quaternion.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_quaternion\r\n/// @file glm/gtx/quaternion.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_extented_min_max (dependence)\r\n///\r\n/// @defgroup gtx_quaternion GLM_GTX_quaternion\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Extented quaternion types and functions\r\n/// \r\n/// <glm/gtx/quaternion.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_quaternion\r\n#define GLM_GTX_quaternion\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtc/constants.hpp\"\r\n#include \"../gtc/quaternion.hpp\"\r\n#include \"../gtx/norm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_quaternion extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_quaternion\r\n\t/// @{\r\n\r\n\t//! Compute a cross product between a quaternion and a vector.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tvec3<T, P> cross(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\r\n\t//! Compute a cross product between a vector and a quaternion.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tvec3<T, P> cross(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tdetail::tquat<T, P> const & q);\r\n\r\n\t//! Compute a point on a path according squad equation. \r\n\t//! q1 and q2 are control points; s1 and s2 are intermediate control points.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tquat<T, P> squad(\r\n\t\tdetail::tquat<T, P> const & q1,\r\n\t\tdetail::tquat<T, P> const & q2,\r\n\t\tdetail::tquat<T, P> const & s1,\r\n\t\tdetail::tquat<T, P> const & s2,\r\n\t\tT const & h);\r\n\r\n\t//! Returns an intermediate control point for squad interpolation.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tquat<T, P> intermediate(\r\n\t\tdetail::tquat<T, P> const & prev,\r\n\t\tdetail::tquat<T, P> const & curr,\r\n\t\tdetail::tquat<T, P> const & next);\r\n\r\n\t//! Returns a exp of a quaternion.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tquat<T, P> exp(\r\n\t\tdetail::tquat<T, P> const & q);\r\n\r\n\t//! Returns a log of a quaternion.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tquat<T, P> log(\r\n\t\tdetail::tquat<T, P> const & q);\r\n\r\n\t/// Returns x raised to the y power.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tquat<T, P> pow(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tT const & y);\r\n\r\n\t//! Returns quarternion square root.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\t//template<typename T, precision P>\r\n\t//detail::tquat<T, P> sqrt(\r\n\t//\tdetail::tquat<T, P> const & q);\r\n\r\n\t//! Rotates a 3 components vector by a quaternion.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tvec3<T, P> rotate(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\r\n\t/// Rotates a 4 components vector by a quaternion.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tvec4<T, P> rotate(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tvec4<T, P> const & v);\r\n\r\n\t/// Extract the real component of a quaternion.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tT extractRealComponent(\r\n\t\tdetail::tquat<T, P> const & q);\r\n\r\n\t/// Converts a quaternion to a 3 * 3 matrix.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tmat3x3<T, P> toMat3(\r\n\t\tdetail::tquat<T, P> const & x){return mat3_cast(x);}\r\n\r\n\t/// Converts a quaternion to a 4 * 4 matrix.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tmat4x4<T, P> toMat4(\r\n\t\tdetail::tquat<T, P> const & x){return mat4_cast(x);}\r\n\r\n\t/// Converts a 3 * 3 matrix to a quaternion.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tquat<T, P> toQuat(\r\n\t\tdetail::tmat3x3<T, P> const & x){return quat_cast(x);}\r\n\r\n\t/// Converts a 4 * 4 matrix to a quaternion.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tquat<T, P> toQuat(\r\n\t\tdetail::tmat4x4<T, P> const & x){return quat_cast(x);}\r\n\r\n\t/// Quaternion interpolation using the rotation short path.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tquat<T, P> shortMix(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y,\r\n\t\tT const & a);\r\n\r\n\t/// Quaternion normalized linear interpolation.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tquat<T, P> fastMix(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y,\r\n\t\tT const & a);\r\n\r\n\t/// Compute the rotation between two vectors.\r\n\t/// param orig vector, needs to be normalized\r\n\t/// param dest vector, needs to be normalized\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tquat<T, P> rotation(\r\n\t\tdetail::tvec3<T, P> const & orig, \r\n\t\tdetail::tvec3<T, P> const & dest);\r\n\r\n\t/// Returns the squared length of x.\r\n\t/// \r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tT length2(detail::tquat<T, P> const & q);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"quaternion.inl\"\r\n\r\n#endif//GLM_GTX_quaternion\r\n"
  },
  {
    "path": "cpu/glm/gtx/quaternion.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2008-11-27\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/quaternion.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include <limits>\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> cross\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn inverse(q) * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> cross\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn q * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> squad\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q1,\r\n\t\tdetail::tquat<T, P> const & q2,\r\n\t\tdetail::tquat<T, P> const & s1,\r\n\t\tdetail::tquat<T, P> const & s2,\r\n\t\tT const & h)\r\n\t{\r\n\t\treturn mix(mix(q1, q2, h), mix(s1, s2, h), T(2) * (T(1) - h) * h);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> intermediate\r\n\t(\r\n\t\tdetail::tquat<T, P> const & prev,\r\n\t\tdetail::tquat<T, P> const & curr,\r\n\t\tdetail::tquat<T, P> const & next\r\n\t)\r\n\t{\r\n\t\tdetail::tquat<T, P> invQuat = inverse(curr);\r\n\t\treturn exp((log(next + invQuat) + log(prev + invQuat)) / T(-4)) * curr;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> exp\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> u(q.x, q.y, q.z);\r\n\t\tfloat Angle = glm::length(u);\r\n\t\tdetail::tvec3<T, P> v(u / Angle);\r\n\t\treturn detail::tquat<T, P>(cos(Angle), sin(Angle) * v);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> log\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\tif((q.x == static_cast<T>(0)) && (q.y == static_cast<T>(0)) && (q.z == static_cast<T>(0)))\r\n\t\t{\r\n\t\t\tif(q.w > T(0))\r\n\t\t\t\treturn detail::tquat<T, P>(log(q.w), T(0), T(0), T(0));\r\n\t\t\telse if(q.w < T(0))\r\n\t\t\t\treturn detail::tquat<T, P>(log(-q.w), T(3.1415926535897932384626433832795), T(0),T(0));\r\n\t\t\telse\r\n\t\t\t\treturn detail::tquat<T, P>(std::numeric_limits<T>::infinity(), std::numeric_limits<T>::infinity(), std::numeric_limits<T>::infinity(), std::numeric_limits<T>::infinity());\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tT Vec3Len = sqrt(q.x * q.x + q.y * q.y + q.z * q.z);\r\n\t\t\tT QuatLen = sqrt(Vec3Len * Vec3Len + q.w * q.w);\r\n\t\t\tT t = atan(Vec3Len, T(q.w)) / Vec3Len;\r\n\t\t\treturn detail::tquat<T, P>(t * q.x, t * q.y, t * q.z, log(QuatLen));\r\n\t\t}\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> pow\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tT const & y\r\n\t)\r\n\t{\r\n\t\tif(abs(x.w) > T(0.9999))\r\n\t\t\treturn x;\r\n\t\tfloat Angle = acos(y);\r\n\t\tfloat NewAngle = Angle * y;\r\n\t\tfloat Div = sin(NewAngle) / sin(Angle);\r\n\t\treturn detail::tquat<T, P>(\r\n\t\t\tcos(NewAngle),\r\n\t\t\tx.x * Div,\r\n\t\t\tx.y * Div,\r\n\t\t\tx.z * Div);\r\n\t}\r\n\r\n\t//template <typename T, precision P>\r\n\t//GLM_FUNC_QUALIFIER detail::tquat<T, P> sqrt\r\n\t//(\r\n\t//\tdetail::tquat<T, P> const & q\r\n\t//)\r\n\t//{\r\n\t//\tT q0 = static_cast<T>(1) - dot(q, q);\r\n\t//\treturn T(2) * (T(1) + q0) * q;\r\n\t//}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> rotate\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn q * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> rotate\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn q * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T extractRealComponent\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\tT w = static_cast<T>(1.0) - q.x * q.x - q.y * q.y - q.z * q.z;\r\n\t\tif(w < T(0))\r\n\t\t\treturn T(0);\r\n\t\telse\r\n\t\t\treturn -sqrt(w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T length2\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> shortMix\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y,\r\n\t\tT const & a\r\n\t)\r\n\t{\r\n\t\tif(a <= T(0)) return x;\r\n\t\tif(a >= T(1)) return y;\r\n\r\n\t\tT fCos = dot(x, y);\r\n\t\tdetail::tquat<T, P> y2(y); //BUG!!! tquat<T> y2;\r\n\t\tif(fCos < T(0))\r\n\t\t{\r\n\t\t\ty2 = -y;\r\n\t\t\tfCos = -fCos;\r\n\t\t}\r\n\r\n\t\t//if(fCos > 1.0f) // problem\r\n\t\tT k0, k1;\r\n\t\tif(fCos > T(0.9999))\r\n\t\t{\r\n\t\t\tk0 = static_cast<T>(1) - a;\r\n\t\t\tk1 = static_cast<T>(0) + a; //BUG!!! 1.0f + a;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tT fSin = sqrt(T(1) - fCos * fCos);\r\n\t\t\tT fAngle = atan(fSin, fCos);\r\n\t\t\tT fOneOverSin = static_cast<T>(1) / fSin;\r\n\t\t\tk0 = sin((T(1) - a) * fAngle) * fOneOverSin;\r\n\t\t\tk1 = sin((T(0) + a) * fAngle) * fOneOverSin;\r\n\t\t}\r\n\r\n\t\treturn detail::tquat<T, P>(\r\n\t\t\tk0 * x.w + k1 * y2.w,\r\n\t\t\tk0 * x.x + k1 * y2.x,\r\n\t\t\tk0 * x.y + k1 * y2.y,\r\n\t\t\tk0 * x.z + k1 * y2.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> fastMix\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y,\r\n\t\tT const & a\r\n\t)\r\n\t{\r\n\t\treturn glm::normalize(x * (T(1) - a) + (y * a));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> rotation\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & orig,\r\n\t\tdetail::tvec3<T, P> const & dest\r\n\t)\r\n\t{\r\n\t\tT cosTheta = dot(orig, dest);\r\n\t\tdetail::tvec3<T, P> rotationAxis;\r\n\r\n\t\tif(cosTheta < T(-1) + epsilon<T>())\r\n\t\t{\r\n\t\t\t// special case when vectors in opposite directions :\r\n\t\t\t// there is no \"ideal\" rotation axis\r\n\t\t\t// So guess one; any will do as long as it's perpendicular to start\r\n\t\t\t// This implementation favors a rotation around the Up axis (Y),\r\n\t\t\t// since it's often what you want to do.\r\n\t\t\trotationAxis = cross(detail::tvec3<T, P>(0, 0, 1), orig);\r\n\t\t\tif(length2(rotationAxis) < epsilon<T>()) // bad luck, they were parallel, try again!\r\n\t\t\t\trotationAxis = cross(detail::tvec3<T, P>(1, 0, 0), orig);\r\n\r\n\t\t\trotationAxis = normalize(rotationAxis);\r\n\t\t\treturn angleAxis(pi<T>(), rotationAxis);\r\n\t\t}\r\n\r\n\t\t// Implementation from Stan Melax's Game Programming Gems 1 article\r\n\t\trotationAxis = cross(orig, dest);\r\n\r\n\t\tT s = sqrt((T(1) + cosTheta) * T(2));\r\n\t\tT invs = static_cast<T>(1) / s;\r\n\r\n\t\treturn detail::tquat<T, P>(\r\n\t\t\ts * T(0.5f), \r\n\t\t\trotationAxis.x * invs,\r\n\t\t\trotationAxis.y * invs,\r\n\t\t\trotationAxis.z * invs);\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/random.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#if(defined(GLM_MESSAGES))\r\n#\tpragma message(\"GLM: GLM_GTX_random extension is deprecated, include GLM_GTC_random instead\")\r\n#endif\r\n\r\n// Promoted:\r\n#include \"../gtc/random.hpp\"\r\n"
  },
  {
    "path": "cpu/glm/gtx/raw_data.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_raw_data\r\n/// @file glm/gtx/raw_data.hpp\r\n/// @date 2008-11-19 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_raw_data GLM_GTX_raw_data\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Projection of a vector to other one\r\n/// \r\n/// <glm/gtx/raw_data.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_raw_data\r\n#define GLM_GTX_raw_data\r\n\r\n// Dependencies\r\n#include \"../detail/setup.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_raw_data extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_raw_data\r\n\t/// @{\r\n\r\n\t//! Type for byte numbers. \r\n\t//! From GLM_GTX_raw_data extension.\r\n\ttypedef detail::uint8\t\tbyte;\r\n\r\n\t//! Type for word numbers. \r\n\t//! From GLM_GTX_raw_data extension.\r\n\ttypedef detail::uint16\t\tword;\r\n\r\n\t//! Type for dword numbers. \r\n\t//! From GLM_GTX_raw_data extension.\r\n\ttypedef detail::uint32\t\tdword;\r\n\r\n\t//! Type for qword numbers. \r\n\t//! From GLM_GTX_raw_data extension.\r\n\ttypedef detail::uint64\t\tqword;\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"raw_data.inl\"\r\n\r\n#endif//GLM_GTX_raw_data\r\n"
  },
  {
    "path": "cpu/glm/gtx/raw_data.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2008-11-19\r\n// Updated : 2008-11-19\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/raw_data.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Dependency:\r\n// - GLM core\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n"
  },
  {
    "path": "cpu/glm/gtx/reciprocal.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#if(defined(GLM_MESSAGES))\r\n#\tpragma message(\"GLM: GLM_GTX_reciprocal extension is deprecated, include GLM_GTC_reciprocal instead\")\r\n#endif\r\n"
  },
  {
    "path": "cpu/glm/gtx/rotate_normalized_axis.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_rotate_normalized_axis\r\n/// @file glm/gtx/rotate_normalized_axis.hpp\r\n/// @date 2012-12-13 / 2012-12-13\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_matrix_transform\r\n/// @see gtc_quaternion\r\n/// \r\n/// @defgroup gtx_rotate_normalized_axis GLM_GTX_rotate_normalized_axis\r\n/// @ingroup gtc\r\n/// \r\n/// @brief Quaternions and matrices rotations around normalized axis.\r\n/// \r\n/// <glm/gtx/rotate_normalized_axis.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_rotate_normalized_axis\r\n#define GLM_GTX_rotate_normalized_axis\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtc/epsilon.hpp\"\r\n#include \"../gtc/quaternion.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_rotate_normalized_axis extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_rotate_normalized_axis\r\n\t/// @{\r\n\r\n\t/// Builds a rotation 4 * 4 matrix created from a normalized axis and an angle. \r\n\t/// \r\n\t/// @param m Input matrix multiplied by this rotation matrix.\r\n\t/// @param angle Rotation angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.\r\n\t/// @param axis Rotation axis, must be normalized.\r\n\t/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.\r\n\t/// \r\n\t/// @see gtx_rotate_normalized_axis\r\n\t/// @see - rotate(T angle, T x, T y, T z) \r\n\t/// @see - rotate(detail::tmat4x4<T, P> const & m, T angle, T x, T y, T z) \r\n\t/// @see - rotate(T angle, detail::tvec3<T, P> const & v) \r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> rotateNormalizedAxis(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & axis);\r\n\r\n\t/// Rotates a quaternion from a vector of 3 components normalized axis and an angle.\r\n\t/// \r\n\t/// @param q Source orientation\r\n\t/// @param angle Angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.\r\n\t/// @param axis Normalized axis of the rotation, must be normalized.\r\n\t/// \r\n\t/// @see gtx_rotate_normalized_axis\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tquat<T, P> rotateNormalizedAxis(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & axis);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"rotate_normalized_axis.inl\"\r\n\r\n#endif//GLM_GTX_rotate_normalized_axis\r\n"
  },
  {
    "path": "cpu/glm/gtx/rotate_normalized_axis.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_rotate_normalized_axis\r\n/// @file glm/gtx/rotate_normalized_axis.inl\r\n/// @date 2012-12-13 / 2012-12-13\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> rotateNormalizedAxis\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT a = angle;\r\n#else\r\n#\t\tpragma message(\"GLM: rotateNormalizedAxis function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT a = radians(angle);\r\n#endif\r\n\t\tT c = cos(a);\r\n\t\tT s = sin(a);\r\n\r\n\t\tdetail::tvec3<T, P> axis = v;\r\n\r\n\t\tdetail::tvec3<T, P> temp = (T(1) - c) * axis;\r\n\r\n\t\tdetail::tmat4x4<T, P> Rotate(detail::tmat4x4<T, P>::_null);\r\n\t\tRotate[0][0] = c + temp[0] * axis[0];\r\n\t\tRotate[0][1] = 0 + temp[0] * axis[1] + s * axis[2];\r\n\t\tRotate[0][2] = 0 + temp[0] * axis[2] - s * axis[1];\r\n\r\n\t\tRotate[1][0] = 0 + temp[1] * axis[0] - s * axis[2];\r\n\t\tRotate[1][1] = c + temp[1] * axis[1];\r\n\t\tRotate[1][2] = 0 + temp[1] * axis[2] + s * axis[0];\r\n\r\n\t\tRotate[2][0] = 0 + temp[2] * axis[0] + s * axis[1];\r\n\t\tRotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0];\r\n\t\tRotate[2][2] = c + temp[2] * axis[2];\r\n\r\n\t\tdetail::tmat4x4<T, P> Result(detail::tmat4x4<T, P>::_null);\r\n\t\tResult[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2];\r\n\t\tResult[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2];\r\n\t\tResult[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2];\r\n\t\tResult[3] = m[3];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> rotateNormalizedAxis\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q, \r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> Tmp = v;\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const AngleRad(angle);\r\n#else\r\n#\t\tpragma message(\"GLM: rotateNormalizedAxis function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const AngleRad = radians(angle);\r\n#endif\r\n\t\tT const Sin = sin(AngleRad * T(0.5));\r\n\r\n\t\treturn q * detail::tquat<T, P>(cos(AngleRad * static_cast<T>(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin);\r\n\t\t//return gtc::quaternion::cross(q, detail::tquat<T, P>(cos(AngleRad * T(0.5)), Tmp.x * fSin, Tmp.y * fSin, Tmp.z * fSin));\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/rotate_vector.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_rotate_vector\r\n/// @file glm/gtx/rotate_vector.hpp\r\n/// @date 2006-11-02 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_transform (dependence)\r\n///\r\n/// @defgroup gtx_rotate_vector GLM_GTX_rotate_vector\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Function to directly rotate a vector\r\n/// \r\n/// <glm/gtx/rotate_vector.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_rotate_vector\r\n#define GLM_GTX_rotate_vector\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtx/transform.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_rotate_vector extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_rotate_vector\r\n\t/// @{\r\n\r\n\t//! Rotate a two dimensional vector.\r\n\t//! From GLM_GTX_rotate_vector extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec2<T, P> rotate(\r\n\t\tdetail::tvec2<T, P> const & v,\r\n\t\tT const & angle);\r\n\t\t\r\n\t//! Rotate a three dimensional vector around an axis.\r\n\t//! From GLM_GTX_rotate_vector extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> rotate(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & normal);\r\n\t\t\r\n\t//! Rotate a four dimensional vector around an axis.\r\n\t//! From GLM_GTX_rotate_vector extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec4<T, P> rotate(\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & normal);\r\n\t\t\r\n\t//! Rotate a three dimensional vector around the X axis.\r\n\t//! From GLM_GTX_rotate_vector extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> rotateX(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tT const & angle);\r\n\r\n\t//! Rotate a three dimensional vector around the Y axis.\r\n\t//! From GLM_GTX_rotate_vector extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> rotateY(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tT const & angle);\r\n\t\t\r\n\t//! Rotate a three dimensional vector around the Z axis.\r\n\t//! From GLM_GTX_rotate_vector extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> rotateZ(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tT const & angle);\r\n\t\t\r\n\t//! Rotate a four dimentionnals vector around the X axis.\r\n\t//! From GLM_GTX_rotate_vector extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec4<T, P> rotateX(\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tT const & angle);\r\n\t\t\r\n\t//! Rotate a four dimensional vector around the X axis.\r\n\t//! From GLM_GTX_rotate_vector extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec4<T, P> rotateY(\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tT const & angle);\r\n\t\t\r\n\t//! Rotate a four dimensional vector around the X axis.\r\n\t//! From GLM_GTX_rotate_vector extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec4<T, P> rotateZ(\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tT const & angle);\r\n\t\t\r\n\t//! Build a rotation matrix from a normal and a up vector.\r\n\t//! From GLM_GTX_rotate_vector extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> orientation(\r\n\t\tdetail::tvec3<T, P> const & Normal,\r\n\t\tdetail::tvec3<T, P> const & Up);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"rotate_vector.inl\"\r\n\r\n#endif//GLM_GTX_rotate_vector\r\n"
  },
  {
    "path": "cpu/glm/gtx/rotate_vector.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2006-11-02\r\n// Updated : 2009-02-19\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/rotate_vector.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> rotate\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & v,\r\n\t\tT const & angle\r\n\t)\r\n\t{\r\n\t\tdetail::tvec2<T, P> Result;\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const Cos(cos(angle));\r\n\t\tT const Sin(sin(angle));\r\n#else\r\n#\t\tpragma message(\"GLM: rotate function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const Cos = cos(radians(angle));\r\n\t\tT const Sin = sin(radians(angle));\r\n#endif\r\n\t\tResult.x = v.x * Cos - v.y * Sin;\r\n\t\tResult.y = v.x * Sin + v.y * Cos;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> rotate\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & normal\r\n\t)\r\n\t{\r\n\t\treturn detail::tmat3x3<T, P>(glm::rotate(angle, normal)) * v;\r\n\t}\r\n\t/*\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> rotateGTX(\r\n\t\tconst detail::tvec3<T, P>& x,\r\n\t\tT angle,\r\n\t\tconst detail::tvec3<T, P>& normal)\r\n\t{\r\n\t\tconst T Cos = cos(radians(angle));\r\n\t\tconst T Sin = sin(radians(angle));\r\n\t\treturn x * Cos + ((x * normal) * (T(1) - Cos)) * normal + cross(x, normal) * Sin;\r\n\t}\r\n\t*/\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> rotate\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & normal\r\n\t)\r\n\t{\r\n\t\treturn rotate(angle, normal) * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> rotateX\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tT const & angle\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> Result(v);\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const Cos(cos(angle));\r\n\t\tT const Sin(sin(angle));\r\n#else\r\n#\t\tpragma message(\"GLM: rotateX function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const Cos = cos(radians(angle));\r\n\t\tT const Sin = sin(radians(angle));\r\n#endif\r\n\r\n\t\tResult.y = v.y * Cos - v.z * Sin;\r\n\t\tResult.z = v.y * Sin + v.z * Cos;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> rotateY\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tT const & angle\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> Result = v;\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const Cos(cos(angle));\r\n\t\tT const Sin(sin(angle));\r\n#else\r\n#\t\tpragma message(\"GLM: rotateY function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const Cos(cos(radians(angle)));\r\n\t\tT const Sin(sin(radians(angle)));\r\n#endif\r\n\r\n\t\tResult.x =  v.x * Cos + v.z * Sin;\r\n\t\tResult.z = -v.x * Sin + v.z * Cos;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> rotateZ\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tT const & angle\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> Result = v;\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const Cos(cos(angle));\r\n\t\tT const Sin(sin(angle));\r\n#else\r\n#\t\tpragma message(\"GLM: rotateZ function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const Cos(cos(radians(angle)));\r\n\t\tT const Sin(sin(radians(angle)));\r\n#endif\r\n\r\n\t\tResult.x = v.x * Cos - v.y * Sin;\r\n\t\tResult.y = v.x * Sin + v.y * Cos;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> rotateX\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tT const & angle\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<T, P> Result = v;\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const Cos(cos(angle));\r\n\t\tT const Sin(sin(angle));\r\n#else\r\n#\t\tpragma message(\"GLM: rotateX function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const Cos(cos(radians(angle)));\r\n\t\tT const Sin(sin(radians(angle)));\r\n#endif\r\n\r\n\t\tResult.y = v.y * Cos - v.z * Sin;\r\n\t\tResult.z = v.y * Sin + v.z * Cos;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> rotateY\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tT const & angle\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<T, P> Result = v;\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const Cos(cos(angle));\r\n\t\tT const Sin(sin(angle));\r\n#else\r\n#\t\tpragma message(\"GLM: rotateX function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const Cos(cos(radians(angle)));\r\n\t\tT const Sin(sin(radians(angle)));\r\n#endif\r\n\r\n\t\tResult.x =  v.x * Cos + v.z * Sin;\r\n\t\tResult.z = -v.x * Sin + v.z * Cos;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> rotateZ\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tT const & angle\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<T, P> Result = v;\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const Cos(cos(angle));\r\n\t\tT const Sin(sin(angle));\r\n#else\r\n#\t\tpragma message(\"GLM: rotateZ function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const Cos(cos(radians(angle)));\r\n\t\tT const Sin(sin(radians(angle)));\r\n#endif\r\n\r\n\t\tResult.x = v.x * Cos - v.y * Sin;\r\n\t\tResult.y = v.x * Sin + v.y * Cos;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> orientation\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & Normal,\r\n\t\tdetail::tvec3<T, P> const & Up\r\n\t)\r\n\t{\r\n\t\tif(all(equal(Normal, Up)))\r\n\t\t\treturn detail::tmat4x4<T, P>(T(1));\r\n\r\n\t\tdetail::tvec3<T, P> RotationAxis = cross(Up, Normal);\r\n#\t\tifdef GLM_FORCE_RADIANS\r\n\t\t\tT Angle = acos(dot(Normal, Up));\r\n#\t\telse\r\n#\t\t\tpragma message(\"GLM: rotateZ function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\t\tT Angle = degrees(acos(dot(Normal, Up)));\r\n#\t\tendif\r\n\t\treturn rotate(Angle, RotationAxis);\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/scalar_relational.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_scalar_relational\r\n/// @file glm/gtx/scalar_relational.hpp\r\n/// @date 2013-02-04 / 2013-02-04\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_extend GLM_GTX_scalar_relational\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Extend a position from a source to a position at a defined length.\r\n/// \r\n/// <glm/gtx/scalar_relational.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_scalar_relational\r\n#define GLM_GTX_scalar_relational\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_extend extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_scalar_relational\r\n\t/// @{\r\n\r\n\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"scalar_relational.inl\"\r\n\r\n#endif//GLM_GTX_scalar_relational\r\n"
  },
  {
    "path": "cpu/glm/gtx/scalar_relational.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2013-02-04\r\n// Updated : 2013-02-04\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/scalar_relational.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER bool lessThan\r\n\t(\r\n\t\tT const & x, \r\n\t\tT const & y\r\n\t)\r\n\t{\r\n\t\treturn x < y;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER bool lessThanEqual\r\n\t(\r\n\t\tT const & x, \r\n\t\tT const & y\r\n\t)\r\n\t{\r\n\t\treturn x <= y;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER bool greaterThan\r\n\t(\r\n\t\tT const & x, \r\n\t\tT const & y\r\n\t)\r\n\t{\r\n\t\treturn x > y;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER bool greaterThanEqual\r\n\t(\r\n\t\tT const & x, \r\n\t\tT const & y\r\n\t)\r\n\t{\r\n\t\treturn x >= y;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER bool equal\r\n\t(\r\n\t\tT const & x, \r\n\t\tT const & y\r\n\t)\r\n\t{\r\n\t\treturn x == y;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER bool notEqual\r\n\t(\r\n\t\tT const & x, \r\n\t\tT const & y\r\n\t)\r\n\t{\r\n\t\treturn x != y;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER bool any\r\n\t(\r\n\t\tbool const & x\r\n\t)\r\n\t{\r\n\t\treturn x;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER bool all\r\n\t(\r\n\t\tbool const & x\r\n\t)\r\n\t{\r\n\t\treturn x;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER bool not_\r\n\t(\r\n\t\tbool const & x\r\n\t)\r\n\t{\r\n\t\treturn !x;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/simd_mat4.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_simd_vec4\r\n/// @file glm/gtx/simd_vec4.hpp\r\n/// @date 2009-05-07 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_simd_mat4 GLM_GTX_simd_mat4\r\n/// @ingroup gtx\r\n/// \r\n/// @brief SIMD implementation of mat4 type.\r\n/// \r\n/// <glm/gtx/simd_mat4.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_simd_mat4\r\n#define GLM_GTX_simd_mat4\r\n\r\n// Dependencies\r\n#include \"../detail/setup.hpp\"\r\n\r\n#if(GLM_ARCH != GLM_ARCH_PURE)\r\n\r\n#if(GLM_ARCH & GLM_ARCH_SSE2)\r\n#\tinclude \"../detail/intrinsic_matrix.hpp\"\r\n#\tinclude \"../gtx/simd_vec4.hpp\"\r\n#else\r\n#\terror \"GLM: GLM_GTX_simd_mat4 requires compiler support of SSE2 through intrinsics\"\r\n#endif\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_simd_mat4 extension included\")\r\n#endif\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\t/// 4x4 Matrix implemented using SIMD SEE intrinsics.\r\n\t/// \\ingroup gtx_simd_mat4\r\n\tGLM_ALIGNED_STRUCT(16) fmat4x4SIMD\r\n\t{\r\n\t\tenum ctor{_null};\r\n\t\ttypedef float value_type;\r\n\t\ttypedef fvec4SIMD col_type;\r\n\t\ttypedef fvec4SIMD row_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\ttypedef fmat4x4SIMD type;\r\n\t\ttypedef fmat4x4SIMD transpose_type;\r\n\r\n\t\tGLM_FUNC_DECL length_t length() const;\r\n\r\n\t\tfvec4SIMD Data[4];\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Constructors\r\n\r\n\t\tfmat4x4SIMD();\r\n\t\texplicit fmat4x4SIMD(float const & s);\r\n\t\texplicit fmat4x4SIMD(\r\n\t\t\tfloat const & x0, float const & y0, float const & z0, float const & w0,\r\n\t\t\tfloat const & x1, float const & y1, float const & z1, float const & w1,\r\n\t\t\tfloat const & x2, float const & y2, float const & z2, float const & w2,\r\n\t\t\tfloat const & x3, float const & y3, float const & z3, float const & w3);\r\n\t\texplicit fmat4x4SIMD(\r\n\t\t\tfvec4SIMD const & v0,\r\n\t\t\tfvec4SIMD const & v1,\r\n\t\t\tfvec4SIMD const & v2,\r\n\t\t\tfvec4SIMD const & v3);\r\n\t\texplicit fmat4x4SIMD(\r\n\t\t\tmat4x4 const & m);\r\n\t\texplicit fmat4x4SIMD(\r\n\t\t\t__m128 const in[4]);\r\n\r\n\t\t// Conversions\r\n\t\t//template <typename U> \r\n\t\t//explicit tmat4x4(tmat4x4<U> const & m);\r\n\r\n\t\t//explicit tmat4x4(tmat2x2<T> const & x);\r\n\t\t//explicit tmat4x4(tmat3x3<T> const & x);\r\n\t\t//explicit tmat4x4(tmat2x3<T> const & x);\r\n\t\t//explicit tmat4x4(tmat3x2<T> const & x);\r\n\t\t//explicit tmat4x4(tmat2x4<T> const & x);\r\n\t\t//explicit tmat4x4(tmat4x2<T> const & x);\r\n\t\t//explicit tmat4x4(tmat3x4<T> const & x);\r\n\t\t//explicit tmat4x4(tmat4x3<T> const & x);\r\n\r\n\t\t// Accesses\r\n\t\tfvec4SIMD & operator[](length_t i);\r\n\t\tfvec4SIMD const & operator[](length_t i) const;\r\n\r\n\t\t// Unary updatable operators\r\n\t\tfmat4x4SIMD & operator= (fmat4x4SIMD const & m);\r\n\t\tfmat4x4SIMD & operator+= (float const & s);\r\n\t\tfmat4x4SIMD & operator+= (fmat4x4SIMD const & m);\r\n\t\tfmat4x4SIMD & operator-= (float const & s);\r\n\t\tfmat4x4SIMD & operator-= (fmat4x4SIMD const & m);\r\n\t\tfmat4x4SIMD & operator*= (float const & s);\r\n\t\tfmat4x4SIMD & operator*= (fmat4x4SIMD const & m);\r\n\t\tfmat4x4SIMD & operator/= (float const & s);\r\n\t\tfmat4x4SIMD & operator/= (fmat4x4SIMD const & m);\r\n\t\tfmat4x4SIMD & operator++ ();\r\n\t\tfmat4x4SIMD & operator-- ();\r\n\t};\r\n\r\n\t// Binary operators\r\n\tfmat4x4SIMD operator+ (fmat4x4SIMD const & m, float const & s);\r\n\tfmat4x4SIMD operator+ (float const & s, fmat4x4SIMD const & m);\r\n\tfmat4x4SIMD operator+ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);\r\n\r\n\tfmat4x4SIMD operator- (fmat4x4SIMD const & m, float const & s);\r\n\tfmat4x4SIMD operator- (float const & s, fmat4x4SIMD const & m);\r\n\tfmat4x4SIMD operator- (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);\r\n\r\n\tfmat4x4SIMD operator* (fmat4x4SIMD const & m, float const & s);\r\n\tfmat4x4SIMD operator* (float const & s, fmat4x4SIMD const & m);\r\n\r\n\tfvec4SIMD operator* (fmat4x4SIMD const & m, fvec4SIMD const & v);\r\n\tfvec4SIMD operator* (fvec4SIMD const & v, fmat4x4SIMD const & m);\r\n\r\n\tfmat4x4SIMD operator* (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);\r\n\r\n\tfmat4x4SIMD operator/ (fmat4x4SIMD const & m, float const & s);\r\n\tfmat4x4SIMD operator/ (float const & s, fmat4x4SIMD const & m);\r\n\r\n\tfvec4SIMD operator/ (fmat4x4SIMD const & m, fvec4SIMD const & v);\r\n\tfvec4SIMD operator/ (fvec4SIMD const & v, fmat4x4SIMD const & m);\r\n\r\n\tfmat4x4SIMD operator/ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);\r\n\r\n\t// Unary constant operators\r\n\tfmat4x4SIMD const operator-  (fmat4x4SIMD const & m);\r\n\tfmat4x4SIMD const operator-- (fmat4x4SIMD const & m, int);\r\n\tfmat4x4SIMD const operator++ (fmat4x4SIMD const & m, int);\r\n}//namespace detail\r\n\r\n\ttypedef detail::fmat4x4SIMD simdMat4;\r\n\r\n\t/// @addtogroup gtx_simd_mat4\r\n\t/// @{\r\n\r\n\t//! Convert a simdMat4 to a mat4.\r\n\t//! (From GLM_GTX_simd_mat4 extension)\r\n\tmat4 mat4_cast(\r\n\t\tdetail::fmat4x4SIMD const & x);\r\n\r\n\t//! Multiply matrix x by matrix y component-wise, i.e.,\r\n\t//! result[i][j] is the scalar product of x[i][j] and y[i][j].\r\n\t//! (From GLM_GTX_simd_mat4 extension).\r\n\tdetail::fmat4x4SIMD matrixCompMult(\r\n\t\tdetail::fmat4x4SIMD const & x,\r\n\t\tdetail::fmat4x4SIMD const & y);\r\n\r\n\t//! Treats the first parameter c as a column vector\r\n\t//! and the second parameter r as a row vector\r\n\t//! and does a linear algebraic matrix multiply c * r.\r\n\t//! (From GLM_GTX_simd_mat4 extension).\r\n\tdetail::fmat4x4SIMD outerProduct(\r\n\t\tdetail::fvec4SIMD const & c,\r\n\t\tdetail::fvec4SIMD const & r);\r\n\r\n\t//! Returns the transposed matrix of x\r\n\t//! (From GLM_GTX_simd_mat4 extension).\r\n\tdetail::fmat4x4SIMD transpose(\r\n\t\tdetail::fmat4x4SIMD const & x);\r\n\r\n\t//! Return the determinant of a mat4 matrix.\r\n\t//! (From GLM_GTX_simd_mat4 extension).\r\n\tfloat determinant(\r\n\t\tdetail::fmat4x4SIMD const & m);\r\n\r\n\t//! Return the inverse of a mat4 matrix.\r\n\t//! (From GLM_GTX_simd_mat4 extension).\r\n\tdetail::fmat4x4SIMD inverse(\r\n\t\tdetail::fmat4x4SIMD const & m);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"simd_mat4.inl\"\r\n\r\n#endif//(GLM_ARCH != GLM_ARCH_PURE)\r\n\r\n#endif//GLM_GTX_simd_mat4\r\n"
  },
  {
    "path": "cpu/glm/gtx/simd_mat4.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2009-05-19\r\n// Updated : 2009-05-19\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/simd_mat4.hpp\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail{\r\n\r\nGLM_FUNC_QUALIFIER length_t fmat4x4SIMD::length() const\r\n{\r\n\treturn 4;\r\n}\r\n\r\n//////////////////////////////////////\r\n// Accesses\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD & fmat4x4SIMD::operator[]\r\n(\r\n\tlength_t i\r\n)\r\n{\r\n\tassert(i < this->length());\r\n\r\n\treturn this->Data[i];\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD const & fmat4x4SIMD::operator[]\r\n(\r\n\tlength_t i\r\n) const\r\n{\r\n\tassert(i < this->length());\r\n\r\n\treturn this->Data[i];\r\n}\r\n\r\n//////////////////////////////////////////////////////////////\r\n// Constructors\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD()\r\n{\r\n#ifndef GLM_SIMD_ENABLE_DEFAULT_INIT\r\n\tthis->Data[0] = fvec4SIMD(1.0f, 0, 0, 0);\r\n\tthis->Data[1] = fvec4SIMD(0, 1.0f, 0, 0);\r\n\tthis->Data[2] = fvec4SIMD(0, 0, 1.0f, 0);\r\n\tthis->Data[3] = fvec4SIMD(0, 0, 0, 1.0f);\r\n#endif\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD(float const & s)\r\n{\r\n\tthis->Data[0] = fvec4SIMD(s, 0, 0, 0);\r\n\tthis->Data[1] = fvec4SIMD(0, s, 0, 0);\r\n\tthis->Data[2] = fvec4SIMD(0, 0, s, 0);\r\n\tthis->Data[3] = fvec4SIMD(0, 0, 0, s);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD\r\n(\r\n\tfloat const & x0, float const & y0, float const & z0, float const & w0,\r\n\tfloat const & x1, float const & y1, float const & z1, float const & w1,\r\n\tfloat const & x2, float const & y2, float const & z2, float const & w2,\r\n\tfloat const & x3, float const & y3, float const & z3, float const & w3\r\n)\r\n{\r\n\tthis->Data[0] = fvec4SIMD(x0, y0, z0, w0);\r\n\tthis->Data[1] = fvec4SIMD(x1, y1, z1, w1);\r\n\tthis->Data[2] = fvec4SIMD(x2, y2, z2, w2);\r\n\tthis->Data[3] = fvec4SIMD(x3, y3, z3, w3);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD\r\n(\r\n\tfvec4SIMD const & v0,\r\n\tfvec4SIMD const & v1,\r\n\tfvec4SIMD const & v2,\r\n\tfvec4SIMD const & v3\r\n)\r\n{\r\n\tthis->Data[0] = v0;\r\n\tthis->Data[1] = v1;\r\n\tthis->Data[2] = v2;\r\n\tthis->Data[3] = v3;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD\r\n(\r\n\tmat4 const & m\r\n)\r\n{\r\n\tthis->Data[0] = fvec4SIMD(m[0]);\r\n\tthis->Data[1] = fvec4SIMD(m[1]);\r\n\tthis->Data[2] = fvec4SIMD(m[2]);\r\n\tthis->Data[3] = fvec4SIMD(m[3]);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD\r\n(\r\n\t__m128 const in[4]\r\n)\r\n{\r\n\tthis->Data[0] = in[0];\r\n\tthis->Data[1] = in[1];\r\n\tthis->Data[2] = in[2];\r\n\tthis->Data[3] = in[3];\r\n}\r\n\r\n//////////////////////////////////////////////////////////////\r\n// mat4 operators\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD& fmat4x4SIMD::operator= \r\n(\r\n\tfmat4x4SIMD const & m\r\n)\r\n{\r\n\tthis->Data[0] = m[0];\r\n\tthis->Data[1] = m[1];\r\n\tthis->Data[2] = m[2];\r\n\tthis->Data[3] = m[3];\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator+= \r\n(\r\n\tfmat4x4SIMD const & m\r\n)\r\n{\r\n\tthis->Data[0].Data = _mm_add_ps(this->Data[0].Data, m[0].Data);\r\n\tthis->Data[1].Data = _mm_add_ps(this->Data[1].Data, m[1].Data);\r\n\tthis->Data[2].Data = _mm_add_ps(this->Data[2].Data, m[2].Data);\r\n\tthis->Data[3].Data = _mm_add_ps(this->Data[3].Data, m[3].Data);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-= \r\n(\r\n\tfmat4x4SIMD const & m\r\n)\r\n{\r\n\tthis->Data[0].Data = _mm_sub_ps(this->Data[0].Data, m[0].Data);\r\n\tthis->Data[1].Data = _mm_sub_ps(this->Data[1].Data, m[1].Data);\r\n\tthis->Data[2].Data = _mm_sub_ps(this->Data[2].Data, m[2].Data);\r\n\tthis->Data[3].Data = _mm_sub_ps(this->Data[3].Data, m[3].Data);\r\n\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator*= \r\n(\r\n\tfmat4x4SIMD const & m\r\n)\r\n{\r\n\tsse_mul_ps(&this->Data[0].Data, &m.Data[0].Data, &this->Data[0].Data);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator/= \r\n(\r\n\tfmat4x4SIMD const & m\r\n)\r\n{\r\n\t__m128 Inv[4];\r\n\tsse_inverse_ps(&m.Data[0].Data, Inv);\r\n\tsse_mul_ps(&this->Data[0].Data, Inv, &this->Data[0].Data);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator+= \r\n(\r\n\tfloat const & s\r\n)\r\n{\r\n\t__m128 Operand = _mm_set_ps1(s);\r\n\tthis->Data[0].Data = _mm_add_ps(this->Data[0].Data, Operand);\r\n\tthis->Data[1].Data = _mm_add_ps(this->Data[1].Data, Operand);\r\n\tthis->Data[2].Data = _mm_add_ps(this->Data[2].Data, Operand);\r\n\tthis->Data[3].Data = _mm_add_ps(this->Data[3].Data, Operand);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-= \r\n(\r\n\tfloat const & s\r\n)\r\n{\r\n\t__m128 Operand = _mm_set_ps1(s);\r\n\tthis->Data[0].Data = _mm_sub_ps(this->Data[0].Data, Operand);\r\n\tthis->Data[1].Data = _mm_sub_ps(this->Data[1].Data, Operand);\r\n\tthis->Data[2].Data = _mm_sub_ps(this->Data[2].Data, Operand);\r\n\tthis->Data[3].Data = _mm_sub_ps(this->Data[3].Data, Operand);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator*= \r\n(\r\n\tfloat const & s\r\n)\r\n{\r\n\t__m128 Operand = _mm_set_ps1(s);\r\n\tthis->Data[0].Data = _mm_mul_ps(this->Data[0].Data, Operand);\r\n\tthis->Data[1].Data = _mm_mul_ps(this->Data[1].Data, Operand);\r\n\tthis->Data[2].Data = _mm_mul_ps(this->Data[2].Data, Operand);\r\n\tthis->Data[3].Data = _mm_mul_ps(this->Data[3].Data, Operand);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator/= \r\n(\r\n\tfloat const & s\r\n)\r\n{\r\n\t__m128 Operand = _mm_div_ps(one, _mm_set_ps1(s));\r\n\tthis->Data[0].Data = _mm_mul_ps(this->Data[0].Data, Operand);\r\n\tthis->Data[1].Data = _mm_mul_ps(this->Data[1].Data, Operand);\r\n\tthis->Data[2].Data = _mm_mul_ps(this->Data[2].Data, Operand);\r\n\tthis->Data[3].Data = _mm_mul_ps(this->Data[3].Data, Operand);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator++ ()\r\n{\r\n\tthis->Data[0].Data = _mm_add_ps(this->Data[0].Data, one);\r\n\tthis->Data[1].Data = _mm_add_ps(this->Data[1].Data, one);\r\n\tthis->Data[2].Data = _mm_add_ps(this->Data[2].Data, one);\r\n\tthis->Data[3].Data = _mm_add_ps(this->Data[3].Data, one);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-- ()\r\n{\r\n\tthis->Data[0].Data = _mm_sub_ps(this->Data[0].Data, one);\r\n\tthis->Data[1].Data = _mm_sub_ps(this->Data[1].Data, one);\r\n\tthis->Data[2].Data = _mm_sub_ps(this->Data[2].Data, one);\r\n\tthis->Data[3].Data = _mm_sub_ps(this->Data[3].Data, one);\r\n\treturn *this;\r\n}\r\n\r\n\r\n//////////////////////////////////////////////////////////////\r\n// Binary operators\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator+\r\n(\r\n\tconst fmat4x4SIMD &m,\r\n\tfloat const & s\r\n)\r\n{\r\n\treturn detail::fmat4x4SIMD\r\n\t(\r\n\t\tm[0] + s,\r\n\t\tm[1] + s,\r\n\t\tm[2] + s,\r\n\t\tm[3] + s\r\n\t);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator+\r\n(\r\n\tfloat const & s,\r\n\tconst fmat4x4SIMD &m\r\n)\r\n{\r\n\treturn detail::fmat4x4SIMD\r\n\t(\r\n\t\tm[0] + s,\r\n\t\tm[1] + s,\r\n\t\tm[2] + s,\r\n\t\tm[3] + s\r\n\t);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator+\r\n(\r\n    const fmat4x4SIMD &m1,\r\n    const fmat4x4SIMD &m2\r\n)\r\n{\r\n    return detail::fmat4x4SIMD\r\n    (\r\n        m1[0] + m2[0],\r\n        m1[1] + m2[1],\r\n        m1[2] + m2[2],\r\n        m1[3] + m2[3]\r\n    );\r\n}\r\n\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator-\r\n(\r\n    const fmat4x4SIMD &m,\r\n    float const & s\r\n)\r\n{\r\n    return detail::fmat4x4SIMD\r\n    (\r\n        m[0] - s,\r\n        m[1] - s,\r\n        m[2] - s,\r\n        m[3] - s\r\n    );\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator-\r\n(\r\n    float const & s,\r\n    const fmat4x4SIMD &m\r\n)\r\n{\r\n    return detail::fmat4x4SIMD\r\n    (\r\n        s - m[0],\r\n        s - m[1],\r\n        s - m[2],\r\n        s - m[3]\r\n    );\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator-\r\n(\r\n    const fmat4x4SIMD &m1,\r\n    const fmat4x4SIMD &m2\r\n)\r\n{\r\n    return detail::fmat4x4SIMD\r\n    (\r\n        m1[0] - m2[0],\r\n        m1[1] - m2[1],\r\n        m1[2] - m2[2],\r\n        m1[3] - m2[3]\r\n    );\r\n}\r\n\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator*\r\n(\r\n    const fmat4x4SIMD &m,\r\n    float const & s\r\n)\r\n{\r\n    return detail::fmat4x4SIMD\r\n    (\r\n        m[0] * s,\r\n        m[1] * s,\r\n        m[2] * s,\r\n        m[3] * s\r\n    );\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator*\r\n(\r\n    float const & s,\r\n    const fmat4x4SIMD &m\r\n)\r\n{\r\n    return detail::fmat4x4SIMD\r\n    (\r\n        m[0] * s,\r\n        m[1] * s,\r\n        m[2] * s,\r\n        m[3] * s\r\n    );\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator*\r\n(\r\n    const fmat4x4SIMD &m,\r\n    fvec4SIMD const & v\r\n)\r\n{\r\n    return sse_mul_ps(&m.Data[0].Data, v.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator*\r\n(\r\n    fvec4SIMD const & v,\r\n    const fmat4x4SIMD &m\r\n)\r\n{\r\n    return sse_mul_ps(v.Data, &m.Data[0].Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator*\r\n(\r\n    const fmat4x4SIMD &m1,\r\n    const fmat4x4SIMD &m2\r\n)\r\n{\r\n    fmat4x4SIMD result;\r\n    sse_mul_ps(&m1.Data[0].Data, &m2.Data[0].Data, &result.Data[0].Data);\r\n    \r\n    return result;\r\n}\r\n    \r\n\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator/\r\n(\r\n    const fmat4x4SIMD &m,\r\n    float const & s\r\n)\r\n{\r\n    return detail::fmat4x4SIMD\r\n    (\r\n        m[0] / s,\r\n        m[1] / s,\r\n        m[2] / s,\r\n        m[3] / s\r\n    );\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator/\r\n(\r\n    float const & s,\r\n    const fmat4x4SIMD &m\r\n)\r\n{\r\n    return detail::fmat4x4SIMD\r\n    (\r\n        s / m[0],\r\n        s / m[1],\r\n        s / m[2],\r\n        s / m[3]\r\n    );\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fmat4x4SIMD inverse(detail::fmat4x4SIMD const & m)\r\n{\r\n\tdetail::fmat4x4SIMD result;\r\n\tdetail::sse_inverse_ps(&m[0].Data, &result[0].Data);\r\n\treturn result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator/\r\n(\r\n\tconst fmat4x4SIMD & m,\r\n\tfvec4SIMD const & v\r\n)\r\n{\r\n\treturn inverse(m) * v;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator/\r\n(\r\n\tfvec4SIMD const & v,\r\n\tconst fmat4x4SIMD &m\r\n)\r\n{\r\n\treturn v * inverse(m);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator/\r\n(\r\n\tconst fmat4x4SIMD &m1,\r\n\tconst fmat4x4SIMD &m2\r\n)\r\n{\r\n\t__m128 result[4];\r\n\t__m128 inv[4];\r\n\r\n\tsse_inverse_ps(&m2.Data[0].Data, inv);\r\n\tsse_mul_ps(&m1.Data[0].Data, inv, result);\r\n\r\n\treturn fmat4x4SIMD(result);\r\n}\r\n\r\n\r\n//////////////////////////////////////////////////////////////\r\n// Unary constant operators\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD const operator-\r\n(\r\n    fmat4x4SIMD const & m\r\n)\r\n{\r\n    return detail::fmat4x4SIMD\r\n    (\r\n        -m[0],\r\n        -m[1],\r\n        -m[2],\r\n        -m[3]\r\n    );\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD const operator--\r\n(\r\n    fmat4x4SIMD const & m,\r\n    int\r\n)\r\n{\r\n    return detail::fmat4x4SIMD\r\n    (\r\n        m[0] - 1.0f,\r\n        m[1] - 1.0f,\r\n        m[2] - 1.0f,\r\n        m[3] - 1.0f\r\n    );\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD const operator++\r\n(\r\n    fmat4x4SIMD const & m,\r\n    int\r\n)\r\n{\r\n    return detail::fmat4x4SIMD\r\n    (\r\n        m[0] + 1.0f,\r\n        m[1] + 1.0f,\r\n        m[2] + 1.0f,\r\n        m[3] + 1.0f\r\n    );\r\n}\r\n\r\n}//namespace detail\r\n\r\nGLM_FUNC_QUALIFIER mat4 mat4_cast\r\n(\r\n\tdetail::fmat4x4SIMD const & x\r\n)\r\n{\r\n\tGLM_ALIGN(16) mat4 Result;\r\n\t_mm_store_ps(&Result[0][0], x.Data[0].Data);\r\n\t_mm_store_ps(&Result[1][0], x.Data[1].Data);\r\n\t_mm_store_ps(&Result[2][0], x.Data[2].Data);\r\n\t_mm_store_ps(&Result[3][0], x.Data[3].Data);\r\n\treturn Result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fmat4x4SIMD matrixCompMult\r\n(\r\n\tdetail::fmat4x4SIMD const & x,\r\n\tdetail::fmat4x4SIMD const & y\r\n)\r\n{\r\n\tdetail::fmat4x4SIMD result;\r\n\tresult[0] = x[0] * y[0];\r\n\tresult[1] = x[1] * y[1];\r\n\tresult[2] = x[2] * y[2];\r\n\tresult[3] = x[3] * y[3];\r\n\treturn result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fmat4x4SIMD outerProduct\r\n(\r\n\tdetail::fvec4SIMD const & c,\r\n\tdetail::fvec4SIMD const & r\r\n)\r\n{\r\n\t__m128 Shu0 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 Shu1 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(1, 1, 1, 1));\r\n\t__m128 Shu2 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(2, 2, 2, 2));\r\n\t__m128 Shu3 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\tdetail::fmat4x4SIMD result(detail::fmat4x4SIMD::_null);\r\n\tresult[0].Data = _mm_mul_ps(c.Data, Shu0);\r\n\tresult[1].Data = _mm_mul_ps(c.Data, Shu1);\r\n\tresult[2].Data = _mm_mul_ps(c.Data, Shu2);\r\n\tresult[3].Data = _mm_mul_ps(c.Data, Shu3);\r\n\treturn result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fmat4x4SIMD transpose(detail::fmat4x4SIMD const & m)\r\n{\r\n\tdetail::fmat4x4SIMD result;\r\n\tdetail::sse_transpose_ps(&m[0].Data, &result[0].Data);\r\n\treturn result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER float determinant(detail::fmat4x4SIMD const & m)\r\n{\r\n\tfloat Result;\r\n\t_mm_store_ss(&Result, detail::sse_det_ps(&m[0].Data));\r\n\treturn Result;\r\n}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/simd_quat.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_simd_quat\r\n/// @file glm/gtx/simd_quat.hpp\r\n/// @date 2009-05-07 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_simd_vec4 GLM_GTX_simd_quat\r\n/// @ingroup gtx\r\n/// \r\n/// @brief SIMD implementation of quat type.\r\n/// \r\n/// <glm/gtx/simd_quat.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_simd_quat\r\n#define GLM_GTX_simd_quat\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtc/quaternion.hpp\"\r\n#include \"../gtx/fast_trigonometry.hpp\"\r\n\r\n#if(GLM_ARCH != GLM_ARCH_PURE)\r\n\r\n#if(GLM_ARCH & GLM_ARCH_SSE2)\r\n#\tinclude \"../core/intrinsic_common.hpp\"\r\n#\tinclude \"../core/intrinsic_geometric.hpp\"\r\n#   include \"../gtx/simd_mat4.hpp\"\r\n#else\r\n#\terror \"GLM: GLM_GTX_simd_quat requires compiler support of SSE2 through intrinsics\"\r\n#endif\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_simd_quat extension included\")\r\n#endif\r\n\r\n\r\n// Warning silencer for nameless struct/union.\r\n#if (GLM_COMPILER & GLM_COMPILER_VC)\r\n#   pragma warning(push)\r\n#   pragma warning(disable:4201)   // warning C4201: nonstandard extension used : nameless struct/union\r\n#endif\r\n\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\t/// Quaternion implemented using SIMD SEE intrinsics.\r\n\t/// \\ingroup gtx_simd_vec4\r\n\tGLM_ALIGNED_STRUCT(16) fquatSIMD\r\n\t{\r\n\t\tenum ctor{null};\r\n\t\ttypedef __m128 value_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\tstatic size_type value_size();\r\n\r\n\t\ttypedef fquatSIMD type;\r\n\t\ttypedef tquat<bool, defaultp> bool_type;\r\n\r\n#ifdef GLM_SIMD_ENABLE_XYZW_UNION\r\n        union\r\n        {\r\n\t\t    __m128 Data;\r\n            struct {float x, y, z, w;};\r\n        };\r\n#else\r\n        __m128 Data;\r\n#endif\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Implicit basic constructors\r\n\r\n\t\tfquatSIMD();\r\n\t\tfquatSIMD(__m128 const & Data);\r\n\t\tfquatSIMD(fquatSIMD const & q);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Explicit basic constructors\r\n\r\n\t\texplicit fquatSIMD(\r\n\t\t\tctor);\r\n\t\texplicit fquatSIMD(\r\n\t\t\tfloat const & w, \r\n\t\t\tfloat const & x, \r\n\t\t\tfloat const & y, \r\n\t\t\tfloat const & z);\r\n\t\texplicit fquatSIMD(\r\n\t\t\tquat const & v);\r\n        explicit fquatSIMD(\r\n\t\t\tvec3 const & eulerAngles);\r\n\t\t\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Unary arithmetic operators\r\n\r\n        fquatSIMD& operator =(fquatSIMD const & q);\r\n        fquatSIMD& operator*=(float const & s);\r\n\t\tfquatSIMD& operator/=(float const & s);\r\n\t};\r\n\r\n\r\n    //////////////////////////////////////\r\n    // Arithmetic operators\r\n\r\n\tdetail::fquatSIMD operator- (\r\n\t\tdetail::fquatSIMD const & q);\r\n\r\n\tdetail::fquatSIMD operator+ ( \r\n\t\tdetail::fquatSIMD const & q, \r\n\t\tdetail::fquatSIMD const & p); \r\n\r\n\tdetail::fquatSIMD operator* ( \r\n\t\tdetail::fquatSIMD const & q, \r\n\t\tdetail::fquatSIMD const & p); \r\n\r\n\tdetail::fvec4SIMD operator* (\r\n\t\tdetail::fquatSIMD const & q, \r\n\t\tdetail::fvec4SIMD const & v);\r\n\r\n\tdetail::fvec4SIMD operator* (\r\n\t\tdetail::fvec4SIMD const & v,\r\n\t\tdetail::fquatSIMD const & q);\r\n\r\n\tdetail::fquatSIMD operator* (\r\n\t\tdetail::fquatSIMD const & q, \r\n\t\tfloat s);\r\n\r\n\tdetail::fquatSIMD operator* (\r\n\t\tfloat s,\r\n\t\tdetail::fquatSIMD const & q);\r\n\r\n\tdetail::fquatSIMD operator/ (\r\n\t\tdetail::fquatSIMD const & q, \r\n\t\tfloat s);\r\n\r\n}//namespace detail\r\n\r\n\ttypedef glm::detail::fquatSIMD simdQuat;\r\n\r\n\t/// @addtogroup gtx_simd_quat\r\n\t/// @{\r\n\r\n    //! Convert a simdQuat to a quat.\r\n\t//! (From GLM_GTX_simd_quat extension)\r\n\tquat quat_cast(\r\n\t\tdetail::fquatSIMD const & x);\r\n\r\n    //! Convert a simdMat4 to a simdQuat.\r\n    //! (From GLM_GTX_simd_quat extension)\r\n    detail::fquatSIMD quatSIMD_cast(\r\n        detail::fmat4x4SIMD const & m);\r\n\r\n    //! Converts a mat4 to a simdQuat.\r\n    //! (From GLM_GTX_simd_quat extension)\r\n    template <typename T, precision P>\r\n    detail::fquatSIMD quatSIMD_cast(\r\n        detail::tmat4x4<T, P> const & m);\r\n\r\n    //! Converts a mat3 to a simdQuat.\r\n    //! (From GLM_GTX_simd_quat extension)\r\n    template <typename T, precision P>\r\n    detail::fquatSIMD quatSIMD_cast(\r\n        detail::tmat3x3<T, P> const & m);\r\n\r\n    //! Convert a simdQuat to a simdMat4\r\n    //! (From GLM_GTX_simd_quat extension)\r\n    detail::fmat4x4SIMD mat4SIMD_cast(\r\n        detail::fquatSIMD const & q);\r\n\r\n    //! Converts a simdQuat to a standard mat4.\r\n    //! (From GLM_GTX_simd_quat extension)\r\n    mat4 mat4_cast(\r\n        detail::fquatSIMD const & q);\r\n\r\n\r\n\t/// Returns the length of the quaternion. \r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\tfloat length(\r\n\t\tdetail::fquatSIMD const & x);\r\n\r\n\t/// Returns the normalized quaternion. \r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\tdetail::fquatSIMD normalize(\r\n\t\tdetail::fquatSIMD const & x);\r\n\r\n    /// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ... \r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\tfloat dot(\r\n\t\tdetail::fquatSIMD const & q1, \r\n\t\tdetail::fquatSIMD const & q2);\r\n\r\n    /// Spherical linear interpolation of two quaternions.\r\n\t/// The interpolation is oriented and the rotation is performed at constant speed.\r\n\t/// For short path spherical linear interpolation, use the slerp function.\r\n\t/// \r\n\t/// @param x A quaternion\r\n\t/// @param y A quaternion\r\n\t/// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1].\r\n\t/// @tparam T Value type used to build the quaternion. Supported: half, float or double.\r\n\t/// @see gtc_quaternion\r\n\t/// @see - slerp(detail::fquatSIMD const & x, detail::fquatSIMD const & y, T const & a) \r\n\tdetail::fquatSIMD mix(\r\n\t\tdetail::fquatSIMD const & x, \r\n\t\tdetail::fquatSIMD const & y, \r\n\t\tfloat const & a);\r\n\r\n    /// Linear interpolation of two quaternions. \r\n\t/// The interpolation is oriented.\r\n\t/// \r\n\t/// @param x A quaternion\r\n\t/// @param y A quaternion\r\n\t/// @param a Interpolation factor. The interpolation is defined in the range [0, 1].\r\n\t/// @tparam T Value type used to build the quaternion. Supported: half, float or double.\r\n\t/// @see gtc_quaternion\r\n\tdetail::fquatSIMD lerp(\r\n\t\tdetail::fquatSIMD const & x, \r\n\t\tdetail::fquatSIMD const & y, \r\n\t\tfloat const & a);\r\n\r\n\t/// Spherical linear interpolation of two quaternions.\r\n\t/// The interpolation always take the short path and the rotation is performed at constant speed.\r\n\t/// \r\n\t/// @param x A quaternion\r\n\t/// @param y A quaternion\r\n\t/// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1].\r\n\t/// @tparam T Value type used to build the quaternion. Supported: half, float or double.\r\n\t/// @see gtc_quaternion\r\n\tdetail::fquatSIMD slerp(\r\n\t\tdetail::fquatSIMD const & x, \r\n\t\tdetail::fquatSIMD const & y, \r\n\t\tfloat const & a);\r\n\r\n\r\n    /// Faster spherical linear interpolation of two unit length quaternions.\r\n    ///\r\n    /// This is the same as mix(), except for two rules:\r\n    ///   1) The two quaternions must be unit length.\r\n    ///   2) The interpolation factor (a) must be in the range [0, 1].\r\n    ///\r\n    /// This will use the equivalent to fastAcos() and fastSin().\r\n    ///\r\n\t/// @see gtc_quaternion\r\n\t/// @see - mix(detail::fquatSIMD const & x, detail::fquatSIMD const & y, T const & a) \r\n\tdetail::fquatSIMD fastMix(\r\n\t\tdetail::fquatSIMD const & x, \r\n\t\tdetail::fquatSIMD const & y, \r\n\t\tfloat const & a);\r\n\r\n    /// Identical to fastMix() except takes the shortest path.\r\n    ///\r\n    /// The same rules apply here as those in fastMix(). Both quaternions must be unit length and 'a' must be\r\n    /// in the range [0, 1].\r\n    ///\r\n\t/// @see - fastMix(detail::fquatSIMD const & x, detail::fquatSIMD const & y, T const & a) \r\n\t/// @see - slerp(detail::fquatSIMD const & x, detail::fquatSIMD const & y, T const & a) \r\n    detail::fquatSIMD fastSlerp(\r\n\t\tdetail::fquatSIMD const & x, \r\n\t\tdetail::fquatSIMD const & y, \r\n\t\tfloat const & a);\r\n\r\n\r\n\t/// Returns the q conjugate. \r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\tdetail::fquatSIMD conjugate(\r\n\t\tdetail::fquatSIMD const & q);\r\n\r\n\t/// Returns the q inverse. \r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\tdetail::fquatSIMD inverse(\r\n\t\tdetail::fquatSIMD const & q);\r\n\r\n    /// Build a quaternion from an angle and a normalized axis.\r\n\t///\r\n\t/// @param angle Angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.\r\n\t/// @param axis Axis of the quaternion, must be normalized. \r\n\t///\r\n\t/// @see gtc_quaternion\r\n\tdetail::fquatSIMD angleAxisSIMD(\r\n\t\tfloat const & angle, \r\n\t\tvec3 const & axis);\r\n\r\n    /// Build a quaternion from an angle and a normalized axis. \r\n\t///\r\n\t/// @param angle Angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.\r\n\t/// @param x x component of the x-axis, x, y, z must be a normalized axis\r\n\t/// @param y y component of the y-axis, x, y, z must be a normalized axis\r\n\t/// @param z z component of the z-axis, x, y, z must be a normalized axis\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\tdetail::fquatSIMD angleAxisSIMD(\r\n\t\tfloat const & angle, \r\n\t\tfloat const & x, \r\n\t\tfloat const & y, \r\n\t\tfloat const & z);\r\n\r\n\r\n    // TODO: Move this to somewhere more appropriate. Used with fastMix() and fastSlerp().\r\n    /// Performs the equivalent of glm::fastSin() on each component of the given __m128.\r\n    __m128 fastSin(__m128 x);\r\n\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"simd_quat.inl\"\r\n\r\n\r\n#if (GLM_COMPILER & GLM_COMPILER_VC)\r\n#   pragma warning(pop)\r\n#endif\r\n\r\n\r\n#endif//(GLM_ARCH != GLM_ARCH_PURE)\r\n\r\n#endif//GLM_GTX_simd_quat\r\n"
  },
  {
    "path": "cpu/glm/gtx/simd_quat.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2013-04-22\r\n// Updated : 2013-04-22\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/simd_quat.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n\r\nnamespace glm{\r\nnamespace detail{\r\n\r\n\r\n//////////////////////////////////////\r\n// Debugging\r\n#if 0\r\nvoid print(__m128 v)\r\n{\r\n    GLM_ALIGN(16) float result[4];\r\n    _mm_store_ps(result, v);\r\n\r\n    printf(\"__m128:    %f %f %f %f\\n\", result[0], result[1], result[2], result[3]);\r\n}\r\n\r\nvoid print(const fvec4SIMD &v)\r\n{\r\n    printf(\"fvec4SIMD: %f %f %f %f\\n\", v.x, v.y, v.z, v.w);\r\n}\r\n#endif\r\n\r\n\r\n//////////////////////////////////////\r\n// Implicit basic constructors\r\n\r\nGLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD()\r\n#ifdef GLM_SIMD_ENABLE_DEFAULT_INIT\r\n    : Data(_mm_set_ps(1.0f, 0.0f, 0.0f, 0.0f))\r\n#endif\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(__m128 const & Data) :\r\n\tData(Data)\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(fquatSIMD const & q) :\r\n\tData(q.Data)\r\n{}\r\n\r\n\r\n//////////////////////////////////////\r\n// Explicit basic constructors\r\n\r\nGLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(float const & w, float const & x, float const & y, float const & z) :\r\n\tData(_mm_set_ps(w, z, y, x))\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(quat const & q) :\r\n\tData(_mm_set_ps(q.w, q.z, q.y, q.x))\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(vec3 const & eulerAngles)\r\n{\r\n    vec3 c = glm::cos(eulerAngles * 0.5f);\r\n\tvec3 s = glm::sin(eulerAngles * 0.5f);\r\n\r\n    Data = _mm_set_ps(\r\n        (c.x * c.y * c.z) + (s.x * s.y * s.z),\r\n        (c.x * c.y * s.z) - (s.x * s.y * c.z),\r\n        (c.x * s.y * c.z) + (s.x * c.y * s.z),\r\n        (s.x * c.y * c.z) - (c.x * s.y * s.z));\r\n}\r\n\r\n\r\n//////////////////////////////////////\r\n// Unary arithmetic operators\r\n\r\nGLM_FUNC_QUALIFIER fquatSIMD& fquatSIMD::operator=(fquatSIMD const & q)\r\n{\r\n    this->Data = q.Data;\r\n    return *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fquatSIMD& fquatSIMD::operator*=(float const & s)\r\n{\r\n\tthis->Data = _mm_mul_ps(this->Data, _mm_set_ps1(s));\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fquatSIMD& fquatSIMD::operator/=(float const & s)\r\n{\r\n\tthis->Data = _mm_div_ps(Data, _mm_set1_ps(s));\r\n\treturn *this;\r\n}\r\n\r\n\r\n\r\n// negate operator\r\nGLM_FUNC_QUALIFIER fquatSIMD operator- (fquatSIMD const & q)\r\n{\r\n    return fquatSIMD(_mm_mul_ps(q.Data, _mm_set_ps(-1.0f, -1.0f, -1.0f, -1.0f)));\r\n}\r\n\r\n// operator+\r\nGLM_FUNC_QUALIFIER fquatSIMD operator+ (fquatSIMD const & q1, fquatSIMD const & q2)\r\n{\r\n\treturn fquatSIMD(_mm_add_ps(q1.Data, q2.Data));\r\n}\r\n\r\n//operator*\r\nGLM_FUNC_QUALIFIER fquatSIMD operator* (fquatSIMD const & q1, fquatSIMD const & q2)\r\n{\r\n    // SSE2 STATS:\r\n    //    11 shuffle\r\n    //    8  mul\r\n    //    8  add\r\n    \r\n    // SSE4 STATS:\r\n    //    3 shuffle\r\n    //    4 mul\r\n    //    4 dpps\r\n\r\n    __m128 mul0 = _mm_mul_ps(q1.Data, _mm_shuffle_ps(q2.Data, q2.Data, _MM_SHUFFLE(0, 1, 2, 3)));\r\n    __m128 mul1 = _mm_mul_ps(q1.Data, _mm_shuffle_ps(q2.Data, q2.Data, _MM_SHUFFLE(1, 0, 3, 2)));\r\n    __m128 mul2 = _mm_mul_ps(q1.Data, _mm_shuffle_ps(q2.Data, q2.Data, _MM_SHUFFLE(2, 3, 0, 1)));\r\n    __m128 mul3 = _mm_mul_ps(q1.Data, q2.Data);\r\n\r\n#   if((GLM_ARCH & GLM_ARCH_SSE4))\r\n    __m128 add0 = _mm_dp_ps(mul0, _mm_set_ps(1.0f, -1.0f,  1.0f,  1.0f), 0xff);\r\n    __m128 add1 = _mm_dp_ps(mul1, _mm_set_ps(1.0f,  1.0f,  1.0f, -1.0f), 0xff);\r\n    __m128 add2 = _mm_dp_ps(mul2, _mm_set_ps(1.0f,  1.0f, -1.0f,  1.0f), 0xff);\r\n    __m128 add3 = _mm_dp_ps(mul3, _mm_set_ps(1.0f, -1.0f, -1.0f, -1.0f), 0xff);\r\n#   else\r\n           mul0 = _mm_mul_ps(mul0, _mm_set_ps(1.0f, -1.0f,  1.0f,  1.0f));\r\n    __m128 add0 = _mm_add_ps(mul0, _mm_movehl_ps(mul0, mul0));\r\n           add0 = _mm_add_ss(add0, _mm_shuffle_ps(add0, add0, 1));\r\n\r\n           mul1 = _mm_mul_ps(mul1, _mm_set_ps(1.0f,  1.0f,  1.0f, -1.0f));\r\n    __m128 add1 = _mm_add_ps(mul1, _mm_movehl_ps(mul1, mul1));\r\n           add1 = _mm_add_ss(add1, _mm_shuffle_ps(add1, add1, 1));\r\n\r\n           mul2 = _mm_mul_ps(mul2, _mm_set_ps(1.0f,  1.0f, -1.0f,  1.0f));\r\n    __m128 add2 = _mm_add_ps(mul2, _mm_movehl_ps(mul2, mul2));\r\n           add2 = _mm_add_ss(add2, _mm_shuffle_ps(add2, add2, 1));\r\n\r\n           mul3 = _mm_mul_ps(mul3, _mm_set_ps(1.0f, -1.0f, -1.0f, -1.0f));\r\n    __m128 add3 = _mm_add_ps(mul3, _mm_movehl_ps(mul3, mul3));\r\n           add3 = _mm_add_ss(add3, _mm_shuffle_ps(add3, add3, 1));\r\n#endif\r\n\r\n\r\n    // This SIMD code is a politically correct way of doing this, but in every test I've tried it has been slower than\r\n    // the final code below. I'll keep this here for reference - maybe somebody else can do something better...\r\n    //\r\n    //__m128 xxyy = _mm_shuffle_ps(add0, add1, _MM_SHUFFLE(0, 0, 0, 0));\r\n    //__m128 zzww = _mm_shuffle_ps(add2, add3, _MM_SHUFFLE(0, 0, 0, 0));\r\n    //\r\n    //return _mm_shuffle_ps(xxyy, zzww, _MM_SHUFFLE(2, 0, 2, 0));\r\n    \r\n    float x;\r\n    float y;\r\n    float z;\r\n    float w;\r\n\r\n    _mm_store_ss(&x, add0);\r\n    _mm_store_ss(&y, add1);\r\n    _mm_store_ss(&z, add2);\r\n    _mm_store_ss(&w, add3);\r\n\r\n    return detail::fquatSIMD(w, x, y, z);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator* (fquatSIMD const & q, fvec4SIMD const & v)\r\n{\r\n    static const __m128 two = _mm_set1_ps(2.0f);\r\n\r\n    __m128 q_wwww  = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 3, 3, 3));\r\n    __m128 q_swp0  = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 0, 2, 1));\r\n\t__m128 q_swp1  = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 1, 0, 2));\r\n\t__m128 v_swp0  = _mm_shuffle_ps(v.Data, v.Data, _MM_SHUFFLE(3, 0, 2, 1));\r\n\t__m128 v_swp1  = _mm_shuffle_ps(v.Data, v.Data, _MM_SHUFFLE(3, 1, 0, 2));\r\n\t\r\n\t__m128 uv      = _mm_sub_ps(_mm_mul_ps(q_swp0, v_swp1), _mm_mul_ps(q_swp1, v_swp0));\r\n    __m128 uv_swp0 = _mm_shuffle_ps(uv, uv, _MM_SHUFFLE(3, 0, 2, 1));\r\n    __m128 uv_swp1 = _mm_shuffle_ps(uv, uv, _MM_SHUFFLE(3, 1, 0, 2));\r\n    __m128 uuv     = _mm_sub_ps(_mm_mul_ps(q_swp0, uv_swp1), _mm_mul_ps(q_swp1, uv_swp0));\r\n\r\n    \r\n    uv  = _mm_mul_ps(uv,  _mm_mul_ps(q_wwww, two));\r\n    uuv = _mm_mul_ps(uuv, two);\r\n\r\n    return _mm_add_ps(v.Data, _mm_add_ps(uv, uuv));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator* (fvec4SIMD const & v, fquatSIMD const & q)\r\n{\r\n\treturn inverse(q) * v;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fquatSIMD operator* (fquatSIMD const & q, float s)\r\n{\r\n\treturn fquatSIMD(_mm_mul_ps(q.Data, _mm_set1_ps(s)));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fquatSIMD operator* (float s, fquatSIMD const & q)\r\n{\r\n\treturn fquatSIMD(_mm_mul_ps(_mm_set1_ps(s), q.Data));\r\n}\r\n\r\n\r\n//operator/\r\nGLM_FUNC_QUALIFIER fquatSIMD operator/ (fquatSIMD const & q, float s)\r\n{\r\n\treturn fquatSIMD(_mm_div_ps(q.Data, _mm_set1_ps(s)));\r\n}\r\n\r\n\r\n}//namespace detail\r\n\r\n\r\nGLM_FUNC_QUALIFIER quat quat_cast\r\n(\r\n\tdetail::fquatSIMD const & x\r\n)\r\n{\r\n\tGLM_ALIGN(16) quat Result;\r\n\t_mm_store_ps(&Result[0], x.Data);\r\n\r\n\treturn Result;\r\n}\r\n\r\ntemplate <typename T>\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD quatSIMD_cast_impl(const T m0[], const T m1[], const T m2[])\r\n{\r\n    T trace = m0[0] + m1[1] + m2[2] + T(1.0);\r\n    if (trace > T(0))\r\n    {\r\n        T s = static_cast<T>(0.5) / sqrt(trace);\r\n\r\n        return _mm_set_ps(\r\n            static_cast<float>(T(0.25) / s),\r\n            static_cast<float>((m0[1] - m1[0]) * s),\r\n            static_cast<float>((m2[0] - m0[2]) * s),\r\n            static_cast<float>((m1[2] - m2[1]) * s));\r\n    }\r\n    else\r\n    {\r\n        if (m0[0] > m1[1])\r\n        {\r\n            if (m0[0] > m2[2])\r\n            {\r\n                // X is biggest.\r\n                T s = sqrt(m0[0] - m1[1] - m2[2] + T(1.0)) * T(0.5);\r\n\r\n                return _mm_set_ps(\r\n                    static_cast<float>((m1[2] - m2[1]) * s),\r\n                    static_cast<float>((m2[0] + m0[2]) * s),\r\n                    static_cast<float>((m0[1] + m1[0]) * s),\r\n                    static_cast<float>(T(0.5)          * s));\r\n            }\r\n        }\r\n        else\r\n        {\r\n            if (m1[1] > m2[2])\r\n            {\r\n                // Y is biggest.\r\n                T s = sqrt(m1[1] - m0[0] - m2[2] + T(1.0)) * T(0.5);\r\n\r\n                return _mm_set_ps(\r\n                    static_cast<float>((m2[0] - m0[2]) * s),\r\n                    static_cast<float>((m1[2] + m2[1]) * s),\r\n                    static_cast<float>(T(0.5)          * s),\r\n                    static_cast<float>((m0[1] + m1[0]) * s));\r\n            }\r\n        }\r\n\r\n        // Z is biggest.\r\n        T s = sqrt(m2[2] - m0[0] - m1[1] + T(1.0)) * T(0.5);\r\n\r\n        return _mm_set_ps(\r\n            static_cast<float>((m0[1] - m1[0]) * s),\r\n            static_cast<float>(T(0.5)          * s),\r\n            static_cast<float>((m1[2] + m2[1]) * s),\r\n            static_cast<float>((m2[0] + m0[2]) * s));\r\n    }\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD quatSIMD_cast\r\n(\r\n\tdetail::fmat4x4SIMD const & m\r\n)\r\n{\r\n    // Scalar implementation for now.\r\n    GLM_ALIGN(16) float m0[4];\r\n    GLM_ALIGN(16) float m1[4];\r\n    GLM_ALIGN(16) float m2[4];\r\n\r\n    _mm_store_ps(m0, m[0].Data);\r\n    _mm_store_ps(m1, m[1].Data);\r\n    _mm_store_ps(m2, m[2].Data);\r\n\r\n    return quatSIMD_cast_impl(m0, m1, m2);\r\n}\r\n\r\ntemplate <typename T, precision P>\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD quatSIMD_cast\r\n(\r\n    detail::tmat4x4<T, P> const & m\r\n)\r\n{\r\n    return quatSIMD_cast_impl(&m[0][0], &m[1][0], &m[2][0]);\r\n}\r\n\r\ntemplate <typename T, precision P>\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD quatSIMD_cast\r\n(\r\n    detail::tmat3x3<T, P> const & m\r\n)\r\n{\r\n    return quatSIMD_cast_impl(&m[0][0], &m[1][0], &m[2][0]);\r\n}\r\n\r\n\r\nGLM_FUNC_QUALIFIER detail::fmat4x4SIMD mat4SIMD_cast\r\n(\r\n\tdetail::fquatSIMD const & q\r\n)\r\n{\r\n    detail::fmat4x4SIMD result;\r\n\r\n    __m128 _wwww  = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 3, 3, 3));\r\n    __m128 _xyzw  = q.Data;\r\n    __m128 _zxyw  = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 1, 0, 2));\r\n    __m128 _yzxw  = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 0, 2, 1));\r\n\r\n    __m128 _xyzw2 = _mm_add_ps(_xyzw, _xyzw);\r\n    __m128 _zxyw2 = _mm_shuffle_ps(_xyzw2, _xyzw2, _MM_SHUFFLE(3, 1, 0, 2));\r\n    __m128 _yzxw2 = _mm_shuffle_ps(_xyzw2, _xyzw2, _MM_SHUFFLE(3, 0, 2, 1));\r\n    \r\n    __m128 _tmp0  = _mm_sub_ps(_mm_set1_ps(1.0f), _mm_mul_ps(_yzxw2, _yzxw));\r\n           _tmp0  = _mm_sub_ps(_tmp0, _mm_mul_ps(_zxyw2, _zxyw));\r\n\r\n    __m128 _tmp1  = _mm_mul_ps(_yzxw2, _xyzw);\r\n           _tmp1  = _mm_add_ps(_tmp1, _mm_mul_ps(_zxyw2, _wwww));\r\n\r\n    __m128 _tmp2  = _mm_mul_ps(_zxyw2, _xyzw);\r\n           _tmp2  = _mm_sub_ps(_tmp2, _mm_mul_ps(_yzxw2, _wwww));\r\n\r\n\r\n    // There's probably a better, more politically correct way of doing this...\r\n    result[0].Data = _mm_set_ps(\r\n        0.0f,\r\n        reinterpret_cast<float*>(&_tmp2)[0],\r\n        reinterpret_cast<float*>(&_tmp1)[0],\r\n        reinterpret_cast<float*>(&_tmp0)[0]);\r\n\r\n    result[1].Data = _mm_set_ps(\r\n        0.0f,\r\n        reinterpret_cast<float*>(&_tmp1)[1],\r\n        reinterpret_cast<float*>(&_tmp0)[1],\r\n        reinterpret_cast<float*>(&_tmp2)[1]);\r\n\r\n    result[2].Data = _mm_set_ps(\r\n        0.0f,\r\n        reinterpret_cast<float*>(&_tmp0)[2],\r\n        reinterpret_cast<float*>(&_tmp2)[2],\r\n        reinterpret_cast<float*>(&_tmp1)[2]);\r\n\r\n   result[3].Data = _mm_set_ps(\r\n        1.0f,\r\n        0.0f,\r\n        0.0f,\r\n        0.0f);\r\n\r\n\r\n    return result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER mat4 mat4_cast\r\n(\r\n\tdetail::fquatSIMD const & q\r\n)\r\n{\r\n    return mat4_cast(mat4SIMD_cast(q));\r\n}\r\n\r\n\r\n\r\nGLM_FUNC_QUALIFIER float length\r\n(\r\n\tdetail::fquatSIMD const & q\r\n)\r\n{\r\n    return glm::sqrt(dot(q, q));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD normalize\r\n(\r\n\tdetail::fquatSIMD const & q\r\n)\r\n{\r\n    return _mm_mul_ps(q.Data, _mm_set1_ps(1.0f / length(q)));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER float dot\r\n(\r\n\tdetail::fquatSIMD const & q1,\r\n\tdetail::fquatSIMD const & q2\r\n)\r\n{\r\n    float result;\r\n    _mm_store_ss(&result, detail::sse_dot_ps(q1.Data, q2.Data));\r\n\r\n    return result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD mix\r\n(\r\n\tdetail::fquatSIMD const & x, \r\n\tdetail::fquatSIMD const & y, \r\n\tfloat const & a\r\n)\r\n{\r\n\tfloat cosTheta = dot(x, y);\r\n\r\n    if (cosTheta > 1.0f - glm::epsilon<float>())\r\n    {\r\n\t    return _mm_add_ps(x.Data, _mm_mul_ps(_mm_set1_ps(a), _mm_sub_ps(y.Data, x.Data)));\r\n    }\r\n    else\r\n    {\r\n        float angle = glm::acos(cosTheta);\r\n        \r\n        \r\n        float s0 = glm::sin((1.0f - a) * angle);\r\n        float s1 = glm::sin(a * angle);\r\n        float d  = 1.0f / glm::sin(angle);\r\n\r\n        return (s0 * x + s1 * y) * d;\r\n    }\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD lerp\r\n(\r\n\tdetail::fquatSIMD const & x, \r\n\tdetail::fquatSIMD const & y, \r\n\tfloat const & a\r\n)\r\n{\r\n\t// Lerp is only defined in [0, 1]\r\n\tassert(a >= 0.0f);\r\n\tassert(a <= 1.0f);\r\n\r\n    return _mm_add_ps(x.Data, _mm_mul_ps(_mm_set1_ps(a), _mm_sub_ps(y.Data, x.Data)));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD slerp\r\n(\r\n\tdetail::fquatSIMD const & x, \r\n\tdetail::fquatSIMD const & y, \r\n\tfloat const & a\r\n)\r\n{\r\n\tdetail::fquatSIMD z = y;\r\n\r\n\tfloat cosTheta = dot(x, y);\r\n\r\n\t// If cosTheta < 0, the interpolation will take the long way around the sphere. \r\n\t// To fix this, one quat must be negated.\r\n\tif (cosTheta < 0.0f)\r\n\t{\r\n\t\tz        = -y;\r\n\t\tcosTheta = -cosTheta;\r\n\t}\r\n\r\n\t// Perform a linear interpolation when cosTheta is close to 1 to avoid side effect of sin(angle) becoming a zero denominator\r\n\tif(cosTheta > 1.0f - epsilon<float>())\r\n\t{\r\n\t\treturn _mm_add_ps(x.Data, _mm_mul_ps(_mm_set1_ps(a), _mm_sub_ps(y.Data, x.Data)));\r\n\t}\r\n\telse\r\n\t{\r\n        float angle = glm::acos(cosTheta);\r\n\r\n\r\n\t\tfloat s0 = glm::sin((1.0f - a) * angle);\r\n        float s1 = glm::sin(a * angle);\r\n        float d  = 1.0f / glm::sin(angle);\r\n\r\n        return (s0 * x + s1 * y) * d;\r\n\t}\r\n}\r\n\r\n\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD fastMix\r\n(\r\n\tdetail::fquatSIMD const & x, \r\n\tdetail::fquatSIMD const & y, \r\n\tfloat const & a\r\n)\r\n{\r\n\tfloat cosTheta = dot(x, y);\r\n\r\n    if (cosTheta > 1.0f - glm::epsilon<float>())\r\n    {\r\n\t    return _mm_add_ps(x.Data, _mm_mul_ps(_mm_set1_ps(a), _mm_sub_ps(y.Data, x.Data)));\r\n    }\r\n    else\r\n    {\r\n        float angle = glm::fastAcos(cosTheta);\r\n\r\n\r\n        __m128 s  = glm::fastSin(_mm_set_ps((1.0f - a) * angle, a * angle, angle, 0.0f));\r\n\r\n        __m128 s0 =                               _mm_shuffle_ps(s, s, _MM_SHUFFLE(3, 3, 3, 3));\r\n        __m128 s1 =                               _mm_shuffle_ps(s, s, _MM_SHUFFLE(2, 2, 2, 2));\r\n        __m128 d  = _mm_div_ps(_mm_set1_ps(1.0f), _mm_shuffle_ps(s, s, _MM_SHUFFLE(1, 1, 1, 1)));\r\n        \r\n        return _mm_mul_ps(_mm_add_ps(_mm_mul_ps(s0, x.Data), _mm_mul_ps(s1, y.Data)), d);\r\n    }\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD fastSlerp\r\n(\r\n\tdetail::fquatSIMD const & x, \r\n\tdetail::fquatSIMD const & y, \r\n\tfloat const & a\r\n)\r\n{\r\n\tdetail::fquatSIMD z = y;\r\n\r\n\tfloat cosTheta = dot(x, y);\r\n\tif (cosTheta < 0.0f)\r\n\t{\r\n\t\tz        = -y;\r\n\t\tcosTheta = -cosTheta;\r\n\t}\r\n\r\n\r\n\tif(cosTheta > 1.0f - epsilon<float>())\r\n\t{\r\n\t\treturn _mm_add_ps(x.Data, _mm_mul_ps(_mm_set1_ps(a), _mm_sub_ps(y.Data, x.Data)));\r\n\t}\r\n\telse\r\n\t{\r\n        float angle = glm::fastAcos(cosTheta);\r\n\r\n\r\n        __m128 s  = glm::fastSin(_mm_set_ps((1.0f - a) * angle, a * angle, angle, 0.0f));\r\n\r\n        __m128 s0 =                               _mm_shuffle_ps(s, s, _MM_SHUFFLE(3, 3, 3, 3));\r\n        __m128 s1 =                               _mm_shuffle_ps(s, s, _MM_SHUFFLE(2, 2, 2, 2));\r\n        __m128 d  = _mm_div_ps(_mm_set1_ps(1.0f), _mm_shuffle_ps(s, s, _MM_SHUFFLE(1, 1, 1, 1)));\r\n        \r\n        return _mm_mul_ps(_mm_add_ps(_mm_mul_ps(s0, x.Data), _mm_mul_ps(s1, y.Data)), d);\r\n\t}\r\n}\r\n\r\n\r\n\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD conjugate\r\n(\r\n\tdetail::fquatSIMD const & q\r\n)\r\n{\r\n\treturn detail::fquatSIMD(_mm_mul_ps(q.Data, _mm_set_ps(1.0f, -1.0f, -1.0f, -1.0f)));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD inverse\r\n(\r\n\tdetail::fquatSIMD const & q\r\n)\r\n{\r\n\treturn conjugate(q) / dot(q, q);\r\n}\r\n\r\n\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD angleAxisSIMD\r\n(\r\n\tfloat const & angle,\r\n\tvec3 const & v\r\n)\r\n{\r\n#ifdef GLM_FORCE_RADIANS\r\n\tfloat a(angle);\r\n#else\r\n#\tpragma message(\"GLM: rotateZ function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\tfloat a(glm::radians(angle));\r\n#endif\r\n\tfloat s = glm::sin(a * 0.5f);\r\n\r\n\treturn _mm_set_ps(\r\n\t\tglm::cos(a * 0.5f),\r\n\t\tv.z * s,\r\n\t\tv.y * s,\r\n\t\tv.x * s);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD angleAxisSIMD\r\n(\r\n\tfloat const & angle, \r\n\tfloat const & x, \r\n\tfloat const & y, \r\n\tfloat const & z\r\n)\r\n{\r\n\treturn angleAxisSIMD(angle, vec3(x, y, z));\r\n}\r\n\r\n\r\nGLM_FUNC_QUALIFIER __m128 fastSin(__m128 x)\r\n{\r\n    static const __m128 c0 = _mm_set1_ps(0.16666666666666666666666666666667f);\r\n    static const __m128 c1 = _mm_set1_ps(0.00833333333333333333333333333333f);\r\n    static const __m128 c2 = _mm_set1_ps(0.00019841269841269841269841269841f);\r\n\r\n    __m128 x3 = _mm_mul_ps(x,  _mm_mul_ps(x, x));\r\n    __m128 x5 = _mm_mul_ps(x3, _mm_mul_ps(x, x));\r\n    __m128 x7 = _mm_mul_ps(x5, _mm_mul_ps(x, x));\r\n\r\n    __m128 y0 = _mm_mul_ps(x3, c0);\r\n    __m128 y1 = _mm_mul_ps(x5, c1);\r\n    __m128 y2 = _mm_mul_ps(x7, c2);\r\n        \r\n    return _mm_sub_ps(_mm_add_ps(_mm_sub_ps(x, y0), y1), y2);\r\n}\r\n\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/simd_vec4.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_simd_vec4\r\n/// @file glm/gtx/simd_vec4.hpp\r\n/// @date 2009-05-07 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_simd_vec4 GLM_GTX_simd_vec4\r\n/// @ingroup gtx\r\n/// \r\n/// @brief SIMD implementation of vec4 type.\r\n/// \r\n/// <glm/gtx/simd_vec4.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_simd_vec4\r\n#define GLM_GTX_simd_vec4\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(GLM_ARCH != GLM_ARCH_PURE)\r\n\r\n#if(GLM_ARCH & GLM_ARCH_SSE2)\r\n#\tinclude \"../detail/intrinsic_common.hpp\"\r\n#\tinclude \"../detail/intrinsic_geometric.hpp\"\r\n#\tinclude \"../detail/intrinsic_integer.hpp\"\r\n#else\r\n#\terror \"GLM: GLM_GTX_simd_vec4 requires compiler support of SSE2 through intrinsics\"\r\n#endif\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_simd_vec4 extension included\")\r\n#endif\r\n\r\n\r\n// Warning silencer for nameless struct/union.\r\n#if (GLM_COMPILER & GLM_COMPILER_VC)\r\n#\tpragma warning(push)\r\n#\tpragma warning(disable:4201)   // warning C4201: nonstandard extension used : nameless struct/union\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\tenum comp\r\n\t{\r\n\t\tX = 0,\r\n\t\tR = 0,\r\n\t\tS = 0,\r\n\t\tY = 1,\r\n\t\tG = 1,\r\n\t\tT = 1,\r\n\t\tZ = 2,\r\n\t\tB = 2,\r\n\t\tP = 2,\r\n\t\tW = 3,\r\n\t\tA = 3,\r\n\t\tQ = 3\r\n\t};\r\n\r\n}//namespace glm\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\t/// 4-dimensional vector implemented using SIMD SEE intrinsics.\r\n\t/// \\ingroup gtx_simd_vec4\r\n\tGLM_ALIGNED_STRUCT(16) fvec4SIMD\r\n\t{\r\n\t\tenum ctor{null};\r\n\t\ttypedef __m128 value_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\tstatic size_type value_size();\r\n\r\n\t\ttypedef fvec4SIMD type;\r\n\t\ttypedef tvec4<bool, highp> bool_type;\r\n\r\n#ifdef GLM_SIMD_ENABLE_XYZW_UNION\r\n\t\tunion\r\n\t\t{\r\n\t\t\t__m128 Data;\r\n\t\t\tstruct {float x, y, z, w;};\r\n\t\t};\r\n#else\r\n\t\t__m128 Data;\r\n#endif\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Implicit basic constructors\r\n\r\n\t\tfvec4SIMD();\r\n\t\tfvec4SIMD(__m128 const & Data);\r\n\t\tfvec4SIMD(fvec4SIMD const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Explicit basic constructors\r\n\r\n\t\texplicit fvec4SIMD(\r\n\t\t\tctor);\r\n\t\texplicit fvec4SIMD(\r\n\t\t\tfloat const & s);\r\n\t\texplicit fvec4SIMD(\r\n\t\t\tfloat const & x, \r\n\t\t\tfloat const & y, \r\n\t\t\tfloat const & z, \r\n\t\t\tfloat const & w);\r\n\t\texplicit fvec4SIMD(\r\n\t\t\tvec4 const & v);\r\n\r\n\t\t////////////////////////////////////////\r\n\t\t//// Conversion vector constructors\r\n\r\n\t\tfvec4SIMD(vec2 const & v, float const & s1, float const & s2);\r\n\t\tfvec4SIMD(float const & s1, vec2 const & v, float const & s2);\r\n\t\tfvec4SIMD(float const & s1, float const & s2, vec2 const & v);\r\n\t\tfvec4SIMD(vec3 const & v, float const & s);\r\n\t\tfvec4SIMD(float const & s, vec3 const & v);\r\n\t\tfvec4SIMD(vec2 const & v1, vec2 const & v2);\r\n\t\t//fvec4SIMD(ivec4SIMD const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Unary arithmetic operators\r\n\r\n\t\tfvec4SIMD& operator= (fvec4SIMD const & v);\r\n\t\tfvec4SIMD& operator+=(fvec4SIMD const & v);\r\n\t\tfvec4SIMD& operator-=(fvec4SIMD const & v);\r\n\t\tfvec4SIMD& operator*=(fvec4SIMD const & v);\r\n\t\tfvec4SIMD& operator/=(fvec4SIMD const & v);\r\n\r\n\t\tfvec4SIMD& operator+=(float const & s);\r\n\t\tfvec4SIMD& operator-=(float const & s);\r\n\t\tfvec4SIMD& operator*=(float const & s);\r\n\t\tfvec4SIMD& operator/=(float const & s);\r\n\r\n\t\tfvec4SIMD& operator++();\r\n\t\tfvec4SIMD& operator--();\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Swizzle operators\r\n\r\n\t\ttemplate <comp X, comp Y, comp Z, comp W>\r\n\t\tfvec4SIMD& swizzle();\r\n\t\ttemplate <comp X, comp Y, comp Z, comp W>\r\n\t\tfvec4SIMD swizzle() const;\r\n\t\ttemplate <comp X, comp Y, comp Z>\r\n\t\tfvec4SIMD swizzle() const;\r\n\t\ttemplate <comp X, comp Y>\r\n\t\tfvec4SIMD swizzle() const;\r\n\t\ttemplate <comp X>\r\n\t\tfvec4SIMD swizzle() const;\r\n\t};\r\n}//namespace detail\r\n\r\n\ttypedef glm::detail::fvec4SIMD simdVec4;\r\n\r\n\t/// @addtogroup gtx_simd_vec4\r\n\t/// @{\r\n\r\n\t//! Convert a simdVec4 to a vec4.\r\n\t/// @see gtx_simd_vec4\r\n\tvec4 vec4_cast(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns x if x >= 0; otherwise, it returns -x.\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD abs(detail::fvec4SIMD const & x);\r\n\r\n\t//! Returns 1.0 if x > 0, 0.0 if x = 0, or -1.0 if x < 0.\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD sign(detail::fvec4SIMD const & x);\r\n\r\n\t//! Returns a value equal to the nearest integer that is less then or equal to x.\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD floor(detail::fvec4SIMD const & x);\r\n\r\n\t//! Returns a value equal to the nearest integer to x\r\n\t//! whose absolute value is not larger than the absolute value of x.\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD trunc(detail::fvec4SIMD const & x);\r\n\r\n\t//! Returns a value equal to the nearest integer to x.\r\n\t//! The fraction 0.5 will round in a direction chosen by the\r\n\t//! implementation, presumably the direction that is fastest.\r\n\t//! This includes the possibility that round(x) returns the\r\n\t//! same value as roundEven(x) for all values of x.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD round(detail::fvec4SIMD const & x);\r\n\r\n\t//! Returns a value equal to the nearest integer to x.\r\n\t//! A fractional part of 0.5 will round toward the nearest even\r\n\t//! integer. (Both 3.5 and 4.5 for x will return 4.0.) \r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\t//detail::fvec4SIMD roundEven(detail::fvec4SIMD const & x);\r\n\r\n\t//! Returns a value equal to the nearest integer \r\n\t//! that is greater than or equal to x. \r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD ceil(detail::fvec4SIMD const & x);\r\n\r\n\t//! Return x - floor(x).\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD fract(detail::fvec4SIMD const & x);\r\n\r\n\t//! Modulus. Returns x - y * floor(x / y)\r\n\t//! for each component in x using the floating point value y.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD mod(\r\n\t\tdetail::fvec4SIMD const & x, \r\n\t\tdetail::fvec4SIMD const & y);\r\n\r\n\t//! Modulus. Returns x - y * floor(x / y)\r\n\t//! for each component in x using the floating point value y.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD mod(\r\n\t\tdetail::fvec4SIMD const & x, \r\n\t\tfloat const & y);\r\n\r\n\t//! Returns the fractional part of x and sets i to the integer\r\n\t//! part (as a whole number floating point value). Both the\r\n\t//! return value and the output parameter will have the same\r\n\t//! sign as x.\r\n\t//! (From GLM_GTX_simd_vec4 extension, common function)\r\n\t//detail::fvec4SIMD modf(\r\n\t//\tdetail::fvec4SIMD const & x, \r\n\t//\tdetail::fvec4SIMD & i);\r\n\r\n\t//! Returns y if y < x; otherwise, it returns x.\r\n\t/// \r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD min(\r\n\t\tdetail::fvec4SIMD const & x, \r\n\t\tdetail::fvec4SIMD const & y);\r\n\r\n\tdetail::fvec4SIMD min(\r\n\t\tdetail::fvec4SIMD const & x, \r\n\t\tfloat const & y);\r\n\r\n\t//! Returns y if x < y; otherwise, it returns x.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD max(\r\n\t\tdetail::fvec4SIMD const & x, \r\n\t\tdetail::fvec4SIMD const & y);\r\n\r\n\tdetail::fvec4SIMD max(\r\n\t\tdetail::fvec4SIMD const & x, \r\n\t\tfloat const & y);\r\n\r\n\t//! Returns min(max(x, minVal), maxVal) for each component in x \r\n\t//! using the floating-point values minVal and maxVal.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD clamp(\r\n\t\tdetail::fvec4SIMD const & x, \r\n\t\tdetail::fvec4SIMD const & minVal, \r\n\t\tdetail::fvec4SIMD const & maxVal); \r\n\r\n\tdetail::fvec4SIMD clamp(\r\n\t\tdetail::fvec4SIMD const & x, \r\n\t\tfloat const & minVal, \r\n\t\tfloat const & maxVal); \r\n\r\n\t//! \\return If genTypeU is a floating scalar or vector: \r\n\t//! Returns x * (1.0 - a) + y * a, i.e., the linear blend of \r\n\t//! x and y using the floating-point value a. \r\n\t//! The value for a is not restricted to the range [0, 1].\r\n\t//!\r\n\t//! \\return If genTypeU is a boolean scalar or vector: \r\n\t//! Selects which vector each returned component comes\r\n\t//! from. For a component of a that is false, the\r\n\t//! corresponding component of x is returned. For a\r\n\t//! component of a that is true, the corresponding\r\n\t//! component of y is returned. Components of x and y that\r\n\t//! are not selected are allowed to be invalid floating point\r\n\t//! values and will have no effect on the results. Thus, this\r\n\t//! provides different functionality than\r\n\t//! genType mix(genType x, genType y, genType(a))\r\n\t//! where a is a Boolean vector.\r\n\t//! \r\n\t//! From GLSL 1.30.08 specification, section 8.3\r\n\t//! \r\n\t//! \\param[in]  x Floating point scalar or vector.\r\n\t//! \\param[in]  y Floating point scalar or vector.\r\n\t//! \\param[in]  a Floating point or boolean scalar or vector.\r\n\t//!\r\n\t/// \\todo Test when 'a' is a boolean.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD mix(\r\n\t\tdetail::fvec4SIMD const & x, \r\n\t\tdetail::fvec4SIMD const & y, \r\n\t\tdetail::fvec4SIMD const & a);\r\n\r\n\t//! Returns 0.0 if x < edge, otherwise it returns 1.0.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD step(\r\n\t\tdetail::fvec4SIMD const & edge, \r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\tdetail::fvec4SIMD step(\r\n\t\tfloat const & edge, \r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and\r\n\t//! performs smooth Hermite interpolation between 0 and 1\r\n\t//! when edge0 < x < edge1. This is useful in cases where\r\n\t//! you would want a threshold function with a smooth\r\n\t//! transition. This is equivalent to:\r\n\t//! genType t;\r\n\t//! t = clamp ((x - edge0) / (edge1 - edge0), 0, 1);\r\n\t//! return t * t * (3 - 2 * t);\r\n\t//! Results are undefined if edge0 >= edge1.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD smoothstep(\r\n\t\tdetail::fvec4SIMD const & edge0, \r\n\t\tdetail::fvec4SIMD const & edge1, \r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\tdetail::fvec4SIMD smoothstep(\r\n\t\tfloat const & edge0, \r\n\t\tfloat const & edge1, \r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns true if x holds a NaN (not a number)\r\n\t//! representation in the underlying implementation's set of\r\n\t//! floating point representations. Returns false otherwise,\r\n\t//! including for implementations with no NaN\r\n\t//! representations.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\t//bvec4 isnan(detail::fvec4SIMD const & x);\r\n\r\n\t//! Returns true if x holds a positive infinity or negative\r\n\t//! infinity representation in the underlying implementation's\r\n\t//! set of floating point representations. Returns false\r\n\t//! otherwise, including for implementations with no infinity\r\n\t//! representations.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\t//bvec4 isinf(detail::fvec4SIMD const & x);\r\n\r\n\t//! Returns a signed or unsigned integer value representing\r\n\t//! the encoding of a floating-point value. The floatingpoint\r\n\t//! value's bit-level representation is preserved.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\t//detail::ivec4SIMD floatBitsToInt(detail::fvec4SIMD const & value);\r\n\r\n\t//! Returns a floating-point value corresponding to a signed\r\n\t//! or unsigned integer encoding of a floating-point value.\r\n\t//! If an inf or NaN is passed in, it will not signal, and the\r\n\t//! resulting floating point value is unspecified. Otherwise,\r\n\t//! the bit-level representation is preserved.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\t//detail::fvec4SIMD intBitsToFloat(detail::ivec4SIMD const & value);\r\n\r\n\t//! Computes and returns a * b + c.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD fma(\r\n\t\tdetail::fvec4SIMD const & a, \r\n\t\tdetail::fvec4SIMD const & b, \r\n\t\tdetail::fvec4SIMD const & c);\r\n\r\n\t//! Splits x into a floating-point significand in the range\r\n\t//! [0.5, 1.0) and an integral exponent of two, such that:\r\n\t//! x = significand * exp(2, exponent)\r\n\t//! The significand is returned by the function and the\r\n\t//! exponent is returned in the parameter exp. For a\r\n\t//! floating-point value of zero, the significant and exponent\r\n\t//! are both zero. For a floating-point value that is an\r\n\t//! infinity or is not a number, the results are undefined.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\t//detail::fvec4SIMD frexp(detail::fvec4SIMD const & x, detail::ivec4SIMD & exp);\r\n\r\n\t//! Builds a floating-point number from x and the\r\n\t//! corresponding integral exponent of two in exp, returning:\r\n\t//! significand * exp(2, exponent)\r\n\t//! If this product is too large to be represented in the\r\n\t//! floating-point type, the result is undefined.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\t//detail::fvec4SIMD ldexp(detail::fvec4SIMD const & x, detail::ivec4SIMD const & exp);\r\n\r\n\t//! Returns the length of x, i.e., sqrt(x * x).\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tfloat length(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns the length of x, i.e., sqrt(x * x).\r\n\t//! Less accurate but much faster than simdLength.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tfloat fastLength(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns the length of x, i.e., sqrt(x * x).\r\n\t//! Slightly more accurate but much slower than simdLength.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tfloat niceLength(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns the length of x, i.e., sqrt(x * x).\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD length4(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns the length of x, i.e., sqrt(x * x).\r\n\t//! Less accurate but much faster than simdLength4.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD fastLength4(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns the length of x, i.e., sqrt(x * x).\r\n\t//! Slightly more accurate but much slower than simdLength4.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD niceLength4(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tfloat distance(\r\n\t\tdetail::fvec4SIMD const & p0,\r\n\t\tdetail::fvec4SIMD const & p1);\r\n\r\n\t//! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD distance4(\r\n\t\tdetail::fvec4SIMD const & p0,\r\n\t\tdetail::fvec4SIMD const & p1);\r\n\r\n\t//! Returns the dot product of x and y, i.e., result = x * y.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tfloat simdDot(\r\n\t\tdetail::fvec4SIMD const & x,\r\n\t\tdetail::fvec4SIMD const & y);\r\n\r\n\t//! Returns the dot product of x and y, i.e., result = x * y.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD dot4(\r\n\t\tdetail::fvec4SIMD const & x,\r\n\t\tdetail::fvec4SIMD const & y);\r\n\r\n\t//! Returns the cross product of x and y.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD cross(\r\n\t\tdetail::fvec4SIMD const & x,\r\n\t\tdetail::fvec4SIMD const & y);\r\n\r\n\t//! Returns a vector in the same direction as x but with length of 1.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD normalize(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns a vector in the same direction as x but with length of 1.\r\n\t//! Less accurate but much faster than simdNormalize.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD fastNormalize(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! If dot(Nref, I) < 0.0, return N, otherwise, return -N.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD simdFaceforward(\r\n\t\tdetail::fvec4SIMD const & N,\r\n\t\tdetail::fvec4SIMD const & I,\r\n\t\tdetail::fvec4SIMD const & Nref);\r\n\r\n\t//! For the incident vector I and surface orientation N,\r\n\t//! returns the reflection direction : result = I - 2.0 * dot(N, I) * N.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD reflect(\r\n\t\tdetail::fvec4SIMD const & I,\r\n\t\tdetail::fvec4SIMD const & N);\r\n\r\n\t//! For the incident vector I and surface normal N,\r\n\t//! and the ratio of indices of refraction eta,\r\n\t//! return the refraction vector.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD refract(\r\n\t\tdetail::fvec4SIMD const & I,\r\n\t\tdetail::fvec4SIMD const & N,\r\n\t\tfloat const & eta);\r\n\r\n\t//! Returns the positive square root of x.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD sqrt(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns the positive square root of x with the nicest quality but very slow.\r\n\t//! Slightly more accurate but much slower than simdSqrt.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD niceSqrt(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns the positive square root of x\r\n\t//! Less accurate but much faster than sqrt.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD fastSqrt(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns the reciprocal of the positive square root of x.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD inversesqrt(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns the reciprocal of the positive square root of x.\r\n\t//! Faster than inversesqrt but less accurate.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD fastInversesqrt(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"simd_vec4.inl\"\r\n\r\n#if (GLM_COMPILER & GLM_COMPILER_VC)\r\n#\tpragma warning(pop)\r\n#endif\r\n\r\n#endif//(GLM_ARCH != GLM_ARCH_PURE)\r\n\r\n#endif//GLM_GTX_simd_vec4\r\n"
  },
  {
    "path": "cpu/glm/gtx/simd_vec4.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2009-05-07\r\n// Updated : 2009-05-07\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/simd_vec4.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail{\r\n\r\ntemplate <int Value>\r\nstruct mask\r\n{\r\n\tenum{value = Value};\r\n};\r\n\r\n//////////////////////////////////////\r\n// Implicit basic constructors\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD()\r\n#ifdef GLM_SIMD_ENABLE_DEFAULT_INIT\r\n    : Data(_mm_set_ps(0.0f, 0.0f, 0.0f, 0.0f))\r\n#endif\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(__m128 const & Data) :\r\n\tData(Data)\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(fvec4SIMD const & v) :\r\n\tData(v.Data)\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec4 const & v) :\r\n\tData(_mm_set_ps(v.w, v.z, v.y, v.x))\r\n{}\r\n\r\n//////////////////////////////////////\r\n// Explicit basic constructors\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s) :\r\n\tData(_mm_set1_ps(s))\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & x, float const & y, float const & z, float const & w) :\r\n//\t\tData(_mm_setr_ps(x, y, z, w))\r\n\tData(_mm_set_ps(w, z, y, x))\r\n{}\r\n/*\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const v[4]) :\r\n\tData(_mm_load_ps(v))\r\n{}\r\n*/\r\n//////////////////////////////////////\r\n// Swizzle constructors\r\n\r\n//fvec4SIMD(ref4<float> const & r);\r\n\r\n//////////////////////////////////////\r\n// Conversion vector constructors\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec2 const & v, float const & s1, float const & s2) :\r\n\tData(_mm_set_ps(s2, s1, v.y, v.x))\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s1, vec2 const & v, float const & s2) :\r\n\tData(_mm_set_ps(s2, v.y, v.x, s1))\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s1, float const & s2, vec2 const & v) :\r\n\tData(_mm_set_ps(v.y, v.x, s2, s1))\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec3 const & v, float const & s) :\r\n\tData(_mm_set_ps(s, v.z, v.y, v.x))\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s, vec3 const & v) :\r\n\tData(_mm_set_ps(v.z, v.y, v.x, s))\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec2 const & v1, vec2 const & v2) :\r\n\tData(_mm_set_ps(v2.y, v2.x, v1.y, v1.x))\r\n{}\r\n\r\n//GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(ivec4SIMD const & v) :\r\n//\tData(_mm_cvtepi32_ps(v.Data))\r\n//{}\r\n\r\n//////////////////////////////////////\r\n// Unary arithmetic operators\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator=(fvec4SIMD const & v)\r\n{\r\n\tthis->Data = v.Data;\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator+=(float const & s)\r\n{\r\n\tthis->Data = _mm_add_ps(Data, _mm_set_ps1(s));\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator+=(fvec4SIMD const & v)\r\n{\r\n\tthis->Data = _mm_add_ps(this->Data , v.Data);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator-=(float const & s)\r\n{\r\n\tthis->Data = _mm_sub_ps(Data, _mm_set_ps1(s));\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator-=(fvec4SIMD const & v)\r\n{\r\n\tthis->Data = _mm_sub_ps(this->Data , v.Data);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator*=(float const & s)\r\n{\r\n\tthis->Data = _mm_mul_ps(this->Data, _mm_set_ps1(s));\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator*=(fvec4SIMD const & v)\r\n{\r\n\tthis->Data = _mm_mul_ps(this->Data , v.Data);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator/=(float const & s)\r\n{\r\n\tthis->Data = _mm_div_ps(Data, _mm_set1_ps(s));\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator/=(fvec4SIMD const & v)\r\n{\r\n\tthis->Data = _mm_div_ps(this->Data , v.Data);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator++()\r\n{\r\n\tthis->Data = _mm_add_ps(this->Data , glm::detail::one);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator--()\r\n{\r\n\tthis->Data = _mm_sub_ps(this->Data, glm::detail::one);\r\n\treturn *this;\r\n}\r\n\r\n//////////////////////////////////////\r\n// Swizzle operators\r\n\r\ntemplate <comp X, comp Y, comp Z, comp W>\r\nGLM_FUNC_QUALIFIER fvec4SIMD fvec4SIMD::swizzle() const\r\n{\r\n\t__m128 Data = _mm_shuffle_ps(\r\n\t\tthis->Data, this->Data, \r\n\t\tmask<(W << 6) | (Z << 4) | (Y << 2) | (X << 0)>::value);\r\n\treturn fvec4SIMD(Data);\r\n}\r\n\r\ntemplate <comp X, comp Y, comp Z, comp W>\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::swizzle()\r\n{\r\n\tthis->Data = _mm_shuffle_ps(\r\n\t\tthis->Data, this->Data, \r\n\t\tmask<(W << 6) | (Z << 4) | (Y << 2) | (X << 0)>::value);\r\n\treturn *this;\r\n}\r\n\r\n// operator+\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator+ (fvec4SIMD const & v, float s)\r\n{\r\n\treturn fvec4SIMD(_mm_add_ps(v.Data, _mm_set1_ps(s)));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator+ (float s, fvec4SIMD const & v)\r\n{\r\n\treturn fvec4SIMD(_mm_add_ps(_mm_set1_ps(s), v.Data));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator+ (fvec4SIMD const & v1, fvec4SIMD const & v2)\r\n{\r\n\treturn fvec4SIMD(_mm_add_ps(v1.Data, v2.Data));\r\n}\r\n\r\n//operator-\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v, float s)\r\n{\r\n\treturn fvec4SIMD(_mm_sub_ps(v.Data, _mm_set1_ps(s)));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator- (float s, fvec4SIMD const & v)\r\n{\r\n\treturn fvec4SIMD(_mm_sub_ps(_mm_set1_ps(s), v.Data));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v1, fvec4SIMD const & v2)\r\n{\r\n\treturn fvec4SIMD(_mm_sub_ps(v1.Data, v2.Data));\r\n}\r\n\r\n//operator*\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator* (fvec4SIMD const & v, float s)\r\n{\r\n\t__m128 par0 = v.Data;\r\n\t__m128 par1 = _mm_set1_ps(s);\r\n\treturn fvec4SIMD(_mm_mul_ps(par0, par1));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator* (float s, fvec4SIMD const & v)\r\n{\r\n\t__m128 par0 = _mm_set1_ps(s);\r\n\t__m128 par1 = v.Data;\r\n\treturn fvec4SIMD(_mm_mul_ps(par0, par1));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator* (fvec4SIMD const & v1, fvec4SIMD const & v2)\r\n{\r\n\treturn fvec4SIMD(_mm_mul_ps(v1.Data, v2.Data));\r\n}\r\n\r\n//operator/\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator/ (fvec4SIMD const & v, float s)\r\n{\r\n\t__m128 par0 = v.Data;\r\n\t__m128 par1 = _mm_set1_ps(s);\r\n\treturn fvec4SIMD(_mm_div_ps(par0, par1));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator/ (float s, fvec4SIMD const & v)\r\n{\r\n\t__m128 par0 = _mm_set1_ps(s);\r\n\t__m128 par1 = v.Data;\r\n\treturn fvec4SIMD(_mm_div_ps(par0, par1));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator/ (fvec4SIMD const & v1, fvec4SIMD const & v2)\r\n{\r\n\treturn fvec4SIMD(_mm_div_ps(v1.Data, v2.Data));\r\n}\r\n\r\n// Unary constant operators\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v)\r\n{\r\n\treturn fvec4SIMD(_mm_sub_ps(_mm_setzero_ps(), v.Data));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator++ (fvec4SIMD const & v, int)\r\n{\r\n\treturn fvec4SIMD(_mm_add_ps(v.Data, glm::detail::one));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator-- (fvec4SIMD const & v, int)\r\n{\r\n\treturn fvec4SIMD(_mm_sub_ps(v.Data, glm::detail::one));\r\n}\r\n\r\n}//namespace detail\r\n\r\nGLM_FUNC_QUALIFIER vec4 vec4_cast\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\tGLM_ALIGN(16) vec4 Result;\r\n\t_mm_store_ps(&Result[0], x.Data);\r\n\treturn Result;\r\n}\r\n\r\n// Other possible implementation\r\n//float abs(float a)\r\n//{\r\n//  return max(-a, a);\r\n//}\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD abs\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\treturn detail::sse_abs_ps(x.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD sign\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\treturn detail::sse_sgn_ps(x.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD floor\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\treturn detail::sse_flr_ps(x.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD trunc\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n    //return x < 0 ? -floor(-x) : floor(x);\r\n\r\n\t__m128 Flr0 = detail::sse_flr_ps(_mm_sub_ps(_mm_setzero_ps(), x.Data));\r\n\t__m128 Sub0 = _mm_sub_ps(Flr0, x.Data);\r\n\t__m128 Flr1 = detail::sse_flr_ps(x.Data);\r\n\r\n\t__m128 Cmp0 = _mm_cmplt_ps(x.Data, glm::detail::zero);\r\n\t__m128 Cmp1 = _mm_cmpnlt_ps(x.Data, glm::detail::zero);\r\n\r\n\t__m128 And0 = _mm_and_ps(Sub0, Cmp0);\r\n\t__m128 And1 = _mm_and_ps(Flr1, Cmp1);\r\n\r\n\treturn _mm_or_ps(And0, And1);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD round\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\treturn detail::sse_rnd_ps(x.Data);\r\n}\r\n\r\n//GLM_FUNC_QUALIFIER detail::fvec4SIMD roundEven\r\n//(\r\n//\tdetail::fvec4SIMD const & x\r\n//)\r\n//{\r\n\r\n//}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD ceil\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\treturn detail::sse_ceil_ps(x.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD fract\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\treturn detail::sse_frc_ps(x.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD mod\r\n(\r\n\tdetail::fvec4SIMD const & x, \r\n\tdetail::fvec4SIMD const & y\r\n)\r\n{\r\n\treturn detail::sse_mod_ps(x.Data, y.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD mod\r\n(\r\n\tdetail::fvec4SIMD const & x, \r\n\tfloat const & y\r\n)\r\n{\r\n\treturn detail::sse_mod_ps(x.Data, _mm_set1_ps(y));\r\n}\r\n\r\n//GLM_FUNC_QUALIFIER detail::fvec4SIMD modf\r\n//(\r\n//\tdetail::fvec4SIMD const & x, \r\n//\tdetail::fvec4SIMD & i\r\n//)\r\n//{\r\n\r\n//}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD min\r\n(\r\n\tdetail::fvec4SIMD const & x, \r\n\tdetail::fvec4SIMD const & y\r\n)\r\n{\r\n\treturn _mm_min_ps(x.Data, y.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD min\r\n(\r\n\tdetail::fvec4SIMD const & x, \r\n\tfloat const & y\r\n)\r\n{\r\n\treturn _mm_min_ps(x.Data, _mm_set1_ps(y));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD max\r\n(\r\n\tdetail::fvec4SIMD const & x, \r\n\tdetail::fvec4SIMD const & y\r\n)\r\n{\r\n\treturn _mm_max_ps(x.Data, y.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD max\r\n(\r\n\tdetail::fvec4SIMD const & x, \r\n\tfloat const & y\r\n)\r\n{\r\n\treturn _mm_max_ps(x.Data, _mm_set1_ps(y));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD clamp\r\n(\r\n\tdetail::fvec4SIMD const & x, \r\n\tdetail::fvec4SIMD const & minVal, \r\n\tdetail::fvec4SIMD const & maxVal\r\n)\r\n{\r\n\treturn detail::sse_clp_ps(x.Data, minVal.Data, maxVal.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD clamp\r\n(\r\n\tdetail::fvec4SIMD const & x, \r\n\tfloat const & minVal, \r\n\tfloat const & maxVal\r\n) \r\n{\r\n\treturn detail::sse_clp_ps(x.Data, _mm_set1_ps(minVal), _mm_set1_ps(maxVal));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD mix\r\n(\r\n\tdetail::fvec4SIMD const & x, \r\n\tdetail::fvec4SIMD const & y, \r\n\tdetail::fvec4SIMD const & a\r\n)\r\n{\r\n\t__m128 Sub0 = _mm_sub_ps(y.Data, x.Data);\r\n\t__m128 Mul0 = _mm_mul_ps(a.Data, Sub0);\r\n\treturn _mm_add_ps(x.Data, Mul0);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD step\r\n(\r\n\tdetail::fvec4SIMD const & edge, \r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\t__m128 cmp0 = _mm_cmpngt_ps(x.Data, edge.Data);\r\n\treturn _mm_max_ps(_mm_min_ps(cmp0, _mm_setzero_ps()), detail::one);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD step\r\n(\r\n\tfloat const & edge, \r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\t__m128 cmp0 = _mm_cmpngt_ps(x.Data, _mm_set1_ps(edge));\r\n\treturn _mm_max_ps(_mm_min_ps(cmp0, _mm_setzero_ps()), detail::one);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD smoothstep\r\n(\r\n\tdetail::fvec4SIMD const & edge0, \r\n\tdetail::fvec4SIMD const & edge1, \r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\treturn detail::sse_ssp_ps(edge0.Data, edge1.Data, x.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD smoothstep\r\n(\r\n\tfloat const & edge0, \r\n\tfloat const & edge1, \r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\treturn detail::sse_ssp_ps(_mm_set1_ps(edge0), _mm_set1_ps(edge1), x.Data);\r\n}\r\n\r\n//GLM_FUNC_QUALIFIER bvec4 isnan(detail::fvec4SIMD const & x)\r\n//{\r\n\r\n//}\r\n\r\n//GLM_FUNC_QUALIFIER bvec4 isinf(detail::fvec4SIMD const & x)\r\n//{\r\n\r\n//}\r\n\r\n//GLM_FUNC_QUALIFIER detail::ivec4SIMD floatBitsToInt\r\n//(\r\n//\tdetail::fvec4SIMD const & value\r\n//)\r\n//{\r\n\r\n//}\r\n\r\n//GLM_FUNC_QUALIFIER detail::fvec4SIMD intBitsToFloat\r\n//(\r\n//\tdetail::ivec4SIMD const & value\r\n//)\r\n//{\r\n\r\n//}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD fma\r\n(\r\n\tdetail::fvec4SIMD const & a, \r\n\tdetail::fvec4SIMD const & b, \r\n\tdetail::fvec4SIMD const & c\r\n)\r\n{\r\n\treturn _mm_add_ps(_mm_mul_ps(a.Data, b.Data), c.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER float length\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\tdetail::fvec4SIMD dot0 = detail::sse_dot_ss(x.Data, x.Data);\r\n\tdetail::fvec4SIMD sqt0 = sqrt(dot0);\r\n\tfloat Result = 0;\r\n\t_mm_store_ss(&Result, sqt0.Data);\r\n\treturn Result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER float fastLength\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\tdetail::fvec4SIMD dot0 = detail::sse_dot_ss(x.Data, x.Data);\r\n\tdetail::fvec4SIMD sqt0 = fastSqrt(dot0);\r\n\tfloat Result = 0;\r\n\t_mm_store_ss(&Result, sqt0.Data);\r\n\treturn Result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER float niceLength\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\tdetail::fvec4SIMD dot0 = detail::sse_dot_ss(x.Data, x.Data);\r\n\tdetail::fvec4SIMD sqt0 = niceSqrt(dot0);\r\n\tfloat Result = 0;\r\n\t_mm_store_ss(&Result, sqt0.Data);\r\n\treturn Result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD length4\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\treturn sqrt(dot4(x, x));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD fastLength4\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\treturn fastSqrt(dot4(x, x));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD niceLength4\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\treturn niceSqrt(dot4(x, x));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER float distance\r\n(\r\n\tdetail::fvec4SIMD const & p0,\r\n\tdetail::fvec4SIMD const & p1\r\n)\r\n{\r\n\tfloat Result = 0;\r\n\t_mm_store_ss(&Result, detail::sse_dst_ps(p0.Data, p1.Data));\r\n\treturn Result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD distance4\r\n(\r\n\tdetail::fvec4SIMD const & p0,\r\n\tdetail::fvec4SIMD const & p1\r\n)\r\n{\r\n\treturn detail::sse_dst_ps(p0.Data, p1.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER float dot\r\n(\r\n\tdetail::fvec4SIMD const & x,\r\n\tdetail::fvec4SIMD const & y\r\n)\r\n{\r\n\tfloat Result = 0;\r\n\t_mm_store_ss(&Result, detail::sse_dot_ss(x.Data, y.Data));\r\n\treturn Result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD dot4\r\n(\r\n\tdetail::fvec4SIMD const & x,\r\n\tdetail::fvec4SIMD const & y\r\n)\r\n{\r\n\treturn detail::sse_dot_ps(x.Data, y.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD cross\r\n(\r\n\tdetail::fvec4SIMD const & x,\r\n\tdetail::fvec4SIMD const & y\r\n)\r\n{\r\n\treturn detail::sse_xpd_ps(x.Data, y.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD normalize\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\t__m128 dot0 = detail::sse_dot_ps(x.Data, x.Data);\r\n\t__m128 isr0 = inversesqrt(detail::fvec4SIMD(dot0)).Data;\r\n\t__m128 mul0 = _mm_mul_ps(x.Data, isr0);\r\n\treturn mul0;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD fastNormalize\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\t__m128 dot0 = detail::sse_dot_ps(x.Data, x.Data);\r\n\t__m128 isr0 = fastInversesqrt(dot0).Data;\r\n\t__m128 mul0 = _mm_mul_ps(x.Data, isr0);\r\n\treturn mul0;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD faceforward\r\n(\r\n\tdetail::fvec4SIMD const & N,\r\n\tdetail::fvec4SIMD const & I,\r\n\tdetail::fvec4SIMD const & Nref\r\n)\r\n{\r\n\treturn detail::sse_ffd_ps(N.Data, I.Data, Nref.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD reflect\r\n(\r\n\tdetail::fvec4SIMD const & I,\r\n\tdetail::fvec4SIMD const & N\r\n)\r\n{\r\n\treturn detail::sse_rfe_ps(I.Data, N.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD refract\r\n(\r\n\tdetail::fvec4SIMD const & I,\r\n\tdetail::fvec4SIMD const & N,\r\n\tfloat const & eta\r\n)\r\n{\r\n\treturn detail::sse_rfa_ps(I.Data, N.Data, _mm_set1_ps(eta));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD sqrt(detail::fvec4SIMD const & x)\r\n{\r\n\treturn _mm_mul_ps(inversesqrt(x).Data, x.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD niceSqrt(detail::fvec4SIMD const & x)\r\n{\r\n\treturn _mm_sqrt_ps(x.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD fastSqrt(detail::fvec4SIMD const & x)\r\n{\r\n\treturn _mm_mul_ps(fastInversesqrt(x.Data).Data, x.Data);\r\n}\r\n\r\n// SSE scalar reciprocal sqrt using rsqrt op, plus one Newton-Rhaphson iteration\r\n// By Elan Ruskin, http://assemblyrequired.crashworks.org/\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD inversesqrt(detail::fvec4SIMD const & x)\r\n{\r\n\tGLM_ALIGN(4) static const __m128 three = {3, 3, 3, 3}; // aligned consts for fast load\r\n\tGLM_ALIGN(4) static const __m128 half = {0.5,0.5,0.5,0.5};\r\n\r\n\t__m128 recip = _mm_rsqrt_ps(x.Data);  // \"estimate\" opcode\r\n\t__m128 halfrecip = _mm_mul_ps(half, recip);\r\n\t__m128 threeminus_xrr = _mm_sub_ps(three, _mm_mul_ps(x.Data, _mm_mul_ps(recip, recip)));\r\n\treturn _mm_mul_ps(halfrecip, threeminus_xrr);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD fastInversesqrt(detail::fvec4SIMD const & x)\r\n{\r\n\treturn _mm_rsqrt_ps(x.Data);\r\n}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/spline.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_spline\r\n/// @file glm/gtx/spline.hpp\r\n/// @date 2007-01-25 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_spline GLM_GTX_spline\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Spline functions\r\n/// \r\n/// <glm/gtx/spline.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_spline\r\n#define GLM_GTX_spline\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtx/optimum_pow.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_spline extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_spline\r\n\t/// @{\r\n\r\n\t//! Return a point from a catmull rom curve.\r\n\t/// @see gtx_spline extension.\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType catmullRom(\r\n\t\tgenType const & v1, \r\n\t\tgenType const & v2, \r\n\t\tgenType const & v3, \r\n\t\tgenType const & v4, \r\n\t\ttypename genType::value_type const & s);\r\n\t\t\r\n\t//! Return a point from a hermite curve.\r\n\t/// @see gtx_spline extension.\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType hermite(\r\n\t\tgenType const & v1, \r\n\t\tgenType const & t1, \r\n\t\tgenType const & v2, \r\n\t\tgenType const & t2, \r\n\t\ttypename genType::value_type const & s);\r\n\t\t\r\n\t//! Return a point from a cubic curve. \r\n\t/// @see gtx_spline extension.\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType cubic(\r\n\t\tgenType const & v1, \r\n\t\tgenType const & v2, \r\n\t\tgenType const & v3, \r\n\t\tgenType const & v4, \r\n\t\ttypename genType::value_type const & s);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"spline.inl\"\r\n\r\n#endif//GLM_GTX_spline\r\n\r\n"
  },
  {
    "path": "cpu/glm/gtx/spline.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-01-25\r\n// Updated : 2009-02-19\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/spline.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\n\r\ntemplate <typename genType>\r\nGLM_FUNC_QUALIFIER genType catmullRom\r\n(\r\n\tgenType const & v1, \r\n\tgenType const & v2, \r\n\tgenType const & v3, \r\n\tgenType const & v4, \r\n\ttypename genType::value_type const & s\r\n)\r\n{\r\n\ttypename genType::value_type s1 = s;\r\n\ttypename genType::value_type s2 = pow2(s);\r\n\ttypename genType::value_type s3 = pow3(s);\r\n\r\n\ttypename genType::value_type f1 = -s3 + typename genType::value_type(2) * s2 - s;\r\n\ttypename genType::value_type f2 = typename genType::value_type(3) * s3 - typename genType::value_type(5) * s2 + typename genType::value_type(2);\r\n\ttypename genType::value_type f3 = typename genType::value_type(-3) * s3 + typename genType::value_type(4) * s2 + s;\r\n\ttypename genType::value_type f4 = s3 - s2;\r\n\r\n\treturn (f1 * v1 + f2 * v2 + f3 * v3 + f4 * v4) / typename genType::value_type(2);\r\n\r\n}\r\n\r\ntemplate <typename genType>\r\nGLM_FUNC_QUALIFIER genType hermite\r\n(\r\n\tgenType const & v1, \r\n\tgenType const & t1, \r\n\tgenType const & v2, \r\n\tgenType const & t2, \r\n\ttypename genType::value_type const & s\r\n)\r\n{\r\n\ttypename genType::value_type s1 = s;\r\n\ttypename genType::value_type s2 = pow2(s);\r\n\ttypename genType::value_type s3 = pow3(s);\r\n\r\n\ttypename genType::value_type f1 = typename genType::value_type(2) * s3 - typename genType::value_type(3) * s2 + typename genType::value_type(1);\r\n\ttypename genType::value_type f2 = typename genType::value_type(-2) * s3 + typename genType::value_type(3) * s2;\r\n\ttypename genType::value_type f3 = s3 - typename genType::value_type(2) * s2 + s;\r\n\ttypename genType::value_type f4 = s3 - s2;\r\n\r\n\treturn f1 * v1 + f2 * v2 + f3 * t1 + f4 * t2;\r\n}\r\n\r\ntemplate <typename genType>\r\nGLM_FUNC_QUALIFIER genType cubic\r\n(\r\n\tgenType const & v1, \r\n\tgenType const & v2, \r\n\tgenType const & v3, \r\n\tgenType const & v4, \r\n\ttypename genType::value_type const & s\r\n)\r\n{\r\n\treturn ((v1 * s + v2) * s + v3) * s + v4;\r\n}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/std_based_type.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_std_based_type\r\n/// @file glm/gtx/std_based_type.hpp\r\n/// @date 2008-06-08 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_extented_min_max (dependence)\r\n///\r\n/// @defgroup gtx_std_based_type GLM_GTX_std_based_type\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Adds vector types based on STL value types.\r\n/// <glm/gtx/std_based_type.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_std_based_type\r\n#define GLM_GTX_std_based_type\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include <cstdlib>\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_std_based_type extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_std_based_type\r\n\t/// @{\r\n\t\r\n\t/// Vector type based of two std::size_t components.\r\n\t/// @see GLM_GTX_std_based_type\r\n\ttypedef detail::tvec2<std::size_t, defaultp>\t\tsize2;\r\n\t\r\n\t/// Vector type based of three std::size_t components.\r\n\t/// @see GLM_GTX_std_based_type\r\n\ttypedef detail::tvec3<std::size_t, defaultp>\t\tsize3;\r\n\r\n\t/// Vector type based of four std::size_t components.\r\n\t/// @see GLM_GTX_std_based_type\r\n\ttypedef detail::tvec4<std::size_t, defaultp>\t\tsize4;\r\n\r\n\t/// Vector type based of two std::size_t components.\r\n\t/// @see GLM_GTX_std_based_type\r\n\ttypedef detail::tvec2<std::size_t, defaultp>\t\tsize2_t;\r\n\t\r\n\t/// Vector type based of three std::size_t components.\r\n\t/// @see GLM_GTX_std_based_type\r\n\ttypedef detail::tvec3<std::size_t, defaultp>\t\tsize3_t;\r\n\t\r\n\t/// Vector type based of four std::size_t components.\r\n\t/// @see GLM_GTX_std_based_type\r\n\ttypedef detail::tvec4<std::size_t, defaultp>\t\tsize4_t;\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"std_based_type.inl\"\r\n\r\n#endif//GLM_GTX_std_based_type\r\n"
  },
  {
    "path": "cpu/glm/gtx/std_based_type.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2008-06-08\r\n// Updated : 2008-06-08\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/std_based_type.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\r\n}\r\n"
  },
  {
    "path": "cpu/glm/gtx/string_cast.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_string_cast\r\n/// @file glm/gtx/string_cast.hpp\r\n/// @date 2008-04-26 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_half_float (dependence)\r\n/// @see gtx_integer (dependence)\r\n/// @see gtx_quaternion (dependence)\r\n///\r\n/// @defgroup gtx_string_cast GLM_GTX_string_cast\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Setup strings for GLM type values\r\n/// \r\n/// <glm/gtx/string_cast.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_string_cast\r\n#define GLM_GTX_string_cast\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtx/integer.hpp\"\r\n#include \"../gtx/quaternion.hpp\"\r\n#include <string>\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_string_cast extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_string_cast\r\n\t/// @{\r\n\r\n\t/// Create a string from a GLM type value.\r\n\t/// @see gtx_string_cast extension.\r\n\ttemplate <typename genType> \r\n\tstd::string to_string(genType const & x);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"string_cast.inl\"\r\n\r\n#endif//GLM_GTX_string_cast\r\n"
  },
  {
    "path": "cpu/glm/gtx/string_cast.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2006 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2008-04-27\r\n// Updated : 2008-05-24\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/string_cast.hpp\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include <cstdarg>\r\n#include <cstdio>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\tGLM_FUNC_QUALIFIER std::string format(const char* msg, ...)\r\n\t{\r\n\t\tstd::size_t const STRING_BUFFER(4096);\r\n\t\tchar text[STRING_BUFFER];\r\n\t\tva_list list;\r\n\r\n\t\tif(msg == 0)\r\n\t\t\treturn std::string();\r\n\r\n\t\tva_start(list, msg);\r\n#if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC8))\r\n\t\t\tvsprintf_s(text, STRING_BUFFER, msg, list);\r\n#else//\r\n\t\t\tvsprintf(text, msg, list);\r\n#endif//\r\n\t\tva_end(list);\r\n\r\n\t\treturn std::string(text);\r\n\t}\r\n\r\n\tstatic const char* True = \"true\";\r\n\tstatic const char* False = \"false\";\r\n}//namespace detail\r\n\r\n\t////////////////////////////////\r\n\t// Scalars\r\n\r\n\tGLM_FUNC_QUALIFIER std::string to_string(float x)\r\n\t{\r\n\t\treturn detail::format(\"float(%f)\", x);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER std::string to_string(double x)\r\n\t{\r\n\t\treturn detail::format(\"double(%f)\", x);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER std::string to_string(int x)\r\n\t{\r\n\t\treturn detail::format(\"int(%d)\", x);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER std::string to_string(unsigned int x)\r\n\t{\r\n\t\treturn detail::format(\"uint(%d)\", x);\r\n\t}\r\n\r\n\t////////////////////////////////\r\n\t// Bool vectors\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec2<bool, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"bvec2(%s, %s)\",\r\n\t\t\tv.x ? detail::True : detail::False,\r\n\t\t\tv.y ? detail::True : detail::False);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec3<bool, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"bvec3(%s, %s, %s)\",\r\n\t\t\tv.x ? detail::True : detail::False,\r\n\t\t\tv.y ? detail::True : detail::False,\r\n\t\t\tv.z ? detail::True : detail::False);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec4<bool, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"bvec4(%s, %s, %s, %s)\",\r\n\t\t\tv.x ? detail::True : detail::False,\r\n\t\t\tv.y ? detail::True : detail::False,\r\n\t\t\tv.z ? detail::True : detail::False,\r\n\t\t\tv.w ? detail::True : detail::False);\r\n\t}\r\n\r\n\t////////////////////////////////\r\n\t// Float vectors\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec2<float, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"fvec2(%f, %f)\", v.x, v.y);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec3<float, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"fvec3(%f, %f, %f)\", v.x, v.y, v.z);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec4<float, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"fvec4(%f, %f, %f, %f)\", v.x, v.y, v.z, v.w);\r\n\t}\r\n\r\n\t////////////////////////////////\r\n\t// Double vectors\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec2<double, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dvec2(%f, %f)\", v.x, v.y);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec3<double, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dvec3(%f, %f, %f)\", v.x, v.y, v.z);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec4<double, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dvec4(%f, %f, %f, %f)\", v.x, v.y, v.z, v.w);\r\n\t}\r\n\r\n\t////////////////////////////////\r\n\t// Int vectors\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec2<int, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"ivec2(%d, %d)\", v.x, v.y);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec3<int, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"ivec3(%d, %d, %d)\", v.x, v.y, v.z);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec4<int, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"ivec4(%d, %d, %d, %d)\", v.x, v.y, v.z, v.w);\r\n\t}\r\n\r\n\t////////////////////////////////\r\n\t// Unsigned int vectors\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec2<unsigned int, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"uvec2(%d, %d)\", v.x, v.y);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec3<unsigned int, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"uvec3(%d, %d, %d)\", v.x, v.y, v.z);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec4<unsigned int, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"uvec4(%d, %d, %d, %d)\", v.x, v.y, v.z, v.w);\r\n\t}\r\n\r\n\t////////////////////////////////\r\n\t// Float matrices\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat2x2<float, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"mat2x2((%f, %f), (%f, %f))\", \r\n\t\t\tx[0][0], x[0][1], \r\n\t\t\tx[1][0], x[1][1]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat2x3<float, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"mat2x3((%f, %f, %f), (%f, %f, %f))\", \r\n\t\t\tx[0][0], x[0][1], x[0][2], \r\n\t\t\tx[1][0], x[1][1], x[1][2]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat2x4<float, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"mat2x4((%f, %f, %f, %f), (%f, %f, %f, %f))\", \r\n\t\t\tx[0][0], x[0][1], x[0][2], x[0][3], \r\n\t\t\tx[1][0], x[1][1], x[1][2], x[1][3]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat3x2<float, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"mat3x2((%f, %f), (%f, %f), (%f, %f))\", \r\n\t\t\tx[0][0], x[0][1], \r\n\t\t\tx[1][0], x[1][1], \r\n\t\t\tx[2][0], x[2][1]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat3x3<float, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"mat3x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f))\", \r\n\t\t\tx[0][0], x[0][1], x[0][2], \r\n\t\t\tx[1][0], x[1][1], x[1][2],\r\n\t\t\tx[2][0], x[2][1], x[2][2]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat3x4<float, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"mat3x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))\", \r\n\t\t\tx[0][0], x[0][1], x[0][2], x[0][3], \r\n\t\t\tx[1][0], x[1][1], x[1][2], x[1][3], \r\n\t\t\tx[2][0], x[2][1], x[2][2], x[2][3]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat4x2<float, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"mat4x2((%f, %f), (%f, %f), (%f, %f), (%f, %f))\", \r\n\t\t\tx[0][0], x[0][1], \r\n\t\t\tx[1][0], x[1][1], \r\n\t\t\tx[2][0], x[2][1], \r\n\t\t\tx[3][0], x[3][1]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat4x3<float, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"mat4x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f), (%f, %f, %f))\", \r\n\t\t\tx[0][0], x[0][1], x[0][2],\r\n\t\t\tx[1][0], x[1][1], x[1][2], \r\n\t\t\tx[2][0], x[2][1], x[2][2],\r\n\t\t\tx[3][0], x[3][1], x[3][2]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat4x4<float, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"mat4x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))\", \r\n\t\t\tx[0][0], x[0][1], x[0][2], x[0][3],\r\n\t\t\tx[1][0], x[1][1], x[1][2], x[1][3],\r\n\t\t\tx[2][0], x[2][1], x[2][2], x[2][3],\r\n\t\t\tx[3][0], x[3][1], x[3][2], x[3][3]);\r\n\t}\r\n\r\n\t////////////////////////////////\r\n\t// Double matrices\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat2x2<double, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dmat2x2((%f, %f), (%f, %f))\",\r\n\t\t\tx[0][0], x[0][1], \r\n\t\t\tx[1][0], x[1][1]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat2x3<double, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dmat2x3((%f, %f, %f), (%f, %f, %f))\",\r\n\t\t\tx[0][0], x[0][1], x[0][2], \r\n\t\t\tx[1][0], x[1][1], x[1][2]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat2x4<double, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dmat2x4((%f, %f, %f, %f), (%f, %f, %f, %f))\",\r\n\t\t\tx[0][0], x[0][1], x[0][2], x[0][3], \r\n\t\t\tx[1][0], x[1][1], x[1][2], x[1][3]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat3x2<double, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dmat3x2((%f, %f), (%f, %f), (%f, %f))\",\r\n\t\t\tx[0][0], x[0][1], \r\n\t\t\tx[1][0], x[1][1],\r\n\t\t\tx[2][0], x[2][1]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat3x3<double, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dmat3x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f))\",\r\n\t\t\tx[0][0], x[0][1], x[0][2], \r\n\t\t\tx[1][0], x[1][1], x[1][2],\r\n\t\t\tx[2][0], x[2][1], x[2][2]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat3x4<double, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dmat3x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))\",\r\n\t\t\tx[0][0], x[0][1], x[0][2], x[0][3], \r\n\t\t\tx[1][0], x[1][1], x[1][2], x[1][3],\r\n\t\t\tx[2][0], x[2][1], x[2][2], x[2][3]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat4x2<double, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dmat4x2((%f, %f), (%f, %f), (%f, %f), (%f, %f))\",\r\n\t\t\tx[0][0], x[0][1], \r\n\t\t\tx[1][0], x[1][1], \r\n\t\t\tx[2][0], x[2][1], \r\n\t\t\tx[3][0], x[3][1]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat4x3<double, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dmat4x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f), (%f, %f, %f))\",\r\n\t\t\tx[0][0], x[0][1], x[0][2], \r\n\t\t\tx[1][0], x[1][1], x[1][2], \r\n\t\t\tx[2][0], x[2][1], x[2][2], \r\n\t\t\tx[3][0], x[3][1], x[3][2]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat4x4<double, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dmat4x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))\",\r\n\t\t\tx[0][0], x[0][1], x[0][2], x[0][3],\r\n\t\t\tx[1][0], x[1][1], x[1][2], x[1][3],\r\n\t\t\tx[2][0], x[2][1], x[2][2], x[2][3],\r\n\t\t\tx[3][0], x[3][1], x[3][2], x[3][3]);\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/transform.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_transform\r\n/// @file glm/gtx/transform.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_matrix_transform (dependence)\r\n/// @see gtx_transform\r\n/// @see gtx_transform2\r\n///\r\n/// @defgroup gtx_transform GLM_GTX_transform\r\n/// @ingroup gtx\r\n///\r\n/// @brief Add transformation matrices\r\n/// \r\n/// <glm/gtx/transform.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_transform \r\n#define GLM_GTX_transform\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtc/matrix_transform.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_transform extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_transform\r\n\t/// @{\r\n\r\n\t/// Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars. \r\n\t/// - From \\link gtx_transform GLM_GTX_transform \\endlink extension\r\n\t/// - See also: \\link glm::translate GLM_GTC_matrix_transform \\endlink\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> translate(\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\r\n\t/// Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. \r\n\t/// - From \\link gtx_transform GLM_GTX_transform \\endlink extension\r\n\t/// - See also: \\link glm::rotate GLM_GTC_matrix_transform \\endlink\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> rotate(\r\n\t\tT angle, \r\n\t\tdetail::tvec3<T, P> const & v);\r\n\r\n\t/// Transforms a matrix with a scale 4 * 4 matrix created from a vector of 3 components.\r\n\t/// - From \\link gtx_transform GLM_GTX_transform \\endlink extension\r\n\t/// - See also: \\link glm::scale GLM_GTC_matrix_transform \\endlink\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> scale(\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"transform.inl\"\r\n\r\n#endif//GLM_GTX_transform\r\n"
  },
  {
    "path": "cpu/glm/gtx/transform.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2009-04-29\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/transform.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> translate(\r\n\t\tdetail::tvec3<T, P> const & v)\r\n\t{\r\n\t\treturn translate(\r\n\t\t\tdetail::tmat4x4<T, P>(1.0f), v);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> rotate(\r\n\t\tT angle, \r\n\t\tdetail::tvec3<T, P> const & v)\r\n\t{\r\n\t\treturn rotate(\r\n\t\t\tdetail::tmat4x4<T, P>(1), angle, v);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> scale(\r\n\t\tdetail::tvec3<T, P> const & v)\r\n\t{\r\n\t\treturn scale(\r\n\t\t\tdetail::tmat4x4<T, P>(1.0f), v);\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/transform2.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_transform2\r\n/// @file glm/gtx/transform2.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_transform (dependence)\r\n///\r\n/// @defgroup gtx_transform2 GLM_GTX_transform2\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Add extra transformation matrices\r\n///\r\n/// <glm/gtx/transform2.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_transform2\r\n#define GLM_GTX_transform2\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtx/transform.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_transform2 extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_transform2\r\n\t/// @{\r\n\r\n\t//! Transforms a matrix with a shearing on X axis.\r\n\t//! From GLM_GTX_transform2 extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> shearX2D(\r\n\t\tdetail::tmat3x3<T, P> const & m, \r\n\t\tT y);\r\n\r\n\t//! Transforms a matrix with a shearing on Y axis.\r\n\t//! From GLM_GTX_transform2 extension.\r\n\ttemplate <typename T, precision P> \r\n\tdetail::tmat3x3<T, P> shearY2D(\r\n\t\tdetail::tmat3x3<T, P> const & m, \r\n\t\tT x);\r\n\r\n\t//! Transforms a matrix with a shearing on X axis\r\n\t//! From GLM_GTX_transform2 extension.\r\n\ttemplate <typename T, precision P> \r\n\tdetail::tmat4x4<T, P> shearX3D(\r\n\t\tconst detail::tmat4x4<T, P> & m,\r\n\t\tT y, \r\n\t\tT z);\r\n\r\n\t//! Transforms a matrix with a shearing on Y axis.\r\n\t//! From GLM_GTX_transform2 extension.\r\n\ttemplate <typename T, precision P> \r\n\tdetail::tmat4x4<T, P> shearY3D(\r\n\t\tconst detail::tmat4x4<T, P> & m, \r\n\t\tT x, \r\n\t\tT z);\r\n\r\n\t//! Transforms a matrix with a shearing on Z axis. \r\n\t//! From GLM_GTX_transform2 extension.\r\n\ttemplate <typename T, precision P> \r\n\tdetail::tmat4x4<T, P> shearZ3D(\r\n\t\tconst detail::tmat4x4<T, P> & m, \r\n\t\tT x, \r\n\t\tT y);\r\n\r\n\t//template <typename T> GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> shear(const detail::tmat4x4<T, P> & m, shearPlane, planePoint, angle)\r\n\t// Identity + tan(angle) * cross(Normal, OnPlaneVector)     0\r\n\t// - dot(PointOnPlane, normal) * OnPlaneVector              1\r\n\r\n\t// Reflect functions seem to don't work\r\n\t//template <typename T> detail::tmat3x3<T, P> reflect2D(const detail::tmat3x3<T, P> & m, const detail::tvec3<T, P>& normal){return reflect2DGTX(m, normal);}\t\t\t\t\t\t\t\t\t//!< \\brief Build a reflection matrix (from GLM_GTX_transform2 extension)\r\n\t//template <typename T> detail::tmat4x4<T, P> reflect3D(const detail::tmat4x4<T, P> & m, const detail::tvec3<T, P>& normal){return reflect3DGTX(m, normal);}\t\t\t\t\t\t\t\t\t//!< \\brief Build a reflection matrix (from GLM_GTX_transform2 extension)\r\n\t\t\r\n\t//! Build planar projection matrix along normal axis.\r\n\t//! From GLM_GTX_transform2 extension.\r\n\ttemplate <typename T, precision P> \r\n\tdetail::tmat3x3<T, P> proj2D(\r\n\t\tconst detail::tmat3x3<T, P> & m, \r\n\t\tconst detail::tvec3<T, P>& normal);\r\n\r\n\t//! Build planar projection matrix along normal axis.\r\n\t//! From GLM_GTX_transform2 extension.\r\n\ttemplate <typename T, precision P> \r\n\tdetail::tmat4x4<T, P> proj3D(\r\n\t\tconst detail::tmat4x4<T, P> & m, \r\n\t\tconst detail::tvec3<T, P>& normal);\r\n\r\n\t//! Build a scale bias matrix. \r\n\t//! From GLM_GTX_transform2 extension.\r\n\ttemplate <typename valType, precision P> \r\n\tdetail::tmat4x4<valType, P> scaleBias(\r\n\t\tvalType scale, \r\n\t\tvalType bias);\r\n\r\n\t//! Build a scale bias matrix.\r\n\t//! From GLM_GTX_transform2 extension.\r\n\ttemplate <typename valType, precision P> \r\n\tdetail::tmat4x4<valType, P> scaleBias(\r\n\t\tdetail::tmat4x4<valType, P> const & m, \r\n\t\tvalType scale, \r\n\t\tvalType bias);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"transform2.inl\"\r\n\r\n#endif//GLM_GTX_transform2\r\n"
  },
  {
    "path": "cpu/glm/gtx/transform2.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-02-28\r\n// Updated : 2005-04-23\r\n// Licence : This source is under MIT License\r\n// File : glm/gtx/transform2.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> shearX2D(\r\n\t\tconst detail::tmat3x3<T, P>& m, \r\n\t\tT s)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> r(1);\r\n\t\tr[0][1] = s;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> shearY2D(\r\n\t\tconst detail::tmat3x3<T, P>& m, \r\n\t\tT s)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> r(1);\r\n\t\tr[1][0] = s;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> shearX3D(\r\n\t\tconst detail::tmat4x4<T, P>& m, \r\n\t\tT s, \r\n\t\tT t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> r(1);\r\n\t\tr[1][0] = s;\r\n\t\tr[2][0] = t;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> shearY3D(\r\n\t\tconst detail::tmat4x4<T, P>& m, \r\n\t\tT s, \r\n\t\tT t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> r(1);\r\n\t\tr[0][1] = s;\r\n\t\tr[2][1] = t;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> shearZ3D(\r\n\t\tconst detail::tmat4x4<T, P>& m, \r\n\t\tT s, \r\n\t\tT t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> r(1);\r\n\t\tr[0][2] = s;\r\n\t\tr[1][2] = t;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> reflect2D(\r\n\t\tconst detail::tmat3x3<T, P>& m, \r\n\t\tconst detail::tvec3<T, P>& normal)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> r(1);\r\n\t\tr[0][0] = 1 - 2 * normal.x * normal.x;\r\n\t\tr[0][1] = -2 * normal.x * normal.y;\r\n\t\tr[1][0] = -2 * normal.x * normal.y;\r\n\t\tr[1][1] = 1 - 2 * normal.y * normal.y;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> reflect3D(\r\n\t\tconst detail::tmat4x4<T, P>& m, \r\n\t\tconst detail::tvec3<T, P>& normal)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> r(1);\r\n\t\tr[0][0] = 1 - 2 * normal.x * normal.x;\r\n\t\tr[0][1] = -2 * normal.x * normal.y;\r\n\t\tr[0][2] = -2 * normal.x * normal.z;\r\n\r\n\t\tr[1][0] = -2 * normal.x * normal.y;\r\n\t\tr[1][1] = 1 - 2 * normal.y * normal.y;\r\n\t\tr[1][2] = -2 * normal.y * normal.z;\r\n\r\n\t\tr[2][0] = -2 * normal.x * normal.z;\r\n\t\tr[2][1] = -2 * normal.y * normal.z;\r\n\t\tr[2][2] = 1 - 2 * normal.z * normal.z;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> proj2D(\r\n\t\tconst detail::tmat3x3<T, P>& m, \r\n\t\tconst detail::tvec3<T, P>& normal)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> r(1);\r\n\t\tr[0][0] = 1 - normal.x * normal.x;\r\n\t\tr[0][1] = - normal.x * normal.y;\r\n\t\tr[1][0] = - normal.x * normal.y;\r\n\t\tr[1][1] = 1 - normal.y * normal.y;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> proj3D(\r\n\t\tconst detail::tmat4x4<T, P>& m, \r\n\t\tconst detail::tvec3<T, P>& normal)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> r(1);\r\n\t\tr[0][0] = 1 - normal.x * normal.x;\r\n\t\tr[0][1] = - normal.x * normal.y;\r\n\t\tr[0][2] = - normal.x * normal.z;\r\n\t\tr[1][0] = - normal.x * normal.y;\r\n\t\tr[1][1] = 1 - normal.y * normal.y;\r\n\t\tr[1][2] = - normal.y * normal.z;\r\n\t\tr[2][0] = - normal.x * normal.z;\r\n\t\tr[2][1] = - normal.y * normal.z;\r\n\t\tr[2][2] = 1 - normal.z * normal.z;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> scaleBias(\r\n\t\tT scale, \r\n\t\tT bias)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> result;\r\n\t\tresult[3] = detail::tvec4<T, P>(detail::tvec3<T, P>(bias), T(1));\r\n\t\tresult[0][0] = scale;\r\n\t\tresult[1][1] = scale;\r\n\t\tresult[2][2] = scale;\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> scaleBias(\r\n\t\tconst detail::tmat4x4<T, P>& m, \r\n\t\tT scale, \r\n\t\tT bias)\r\n\t{\r\n\t\treturn m * scaleBias(scale, bias);\r\n\t}\r\n}//namespace glm\r\n\r\n"
  },
  {
    "path": "cpu/glm/gtx/ulp.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#if(defined(GLM_MESSAGES))\r\n#\tpragma message(\"GLM: GLM_GTX_ulp extension is deprecated, include GLM_GTC_ulp (glm/gtc/ulp.hpp) instead\")\r\n#endif\r\n\r\n// Promoted:\r\n#include \"../gtc/ulp.hpp\"\r\n"
  },
  {
    "path": "cpu/glm/gtx/unsigned_int.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#if(defined(GLM_MESSAGES))\r\n#\tpragma message(\"GLM: GLM_GTX_unsigned_int extension is deprecated, include GLM_GTX_integer instead\")\r\n#endif\r\n"
  },
  {
    "path": "cpu/glm/gtx/unsigned_int.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-24\r\n// Updated : 2008-10-07\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/unsigned_int.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/vec1.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_vec1\r\n/// @file glm/gtx/vec1.hpp\r\n/// @date 2010-02-08 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_vec1 GLM_GTX_vec1\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Add vec1, ivec1, uvec1 and bvec1 types.\r\n/// <glm/gtx/vec1.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_vec1\r\n#define GLM_GTX_vec1\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../detail/type_vec1.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_vec1 extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t//! 1 component vector of high precision floating-point numbers. \r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef highp_vec1_t\t\t\thighp_vec1;\r\n\r\n\t//! 1 component vector of medium precision floating-point numbers. \r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef mediump_vec1_t\t\t\tmediump_vec1;\r\n\r\n\t//! 1 component vector of low precision floating-point numbers. \r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef lowp_vec1_t\t\t\t\tlowp_vec1;\r\n\r\n\t//! 1 component vector of high precision signed integer numbers. \r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef highp_ivec1_t\t\t\thighp_ivec1;\r\n\r\n\t//! 1 component vector of medium precision signed integer numbers. \r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef mediump_ivec1_t\t\t\tmediump_ivec1;\r\n\r\n\t//! 1 component vector of low precision signed integer numbers. \r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef lowp_ivec1_t\t\t\tlowp_ivec1;\r\n\r\n\t//! 1 component vector of high precision unsigned integer numbers. \r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef highp_uvec1_t\t\t\thighp_uvec1;\r\n\r\n\t//! 1 component vector of medium precision unsigned integer numbers. \r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef mediump_uvec1_t\t\t\tmediump_uvec1;\r\n\r\n\t//! 1 component vector of low precision unsigned integer numbers. \r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef lowp_uvec1_t\t\t\tlowp_uvec1;\r\n\r\n\t//! 1 component vector of high precision boolean. \r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef highp_bvec1_t\t\t\thighp_bvec1;\r\n\r\n\t//! 1 component vector of medium precision boolean.\r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef mediump_bvec1_t\t\t\tmediump_bvec1;\r\n\r\n\t//! 1 component vector of low precision boolean.\r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef lowp_bvec1_t\t\t\tlowp_bvec1;\r\n\r\n\t//////////////////////////\r\n\t// vec1 definition\r\n\r\n#if(defined(GLM_PRECISION_HIGHP_BOOL))\r\n\ttypedef highp_bvec1\t\t\t\tbvec1;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_BOOL))\r\n\ttypedef mediump_bvec1\t\t\tbvec1;\r\n#elif(defined(GLM_PRECISION_LOWP_BOOL))\r\n\ttypedef lowp_bvec1\t\t\t\tbvec1;\r\n#else\r\n\t/// 1 component vector of boolean.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef highp_bvec1\t\t\t\tbvec1;\r\n#endif//GLM_PRECISION\r\n\r\n#if(defined(GLM_PRECISION_HIGHP_FLOAT))\r\n\ttypedef highp_vec1\t\t\t\tvec1;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))\r\n\ttypedef mediump_vec1\t\t\tvec1;\r\n#elif(defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef lowp_vec1\t\t\t\tvec1;\r\n#else\r\n\t/// 1 component vector of floating-point numbers.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef highp_vec1\t\t\t\tvec1;\r\n#endif//GLM_PRECISION\r\n\r\n#if(defined(GLM_PRECISION_HIGHP_INT))\r\n\ttypedef highp_ivec1\t\t\tivec1;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\ttypedef mediump_ivec1\t\tivec1;\r\n#elif(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_ivec1\t\t\tivec1;\r\n#else\r\n\t/// 1 component vector of signed integer numbers. \r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef highp_ivec1\t\t\tivec1;\r\n#endif//GLM_PRECISION\r\n\r\n#if(defined(GLM_PRECISION_HIGHP_UINT))\r\n\ttypedef highp_uvec1\t\t\tuvec1;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_UINT))\r\n\ttypedef mediump_uvec1\t\tuvec1;\r\n#elif(defined(GLM_PRECISION_LOWP_UINT))\r\n\ttypedef lowp_uvec1\t\t\tuvec1;\r\n#else\r\n\t/// 1 component vector of unsigned integer numbers. \r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef highp_uvec1\t\t\tuvec1;\r\n#endif//GLM_PRECISION\r\n\r\n}// namespace glm\r\n\r\n#include \"vec1.inl\"\r\n\r\n#endif//GLM_GTX_vec1\r\n\r\n"
  },
  {
    "path": "cpu/glm/gtx/vec1.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_vec1\r\n/// @file glm/gtx/vec1.inl\r\n/// @date 2013-03-16 / 2013-03-16\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n"
  },
  {
    "path": "cpu/glm/gtx/vector_angle.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_vector_angle\r\n/// @file glm/gtx/vector_angle.hpp\r\n/// @date 2005-12-30 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_quaternion (dependence)\r\n/// @see gtx_epsilon (dependence)\r\n///\r\n/// @defgroup gtx_vector_angle GLM_GTX_vector_angle\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Compute angle between vectors\r\n/// \r\n/// <glm/gtx/vector_angle.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_vector_angle\r\n#define GLM_GTX_vector_angle\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtc/epsilon.hpp\"\r\n#include \"../gtx/quaternion.hpp\"\r\n#include \"../gtx/rotate_vector.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_vector_angle extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_vector_angle\r\n\t/// @{\r\n\r\n\t//! Returns the absolute angle between two vectors\r\n\t//! Parameters need to be normalized.\r\n\t/// @see gtx_vector_angle extension\r\n\ttemplate <typename vecType>\r\n\tGLM_FUNC_QUALIFIER typename vecType::value_type angle(\r\n\t\tvecType const & x, \r\n\t\tvecType const & y);\r\n\r\n\t//! Returns the oriented angle between two 2d vectors \r\n\t//! Parameters need to be normalized.\r\n\t/// @see gtx_vector_angle extension.\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T orientedAngle(\r\n\t\tdetail::tvec2<T, P> const & x,\r\n\t\tdetail::tvec2<T, P> const & y);\r\n\r\n\t//! Returns the oriented angle between two 3d vectors based from a reference axis.\r\n\t//! Parameters need to be normalized.\r\n\t/// @see gtx_vector_angle extension.\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T orientedAngle(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<T, P> const & y,\r\n\t\tdetail::tvec3<T, P> const & ref);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"vector_angle.inl\"\r\n\r\n#endif//GLM_GTX_vector_angle\r\n"
  },
  {
    "path": "cpu/glm/gtx/vector_angle.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-30\r\n// Updated : 2008-09-29\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/vector_angle.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType angle\r\n\t(\r\n\t\tgenType const & x,\r\n\t\tgenType const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'angle' only accept floating-point inputs\");\r\n\r\n\t\tgenType const Angle(acos(clamp(dot(x, y), genType(-1), genType(1))));\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\treturn Angle;\r\n#else\r\n#\t\tpragma message(\"GLM: angle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\treturn degrees(Angle);\r\n#endif\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType> \r\n\tGLM_FUNC_QUALIFIER T angle\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'angle' only accept floating-point inputs\");\r\n\r\n\t\tT const Angle(acos(clamp(dot(x, y), T(-1), T(1))));\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\treturn Angle;\r\n#else\r\n#\t\tpragma message(\"GLM: angle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\treturn degrees(Angle);\r\n#endif\r\n\t}\r\n\r\n\t//! \\todo epsilon is hard coded to 0.01\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T orientedAngle\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x,\r\n\t\tdetail::tvec2<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'orientedAngle' only accept floating-point inputs\");\r\n\r\n\t\tT const Dot = clamp(dot(x, y), T(-1), T(1));\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const Angle(acos(Dot));\r\n#else\r\n#\t\tpragma message(\"GLM: orientedAngle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const Angle(degrees(acos(Dot)));\r\n#endif\r\n\t\tdetail::tvec2<T, P> const TransformedVector(glm::rotate(x, Angle));\r\n\t\tif(all(epsilonEqual(y, TransformedVector, T(0.01))))\r\n\t\t\treturn Angle;\r\n\t\telse\r\n\t\t\treturn -Angle;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T orientedAngle\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<T, P> const & y,\r\n\t\tdetail::tvec3<T, P> const & ref\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'orientedAngle' only accept floating-point inputs\");\r\n\r\n\t\tT const Dot = clamp(dot(x, y), T(-1), T(1));\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const Angle(acos(Dot));\r\n#else\r\n#\t\tpragma message(\"GLM: orientedAngle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const Angle(degrees(acos(Dot)));\r\n#endif\r\n\r\n\t\tif(dot(ref, cross(x, y)) < T(0))\r\n\t\t\treturn -Angle;\r\n\t\telse\r\n\t\t\treturn Angle;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/vector_query.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_vector_query\r\n/// @file glm/gtx/vector_query.hpp\r\n/// @date 2008-03-10 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_vector_query GLM_GTX_vector_query\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Query informations of vector types\r\n///\r\n/// <glm/gtx/vector_query.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_vector_query\r\n#define GLM_GTX_vector_query\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include <cfloat>\r\n#include <limits>\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_vector_query extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_vector_query\r\n\t/// @{\r\n\r\n\t//! Check whether two vectors are collinears.\r\n\t/// @see gtx_vector_query extensions.\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tbool areCollinear(vecType<T, P> const & v0, vecType<T, P> const & v1, T const & epsilon);\r\n\t\t\r\n\t//! Check whether two vectors are orthogonals.\r\n\t/// @see gtx_vector_query extensions.\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tbool areOrthogonal(vecType<T, P> const & v0, vecType<T, P> const & v1, T const & epsilon);\r\n\r\n\t//! Check whether a vector is normalized.\r\n\t/// @see gtx_vector_query extensions.\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tbool isNormalized(vecType<T, P> const & v, T const & epsilon);\r\n\t\t\r\n\t//! Check whether a vector is null.\r\n\t/// @see gtx_vector_query extensions.\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tbool isNull(vecType<T, P> const & v, T const & epsilon);\r\n\r\n\t//! Check whether a each component of a vector is null.\r\n\t/// @see gtx_vector_query extensions.\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tvecType<bool, P> isCompNull(vecType<T, P> const & v, T const & epsilon);\r\n\r\n\t//! Check whether two vectors are orthonormal.\r\n\t/// @see gtx_vector_query extensions.\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tbool areOrthonormal(vecType<T, P> const & v0, vecType<T, P> const & v1, T const & epsilon);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"vector_query.inl\"\r\n\r\n#endif//GLM_GTX_vector_query\r\n"
  },
  {
    "path": "cpu/glm/gtx/vector_query.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-03-05\r\n// Updated : 2010-02-16\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/vector_query.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Dependency:\r\n// - GLM core\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include <cassert>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tstruct compute_areCollinear{};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_areCollinear<T, P, tvec2>\r\n\t{\r\n\t\tstatic bool call(detail::tvec2<T, P> const & v0, detail::tvec2<T, P> const & v1, T const & epsilon)\r\n\t\t{\r\n\t\t\treturn length(cross(detail::tvec3<T, P>(v0, static_cast<T>(0)), detail::tvec3<T, P>(v1, static_cast<T>(0)))) < epsilon;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_areCollinear<T, P, tvec3>\r\n\t{\r\n\t\tstatic bool call(detail::tvec3<T, P> const & v0, detail::tvec3<T, P> const & v1, T const & epsilon)\r\n\t\t{\r\n\t\t\treturn length(cross(v0, v1)) < epsilon;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_areCollinear<T, P, tvec4>\r\n\t{\r\n\t\tstatic bool call(detail::tvec4<T, P> const & v0, detail::tvec4<T, P> const & v1, T const & epsilon)\r\n\t\t{\r\n\t\t\treturn length(cross(detail::tvec3<T, P>(v0), detail::tvec3<T, P>(v1))) < epsilon;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tstruct compute_isCompNull{};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_isCompNull<T, P, tvec2>\r\n\t{\r\n\t\tstatic detail::tvec2<bool, P> call(detail::tvec2<T, P> const & v, T const & epsilon)\r\n\t\t{\r\n\t\t\treturn detail::tvec2<bool, P>(\r\n\t\t\t\t(abs(v.x) < epsilon),\r\n\t\t\t\t(abs(v.y) < epsilon));\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_isCompNull<T, P, tvec3>\r\n\t{\r\n\t\tstatic detail::tvec3<bool, P> call(detail::tvec3<T, P> const & v, T const & epsilon)\r\n\t\t{\r\n\t\t\treturn detail::tvec3<bool, P>(\r\n\t\t\t\t(abs(v.x) < epsilon),\r\n\t\t\t\t(abs(v.y) < epsilon),\r\n\t\t\t\t(abs(v.z) < epsilon));\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_isCompNull<T, P, tvec4>\r\n\t{\r\n\t\tstatic detail::tvec4<bool, P> call(detail::tvec4<T, P> const & v, T const & epsilon)\r\n\t\t{\r\n\t\t\treturn detail::tvec4<bool, P>(\r\n\t\t\t\t(abs(v.x) < epsilon),\r\n\t\t\t\t(abs(v.y) < epsilon),\r\n\t\t\t\t(abs(v.z) < epsilon),\r\n\t\t\t\t(abs(v.w) < epsilon));\r\n\t\t}\r\n\t};\r\n\r\n}//namespace detail\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER bool areCollinear\r\n\t(\r\n\t\tvecType<T, P> const & v0,\r\n\t\tvecType<T, P> const & v1,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'areCollinear' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::compute_areCollinear<T, P, vecType>::call(v0, v1, epsilon);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER bool areOrthogonal\r\n\t(\r\n\t\tvecType<T, P> const & v0,\r\n\t\tvecType<T, P> const & v1,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'areOrthogonal' only accept floating-point inputs\");\r\n\r\n\t\treturn abs(dot(v0, v1)) <= max(\r\n\t\t\tstatic_cast<T>(1),\r\n\t\t\tlength(v0)) * max(static_cast<T>(1), length(v1)) * epsilon;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER bool isNormalized\r\n\t(\r\n\t\tvecType<T, P> const & v,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'isNormalized' only accept floating-point inputs\");\r\n\r\n\t\treturn abs(length(v) - static_cast<T>(1)) <= static_cast<T>(2) * epsilon;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER bool isNull\r\n\t(\r\n\t\tvecType<T, P> const & v,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'isNull' only accept floating-point inputs\");\r\n\r\n\t\treturn length(v) <= epsilon;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<bool, P> isCompNull\r\n\t(\r\n\t\tvecType<T, P> const & v,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'isCompNull' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::compute_isCompNull<T, P, vecType>::call(v, epsilon);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<bool, P> isCompNull\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & v,\r\n\t\tT const & epsilon)\r\n\t{\r\n\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<bool, P> isCompNull\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<bool, P>(\r\n\t\t\tabs(v.x) < epsilon,\r\n\t\t\tabs(v.y) < epsilon,\r\n\t\t\tabs(v.z) < epsilon);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P> isCompNull\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<bool, P>(\r\n\t\t\tabs(v.x) < epsilon,\r\n\t\t\tabs(v.y) < epsilon,\r\n\t\t\tabs(v.z) < epsilon,\r\n\t\t\tabs(v.w) < epsilon);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER bool areOrthonormal\r\n\t(\r\n\t\tvecType<T, P> const & v0,\r\n\t\tvecType<T, P> const & v1,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\treturn isNormalized(v0, epsilon) && isNormalized(v1, epsilon) && (abs(dot(v0, v1)) <= epsilon);\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/gtx/wrap.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_wrap\r\n/// @file glm/gtx/wrap.hpp\r\n/// @date 2009-11-25 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_wrap GLM_GTX_wrap\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Wrapping mode of texture coordinates.\r\n/// \r\n/// <glm/gtx/wrap.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_wrap\r\n#define GLM_GTX_wrap\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_wrap extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_wrap\r\n\t/// @{\r\n\r\n\t/// Simulate GL_CLAMP OpenGL wrap mode\r\n\t/// @see gtx_wrap extension.\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType clamp(genType const & Texcoord);\r\n\r\n\t/// Simulate GL_REPEAT OpenGL wrap mode\r\n\t/// @see gtx_wrap extension.\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType repeat(genType const & Texcoord);\r\n\r\n\t/// Simulate GL_MIRROR_REPEAT OpenGL wrap mode\r\n\t/// @see gtx_wrap extension.\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType mirrorRepeat(genType const & Texcoord);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"wrap.inl\"\r\n\r\n#endif//GLM_GTX_wrap\r\n"
  },
  {
    "path": "cpu/glm/gtx/wrap.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2009-11-25\r\n// Updated : 2010-02-13\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/wrap.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Dependency:\r\n// - GLM core\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType clamp\r\n\t(\r\n\t\tgenType const & Texcoord\r\n\t)\r\n\t{\r\n\t\treturn glm::clamp(Texcoord, genType(0), genType(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> clamp\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & Texcoord\r\n\t)\r\n\t{\r\n\t\tdetail::tvec2<T, P> Result;\r\n\t\tfor(typename detail::tvec2<T, P>::size_type i = 0; i < detail::tvec2<T, P>::value_size(); ++i)\r\n\t\t\tResult[i] = clamp(Texcoord[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> clamp\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & Texcoord\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> Result;\r\n\t\tfor(typename detail::tvec3<T, P>::size_type i = 0; i < detail::tvec3<T, P>::value_size(); ++i)\r\n\t\t\tResult[i] = clamp(Texcoord[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> clamp\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & Texcoord\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<T, P> Result;\r\n\t\tfor(typename detail::tvec4<T, P>::size_type i = 0; i < detail::tvec4<T, P>::value_size(); ++i)\r\n\t\t\tResult[i] = clamp(Texcoord[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t////////////////////////\r\n\t// repeat\r\n\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType repeat\r\n\t(\r\n\t\tgenType const & Texcoord\r\n\t)\r\n\t{\r\n\t\treturn glm::fract(Texcoord);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> repeat\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & Texcoord\r\n\t)\r\n\t{\r\n\t\tdetail::tvec2<T, P> Result;\r\n\t\tfor(typename detail::tvec2<T, P>::size_type i = 0; i < detail::tvec2<T, P>::value_size(); ++i)\r\n\t\t\tResult[i] = repeat(Texcoord[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> repeat\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & Texcoord\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> Result;\r\n\t\tfor(typename detail::tvec3<T, P>::size_type i = 0; i < detail::tvec3<T, P>::value_size(); ++i)\r\n\t\t\tResult[i] = repeat(Texcoord[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> repeat\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & Texcoord\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<T, P> Result;\r\n\t\tfor(typename detail::tvec4<T, P>::size_type i = 0; i < detail::tvec4<T, P>::value_size(); ++i)\r\n\t\t\tResult[i] = repeat(Texcoord[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t////////////////////////\r\n\t// mirrorRepeat\r\n\r\n\ttemplate <typename genType, precision P> \r\n\tGLM_FUNC_QUALIFIER genType mirrorRepeat\r\n\t(\r\n\t\tgenType const & Texcoord\r\n\t)\r\n\t{\r\n\t\tgenType const Clamp = genType(int(glm::floor(Texcoord)) % 2);\r\n\t\tgenType const Floor = glm::floor(Texcoord);\r\n\t\tgenType const Rest = Texcoord - Floor;\r\n\t\tgenType const Mirror = Clamp + Rest;\r\n\r\n\t\tgenType Out;\r\n\t\tif(Mirror >= genType(1))\r\n\t\t\tOut = genType(1) - Rest;\r\n\t\telse\r\n\t\t\tOut = Rest;\r\n\t\treturn Out;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> mirrorRepeat\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & Texcoord\r\n\t)\r\n\t{\r\n\t\tdetail::tvec2<T, P> Result;\r\n\t\tfor(typename detail::tvec2<T, P>::size_type i = 0; i < detail::tvec2<T, P>::value_size(); ++i)\r\n\t\t\tResult[i] = mirrorRepeat(Texcoord[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> mirrorRepeat\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & Texcoord\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> Result;\r\n\t\tfor(typename detail::tvec3<T, P>::size_type i = 0; i < detail::tvec3<T, P>::value_size(); ++i)\r\n\t\t\tResult[i] = mirrorRepeat(Texcoord[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> mirrorRepeat\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & Texcoord\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<T, P> Result;\r\n\t\tfor(typename detail::tvec4<T, P>::size_type i = 0; i < detail::tvec4<T, P>::value_size(); ++i)\r\n\t\t\tResult[i] = mirrorRepeat(Texcoord[i]);\r\n\t\treturn Result;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "cpu/glm/integer.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/integer.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_INTEGER_INCLUDED\r\n#define GLM_INTEGER_INCLUDED\r\n\r\n#include \"detail/func_integer.hpp\"\r\n\r\n#endif//GLM_INTEGER_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/mat2x2.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/mat2x2.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_MAT2X2_INCLUDED\r\n#define GLM_MAT2X2_INCLUDED\r\n\r\n#include \"detail/type_mat2x2.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// 2 columns of 2 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, lowp>\t\tlowp_mat2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, mediump>\t\tmediump_mat2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, highp>\t\thighp_mat2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, lowp>\t\tlowp_mat2x2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, mediump>\t\tmediump_mat2x2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, highp>\t\thighp_mat2x2;\r\n\r\n}//namespace glm\r\n\r\n#endif//GLM_MAT2X2_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/mat2x3.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/mat2x3.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_MAT2X3_INCLUDED\r\n#define GLM_MAT2X3_INCLUDED\r\n\r\n#include \"detail/type_mat2x3.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// 2 columns of 3 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x3<float, lowp>\t\tlowp_mat2x3;\r\n\r\n\t/// 2 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x3<float, mediump>\t\tmediump_mat2x3;\r\n\r\n\t/// 2 columns of 3 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x3<float, highp>\t\thighp_mat2x3;\r\n\r\n}//namespace glm\r\n\r\n#endif//GLM_MAT2X3_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/mat2x4.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/mat2x4.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_MAT2X4_INCLUDED\r\n#define GLM_MAT2X4_INCLUDED\r\n\r\n#include \"detail/type_mat2x4.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// 2 columns of 4 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x4<float, lowp>\t\tlowp_mat2x4;\r\n\t\r\n\t/// 2 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x4<float, mediump>\t\tmediump_mat2x4;\r\n\t\r\n\t/// 2 columns of 4 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x4<float, highp>\t\thighp_mat2x4;\r\n\r\n}//namespace glm\r\n\r\n#endif//GLM_MAT2X4_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/mat3x2.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/mat3x2.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_MAT3X2_INCLUDED\r\n#define GLM_MAT3X2_INCLUDED\r\n\r\n#include \"detail/type_mat3x2.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// 3 columns of 2 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x2<float, lowp>\t\tlowp_mat3x2;\r\n\t\r\n\t/// 3 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x2<float, mediump>\t\tmediump_mat3x2;\r\n\t\r\n\t/// 3 columns of 2 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x2<float, highp>\t\thighp_mat3x2;\r\n\r\n}//namespace\r\n\r\n#endif//GLM_MAT3X2_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/mat3x3.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/mat3x3.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_MAT3X3_INCLUDED\r\n#define GLM_MAT3X3_INCLUDED\r\n\r\n#include \"detail/type_mat3x3.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// 3 columns of 3 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, lowp>\t\tlowp_mat3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, mediump>\t\tmediump_mat3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, highp>\t\thighp_mat3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, lowp>\t\tlowp_mat3x3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, mediump>\t\tmediump_mat3x3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, highp>\t\thighp_mat3x3;\r\n\r\n}//namespace glm\r\n\r\n#endif//GLM_MAT3X3_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/mat3x4.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/mat3x4.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_MAT3X4_INCLUDED\r\n#define GLM_MAT3X4_INCLUDED\r\n\r\n#include \"detail/type_mat3x4.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// 3 columns of 4 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x4<float, lowp>\t\tlowp_mat3x4;\r\n\t\r\n\t/// 3 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x4<float, mediump>\t\tmediump_mat3x4;\r\n\t\r\n\t/// 3 columns of 4 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x4<float, highp>\t\thighp_mat3x4;\r\n\r\n}//namespace glm\r\n\r\n#endif//GLM_MAT3X4_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/mat4x2.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/mat4x2.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_MAT4X2_INCLUDED\r\n#define GLM_MAT4X2_INCLUDED\r\n\r\n#include \"detail/type_mat4x2.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// 4 columns of 2 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x2<float, lowp>\t\tlowp_mat4x2;\r\n\t\r\n\t/// 4 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x2<float, mediump>\t\tmediump_mat4x2;\r\n\t\r\n\t/// 4 columns of 2 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x2<float, highp>\t\thighp_mat4x2;\r\n\r\n}//namespace glm\r\n\r\n#endif//GLM_MAT4X2_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/mat4x3.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/mat4x4.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_MAT4X3_INCLUDED\r\n#define GLM_MAT4X3_INCLUDED\r\n\r\n#include \"detail/type_mat4x3.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// 4 columns of 3 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x3<float, lowp>\t\tlowp_mat4x3;\r\n\t\r\n\t/// 4 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x3<float, mediump>\t\tmediump_mat4x3;\r\n\t\r\n\t/// 4 columns of 3 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x3<float, highp>\t\thighp_mat4x3;\r\n\r\n}//namespace glm\r\n\r\n#endif//GLM_MAT4X3_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/mat4x4.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/mat4x4.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_MAT4X4_INCLUDED\r\n#define GLM_MAT4X4_INCLUDED\r\n\r\n#include \"detail/type_mat4x4.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// 4 columns of 4 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, lowp>\t\tlowp_mat4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, mediump>\t\tmediump_mat4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, highp>\t\thighp_mat4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, lowp>\t\tlowp_mat4x4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, mediump>\t\tmediump_mat4x4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, highp>\t\thighp_mat4x4;\r\n\r\n}//namespace glm\r\n\r\n#endif//GLM_MAT4X4_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/matrix.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/matrix.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_MATRIX_INCLUDED\r\n#define GLM_MATRIX_INCLUDED\r\n\r\n#include \"detail/func_matrix.hpp\"\r\n\r\n#endif//GLM_MATRIX_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/packing.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/packing.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_PACKING_INCLUDED\r\n#define GLM_PACKING_INCLUDED\r\n\r\n#include \"detail/func_packing.hpp\"\r\n\r\n#endif//GLM_PACKING_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/trigonometric.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/trigonometric.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_TRIGONOMETRIC_INCLUDED\r\n#define GLM_TRIGONOMETRIC_INCLUDED\r\n\r\n#include \"detail/func_trigonometric.hpp\"\r\n\r\n#endif//GLM_TRIGONOMETRIC_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/vec2.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/vec2.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_VEC2_INCLUDED\r\n#define GLM_VEC2_INCLUDED\r\n\r\n#include \"detail/type_vec2.hpp\"\r\n\r\n#endif//GLM_VEC2_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/vec3.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/vec3.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_VEC3_INCLUDED\r\n#define GLM_VEC3_INCLUDED\r\n\r\n#include \"detail/type_vec3.hpp\"\r\n\r\n#endif//GLM_VEC3_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/vec4.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/vec4.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_VEC4_INCLUDED\r\n#define GLM_VEC4_INCLUDED\r\n\r\n#include \"detail/type_vec4.hpp\"\r\n\r\n#endif//GLM_VEC4_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/vector_relational.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/vector_relational.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_VECTOR_RELATIONAL_INCLUDED\r\n#define GLM_VECTOR_RELATIONAL_INCLUDED\r\n\r\n#include \"detail/func_vector_relational.hpp\"\r\n\r\n#endif//GLM_VECTOR_RELATIONAL_INCLUDED\r\n"
  },
  {
    "path": "cpu/glm/virtrev/xstream.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref virtrev_xstream\r\n/// @file glm/virtrev/xstream.hpp\r\n/// @date 2008-05-24 / 2008-05-26\r\n/// @author Mathieu Roumillac (matrem84.free.fr)\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_matrix_access (dependence)\r\n///\r\n/// @defgroup virtrev_xstream GLM_VIRTREV_xstream: xml like output\r\n/// @ingroup virtrev\r\n/// \r\n/// @brief Streaming vector and matrix in a xml way.\r\n/// \r\n/// Include <glm/virtrev/xstream.hpp> for this functionality.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_VIRTREV_xstream\r\n#define GLM_VIRTREV_xstream GLM_VERSION\r\n\r\n#include \"../glm.hpp\"\r\n#include \"../gtc/matrix_access.hpp\"\r\n#include <iostream>\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(glm_ext))\r\n#\tpragma message(\"GLM: GLM_VIRTREV_xstream extension included\")\r\n#endif\r\n/*\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate<typename T>\r\n\tstd::ostream & operator << (std::ostream & stream, glm::detail::tvec2<T, P> const & vec)\r\n\t{\r\n\t\tstream << \"<glm_vec2 \";\r\n\t\tstream << \"x=\\\"\" << vec.x << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << vec.y << \"\\\" \";\r\n\t\tstream << \"/>\";\r\n\r\n\t\treturn stream;\r\n\t}\r\n\r\n\ttemplate<typename T>\r\n\tstd::ostream & operator << (std::ostream & stream, glm::detail::tvec3<T, P> const & vec)\r\n\t{\r\n\t\tstream << \"<glm_vec3 \";\r\n\t\tstream << \"x=\\\"\" << vec.x << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << vec.y << \"\\\" \";\r\n\t\tstream << \"z=\\\"\" << vec.z << \"\\\" \";\r\n\t\tstream << \"/>\";\r\n\r\n\t\treturn stream;\r\n\t}\r\n\r\n\ttemplate<typename T>\r\n\tstd::ostream & operator << (std::ostream & stream, glm::detail::tvec4<T, P> const & vec)\r\n\t{\r\n\t\tstream << \"<glm_vec4 \";\r\n\t\tstream << \"x=\\\"\" << vec.x << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << vec.y << \"\\\" \";\r\n\t\tstream << \"z=\\\"\" << vec.z << \"\\\" \";\r\n\t\tstream << \"w=\\\"\" << vec.w << \"\\\" \";\r\n\t\tstream << \"/>\";\r\n\r\n\t\treturn stream;\r\n\t}\r\n\r\n\ttemplate<typename T>\r\n\tstd::ostream & operator << (std::ostream & stream, glm::detail::tmat2x2<T, P> const & mat)\r\n\t{\r\n\t\tstream << \"<glm_mat2>\" << std::endl;\r\n\t\tstream << \"<row \";\r\n\t\tstream << \"x=\\\"\" << glm::row(mat, 0)[0] << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << glm::row(mat, 0)[1] << \"\\\" \";\r\n\t\tstream << \"/>\" << std::endl;\r\n\t\tstream << \"<row \";\r\n\t\tstream << \"x=\\\"\" << glm::row(mat, 1)[0] << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << glm::row(mat, 1)[1] << \"\\\" \";\r\n\t\tstream << \"/>\" << std::endl;\r\n\t\tstream << \"</glm_mat2>\";\r\n\r\n\t\treturn stream;\r\n\t}\r\n\r\n\ttemplate<typename T>\r\n\tstd::ostream & operator << (std::ostream & stream, glm::detail::tmat3x3<T, P> const & mat)\r\n\t{\r\n\t\tstream << \"<glm_mat3>\" << std::endl;\r\n\t\tstream << \"<row \";\r\n\t\tstream << \"x=\\\"\" << glm::row(mat, 0)[0] << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << glm::row(mat, 0)[1] << \"\\\" \";\r\n\t\tstream << \"z=\\\"\" << glm::row(mat, 0)[2] << \"\\\" \";\r\n\t\tstream << \"/>\" << std::endl;\r\n\t\tstream << \"<row \";\r\n\t\tstream << \"x=\\\"\" << glm::row(mat, 1)[0] << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << glm::row(mat, 1)[1] << \"\\\" \";\r\n\t\tstream << \"z=\\\"\" << glm::row(mat, 1)[2] << \"\\\" \";\r\n\t\tstream << \"/>\" << std::endl;\r\n\t\tstream << \"<row \";\r\n\t\tstream << \"x=\\\"\" << glm::row(mat, 2)[0] << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << glm::row(mat, 2)[1] << \"\\\" \";\r\n\t\tstream << \"z=\\\"\" << glm::row(mat, 2)[2] << \"\\\" \";\r\n\t\tstream << \"/>\" << std::endl;\r\n\t\tstream << \"</glm_mat3>\";\r\n\r\n\t\treturn stream;\r\n\t}\r\n\r\n\ttemplate<typename T>\r\n\tstd::ostream & operator << (std::ostream & stream, glm::detail::tmat4x4<T, P> const & mat)\r\n\t{\r\n\t\tstream << \"<glm_mat4>\" << std::endl;\r\n\t\tstream << \"<row \";\r\n\t\tstream << \"x=\\\"\" << glm::row(mat, 0)[0] << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << glm::row(mat, 0)[1] << \"\\\" \";\r\n\t\tstream << \"z=\\\"\" << glm::row(mat, 0)[2] << \"\\\" \";\r\n\t\tstream << \"w=\\\"\" << glm::row(mat, 0)[3] << \"\\\" \";\r\n\t\tstream << \"/>\" << std::endl;\r\n\t\tstream << \"<row \";\r\n\t\tstream << \"x=\\\"\" << glm::row(mat, 1)[0] << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << glm::row(mat, 1)[1] << \"\\\" \";\r\n\t\tstream << \"z=\\\"\" << glm::row(mat, 1)[2] << \"\\\" \";\r\n\t\tstream << \"w=\\\"\" << glm::row(mat, 1)[3] << \"\\\" \";\r\n\t\tstream << \"/>\" << std::endl;\r\n\t\tstream << \"<row \";\r\n\t\tstream << \"x=\\\"\" << glm::row(mat, 2)[0] << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << glm::row(mat, 2)[1] << \"\\\" \";\r\n\t\tstream << \"z=\\\"\" << glm::row(mat, 2)[2] << \"\\\" \";\r\n\t\tstream << \"w=\\\"\" << glm::row(mat, 2)[3] << \"\\\" \";\r\n\t\tstream << \"/>\" << std::endl;\r\n\t\tstream << \"<row \";\r\n\t\tstream << \"x=\\\"\" << glm::row(mat, 3)[0] << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << glm::row(mat, 3)[1] << \"\\\" \";\r\n\t\tstream << \"z=\\\"\" << glm::row(mat, 3)[2] << \"\\\" \";\r\n\t\tstream << \"w=\\\"\" << glm::row(mat, 3)[3] << \"\\\" \";\r\n\t\tstream << \"/>\" << std::endl;\r\n\t\tstream << \"</glm_mat4>\";\r\n\t\t\t\r\n\t\treturn stream;\r\n\t}\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n*/\r\n#endif//GLM_VIRTREV_xstream\r\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UFconfig.h",
    "content": "/* ========================================================================== */\n/* === UFconfig.h =========================================================== */\n/* ========================================================================== */\n\n/* Configuration file for SuiteSparse: a Suite of Sparse matrix packages\n * (AMD, COLAMD, CCOLAMD, CAMD, CHOLMOD, UMFPACK, CXSparse, and others).\n *\n * UFconfig.h provides the definition of the long integer.  On most systems,\n * a C program can be compiled in LP64 mode, in which long's and pointers are\n * both 64-bits, and int's are 32-bits.  Windows 64, however, uses the LLP64\n * model, in which int's and long's are 32-bits, and long long's and pointers\n * are 64-bits.\n *\n * SuiteSparse packages that include long integer versions are\n * intended for the LP64 mode.  However, as a workaround for Windows 64\n * (and perhaps other systems), the long integer can be redefined.\n *\n * If _WIN64 is defined, then the __int64 type is used instead of long.\n *\n * The long integer can also be defined at compile time.  For example, this\n * could be added to UFconfig.mk:\n *\n * CFLAGS = -O -D'UF_long=long long' -D'UF_long_max=9223372036854775801' \\\n *   -D'UF_long_id=\"%lld\"'\n *\n * This file defines UF_long as either long (on all but _WIN64) or\n * __int64 on Windows 64.  The intent is that a UF_long is always a 64-bit\n * integer in a 64-bit code.  ptrdiff_t might be a better choice than long;\n * it is always the same size as a pointer.\n *\n * This file also defines the SUITESPARSE_VERSION and related definitions.\n *\n * Copyright (c) 2007, University of Florida.  No licensing restrictions\n * apply to this file or to the UFconfig directory.  Author: Timothy A. Davis.\n */\n\n#ifndef _UFCONFIG_H\n#define _UFCONFIG_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include <limits.h>\n\n/* ========================================================================== */\n/* === UF_long ============================================================== */\n/* ========================================================================== */\n\n#ifndef UF_long\n\n#ifdef _WIN64\n\n#define UF_long __int64\n#define UF_long_max _I64_MAX\n#define UF_long_id \"%I64d\"\n\n#else\n\n#define UF_long long\n#define UF_long_max LONG_MAX\n#define UF_long_id \"%ld\"\n\n#endif\n#endif\n\n/* ========================================================================== */\n/* === SuiteSparse version ================================================== */\n/* ========================================================================== */\n\n/* SuiteSparse is not a package itself, but a collection of packages, some of\n * which must be used together (UMFPACK requires AMD, CHOLMOD requires AMD,\n * COLAMD, CAMD, and CCOLAMD, etc).  A version number is provided here for the\n * collection itself.  The versions of packages within each version of\n * SuiteSparse are meant to work together.  Combining one packge from one\n * version of SuiteSparse, with another package from another version of\n * SuiteSparse, may or may not work.\n *\n * SuiteSparse Version 3.1.0 contains the following packages:\n *\n *  AMD\t\t    version 2.2.0\n *  CAMD\t    version 2.2.0\n *  COLAMD\t    version 2.7.1\n *  CCOLAMD\t    version 2.7.1\n *  CHOLMOD\t    version 1.6.0\n *  CSparse\t    version 2.2.1\n *  CXSparse\t    version 2.2.1\n *  KLU\t\t    version 1.0.1\n *  BTF\t\t    version 1.0.1\n *  LDL\t\t    version 2.0.1\n *  UFconfig\t    version number is the same as SuiteSparse\n *  UMFPACK\t    version 5.2.0\n *  RBio\t    version 1.1.1\n *  UFcollection    version 1.1.1\n *  LINFACTOR       version 1.1.0\n *  MESHND          version 1.1.0\n *  SSMULT          version 1.1.0\n *  MATLAB_Tools    no specific version number\n *\n * Other package dependencies:\n *  BLAS\t    required by CHOLMOD and UMFPACK\n *  LAPACK\t    required by CHOLMOD\n *  METIS 4.0.1\t    required by CHOLMOD (optional) and KLU (optional)\n */\n\n#define SUITESPARSE_DATE \"Nov 1, 2007\"\n#define SUITESPARSE_VER_CODE(main,sub) ((main) * 1000 + (sub))\n#define SUITESPARSE_MAIN_VERSION 3\n#define SUITESPARSE_SUB_VERSION 1\n#define SUITESPARSE_SUBSUB_VERSION 0\n#define SUITESPARSE_VERSION \\\n    SUITESPARSE_VER_CODE(SUITESPARSE_MAIN_VERSION,SUITESPARSE_SUB_VERSION)\n\n#ifdef __cplusplus\n}\n#endif\n#endif\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack.h",
    "content": "/* ========================================================================== */\n/* === umfpack.h ============================================================ */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\n/*\n    This is the umfpack.h include file, and should be included in all user code\n    that uses UMFPACK.  Do not include any of the umf_* header files in user\n    code.  All routines in UMFPACK starting with \"umfpack_\" are user-callable.\n    All other routines are prefixed \"umf_XY_\", (where X is d or z, and Y is\n    i or l) and are not user-callable.\n*/\n\n#ifndef UMFPACK_H\n#define UMFPACK_H\n\n/* -------------------------------------------------------------------------- */\n/* Make it easy for C++ programs to include UMFPACK */\n/* -------------------------------------------------------------------------- */\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* define UF_long */\n#include \"UFconfig.h\"\n\n/* -------------------------------------------------------------------------- */\n/* size of Info and Control arrays */\n/* -------------------------------------------------------------------------- */\n\n/* These might be larger in future versions, since there are only 3 unused\n * entries in Info, and no unused entries in Control. */\n\n#define UMFPACK_INFO 90\n#define UMFPACK_CONTROL 20\n\n/* -------------------------------------------------------------------------- */\n/* User-callable routines */\n/* -------------------------------------------------------------------------- */\n\n/* Primary routines: */\n#include \"umfpack_symbolic.h\"\n#include \"umfpack_numeric.h\"\n#include \"umfpack_solve.h\"\n#include \"umfpack_free_symbolic.h\"\n#include \"umfpack_free_numeric.h\"\n\n/* Alternative routines: */\n#include \"umfpack_defaults.h\"\n#include \"umfpack_qsymbolic.h\"\n#include \"umfpack_wsolve.h\"\n\n/* Matrix manipulation routines: */\n#include \"umfpack_triplet_to_col.h\"\n#include \"umfpack_col_to_triplet.h\"\n#include \"umfpack_transpose.h\"\n#include \"umfpack_scale.h\"\n\n/* Getting the contents of the Symbolic and Numeric opaque objects: */\n#include \"umfpack_get_lunz.h\"\n#include \"umfpack_get_numeric.h\"\n#include \"umfpack_get_symbolic.h\"\n#include \"umfpack_save_numeric.h\"\n#include \"umfpack_load_numeric.h\"\n#include \"umfpack_save_symbolic.h\"\n#include \"umfpack_load_symbolic.h\"\n#include \"umfpack_get_determinant.h\"\n\n/* Reporting routines (the above 14 routines print nothing): */\n#include \"umfpack_report_status.h\"\n#include \"umfpack_report_info.h\"\n#include \"umfpack_report_control.h\"\n#include \"umfpack_report_matrix.h\"\n#include \"umfpack_report_triplet.h\"\n#include \"umfpack_report_vector.h\"\n#include \"umfpack_report_symbolic.h\"\n#include \"umfpack_report_numeric.h\"\n#include \"umfpack_report_perm.h\"\n\n/* Utility routines: */\n#include \"umfpack_timer.h\"\n#include \"umfpack_tictoc.h\"\n\n/* AMD */\n#include \"amd.h\"\n\n/* global function pointers */\n#include \"umfpack_global.h\"\n\n/* -------------------------------------------------------------------------- */\n/* Version, copyright, and license */\n/* -------------------------------------------------------------------------- */\n\n#define UMFPACK_VERSION \"UMFPACK V5.2.0 (Nov 1, 2007)\"\n\n#define UMFPACK_COPYRIGHT \\\n\"UMFPACK:  Copyright (c) 2005-2006 by Timothy A. Davis.  All Rights Reserved.\\n\"\n\n#define UMFPACK_LICENSE_PART1 \\\n\"\\nUMFPACK License:\\n\" \\\n\"\\n\" \\\n\"   UMFPACK is available under alternate licenses,\\n\" \\\n\"   contact T. Davis for details.\\n\" \\\n\"\\n\" \\\n\"   Your use or distribution of UMFPACK or any modified version of\\n\" \\\n\"   UMFPACK implies that you agree to this License.\\n\" \\\n\"\\n\" \\\n\"   This library is free software; you can redistribute it and/or\\n\" \\\n\"   modify it under the terms of the GNU General Public\\n\" \\\n\"   License as published by the Free Software Foundation; either\\n\" \\\n\"   version 2 of the License, or (at your option) any later version.\\n\" \\\n\"\\n\" \\\n\"   This library is distributed in the hope that it will be useful,\\n\" \\\n\"   but WITHOUT ANY WARRANTY; without even the implied warranty of\\n\" \\\n\"   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\\n\" \\\n\"   General Public License for more details.\\n\" \\\n\"\\n\" \\\n\"   You should have received a copy of the GNU General Public\\n\" \\\n\"   License along with this library; if not, write to the Free Software\\n\" \\\n\"   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301\\n\" \\\n\"   USA\\n\" \\\n\n#define UMFPACK_LICENSE_PART2 \\\n\"\\n\" \\\n\"   Permission is hereby granted to use or copy this program under the\\n\" \\\n\"   terms of the GNU GPL, provided that the Copyright, this License,\\n\" \\\n\"   and the Availability of the original version is retained on all copies.\\n\" \\\n\"   User documentation of any code that uses this code or any modified\\n\" \\\n\"   version of this code must cite the Copyright, this License, the\\n\" \\\n\"   Availability note, and \\\"Used by permission.\\\" Permission to modify\\n\" \\\n\"   the code and to distribute modified code is granted, provided the\\n\" \\\n\"   Copyright, this License, and the Availability note are retained,\\n\" \\\n\"   and a notice that the code was modified is included.\\n\"\n\n#define UMFPACK_LICENSE_PART3 \\\n\"\\n\" \\\n\"Availability: http://www.cise.ufl.edu/research/sparse/umfpack\\n\" \\\n\"\\n\"\n\n/* UMFPACK Version 4.5 and later will include the following definitions.\n * As an example, to test if the version you are using is 4.5 or later:\n *\n * #ifdef UMFPACK_VER\n *\tif (UMFPACK_VER >= UMFPACK_VER_CODE (4,5)) ...\n * #endif\n *\n * This also works during compile-time:\n *\n *\t#if defined(UMFPACK_VER) && (UMFPACK >= UMFPACK_VER_CODE (4,5))\n *\t    printf (\"This is version 4.5 or later\\n\") ;\n *\t#else\n *\t    printf (\"This is an early version\\n\") ;\n *\t#endif\n *\n * Versions 4.4 and earlier of UMFPACK do not include a #define'd version\n * number, although they do include the UMFPACK_VERSION string, defined\n * above.\n */\n\n#define UMFPACK_DATE \"Nov 1, 2007\"\n#define UMFPACK_VER_CODE(main,sub) ((main) * 1000 + (sub))\n#define UMFPACK_MAIN_VERSION 5\n#define UMFPACK_SUB_VERSION 2\n#define UMFPACK_SUBSUB_VERSION 0\n#define UMFPACK_VER UMFPACK_VER_CODE(UMFPACK_MAIN_VERSION,UMFPACK_SUB_VERSION)\n\n/* -------------------------------------------------------------------------- */\n/* contents of Info */\n/* -------------------------------------------------------------------------- */\n\n/* Note that umfpack_report.m must coincide with these definitions.  S is\n * the submatrix of A after removing row/col singletons and empty rows/cols. */\n\n/* returned by all routines that use Info: */\n#define UMFPACK_STATUS 0\t/* UMFPACK_OK, or other result */\n#define UMFPACK_NROW 1\t\t/* n_row input value */\n#define UMFPACK_NCOL 16\t\t/* n_col input value */\n#define UMFPACK_NZ 2\t\t/* # of entries in A */\n\n/* computed in UMFPACK_*symbolic and UMFPACK_numeric: */\n#define UMFPACK_SIZE_OF_UNIT 3\t\t/* sizeof (Unit) */\n\n/* computed in UMFPACK_*symbolic: */\n#define UMFPACK_SIZE_OF_INT 4\t\t/* sizeof (int) */\n#define UMFPACK_SIZE_OF_LONG 5\t\t/* sizeof (UF_long) */\n#define UMFPACK_SIZE_OF_POINTER 6\t/* sizeof (void *) */\n#define UMFPACK_SIZE_OF_ENTRY 7\t\t/* sizeof (Entry), real or complex */\n#define UMFPACK_NDENSE_ROW 8\t\t/* number of dense rows */\n#define UMFPACK_NEMPTY_ROW 9\t\t/* number of empty rows */\n#define UMFPACK_NDENSE_COL 10\t\t/* number of dense rows */\n#define UMFPACK_NEMPTY_COL 11\t\t/* number of empty rows */\n#define UMFPACK_SYMBOLIC_DEFRAG 12\t/* # of memory compactions */\n#define UMFPACK_SYMBOLIC_PEAK_MEMORY 13\t/* memory used by symbolic analysis */\n#define UMFPACK_SYMBOLIC_SIZE 14\t/* size of Symbolic object, in Units */\n#define UMFPACK_SYMBOLIC_TIME 15\t/* time (sec.) for symbolic analysis */\n#define UMFPACK_SYMBOLIC_WALLTIME 17\t/* wall clock time for sym. analysis */\n#define UMFPACK_STRATEGY_USED 18\t/* strategy used: sym, unsym, 2by2 */\n#define UMFPACK_ORDERING_USED 19\t/* ordering used: colamd, amd, given */\n#define UMFPACK_QFIXED 31\t\t/* whether Q is fixed or refined */\n#define UMFPACK_DIAG_PREFERRED 32\t/* whether diagonal pivoting attempted*/\n#define UMFPACK_PATTERN_SYMMETRY 33\t/* symmetry of pattern of S */\n#define UMFPACK_NZ_A_PLUS_AT 34\t\t/* nnz (S+S'), excl. diagonal */\n#define UMFPACK_NZDIAG 35\t\t/* nnz (diag (S)) */\n\n/* AMD statistics, computed in UMFPACK_*symbolic: */\n#define UMFPACK_SYMMETRIC_LUNZ 36\t/* nz in L+U, if AMD ordering used */\n#define UMFPACK_SYMMETRIC_FLOPS 37\t/* flops for LU, if AMD ordering used */\n#define UMFPACK_SYMMETRIC_NDENSE 38\t/* # of \"dense\" rows/cols in S+S' */\n#define UMFPACK_SYMMETRIC_DMAX 39\t/* max nz in cols of L, for AMD */\n\n/* statistics for 2-by-2 strategy */\n#define UMFPACK_2BY2_NWEAK 51\t\t    /* number of weak diagonal entries*/\n#define UMFPACK_2BY2_UNMATCHED 52\t    /* # of weak diagonals not matched*/\n#define UMFPACK_2BY2_PATTERN_SYMMETRY 53    /* symmetry of pattern of P*S */\n#define UMFPACK_2BY2_NZ_PA_PLUS_PAT 54\t    /* nz in PS+(PS)' */\n#define UMFPACK_2BY2_NZDIAG 55\t\t    /* nz on diagonal of PS+(PS)' */\n\n/* statistcs for singleton pruning */\n#define UMFPACK_COL_SINGLETONS 56\t/* # of column singletons */\n#define UMFPACK_ROW_SINGLETONS 57\t/* # of row singletons */\n#define UMFPACK_N2 58\t\t\t/* size of S */\n#define UMFPACK_S_SYMMETRIC 59\t\t/* 1 if S square and symmetricly perm.*/\n\n/* estimates computed in UMFPACK_*symbolic: */\n#define UMFPACK_NUMERIC_SIZE_ESTIMATE 20    /* final size of Numeric->Memory */\n#define UMFPACK_PEAK_MEMORY_ESTIMATE 21\t    /* for symbolic & numeric */\n#define UMFPACK_FLOPS_ESTIMATE 22\t    /* flop count */\n#define UMFPACK_LNZ_ESTIMATE 23\t\t    /* nz in L, incl. diagonal */\n#define UMFPACK_UNZ_ESTIMATE 24\t\t    /* nz in U, incl. diagonal */\n#define UMFPACK_VARIABLE_INIT_ESTIMATE 25   /* initial size of Numeric->Memory*/\n#define UMFPACK_VARIABLE_PEAK_ESTIMATE 26   /* peak size of Numeric->Memory */\n#define UMFPACK_VARIABLE_FINAL_ESTIMATE 27  /* final size of Numeric->Memory */\n#define UMFPACK_MAX_FRONT_SIZE_ESTIMATE 28  /* max frontal matrix size */\n#define UMFPACK_MAX_FRONT_NROWS_ESTIMATE 29 /* max # rows in any front */\n#define UMFPACK_MAX_FRONT_NCOLS_ESTIMATE 30 /* max # columns in any front */\n\n/* exact values, (estimates shown above) computed in UMFPACK_numeric: */\n#define UMFPACK_NUMERIC_SIZE 40\t\t    /* final size of Numeric->Memory */\n#define UMFPACK_PEAK_MEMORY 41\t\t    /* for symbolic & numeric */\n#define UMFPACK_FLOPS 42\t\t    /* flop count */\n#define UMFPACK_LNZ 43\t\t\t    /* nz in L, incl. diagonal */\n#define UMFPACK_UNZ 44\t\t\t    /* nz in U, incl. diagonal */\n#define UMFPACK_VARIABLE_INIT 45\t    /* initial size of Numeric->Memory*/\n#define UMFPACK_VARIABLE_PEAK 46\t    /* peak size of Numeric->Memory */\n#define UMFPACK_VARIABLE_FINAL 47\t    /* final size of Numeric->Memory */\n#define UMFPACK_MAX_FRONT_SIZE 48\t    /* max frontal matrix size */\n#define UMFPACK_MAX_FRONT_NROWS 49\t    /* max # rows in any front */\n#define UMFPACK_MAX_FRONT_NCOLS 50\t    /* max # columns in any front */\n\n/* computed in UMFPACK_numeric: */\n#define UMFPACK_NUMERIC_DEFRAG 60\t    /* # of garbage collections */\n#define UMFPACK_NUMERIC_REALLOC 61\t    /* # of memory reallocations */\n#define UMFPACK_NUMERIC_COSTLY_REALLOC 62   /* # of costlly memory realloc's */\n#define UMFPACK_COMPRESSED_PATTERN 63\t    /* # of integers in LU pattern */\n#define UMFPACK_LU_ENTRIES 64\t\t    /* # of reals in LU factors */\n#define UMFPACK_NUMERIC_TIME 65\t\t    /* numeric factorization time */\n#define UMFPACK_UDIAG_NZ 66\t\t    /* nz on diagonal of U */\n#define UMFPACK_RCOND 67\t\t    /* est. reciprocal condition # */\n#define UMFPACK_WAS_SCALED 68\t\t    /* none, max row, or sum row */\n#define UMFPACK_RSMIN 69\t\t    /* min (max row) or min (sum row) */\n#define UMFPACK_RSMAX 70\t\t    /* max (max row) or max (sum row) */\n#define UMFPACK_UMIN 71\t\t\t    /* min abs diagonal entry of U */\n#define UMFPACK_UMAX 72\t\t\t    /* max abs diagonal entry of U */\n#define UMFPACK_ALLOC_INIT_USED 73\t    /* alloc_init parameter used */\n#define UMFPACK_FORCED_UPDATES 74\t    /* # of forced updates */\n#define UMFPACK_NUMERIC_WALLTIME 75\t    /* numeric wall clock time */\n#define UMFPACK_NOFF_DIAG 76\t\t    /* number of off-diagonal pivots */\n\n#define UMFPACK_ALL_LNZ 77\t\t    /* nz in L, if no dropped entries */\n#define UMFPACK_ALL_UNZ 78\t\t    /* nz in U, if no dropped entries */\n#define UMFPACK_NZDROPPED 79\t\t    /* # of dropped small entries */\n\n/* computed in UMFPACK_solve: */\n#define UMFPACK_IR_TAKEN 80\t    /* # of iterative refinement steps taken */\n#define UMFPACK_IR_ATTEMPTED 81\t    /* # of iter. refinement steps attempted */\n#define UMFPACK_OMEGA1 82\t    /* omega1, sparse backward error estimate */\n#define UMFPACK_OMEGA2 83\t    /* omega2, sparse backward error estimate */\n#define UMFPACK_SOLVE_FLOPS 84\t    /* flop count for solve */\n#define UMFPACK_SOLVE_TIME 85\t    /* solve time (seconds) */\n#define UMFPACK_SOLVE_WALLTIME 86   /* solve time (wall clock, seconds) */\n\n/* Info [87, 88, 89] unused */\n\n/* Unused parts of Info may be used in future versions of UMFPACK. */\n\n/* -------------------------------------------------------------------------- */\n\n/* Info [UMFPACK_ORDERING_USED] is one of the following: */\n#define UMFPACK_ORDERING_COLAMD 0\t/* COLAMD(A) */\n#define UMFPACK_ORDERING_AMD 1\t\t/* AMD(A+A') */\n#define UMFPACK_ORDERING_GIVEN 2\t/* Q is provided on input */\n\n/* -------------------------------------------------------------------------- */\n/* contents of Control */\n/* -------------------------------------------------------------------------- */\n\n/* used in all UMFPACK_report_* routines: */\n#define UMFPACK_PRL 0\t\t\t/* print level */\n\n/* used in UMFPACK_*symbolic only: */\n#define UMFPACK_DENSE_ROW 1\t\t/* dense row parameter */\n#define UMFPACK_DENSE_COL 2\t\t/* dense col parameter */\n#define UMFPACK_BLOCK_SIZE 4\t\t/* BLAS-3 block size */\n#define UMFPACK_STRATEGY 5\t\t/* auto, symmetric, unsym., or 2by2 */\n#define UMFPACK_2BY2_TOLERANCE 12\t/* 2-by-2 pivot tolerance */\n#define UMFPACK_FIXQ 13\t\t\t/* -1: no fixQ, 0: default, 1: fixQ */\n#define UMFPACK_AMD_DENSE 14\t\t/* for AMD ordering */\n#define UMFPACK_AGGRESSIVE 19\t\t/* whether or not to use aggressive\n\t\t\t\t\t * absorption in AMD and COLAMD */\n\n/* used in UMFPACK_numeric only: */\n#define UMFPACK_PIVOT_TOLERANCE 3\t/* threshold partial pivoting setting */\n#define UMFPACK_ALLOC_INIT 6\t\t/* initial allocation ratio */\n#define UMFPACK_SYM_PIVOT_TOLERANCE 15\t/* threshold, only for diag. entries */\n#define UMFPACK_SCALE 16\t\t/* what row scaling to do */\n#define UMFPACK_FRONT_ALLOC_INIT 17\t/* frontal matrix allocation ratio */\n#define UMFPACK_DROPTOL 18\t\t/* drop tolerance for entries in L,U */\n\n/* used in UMFPACK_*solve only: */\n#define UMFPACK_IRSTEP 7\t\t/* max # of iterative refinements */\n\n/* compile-time settings - Control [8..11] cannot be changed at run time: */\n#define UMFPACK_COMPILED_WITH_BLAS 8\t    /* uses the BLAS */\n#define UMFPACK_COMPILED_FOR_MATLAB 9\t    /* 1 if MATLAB mexFunction, etc. */\n#define UMFPACK_COMPILED_WITH_GETRUSAGE 10  /* uses getrusage timer, or not */\n#define UMFPACK_COMPILED_IN_DEBUG_MODE 11   /* debugging enabled (very slow!) */\n\n/* -------------------------------------------------------------------------- */\n\n/* Control [UMFPACK_STRATEGY] is one of the following: */\n#define UMFPACK_STRATEGY_AUTO 0\t\t/* use sym. or unsym. strategy */\n#define UMFPACK_STRATEGY_UNSYMMETRIC 1\t/* COLAMD(A), coletree postorder,\n\t\t\t\t\t   not prefer diag*/\n#define UMFPACK_STRATEGY_2BY2 2\t\t/* AMD(PA+PA'), no coletree postorder,\n\t\t\t\t\t   prefer diag(PA) where P is pseudo\n\t\t\t\t\t   max transversal */\n#define UMFPACK_STRATEGY_SYMMETRIC 3\t/* AMD(A+A'), no coletree postorder,\n\t\t\t\t\t   prefer diagonal */\n\n/* Control [UMFPACK_SCALE] is one of the following: */\n#define UMFPACK_SCALE_NONE 0\t/* no scaling */\n#define UMFPACK_SCALE_SUM 1\t/* default: divide each row by sum (abs (row))*/\n#define UMFPACK_SCALE_MAX 2\t/* divide each row by max (abs (row)) */\n\n/* -------------------------------------------------------------------------- */\n/* default values of Control: */\n/* -------------------------------------------------------------------------- */\n\n#define UMFPACK_DEFAULT_PRL 1\n#define UMFPACK_DEFAULT_DENSE_ROW 0.2\n#define UMFPACK_DEFAULT_DENSE_COL 0.2\n#define UMFPACK_DEFAULT_PIVOT_TOLERANCE 0.1\n#define UMFPACK_DEFAULT_2BY2_TOLERANCE 0.01\n#define UMFPACK_DEFAULT_SYM_PIVOT_TOLERANCE 0.001\n#define UMFPACK_DEFAULT_BLOCK_SIZE 32\n#define UMFPACK_DEFAULT_ALLOC_INIT 0.7\n#define UMFPACK_DEFAULT_FRONT_ALLOC_INIT 0.5\n#define UMFPACK_DEFAULT_IRSTEP 2\n#define UMFPACK_DEFAULT_SCALE UMFPACK_SCALE_SUM\n#define UMFPACK_DEFAULT_STRATEGY UMFPACK_STRATEGY_AUTO\n#define UMFPACK_DEFAULT_AMD_DENSE AMD_DEFAULT_DENSE\n#define UMFPACK_DEFAULT_FIXQ 0\n#define UMFPACK_DEFAULT_AGGRESSIVE 1\n#define UMFPACK_DEFAULT_DROPTOL 0\n\n/* default values of Control may change in future versions of UMFPACK. */\n\n/* -------------------------------------------------------------------------- */\n/* status codes */\n/* -------------------------------------------------------------------------- */\n\n#define UMFPACK_OK (0)\n\n/* status > 0 means a warning, but the method was successful anyway. */\n/* A Symbolic or Numeric object was still created. */\n#define UMFPACK_WARNING_singular_matrix (1)\n\n/* The following warnings were added in umfpack_*_get_determinant */\n#define UMFPACK_WARNING_determinant_underflow (2)\n#define UMFPACK_WARNING_determinant_overflow (3)\n\n/* status < 0 means an error, and the method was not successful. */\n/* No Symbolic of Numeric object was created. */\n#define UMFPACK_ERROR_out_of_memory (-1)\n#define UMFPACK_ERROR_invalid_Numeric_object (-3)\n#define UMFPACK_ERROR_invalid_Symbolic_object (-4)\n#define UMFPACK_ERROR_argument_missing (-5)\n#define UMFPACK_ERROR_n_nonpositive (-6)\n#define UMFPACK_ERROR_invalid_matrix (-8)\n#define UMFPACK_ERROR_different_pattern (-11)\n#define UMFPACK_ERROR_invalid_system (-13)\n#define UMFPACK_ERROR_invalid_permutation (-15)\n#define UMFPACK_ERROR_internal_error (-911) /* yes, call me if you get this! */\n#define UMFPACK_ERROR_file_IO (-17)\n\n/* -------------------------------------------------------------------------- */\n/* solve codes */\n/* -------------------------------------------------------------------------- */\n\n/* Solve the system ( )x=b, where ( ) is defined below.  \"t\" refers to the */\n/* linear algebraic transpose (complex conjugate if A is complex), or the (') */\n/* operator in MATLAB.  \"at\" refers to the array transpose, or the (.') */\n/* operator in MATLAB. */\n\n#define UMFPACK_A\t(0)\t/* Ax=b    */\n#define UMFPACK_At\t(1)\t/* A'x=b   */\n#define UMFPACK_Aat\t(2)\t/* A.'x=b  */\n\n#define UMFPACK_Pt_L\t(3)\t/* P'Lx=b  */\n#define UMFPACK_L\t(4)\t/* Lx=b    */\n#define UMFPACK_Lt_P\t(5)\t/* L'Px=b  */\n#define UMFPACK_Lat_P\t(6)\t/* L.'Px=b */\n#define UMFPACK_Lt\t(7)\t/* L'x=b   */\n#define UMFPACK_Lat\t(8)\t/* L.'x=b  */\n\n#define UMFPACK_U_Qt\t(9)\t/* UQ'x=b  */\n#define UMFPACK_U\t(10)\t/* Ux=b    */\n#define UMFPACK_Q_Ut\t(11)\t/* QU'x=b  */\n#define UMFPACK_Q_Uat\t(12)\t/* QU.'x=b */\n#define UMFPACK_Ut\t(13)\t/* U'x=b   */\n#define UMFPACK_Uat\t(14)\t/* U.'x=b  */\n\n/* -------------------------------------------------------------------------- */\n\n/* Integer constants are used for status and solve codes instead of enum */\n/* to make it easier for a Fortran code to call UMFPACK. */\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif /* UMFPACK_H */\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_col_to_triplet.h",
    "content": "/* ========================================================================== */\n/* === umfpack_col_to_triplet =============================================== */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_col_to_triplet\n(\n    int n_col,\n    const int Ap [ ],\n    int Tj [ ]\n) ;\n\nUF_long umfpack_dl_col_to_triplet\n(\n    UF_long n_col,\n    const UF_long Ap [ ],\n    UF_long Tj [ ]\n) ;\n\nint umfpack_zi_col_to_triplet\n(\n    int n_col,\n    const int Ap [ ],\n    int Tj [ ]\n) ;\n\nUF_long umfpack_zl_col_to_triplet\n(\n    UF_long n_col,\n    const UF_long Ap [ ],\n    UF_long Tj [ ]\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    int n_col, *Tj, *Ap, status ;\n    status = umfpack_di_col_to_triplet (n_col, Ap, Tj) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long n_col, *Tj, *Ap, status ;\n    status = umfpack_dl_col_to_triplet (n_col, Ap, Tj) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    int n_col, *Tj, *Ap, status ;\n    status = umfpack_zi_col_to_triplet (n_col, Ap, Tj) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long n_col, *Tj, *Ap, status ;\n    status = umfpack_zl_col_to_triplet (n_col, Ap, Tj) ;\n\nPurpose:\n\n    Converts a column-oriented matrix to a triplet form.  Only the column\n    pointers, Ap, are required, and only the column indices of the triplet form\n    are constructed.   This routine is the opposite of umfpack_*_triplet_to_col.\n    The matrix may be singular and/or rectangular.  Analogous to [i, Tj, x] =\n    find (A) in MATLAB, except that zero entries present in the column-form of\n    A are present in the output, and i and x are not created (those are just Ai\n    and Ax+Az*1i, respectively, for a column-form matrix A).\n\nReturns:\n\n    UMFPACK_OK if successful\n    UMFPACK_ERROR_argument_missing if Ap or Tj is missing\n    UMFPACK_ERROR_n_nonpositive if n_col <= 0\n    UMFPACK_ERROR_invalid_matrix if Ap [n_col] < 0, Ap [0] != 0, or\n\tAp [j] > Ap [j+1] for any j in the range 0 to n-1.\n    Unsorted columns and duplicate entries do not cause an error (these would\n    only be evident by examining Ai).  Empty rows and columns are OK.\n\nArguments:\n\n    Int n_col ;\t\tInput argument, not modified.\n\n\tA is an n_row-by-n_col matrix.  Restriction: n_col > 0.\n\t(n_row is not required)\n\n    Int Ap [n_col+1] ;\tInput argument, not modified.\n\n\tThe column pointers of the column-oriented form of the matrix.  See\n\tumfpack_*_*symbolic for a description.  The number of entries in\n\tthe matrix is nz = Ap [n_col].  Restrictions on Ap are the same as those\n\tfor umfpack_*_transpose.  Ap [0] must be zero, nz must be >= 0, and\n\tAp [j] <= Ap [j+1] and Ap [j] <= Ap [n_col] must be true for all j in\n\tthe range 0 to n_col-1.  Empty columns are OK (that is, Ap [j] may equal\n\tAp [j+1] for any j in the range 0 to n_col-1).\n\n    Int Tj [nz] ;\tOutput argument.\n\n\tTj is an integer array of size nz on input, where nz = Ap [n_col].\n\tSuppose the column-form of the matrix is held in Ap, Ai, Ax, and Az\n\t(see umfpack_*_*symbolic for a description).  Then on output, the\n\ttriplet form of the same matrix is held in Ai (row indices), Tj (column\n\tindices), and Ax (numerical values).  Note, however, that this routine\n\tdoes not require Ai and Ax (or Az for the complex version) in order to\n\tdo the conversion.\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_defaults.h",
    "content": "/* ========================================================================== */\n/* === umfpack_defaults ===================================================== */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nvoid umfpack_di_defaults\n(\n    double Control [UMFPACK_CONTROL]\n) ;\n\nvoid umfpack_dl_defaults\n(\n    double Control [UMFPACK_CONTROL]\n) ;\n\nvoid umfpack_zi_defaults\n(\n    double Control [UMFPACK_CONTROL]\n) ;\n\nvoid umfpack_zl_defaults\n(\n    double Control [UMFPACK_CONTROL]\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    double Control [UMFPACK_CONTROL] ;\n    umfpack_di_defaults (Control) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    double Control [UMFPACK_CONTROL] ;\n    umfpack_dl_defaults (Control) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    double Control [UMFPACK_CONTROL] ;\n    umfpack_zi_defaults (Control) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    double Control [UMFPACK_CONTROL] ;\n    umfpack_zl_defaults (Control) ;\n\nPurpose:\n\n    Sets the default control parameter settings.\n\nArguments:\n\n    double Control [UMFPACK_CONTROL] ;\tOutput argument.\n\n\tControl is set to the default control parameter settings.  You can\n\tthen modify individual settings by changing specific entries in the\n\tControl array.  If Control is a (double *) NULL pointer, then\n\tumfpack_*_defaults returns silently (no error is generated, since\n\tpassing a NULL pointer for Control to any UMFPACK routine is valid).\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_free_numeric.h",
    "content": "/* ========================================================================== */\n/* === umfpack_free_numeric ================================================= */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nvoid umfpack_di_free_numeric\n(\n    void **Numeric\n) ;\n\nvoid umfpack_dl_free_numeric\n(\n    void **Numeric\n) ;\n\nvoid umfpack_zi_free_numeric\n(\n    void **Numeric\n) ;\n\nvoid umfpack_zl_free_numeric\n(\n    void **Numeric\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    umfpack_di_free_numeric (&Numeric) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    umfpack_dl_free_numeric (&Numeric) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    umfpack_zi_free_numeric (&Numeric) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    umfpack_zl_free_numeric (&Numeric) ;\n\nPurpose:\n\n    Deallocates the Numeric object and sets the Numeric handle to NULL.  This\n    routine is the only valid way of destroying the Numeric object.\n\nArguments:\n\n    void **Numeric ;\t    Input argument, set to (void *) NULL on output.\n\n\tNumeric points to a valid Numeric object, computed by umfpack_*_numeric.\n\tNo action is taken if Numeric is a (void *) NULL pointer.\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_free_symbolic.h",
    "content": "/* ========================================================================== */\n/* === umfpack_free_symbolic ================================================ */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nvoid umfpack_di_free_symbolic\n(\n    void **Symbolic\n) ;\n\nvoid umfpack_dl_free_symbolic\n(\n    void **Symbolic\n) ;\n\nvoid umfpack_zi_free_symbolic\n(\n    void **Symbolic\n) ;\n\nvoid umfpack_zl_free_symbolic\n(\n    void **Symbolic\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    void *Symbolic ;\n    umfpack_di_free_symbolic (&Symbolic) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Symbolic ;\n    umfpack_dl_free_symbolic (&Symbolic) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    void *Symbolic ;\n    umfpack_zi_free_symbolic (&Symbolic) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Symbolic ;\n    umfpack_zl_free_symbolic (&Symbolic) ;\n\nPurpose:\n\n    Deallocates the Symbolic object and sets the Symbolic handle to NULL.  This\n    routine is the only valid way of destroying the Symbolic object.\n\nArguments:\n\n    void **Symbolic ;\t    Input argument, set to (void *) NULL on output.\n\n\tPoints to a valid Symbolic object computed by umfpack_*_symbolic.\n\tNo action is taken if Symbolic is a (void *) NULL pointer.\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_get_determinant.h",
    "content": "/* ========================================================================== */\n/* === UMFPACK_get_determinant ============================================== */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* UMFPACK_get_determinant contributed by David Bateman, Motorola, Paris. */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_get_determinant\n(\n    double *Mx,\n    double *Ex,\n    void *NumericHandle,\n    double User_Info [UMFPACK_INFO]\n) ;\n\nUF_long umfpack_dl_get_determinant\n(\n    double *Mx,\n    double *Ex,\n    void *NumericHandle,\n    double User_Info [UMFPACK_INFO]\n) ;\n\nint umfpack_zi_get_determinant\n(\n    double *Mx,\n    double *Mz,\n    double *Ex,\n    void *NumericHandle,\n    double User_Info [UMFPACK_INFO]\n) ;\n\nUF_long umfpack_zl_get_determinant\n(\n    double *Mx,\n    double *Mz,\n    double *Ex,\n    void *NumericHandle,\n    double User_Info [UMFPACK_INFO]\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    int status ;\n    double Mx, Ex, Info [UMFPACK_INFO] ;\n    status = umfpack_di_get_determinant (&Mx, &Ex, Numeric, Info) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    UF_long status ;\n    double Mx, Ex, Info [UMFPACK_INFO] ;\n    status = umfpack_dl_get_determinant (&Mx, &Ex, Numeric, Info) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    int status ;\n    double Mx, Mz, Ex, Info [UMFPACK_INFO] ;\n    status = umfpack_zi_get_determinant (&Mx, &Mz, &Ex, Numeric, Info) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    UF_long status ;\n    double *Mx, *Mz, *Ex, Info [UMFPACK_INFO] ;\n    status = umfpack_zl_get_determinant (&Mx, &Mz, &Ex, Numeric, Info) ;\n\npacked complex int Syntax:\n\n    Same as above, except Mz is NULL.\n\nAuthor: Contributed by David Bateman, Motorola, Paris\n\nPurpose:\n\n    Using the LU factors and the permutation vectors contained in the Numeric\n    object, calculate the determinant of the matrix A.\n\n    The value of the determinant can be returned in two forms, depending on\n    whether Ex is NULL or not.  If Ex is NULL then the value of the determinant\n    is returned on Mx and Mz for the real and imaginary parts.  However, to\n    avoid over- or underflows, the determinant can be split into a mantissa\n    and exponent, and the parts returned separately, in which case Ex is not\n    NULL.  The actual determinant is then given by\n\n      double det ;\n      det = Mx * pow (10.0, Ex) ;\n\n    for the double case, or\n\n      double det [2] ;\n      det [0] = Mx * pow (10.0, Ex) ;\t    // real part\n      det [1] = Mz * pow (10.0, Ex) ;\t    // imaginary part\n\n    for the complex case.  Information on if the determinant will or has\n    over or under-flowed is given by Info [UMFPACK_STATUS].\n\n    In the \"packed complex\" syntax, Mx [0] holds the real part and Mx [1]\n    holds the imaginary part.  Mz is not used (it is NULL).\n\nReturns:\n\n    Returns UMFPACK_OK if sucessful.  Returns UMFPACK_ERROR_out_of_memory if\n    insufficient memory is available for the n_row integer workspace that\n    umfpack_*_get_determinant allocates to construct pivots from the\n    permutation vectors.  Returns UMFPACK_ERROR_invalid_Numeric_object if the\n    Numeric object provided as input is invalid.  Returns\n    UMFPACK_WARNING_singular_matrix if the determinant is zero.  Returns\n    UMFPACK_WARNING_determinant_underflow or\n    UMFPACK_WARNING_determinant_overflow if the determinant has underflowed\n    overflowed (for the case when Ex is NULL), or will overflow if Ex is not\n    NULL and det is computed (see above) in the user program.\n\nArguments:\n\n    double *Mx ;   Output argument (array of size 1, or size 2 if Mz is NULL)\n    double *Mz ;   Output argument (optional)\n    double *Ex ;   Output argument (optional)\n\n        The determinant returned in mantissa/exponent form, as discussed above.\n\tIf Mz is NULL, then both the original and imaginary parts will be\n\treturned in Mx. If Ex is NULL then the determinant is returned directly\n\tin Mx and Mz (or Mx [0] and Mx [1] if Mz is NULL), rather than in\n\tmantissa/exponent form.\n\n    void *Numeric ;\tInput argument, not modified.\n\n\tNumeric must point to a valid Numeric object, computed by\n\tumfpack_*_numeric.\n\n    double Info [UMFPACK_INFO] ;\tOutput argument.\n\n\tContains information about the calculation of the determinant. If a\n\t(double *) NULL pointer is passed, then no statistics are returned in\n\tInfo (this is not an error condition).  The following statistics are\n\tcomputed in umfpack_*_determinant:\n\n\tInfo [UMFPACK_STATUS]: status code.  This is also the return value,\n\t    whether or not Info is present.\n\n\t    UMFPACK_OK\n\n\t        The determinant was successfully found.\n\n\t    UMFPACK_ERROR_out_of_memory\n\n\t\tInsufficient memory to solve the linear system.\n\n\t    UMFPACK_ERROR_argument_missing\n\n\t\tMx is missing (NULL).\n\n\t    UMFPACK_ERROR_invalid_Numeric_object\n\n\t\tThe Numeric object is not valid.\n\n\t    UMFPACK_ERROR_invalid_system\n\n\t\tThe matrix is rectangular.  Only square systems can be\n\t\thandled.\n\n\t    UMFPACK_WARNING_singluar_matrix\n\n\t\tThe determinant is zero or NaN.  The matrix is singular.\n\n\t    UMFPACK_WARNING_determinant_underflow\n\n\t        When passing from mantissa/exponent form to the determinant\n\t\tan underflow has or will occur.  If the mantissa/exponent from\n\t\tof obtaining the determinant is used, the underflow will occur\n\t\tin the user program.  If the single argument method of\n\t\tobtaining the determinant is used, the underflow has already\n\t\toccurred.\n\n\t    UMFPACK_WARNING_determinant_overflow\n\n\t        When passing from mantissa/exponent form to the determinant\n\t\tan overflow has or will occur.  If the mantissa/exponent from\n\t\tof obtaining the determinant is used, the overflow will occur\n\t\tin the user program.  If the single argument method of\n\t\tobtaining the determinant is used, the overflow has already\n\t\toccurred.\n\n\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_get_lunz.h",
    "content": "/* ========================================================================== */\n/* === umfpack_get_lunz ===================================================== */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_get_lunz\n(\n    int *lnz,\n    int *unz,\n    int *n_row,\n    int *n_col,\n    int *nz_udiag,\n    void *Numeric\n) ;\n\nUF_long umfpack_dl_get_lunz\n(\n    UF_long *lnz,\n    UF_long *unz,\n    UF_long *n_row,\n    UF_long *n_col,\n    UF_long *nz_udiag,\n    void *Numeric\n) ;\n\nint umfpack_zi_get_lunz\n(\n    int *lnz,\n    int *unz,\n    int *n_row,\n    int *n_col,\n    int *nz_udiag,\n    void *Numeric\n) ;\n\nUF_long umfpack_zl_get_lunz\n(\n    UF_long *lnz,\n    UF_long *unz,\n    UF_long *n_row,\n    UF_long *n_col,\n    UF_long *nz_udiag,\n    void *Numeric\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    int status, lnz, unz, n_row, n_col, nz_udiag ;\n    status = umfpack_di_get_lunz (&lnz, &unz, &n_row, &n_col, &nz_udiag,\n\tNumeric) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    UF_long status, lnz, unz, n_row, n_col, nz_udiag ;\n    status = umfpack_dl_get_lunz (&lnz, &unz, &n_row, &n_col, &nz_udiag,\n\tNumeric) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    int status, lnz, unz, n_row, n_col, nz_udiag ;\n    status = umfpack_zi_get_lunz (&lnz, &unz, &n_row, &n_col, &nz_udiag,\n\tNumeric) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    UF_long status, lnz, unz, n_row, n_col, nz_udiag ;\n    status = umfpack_zl_get_lunz (&lnz, &unz, &n_row, &n_col, &nz_udiag,\n\tNumeric) ;\n\nPurpose:\n\n    Determines the size and number of nonzeros in the LU factors held by the\n    Numeric object.  These are also the sizes of the output arrays required\n    by umfpack_*_get_numeric.\n\n    The matrix L is n_row -by- min(n_row,n_col), with lnz nonzeros, including\n    the entries on the unit diagonal of L.\n\n    The matrix U is min(n_row,n_col) -by- n_col, with unz nonzeros, including\n    nonzeros on the diagonal of U.\n\nReturns:\n\n    UMFPACK_OK if successful.\n    UMFPACK_ERROR_invalid_Numeric_object if Numeric is not a valid object.\n    UMFPACK_ERROR_argument_missing if any other argument is (Int *) NULL.\n\nArguments:\n\n    Int *lnz ;\t\tOutput argument.\n\n\tThe number of nonzeros in L, including the diagonal (which is all\n\tone's).  This value is the required size of the Lj and Lx arrays as\n\tcomputed by umfpack_*_get_numeric.  The value of lnz is identical to\n\tInfo [UMFPACK_LNZ], if that value was returned by umfpack_*_numeric.\n\n    Int *unz ;\t\tOutput argument.\n\n\tThe number of nonzeros in U, including the diagonal.  This value is the\n\trequired size of the Ui and Ux arrays as computed by\n\tumfpack_*_get_numeric.  The value of unz is identical to\n\tInfo [UMFPACK_UNZ], if that value was returned by umfpack_*_numeric.\n\n    Int *n_row ;\tOutput argument.\n    Int *n_col ;\tOutput argument.\n\n\tThe order of the L and U matrices.  L is n_row -by- min(n_row,n_col)\n\tand U is min(n_row,n_col) -by- n_col.\n\n    Int *nz_udiag ;\tOutput argument.\n\n\tThe number of numerically nonzero values on the diagonal of U.  The\n\tmatrix is singular if nz_diag < min(n_row,n_col).  A divide-by-zero\n\twill occur if nz_diag < n_row == n_col when solving a sparse system\n\tinvolving the matrix U in umfpack_*_*solve.  The value of nz_udiag is\n\tidentical to Info [UMFPACK_UDIAG_NZ] if that value was returned by\n\tumfpack_*_numeric.\n\n    void *Numeric ;\tInput argument, not modified.\n\n\tNumeric must point to a valid Numeric object, computed by\n\tumfpack_*_numeric.\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_get_numeric.h",
    "content": "/* ========================================================================== */\n/* === umfpack_get_numeric ================================================== */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_get_numeric\n(\n    int Lp [ ],\n    int Lj [ ],\n    double Lx [ ],\n    int Up [ ],\n    int Ui [ ],\n    double Ux [ ],\n    int P [ ],\n    int Q [ ],\n    double Dx [ ],\n    int *do_recip,\n    double Rs [ ],\n    void *Numeric\n) ;\n\nUF_long umfpack_dl_get_numeric\n(\n    UF_long Lp [ ],\n    UF_long Lj [ ],\n    double Lx [ ],\n    UF_long Up [ ],\n    UF_long Ui [ ],\n    double Ux [ ],\n    UF_long P [ ],\n    UF_long Q [ ],\n    double Dx [ ],\n    UF_long *do_recip,\n    double Rs [ ],\n    void *Numeric\n) ;\n\nint umfpack_zi_get_numeric\n(\n    int Lp [ ],\n    int Lj [ ],\n    double Lx [ ], double Lz [ ],\n    int Up [ ],\n    int Ui [ ],\n    double Ux [ ], double Uz [ ],\n    int P [ ],\n    int Q [ ],\n    double Dx [ ], double Dz [ ],\n    int *do_recip,\n    double Rs [ ],\n    void *Numeric\n) ;\n\nUF_long umfpack_zl_get_numeric\n(\n    UF_long Lp [ ],\n    UF_long Lj [ ],\n    double Lx [ ], double Lz [ ],\n    UF_long Up [ ],\n    UF_long Ui [ ],\n    double Ux [ ], double Uz [ ],\n    UF_long P [ ],\n    UF_long Q [ ],\n    double Dx [ ], double Dz [ ],\n    UF_long *do_recip,\n    double Rs [ ],\n    void *Numeric\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    int *Lp, *Lj, *Up, *Ui, *P, *Q, status, do_recip ;\n    double *Lx, *Ux, *Dx, *Rs ;\n    status = umfpack_di_get_numeric (Lp, Lj, Lx, Up, Ui, Ux, P, Q, Dx,\n\t&do_recip, Rs, Numeric) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    UF_long *Lp, *Lj, *Up, *Ui, *P, *Q, status, do_recip ;\n    double *Lx, *Ux, *Dx, *Rs ;\n    status = umfpack_dl_get_numeric (Lp, Lj, Lx, Up, Ui, Ux, P, Q, Dx,\n\t&do_recip, Rs, Numeric) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    int *Lp, *Lj, *Up, *Ui, *P, *Q, status, do_recip ;\n    double *Lx, *Lz, *Ux, *Uz, *Dx, *Dz, *Rs ;\n    status = umfpack_zi_get_numeric (Lp, Lj, Lx, Lz, Up, Ui, Ux, Uz, P, Q,\n\tDx, Dz, &do_recip, Rs, Numeric) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    UF_long *Lp, *Lj, *Up, *Ui, *P, *Q, status, do_recip ;\n    double *Lx, *Lz, *Ux, *Uz, *Dx, *Dz, *Rs ;\n    status = umfpack_zl_get_numeric (Lp, Lj, Lx, Lz, Up, Ui, Ux, Uz, P, Q,\n\tDx, Dz, &do_recip, Rs, Numeric) ;\n\npacked complex int/UF_long Syntax:\n\n    Same as above, except Lz, Uz, and Dz are all NULL.\n\nPurpose:\n\n    This routine copies the LU factors and permutation vectors from the Numeric\n    object into user-accessible arrays.  This routine is not needed to solve a\n    linear system.  Note that the output arrays Lp, Lj, Lx, Up, Ui, Ux, P, Q,\n    Dx, and Rs are not allocated by umfpack_*_get_numeric; they must exist on\n    input.\n\n    All output arguments are optional.  If any of them are NULL\n    on input, then that part of the LU factorization is not copied.  You can\n    use this routine to extract just the parts of the LU factorization that\n    you want.  For example, to retrieve just the column permutation Q, use:\n\n    #define noD (double *) NULL\n    #define noI (int *) NULL\n    status = umfpack_di_get_numeric (noI, noI, noD, noI, noI, noD, noI,\n\tQ, noD, noI, noD, Numeric) ;\n\nReturns:\n\n    Returns UMFPACK_OK if successful.  Returns UMFPACK_ERROR_out_of_memory\n    if insufficient memory is available for the 2*max(n_row,n_col) integer\n    workspace that umfpack_*_get_numeric allocates to construct L and/or U.\n    Returns UMFPACK_ERROR_invalid_Numeric_object if the Numeric object provided\n    as input is invalid.\n\nArguments:\n\n    Int Lp [n_row+1] ;\tOutput argument.\n    Int Lj [lnz] ;\tOutput argument.\n    double Lx [lnz] ;\tOutput argument.  Size 2*lnz for packed complex case.\n    double Lz [lnz] ;\tOutput argument for complex versions.\n\n\tThe n_row-by-min(n_row,n_col) matrix L is returned in compressed-row\n\tform.  The column indices of row i and corresponding numerical values\n\tare in:\n\n\t    Lj [Lp [i] ... Lp [i+1]-1]\n\t    Lx [Lp [i] ... Lp [i+1]-1]\treal part\n\t    Lz [Lp [i] ... Lp [i+1]-1]\timaginary part (complex versions)\n\n\trespectively.  Each row is stored in sorted order, from low column\n\tindices to higher.  The last entry in each row is the diagonal, which\n\tis numerically equal to one.  The sizes of Lp, Lj, Lx, and Lz are\n\treturned by umfpack_*_get_lunz.    If Lp, Lj, or Lx are not present,\n\tthen the matrix L is not returned.  This is not an error condition.\n\tThe L matrix can be printed if n_row, Lp, Lj, Lx (and Lz for the split\n\tcomplex case) are passed to umfpack_*_report_matrix (using the\n\t\"row\" form).\n\n\tIf Lx is present and Lz is NULL, then both real\n\tand imaginary parts are returned in Lx[0..2*lnz-1], with Lx[2*k]\n\tand Lx[2*k+1] being the real and imaginary part of the kth entry.\n\n    Int Up [n_col+1] ;\tOutput argument.\n    Int Ui [unz] ;\tOutput argument.\n    double Ux [unz] ;\tOutput argument. Size 2*unz for packed complex case.\n    double Uz [unz] ;\tOutput argument for complex versions.\n\n\tThe min(n_row,n_col)-by-n_col matrix U is returned in compressed-column\n\tform.  The row indices of column j and corresponding numerical values\n\tare in\n\n\t    Ui [Up [j] ... Up [j+1]-1]\n\t    Ux [Up [j] ... Up [j+1]-1]\treal part\n\t    Uz [Up [j] ... Up [j+1]-1]\timaginary part (complex versions)\n\n\trespectively.  Each column is stored in sorted order, from low row\n\tindices to higher.  The last entry in each column is the diagonal\n\t(assuming that it is nonzero).  The sizes of Up, Ui, Ux, and Uz are\n\treturned by umfpack_*_get_lunz.  If Up, Ui, or Ux are not present,\n\tthen the matrix U is not returned.  This is not an error condition.\n\tThe U matrix can be printed if n_col, Up, Ui, Ux (and Uz for the\n\tsplit complex case) are passed to umfpack_*_report_matrix (using the\n\t\"column\" form).\n\n\tIf Ux is present and Uz is NULL, then both real\n\tand imaginary parts are returned in Ux[0..2*unz-1], with Ux[2*k]\n\tand Ux[2*k+1] being the real and imaginary part of the kth entry.\n\n    Int P [n_row] ;\t\tOutput argument.\n\n\tThe permutation vector P is defined as P [k] = i, where the original\n\trow i of A is the kth pivot row in PAQ.  If you do not want the P vector\n\tto be returned, simply pass (Int *) NULL for P.  This is not an error\n\tcondition.  You can print P and Q with umfpack_*_report_perm.\n\n    Int Q [n_col] ;\t\tOutput argument.\n\n\tThe permutation vector Q is defined as Q [k] = j, where the original\n\tcolumn j of A is the kth pivot column in PAQ.  If you not want the Q\n\tvector to be returned, simply pass (Int *) NULL for Q.  This is not\n\tan error condition.  Note that Q is not necessarily identical to\n\tQtree, the column pre-ordering held in the Symbolic object.  Refer to\n\tthe description of Qtree and Front_npivcol in umfpack_*_get_symbolic for\n\tdetails.\n\n    double Dx [min(n_row,n_col)] ;\tOutput argument.  Size 2*n for\n\t\t\t\t\tthe packed complex case.\n    double Dz [min(n_row,n_col)] ;\tOutput argument for complex versions.\n\n\tThe diagonal of U is also returned in Dx and Dz.  You can extract the\n\tdiagonal of U without getting all of U by passing a non-NULL Dx (and\n\tDz for the complex version) and passing Up, Ui, and Ux as NULL.  Dx is\n\tthe real part of the diagonal, and Dz is the imaginary part.\n\n\tIf Dx is present and Dz is NULL, then both real\n\tand imaginary parts are returned in Dx[0..2*min(n_row,n_col)-1],\n\twith Dx[2*k] and Dx[2*k+1] being the real and imaginary part of the kth\n\tentry.\n\n    Int *do_recip ;\t\tOutput argument.\n\n\tThis argument defines how the scale factors Rs are to be interpretted.\n\n\tIf do_recip is TRUE (one), then the scale factors Rs [i] are to be used\n\tby multiplying row i by Rs [i].  Otherwise, the entries in row i are to\n\tbe divided by Rs [i].\n\n\tIf UMFPACK has been compiled with gcc, or for MATLAB as either a\n\tbuilt-in routine or as a mexFunction, then the NRECIPROCAL flag is\n\tset, and do_recip will always be FALSE (zero).\n\n    double Rs [n_row] ;\t\tOutput argument.\n\n\tThe row scale factors are returned in Rs [0..n_row-1].  Row i of A is\n\tscaled by dividing or multiplying its values by Rs [i].  If default\n\tscaling is in use, Rs [i] is the sum of the absolute values of row i\n\t(or its reciprocal).  If max row scaling is in use, then Rs [i] is the\n\tmaximum absolute value in row i (or its reciprocal).\n\tOtherwise, Rs [i] = 1.  If row i is all zero, Rs [i] = 1 as well.  For\n\tthe complex version, an approximate absolute value is used\n\t(|x_real|+|x_imag|).\n\n    void *Numeric ;\tInput argument, not modified.\n\n\tNumeric must point to a valid Numeric object, computed by\n\tumfpack_*_numeric.\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_get_symbolic.h",
    "content": "/* ========================================================================== */\n/* === umfpack_get_symbolic ================================================= */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_get_symbolic\n(\n    int *n_row,\n    int *n_col,\n    int *n1,\n    int *nz,\n    int *nfr,\n    int *nchains,\n    int P [ ],\n    int Q [ ],\n    int Front_npivcol [ ],\n    int Front_parent [ ],\n    int Front_1strow [ ],\n    int Front_leftmostdesc [ ],\n    int Chain_start [ ],\n    int Chain_maxrows [ ],\n    int Chain_maxcols [ ],\n    void *Symbolic\n) ;\n\nUF_long umfpack_dl_get_symbolic\n(\n    UF_long *n_row,\n    UF_long *n_col,\n    UF_long *n1,\n    UF_long *nz,\n    UF_long *nfr,\n    UF_long *nchains,\n    UF_long P [ ],\n    UF_long Q [ ],\n    UF_long Front_npivcol [ ],\n    UF_long Front_parent [ ],\n    UF_long Front_1strow [ ],\n    UF_long Front_leftmostdesc [ ],\n    UF_long Chain_start [ ],\n    UF_long Chain_maxrows [ ],\n    UF_long Chain_maxcols [ ],\n    void *Symbolic\n) ;\n\nint umfpack_zi_get_symbolic\n(\n    int *n_row,\n    int *n_col,\n    int *n1,\n    int *nz,\n    int *nfr,\n    int *nchains,\n    int P [ ],\n    int Q [ ],\n    int Front_npivcol [ ],\n    int Front_parent [ ],\n    int Front_1strow [ ],\n    int Front_leftmostdesc [ ],\n    int Chain_start [ ],\n    int Chain_maxrows [ ],\n    int Chain_maxcols [ ],\n    void *Symbolic\n) ;\n\nUF_long umfpack_zl_get_symbolic\n(\n    UF_long *n_row,\n    UF_long *n_col,\n    UF_long *n1,\n    UF_long *nz,\n    UF_long *nfr,\n    UF_long *nchains,\n    UF_long P [ ],\n    UF_long Q [ ],\n    UF_long Front_npivcol [ ],\n    UF_long Front_parent [ ],\n    UF_long Front_1strow [ ],\n    UF_long Front_leftmostdesc [ ],\n    UF_long Chain_start [ ],\n    UF_long Chain_maxrows [ ],\n    UF_long Chain_maxcols [ ],\n    void *Symbolic\n) ;\n\n/*\n\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    int status, n_row, n_col, nz, nfr, nchains, *P, *Q,\n\t*Front_npivcol, *Front_parent, *Front_1strow, *Front_leftmostdesc,\n\t*Chain_start, *Chain_maxrows, *Chain_maxcols ;\n    void *Symbolic ;\n    status = umfpack_di_get_symbolic (&n_row, &n_col, &nz, &nfr, &nchains,\n\tP, Q, Front_npivcol, Front_parent, Front_1strow,\n\tFront_leftmostdesc, Chain_start, Chain_maxrows, Chain_maxcols,\n\tSymbolic) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long status, n_row, n_col, nz, nfr, nchains, *P, *Q,\n\t*Front_npivcol, *Front_parent, *Front_1strow, *Front_leftmostdesc,\n\t*Chain_start, *Chain_maxrows, *Chain_maxcols ;\n    void *Symbolic ;\n    status = umfpack_dl_get_symbolic (&n_row, &n_col, &nz, &nfr, &nchains,\n\tP, Q, Front_npivcol, Front_parent, Front_1strow,\n\tFront_leftmostdesc, Chain_start, Chain_maxrows, Chain_maxcols,\n\tSymbolic) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    int status, n_row, n_col, nz, nfr, nchains, *P, *Q,\n\t*Front_npivcol, *Front_parent, *Front_1strow, *Front_leftmostdesc,\n\t*Chain_start, *Chain_maxrows, *Chain_maxcols ;\n    void *Symbolic ;\n    status = umfpack_zi_get_symbolic (&n_row, &n_col, &nz, &nfr, &nchains,\n\tP, Q, Front_npivcol, Front_parent, Front_1strow,\n\tFront_leftmostdesc, Chain_start, Chain_maxrows, Chain_maxcols,\n\tSymbolic) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long status, n_row, n_col, nz, nfr, nchains, *P, *Q,\n\t*Front_npivcol, *Front_parent, *Front_1strow, *Front_leftmostdesc,\n\t*Chain_start, *Chain_maxrows, *Chain_maxcols ;\n    void *Symbolic ;\n    status = umfpack_zl_get_symbolic (&n_row, &n_col, &nz, &nfr, &nchains,\n\tP, Q, Front_npivcol, Front_parent, Front_1strow,\n\tFront_leftmostdesc, Chain_start, Chain_maxrows, Chain_maxcols,\n\tSymbolic) ;\n\nPurpose:\n\n    Copies the contents of the Symbolic object into simple integer arrays\n    accessible to the user.  This routine is not needed to factorize and/or\n    solve a sparse linear system using UMFPACK.  Note that the output arrays\n    P, Q, Front_npivcol, Front_parent, Front_1strow, Front_leftmostdesc,\n    Chain_start, Chain_maxrows, and Chain_maxcols are not allocated by\n    umfpack_*_get_symbolic; they must exist on input.\n\n    All output arguments are optional.  If any of them are NULL\n    on input, then that part of the symbolic analysis is not copied.  You can\n    use this routine to extract just the parts of the symbolic analysis that\n    you want.  For example, to retrieve just the column permutation Q, use:\n\n    #define noI (int *) NULL\n    status = umfpack_di_get_symbolic (noI, noI, noI, noI, noI, noI, noI,\n\t    Q, noI, noI, noI, noI, noI, noI, noI, Symbolic) ;\n\n    The only required argument the last one, the pointer to the Symbolic object.\n\n    The Symbolic object is small.  Its size for an n-by-n square matrix varies\n    from 4*n to 13*n, depending on the matrix.  The object holds the initial\n    column permutation, the supernodal column elimination tree, and information\n    about each frontal matrix.  You can print it with umfpack_*_report_symbolic.\n\nReturns:\n\n    Returns UMFPACK_OK if successful, UMFPACK_ERROR_invalid_Symbolic_object\n    if Symbolic is an invalid object.\n\nArguments:\n\n    Int *n_row ;\tOutput argument.\n    Int *n_col ;\tOutput argument.\n\n\tThe dimensions of the matrix A analyzed by the call to\n\tumfpack_*_symbolic that generated the Symbolic object.\n\n    Int *n1 ;\t\tOutput argument.\n\n\tThe number of pivots with zero Markowitz cost (they have just one entry\n\tin the pivot row, or the pivot column, or both).  These appear first in\n\tthe output permutations P and Q.\n\n    Int *nz ;\t\tOutput argument.\n\n\tThe number of nonzeros in A.\n\n    Int *nfr ;\tOutput argument.\n\n\tThe number of frontal matrices that will be used by umfpack_*_numeric\n\tto factorize the matrix A.  It is in the range 0 to n_col.\n\n    Int *nchains ;\tOutput argument.\n\n\tThe frontal matrices are related to one another by the supernodal\n\tcolumn elimination tree.  Each node in this tree is one frontal matrix.\n\tThe tree is partitioned into a set of disjoint paths, and a frontal\n\tmatrix chain is one path in this tree.  Each chain is factorized using\n\ta unifrontal technique, with a single working array that holds each\n\tfrontal matrix in the chain, one at a time.  nchains is in the range\n\t0 to nfr.\n\n    Int P [n_row] ;\tOutput argument.\n\n\tThe initial row permutation.  If P [k] = i, then this means that\n\trow i is the kth row in the pre-ordered matrix.  In general, this P is\n\tnot the same as the final row permutation computed by umfpack_*_numeric.\n\n\tFor the unsymmetric strategy, P defines the row-merge order.  Let j be\n\tthe column index of the leftmost nonzero entry in row i of A*Q.  Then\n\tP defines a sort of the rows according to this value.  A row can appear\n\tearlier in this ordering if it is aggressively absorbed before it can\n\tbecome a pivot row.  If P [k] = i, row i typically will not be the kth\n\tpivot row.\n\n\tFor the symmetric strategy, P = Q.  For the 2-by-2 strategy, P is the\n\trow permutation that places large entries on the diagonal of P*A*Q.\n\tIf no pivoting occurs during numerical factorization, P [k] = i also\n\tdefines the final permutation of umfpack_*_numeric, for either the\n\tsymmetric or 2-by-2 strategies.\n\n    Int Q [n_col] ;\tOutput argument.\n\n\tThe initial column permutation.  If Q [k] = j, then this means that\n\tcolumn j is the kth pivot column in the pre-ordered matrix.  Q is\n\tnot necessarily the same as the final column permutation Q, computed by\n\tumfpack_*_numeric.  The numeric factorization may reorder the pivot\n\tcolumns within each frontal matrix to reduce fill-in.  If the matrix is\n\tstructurally singular, and if the symmetric or 2-by-2 strategies or\n\tused (or if Control [UMFPACK_FIXQ] > 0), then this Q will be the same\n\tas the final column permutation computed in umfpack_*_numeric.\n\n    Int Front_npivcol [n_col+1] ;\tOutput argument.\n\n\tThis array should be of size at least n_col+1, in order to guarantee\n\tthat it will be large enough to hold the output.  Only the first nfr+1\n\tentries are used, however.\n\n\tThe kth frontal matrix holds Front_npivcol [k] pivot columns.  Thus, the\n\tfirst frontal matrix, front 0, is used to factorize the first\n\tFront_npivcol [0] columns; these correspond to the original columns\n\tQ [0] through Q [Front_npivcol [0]-1].  The next frontal matrix\n\tis used to factorize the next Front_npivcol [1] columns, which are thus\n\tthe original columns Q [Front_npivcol [0]] through\n\tQ [Front_npivcol [0] + Front_npivcol [1] - 1], and so on.  Columns\n\twith no entries at all are put in a placeholder \"front\",\n\tFront_npivcol [nfr].  The sum of Front_npivcol [0..nfr] is equal to\n\tn_col.\n\n\tAny modifications that umfpack_*_numeric makes to the initial column\n\tpermutation are constrained to within each frontal matrix.  Thus, for\n\tthe first frontal matrix, Q [0] through Q [Front_npivcol [0]-1] is some\n\tpermutation of the columns Q [0] through\n\tQ [Front_npivcol [0]-1].  For second frontal matrix,\n\tQ [Front_npivcol [0]] through Q [Front_npivcol [0] + Front_npivcol[1]-1]\n\tis some permutation of the same portion of Q, and so on.  All pivot\n\tcolumns are numerically factorized within the frontal matrix originally\n\tdetermined by the symbolic factorization; there is no delayed pivoting\n\tacross frontal matrices.\n\n    Int Front_parent [n_col+1] ;\tOutput argument.\n\n\tThis array should be of size at least n_col+1, in order to guarantee\n\tthat it will be large enough to hold the output.  Only the first nfr+1\n\tentries are used, however.\n\n\tFront_parent [0..nfr] holds the supernodal column elimination tree\n\t(including the placeholder front nfr, which may be empty).  Each node in\n\tthe tree corresponds to a single frontal matrix.  The parent of node f\n\tis Front_parent [f].\n\n    Int Front_1strow [n_col+1] ;\tOutput argument.\n\n\tThis array should be of size at least n_col+1, in order to guarantee\n\tthat it will be large enough to hold the output.  Only the first nfr+1\n\tentries are used, however.\n\n\tFront_1strow [k] is the row index of the first row in A (P,Q)\n\twhose leftmost entry is in a pivot column for the kth front.  This is\n\tnecessary only to properly factorize singular matrices.  Rows in the\n\trange Front_1strow [k] to Front_1strow [k+1]-1 first become pivot row\n\tcandidates at the kth front.  Any rows not eliminated in the kth front\n\tmay be selected as pivot rows in the parent of k (Front_parent [k])\n\tand so on up the tree.\n\n    Int Front_leftmostdesc [n_col+1] ;\tOutput argument.\n\n\tThis array should be of size at least n_col+1, in order to guarantee\n\tthat it will be large enough to hold the output.  Only the first nfr+1\n\tentries are used, however.\n\n\tFront_leftmostdesc [k] is the leftmost descendant of front k, or k\n\tif the front has no children in the tree.  Since the rows and columns\n\t(P and Q) have been post-ordered via a depth-first-search of\n\tthe tree, rows in the range Front_1strow [Front_leftmostdesc [k]] to\n\tFront_1strow [k+1]-1 form the entire set of candidate pivot rows for\n\tthe kth front (some of these will typically have already been selected\n\tby fronts in the range Front_leftmostdesc [k] to front k-1, before\n\tthe factorization reaches front k).\n\n    Chain_start [n_col+1] ;\tOutput argument.\n\n\tThis array should be of size at least n_col+1, in order to guarantee\n\tthat it will be large enough to hold the output.  Only the first\n\tnchains+1 entries are used, however.\n\n\tThe kth frontal matrix chain consists of frontal matrices Chain_start[k]\n\tthrough Chain_start [k+1]-1.  Thus, Chain_start [0] is always 0, and\n\tChain_start [nchains] is the total number of frontal matrices, nfr.  For\n\ttwo adjacent fronts f and f+1 within a single chain, f+1 is always the\n\tparent of f (that is, Front_parent [f] = f+1).\n\n    Int Chain_maxrows [n_col+1] ;\tOutput argument.\n    Int Chain_maxcols [n_col+1] ;\tOutput argument.\n\n\tThese arrays should be of size at least n_col+1, in order to guarantee\n\tthat they will be large enough to hold the output.  Only the first\n\tnchains entries are used, however.\n\n\tThe kth frontal matrix chain requires a single working array of\n\tdimension Chain_maxrows [k] by Chain_maxcols [k], for the unifrontal\n\ttechnique that factorizes the frontal matrix chain.  Since the symbolic\n\tfactorization only provides an upper bound on the size of each frontal\n\tmatrix, not all of the working array is necessarily used during the\n\tnumerical factorization.\n\n\tNote that the upper bound on the number of rows and columns of each\n\tfrontal matrix is computed by umfpack_*_symbolic, but all that is\n\trequired by umfpack_*_numeric is the maximum of these two sets of\n\tvalues for each frontal matrix chain.  Thus, the size of each\n\tindividual frontal matrix is not preserved in the Symbolic object.\n\n    void *Symbolic ;\t\t\tInput argument, not modified.\n\n\tThe Symbolic object, which holds the symbolic factorization computed by\n\tumfpack_*_symbolic.  The Symbolic object is not modified by\n\tumfpack_*_get_symbolic.\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_global.h",
    "content": "/* ========================================================================== */\n/* === umfpack_global ======================================================= */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\n/* prototypes for global variables, and basic operators for complex values  */\n\n#ifndef EXTERN\n#define EXTERN extern\n#endif\n\nEXTERN double (*umfpack_hypot) (double, double) ;\nEXTERN int (*umfpack_divcomplex) (double, double, double, double, double *, double *) ;\n\ndouble umf_hypot (double x, double y) ;\nint umf_divcomplex (double, double, double, double, double *, double *) ;\n\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_load_numeric.h",
    "content": "/* ========================================================================== */\n/* === umfpack_load_numeric ================================================= */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_load_numeric\n(\n    void **Numeric,\n    char *filename\n) ;\n\nUF_long umfpack_dl_load_numeric\n(\n    void **Numeric,\n    char *filename\n) ;\n\nint umfpack_zi_load_numeric\n(\n    void **Numeric,\n    char *filename\n) ;\n\nUF_long umfpack_zl_load_numeric\n(\n    void **Numeric,\n    char *filename\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    int status ;\n    char *filename ;\n    void *Numeric ;\n    status = umfpack_di_load_numeric (&Numeric, filename) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long status ;\n    char *filename ;\n    void *Numeric ;\n    status = umfpack_dl_load_numeric (&Numeric, filename) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    int status ;\n    char *filename ;\n    void *Numeric ;\n    status = umfpack_zi_load_numeric (&Numeric, filename) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long status ;\n    char *filename ;\n    void *Numeric ;\n    status = umfpack_zl_load_numeric (&Numeric, filename) ;\n\nPurpose:\n\n    Loads a Numeric object from a file created by umfpack_*_save_numeric.  The\n    Numeric handle passed to this routine is overwritten with the new object.\n    If that object exists prior to calling this routine, a memory leak will\n    occur.  The contents of Numeric are ignored on input.\n\nReturns:\n\n    UMFPACK_OK if successful.\n    UMFPACK_ERROR_out_of_memory if not enough memory is available.\n    UMFPACK_ERROR_file_IO if an I/O error occurred.\n\nArguments:\n\n    void **Numeric ;\t    Output argument.\n\n\t**Numeric is the address of a (void *) pointer variable in the user's\n\tcalling routine (see Syntax, above).  On input, the contents of this\n\tvariable are not defined.  On output, this variable holds a (void *)\n\tpointer to the Numeric object (if successful), or (void *) NULL if\n\ta failure occurred.\n\n    char *filename ;\t    Input argument, not modified.\n\n\tA string that contains the filename from which to read the Numeric\n\tobject.\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_load_symbolic.h",
    "content": "/* ========================================================================== */\n/* === umfpack_load_symbolic ================================================ */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_load_symbolic\n(\n    void **Symbolic,\n    char *filename\n) ;\n\nUF_long umfpack_dl_load_symbolic\n(\n    void **Symbolic,\n    char *filename\n) ;\n\nint umfpack_zi_load_symbolic\n(\n    void **Symbolic,\n    char *filename\n) ;\n\nUF_long umfpack_zl_load_symbolic\n(\n    void **Symbolic,\n    char *filename\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    int status ;\n    char *filename ;\n    void *Symbolic ;\n    status = umfpack_di_load_symbolic (&Symbolic, filename) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long status ;\n    char *filename ;\n    void *Symbolic ;\n    status = umfpack_dl_load_symbolic (&Symbolic, filename) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    int status ;\n    char *filename ;\n    void *Symbolic ;\n    status = umfpack_zi_load_symbolic (&Symbolic, filename) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long status ;\n    char *filename ;\n    void *Symbolic ;\n    status = umfpack_zl_load_symbolic (&Symbolic, filename) ;\n\nPurpose:\n\n    Loads a Symbolic object from a file created by umfpack_*_save_symbolic. The\n    Symbolic handle passed to this routine is overwritten with the new object.\n    If that object exists prior to calling this routine, a memory leak will\n    occur.  The contents of Symbolic are ignored on input.\n\nReturns:\n\n    UMFPACK_OK if successful.\n    UMFPACK_ERROR_out_of_memory if not enough memory is available.\n    UMFPACK_ERROR_file_IO if an I/O error occurred.\n\nArguments:\n\n    void **Symbolic ;\t    Output argument.\n\n\t**Symbolic is the address of a (void *) pointer variable in the user's\n\tcalling routine (see Syntax, above).  On input, the contents of this\n\tvariable are not defined.  On output, this variable holds a (void *)\n\tpointer to the Symbolic object (if successful), or (void *) NULL if\n\ta failure occurred.\n\n    char *filename ;\t    Input argument, not modified.\n\n\tA string that contains the filename from which to read the Symbolic\n\tobject.\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_numeric.h",
    "content": "/* ========================================================================== */\n/* === umfpack_numeric ====================================================== */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_numeric\n(\n    const int Ap [ ],\n    const int Ai [ ],\n    const double Ax [ ],\n    void *Symbolic,\n    void **Numeric,\n    const double Control [UMFPACK_CONTROL],\n    double Info [UMFPACK_INFO]\n) ;\n\nUF_long umfpack_dl_numeric\n(\n    const UF_long Ap [ ],\n    const UF_long Ai [ ],\n    const double Ax [ ],\n    void *Symbolic,\n    void **Numeric,\n    const double Control [UMFPACK_CONTROL],\n    double Info [UMFPACK_INFO]\n) ;\n\nint umfpack_zi_numeric\n(\n    const int Ap [ ],\n    const int Ai [ ],\n    const double Ax [ ], const double Az [ ],\n    void *Symbolic,\n    void **Numeric,\n    const double Control [UMFPACK_CONTROL],\n    double Info [UMFPACK_INFO]\n) ;\n\nUF_long umfpack_zl_numeric\n(\n    const UF_long Ap [ ],\n    const UF_long Ai [ ],\n    const double Ax [ ], const double Az [ ],\n    void *Symbolic,\n    void **Numeric,\n    const double Control [UMFPACK_CONTROL],\n    double Info [UMFPACK_INFO]\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    void *Symbolic, *Numeric ;\n    int *Ap, *Ai, status ;\n    double *Ax, Control [UMFPACK_CONTROL], Info [UMFPACK_INFO] ;\n    status = umfpack_di_numeric (Ap, Ai, Ax, Symbolic, &Numeric, Control, Info);\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Symbolic, *Numeric ;\n    UF_long *Ap, *Ai, status ;\n    double *Ax, Control [UMFPACK_CONTROL], Info [UMFPACK_INFO] ;\n    status = umfpack_dl_numeric (Ap, Ai, Ax, Symbolic, &Numeric, Control, Info);\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    void *Symbolic, *Numeric ;\n    int *Ap, *Ai, status ;\n    double *Ax, *Az, Control [UMFPACK_CONTROL], Info [UMFPACK_INFO] ;\n    status = umfpack_zi_numeric (Ap, Ai, Ax, Az, Symbolic, &Numeric,\n\tControl, Info) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Symbolic, *Numeric ;\n    UF_long *Ap, *Ai, status ;\n    double *Ax, *Az, Control [UMFPACK_CONTROL], Info [UMFPACK_INFO] ;\n    status = umfpack_zl_numeric (Ap, Ai, Ax, Az, Symbolic, &Numeric,\n\tControl, Info) ;\n\npacked complex Syntax:\n\n    Same as above, except that Az is NULL.\n\nPurpose:\n\n    Given a sparse matrix A in column-oriented form, and a symbolic analysis\n    computed by umfpack_*_*symbolic, the umfpack_*_numeric routine performs the\n    numerical factorization, PAQ=LU, PRAQ=LU, or P(R\\A)Q=LU, where P and Q are\n    permutation matrices (represented as permutation vectors), R is the row\n    scaling, L is unit-lower triangular, and U is upper triangular.  This is\n    required before the system Ax=b (or other related linear systems) can be\n    solved.  umfpack_*_numeric can be called multiple times for each call to\n    umfpack_*_*symbolic, to factorize a sequence of matrices with identical\n    nonzero pattern.  Simply compute the Symbolic object once, with\n    umfpack_*_*symbolic, and reuse it for subsequent matrices.  This routine\n    safely detects if the pattern changes, and sets an appropriate error code.\n\nReturns:\n\n    The status code is returned.  See Info [UMFPACK_STATUS], below.\n\nArguments:\n\n    Int Ap [n_col+1] ;\tInput argument, not modified.\n\n\tThis must be identical to the Ap array passed to umfpack_*_*symbolic.\n\tThe value of n_col is what was passed to umfpack_*_*symbolic (this is\n\theld in the Symbolic object).\n\n    Int Ai [nz] ;\tInput argument, not modified, of size nz = Ap [n_col].\n\n\tThis must be identical to the Ai array passed to umfpack_*_*symbolic.\n\n    double Ax [nz] ;\tInput argument, not modified, of size nz = Ap [n_col].\n\t\t\tSize 2*nz for packed complex case.\n\n\tThe numerical values of the sparse matrix A.  The nonzero pattern (row\n\tindices) for column j is stored in Ai [(Ap [j]) ... (Ap [j+1]-1)], and\n\tthe corresponding numerical values are stored in\n\tAx [(Ap [j]) ... (Ap [j+1]-1)].\n\n    double Az [nz] ;\tInput argument, not modified, for complex versions.\n\n\tFor the complex versions, this holds the imaginary part of A.  The\n\timaginary part of column j is held in Az [(Ap [j]) ... (Ap [j+1]-1)].\n\n\tIf Az is NULL, then both real\n\tand imaginary parts are contained in Ax[0..2*nz-1], with Ax[2*k]\n\tand Ax[2*k+1] being the real and imaginary part of the kth entry.\n\n    void *Symbolic ;\tInput argument, not modified.\n\n\tThe Symbolic object, which holds the symbolic factorization computed by\n\tumfpack_*_*symbolic.  The Symbolic object is not modified by\n\tumfpack_*_numeric.\n\n    void **Numeric ;\tOutput argument.\n\n\t**Numeric is the address of a (void *) pointer variable in the user's\n\tcalling routine (see Syntax, above).  On input, the contents of this\n\tvariable are not defined.  On output, this variable holds a (void *)\n\tpointer to the Numeric object (if successful), or (void *) NULL if\n\ta failure occurred.\n\n    double Control [UMFPACK_CONTROL] ;   Input argument, not modified.\n\n\tIf a (double *) NULL pointer is passed, then the default control\n\tsettings are used.  Otherwise, the settings are determined from the\n\tControl array.  See umfpack_*_defaults on how to fill the Control\n\tarray with the default settings.  If Control contains NaN's, the\n\tdefaults are used.  The following Control parameters are used:\n\n\tControl [UMFPACK_PIVOT_TOLERANCE]:  relative pivot tolerance for\n\t    threshold partial pivoting with row interchanges.  In any given\n\t    column, an entry is numerically acceptable if its absolute value is\n\t    greater than or equal to Control [UMFPACK_PIVOT_TOLERANCE] times\n\t    the largest absolute value in the column.  A value of 1.0 gives true\n\t    partial pivoting.  If less than or equal to zero, then any nonzero\n\t    entry is numerically acceptable as a pivot.  Default: 0.1.\n\n\t    Smaller values tend to lead to sparser LU factors, but the solution\n\t    to the linear system can become inaccurate.  Larger values can lead\n\t    to a more accurate solution (but not always), and usually an\n\t    increase in the total work.\n\n\t    For complex matrices, a cheap approximate of the absolute value\n\t    is used for the threshold partial pivoting test (|a_real| + |a_imag|\n\t    instead of the more expensive-to-compute exact absolute value\n\t    sqrt (a_real^2 + a_imag^2)).\n\n\tControl [UMFPACK_SYM_PIVOT_TOLERANCE]:\n\t    If diagonal pivoting is attempted (the symmetric or symmetric-2by2\n\t    strategies are used) then this parameter is used to control when the\n\t    diagonal entry is selected in a given pivot column.  The absolute\n\t    value of the entry must be >= Control [UMFPACK_SYM_PIVOT_TOLERANCE]\n\t    times the largest absolute value in the column.  A value of zero\n\t    will ensure that no off-diagonal pivoting is performed, except that\n\t    zero diagonal entries are not selected if there are any off-diagonal\n\t    nonzero entries.\n\n\t    If an off-diagonal pivot is selected, an attempt is made to restore\n\t    symmetry later on.  Suppose A (i,j) is selected, where i != j.\n\t    If column i has not yet been selected as a pivot column, then\n\t    the entry A (j,i) is redefined as a \"diagonal\" entry, except that\n\t    the tighter tolerance (Control [UMFPACK_PIVOT_TOLERANCE]) is\n\t    applied.  This strategy has an effect similar to 2-by-2 pivoting\n\t    for symmetric indefinite matrices.  If a 2-by-2 block pivot with\n\t    nonzero structure\n\n\t\t       i j\n\t\t    i: 0 x\n\t\t    j: x 0\n\n\t    is selected in a symmetric indefinite factorization method, the\n\t    2-by-2 block is inverted and a rank-2 update is applied.  In\n\t    UMFPACK, this 2-by-2 block would be reordered as\n\n\t\t       j i\n\t\t    i: x 0\n\t\t    j: 0 x\n\n\t    In both cases, the symmetry of the Schur complement is preserved.\n\n\tControl [UMFPACK_SCALE]:  Note that the user's input matrix is\n\t    never modified, only an internal copy is scaled.\n\n\t    There are three valid settings for this parameter.  If any other\n\t    value is provided, the default is used.\n\n\t    UMFPACK_SCALE_NONE:  no scaling is performed.\n\n\t    UMFPACK_SCALE_SUM:  each row of the input matrix A is divided by\n\t\tthe sum of the absolute values of the entries in that row.\n\t\tThe scaled matrix has an infinity norm of 1.\n\n\t    UMFPACK_SCALE_MAX:  each row of the input matrix A is divided by\n\t\tthe maximum the absolute values of the entries in that row.\n\t\tIn the scaled matrix the largest entry in each row has\n\t\ta magnitude exactly equal to 1.\n\n\t    Note that for complex matrices, a cheap approximate absolute value\n\t    is used, |a_real| + |a_imag|, instead of the exact absolute value\n\t    sqrt ((a_real)^2 + (a_imag)^2).\n\n\t    Scaling is very important for the \"symmetric\" strategy when\n\t    diagonal pivoting is attempted.  It also improves the performance\n\t    of the \"unsymmetric\" strategy.\n\n\t    Default: UMFPACK_SCALE_SUM.\n\n\tControl [UMFPACK_ALLOC_INIT]:\n\n\t    When umfpack_*_numeric starts, it allocates memory for the Numeric\n\t    object.  Part of this is of fixed size (approximately n double's +\n\t    12*n integers).  The remainder is of variable size, which grows to\n\t    hold the LU factors and the frontal matrices created during\n\t    factorization.  A estimate of the upper bound is computed by\n\t    umfpack_*_*symbolic, and returned by umfpack_*_*symbolic in\n\t    Info [UMFPACK_VARIABLE_PEAK_ESTIMATE] (in Units).\n\n\t    If Control [UMFPACK_ALLOC_INIT] is >= 0, umfpack_*_numeric initially\n\t    allocates space for the variable-sized part equal to this estimate\n\t    times Control [UMFPACK_ALLOC_INIT].  Typically, for matrices for\n\t    which the \"unsymmetric\" strategy applies, umfpack_*_numeric needs\n\t    only about half the estimated memory space, so a setting of 0.5 or\n\t    0.6 often provides enough memory for umfpack_*_numeric to factorize\n\t    the matrix with no subsequent increases in the size of this block.\n\n\t    If the matrix is ordered via AMD, then this non-negative parameter\n\t    is ignored.  The initial allocation ratio computed automatically,\n\t    as 1.2 * (nz + Info [UMFPACK_SYMMETRIC_LUNZ]) /\n\t    (Info [UMFPACK_LNZ_ESTIMATE] + Info [UMFPACK_UNZ_ESTIMATE] -\n\t    min (n_row, n_col)).\n\n\t    If Control [UMFPACK_ALLOC_INIT] is negative, then umfpack_*_numeric\n\t    allocates a space with initial size (in Units) equal to\n\t    (-Control [UMFPACK_ALLOC_INIT]).\n\n\t    Regardless of the value of this parameter, a space equal to or\n\t    greater than the the bare minimum amount of memory needed to start\n\t    the factorization is always initially allocated.  The bare initial\n\t    memory required is returned by umfpack_*_*symbolic in\n\t    Info [UMFPACK_VARIABLE_INIT_ESTIMATE] (an exact value, not an\n\t    estimate).\n\n\t    If the variable-size part of the Numeric object is found to be too\n\t    small sometime after numerical factorization has started, the memory\n\t    is increased in size by a factor of 1.2.   If this fails, the\n\t    request is reduced by a factor of 0.95 until it succeeds, or until\n\t    it determines that no increase in size is possible.  Garbage\n\t    collection then occurs.\n\n\t    The strategy of attempting to \"malloc\" a working space, and\n\t    re-trying with a smaller space, may not work when UMFPACK is used\n\t    as a mexFunction MATLAB, since mxMalloc aborts the mexFunction if it\n\t    fails.  This issue does not affect the use of UMFPACK as a part of\n\t    the built-in x=A\\b in MATLAB 6.5 and later.\n\n\t    If you are using the umfpack mexFunction, decrease the magnitude of\n\t    Control [UMFPACK_ALLOC_INIT] if you run out of memory in MATLAB.\n\n\t    Default initial allocation size: 0.7.  Thus, with the default\n\t    control settings and the \"unsymmetric\" strategy, the upper-bound is\n\t    reached after two reallocations (0.7 * 1.2 * 1.2 = 1.008).\n\n\t    Changing this parameter has little effect on fill-in or operation\n\t    count.  It has a small impact on run-time (the extra time required\n\t    to do the garbage collection and memory reallocation).\n\n\tControl [UMFPACK_FRONT_ALLOC_INIT]:\n\n\t    When UMFPACK starts the factorization of each \"chain\" of frontal\n\t    matrices, it allocates a working array to hold the frontal matrices\n\t    as they are factorized.  The symbolic factorization computes the\n\t    size of the largest possible frontal matrix that could occur during\n\t    the factorization of each chain.\n\n\t    If Control [UMFPACK_FRONT_ALLOC_INIT] is >= 0, the following\n\t    strategy is used.  If the AMD ordering was used, this non-negative\n\t    parameter is ignored.  A front of size (d+2)*(d+2) is allocated,\n\t    where d = Info [UMFPACK_SYMMETRIC_DMAX].  Otherwise, a front of\n\t    size Control [UMFPACK_FRONT_ALLOC_INIT] times the largest front\n\t    possible for this chain is allocated.\n\n\t    If Control [UMFPACK_FRONT_ALLOC_INIT] is negative, then a front of\n\t    size (-Control [UMFPACK_FRONT_ALLOC_INIT]) is allocated (where the\n\t    size is in terms of the number of numerical entries).  This is done\n\t    regardless of the ordering method or ordering strategy used.\n\n\t    Default: 0.5.\n\n\tControl [UMFPACK_DROPTOL]:\n\n\t    Entries in L and U with absolute value less than or equal to the\n\t    drop tolerance are removed from the data structures (unless leaving\n\t    them there reduces memory usage by reducing the space required\n\t    for the nonzero pattern of L and U).\n\n\t    Default: 0.0.\n\n    double Info [UMFPACK_INFO] ;\tOutput argument.\n\n\tContains statistics about the numeric factorization.  If a\n\t(double *) NULL pointer is passed, then no statistics are returned in\n\tInfo (this is not an error condition).  The following statistics are\n\tcomputed in umfpack_*_numeric:\n\n\tInfo [UMFPACK_STATUS]: status code.  This is also the return value,\n\t    whether or not Info is present.\n\n\t    UMFPACK_OK\n\n\t\tNumeric factorization was successful.  umfpack_*_numeric\n\t\tcomputed a valid numeric factorization.\n\n\t    UMFPACK_WARNING_singular_matrix\n\n\t\tNumeric factorization was successful, but the matrix is\n\t\tsingular.  umfpack_*_numeric computed a valid numeric\n\t\tfactorization, but you will get a divide by zero in\n\t\tumfpack_*_*solve.  For the other cases below, no Numeric object\n\t\tis created (*Numeric is (void *) NULL).\n\n\t    UMFPACK_ERROR_out_of_memory\n\n\t\tInsufficient memory to complete the numeric factorization.\n\n\t    UMFPACK_ERROR_argument_missing\n\n\t\tOne or more required arguments are missing.\n\n\t    UMFPACK_ERROR_invalid_Symbolic_object\n\n\t\tSymbolic object provided as input is invalid.\n\n\t    UMFPACK_ERROR_different_pattern\n\n\t\tThe pattern (Ap and/or Ai) has changed since the call to\n\t\tumfpack_*_*symbolic which produced the Symbolic object.\n\n\tInfo [UMFPACK_NROW]:  the value of n_row stored in the Symbolic object.\n\n\tInfo [UMFPACK_NCOL]:  the value of n_col stored in the Symbolic object.\n\n\tInfo [UMFPACK_NZ]:  the number of entries in the input matrix.\n\t    This value is obtained from the Symbolic object.\n\n\tInfo [UMFPACK_SIZE_OF_UNIT]:  the number of bytes in a Unit, for memory\n\t    usage statistics below.\n\n\tInfo [UMFPACK_VARIABLE_INIT]: the initial size (in Units) of the\n\t    variable-sized part of the Numeric object.  If this differs from\n\t    Info [UMFPACK_VARIABLE_INIT_ESTIMATE], then the pattern (Ap and/or\n\t    Ai) has changed since the last call to umfpack_*_*symbolic, which is\n\t    an error condition.\n\n\tInfo [UMFPACK_VARIABLE_PEAK]: the peak size (in Units) of the\n\t    variable-sized part of the Numeric object.  This size is the amount\n\t    of space actually used inside the block of memory, not the space\n\t    allocated via UMF_malloc.  You can reduce UMFPACK's memory\n\t    requirements by setting Control [UMFPACK_ALLOC_INIT] to the ratio\n\t    Info [UMFPACK_VARIABLE_PEAK] / Info[UMFPACK_VARIABLE_PEAK_ESTIMATE].\n\t    This will ensure that no memory reallocations occur (you may want to\n\t    add 0.001 to make sure that integer roundoff does not lead to a\n\t    memory size that is 1 Unit too small; otherwise, garbage collection\n\t    and reallocation will occur).\n\n\tInfo [UMFPACK_VARIABLE_FINAL]: the final size (in Units) of the\n\t    variable-sized part of the Numeric object.  It holds just the\n\t    sparse LU factors.\n\n\tInfo [UMFPACK_NUMERIC_SIZE]:  the actual final size (in Units) of the\n\t    entire Numeric object, including the final size of the variable\n\t    part of the object.  Info [UMFPACK_NUMERIC_SIZE_ESTIMATE],\n\t    an estimate, was computed by umfpack_*_*symbolic.  The estimate is\n\t    normally an upper bound on the actual final size, but this is not\n\t    guaranteed.\n\n\tInfo [UMFPACK_PEAK_MEMORY]:  the actual peak memory usage (in Units) of\n\t    both umfpack_*_*symbolic and umfpack_*_numeric.  An estimate,\n\t    Info [UMFPACK_PEAK_MEMORY_ESTIMATE], was computed by\n\t    umfpack_*_*symbolic.  The estimate is normally an upper bound on the\n\t    actual peak usage, but this is not guaranteed.  With testing on\n\t    hundreds of matrix arising in real applications, I have never\n\t    observed a matrix where this estimate or the Numeric size estimate\n\t    was less than the actual result, but this is theoretically possible.\n\t    Please send me one if you find such a matrix.\n\n\tInfo [UMFPACK_FLOPS]:  the actual count of the (useful) floating-point\n\t    operations performed.  An estimate, Info [UMFPACK_FLOPS_ESTIMATE],\n\t    was computed by umfpack_*_*symbolic.  The estimate is guaranteed to\n\t    be an upper bound on this flop count.  The flop count excludes\n\t    \"useless\" flops on zero values, flops performed during the pivot\n\t    search (for tentative updates and assembly of candidate columns),\n\t    and flops performed to add frontal matrices together.\n\n\t    For the real version, only (+ - * /) are counted.  For the complex\n\t    version, the following counts are used:\n\n\t\toperation\tflops\n\t    \tc = 1/b\t\t6\n\t\tc = a*b\t\t6\n\t\tc -= a*b\t8\n\n\tInfo [UMFPACK_LNZ]: the actual nonzero entries in final factor L,\n\t    including the diagonal.  This excludes any zero entries in L,\n\t    although some of these are stored in the Numeric object.  The\n\t    Info [UMFPACK_LU_ENTRIES] statistic does account for all\n\t    explicitly stored zeros, however.  Info [UMFPACK_LNZ_ESTIMATE],\n\t    an estimate, was computed by umfpack_*_*symbolic.  The estimate is\n\t    guaranteed to be an upper bound on Info [UMFPACK_LNZ].\n\n\tInfo [UMFPACK_UNZ]: the actual nonzero entries in final factor U,\n\t    including the diagonal.  This excludes any zero entries in U,\n\t    although some of these are stored in the Numeric object.  The\n\t    Info [UMFPACK_LU_ENTRIES] statistic does account for all\n\t    explicitly stored zeros, however.  Info [UMFPACK_UNZ_ESTIMATE],\n\t    an estimate, was computed by umfpack_*_*symbolic.  The estimate is\n\t    guaranteed to be an upper bound on Info [UMFPACK_UNZ].\n\n\tInfo [UMFPACK_NUMERIC_DEFRAG]:  The number of garbage collections\n\t    performed during umfpack_*_numeric, to compact the contents of the\n\t    variable-sized workspace used by umfpack_*_numeric.  No estimate was\n\t    computed by umfpack_*_*symbolic.  In the current version of UMFPACK,\n\t    garbage collection is performed and then the memory is reallocated,\n\t    so this statistic is the same as Info [UMFPACK_NUMERIC_REALLOC],\n\t    below.  It may differ in future releases.\n\n\tInfo [UMFPACK_NUMERIC_REALLOC]:  The number of times that the Numeric\n\t    object was increased in size from its initial size.  A rough upper\n\t    bound on the peak size of the Numeric object was computed by\n\t    umfpack_*_*symbolic, so reallocations should be rare.  However, if\n\t    umfpack_*_numeric is unable to allocate that much storage, it\n\t    reduces its request until either the allocation succeeds, or until\n\t    it gets too small to do anything with.  If the memory that it\n\t    finally got was small, but usable, then the reallocation count\n\t    could be high.  No estimate of this count was computed by\n\t    umfpack_*_*symbolic.\n\n\tInfo [UMFPACK_NUMERIC_COSTLY_REALLOC]:  The number of times that the\n\t    system realloc library routine (or mxRealloc for the mexFunction)\n\t    had to move the workspace.  Realloc can sometimes increase the size\n\t    of a block of memory without moving it, which is much faster.  This\n\t    statistic will always be <= Info [UMFPACK_NUMERIC_REALLOC].  If your\n\t    memory space is fragmented, then the number of \"costly\" realloc's\n\t    will be equal to Info [UMFPACK_NUMERIC_REALLOC].\n\n\tInfo [UMFPACK_COMPRESSED_PATTERN]:  The number of integers used to\n\t    represent the pattern of L and U.\n\n\tInfo [UMFPACK_LU_ENTRIES]:  The total number of numerical values that\n\t    are stored for the LU factors.  Some of the values may be explicitly\n\t    zero in order to save space (allowing for a smaller compressed\n\t    pattern).\n\n\tInfo [UMFPACK_NUMERIC_TIME]:  The CPU time taken, in seconds.\n\n\tInfo [UMFPACK_RCOND]:  A rough estimate of the condition number, equal\n\t    to min (abs (diag (U))) / max (abs (diag (U))), or zero if the\n\t    diagonal of U is all zero.\n\n\tInfo [UMFPACK_UDIAG_NZ]:  The number of numerically nonzero values on\n\t    the diagonal of U.\n\n\tInfo [UMFPACK_UMIN]:  the smallest absolute value on the diagonal of U.\n\n\tInfo [UMFPACK_UMAX]:  the smallest absolute value on the diagonal of U.\n\n\tInfo [UMFPACK_MAX_FRONT_SIZE]: the size of the\n\t    largest frontal matrix (number of entries).\n\n\tInfo [UMFPACK_NUMERIC_WALLTIME]:  The wallclock time taken, in seconds.\n\n\tInfo [UMFPACK_MAX_FRONT_NROWS]: the max number of\n\t    rows in any frontal matrix.\n\n\tInfo [UMFPACK_MAX_FRONT_NCOLS]: the max number of\n\t    columns in any frontal matrix.\n\n\tInfo [UMFPACK_WAS_SCALED]:  the scaling used, either UMFPACK_SCALE_NONE,\n\t    UMFPACK_SCALE_SUM, or UMFPACK_SCALE_MAX.\n\n\tInfo [UMFPACK_RSMIN]: if scaling is performed, the smallest scale factor\n\t    for any row (either the smallest sum of absolute entries, or the\n\t    smallest maximum of absolute entries).\n\n\tInfo [UMFPACK_RSMAX]: if scaling is performed, the largest scale factor\n\t    for any row (either the largest sum of absolute entries, or the\n\t    largest maximum of absolute entries).\n\n\tInfo [UMFPACK_ALLOC_INIT_USED]:  the initial allocation parameter used.\n\n\tInfo [UMFPACK_FORCED_UPDATES]:  the number of BLAS-3 updates to the\n\t    frontal matrices that were required because the frontal matrix\n\t    grew larger than its current working array.\n\n\tInfo [UMFPACK_NOFF_DIAG]: number of off-diagonal pivots selected, if the\n\t    symmetric or 2-by-2 strategies are used.\n\n\tInfo [UMFPACK_NZDROPPED]: the number of entries smaller in absolute\n\t    value than Control [UMFPACK_DROPTOL] that were dropped from L and U.\n\t    Note that entries on the diagonal of U are never dropped.\n\n\tInfo [UMFPACK_ALL_LNZ]: the number of entries in L, including the\n\t    diagonal, if no small entries are dropped.\n\n\tInfo [UMFPACK_ALL_UNZ]: the number of entries in U, including the\n\t    diagonal, if no small entries are dropped.\n\n\tOnly the above listed Info [...] entries are accessed.  The remaining\n\tentries of Info are not accessed or modified by umfpack_*_numeric.\n\tFuture versions might modify different parts of Info.\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_qsymbolic.h",
    "content": "/* ========================================================================== */\n/* === umfpack_qsymbolic ==================================================== */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_qsymbolic\n(\n    int n_row,\n    int n_col,\n    const int Ap [ ],\n    const int Ai [ ],\n    const double Ax [ ],\n    const int Qinit [ ],\n    void **Symbolic,\n    const double Control [UMFPACK_CONTROL],\n    double Info [UMFPACK_INFO]\n) ;\n\nUF_long umfpack_dl_qsymbolic\n(\n    UF_long n_row,\n    UF_long n_col,\n    const UF_long Ap [ ],\n    const UF_long Ai [ ],\n    const double Ax [ ],\n    const UF_long Qinit [ ],\n    void **Symbolic,\n    const double Control [UMFPACK_CONTROL],\n    double Info [UMFPACK_INFO]\n) ;\n\nint umfpack_zi_qsymbolic\n(\n    int n_row,\n    int n_col,\n    const int Ap [ ],\n    const int Ai [ ],\n    const double Ax [ ], const double Az [ ],\n    const int Qinit [ ],\n    void **Symbolic,\n    const double Control [UMFPACK_CONTROL],\n    double Info [UMFPACK_INFO]\n) ;\n\nUF_long umfpack_zl_qsymbolic\n(\n    UF_long n_row,\n    UF_long n_col,\n    const UF_long Ap [ ],\n    const UF_long Ai [ ],\n    const double Ax [ ], const double Az [ ],\n    const UF_long Qinit [ ],\n    void **Symbolic,\n    const double Control [UMFPACK_CONTROL],\n    double Info [UMFPACK_INFO]\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    void *Symbolic ;\n    int n_row, n_col, *Ap, *Ai, *Qinit, status ;\n    double Control [UMFPACK_CONTROL], Info [UMFPACK_INFO], *Ax ;\n    status = umfpack_di_qsymbolic (n_row, n_col, Ap, Ai, Ax, Qinit,\n\t&Symbolic, Control, Info) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Symbolic ;\n    UF_long n_row, n_col, *Ap, *Ai, *Qinit, status ;\n    double Control [UMFPACK_CONTROL], Info [UMFPACK_INFO], *Ax ;\n    status = umfpack_dl_qsymbolic (n_row, n_col, Ap, Ai, Ax, Qinit,\n\t&Symbolic, Control, Info) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    void *Symbolic ;\n    int n_row, n_col, *Ap, *Ai, *Qinit, status ;\n    double Control [UMFPACK_CONTROL], Info [UMFPACK_INFO], *Ax, *Az ;\n    status = umfpack_zi_qsymbolic (n_row, n_col, Ap, Ai, Ax, Az, Qinit,\n\t&Symbolic, Control, Info) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Symbolic ;\n    UF_long n_row, n_col, *Ap, *Ai, *Qinit, status ;\n    double Control [UMFPACK_CONTROL], Info [UMFPACK_INFO], *Ax, *Az ;\n    status = umfpack_zl_qsymbolic (n_row, n_col, Ap, Ai, Ax, Az, Qinit,\n\t&Symbolic, Control, Info) ;\n\npacked complex Syntax:\n\n    Same as above, except Az is NULL.\n\nPurpose:\n\n    Given the nonzero pattern of a sparse matrix A in column-oriented form, and\n    a sparsity preserving column pre-ordering Qinit, umfpack_*_qsymbolic\n    performs the symbolic factorization of A*Qinit (or A (:,Qinit) in MATLAB\n    notation).  This is identical to umfpack_*_symbolic, except that neither\n    COLAMD nor AMD are called and the user input column order Qinit is used\n    instead.  Note that in general, the Qinit passed to umfpack_*_qsymbolic\n    can differ from the final Q found in umfpack_*_numeric.  The unsymmetric\n    strategy will perform a column etree postordering done in\n    umfpack_*_qsymbolic and sparsity-preserving modifications are made within\n    each frontal matrix during umfpack_*_numeric.  The symmetric and 2-by-2\n    strategies will preserve Qinit, unless the matrix is structurally singular.\n\n    See umfpack_*_symbolic for more information.\n\n    *** WARNING ***  A poor choice of Qinit can easily cause umfpack_*_numeric\n    to use a huge amount of memory and do a lot of work.  The \"default\" symbolic\n    analysis method is umfpack_*_symbolic, not this routine.  If you use this\n    routine, the performance of UMFPACK is your responsibility;  UMFPACK will\n    not try to second-guess a poor choice of Qinit.\n\nReturns:\n\n    The value of Info [UMFPACK_STATUS]; see umfpack_*_symbolic.\n    Also returns UMFPACK_ERROR_invalid_permuation if Qinit is not a valid\n    permutation vector.\n\nArguments:\n\n    All arguments are the same as umfpack_*_symbolic, except for the following:\n\n    Int Qinit [n_col] ;\t\tInput argument, not modified.\n\n\tThe user's fill-reducing initial column pre-ordering.  This must be a\n\tpermutation of 0..n_col-1.  If Qinit [k] = j, then column j is the kth\n\tcolumn of the matrix A (:,Qinit) to be factorized.  If Qinit is an\n\t(Int *) NULL pointer, then COLAMD or AMD are called instead.\n\n    double Control [UMFPACK_CONTROL] ;\tInput argument, not modified.\n\n\tIf Qinit is not NULL, then only two strategies are recognized:\n\tthe unsymmetric strategy and the symmetric strategy.\n\tIf Control [UMFPACK_STRATEGY] is UMFPACK_STRATEGY_SYMMETRIC,\n\tthen the symmetric strategy is used.  Otherwise the unsymmetric\n\tstrategy is used.\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_report_control.h",
    "content": "/* ========================================================================== */\n/* === umfpack_report_control =============================================== */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nvoid umfpack_di_report_control\n(\n    const double Control [UMFPACK_CONTROL]\n) ;\n\nvoid umfpack_dl_report_control\n(\n    const double Control [UMFPACK_CONTROL]\n) ;\n\nvoid umfpack_zi_report_control\n(\n    const double Control [UMFPACK_CONTROL]\n) ;\n\nvoid umfpack_zl_report_control\n(\n    const double Control [UMFPACK_CONTROL]\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    double Control [UMFPACK_CONTROL] ;\n    umfpack_di_report_control (Control) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    double Control [UMFPACK_CONTROL] ;\n    umfpack_dl_report_control (Control) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    double Control [UMFPACK_CONTROL] ;\n    umfpack_zi_report_control (Control) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    double Control [UMFPACK_CONTROL] ;\n    umfpack_zl_report_control (Control) ;\n\nPurpose:\n\n    Prints the current control settings.  Note that with the default print\n    level, nothing is printed.  Does nothing if Control is (double *) NULL.\n\nArguments:\n\n    double Control [UMFPACK_CONTROL] ;   Input argument, not modified.\n\n\tIf a (double *) NULL pointer is passed, then the default control\n\tsettings are used.  Otherwise, the settings are determined from the\n\tControl array.  See umfpack_*_defaults on how to fill the Control\n\tarray with the default settings.  If Control contains NaN's, the\n\tdefaults are used.  The following Control parameters are used:\n\n\tControl [UMFPACK_PRL]:  printing level.\n\n\t    1 or less: no output\n\t    2 or more: print all of Control\n\t    Default: 1\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_report_info.h",
    "content": "/* ========================================================================== */\n/* === umfpack_report_info ================================================== */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nvoid umfpack_di_report_info\n(\n    const double Control [UMFPACK_CONTROL],\n    const double Info [UMFPACK_INFO]\n) ;\n\nvoid umfpack_dl_report_info\n(\n    const double Control [UMFPACK_CONTROL],\n    const double Info [UMFPACK_INFO]\n) ;\n\nvoid umfpack_zi_report_info\n(\n    const double Control [UMFPACK_CONTROL],\n    const double Info [UMFPACK_INFO]\n) ;\n\nvoid umfpack_zl_report_info\n(\n    const double Control [UMFPACK_CONTROL],\n    const double Info [UMFPACK_INFO]\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    double Control [UMFPACK_CONTROL], Info [UMFPACK_INFO] ;\n    umfpack_di_report_info (Control, Info) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    double Control [UMFPACK_CONTROL], Info [UMFPACK_INFO] ;\n    umfpack_dl_report_info (Control, Info) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    double Control [UMFPACK_CONTROL], Info [UMFPACK_INFO] ;\n    umfpack_zi_report_info (Control, Info) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    double Control [UMFPACK_CONTROL], Info [UMFPACK_INFO] ;\n    umfpack_zl_report_info (Control, Info) ;\n\nPurpose:\n\n    Reports statistics from the umfpack_*_*symbolic, umfpack_*_numeric, and\n    umfpack_*_*solve routines.\n\nArguments:\n\n    double Control [UMFPACK_CONTROL] ;   Input argument, not modified.\n\n\tIf a (double *) NULL pointer is passed, then the default control\n\tsettings are used.  Otherwise, the settings are determined from the\n\tControl array.  See umfpack_*_defaults on how to fill the Control\n\tarray with the default settings.  If Control contains NaN's, the\n\tdefaults are used.  The following Control parameters are used:\n\n\tControl [UMFPACK_PRL]:  printing level.\n\n\t    0 or less: no output, even when an error occurs\n\t    1: error messages only\n\t    2 or more: error messages, and print all of Info\n\t    Default: 1\n\n    double Info [UMFPACK_INFO] ;\t\tInput argument, not modified.\n\n\tInfo is an output argument of several UMFPACK routines.\n\tThe contents of Info are printed on standard output.\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_report_matrix.h",
    "content": "/* ========================================================================== */\n/* === umfpack_report_matrix ================================================ */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_report_matrix\n(\n    int n_row,\n    int n_col,\n    const int Ap [ ],\n    const int Ai [ ],\n    const double Ax [ ],\n    int col_form,\n    const double Control [UMFPACK_CONTROL]\n) ;\n\nUF_long umfpack_dl_report_matrix\n(\n    UF_long n_row,\n    UF_long n_col,\n    const UF_long Ap [ ],\n    const UF_long Ai [ ],\n    const double Ax [ ],\n    UF_long col_form,\n    const double Control [UMFPACK_CONTROL]\n) ;\n\nint umfpack_zi_report_matrix\n(\n    int n_row,\n    int n_col,\n    const int Ap [ ],\n    const int Ai [ ],\n    const double Ax [ ], const double Az [ ],\n    int col_form,\n    const double Control [UMFPACK_CONTROL]\n) ;\n\nUF_long umfpack_zl_report_matrix\n(\n    UF_long n_row,\n    UF_long n_col,\n    const UF_long Ap [ ],\n    const UF_long Ai [ ],\n    const double Ax [ ], const double Az [ ],\n    UF_long col_form,\n    const double Control [UMFPACK_CONTROL]\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    int n_row, n_col, *Ap, *Ai, status ;\n    double *Ax, Control [UMFPACK_CONTROL] ;\n    status = umfpack_di_report_matrix (n_row, n_col, Ap, Ai, Ax, 1, Control) ;\nor:\n    status = umfpack_di_report_matrix (n_row, n_col, Ap, Ai, Ax, 0, Control) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long n_row, n_col, *Ap, *Ai, status ;\n    double *Ax, Control [UMFPACK_CONTROL] ;\n    status = umfpack_dl_report_matrix (n_row, n_col, Ap, Ai, Ax, 1, Control) ;\nor:\n    status = umfpack_dl_report_matrix (n_row, n_col, Ap, Ai, Ax, 0, Control) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    int n_row, n_col, *Ap, *Ai, status ;\n    double *Ax, *Az, Control [UMFPACK_CONTROL] ;\n    status = umfpack_zi_report_matrix (n_row, n_col, Ap, Ai, Ax, Az, 1,\n        Control) ;\nor:\n    status = umfpack_zi_report_matrix (n_row, n_col, Ap, Ai, Ax, Az, 0,\n        Control) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long n_row, n_col, *Ap, *Ai, status ;\n    double *Ax, Control [UMFPACK_CONTROL] ;\n    status = umfpack_zl_report_matrix (n_row, n_col, Ap, Ai, Ax, Az, 1,\n\tControl) ;\nor:\n    status = umfpack_zl_report_matrix (n_row, n_col, Ap, Ai, Ax, Az, 0,\n\tControl) ;\n\npacked complex Syntax:\n\n    Same as above, except Az is NULL.\n\nPurpose:\n\n    Verifies and prints a row or column-oriented sparse matrix.\n\nReturns:\n\n    UMFPACK_OK if Control [UMFPACK_PRL] <= 2 (the input is not checked).\n\n    Otherwise (where n is n_col for the column form and n_row for row\n    and let ni be n_row for the column form and n_col for row):\n\n    UMFPACK_OK if the matrix is valid.\n\n    UMFPACK_ERROR_n_nonpositive if n_row <= 0 or n_col <= 0.\n    UMFPACK_ERROR_argument_missing if Ap and/or Ai are missing.\n    UMFPACK_ERROR_invalid_matrix if Ap [n] < 0, if Ap [0] is not zero,\n\tif Ap [j+1] < Ap [j] for any j in the range 0 to n-1,\n\tif any row index in Ai is not in the range 0 to ni-1, or\n\tif the row indices in any column are not in\n\tascending order, or contain duplicates.\n    UMFPACK_ERROR_out_of_memory if out of memory.\n\nArguments:\n\n    Int n_row ;\t\tInput argument, not modified.\n    Int n_col ;\t\tInput argument, not modified.\n\n\tA is an n_row-by-n_row matrix.  Restriction: n_row > 0 and n_col > 0.\n\n    Int Ap [n+1] ;\tInput argument, not modified.\n\n\tn is n_row for a row-form matrix, and n_col for a column-form matrix.\n\n\tAp is an integer array of size n+1.  If col_form is true (nonzero),\n\tthen on input, it holds the \"pointers\" for the column form of the\n\tsparse matrix A.  The row indices of column j of the matrix A are held\n\tin Ai [(Ap [j]) ... (Ap [j+1]-1)].  Otherwise, Ap holds the\n\trow pointers, and the column indices of row j of the matrix are held\n\tin Ai [(Ap [j]) ... (Ap [j+1]-1)].\n\n\tThe first entry, Ap [0], must be zero, and Ap [j] <= Ap [j+1] must hold\n\tfor all j in the range 0 to n-1.  The value nz = Ap [n] is thus the\n\ttotal number of entries in the pattern of the matrix A.\n\n    Int Ai [nz] ;\tInput argument, not modified, of size nz = Ap [n].\n\n\tIf col_form is true (nonzero), then the nonzero pattern (row indices)\n\tfor column j is stored in Ai [(Ap [j]) ... (Ap [j+1]-1)].  Row indices\n\tmust be in the range 0 to n_row-1 (the matrix is 0-based).\n\n\tOtherwise, the nonzero pattern (column indices) for row j is stored in\n\tAi [(Ap [j]) ... (Ap [j+1]-1)]. Column indices must be in the range 0\n\tto n_col-1 (the matrix is 0-based).\n\n    double Ax [nz] ;\tInput argument, not modified, of size nz = Ap [n].\n\t\t\tSize 2*nz for packed complex case.\n\n\tThe numerical values of the sparse matrix A.\n\n\tIf col_form is true (nonzero), then the nonzero pattern (row indices)\n\tfor column j is stored in Ai [(Ap [j]) ... (Ap [j+1]-1)], and the\n\tcorresponding (real) numerical values are stored in\n\tAx [(Ap [j]) ... (Ap [j+1]-1)].  The imaginary parts are stored in\n\tAz [(Ap [j]) ... (Ap [j+1]-1)], for the complex versions\n\t(see below if Az is NULL).\n\n\tOtherwise, the nonzero pattern (column indices) for row j\n\tis stored in Ai [(Ap [j]) ... (Ap [j+1]-1)], and the corresponding\n\t(real) numerical values are stored in Ax [(Ap [j]) ... (Ap [j+1]-1)].\n\tThe imaginary parts are stored in Az [(Ap [j]) ... (Ap [j+1]-1)],\n\tfor the complex versions (see below if Az is NULL).\n\n\tNo numerical values are printed if Ax is NULL.\n\n    double Az [nz] ;\tInput argument, not modified, for complex versions.\n\n\tThe imaginary values of the sparse matrix A.   See the description\n\tof Ax, above.\n\n\tIf Az is NULL, then both real\n\tand imaginary parts are contained in Ax[0..2*nz-1], with Ax[2*k]\n\tand Ax[2*k+1] being the real and imaginary part of the kth entry.\n\n    Int col_form ;\tInput argument, not modified.\n\n\tThe matrix is in row-oriented form if form is col_form is false (0).\n\tOtherwise, the matrix is in column-oriented form.\n\n    double Control [UMFPACK_CONTROL] ;\tInput argument, not modified.\n\n\tIf a (double *) NULL pointer is passed, then the default control\n\tsettings are used.  Otherwise, the settings are determined from the\n\tControl array.  See umfpack_*_defaults on how to fill the Control\n\tarray with the default settings.  If Control contains NaN's, the\n\tdefaults are used.  The following Control parameters are used:\n\n\tControl [UMFPACK_PRL]:  printing level.\n\n\t    2 or less: no output.  returns silently without checking anything.\n\t    3: fully check input, and print a short summary of its status\n\t    4: as 3, but print first few entries of the input\n\t    5: as 3, but print all of the input\n\t    Default: 1\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_report_numeric.h",
    "content": "/* ========================================================================== */\n/* === umfpack_report_numeric =============================================== */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_report_numeric\n(\n    void *Numeric,\n    const double Control [UMFPACK_CONTROL]\n) ;\n\nUF_long umfpack_dl_report_numeric\n(\n    void *Numeric,\n    const double Control [UMFPACK_CONTROL]\n) ;\n\nint umfpack_zi_report_numeric\n(\n    void *Numeric,\n    const double Control [UMFPACK_CONTROL]\n) ;\n\nUF_long umfpack_zl_report_numeric\n(\n    void *Numeric,\n    const double Control [UMFPACK_CONTROL]\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    double Control [UMFPACK_CONTROL] ;\n    int status ;\n    status = umfpack_di_report_numeric (Numeric, Control) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    double Control [UMFPACK_CONTROL] ;\n    UF_long status ;\n    status = umfpack_dl_report_numeric (Numeric, Control) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    double Control [UMFPACK_CONTROL] ;\n    int status ;\n    status = umfpack_zi_report_numeric (Numeric, Control) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    double Control [UMFPACK_CONTROL] ;\n    UF_long status ;\n    status = umfpack_zl_report_numeric (Numeric, Control) ;\n\nPurpose:\n\n    Verifies and prints a Numeric object (the LU factorization, both its pattern\n    numerical values, and permutation vectors P and Q).  This routine checks the\n    object more carefully than the computational routines.  Normally, this check\n    is not required, since umfpack_*_numeric either returns (void *) NULL, or a\n    valid Numeric object.  However, if you suspect that your own code has\n    corrupted the Numeric object (by overruning memory bounds, for example),\n    then this routine might be able to detect a corrupted Numeric object.  Since\n    this is a complex object, not all such user-generated errors are guaranteed\n    to be caught by this routine.\n\nReturns:\n\n    UMFPACK_OK if Control [UMFPACK_PRL] <= 2 (the input is not checked).\n\n    Otherwise:\n\n    UMFPACK_OK if the Numeric object is valid.\n    UMFPACK_ERROR_invalid_Numeric_object if the Numeric object is invalid.\n    UMFPACK_ERROR_out_of_memory if out of memory.\n\nArguments:\n\n    void *Numeric ;\t\t\tInput argument, not modified.\n\n\tThe Numeric object, which holds the numeric factorization computed by\n\tumfpack_*_numeric.\n\n    double Control [UMFPACK_CONTROL] ;\tInput argument, not modified.\n\n\tIf a (double *) NULL pointer is passed, then the default control\n\tsettings are used.  Otherwise, the settings are determined from the\n\tControl array.  See umfpack_*_defaults on how to fill the Control\n\tarray with the default settings.  If Control contains NaN's, the\n\tdefaults are used.  The following Control parameters are used:\n\n\tControl [UMFPACK_PRL]:  printing level.\n\n\t    2 or less: no output.  returns silently without checking anything.\n\t    3: fully check input, and print a short summary of its status\n\t    4: as 3, but print first few entries of the input\n\t    5: as 3, but print all of the input\n\t    Default: 1\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_report_perm.h",
    "content": "/* ========================================================================== */\n/* === umfpack_report_perm ================================================== */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_report_perm\n(\n    int np,\n    const int Perm [ ],\n    const double Control [UMFPACK_CONTROL]\n) ;\n\nUF_long umfpack_dl_report_perm\n(\n    UF_long np,\n    const UF_long Perm [ ],\n    const double Control [UMFPACK_CONTROL]\n) ;\n\nint umfpack_zi_report_perm\n(\n    int np,\n    const int Perm [ ],\n    const double Control [UMFPACK_CONTROL]\n) ;\n\nUF_long umfpack_zl_report_perm\n(\n    UF_long np,\n    const UF_long Perm [ ],\n    const double Control [UMFPACK_CONTROL]\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    int np, *Perm, status ;\n    double Control [UMFPACK_CONTROL] ;\n    status = umfpack_di_report_perm (np, Perm, Control) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long np, *Perm, status ;\n    double Control [UMFPACK_CONTROL] ;\n    status = umfpack_dl_report_perm (np, Perm, Control) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    int np, *Perm, status ;\n    double Control [UMFPACK_CONTROL] ;\n    status = umfpack_zi_report_perm (np, Perm, Control) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long np, *Perm, status ;\n    double Control [UMFPACK_CONTROL] ;\n    status = umfpack_zl_report_perm (np, Perm, Control) ;\n\nPurpose:\n\n    Verifies and prints a permutation vector.\n\nReturns:\n\n    UMFPACK_OK if Control [UMFPACK_PRL] <= 2 (the input is not checked).\n\n    Otherwise:\n    UMFPACK_OK if the permutation vector is valid (this includes that case\n\twhen Perm is (Int *) NULL, which is not an error condition).\n    UMFPACK_ERROR_n_nonpositive if np <= 0.\n    UMFPACK_ERROR_out_of_memory if out of memory.\n    UMFPACK_ERROR_invalid_permutation if Perm is not a valid permutation vector.\n\nArguments:\n\n    Int np ;\t\tInput argument, not modified.\n\n\tPerm is an integer vector of size np.  Restriction: np > 0.\n\n    Int Perm [np] ;\tInput argument, not modified.\n\n\tA permutation vector of size np.  If Perm is not present (an (Int *)\n\tNULL pointer), then it is assumed to be the identity permutation.  This\n\tis consistent with its use as an input argument to umfpack_*_qsymbolic,\n\tand is not an error condition.  If Perm is present, the entries in Perm\n\tmust range between 0 and np-1, and no duplicates may exist.\n\n    double Control [UMFPACK_CONTROL] ;\tInput argument, not modified.\n\n\tIf a (double *) NULL pointer is passed, then the default control\n\tsettings are used.  Otherwise, the settings are determined from the\n\tControl array.  See umfpack_*_defaults on how to fill the Control\n\tarray with the default settings.  If Control contains NaN's, the\n\tdefaults are used.  The following Control parameters are used:\n\n\tControl [UMFPACK_PRL]:  printing level.\n\n\t    2 or less: no output.  returns silently without checking anything.\n\t    3: fully check input, and print a short summary of its status\n\t    4: as 3, but print first few entries of the input\n\t    5: as 3, but print all of the input\n\t    Default: 1\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_report_status.h",
    "content": "/* ========================================================================== */\n/* === umfpack_report_status ================================================ */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nvoid umfpack_di_report_status\n(\n    const double Control [UMFPACK_CONTROL],\n    int status\n) ;\n\nvoid umfpack_dl_report_status\n(\n    const double Control [UMFPACK_CONTROL],\n    UF_long status\n) ;\n\nvoid umfpack_zi_report_status\n(\n    const double Control [UMFPACK_CONTROL],\n    int status\n) ;\n\nvoid umfpack_zl_report_status\n(\n    const double Control [UMFPACK_CONTROL],\n    UF_long status\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    double Control [UMFPACK_CONTROL] ;\n    int status ;\n    umfpack_di_report_status (Control, status) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    double Control [UMFPACK_CONTROL] ;\n    UF_long status ;\n    umfpack_dl_report_status (Control, status) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    double Control [UMFPACK_CONTROL] ;\n    int status ;\n    umfpack_zi_report_status (Control, status) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    double Control [UMFPACK_CONTROL] ;\n    UF_long status ;\n    umfpack_zl_report_status (Control, status) ;\n\nPurpose:\n\n    Prints the status (return value) of other umfpack_* routines.\n\nArguments:\n\n    double Control [UMFPACK_CONTROL] ;   Input argument, not modified.\n\n\tIf a (double *) NULL pointer is passed, then the default control\n\tsettings are used.  Otherwise, the settings are determined from the\n\tControl array.  See umfpack_*_defaults on how to fill the Control\n\tarray with the default settings.  If Control contains NaN's, the\n\tdefaults are used.  The following Control parameters are used:\n\n\tControl [UMFPACK_PRL]:  printing level.\n\n\t    0 or less: no output, even when an error occurs\n\t    1: error messages only\n\t    2 or more: print status, whether or not an error occurred\n\t    4 or more: also print the UMFPACK Copyright\n\t    6 or more: also print the UMFPACK License\n\t    Default: 1\n\n    Int status ;\t\t\tInput argument, not modified.\n\n\tThe return value from another umfpack_* routine.\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_report_symbolic.h",
    "content": "/* ========================================================================== */\n/* === umfpack_report_symbolic ============================================== */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_report_symbolic\n(\n    void *Symbolic,\n    const double Control [UMFPACK_CONTROL]\n) ;\n\nUF_long umfpack_dl_report_symbolic\n(\n    void *Symbolic,\n    const double Control [UMFPACK_CONTROL]\n) ;\n\nint umfpack_zi_report_symbolic\n(\n    void *Symbolic,\n    const double Control [UMFPACK_CONTROL]\n) ;\n\nUF_long umfpack_zl_report_symbolic\n(\n    void *Symbolic,\n    const double Control [UMFPACK_CONTROL]\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    void *Symbolic ;\n    double Control [UMFPACK_CONTROL] ;\n    int status ;\n    status = umfpack_di_report_symbolic (Symbolic, Control) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Symbolic ;\n    double Control [UMFPACK_CONTROL] ;\n    UF_long status ;\n    status = umfpack_dl_report_symbolic (Symbolic, Control) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    void *Symbolic ;\n    double Control [UMFPACK_CONTROL] ;\n    int status ;\n    status = umfpack_zi_report_symbolic (Symbolic, Control) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Symbolic ;\n    double Control [UMFPACK_CONTROL] ;\n    UF_long status ;\n    status = umfpack_zl_report_symbolic (Symbolic, Control) ;\n\nPurpose:\n\n    Verifies and prints a Symbolic object.  This routine checks the object more\n    carefully than the computational routines.  Normally, this check is not\n    required, since umfpack_*_*symbolic either returns (void *) NULL, or a valid\n    Symbolic object.  However, if you suspect that your own code has corrupted\n    the Symbolic object (by overruning memory bounds, for example), then this\n    routine might be able to detect a corrupted Symbolic object.  Since this is\n    a complex object, not all such user-generated errors are guaranteed to be\n    caught by this routine.\n\nReturns:\n\n    UMFPACK_OK if Control [UMFPACK_PRL] is <= 2 (no inputs are checked).\n\n    Otherwise:\n\n    UMFPACK_OK if the Symbolic object is valid.\n    UMFPACK_ERROR_invalid_Symbolic_object if the Symbolic object is invalid.\n    UMFPACK_ERROR_out_of_memory if out of memory.\n\nArguments:\n\n    void *Symbolic ;\t\t\tInput argument, not modified.\n\n\tThe Symbolic object, which holds the symbolic factorization computed by\n\tumfpack_*_*symbolic.\n\n    double Control [UMFPACK_CONTROL] ;\tInput argument, not modified.\n\n\tIf a (double *) NULL pointer is passed, then the default control\n\tsettings are used.  Otherwise, the settings are determined from the\n\tControl array.  See umfpack_*_defaults on how to fill the Control\n\tarray with the default settings.  If Control contains NaN's, the\n\tdefaults are used.  The following Control parameters are used:\n\n\tControl [UMFPACK_PRL]:  printing level.\n\n\t    2 or less: no output.  returns silently without checking anything.\n\t    3: fully check input, and print a short summary of its status\n\t    4: as 3, but print first few entries of the input\n\t    5: as 3, but print all of the input\n\t    Default: 1\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_report_triplet.h",
    "content": "/* ========================================================================== */\n/* === umfpack_report_triplet =============================================== */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_report_triplet\n(\n    int n_row,\n    int n_col,\n    int nz,\n    const int Ti [ ],\n    const int Tj [ ],\n    const double Tx [ ],\n    const double Control [UMFPACK_CONTROL]\n) ;\n\nUF_long umfpack_dl_report_triplet\n(\n    UF_long n_row,\n    UF_long n_col,\n    UF_long nz,\n    const UF_long Ti [ ],\n    const UF_long Tj [ ],\n    const double Tx [ ],\n    const double Control [UMFPACK_CONTROL]\n) ;\n\nint umfpack_zi_report_triplet\n(\n    int n_row,\n    int n_col,\n    int nz,\n    const int Ti [ ],\n    const int Tj [ ],\n    const double Tx [ ], const double Tz [ ],\n    const double Control [UMFPACK_CONTROL]\n) ;\n\nUF_long umfpack_zl_report_triplet\n(\n    UF_long n_row,\n    UF_long n_col,\n    UF_long nz,\n    const UF_long Ti [ ],\n    const UF_long Tj [ ],\n    const double Tx [ ], const double Tz [ ],\n    const double Control [UMFPACK_CONTROL]\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    int n_row, n_col, nz, *Ti, *Tj, status ;\n    double *Tx, Control [UMFPACK_CONTROL] ;\n    status = umfpack_di_report_triplet (n_row, n_col, nz, Ti, Tj, Tx, Control) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long n_row, n_col, nz, *Ti, *Tj, status ;\n    double *Tx, Control [UMFPACK_CONTROL] ;\n    status = umfpack_dl_report_triplet (n_row, n_col, nz, Ti, Tj, Tx, Control) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    int n_row, n_col, nz, *Ti, *Tj, status ;\n    double *Tx, *Tz, Control [UMFPACK_CONTROL] ;\n    status = umfpack_zi_report_triplet (n_row, n_col, nz, Ti, Tj, Tx, Tz,\n\tControl) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long n_row, n_col, nz, *Ti, *Tj, status ;\n    double *Tx, *Tz, Control [UMFPACK_CONTROL] ;\n    status = umfpack_zl_report_triplet (n_row, n_col, nz, Ti, Tj, Tx, Tz,\n\tControl) ;\n\npacked complex Syntax:\n\n    Same as above, except Tz is NULL.\n\nPurpose:\n\n    Verifies and prints a matrix in triplet form.\n\nReturns:\n\n    UMFPACK_OK if Control [UMFPACK_PRL] <= 2 (the input is not checked).\n\n    Otherwise:\n\n    UMFPACK_OK if the Triplet matrix is OK.\n    UMFPACK_ERROR_argument_missing if Ti and/or Tj are missing.\n    UMFPACK_ERROR_n_nonpositive if n_row <= 0 or n_col <= 0.\n    UMFPACK_ERROR_invalid_matrix if nz < 0, or\n\tif any row or column index in Ti and/or Tj\n\tis not in the range 0 to n_row-1 or 0 to n_col-1, respectively.\n\nArguments:\n\n    Int n_row ;\t\tInput argument, not modified.\n    Int n_col ;\t\tInput argument, not modified.\n\n\tA is an n_row-by-n_col matrix.\n\n    Int nz ;\t\tInput argument, not modified.\n\n\tThe number of entries in the triplet form of the matrix.\n\n    Int Ti [nz] ;\tInput argument, not modified.\n    Int Tj [nz] ;\tInput argument, not modified.\n    double Tx [nz] ;\tInput argument, not modified.\n\t\t\tSize 2*nz for packed complex case.\n    double Tz [nz] ;\tInput argument, not modified, for complex versions.\n\n\tTi, Tj, Tx (and Tz for complex versions) hold the \"triplet\" form of a\n\tsparse matrix.  The kth nonzero entry is in row i = Ti [k], column\n\tj = Tj [k], the real numerical value of a_ij is Tx [k], and the\n\timaginary part of a_ij is Tz [k] (for complex versions).  The row and\n\tcolumn indices i and j must be in the range 0 to n_row-1 or 0 to\n\tn_col-1, respectively.  Duplicate entries may be present.  The\n\t\"triplets\" may be in any order.  Tx and Tz are optional; if Tx is\n\tnot present ((double *) NULL), then the numerical values are\n\tnot printed.\n\n\tIf Tx is present and Tz is NULL, then both real\n\tand imaginary parts are contained in Tx[0..2*nz-1], with Tx[2*k]\n\tand Tx[2*k+1] being the real and imaginary part of the kth entry.\n\n    double Control [UMFPACK_CONTROL] ;\tInput argument, not modified.\n\n\tIf a (double *) NULL pointer is passed, then the default control\n\tsettings are used.  Otherwise, the settings are determined from the\n\tControl array.  See umfpack_*_defaults on how to fill the Control\n\tarray with the default settings.  If Control contains NaN's, the\n\tdefaults are used.  The following Control parameters are used:\n\n\tControl [UMFPACK_PRL]:  printing level.\n\n\t    2 or less: no output.  returns silently without checking anything.\n\t    3: fully check input, and print a short summary of its status\n\t    4: as 3, but print first few entries of the input\n\t    5: as 3, but print all of the input\n\t    Default: 1\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_report_vector.h",
    "content": "/* ========================================================================== */\n/* === umfpack_report_vector ================================================ */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_report_vector\n(\n    int n,\n    const double X [ ],\n    const double Control [UMFPACK_CONTROL]\n) ;\n\nUF_long umfpack_dl_report_vector\n(\n    UF_long n,\n    const double X [ ],\n    const double Control [UMFPACK_CONTROL]\n) ;\n\nint umfpack_zi_report_vector\n(\n    int n,\n    const double Xx [ ], const double Xz [ ],\n    const double Control [UMFPACK_CONTROL]\n) ;\n\nUF_long umfpack_zl_report_vector\n(\n    UF_long n,\n    const double Xx [ ], const double Xz [ ],\n    const double Control [UMFPACK_CONTROL]\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    int n, status ;\n    double *X, Control [UMFPACK_CONTROL] ;\n    status = umfpack_di_report_vector (n, X, Control) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long n, status ;\n    double *X, Control [UMFPACK_CONTROL] ;\n    status = umfpack_dl_report_vector (n, X, Control) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    int n, status ;\n    double *Xx, *Xz, Control [UMFPACK_CONTROL] ;\n    status = umfpack_zi_report_vector (n, Xx, Xz, Control) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long n, status ;\n    double *Xx, *Xz, Control [UMFPACK_CONTROL] ;\n    status = umfpack_zl_report_vector (n, Xx, Xz, Control) ;\n\nPurpose:\n\n    Verifies and prints a dense vector.\n\nReturns:\n\n    UMFPACK_OK if Control [UMFPACK_PRL] <= 2 (the input is not checked).\n\n    Otherwise:\n\n    UMFPACK_OK if the vector is valid.\n    UMFPACK_ERROR_argument_missing if X or Xx is missing.\n    UMFPACK_ERROR_n_nonpositive if n <= 0.\n\nArguments:\n\n    Int n ;\t\tInput argument, not modified.\n\n\tX is a real or complex vector of size n.  Restriction: n > 0.\n\n    double X [n] ;\tInput argument, not modified.  For real versions.\n\n\tA real vector of size n.  X must not be (double *) NULL.\n\n    double Xx [n or 2*n] ; Input argument, not modified.  For complex versions.\n    double Xz [n or 0] ;   Input argument, not modified.  For complex versions.\n\n\tA complex vector of size n, in one of two storage formats.\n\tXx must not be (double *) NULL.\n\n\tIf Xz is not (double *) NULL, then Xx [i] is the real part of X (i) and\n\tXz [i] is the imaginary part of X (i).  Both vectors are of length n.\n\tThis is the \"split\" form of the complex vector X.\n\n\tIf Xz is (double *) NULL, then Xx holds both real and imaginary parts,\n\twhere Xx [2*i] is the real part of X (i) and Xx [2*i+1] is the imaginary\n\tpart of X (i).  Xx is of length 2*n doubles.  If you have an ANSI C99\n\tcompiler with the intrinsic double _Complex type, then Xx can be of\n\ttype double _Complex in the calling routine and typecast to (double *)\n\twhen passed to umfpack_*_report_vector (this is untested, however).\n\tThis is the \"merged\" form of the complex vector X.\n\n\tNote that all complex routines in UMFPACK V4.4 and later use this same\n\tstrategy for their complex arguments.  The split format is useful for\n\tMATLAB, which holds its real and imaginary parts in seperate arrays.\n\tThe packed format is compatible with the intrinsic double _Complex\n\ttype in ANSI C99, and is also compatible with SuperLU's method of\n\tstoring complex matrices.  In Version 4.3, this routine was the only\n\tone that allowed for packed complex arguments.\n\n    double Control [UMFPACK_CONTROL] ;\tInput argument, not modified.\n\n\tIf a (double *) NULL pointer is passed, then the default control\n\tsettings are used.  Otherwise, the settings are determined from the\n\tControl array.  See umfpack_*_defaults on how to fill the Control\n\tarray with the default settings.  If Control contains NaN's, the\n\tdefaults are used.  The following Control parameters are used:\n\n\tControl [UMFPACK_PRL]:  printing level.\n\n\t    2 or less: no output.  returns silently without checking anything.\n\t    3: fully check input, and print a short summary of its status\n\t    4: as 3, but print first few entries of the input\n\t    5: as 3, but print all of the input\n\t    Default: 1\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_save_numeric.h",
    "content": "/* ========================================================================== */\n/* === umfpack_save_numeric ================================================= */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_save_numeric\n(\n    void *Numeric,\n    char *filename\n) ;\n\nUF_long umfpack_dl_save_numeric\n(\n    void *Numeric,\n    char *filename\n) ;\n\nint umfpack_zi_save_numeric\n(\n    void *Numeric,\n    char *filename\n) ;\n\nUF_long umfpack_zl_save_numeric\n(\n    void *Numeric,\n    char *filename\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    int status ;\n    char *filename ;\n    void *Numeric ;\n    status = umfpack_di_save_numeric (Numeric, filename) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long status ;\n    char *filename ;\n    void *Numeric ;\n    status = umfpack_dl_save_numeric (Numeric, filename) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    int status ;\n    char *filename ;\n    void *Numeric ;\n    status = umfpack_zi_save_numeric (Numeric, filename) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long status ;\n    char *filename ;\n    void *Numeric ;\n    status = umfpack_zl_save_numeric (Numeric, filename) ;\n\nPurpose:\n\n    Saves a Numeric object to a file, which can later be read by\n    umfpack_*_load_numeric.  The Numeric object is not modified.\n\nReturns:\n\n    UMFPACK_OK if successful.\n    UMFPACK_ERROR_invalid_Numeric_object if Numeric is not valid.\n    UMFPACK_ERROR_file_IO if an I/O error occurred.\n\nArguments:\n\n    void *Numeric ;\t    Input argument, not modified.\n\n\tNumeric must point to a valid Numeric object, computed by\n\tumfpack_*_numeric or loaded by umfpack_*_load_numeric.\n\n    char *filename ;\t    Input argument, not modified.\n\n\tA string that contains the filename to which the Numeric\n\tobject is written.\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_save_symbolic.h",
    "content": "/* ========================================================================== */\n/* === umfpack_save_symbolic================================================= */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_save_symbolic\n(\n    void *Symbolic,\n    char *filename\n) ;\n\nUF_long umfpack_dl_save_symbolic\n(\n    void *Symbolic,\n    char *filename\n) ;\n\nint umfpack_zi_save_symbolic\n(\n    void *Symbolic,\n    char *filename\n) ;\n\nUF_long umfpack_zl_save_symbolic\n(\n    void *Symbolic,\n    char *filename\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    int status ;\n    char *filename ;\n    void *Symbolic ;\n    status = umfpack_di_save_symbolic (Symbolic, filename) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long status ;\n    char *filename ;\n    void *Symbolic ;\n    status = umfpack_dl_save_symbolic (Symbolic, filename) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    int status ;\n    char *filename ;\n    void *Symbolic ;\n    status = umfpack_zi_save_symbolic (Symbolic, filename) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long status ;\n    char *filename ;\n    void *Symbolic ;\n    status = umfpack_zl_save_symbolic (Symbolic, filename) ;\n\nPurpose:\n\n    Saves a Symbolic object to a file, which can later be read by\n    umfpack_*_load_symbolic.  The Symbolic object is not modified.\n\nReturns:\n\n    UMFPACK_OK if successful.\n    UMFPACK_ERROR_invalid_Symbolic_object if Symbolic is not valid.\n    UMFPACK_ERROR_file_IO if an I/O error occurred.\n\nArguments:\n\n    void *Symbolic ;\t    Input argument, not modified.\n\n\tSymbolic must point to a valid Symbolic object, computed by\n\tumfpack_*_symbolic or loaded by umfpack_*_load_symbolic.\n\n    char *filename ;\t    Input argument, not modified.\n\n\tA string that contains the filename to which the Symbolic\n\tobject is written.\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_scale.h",
    "content": "/* ========================================================================== */\n/* === umfpack_scale ======================================================== */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_scale\n(\n    double X [ ],\n    const double B [ ],\n    void *Numeric\n) ;\n\nUF_long umfpack_dl_scale\n(\n    double X [ ],\n    const double B [ ],\n    void *Numeric\n) ;\n\nint umfpack_zi_scale\n(\n    double Xx [ ],\t double Xz [ ],\n    const double Bx [ ], const double Bz [ ],\n    void *Numeric\n) ;\n\nUF_long umfpack_zl_scale\n(\n    double Xx [ ],\t double Xz [ ],\n    const double Bx [ ], const double Bz [ ],\n    void *Numeric\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    double *B, *X ;\n    status = umfpack_di_scale (X, B, Numeric) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    double *B, *X ;\n    status = umfpack_dl_scale (X, B, Numeric) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    double *Bx, *Bz, *Xx, *Xz ;\n    status = umfpack_zi_scale (Xx, Xz, Bx, Bz, Numeric) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    double *Bx, *Bz, *Xx, *Xz ;\n    status = umfpack_zl_scale (Xx, Xz, Bx, Bz, Numeric) ;\n\npacked complex Syntax:\n\n    Same as above, except both Xz and Bz are NULL.\n\nPurpose:\n\n    Given LU factors computed by umfpack_*_numeric (PAQ=LU, PRAQ=LU, or\n    P(R\\A)Q=LU), and a vector B, this routine computes X = B, X = R*B, or\n    X = R\\B, as appropriate.  X and B must be vectors equal in length to the\n    number of rows of A.\n\nReturns:\n\n    The status code is returned.  UMFPACK_OK is returned if successful.\n    UMFPACK_ERROR_invalid_Numeric_object is returned in the Numeric\n    object is invalid.  UMFPACK_ERROR_argument_missing is returned if\n    any of the input vectors are missing (X and B for the real version,\n    and Xx and Bx for the complex version).\n\nArguments:\n\n    double X [n_row] ;\tOutput argument.\n    or:\n    double Xx [n_row] ;\tOutput argument, real part.\n\t\t\tSize 2*n_row for packed complex case.\n    double Xz [n_row] ;\tOutput argument, imaginary part.\n\n\tThe output vector X.  If either Xz or Bz are NULL, the vector\n\tX is in packed complex form, with the kth entry in Xx [2*k] and\n\tXx [2*k+1], and likewise for B.\n\n    double B [n_row] ;\tInput argument, not modified.\n    or:\n    double Bx [n_row] ;\tInput argument, not modified, real part.\n\t\t\tSize 2*n_row for packed complex case.\n    double Bz [n_row] ;\tInput argument, not modified, imaginary part.\n\n\tThe input vector B.  See above if either Xz or Bz are NULL.\n\n    void *Numeric ;\t\tInput argument, not modified.\n\n\tNumeric must point to a valid Numeric object, computed by\n\tumfpack_*_numeric.\n\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_solve.h",
    "content": "/* ========================================================================== */\n/* === umfpack_solve ======================================================== */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_solve\n(\n    int sys,\n    const int Ap [ ],\n    const int Ai [ ],\n    const double Ax [ ],\n    double X [ ],\n    const double B [ ],\n    void *Numeric,\n    const double Control [UMFPACK_CONTROL],\n    double Info [UMFPACK_INFO]\n) ;\n\nUF_long umfpack_dl_solve\n(\n    UF_long sys,\n    const UF_long Ap [ ],\n    const UF_long Ai [ ],\n    const double Ax [ ],\n    double X [ ],\n    const double B [ ],\n    void *Numeric,\n    const double Control [UMFPACK_CONTROL],\n    double Info [UMFPACK_INFO]\n) ;\n\nint umfpack_zi_solve\n(\n    int sys,\n    const int Ap [ ],\n    const int Ai [ ],\n    const double Ax [ ], const double Az [ ],\n    double Xx [ ],\t double Xz [ ],\n    const double Bx [ ], const double Bz [ ],\n    void *Numeric,\n    const double Control [UMFPACK_CONTROL],\n    double Info [UMFPACK_INFO]\n) ;\n\nUF_long umfpack_zl_solve\n(\n    UF_long sys,\n    const UF_long Ap [ ],\n    const UF_long Ai [ ],\n    const double Ax [ ], const double Az [ ],\n    double Xx [ ],\t double Xz [ ],\n    const double Bx [ ], const double Bz [ ],\n    void *Numeric,\n    const double Control [UMFPACK_CONTROL],\n    double Info [UMFPACK_INFO]\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    int status, *Ap, *Ai, sys ;\n    double *B, *X, *Ax, Info [UMFPACK_INFO], Control [UMFPACK_CONTROL] ;\n    status = umfpack_di_solve (sys, Ap, Ai, Ax, X, B, Numeric, Control, Info) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    UF_long status, *Ap, *Ai, sys ;\n    double *B, *X, *Ax, Info [UMFPACK_INFO], Control [UMFPACK_CONTROL] ;\n    status = umfpack_dl_solve (sys, Ap, Ai, Ax, X, B, Numeric, Control, Info) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    int status, *Ap, *Ai, sys ;\n    double *Bx, *Bz, *Xx, *Xz, *Ax, *Az, Info [UMFPACK_INFO],\n\tControl [UMFPACK_CONTROL] ;\n    status = umfpack_zi_solve (sys, Ap, Ai, Ax, Az, Xx, Xz, Bx, Bz, Numeric,\n\tControl, Info) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    UF_long status, *Ap, *Ai, sys ;\n    double *Bx, *Bz, *Xx, *Xz, *Ax, *Az, Info [UMFPACK_INFO],\n\tControl [UMFPACK_CONTROL] ;\n    status = umfpack_zl_solve (sys, Ap, Ai, Ax, Az, Xx, Xz, Bx, Bz, Numeric,\n\tControl, Info) ;\n\npacked complex Syntax:\n\n    Same as above, Xz, Bz, and Az are NULL.\n\nPurpose:\n\n    Given LU factors computed by umfpack_*_numeric (PAQ=LU, PRAQ=LU, or\n    P(R\\A)Q=LU) and the right-hand-side, B, solve a linear system for the\n    solution X.  Iterative refinement is optionally performed.  Only square\n    systems are handled.  Singular matrices result in a divide-by-zero for all\n    systems except those involving just the matrix L.  Iterative refinement is\n    not performed for singular matrices.  In the discussion below, n is equal\n    to n_row and n_col, because only square systems are handled.\n\nReturns:\n\n    The status code is returned.  See Info [UMFPACK_STATUS], below.\n\nArguments:\n\n    Int sys ;\t\tInput argument, not modified.\n\n\tDefines which system to solve.  (') is the linear algebraic transpose\n\t(complex conjugate if A is complex), and (.') is the array transpose.\n\n\t    sys value\t    system solved\n\t    UMFPACK_A       Ax=b\n\t    UMFPACK_At      A'x=b\n\t    UMFPACK_Aat     A.'x=b\n\t    UMFPACK_Pt_L    P'Lx=b\n\t    UMFPACK_L       Lx=b\n\t    UMFPACK_Lt_P    L'Px=b\n\t    UMFPACK_Lat_P   L.'Px=b\n\t    UMFPACK_Lt      L'x=b\n\t    UMFPACK_U_Qt    UQ'x=b\n\t    UMFPACK_U       Ux=b\n\t    UMFPACK_Q_Ut    QU'x=b\n\t    UMFPACK_Q_Uat   QU.'x=b\n\t    UMFPACK_Ut      U'x=b\n\t    UMFPACK_Uat     U.'x=b\n\n\tIterative refinement can be optionally performed when sys is any of\n\tthe following:\n\n\t    UMFPACK_A       Ax=b\n\t    UMFPACK_At      A'x=b\n\t    UMFPACK_Aat     A.'x=b\n\n\tFor the other values of the sys argument, iterative refinement is not\n\tperformed (Control [UMFPACK_IRSTEP], Ap, Ai, Ax, and Az are ignored).\n\n    Int Ap [n+1] ;\tInput argument, not modified.\n    Int Ai [nz] ;\tInput argument, not modified.\n    double Ax [nz] ;\tInput argument, not modified.\n\t\t\tSize 2*nz for packed complex case.\n    double Az [nz] ;\tInput argument, not modified, for complex versions.\n\n\tIf iterative refinement is requested (Control [UMFPACK_IRSTEP] >= 1,\n\tAx=b, A'x=b, or A.'x=b is being solved, and A is nonsingular), then\n\tthese arrays must be identical to the same ones passed to\n\tumfpack_*_numeric.  The umfpack_*_solve routine does not check the\n\tcontents of these arguments, so the results are undefined if Ap, Ai, Ax,\n\tand/or Az are modified between the calls the umfpack_*_numeric and\n\tumfpack_*_solve.  These three arrays do not need to be present (NULL\n\tpointers can be passed) if Control [UMFPACK_IRSTEP] is zero, or if a\n\tsystem other than Ax=b, A'x=b, or A.'x=b is being solved, or if A is\n\tsingular, since in each of these cases A is not accessed.\n\n\tIf Az, Xz, or Bz are NULL, then both real\n\tand imaginary parts are contained in Ax[0..2*nz-1], with Ax[2*k]\n\tand Ax[2*k+1] being the real and imaginary part of the kth entry.\n\n    double X [n] ;\tOutput argument.\n    or:\n    double Xx [n] ;\tOutput argument, real part\n\t\t\tSize 2*n for packed complex case.\n    double Xz [n] ;\tOutput argument, imaginary part.\n\n\tThe solution to the linear system, where n = n_row = n_col is the\n\tdimension of the matrices A, L, and U.\n\n\tIf Az, Xz, or Bz are NULL, then both real\n\tand imaginary parts are returned in Xx[0..2*n-1], with Xx[2*k] and\n\tXx[2*k+1] being the real and imaginary part of the kth entry.\n\n    double B [n] ;\tInput argument, not modified.\n    or:\n    double Bx [n] ;\tInput argument, not modified, real part.\n\t\t\tSize 2*n for packed complex case.\n    double Bz [n] ;\tInput argument, not modified, imaginary part.\n\n\tThe right-hand side vector, b, stored as a conventional array of size n\n\t(or two arrays of size n for complex versions).  This routine does not\n\tsolve for multiple right-hand-sides, nor does it allow b to be stored in\n\ta sparse-column form.\n\n\tIf Az, Xz, or Bz are NULL, then both real\n\tand imaginary parts are contained in Bx[0..2*n-1], with Bx[2*k]\n\tand Bx[2*k+1] being the real and imaginary part of the kth entry.\n\n    void *Numeric ;\t\tInput argument, not modified.\n\n\tNumeric must point to a valid Numeric object, computed by\n\tumfpack_*_numeric.\n\n    double Control [UMFPACK_CONTROL] ;\tInput argument, not modified.\n\n\tIf a (double *) NULL pointer is passed, then the default control\n\tsettings are used.  Otherwise, the settings are determined from the\n\tControl array.  See umfpack_*_defaults on how to fill the Control\n\tarray with the default settings.  If Control contains NaN's, the\n\tdefaults are used.  The following Control parameters are used:\n\n\tControl [UMFPACK_IRSTEP]:  The maximum number of iterative refinement\n\t    steps to attempt.  A value less than zero is treated as zero.  If\n\t    less than 1, or if Ax=b, A'x=b, or A.'x=b is not being solved, or\n\t    if A is singular, then the Ap, Ai, Ax, and Az arguments are not\n\t    accessed.  Default: 2.\n\n    double Info [UMFPACK_INFO] ;\tOutput argument.\n\n\tContains statistics about the solution factorization.  If a\n\t(double *) NULL pointer is passed, then no statistics are returned in\n\tInfo (this is not an error condition).  The following statistics are\n\tcomputed in umfpack_*_solve:\n\n\tInfo [UMFPACK_STATUS]: status code.  This is also the return value,\n\t    whether or not Info is present.\n\n\t    UMFPACK_OK\n\n\t\tThe linear system was successfully solved.\n\n\t    UMFPACK_WARNING_singular_matrix\n\n\t\tA divide-by-zero occurred.  Your solution will contain Inf's\n\t\tand/or NaN's.  Some parts of the solution may be valid.  For\n\t\texample, solving Ax=b with\n\n\t\tA = [2 0]  b = [ 1 ]  returns x = [ 0.5 ]\n\t\t    [0 0]      [ 0 ]              [ Inf ]\n\n\t    UMFPACK_ERROR_out_of_memory\n\n\t\tInsufficient memory to solve the linear system.\n\n\t    UMFPACK_ERROR_argument_missing\n\n\t\tOne or more required arguments are missing.  The B, X, (or\n\t\tBx and Xx for the complex versions) arguments\n\t\tare always required.  Info and Control are not required.  Ap,\n\t\tAi, Ax are required if Ax=b,\n\t\tA'x=b, A.'x=b is to be solved, the (default) iterative\n\t\trefinement is requested, and the matrix A is nonsingular.\n\n\t    UMFPACK_ERROR_invalid_system\n\n\t\tThe sys argument is not valid, or the matrix A is not square.\n\n\t    UMFPACK_ERROR_invalid_Numeric_object\n\n\t\tThe Numeric object is not valid.\n\n\tInfo [UMFPACK_NROW], Info [UMFPACK_NCOL]:\n\t\tThe dimensions of the matrix A (L is n_row-by-n_inner and\n\t\tU is n_inner-by-n_col, with n_inner = min(n_row,n_col)).\n\n\tInfo [UMFPACK_NZ]:  the number of entries in the input matrix, Ap [n],\n\t    if iterative refinement is requested (Ax=b, A'x=b, or A.'x=b is\n\t    being solved, Control [UMFPACK_IRSTEP] >= 1, and A is nonsingular).\n\n\tInfo [UMFPACK_IR_TAKEN]:  The number of iterative refinement steps\n\t    effectively taken.  The number of steps attempted may be one more\n\t    than this; the refinement algorithm backtracks if the last\n\t    refinement step worsens the solution.\n\n\tInfo [UMFPACK_IR_ATTEMPTED]:   The number of iterative refinement steps\n\t    attempted.  The number of times a linear system was solved is one\n\t    more than this (once for the initial Ax=b, and once for each Ay=r\n\t    solved for each iterative refinement step attempted).\n\n\tInfo [UMFPACK_OMEGA1]:  sparse backward error estimate, omega1, if\n\t    iterative refinement was performed, or -1 if iterative refinement\n\t    not performed.\n\n\tInfo [UMFPACK_OMEGA2]:  sparse backward error estimate, omega2, if\n\t    iterative refinement was performed, or -1 if iterative refinement\n\t    not performed.\n\n\tInfo [UMFPACK_SOLVE_FLOPS]:  the number of floating point operations\n\t    performed to solve the linear system.  This includes the work\n\t    taken for all iterative refinement steps, including the backtrack\n\t    (if any).\n\n\tInfo [UMFPACK_SOLVE_TIME]:  The time taken, in seconds.\n\n        Info [UMFPACK_SOLVE_WALLTIME]:  The wallclock time taken, in seconds.\n\n\tOnly the above listed Info [...] entries are accessed.  The remaining\n\tentries of Info are not accessed or modified by umfpack_*_solve.\n\tFuture versions might modify different parts of Info.\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_symbolic.h",
    "content": "/* ========================================================================== */\n/* === umfpack_symbolic ===================================================== */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_symbolic\n(\n    int n_row,\n    int n_col,\n    const int Ap [ ],\n    const int Ai [ ],\n    const double Ax [ ],\n    void **Symbolic,\n    const double Control [UMFPACK_CONTROL],\n    double Info [UMFPACK_INFO]\n) ;\n\nUF_long umfpack_dl_symbolic\n(\n    UF_long n_row,\n    UF_long n_col,\n    const UF_long Ap [ ],\n    const UF_long Ai [ ],\n    const double Ax [ ],\n    void **Symbolic,\n    const double Control [UMFPACK_CONTROL],\n    double Info [UMFPACK_INFO]\n) ;\n\nint umfpack_zi_symbolic\n(\n    int n_row,\n    int n_col,\n    const int Ap [ ],\n    const int Ai [ ],\n    const double Ax [ ], const double Az [ ],\n    void **Symbolic,\n    const double Control [UMFPACK_CONTROL],\n    double Info [UMFPACK_INFO]\n) ;\n\nUF_long umfpack_zl_symbolic\n(\n    UF_long n_row,\n    UF_long n_col,\n    const UF_long Ap [ ],\n    const UF_long Ai [ ],\n    const double Ax [ ], const double Az [ ],\n    void **Symbolic,\n    const double Control [UMFPACK_CONTROL],\n    double Info [UMFPACK_INFO]\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    void *Symbolic ;\n    int n_row, n_col, *Ap, *Ai, status ;\n    double Control [UMFPACK_CONTROL], Info [UMFPACK_INFO], *Ax ;\n    status = umfpack_di_symbolic (n_row, n_col, Ap, Ai, Ax,\n\t&Symbolic, Control, Info) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Symbolic ;\n    UF_long n_row, n_col, *Ap, *Ai, status ;\n    double Control [UMFPACK_CONTROL], Info [UMFPACK_INFO], *Ax ;\n    status = umfpack_dl_symbolic (n_row, n_col, Ap, Ai, Ax,\n\t&Symbolic, Control, Info) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    void *Symbolic ;\n    int n_row, n_col, *Ap, *Ai, status ;\n    double Control [UMFPACK_CONTROL], Info [UMFPACK_INFO], *Ax, *Az ;\n    status = umfpack_zi_symbolic (n_row, n_col, Ap, Ai, Ax, Az,\n\t&Symbolic, Control, Info) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Symbolic ;\n    UF_long n_row, n_col, *Ap, *Ai, status ;\n    double Control [UMFPACK_CONTROL], Info [UMFPACK_INFO], *Ax, *Az ;\n    status = umfpack_zl_symbolic (n_row, n_col, Ap, Ai, Ax, Az,\n\t&Symbolic, Control, Info) ;\n\npacked complex Syntax:\n\n    Same as above, except Az is NULL.\n\nPurpose:\n\n    Given nonzero pattern of a sparse matrix A in column-oriented form,\n    umfpack_*_symbolic performs a column pre-ordering to reduce fill-in\n    (using COLAMD or AMD) and a symbolic factorization.  This is required\n    before the matrix can be numerically factorized with umfpack_*_numeric.\n    If you wish to bypass the COLAMD or AMD pre-ordering and provide your own\n    ordering, use umfpack_*_qsymbolic instead.\n\n    Since umfpack_*_symbolic and umfpack_*_qsymbolic are very similar, options\n    for both routines are discussed below.\n\n    For the following discussion, let S be the submatrix of A obtained after\n    eliminating all pivots of zero Markowitz cost.  S has dimension\n    (n_row-n1-nempty_row) -by- (n_col-n1-nempty_col), where\n    n1 = Info [UMFPACK_COL_SINGLETONS] + Info [UMFPACK_ROW_SINGLETONS],\n    nempty_row = Info [UMFPACK_NEMPTY_ROW] and\n    nempty_col = Info [UMFPACK_NEMPTY_COL].\n\nReturns:\n\n    The status code is returned.  See Info [UMFPACK_STATUS], below.\n\nArguments:\n\n    Int n_row ;\t\tInput argument, not modified.\n    Int n_col ;\t\tInput argument, not modified.\n\n\tA is an n_row-by-n_col matrix.  Restriction: n_row > 0 and n_col > 0.\n\n    Int Ap [n_col+1] ;\tInput argument, not modified.\n\n\tAp is an integer array of size n_col+1.  On input, it holds the\n\t\"pointers\" for the column form of the sparse matrix A.  Column j of\n\tthe matrix A is held in Ai [(Ap [j]) ... (Ap [j+1]-1)].  The first\n\tentry, Ap [0], must be zero, and Ap [j] <= Ap [j+1] must hold for all\n\tj in the range 0 to n_col-1.  The value nz = Ap [n_col] is thus the\n\ttotal number of entries in the pattern of the matrix A.  nz must be\n\tgreater than or equal to zero.\n\n    Int Ai [nz] ;\tInput argument, not modified, of size nz = Ap [n_col].\n\n\tThe nonzero pattern (row indices) for column j is stored in\n\tAi [(Ap [j]) ... (Ap [j+1]-1)].  The row indices in a given column j\n\tmust be in ascending order, and no duplicate row indices may be present.\n\tRow indices must be in the range 0 to n_row-1 (the matrix is 0-based).\n\tSee umfpack_*_triplet_to_col for how to sort the columns of a matrix\n\tand sum up the duplicate entries.  See umfpack_*_report_matrix for how\n\tto print the matrix A.\n\n    double Ax [nz] ;\tOptional input argument, not modified.\n\t\t\tSize 2*nz for packed complex case.\n\n\tThe numerical values of the sparse matrix A.  The nonzero pattern (row\n\tindices) for column j is stored in Ai [(Ap [j]) ... (Ap [j+1]-1)], and\n\tthe corresponding numerical values are stored in\n\tAx [(Ap [j]) ... (Ap [j+1]-1)].  Used only by the 2-by-2 strategy to\n\tdetermine whether entries are \"large\" or \"small\".  You do not have to\n\tpass the same numerical values to umfpack_*_numeric.  If Ax is not\n\tpresent (a (double *) NULL pointer), then any entry in A is assumed to\n\tbe \"large\".\n\n    double Az [nz] ;\tOptional input argument, not modified, for complex\n\t\t\tversions.\n\n\tFor the complex versions, this holds the imaginary part of A.  The\n\timaginary part of column j is held in Az [(Ap [j]) ... (Ap [j+1]-1)].\n\n\tIf Az is NULL, then both real\n\tand imaginary parts are contained in Ax[0..2*nz-1], with Ax[2*k]\n\tand Ax[2*k+1] being the real and imaginary part of the kth entry.\n\n\tUsed by the 2-by-2 strategy only.  See the description of Ax, above.\n\n    void **Symbolic ;\tOutput argument.\n\n\t**Symbolic is the address of a (void *) pointer variable in the user's\n\tcalling routine (see Syntax, above).  On input, the contents of this\n\tvariable are not defined.  On output, this variable holds a (void *)\n\tpointer to the Symbolic object (if successful), or (void *) NULL if\n\ta failure occurred.\n\n    double Control [UMFPACK_CONTROL] ;\tInput argument, not modified.\n\n\tIf a (double *) NULL pointer is passed, then the default control\n\tsettings are used (the defaults are suitable for all matrices,\n\tranging from those with highly unsymmetric nonzero pattern, to\n\tsymmetric matrices).  Otherwise, the settings are determined from the\n\tControl array.  See umfpack_*_defaults on how to fill the Control\n\tarray with the default settings.  If Control contains NaN's, the\n\tdefaults are used.  The following Control parameters are used:\n\n\tControl [UMFPACK_STRATEGY]:  This is the most important control\n\t    parameter.  It determines what kind of ordering and pivoting\n\t    strategy that UMFPACK should use.  There are 4 options:\n\n\t    UMFPACK_STRATEGY_AUTO:  This is the default.  The input matrix is\n\t\tanalyzed to determine how symmetric the nonzero pattern is, and\n\t\thow many entries there are on the diagonal.  It then selects one\n\t\tof the following strategies.  Refer to the User Guide for a\n\t\tdescription of how the strategy is automatically selected.\n\n\t    UMFPACK_STRATEGY_UNSYMMETRIC:  Use the unsymmetric strategy.  COLAMD\n\t\tis used to order the columns of A, followed by a postorder of\n\t\tthe column elimination tree.  No attempt is made to perform\n\t\tdiagonal pivoting.  The column ordering is refined during\n\t\tfactorization.\n\n\t\tIn the numerical factorization, the\n\t\tControl [UMFPACK_SYM_PIVOT_TOLERANCE] parameter is ignored.  A\n\t\tpivot is selected if its magnitude is >=\n\t\tControl [UMFPACK_PIVOT_TOLERANCE] (default 0.1) times the\n\t\tlargest entry in its column.\n\n\t    UMFPACK_STRATEGY_SYMMETRIC:  Use the symmetric strategy\n\t\tIn this method, the approximate minimum degree\n\t\tordering (AMD) is applied to A+A', followed by a postorder of\n\t\tthe elimination tree of A+A'.  UMFPACK attempts to perform\n\t\tdiagonal pivoting during numerical factorization.  No refinement\n\t\tof the column pre-ordering is performed during factorization.\n\n\t\tIn the numerical factorization, a nonzero entry on the diagonal\n\t\tis selected as the pivot if its magnitude is >= Control\n\t\t[UMFPACK_SYM_PIVOT_TOLERANCE] (default 0.001) times the largest\n\t\tentry in its column.  If this is not acceptable, then an\n\t\toff-diagonal pivot is selected with magnitude >= Control\n\t\t[UMFPACK_PIVOT_TOLERANCE] (default 0.1) times the largest entry\n\t\tin its column.\n\n\t    UMFPACK_STRATEGY_2BY2:  a row permutation P2 is found that places\n\t\tlarge entries on the diagonal.  The matrix P2*A is then\n\t\tfactorized using the symmetric strategy, described above.\n\t\tRefer to the User Guide for more information.\n\n\tControl [UMFPACK_DENSE_COL]:\n\t    If COLAMD is used, columns with more than\n\t    max (16, Control [UMFPACK_DENSE_COL] * 16 * sqrt (n_row)) entries\n\t    are placed placed last in the column pre-ordering.  Default: 0.2.\n\n\tControl [UMFPACK_DENSE_ROW]:\n\t    Rows with more than max (16, Control [UMFPACK_DENSE_ROW] * 16 *\n\t    sqrt (n_col)) entries are treated differently in the COLAMD\n\t    pre-ordering, and in the internal data structures during the\n\t    subsequent numeric factorization.  Default: 0.2.\n\n\tControl [UMFPACK_AMD_DENSE]:  rows/columns in A+A' with more than\n\t    max (16, Control [UMFPACK_AMD_DENSE] * sqrt (n)) entries\n\t    (where n = n_row = n_col) are ignored in the AMD pre-ordering.\n\t    Default: 10.\n\n\tControl [UMFPACK_BLOCK_SIZE]:  the block size to use for Level-3 BLAS\n\t    in the subsequent numerical factorization (umfpack_*_numeric).\n\t    A value less than 1 is treated as 1.  Default: 32.  Modifying this\n\t    parameter affects when updates are applied to the working frontal\n\t    matrix, and can indirectly affect fill-in and operation count.\n\t    Assuming the block size is large enough (8 or so), this parameter\n\t    has a modest effect on performance.\n\n\tControl [UMFPACK_2BY2_TOLERANCE]:  a diagonal entry S (k,k) is\n\t    considered \"small\" if it is < tol * max (abs (S (:,k))), where S a\n\t    submatrix of the scaled input matrix, with pivots of zero Markowitz\n\t    cost removed.\n\n\tControl [UMFPACK_SCALE]:  See umfpack_numeric.h for a description.\n\t    Only affects the 2-by-2 strategy.  Default: UMFPACK_SCALE_SUM.\n\n\tControl [UMFPACK_FIXQ]:  If > 0, then the pre-ordering Q is not modified\n\t    during numeric factorization.  If < 0, then Q may be modified.  If\n\t    zero, then this is controlled automatically (the unsymmetric\n\t    strategy modifies Q, the others do not).  Default: 0.\n\n\tControl [UMFPACK_AGGRESSIVE]:  If nonzero, aggressive absorption is used\n\t    in COLAMD and AMD.  Default: 1.\n\n    double Info [UMFPACK_INFO] ;\tOutput argument, not defined on input.\n\n\tContains statistics about the symbolic analysis.  If a (double *) NULL\n\tpointer is passed, then no statistics are returned in Info (this is not\n\tan error condition).  The entire Info array is cleared (all entries set\n\tto -1) and then the following statistics are computed:\n\n\tInfo [UMFPACK_STATUS]: status code.  This is also the return value,\n\t    whether or not Info is present.\n\n\t    UMFPACK_OK\n\n\t\tEach column of the input matrix contained row indices\n\t\tin increasing order, with no duplicates.  Only in this case\n\t\tdoes umfpack_*_symbolic compute a valid symbolic factorization.\n\t\tFor the other cases below, no Symbolic object is created\n\t\t(*Symbolic is (void *) NULL).\n\n\t    UMFPACK_ERROR_n_nonpositive\n\n\t\tn is less than or equal to zero.\n\n\t    UMFPACK_ERROR_invalid_matrix\n\n\t\tNumber of entries in the matrix is negative, Ap [0] is nonzero,\n\t\ta column has a negative number of entries, a row index is out of\n\t\tbounds, or the columns of input matrix were jumbled (unsorted\n\t\tcolumns or duplicate entries).\n\n\t    UMFPACK_ERROR_out_of_memory\n\n\t\tInsufficient memory to perform the symbolic analysis.  If the\n\t\tanalysis requires more than 2GB of memory and you are using\n\t\tthe 32-bit (\"int\") version of UMFPACK, then you are guaranteed\n\t\tto run out of memory.  Try using the 64-bit version of UMFPACK.\n\n\t    UMFPACK_ERROR_argument_missing\n\n\t\tOne or more required arguments is missing.\n\n\t    UMFPACK_ERROR_internal_error\n\n\t\tSomething very serious went wrong.  This is a bug.\n\t\tPlease contact the author (davis@cise.ufl.edu).\n\n\tInfo [UMFPACK_NROW]:  the value of the input argument n_row.\n\n\tInfo [UMFPACK_NCOL]:  the value of the input argument n_col.\n\n\tInfo [UMFPACK_NZ]:  the number of entries in the input matrix\n\t    (Ap [n_col]).\n\n\tInfo [UMFPACK_SIZE_OF_UNIT]:  the number of bytes in a Unit,\n\t    for memory usage statistics below.\n\n\tInfo [UMFPACK_SIZE_OF_INT]:  the number of bytes in an int.\n\n\tInfo [UMFPACK_SIZE_OF_LONG]:  the number of bytes in a UF_long.\n\n\tInfo [UMFPACK_SIZE_OF_POINTER]:  the number of bytes in a void *\n\t    pointer.\n\n\tInfo [UMFPACK_SIZE_OF_ENTRY]:  the number of bytes in a numerical entry.\n\n\tInfo [UMFPACK_NDENSE_ROW]:  number of \"dense\" rows in A.  These rows are\n\t    ignored when the column pre-ordering is computed in COLAMD.  They\n\t    are also treated differently during numeric factorization.  If > 0,\n\t    then the matrix had to be re-analyzed by UMF_analyze, which does\n\t    not ignore these rows.\n\n\tInfo [UMFPACK_NEMPTY_ROW]:  number of \"empty\" rows in A, as determined\n\t    These are rows that either have no entries, or whose entries are\n\t    all in pivot columns of zero-Markowitz-cost pivots.\n\n\tInfo [UMFPACK_NDENSE_COL]:  number of \"dense\" columns in A.  COLAMD\n\t    orders these columns are ordered last in the factorization, but\n\t    before \"empty\" columns.\n\n\tInfo [UMFPACK_NEMPTY_COL]:  number of \"empty\" columns in A.  These are\n\t    columns that either have no entries, or whose entries are all in\n\t    pivot rows of zero-Markowitz-cost pivots.  These columns are\n\t    ordered last in the factorization, to the right of \"dense\" columns.\n\n\tInfo [UMFPACK_SYMBOLIC_DEFRAG]:  number of garbage collections\n\t    performed during ordering and symbolic pre-analysis.\n\n\tInfo [UMFPACK_SYMBOLIC_PEAK_MEMORY]:  the amount of memory (in Units)\n\t    required for umfpack_*_symbolic to complete.  This count includes\n\t    the size of the Symbolic object itself, which is also reported in\n\t    Info [UMFPACK_SYMBOLIC_SIZE].\n\n\tInfo [UMFPACK_SYMBOLIC_SIZE]: the final size of the Symbolic object (in\n\t    Units).  This is fairly small, roughly 2*n to 13*n integers,\n\t    depending on the matrix.\n\n\tInfo [UMFPACK_VARIABLE_INIT_ESTIMATE]: the Numeric object contains two\n\t    parts.  The first is fixed in size (O (n_row+n_col)).  The\n\t    second part holds the sparse LU factors and the contribution blocks\n\t    from factorized frontal matrices.  This part changes in size during\n\t    factorization.  Info [UMFPACK_VARIABLE_INIT_ESTIMATE] is the exact\n\t    size (in Units) required for this second variable-sized part in\n\t    order for the numerical factorization to start.\n\n\tInfo [UMFPACK_VARIABLE_PEAK_ESTIMATE]: the estimated peak size (in\n\t    Units) of the variable-sized part of the Numeric object.  This is\n\t    usually an upper bound, but that is not guaranteed.\n\n\tInfo [UMFPACK_VARIABLE_FINAL_ESTIMATE]: the estimated final size (in\n\t    Units) of the variable-sized part of the Numeric object.  This is\n\t    usually an upper bound, but that is not guaranteed.  It holds just\n\t    the sparse LU factors.\n\n\tInfo [UMFPACK_NUMERIC_SIZE_ESTIMATE]:  an estimate of the final size (in\n\t    Units) of the entire Numeric object (both fixed-size and variable-\n\t    sized parts), which holds the LU factorization (including the L, U,\n\t    P and Q matrices).\n\n\tInfo [UMFPACK_PEAK_MEMORY_ESTIMATE]:  an estimate of the total amount of\n\t    memory (in Units) required by umfpack_*_symbolic and\n\t    umfpack_*_numeric to perform both the symbolic and numeric\n\t    factorization.  This is the larger of the amount of memory needed\n\t    in umfpack_*_numeric itself, and the amount of memory needed in\n\t    umfpack_*_symbolic (Info [UMFPACK_SYMBOLIC_PEAK_MEMORY]).  The\n\t    count includes the size of both the Symbolic and Numeric objects\n\t    themselves.  It can be a very loose upper bound, particularly when\n\t    the symmetric or 2-by-2 strategies are used.\n\n\tInfo [UMFPACK_FLOPS_ESTIMATE]:  an estimate of the total floating-point\n\t    operations required to factorize the matrix.  This is a \"true\"\n\t    theoretical estimate of the number of flops that would be performed\n\t    by a flop-parsimonious sparse LU algorithm.  It assumes that no\n\t    extra flops are performed except for what is strictly required to\n\t    compute the LU factorization.  It ignores, for example, the flops\n            performed by umfpack_di_numeric to add contribution blocks of\n\t    frontal matrices together.  If L and U are the upper bound on the\n\t    pattern of the factors, then this flop count estimate can be\n\t    represented in MATLAB (for real matrices, not complex) as:\n\n\t\tLnz = full (sum (spones (L))) - 1 ;\t% nz in each col of L\n\t\tUnz = full (sum (spones (U')))' - 1 ;\t% nz in each row of U\n\t\tflops = 2*Lnz*Unz + sum (Lnz) ;\n\n\t    The actual \"true flop\" count found by umfpack_*_numeric will be\n\t    less than this estimate.\n\n\t    For the real version, only (+ - * /) are counted.  For the complex\n\t    version, the following counts are used:\n\n\t\toperation\tflops\n\t    \tc = 1/b\t\t6\n\t\tc = a*b\t\t6\n\t\tc -= a*b\t8\n\n\tInfo [UMFPACK_LNZ_ESTIMATE]:  an estimate of the number of nonzeros in\n\t    L, including the diagonal.  Since L is unit-diagonal, the diagonal\n\t    of L is not stored.  This estimate is a strict upper bound on the\n\t    actual nonzeros in L to be computed by umfpack_*_numeric.\n\n\tInfo [UMFPACK_UNZ_ESTIMATE]:  an estimate of the number of nonzeros in\n\t    U, including the diagonal.  This estimate is a strict upper bound on\n\t    the actual nonzeros in U to be computed by umfpack_*_numeric.\n\n\tInfo [UMFPACK_MAX_FRONT_SIZE_ESTIMATE]: estimate of the size of the\n\t    largest frontal matrix (# of entries), for arbitrary partial\n\t    pivoting during numerical factorization.\n\n\tInfo [UMFPACK_SYMBOLIC_TIME]:  The CPU time taken, in seconds.\n\n\tInfo [UMFPACK_SYMBOLIC_WALLTIME]:  The wallclock time taken, in seconds.\n\n\tInfo [UMFPACK_STRATEGY_USED]: The ordering strategy used:\n\t    UMFPACK_STRATEGY_SYMMETRIC, UMFPACK_STRATEGY_UNSYMMETRIC, or\n\t    UMFPACK_STRATEGY_2BY2.\n\n\tInfo [UMFPACK_ORDERING_USED]:  The ordering method used:\n\t    UMFPACK_ORDERING_COLAMD or UMFPACK_ORDERING_AMD.  It can be\n\t    UMFPACK_ORDERING_GIVEN for umfpack_*_qsymbolic.\n\n\tInfo [UMFPACK_QFIXED]: 1 if the column pre-ordering will be refined\n\t    during numerical factorization, 0 if not.\n\n\tInfo [UMFPACK_DIAG_PREFERED]: 1 if diagonal pivoting will be attempted,\n\t    0 if not.\n\n\tInfo [UMFPACK_COL_SINGLETONS]:  the matrix A is analyzed by first\n\t    eliminating all pivots with zero Markowitz cost.  This count is the\n\t    number of these pivots with exactly one nonzero in their pivot\n\t    column.\n\n\tInfo [UMFPACK_ROW_SINGLETONS]:  the number of zero-Markowitz-cost\n\t    pivots with exactly one nonzero in their pivot row.\n\n\tInfo [UMFPACK_PATTERN_SYMMETRY]: the symmetry of the pattern of S.\n\n\tInfo [UMFPACK_NZ_A_PLUS_AT]: the number of off-diagonal entries in S+S'.\n\n\tInfo [UMFPACK_NZDIAG]:  the number of entries on the diagonal of S.\n\n\tInfo [UMFPACK_N2]:  if S is square, and nempty_row = nempty_col, this\n\t    is equal to n_row - n1 - nempty_row.\n\n\tInfo [UMFPACK_S_SYMMETRIC]: 1 if S is square and its diagonal has been\n\t    preserved, 0 otherwise.\n\n\n\tInfo [UMFPACK_MAX_FRONT_NROWS_ESTIMATE]: estimate of the max number of\n\t    rows in any frontal matrix, for arbitrary partial pivoting.\n\n\tInfo [UMFPACK_MAX_FRONT_NCOLS_ESTIMATE]: estimate of the max number of\n\t    columns in any frontal matrix, for arbitrary partial pivoting.\n\n\t------------------------------------------------------------------------\n\tThe next four statistics are computed only if AMD is used:\n\t------------------------------------------------------------------------\n\n\tInfo [UMFPACK_SYMMETRIC_LUNZ]: The number of nonzeros in L and U,\n\t    assuming no pivoting during numerical factorization, and assuming a\n\t    zero-free diagonal of U.  Excludes the entries on the diagonal of\n\t    L.  If the matrix has a purely symmetric nonzero pattern, this is\n\t    often a lower bound on the nonzeros in the actual L and U computed\n\t    in the numerical factorization, for matrices that fit the criteria\n\t    for the \"symmetric\" strategy.\n\n\tInfo [UMFPACK_SYMMETRIC_FLOPS]: The floating-point operation count in\n\t    the numerical factorization phase, assuming no pivoting.  If the\n\t    pattern of the matrix is symmetric, this is normally a lower bound\n\t    on the floating-point operation count in the actual numerical\n\t    factorization, for matrices that fit the criteria for the symmetric\n\t    or 2-by-2 strategies\n\n\tInfo [UMFPACK_SYMMETRIC_NDENSE]: The number of \"dense\" rows/columns of\n\t    S+S' that were ignored during the AMD ordering.  These are placed\n\t    last in the output order.  If > 0, then the\n\t    Info [UMFPACK_SYMMETRIC_*] statistics, above are rough upper bounds.\n\n\tInfo [UMFPACK_SYMMETRIC_DMAX]: The maximum number of nonzeros in any\n\t    column of L, if no pivoting is performed during numerical\n\t    factorization.  Excludes the part of the LU factorization for\n\t    pivots with zero Markowitz cost.\n\n\t------------------------------------------------------------------------\n\tThe following statistics are computed only if the 2-by-2 strategy is\n\tused or attempted:\n\t------------------------------------------------------------------------\n\n\tInfo [UMFPACK_2BY2_NWEAK]: the number of small diagonal entries in S.\n\n\tInfo [UMFPACK_2BY2_UNMATCHED]: the number of small diagonal entries\n\t    in P2*S.\n\n\tInfo [UMFPACK_2BY2_PATTERN_SYMMETRY]: the symmetry of P2*S.\n\n\tInfo [UMFPACK_2BY2_NZ_PA_PLUS_AT]:  the number of off-diagonal entries\n\t    in (P2*S)+(P2*S)'.\n\n\tInfo [UMFPACK_2BY2_NZDIAG]:  the number of nonzero entries on the\n\t    diagonal of P2*S.\n\n\n\tAt the start of umfpack_*_symbolic, all of Info is set of -1, and then\n\tafter that only the above listed Info [...] entries are accessed.\n\tFuture versions might modify different parts of Info.\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_tictoc.h",
    "content": "/* ========================================================================== */\n/* === umfpack_tictoc ======================================================= */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nvoid umfpack_tic (double stats [2]) ;\n\nvoid umfpack_toc (double stats [2]) ;\n\n\n/*\nSyntax (for all versions: di, dl, zi, and zl):\n\n    #include \"umfpack.h\"\n    double stats [2] ;\n    umfpack_tic (stats) ;\n    ...\n    umfpack_toc (stats) ;\n\nPurpose:\n\n    umfpack_tic returns the CPU time and wall clock time used by the process.\n    The CPU time includes both \"user\" and \"system\" time (the latter is time\n    spent by the system on behalf of the process, and is thus charged to the\n    process).  umfpack_toc returns the CPU time and wall clock time since the\n    last call to umfpack_tic with the same stats array.\n\n    Typical usage:\n\n\tumfpack_tic (stats) ;\n\t... do some work ...\n\tumfpack_toc (stats) ;\n\n    then stats [1] contains the time in seconds used by the code between\n    umfpack_tic and umfpack_toc, and stats [0] contains the wall clock time\n    elapsed between the umfpack_tic and umfpack_toc.  These two routines act\n    just like tic and toc in MATLAB, except that the both process time and\n    wall clock time are returned.\n\n    This routine normally uses the sysconf and times routines in the POSIX\n    standard.  If -DNPOSIX is defined at compile time, then the ANSI C clock\n    routine is used instead, and only the CPU time is returned (stats [0]\n    is set to zero).\n\n    umfpack_tic and umfpack_toc are the routines used internally in UMFPACK\n    to time the symbolic analysis, numerical factorization, and the forward/\n    backward solve.\n\nArguments:\n\n    double stats [2]:\n\n\tstats [0]:  wall clock time, in seconds\n\tstats [1]:  CPU time, in seconds\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_timer.h",
    "content": "/* ========================================================================== */\n/* === umfpack_timer ======================================================== */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\ndouble umfpack_timer ( void ) ;\n\n/*\nSyntax (for all versions: di, dl, zi, and zl):\n\n    #include \"umfpack.h\"\n    double t ;\n    t = umfpack_timer ( ) ;\n\nPurpose:\n\n    Returns the CPU time used by the process.  Includes both \"user\" and \"system\"\n    time (the latter is time spent by the system on behalf of the process, and\n    is thus charged to the process).  It does not return the wall clock time.\n    See umfpack_tic and umfpack_toc (the file umfpack_tictoc.h) for the timer\n    used internally by UMFPACK.\n\n    This routine uses the Unix getrusage routine, if available.  It is less\n    subject to overflow than the ANSI C clock routine.  If getrusage is not\n    available, the portable ANSI C clock routine is used instead.\n    Unfortunately, clock ( ) overflows if the CPU time exceeds 2147 seconds\n    (about 36 minutes) when sizeof (clock_t) is 4 bytes.  If you have getrusage,\n    be sure to compile UMFPACK with the -DGETRUSAGE flag set; see umf_config.h\n    and the User Guide for details.  Even the getrusage routine can overlow.\n\nArguments:\n\n    None.\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_transpose.h",
    "content": "/* ========================================================================== */\n/* === umfpack_transpose ==================================================== */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_transpose\n(\n    int n_row,\n    int n_col,\n    const int Ap [ ],\n    const int Ai [ ],\n    const double Ax [ ],\n    const int P [ ],\n    const int Q [ ],\n    int Rp [ ],\n    int Ri [ ],\n    double Rx [ ]\n) ;\n\nUF_long umfpack_dl_transpose\n(\n    UF_long n_row,\n    UF_long n_col,\n    const UF_long Ap [ ],\n    const UF_long Ai [ ],\n    const double Ax [ ],\n    const UF_long P [ ],\n    const UF_long Q [ ],\n    UF_long Rp [ ],\n    UF_long Ri [ ],\n    double Rx [ ]\n) ;\n\nint umfpack_zi_transpose\n(\n    int n_row,\n    int n_col,\n    const int Ap [ ],\n    const int Ai [ ],\n    const double Ax [ ], const double Az [ ],\n    const int P [ ],\n    const int Q [ ],\n    int Rp [ ],\n    int Ri [ ],\n    double Rx [ ], double Rz [ ],\n    int do_conjugate\n) ;\n\nUF_long umfpack_zl_transpose\n(\n    UF_long n_row,\n    UF_long n_col,\n    const UF_long Ap [ ],\n    const UF_long Ai [ ],\n    const double Ax [ ], const double Az [ ],\n    const UF_long P [ ],\n    const UF_long Q [ ],\n    UF_long Rp [ ],\n    UF_long Ri [ ],\n    double Rx [ ], double Rz [ ],\n    UF_long do_conjugate\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    int n_row, n_col, status, *Ap, *Ai, *P, *Q, *Rp, *Ri ;\n    double *Ax, *Rx ;\n    status = umfpack_di_transpose (n_row, n_col, Ap, Ai, Ax, P, Q, Rp, Ri, Rx) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long n_row, n_col, status, *Ap, *Ai, *P, *Q, *Rp, *Ri ;\n    double *Ax, *Rx ;\n    status = umfpack_dl_transpose (n_row, n_col, Ap, Ai, Ax, P, Q, Rp, Ri, Rx) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    int n_row, n_col, status, *Ap, *Ai, *P, *Q, *Rp, *Ri, do_conjugate ;\n    double *Ax, *Az, *Rx, *Rz ;\n    status = umfpack_zi_transpose (n_row, n_col, Ap, Ai, Ax, Az, P, Q,\n\tRp, Ri, Rx, Rz, do_conjugate) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long n_row, n_col, status, *Ap, *Ai, *P, *Q, *Rp, *Ri, do_conjugate ;\n    double *Ax, *Az, *Rx, *Rz ;\n    status = umfpack_zl_transpose (n_row, n_col, Ap, Ai, Ax, Az, P, Q,\n\tRp, Ri, Rx, Rz, do_conjugate) ;\n\npacked complex Syntax:\n\n    Same as above, except Az are Rz are NULL.\n\nPurpose:\n\n    Transposes and optionally permutes a sparse matrix in row or column-form,\n    R = (PAQ)'.  In MATLAB notation, R = (A (P,Q))' or R = (A (P,Q)).' doing\n    either the linear algebraic transpose or the array transpose. Alternatively,\n    this routine can be viewed as converting A (P,Q) from column-form to\n    row-form, or visa versa (for the array transpose).  Empty rows and columns\n    may exist.  The matrix A may be singular and/or rectangular.\n\n    umfpack_*_transpose is useful if you want to factorize A' or A.' instead of\n    A.  Factorizing A' or A.' instead of A can be much better, particularly if\n    AA' is much sparser than A'A.  You can still solve Ax=b if you factorize\n    A' or A.', by solving with the sys argument UMFPACK_At or UMFPACK_Aat,\n    respectively, in umfpack_*_*solve.\n\nReturns:\n\n    UMFPACK_OK if successful.\n    UMFPACK_ERROR_out_of_memory if umfpack_*_transpose fails to allocate a\n\tsize-max (n_row,n_col) workspace.\n    UMFPACK_ERROR_argument_missing if Ai, Ap, Ri, and/or Rp are missing.\n    UMFPACK_ERROR_n_nonpositive if n_row <= 0 or n_col <= 0\n    UMFPACK_ERROR_invalid_permutation if P and/or Q are invalid.\n    UMFPACK_ERROR_invalid_matrix if Ap [n_col] < 0, if Ap [0] != 0,\n\tif Ap [j] > Ap [j+1] for any j in the range 0 to n_col-1,\n\tif any row index i is < 0 or >= n_row, or if the row indices\n\tin any column are not in ascending order.\n\nArguments:\n\n    Int n_row ;\t\tInput argument, not modified.\n    Int n_col ;\t\tInput argument, not modified.\n\n\tA is an n_row-by-n_col matrix.  Restriction: n_row > 0 and n_col > 0.\n\n    Int Ap [n_col+1] ;\tInput argument, not modified.\n\n\tThe column pointers of the column-oriented form of the matrix A.  See\n\tumfpack_*_symbolic for a description.  The number of entries in\n\tthe matrix is nz = Ap [n_col].  Ap [0] must be zero, Ap [n_col] must be\n\t=> 0, and Ap [j] <= Ap [j+1] and Ap [j] <= Ap [n_col] must be true for\n\tall j in the range 0 to n_col-1.  Empty columns are OK (that is, Ap [j]\n\tmay equal Ap [j+1] for any j in the range 0 to n_col-1).\n\n    Int Ai [nz] ;\tInput argument, not modified, of size nz = Ap [n_col].\n\n\tThe nonzero pattern (row indices) for column j is stored in\n\tAi [(Ap [j]) ... (Ap [j+1]-1)].  The row indices in a given column j\n\tmust be in ascending order, and no duplicate row indices may be present.\n\tRow indices must be in the range 0 to n_row-1 (the matrix is 0-based).\n\n    double Ax [nz] ;\tInput argument, not modified, of size nz = Ap [n_col].\n\t\t\tSize 2*nz if Az or Rz are NULL.\n    double Az [nz] ;\tInput argument, not modified, for complex versions.\n\n\tIf present, these are the numerical values of the sparse matrix A.\n\tThe nonzero pattern (row indices) for column j is stored in\n\tAi [(Ap [j]) ... (Ap [j+1]-1)], and the corresponding real numerical\n\tvalues are stored in Ax [(Ap [j]) ... (Ap [j+1]-1)].  The imaginary\n\tvalues are stored in Az [(Ap [j]) ... (Ap [j+1]-1)].  The values are\n\ttransposed only if Ax and Rx are present.\n\tThis is not an error conditions; you are able to transpose\n\tand permute just the pattern of a matrix.\n\n\tIf Az or Rz are NULL, then both real\n\tand imaginary parts are contained in Ax[0..2*nz-1], with Ax[2*k]\n\tand Ax[2*k+1] being the real and imaginary part of the kth entry.\n\n    Int P [n_row] ;\t\tInput argument, not modified.\n\n\tThe permutation vector P is defined as P [k] = i, where the original\n\trow i of A is the kth row of PAQ.  If you want to use the identity\n\tpermutation for P, simply pass (Int *) NULL for P.  This is not an error\n\tcondition.  P is a complete permutation of all the rows of A; this\n\troutine does not support the creation of a transposed submatrix of A\n\t(R = A (1:3,:)' where A has more than 3 rows, for example, cannot be\n\tdone; a future version might support this operation).\n\n    Int Q [n_col] ;\t\tInput argument, not modified.\n\n\tThe permutation vector Q is defined as Q [k] = j, where the original\n\tcolumn j of A is the kth column of PAQ.  If you want to use the identity\n\tpermutation for Q, simply pass (Int *) NULL for Q.  This is not an error\n\tcondition.  Q is a complete permutation of all the columns of A; this\n\troutine does not support the creation of a transposed submatrix of A.\n\n    Int Rp [n_row+1] ;\tOutput argument.\n\n\tThe column pointers of the matrix R = (A (P,Q))' or (A (P,Q)).', in the\n\tsame form as the column pointers Ap for the matrix A.\n\n    Int Ri [nz] ;\tOutput argument.\n\n\tThe row indices of the matrix R = (A (P,Q))' or (A (P,Q)).' , in the\n\tsame form as the row indices Ai for the matrix A.\n\n    double Rx [nz] ;\tOutput argument.\n\t\t\tSize 2*nz if Az or Rz are NULL.\n    double Rz [nz] ;\tOutput argument, imaginary part for complex versions.\n\n\tIf present, these are the numerical values of the sparse matrix R,\n\tin the same form as the values Ax and Az of the matrix A.\n\n\tIf Az or Rz are NULL, then both real\n\tand imaginary parts are contained in Rx[0..2*nz-1], with Rx[2*k]\n\tand Rx[2*k+1] being the real and imaginary part of the kth entry.\n\n    Int do_conjugate ;\tInput argument for complex versions only.\n\n\tIf true, and if Ax and Rx are present, then the linear\n\talgebraic transpose is computed (complex conjugate).  If false, the\n\tarray transpose is computed instead.\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_triplet_to_col.h",
    "content": "/* ========================================================================== */\n/* === umfpack_triplet_to_col =============================================== */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_triplet_to_col\n(\n    int n_row,\n    int n_col,\n    int nz,\n    const int Ti [ ],\n    const int Tj [ ],\n    const double Tx [ ],\n    int Ap [ ],\n    int Ai [ ],\n    double Ax [ ],\n    int Map [ ]\n) ;\n\nUF_long umfpack_dl_triplet_to_col\n(\n    UF_long n_row,\n    UF_long n_col,\n    UF_long nz,\n    const UF_long Ti [ ],\n    const UF_long Tj [ ],\n    const double Tx [ ],\n    UF_long Ap [ ],\n    UF_long Ai [ ],\n    double Ax [ ],\n    UF_long Map [ ]\n) ;\n\nint umfpack_zi_triplet_to_col\n(\n    int n_row,\n    int n_col,\n    int nz,\n    const int Ti [ ],\n    const int Tj [ ],\n    const double Tx [ ], const double Tz [ ],\n    int Ap [ ],\n    int Ai [ ],\n    double Ax [ ], double Az [ ],\n    int Map [ ]\n) ;\n\nUF_long umfpack_zl_triplet_to_col\n(\n    UF_long n_row,\n    UF_long n_col,\n    UF_long nz,\n    const UF_long Ti [ ],\n    const UF_long Tj [ ],\n    const double Tx [ ], const double Tz [ ],\n    UF_long Ap [ ],\n    UF_long Ai [ ],\n    double Ax [ ], double Az [ ],\n    UF_long Map [ ]\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    int n_row, n_col, nz, *Ti, *Tj, *Ap, *Ai, status, *Map ;\n    double *Tx, *Ax ;\n    status = umfpack_di_triplet_to_col (n_row, n_col, nz, Ti, Tj, Tx,\n\tAp, Ai, Ax, Map) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long n_row, n_col, nz, *Ti, *Tj, *Ap, *Ai, status, *Map ;\n    double *Tx, *Ax ;\n    status = umfpack_dl_triplet_to_col (n_row, n_col, nz, Ti, Tj, Tx,\n\tAp, Ai, Ax, Map) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    int n_row, n_col, nz, *Ti, *Tj, *Ap, *Ai, status, *Map ;\n    double *Tx, *Tz, *Ax, *Az ;\n    status = umfpack_zi_triplet_to_col (n_row, n_col, nz, Ti, Tj, Tx, Tz,\n\tAp, Ai, Ax, Az, Map) ;\n\nUF_long Syntax:\n\n    #include \"umfpack.h\"\n    UF_long n_row, n_col, nz, *Ti, *Tj, *Ap, *Ai, status, *Map ;\n    double *Tx, *Tz, *Ax, *Az ;\n    status = umfpack_zl_triplet_to_col (n_row, n_col, nz, Ti, Tj, Tx, Tz,\n\tAp, Ai, Ax, Az, Map) ;\n\npacked complex Syntax:\n\n    Same as above, except Tz and Az are NULL.\n\nPurpose:\n\n    Converts a sparse matrix from \"triplet\" form to compressed-column form.\n    Analogous to A = spconvert (Ti, Tj, Tx + Tz*1i) in MATLAB, except that\n    zero entries present in the triplet form are present in A.\n\n    The triplet form of a matrix is a very simple data structure for basic\n    sparse matrix operations.  For example, suppose you wish to factorize a\n    matrix A coming from a finite element method, in which A is a sum of\n    dense submatrices, A = E1 + E2 + E3 + ... .  The entries in each element\n    matrix Ei can be concatenated together in the three triplet arrays, and\n    any overlap between the elements will be correctly summed by\n    umfpack_*_triplet_to_col.\n\n    Transposing a matrix in triplet form is simple; just interchange the\n    use of Ti and Tj.  You can construct the complex conjugate transpose by\n    negating Tz, for the complex versions.\n\n    Permuting a matrix in triplet form is also simple.  If you want the matrix\n    PAQ, or A (P,Q) in MATLAB notation, where P [k] = i means that row i of\n    A is the kth row of PAQ and Q [k] = j means that column j of A is the kth\n    column of PAQ, then do the following.  First, create inverse permutations\n    Pinv and Qinv such that Pinv [i] = k if P [k] = i and Qinv [j] = k if\n    Q [k] = j.  Next, for the mth triplet (Ti [m], Tj [m], Tx [m], Tz [m]),\n    replace Ti [m] with Pinv [Ti [m]] and replace Tj [m] with Qinv [Tj [m]].\n\n    If you have a column-form matrix with duplicate entries or unsorted\n    columns, you can sort it and sum up the duplicates by first converting it\n    to triplet form with umfpack_*_col_to_triplet, and then converting it back\n    with umfpack_*_triplet_to_col.\n\n    Constructing a submatrix is also easy.  Just scan the triplets and remove\n    those entries outside the desired subset of 0...n_row-1 and 0...n_col-1,\n    and renumber the indices according to their position in the subset.\n\n    You can do all these operations on a column-form matrix by first\n    converting it to triplet form with umfpack_*_col_to_triplet, doing the\n    operation on the triplet form, and then converting it back with\n    umfpack_*_triplet_to_col.\n\n    The only operation not supported easily in the triplet form is the\n    multiplication of two sparse matrices (UMFPACK does not provide this\n    operation).\n\n    You can print the input triplet form with umfpack_*_report_triplet, and\n    the output matrix with umfpack_*_report_matrix.\n\n    The matrix may be singular (nz can be zero, and empty rows and/or columns\n    may exist).  It may also be rectangular and/or complex.\n\nReturns:\n\n    UMFPACK_OK if successful.\n    UMFPACK_ERROR_argument_missing if Ap, Ai, Ti, and/or Tj are missing.\n    UMFPACK_ERROR_n_nonpositive if n_row <= 0 or n_col <= 0.\n    UMFPACK_ERROR_invalid_matrix if nz < 0, or if for any k, Ti [k] and/or\n\tTj [k] are not in the range 0 to n_row-1 or 0 to n_col-1, respectively.\n    UMFPACK_ERROR_out_of_memory if unable to allocate sufficient workspace.\n\nArguments:\n\n    Int n_row ;\t\tInput argument, not modified.\n    Int n_col ;\t\tInput argument, not modified.\n\n\tA is an n_row-by-n_col matrix.  Restriction: n_row > 0 and n_col > 0.\n\tAll row and column indices in the triplet form must be in the range\n\t0 to n_row-1 and 0 to n_col-1, respectively.\n\n    Int nz ;\t\tInput argument, not modified.\n\n\tThe number of entries in the triplet form of the matrix.  Restriction:\n\tnz >= 0.\n\n    Int Ti [nz] ;\tInput argument, not modified.\n    Int Tj [nz] ;\tInput argument, not modified.\n    double Tx [nz] ;\tInput argument, not modified.\n\t\t\tSize 2*nz if Tz or Az are NULL.\n    double Tz [nz] ;\tInput argument, not modified, for complex versions.\n\n\tTi, Tj, Tx, and Tz hold the \"triplet\" form of a sparse matrix.  The kth\n\tnonzero entry is in row i = Ti [k], column j = Tj [k], and the real part\n\tof a_ij is Tx [k].  The imaginary part of a_ij is Tz [k], for complex\n\tversions.  The row and column indices i and j must be in the range 0 to\n\tn_row-1 and 0 to n_col-1, respectively.  Duplicate entries may be\n\tpresent; they are summed in the output matrix.  This is not an error\n\tcondition.  The \"triplets\" may be in any order.  Tx, Tz, Ax, and Az\n\tare optional.  Ax is computed only if both Ax and Tx are present\n\t(not (double *) NULL).  This is not error condition; the routine can\n\tcreate just the pattern of the output matrix from the pattern of the\n\ttriplets.\n\n\tIf Az or Tz are NULL, then both real\n\tand imaginary parts are contained in Tx[0..2*nz-1], with Tx[2*k]\n\tand Tx[2*k+1] being the real and imaginary part of the kth entry.\n\n    Int Ap [n_col+1] ;\tOutput argument.\n\n\tAp is an integer array of size n_col+1 on input.  On output, Ap holds\n\tthe \"pointers\" for the column form of the sparse matrix A.  Column j of\n\tthe matrix A is held in Ai [(Ap [j]) ... (Ap [j+1]-1)].  The first\n\tentry, Ap [0], is zero, and Ap [j] <= Ap [j+1] holds for all j in the\n\trange 0 to n_col-1.  The value nz2 = Ap [n_col] is thus the total\n\tnumber of entries in the pattern of the matrix A.  Equivalently, the\n\tnumber of duplicate triplets is nz - Ap [n_col].\n\n    Int Ai [nz] ;\tOutput argument.\n\n\tAi is an integer array of size nz on input.  Note that only the first\n\tAp [n_col] entries are used.\n\n\tThe nonzero pattern (row indices) for column j is stored in\n\tAi [(Ap [j]) ... (Ap [j+1]-1)].  The row indices in a given column j\n\tare in ascending order, and no duplicate row indices are present.\n\tRow indices are in the range 0 to n_col-1 (the matrix is 0-based).\n\n    double Ax [nz] ;\tOutput argument.  Size 2*nz if Tz or Az are NULL.\n    double Az [nz] ;\tOutput argument for complex versions.\n\n\tAx and Az (for the complex versions) are double arrays of size nz on\n\tinput.  Note that only the first Ap [n_col] entries are used\n\tin both arrays.\n\n\tAx is optional; if Tx and/or Ax are not present (a (double *) NULL\n\tpointer), then Ax is not computed.  If present, Ax holds the\n\tnumerical values of the the real part of the sparse matrix A and Az\n\tholds the imaginary parts.  The nonzero pattern (row indices) for\n\tcolumn j is stored in Ai [(Ap [j]) ... (Ap [j+1]-1)], and the\n\tcorresponding numerical values are stored in\n\tAx [(Ap [j]) ... (Ap [j+1]-1)].  The imaginary parts are stored in\n\tAz [(Ap [j]) ... (Ap [j+1]-1)], for the complex versions.\n\n\tIf Az or Tz are NULL, then both real\n\tand imaginary parts are returned in Ax[0..2*nz2-1], with Ax[2*k]\n\tand Ax[2*k+1] being the real and imaginary part of the kth entry.\n\n    int Map [nz] ;\tOptional output argument.\n\n\tIf Map is present (a non-NULL pointer to an Int array of size nz), then\n\ton output it holds the position of the triplets in the column-form\n\tmatrix.  That is, suppose p = Map [k], and the k-th triplet is i=Ti[k],\n\tj=Tj[k], and aij=Tx[k].  Then i=Ai[p], and aij will have been summed\n\tinto Ax[p] (or simply aij=Ax[p] if there were no duplicate entries also\n\tin row i and column j).  Also, Ap[j] <= p < Ap[j+1].  The Map array is\n\tnot computed if it is (Int *) NULL.  The Map array is useful for\n\tconverting a subsequent triplet form matrix with the same pattern as the\n\tfirst one, without calling this routine.  If Ti and Tj do not change,\n\tthen Ap, and Ai can be reused from the prior call to\n\tumfpack_*_triplet_to_col.  You only need to recompute Ax (and Az for the\n\tsplit complex version).  This code excerpt properly sums up all\n\tduplicate values (for the real version):\n\n\t    for (p = 0 ; p < Ap [n_col] ; p++) Ax [p] = 0 ;\n\t    for (k = 0 ; k < nz ; k++) Ax [Map [k]] += Tx [k] ;\n\n\tThis feature is useful (along with the reuse of the Symbolic object) if\n\tyou need to factorize a sequence of triplet matrices with identical\n\tnonzero pattern (the order of the triplets in the Ti,Tj,Tx arrays must\n\talso remain unchanged).  It is faster than calling this routine for\n\teach matrix, and requires no workspace.\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/UMFPACK/umfpack_wsolve.h",
    "content": "/* ========================================================================== */\n/* === umfpack_wsolve ======================================================= */\n/* ========================================================================== */\n\n/* -------------------------------------------------------------------------- */\n/* UMFPACK Copyright (c) Timothy A. Davis, CISE,                              */\n/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */\n/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */\n/* -------------------------------------------------------------------------- */\n\nint umfpack_di_wsolve\n(\n    int sys,\n    const int Ap [ ],\n    const int Ai [ ],\n    const double Ax [ ],\n    double X [ ],\n    const double B [ ],\n    void *Numeric,\n    const double Control [UMFPACK_CONTROL],\n    double Info [UMFPACK_INFO],\n    int Wi [ ],\n    double W [ ]\n) ;\n\nUF_long umfpack_dl_wsolve\n(\n    UF_long sys,\n    const UF_long Ap [ ],\n    const UF_long Ai [ ],\n    const double Ax [ ],\n    double X [ ],\n    const double B [ ],\n    void *Numeric,\n    const double Control [UMFPACK_CONTROL],\n    double Info [UMFPACK_INFO],\n    UF_long Wi [ ],\n    double W [ ]\n) ;\n\nint umfpack_zi_wsolve\n(\n    int sys,\n    const int Ap [ ],\n    const int Ai [ ],\n    const double Ax [ ], const double Az [ ],\n    double Xx [ ],\t double Xz [ ],\n    const double Bx [ ], const double Bz [ ],\n    void *Numeric,\n    const double Control [UMFPACK_CONTROL],\n    double Info [UMFPACK_INFO],\n    int Wi [ ],\n    double W [ ]\n) ;\n\nUF_long umfpack_zl_wsolve\n(\n    UF_long sys,\n    const UF_long Ap [ ],\n    const UF_long Ai [ ],\n    const double Ax [ ], const double Az [ ],\n    double Xx [ ],\t double Xz [ ],\n    const double Bx [ ], const double Bz [ ],\n    void *Numeric,\n    const double Control [UMFPACK_CONTROL],\n    double Info [UMFPACK_INFO],\n    UF_long Wi [ ],\n    double W [ ]\n) ;\n\n/*\ndouble int Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    int status, *Ap, *Ai, *Wi, sys ;\n    double *B, *X, *Ax, *W, Info [UMFPACK_INFO], Control [UMFPACK_CONTROL] ;\n    status = umfpack_di_wsolve (sys, Ap, Ai, Ax, X, B, Numeric,\n\tControl, Info, Wi, W) ;\n\ndouble UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    UF_long status, *Ap, *Ai, *Wi, sys ;\n    double *B, *X, *Ax, *W, Info [UMFPACK_INFO], Control [UMFPACK_CONTROL] ;\n    status = umfpack_dl_wsolve (sys, Ap, Ai, Ax, X, B, Numeric,\n\tControl, Info, Wi, W) ;\n\ncomplex int Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    int status, *Ap, *Ai, *Wi, sys ;\n    double *Bx, *Bz, *Xx, *Xz, *Ax, *Az, *W,\n\tInfo [UMFPACK_INFO], Control [UMFPACK_CONTROL] ;\n    status = umfpack_zi_wsolve (sys, Ap, Ai, Ax, Az, Xx, Xz, Bx, Bz, Numeric,\n\tControl, Info, Wi, W) ;\n\ncomplex UF_long Syntax:\n\n    #include \"umfpack.h\"\n    void *Numeric ;\n    UF_long status, *Ap, *Ai, *Wi, sys ;\n    double *Bx, *Bz, *Xx, *Xz, *Ax, *Az, *W,\n\tInfo [UMFPACK_INFO], Control [UMFPACK_CONTROL] ;\n    status = umfpack_zl_wsolve (sys, Ap, Ai, Ax, Az, Xx, Xz, Bx, Bz, Numeric,\n\tControl, Info, Wi, W) ;\n\npacked complex Syntax:\n\n    Same as above, except Az, Xz, and Bz are NULL.\n\nPurpose:\n\n    Given LU factors computed by umfpack_*_numeric (PAQ=LU) and the\n    right-hand-side, B, solve a linear system for the solution X.  Iterative\n    refinement is optionally performed.  This routine is identical to\n    umfpack_*_solve, except that it does not dynamically allocate any workspace.\n    When you have many linear systems to solve, this routine is faster than\n    umfpack_*_solve, since the workspace (Wi, W) needs to be allocated only\n    once, prior to calling umfpack_*_wsolve.\n\nReturns:\n\n    The status code is returned.  See Info [UMFPACK_STATUS], below.\n\nArguments:\n\n    Int sys ;\t\tInput argument, not modified.\n    Int Ap [n+1] ;\tInput argument, not modified.\n    Int Ai [nz] ;\tInput argument, not modified.\n    double Ax [nz] ;\tInput argument, not modified.\n\t\t\tSize 2*nz in packed complex case.\n    double X [n] ;\tOutput argument.\n    double B [n] ;\tInput argument, not modified.\n    void *Numeric ;\tInput argument, not modified.\n    double Control [UMFPACK_CONTROL] ;\tInput argument, not modified.\n    double Info [UMFPACK_INFO] ;\tOutput argument.\n\n    for complex versions:\n    double Az [nz] ;\tInput argument, not modified, imaginary part\n    double Xx [n] ;\tOutput argument, real part.\n\t\t\tSize 2*n in packed complex case.\n    double Xz [n] ;\tOutput argument, imaginary part\n    double Bx [n] ;\tInput argument, not modified, real part.\n\t\t\tSize 2*n in packed complex case.\n    double Bz [n] ;\tInput argument, not modified, imaginary part\n\n\tThe above arguments are identical to umfpack_*_solve, except that the\n\terror code UMFPACK_ERROR_out_of_memory will not be returned in\n\tInfo [UMFPACK_STATUS], since umfpack_*_wsolve does not allocate any\n\tmemory.\n\n    Int Wi [n] ;\t\tWorkspace.\n    double W [c*n] ;\t\tWorkspace, where c is defined below.\n\n\tThe Wi and W arguments are workspace used by umfpack_*_wsolve.  They\n\tneed not be initialized on input, and their contents are undefined on\n\toutput.  The size of W depends on whether or not iterative refinement is\n\tused, and which version (real or complex) is called.  Iterative\n\trefinement is performed if Ax=b, A'x=b, or A.'x=b is being solved,\n\tControl [UMFPACK_IRSTEP] > 0, and A is nonsingular.  The size of W is\n\tgiven below:\n\n\t\t\t\tno iter.\twith iter.\n\t\t\t\trefinement\trefinement\n\tumfpack_di_wsolve\tn\t\t5*n\n\tumfpack_dl_wsolve\tn\t\t5*n\n\tumfpack_zi_wsolve\t4*n\t\t10*n\n\tumfpack_zl_wsolve\t4*n\t\t10*n\n*/\n"
  },
  {
    "path": "cpu/lib/umfpack/include/amd.h",
    "content": "/* ========================================================================= */\n/* === AMD:  approximate minimum degree ordering =========================== */\n/* ========================================================================= */\n\n/* ------------------------------------------------------------------------- */\n/* AMD Version 2.2, Copyright (c) 2007 by Timothy A. Davis,                  */\n/* Patrick R. Amestoy, and Iain S. Duff.  See ../README.txt for License.     */\n/* email: davis at cise.ufl.edu    CISE Department, Univ. of Florida.        */\n/* web: http://www.cise.ufl.edu/research/sparse/amd                          */\n/* ------------------------------------------------------------------------- */\n\n/* AMD finds a symmetric ordering P of a matrix A so that the Cholesky\n * factorization of P*A*P' has fewer nonzeros and takes less work than the\n * Cholesky factorization of A.  If A is not symmetric, then it performs its\n * ordering on the matrix A+A'.  Two sets of user-callable routines are\n * provided, one for int integers and the other for UF_long integers.\n *\n * The method is based on the approximate minimum degree algorithm, discussed\n * in Amestoy, Davis, and Duff, \"An approximate degree ordering algorithm\",\n * SIAM Journal of Matrix Analysis and Applications, vol. 17, no. 4, pp.\n * 886-905, 1996.  This package can perform both the AMD ordering (with\n * aggressive absorption), and the AMDBAR ordering (without aggressive\n * absorption) discussed in the above paper.  This package differs from the\n * Fortran codes discussed in the paper:\n *\n *\t(1) it can ignore \"dense\" rows and columns, leading to faster run times\n *\t(2) it computes the ordering of A+A' if A is not symmetric\n *\t(3) it is followed by a depth-first post-ordering of the assembly tree\n *\t    (or supernodal elimination tree)\n *\n * For historical reasons, the Fortran versions, amd.f and amdbar.f, have\n * been left (nearly) unchanged.  They compute the identical ordering as\n * described in the above paper.\n */\n\n#ifndef AMD_H\n#define AMD_H\n\n/* make it easy for C++ programs to include AMD */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n/* get the definition of size_t: */\n#include <stddef.h>\n\n/* define UF_long */\n#include \"UFconfig.h\"\n\nint amd_order\t\t    /* returns AMD_OK, AMD_OK_BUT_JUMBLED,\n\t\t\t     * AMD_INVALID, or AMD_OUT_OF_MEMORY */\n(\n    int n,\t\t    /* A is n-by-n.  n must be >= 0. */\n    const int Ap [ ],\t    /* column pointers for A, of size n+1 */\n    const int Ai [ ],\t    /* row indices of A, of size nz = Ap [n] */\n    int P [ ],\t\t    /* output permutation, of size n */\n    double Control [ ],\t    /* input Control settings, of size AMD_CONTROL */\n    double Info [ ]\t    /* output Info statistics, of size AMD_INFO */\n) ;\n\nUF_long amd_l_order\t    /* see above for description of arguments */\n(\n    UF_long n,\n    const UF_long Ap [ ],\n    const UF_long Ai [ ],\n    UF_long P [ ],\n    double Control [ ],\n    double Info [ ]\n) ;\n\n/* Input arguments (not modified):\n *\n *\tn: the matrix A is n-by-n.\n *\tAp: an int/UF_long array of size n+1, containing column pointers of A.\n *\tAi: an int/UF_long array of size nz, containing the row indices of A,\n *\t    where nz = Ap [n].\n *\tControl:  a double array of size AMD_CONTROL, containing control\n *\t    parameters.  Defaults are used if Control is NULL.\n *\n * Output arguments (not defined on input):\n *\n *\tP: an int/UF_long array of size n, containing the output permutation. If\n *\t    row i is the kth pivot row, then P [k] = i.  In MATLAB notation,\n *\t    the reordered matrix is A (P,P).\n *\tInfo: a double array of size AMD_INFO, containing statistical\n *\t    information.  Ignored if Info is NULL.\n *\n * On input, the matrix A is stored in column-oriented form.  The row indices\n * of nonzero entries in column j are stored in Ai [Ap [j] ... Ap [j+1]-1].\n *\n * If the row indices appear in ascending order in each column, and there\n * are no duplicate entries, then amd_order is slightly more efficient in\n * terms of time and memory usage.  If this condition does not hold, a copy\n * of the matrix is created (where these conditions do hold), and the copy is\n * ordered.  This feature is new to v2.0 (v1.2 and earlier required this\n * condition to hold for the input matrix).\n * \n * Row indices must be in the range 0 to\n * n-1.  Ap [0] must be zero, and thus nz = Ap [n] is the number of nonzeros\n * in A.  The array Ap is of size n+1, and the array Ai is of size nz = Ap [n].\n * The matrix does not need to be symmetric, and the diagonal does not need to\n * be present (if diagonal entries are present, they are ignored except for\n * the output statistic Info [AMD_NZDIAG]).  The arrays Ai and Ap are not\n * modified.  This form of the Ap and Ai arrays to represent the nonzero\n * pattern of the matrix A is the same as that used internally by MATLAB.\n * If you wish to use a more flexible input structure, please see the\n * umfpack_*_triplet_to_col routines in the UMFPACK package, at\n * http://www.cise.ufl.edu/research/sparse/umfpack.\n *\n * Restrictions:  n >= 0.  Ap [0] = 0.  Ap [j] <= Ap [j+1] for all j in the\n *\trange 0 to n-1.  nz = Ap [n] >= 0.  Ai [0..nz-1] must be in the range 0\n *\tto n-1.  Finally, Ai, Ap, and P must not be NULL.  If any of these\n *\trestrictions are not met, AMD returns AMD_INVALID.\n *\n * AMD returns:\n *\n *\tAMD_OK if the matrix is valid and sufficient memory can be allocated to\n *\t    perform the ordering.\n *\n *\tAMD_OUT_OF_MEMORY if not enough memory can be allocated.\n *\n *\tAMD_INVALID if the input arguments n, Ap, Ai are invalid, or if P is\n *\t    NULL.\n *\n *\tAMD_OK_BUT_JUMBLED if the matrix had unsorted columns, and/or duplicate\n *\t    entries, but was otherwise valid.\n *\n * The AMD routine first forms the pattern of the matrix A+A', and then\n * computes a fill-reducing ordering, P.  If P [k] = i, then row/column i of\n * the original is the kth pivotal row.  In MATLAB notation, the permuted\n * matrix is A (P,P), except that 0-based indexing is used instead of the\n * 1-based indexing in MATLAB.\n *\n * The Control array is used to set various parameters for AMD.  If a NULL\n * pointer is passed, default values are used.  The Control array is not\n * modified.\n *\n *\tControl [AMD_DENSE]:  controls the threshold for \"dense\" rows/columns.\n *\t    A dense row/column in A+A' can cause AMD to spend a lot of time in\n *\t    ordering the matrix.  If Control [AMD_DENSE] >= 0, rows/columns\n *\t    with more than Control [AMD_DENSE] * sqrt (n) entries are ignored\n *\t    during the ordering, and placed last in the output order.  The\n *\t    default value of Control [AMD_DENSE] is 10.  If negative, no\n *\t    rows/columns are treated as \"dense\".  Rows/columns with 16 or\n *\t    fewer off-diagonal entries are never considered \"dense\".\n *\n *\tControl [AMD_AGGRESSIVE]: controls whether or not to use aggressive\n *\t    absorption, in which a prior element is absorbed into the current\n *\t    element if is a subset of the current element, even if it is not\n *\t    adjacent to the current pivot element (refer to Amestoy, Davis,\n *\t    & Duff, 1996, for more details).  The default value is nonzero,\n *\t    which means to perform aggressive absorption.  This nearly always\n *\t    leads to a better ordering (because the approximate degrees are\n *\t    more accurate) and a lower execution time.  There are cases where\n *\t    it can lead to a slightly worse ordering, however.  To turn it off,\n *\t    set Control [AMD_AGGRESSIVE] to 0.\n *\n *\tControl [2..4] are not used in the current version, but may be used in\n *\t    future versions.\n *\n * The Info array provides statistics about the ordering on output.  If it is\n * not present, the statistics are not returned.  This is not an error\n * condition.\n * \n *\tInfo [AMD_STATUS]:  the return value of AMD, either AMD_OK,\n *\t    AMD_OK_BUT_JUMBLED, AMD_OUT_OF_MEMORY, or AMD_INVALID.\n *\n *\tInfo [AMD_N]: n, the size of the input matrix\n *\n *\tInfo [AMD_NZ]: the number of nonzeros in A, nz = Ap [n]\n *\n *\tInfo [AMD_SYMMETRY]:  the symmetry of the matrix A.  It is the number\n *\t    of \"matched\" off-diagonal entries divided by the total number of\n *\t    off-diagonal entries.  An entry A(i,j) is matched if A(j,i) is also\n *\t    an entry, for any pair (i,j) for which i != j.  In MATLAB notation,\n *\t\tS = spones (A) ;\n *\t\tB = tril (S, -1) + triu (S, 1) ;\n *\t\tsymmetry = nnz (B & B') / nnz (B) ;\n *\n *\tInfo [AMD_NZDIAG]: the number of entries on the diagonal of A.\n *\n *\tInfo [AMD_NZ_A_PLUS_AT]:  the number of nonzeros in A+A', excluding the\n *\t    diagonal.  If A is perfectly symmetric (Info [AMD_SYMMETRY] = 1)\n *\t    with a fully nonzero diagonal, then Info [AMD_NZ_A_PLUS_AT] = nz-n\n *\t    (the smallest possible value).  If A is perfectly unsymmetric\n *\t    (Info [AMD_SYMMETRY] = 0, for an upper triangular matrix, for\n *\t    example) with no diagonal, then Info [AMD_NZ_A_PLUS_AT] = 2*nz\n *\t    (the largest possible value).\n *\n *\tInfo [AMD_NDENSE]: the number of \"dense\" rows/columns of A+A' that were\n *\t    removed from A prior to ordering.  These are placed last in the\n *\t    output order P.\n *\n *\tInfo [AMD_MEMORY]: the amount of memory used by AMD, in bytes.  In the\n *\t    current version, this is 1.2 * Info  [AMD_NZ_A_PLUS_AT] + 9*n\n *\t    times the size of an integer.  This is at most 2.4nz + 9n.  This\n *\t    excludes the size of the input arguments Ai, Ap, and P, which have\n *\t    a total size of nz + 2*n + 1 integers.\n *\n *\tInfo [AMD_NCMPA]: the number of garbage collections performed.\n *\n *\tInfo [AMD_LNZ]: the number of nonzeros in L (excluding the diagonal).\n *\t    This is a slight upper bound because mass elimination is combined\n *\t    with the approximate degree update.  It is a rough upper bound if\n *\t    there are many \"dense\" rows/columns.  The rest of the statistics,\n *\t    below, are also slight or rough upper bounds, for the same reasons.\n *\t    The post-ordering of the assembly tree might also not exactly\n *\t    correspond to a true elimination tree postordering.\n *\n *\tInfo [AMD_NDIV]: the number of divide operations for a subsequent LDL'\n *\t    or LU factorization of the permuted matrix A (P,P).\n *\n *\tInfo [AMD_NMULTSUBS_LDL]:  the number of multiply-subtract pairs for a\n *\t    subsequent LDL' factorization of A (P,P).\n *\n *\tInfo [AMD_NMULTSUBS_LU]:  the number of multiply-subtract pairs for a\n *\t    subsequent LU factorization of A (P,P), assuming that no numerical\n *\t    pivoting is required.\n *\n *\tInfo [AMD_DMAX]:  the maximum number of nonzeros in any column of L,\n *\t    including the diagonal.\n *\n *\tInfo [14..19] are not used in the current version, but may be used in\n *\t    future versions.\n */    \n\n/* ------------------------------------------------------------------------- */\n/* direct interface to AMD */\n/* ------------------------------------------------------------------------- */\n\n/* amd_2 is the primary AMD ordering routine.  It is not meant to be\n * user-callable because of its restrictive inputs and because it destroys\n * the user's input matrix.  It does not check its inputs for errors, either.\n * However, if you can work with these restrictions it can be faster than\n * amd_order and use less memory (assuming that you can create your own copy\n * of the matrix for AMD to destroy).  Refer to AMD/Source/amd_2.c for a\n * description of each parameter. */\n\nvoid amd_2\n(\n    int n,\n    int Pe [ ],\n    int Iw [ ],\n    int Len [ ],\n    int iwlen,\n    int pfree,\n    int Nv [ ],\n    int Next [ ], \n    int Last [ ],\n    int Head [ ],\n    int Elen [ ],\n    int Degree [ ],\n    int W [ ],\n    double Control [ ],\n    double Info [ ]\n) ;\n\nvoid amd_l2\n(\n    UF_long n,\n    UF_long Pe [ ],\n    UF_long Iw [ ],\n    UF_long Len [ ],\n    UF_long iwlen,\n    UF_long pfree,\n    UF_long Nv [ ],\n    UF_long Next [ ], \n    UF_long Last [ ],\n    UF_long Head [ ],\n    UF_long Elen [ ],\n    UF_long Degree [ ],\n    UF_long W [ ],\n    double Control [ ],\n    double Info [ ]\n) ;\n\n/* ------------------------------------------------------------------------- */\n/* amd_valid */\n/* ------------------------------------------------------------------------- */\n\n/* Returns AMD_OK or AMD_OK_BUT_JUMBLED if the matrix is valid as input to\n * amd_order; the latter is returned if the matrix has unsorted and/or\n * duplicate row indices in one or more columns.  Returns AMD_INVALID if the\n * matrix cannot be passed to amd_order.  For amd_order, the matrix must also\n * be square.  The first two arguments are the number of rows and the number\n * of columns of the matrix.  For its use in AMD, these must both equal n.\n *\n * NOTE: this routine returned TRUE/FALSE in v1.2 and earlier.\n */\n\nint amd_valid\n(\n    int n_row,\t\t    /* # of rows */\n    int n_col,\t\t    /* # of columns */\n    const int Ap [ ],\t    /* column pointers, of size n_col+1 */\n    const int Ai [ ]\t    /* row indices, of size Ap [n_col] */\n) ;\n\nUF_long amd_l_valid\n(\n    UF_long n_row,\n    UF_long n_col,\n    const UF_long Ap [ ],\n    const UF_long Ai [ ]\n) ;\n\n/* ------------------------------------------------------------------------- */\n/* AMD memory manager and printf routines */\n/* ------------------------------------------------------------------------- */\n\n/* The user can redefine these to change the malloc, free, and printf routines\n * that AMD uses. */\n\n#ifndef EXTERN\n#define EXTERN extern\n#endif\n\nEXTERN void *(*amd_malloc) (size_t) ;\t\t    /* pointer to malloc */\nEXTERN void (*amd_free) (void *) ;\t\t    /* pointer to free */\nEXTERN void *(*amd_realloc) (void *, size_t) ;\t    /* pointer to realloc */\nEXTERN void *(*amd_calloc) (size_t, size_t) ;\t    /* pointer to calloc */\nEXTERN int (*amd_printf) (const char *, ...) ;\t    /* pointer to printf */\n\n/* ------------------------------------------------------------------------- */\n/* AMD Control and Info arrays */\n/* ------------------------------------------------------------------------- */\n\n/* amd_defaults:  sets the default control settings */\nvoid amd_defaults   (double Control [ ]) ;\nvoid amd_l_defaults (double Control [ ]) ;\n\n/* amd_control: prints the control settings */\nvoid amd_control    (double Control [ ]) ;\nvoid amd_l_control  (double Control [ ]) ;\n\n/* amd_info: prints the statistics */\nvoid amd_info       (double Info [ ]) ;\nvoid amd_l_info     (double Info [ ]) ;\n\n#define AMD_CONTROL 5\t    /* size of Control array */\n#define AMD_INFO 20\t    /* size of Info array */\n\n/* contents of Control */\n#define AMD_DENSE 0\t    /* \"dense\" if degree > Control [0] * sqrt (n) */\n#define AMD_AGGRESSIVE 1    /* do aggressive absorption if Control [1] != 0 */\n\n/* default Control settings */\n#define AMD_DEFAULT_DENSE 10.0\t    /* default \"dense\" degree 10*sqrt(n) */\n#define AMD_DEFAULT_AGGRESSIVE 1    /* do aggressive absorption by default */\n\n/* contents of Info */\n#define AMD_STATUS 0\t    /* return value of amd_order and amd_l_order */\n#define AMD_N 1\t\t    /* A is n-by-n */\n#define AMD_NZ 2\t    /* number of nonzeros in A */ \n#define AMD_SYMMETRY 3\t    /* symmetry of pattern (1 is sym., 0 is unsym.) */\n#define AMD_NZDIAG 4\t    /* # of entries on diagonal */\n#define AMD_NZ_A_PLUS_AT 5  /* nz in A+A' */\n#define AMD_NDENSE 6\t    /* number of \"dense\" rows/columns in A */\n#define AMD_MEMORY 7\t    /* amount of memory used by AMD */\n#define AMD_NCMPA 8\t    /* number of garbage collections in AMD */\n#define AMD_LNZ 9\t    /* approx. nz in L, excluding the diagonal */\n#define AMD_NDIV 10\t    /* number of fl. point divides for LU and LDL' */\n#define AMD_NMULTSUBS_LDL 11 /* number of fl. point (*,-) pairs for LDL' */\n#define AMD_NMULTSUBS_LU 12  /* number of fl. point (*,-) pairs for LU */\n#define AMD_DMAX 13\t     /* max nz. in any column of L, incl. diagonal */\n\n/* ------------------------------------------------------------------------- */\n/* return values of AMD */\n/* ------------------------------------------------------------------------- */\n\n#define AMD_OK 0\t\t/* success */\n#define AMD_OUT_OF_MEMORY -1\t/* malloc failed, or problem too large */\n#define AMD_INVALID -2\t\t/* input arguments are not valid */\n#define AMD_OK_BUT_JUMBLED 1\t/* input matrix is OK for amd_order, but\n    * columns were not sorted, and/or duplicate entries were present.  AMD had\n    * to do extra work before ordering the matrix.  This is a warning, not an\n    * error.  */\n\n/* ========================================================================== */\n/* === AMD version ========================================================== */\n/* ========================================================================== */\n\n/* AMD Version 1.2 and later include the following definitions.\n * As an example, to test if the version you are using is 1.2 or later:\n *\n * #ifdef AMD_VERSION\n *\tif (AMD_VERSION >= AMD_VERSION_CODE (1,2)) ...\n * #endif\n *\n * This also works during compile-time:\n *\n *\t#if defined(AMD_VERSION) && (AMD_VERSION >= AMD_VERSION_CODE (1,2))\n *\t    printf (\"This is version 1.2 or later\\n\") ;\n *\t#else\n *\t    printf (\"This is an early version\\n\") ;\n *\t#endif\n *\n * Versions 1.1 and earlier of AMD do not include a #define'd version number.\n */\n\n#define AMD_DATE \"May 31, 2007\"\n#define AMD_VERSION_CODE(main,sub) ((main) * 1000 + (sub))\n#define AMD_MAIN_VERSION 2\n#define AMD_SUB_VERSION 2\n#define AMD_SUBSUB_VERSION 0\n#define AMD_VERSION AMD_VERSION_CODE(AMD_MAIN_VERSION,AMD_SUB_VERSION)\n\n#ifdef __cplusplus\n}\n#endif\n\n#endif\n"
  },
  {
    "path": "cpu/lib/umfpack/include/amd_internal.h",
    "content": "/* ========================================================================= */\n/* === amd_internal.h ====================================================== */\n/* ========================================================================= */\n\n/* ------------------------------------------------------------------------- */\n/* AMD, Copyright (c) Timothy A. Davis,\t\t\t\t\t     */\n/* Patrick R. Amestoy, and Iain S. Duff.  See ../README.txt for License.     */\n/* email: davis at cise.ufl.edu    CISE Department, Univ. of Florida.        */\n/* web: http://www.cise.ufl.edu/research/sparse/amd                          */\n/* ------------------------------------------------------------------------- */\n\n/* This file is for internal use in AMD itself, and does not normally need to\n * be included in user code (it is included in UMFPACK, however).   All others\n * should use amd.h instead.\n *\n * The following compile-time definitions affect how AMD is compiled.\n *\n *\t-DNPRINT\n *\n *\t    Disable all printing.  stdio.h will not be included.  Printing can\n *\t    be re-enabled at run-time by setting the global pointer amd_printf\n *\t    to printf (or mexPrintf for a MATLAB mexFunction).\n *\n *\t-DNMALLOC\n *\n *\t    No memory manager is defined at compile-time.  You MUST define the\n *\t    function pointers amd_malloc, amd_free, amd_realloc, and\n *\t    amd_calloc at run-time for AMD to work properly.\n */\n\n/* ========================================================================= */\n/* === NDEBUG ============================================================== */\n/* ========================================================================= */\n\n/*\n * Turning on debugging takes some work (see below).   If you do not edit this\n * file, then debugging is always turned off, regardless of whether or not\n * -DNDEBUG is specified in your compiler options.\n *\n * If AMD is being compiled as a mexFunction, then MATLAB_MEX_FILE is defined,\n * and mxAssert is used instead of assert.  If debugging is not enabled, no\n * MATLAB include files or functions are used.  Thus, the AMD library libamd.a\n * can be safely used in either a stand-alone C program or in another\n * mexFunction, without any change.\n */\n\n/*\n    AMD will be exceedingly slow when running in debug mode.  The next three\n    lines ensure that debugging is turned off.\n*/\n#ifndef NDEBUG\n#define NDEBUG\n#endif\n\n/*\n    To enable debugging, uncomment the following line:\n#undef NDEBUG\n*/\n\n/* ------------------------------------------------------------------------- */\n/* ANSI include files */\n/* ------------------------------------------------------------------------- */\n\n/* from stdlib.h:  size_t, malloc, free, realloc, and calloc */\n#include <stdlib.h>\n\n#if !defined(NPRINT) || !defined(NDEBUG)\n/* from stdio.h:  printf.  Not included if NPRINT is defined at compile time.\n * fopen and fscanf are used when debugging. */\n#include <stdio.h>\n#endif\n\n/* from limits.h:  INT_MAX and LONG_MAX */\n#include <limits.h>\n\n/* from math.h: sqrt */\n#include <math.h>\n\n/* ------------------------------------------------------------------------- */\n/* MATLAB include files (only if being used in or via MATLAB) */\n/* ------------------------------------------------------------------------- */\n\n#ifdef MATLAB_MEX_FILE\n#include \"matrix.h\"\n#include \"mex.h\"\n#endif\n\n/* ------------------------------------------------------------------------- */\n/* basic definitions */\n/* ------------------------------------------------------------------------- */\n\n#ifdef FLIP\n#undef FLIP\n#endif\n\n#ifdef MAX\n#undef MAX\n#endif\n\n#ifdef MIN\n#undef MIN\n#endif\n\n#ifdef EMPTY\n#undef EMPTY\n#endif\n\n#ifdef GLOBAL\n#undef GLOBAL\n#endif\n\n#ifdef PRIVATE\n#undef PRIVATE\n#endif\n\n/* FLIP is a \"negation about -1\", and is used to mark an integer i that is\n * normally non-negative.  FLIP (EMPTY) is EMPTY.  FLIP of a number > EMPTY\n * is negative, and FLIP of a number < EMTPY is positive.  FLIP (FLIP (i)) = i\n * for all integers i.  UNFLIP (i) is >= EMPTY. */\n#define EMPTY (-1)\n#define FLIP(i) (-(i)-2)\n#define UNFLIP(i) ((i < EMPTY) ? FLIP (i) : (i))\n\n/* for integer MAX/MIN, or for doubles when we don't care how NaN's behave: */\n#define MAX(a,b) (((a) > (b)) ? (a) : (b))\n#define MIN(a,b) (((a) < (b)) ? (a) : (b))\n\n/* logical expression of p implies q: */\n#define IMPLIES(p,q) (!(p) || (q))\n\n/* Note that the IBM RS 6000 xlc predefines TRUE and FALSE in <types.h>. */\n/* The Compaq Alpha also predefines TRUE and FALSE. */\n#ifdef TRUE\n#undef TRUE\n#endif\n#ifdef FALSE\n#undef FALSE\n#endif\n\n#define TRUE (1)\n#define FALSE (0)\n#define PRIVATE static\n#define GLOBAL\n#define EMPTY (-1)\n\n/* Note that Linux's gcc 2.96 defines NULL as ((void *) 0), but other */\n/* compilers (even gcc 2.95.2 on Solaris) define NULL as 0 or (0).  We */\n/* need to use the ANSI standard value of 0. */\n#ifdef NULL\n#undef NULL\n#endif\n\n#define NULL 0\n\n/* largest value of size_t */\n#ifndef SIZE_T_MAX\n#define SIZE_T_MAX ((size_t) (-1))\n#endif\n\n/* ------------------------------------------------------------------------- */\n/* integer type for AMD: int or UF_long */\n/* ------------------------------------------------------------------------- */\n\n/* define UF_long */\n#include \"UFconfig.h\"\n\n#if defined (DLONG) || defined (ZLONG)\n\n#define Int UF_long\n#define ID  UF_long_id\n#define Int_MAX UF_long_max\n\n#define AMD_order amd_l_order\n#define AMD_defaults amd_l_defaults\n#define AMD_control amd_l_control\n#define AMD_info amd_l_info\n#define AMD_1 amd_l1\n#define AMD_2 amd_l2\n#define AMD_valid amd_l_valid\n#define AMD_aat amd_l_aat\n#define AMD_postorder amd_l_postorder\n#define AMD_post_tree amd_l_post_tree\n#define AMD_dump amd_l_dump\n#define AMD_debug amd_l_debug\n#define AMD_debug_init amd_l_debug_init\n#define AMD_preprocess amd_l_preprocess\n\n#else\n\n#define Int int\n#define ID \"%d\"\n#define Int_MAX INT_MAX\n\n#define AMD_order amd_order\n#define AMD_defaults amd_defaults\n#define AMD_control amd_control\n#define AMD_info amd_info\n#define AMD_1 amd_1\n#define AMD_2 amd_2\n#define AMD_valid amd_valid\n#define AMD_aat amd_aat\n#define AMD_postorder amd_postorder\n#define AMD_post_tree amd_post_tree\n#define AMD_dump amd_dump\n#define AMD_debug amd_debug\n#define AMD_debug_init amd_debug_init\n#define AMD_preprocess amd_preprocess\n\n#endif\n\n/* ========================================================================= */\n/* === PRINTF macro ======================================================== */\n/* ========================================================================= */\n\n/* All output goes through the PRINTF macro.  */\n#define PRINTF(params) { if (amd_printf != NULL) (void) amd_printf params ; }\n\n/* ------------------------------------------------------------------------- */\n/* AMD routine definitions (user-callable) */\n/* ------------------------------------------------------------------------- */\n\n#include \"amd.h\"\n\n/* ------------------------------------------------------------------------- */\n/* AMD routine definitions (not user-callable) */\n/* ------------------------------------------------------------------------- */\n\nGLOBAL size_t AMD_aat\n(\n    Int n,\n    const Int Ap [ ],\n    const Int Ai [ ],\n    Int Len [ ],\n    Int Tp [ ],\n    double Info [ ]\n) ;\n\nGLOBAL void AMD_1\n(\n    Int n,\n    const Int Ap [ ],\n    const Int Ai [ ],\n    Int P [ ],\n    Int Pinv [ ],\n    Int Len [ ],\n    Int slen,\n    Int S [ ],\n    double Control [ ],\n    double Info [ ]\n) ;\n\nGLOBAL void AMD_postorder\n(\n    Int nn,\n    Int Parent [ ],\n    Int Npiv [ ],\n    Int Fsize [ ],\n    Int Order [ ],\n    Int Child [ ],\n    Int Sibling [ ],\n    Int Stack [ ]\n) ;\n\nGLOBAL Int AMD_post_tree\n(\n    Int root,\n    Int k,\n    Int Child [ ],\n    const Int Sibling [ ],\n    Int Order [ ],\n    Int Stack [ ]\n#ifndef NDEBUG\n    , Int nn\n#endif\n) ;\n\nGLOBAL void AMD_preprocess\n(\n    Int n,\n    const Int Ap [ ],\n    const Int Ai [ ],\n    Int Rp [ ],\n    Int Ri [ ],\n    Int W [ ],\n    Int Flag [ ]\n) ;\n\n/* ------------------------------------------------------------------------- */\n/* debugging definitions */\n/* ------------------------------------------------------------------------- */\n\n#ifndef NDEBUG\n\n/* from assert.h:  assert macro */\n#include <assert.h>\n\n#ifndef EXTERN\n#define EXTERN extern\n#endif\n\nEXTERN Int AMD_debug ;\n\nGLOBAL void AMD_debug_init ( char *s ) ;\n\nGLOBAL void AMD_dump\n(\n    Int n,\n    Int Pe [ ],\n    Int Iw [ ],\n    Int Len [ ],\n    Int iwlen,\n    Int pfree,\n    Int Nv [ ],\n    Int Next [ ],\n    Int Last [ ],\n    Int Head [ ],\n    Int Elen [ ],\n    Int Degree [ ],\n    Int W [ ],\n    Int nel\n) ;\n\n#ifdef ASSERT\n#undef ASSERT\n#endif\n\n/* Use mxAssert if AMD is compiled into a mexFunction */\n#ifdef MATLAB_MEX_FILE\n#define ASSERT(expression) (mxAssert ((expression), \"\"))\n#else\n#define ASSERT(expression) (assert (expression))\n#endif\n\n#define AMD_DEBUG0(params) { PRINTF (params) ; }\n#define AMD_DEBUG1(params) { if (AMD_debug >= 1) PRINTF (params) ; }\n#define AMD_DEBUG2(params) { if (AMD_debug >= 2) PRINTF (params) ; }\n#define AMD_DEBUG3(params) { if (AMD_debug >= 3) PRINTF (params) ; }\n#define AMD_DEBUG4(params) { if (AMD_debug >= 4) PRINTF (params) ; }\n\n#else\n\n/* no debugging */\n#define ASSERT(expression)\n#define AMD_DEBUG0(params)\n#define AMD_DEBUG1(params)\n#define AMD_DEBUG2(params)\n#define AMD_DEBUG3(params)\n#define AMD_DEBUG4(params)\n\n#endif\n"
  },
  {
    "path": "cpu/particles.pro",
    "content": "QT += core gui opengl\n\nTARGET = particles\nTEMPLATE = app\n\nCONFIG += c++0x\nQMAKE_CXXFLAGS += -std=c++0x\n\n# If you add your own folders, add them to INCLUDEPATH and DEPENDPATH, e.g.\n# INCLUDEPATH += folder1 folder2\n# DEPENDPATH += folder1 folder2\n\nINCLUDEPATH += src src/solver src/constraint glm\nDEPENDPATH += src src/solver src/constraint glm\n\nSOURCES += src/main.cpp \\\n    src/mainwindow.cpp \\\n    src/view.cpp \\\n    src/simulation.cpp \\\n    src/constraint/distanceconstraint.cpp \\\n    src/solver/lineareq.cpp \\\n    src/solver/matrix.cpp \\\n    src/solver/matrix.inl \\\n    src/solver/solver.cpp \\\n    src/solver/particle.cpp \\\n    src/constraint/totalshapeconstraint.cpp \\\n    src/constraint/boundaryconstraint.cpp \\\n    src/constraint/contactconstraint.cpp \\\n    src/constraint/totalfluidconstraint.cpp \\\n    src/constraint/rigidcontactconstraint.cpp \\\n    src/constraint/gasconstraint.cpp \\\n    src/opensmokeemitter.cpp \\\n    src/fluidemitter.cpp\n\nHEADERS += src/mainwindow.h \\\n    src/view.h \\\n    src/simulation.h \\\n    src/particle.h \\\n    src/includes.h \\\n    src/constraint/distanceconstraint.h \\\n    src/solver/lineareq.h \\\n    src/solver/matrix.h \\\n    src/solver/solver.h \\\n    src/constraint/totalshapeconstraint.h \\\n    src/constraint/boundaryconstraint.h \\\n    src/constraint/contactconstraint.h \\\n    src/constraint/totalfluidconstraint.h \\\n    src/constraint/rigidcontactconstraint.h \\\n    src/constraint/gasconstraint.h \\\n    src/opensmokeemitter.h \\\n    src/fluidemitter.h\n\n# UMFPACK\nINCLUDEPATH += $$PWD/lib/umfpack/include\nLIBS += -L$$PWD/lib/umfpack \\\n        -lumfpack \\\n        -lamd \\\n        #-lblas \\\n        #-lcerbla\n\nFORMS += src/mainwindow.ui\n"
  },
  {
    "path": "cpu/src/constraint/boundaryconstraint.cpp",
    "content": "#include \"boundaryconstraint.h\"\n\nBoundaryConstraint::BoundaryConstraint(int index, double val, bool xBoundary, bool greater, bool st)\n    : Constraint(), idx(index), value(val), isX(xBoundary), isGreaterThan(greater), stabile(st)\n{\n\n}\n\nBoundaryConstraint::~BoundaryConstraint()\n{\n\n}\n\nvoid BoundaryConstraint::project(QList<Particle *> *estimates, int *counts)\n{\n    Particle *p = estimates->at(idx);\n\n    // Add a little random jitter for fluids and gases so particles do not become trapped on boundaries\n    double extra = p->ph == FLUID || p->ph == GAS ? frand() * .003 : 0;\n    double d = (PARTICLE_RAD + extra);\n    glm::dvec2 n = glm::dvec2();\n\n    // Move the particle back into a valid spot (if necessary)\n    if (isGreaterThan) {\n        if (isX) {\n\n            // Quit if no longer valid\n            if (p->ep.x >= value + PARTICLE_RAD) {\n                return;\n            }\n            p->ep.x = value + d;\n            if (stabile) {\n                p->p.x = value + d;\n            }\n            n = glm::dvec2(1,0);\n        } else {\n\n            // Quit if no longer valid\n            if (p->ep.y >= value + PARTICLE_RAD) {\n                return;\n            }\n            p->ep.y = value + d;\n            if (stabile) {\n                p->p.y = value + d;\n            }\n            n = glm::dvec2(0,1);\n        }\n    } else {\n        if (isX) {\n\n            // Quit if no longer valid\n            if (p->ep.x <= value - PARTICLE_RAD) {\n                return;\n            }\n            p->ep.x = value - d;\n            if (stabile) {\n                p->p.x = value - d;\n            }\n            n = glm::dvec2(-1,0);\n        } else {\n\n            // Quit if no longer valid\n            if (p->ep.y <= value - PARTICLE_RAD) {\n                return;\n            }\n            p->ep.y = value - d;\n            if (stabile) {\n                p->p.y = value - d;\n            }\n            n = glm::dvec2(0,-1);\n        }\n    }\n\n    if (stabile) {\n        return;\n    }\n\n    // Apply friction - boundaries have a coefficient of friction of 1\n    glm::dvec2 dp = (p->ep - p->p) / (double)counts[idx],\n               dpt = dp - glm::dot(dp, n) * n;\n    double ldpt = glm::length(dpt);\n\n    if (ldpt < EPSILON) {\n        return;\n    }\n\n    // Choose between static and kinetic friction\n    if (ldpt < sqrt(p->sFriction) * d) {\n        p->ep -= dpt;\n    } else {\n        p->ep -= dpt * min(sqrt(p->kFriction )* d / ldpt, 1.);\n    }\n}\n\nvoid BoundaryConstraint::draw(QList<Particle *> *particles)\n{\n}\n\ndouble BoundaryConstraint::evaluate(QList<Particle *> *estimates)\n{\n    Particle *p = estimates->at(idx);\n    if (isGreaterThan) {\n        if (isX) {\n            return (value + PARTICLE_RAD) - p->getP(stabile).x;\n        } else {\n            return (value + PARTICLE_RAD) - p->getP(stabile).y;\n        }\n    } else {\n        if (isX) {\n            return p->getP(stabile).x - (value - PARTICLE_RAD);\n        } else {\n            return p->getP(stabile).y - (value - PARTICLE_RAD);\n        }\n    }\n}\n\nglm::dvec2 BoundaryConstraint::gradient(QList<Particle *> *estimates, int respect)\n{\n    if (respect != idx) {\n        return glm::dvec2();\n    }\n\n    if (isGreaterThan) {\n        if (isX) {\n            return glm::dvec2(-1,0);\n        } else {\n            return glm::dvec2(0,-1);\n        }\n    } else {\n        if (isX) {\n            return glm::dvec2(1,0);\n        } else {\n            return glm::dvec2(0,1);\n        }\n    }\n}\n\nvoid BoundaryConstraint::updateCounts(int *counts)\n{\n    counts[idx]++;\n}\n"
  },
  {
    "path": "cpu/src/constraint/boundaryconstraint.h",
    "content": "#ifndef BOUNDARYCONSTRAINT_H\n#define BOUNDARYCONSTRAINT_H\n\n#include \"particle.h\"\n\n// Collision with the boundaries of the world\nclass BoundaryConstraint : public Constraint\n{\npublic:\n    BoundaryConstraint(int index, double val, bool xBoundary, bool greater, bool st = false);\n    virtual ~BoundaryConstraint();\n\n    void project(QList<Particle *> *estimates, int *counts);\n    void draw(QList<Particle *> *particles);\n\n    double evaluate(QList<Particle *> *estimates);\n    glm::dvec2 gradient(QList<Particle *> *estimates, int respect);\n    void updateCounts(int *counts);\n\nprivate:\n    int idx;\n    double value;\n    bool isX, isGreaterThan, stabile;\n};\n\n#endif // BOUNDARYCONSTRAINT_H\n"
  },
  {
    "path": "cpu/src/constraint/contactconstraint.cpp",
    "content": "#include \"contactconstraint.h\"\n\nContactConstraint::ContactConstraint(int first, int second, bool st)\n    : Constraint(), i1(first), i2(second), stabile(st)\n{\n}\n\nContactConstraint::~ContactConstraint()\n{\n\n}\n\nvoid ContactConstraint::project(QList<Particle *> *estimates, int *counts)\n{\n    Particle *p1 = estimates->at(i1), *p2 = estimates->at(i2);\n    if (p1->tmass == 0.f && p2->tmass == 0.f) {\n        return;\n    }\n\n    glm::dvec2 diff = p1->getP(stabile) - p2->getP(stabile);\n    double wSum = p1->tmass + p2->tmass,\n            dist = glm::length(diff),\n            mag = dist - PARTICLE_DIAM;\n\n    // Previous iterations have moved particles out of collision\n    if (mag > 0) {\n        return;\n    }\n\n    double scale = mag / wSum;\n    glm::dvec2 dp = (scale / dist) * diff,\n            dp1 = -p1->tmass * dp / (double)counts[i1],\n              dp2 = p2->tmass * dp / (double)counts[i2];\n\n    p1->ep += dp1;\n    p2->ep += dp2;\n\n    if (stabile) {\n        p1->p += dp1;\n        p2->p += dp2;\n    }\n}\n\nvoid ContactConstraint::draw(QList<Particle *> *particles)\n{\n    Particle *p1 = particles->at(i1), *p2 = particles->at(i2);\n\n    glColor3f(1,1,0);\n    glBegin(GL_LINES);\n\n    glVertex2f(p1->p.x, p1->p.y);\n    glVertex2f(p2->p.x, p2->p.y);\n\n    glEnd();\n\n    glPointSize(3);\n    glBegin(GL_POINTS);\n\n    glVertex2f(p1->p.x, p1->p.y);\n    glVertex2f(p2->p.x, p2->p.y);\n\n    glEnd();\n}\n\ndouble ContactConstraint::evaluate(QList<Particle *> *estimates)\n{\n    Particle *p1 = estimates->at(i1), *p2 = estimates->at(i2);\n    double dist = glm::length(p1->getP(stabile) - p2->getP(stabile));\n    return dist > PARTICLE_DIAM ? 0 : dist - PARTICLE_DIAM;\n}\n\nglm::dvec2 ContactConstraint::gradient(QList<Particle *> *estimates, int respect)\n{\n    if (!(respect == i1 || respect == i2)) {\n        return glm::dvec2();\n    }\n\n    Particle *p1 = estimates->at(i1), *p2 = estimates->at(i2);\n    glm::dvec2 diff = p1->getP(stabile) - p2->getP(stabile);\n    double dist = glm::length(diff);\n\n    if (dist > PARTICLE_DIAM) {\n        return glm::dvec2();\n    }\n\n    glm::dvec2 n = diff / dist;\n    if (respect == i1) {\n        return n;\n    } else {\n        return -n;\n    }\n}\n\nvoid ContactConstraint::updateCounts(int *counts)\n{\n    counts[i1]++;\n    counts[i2]++;\n}\n\n"
  },
  {
    "path": "cpu/src/constraint/contactconstraint.h",
    "content": "#ifndef CONTACTCONSTRAINT_H\n#define CONTACTCONSTRAINT_H\n\n#include \"particle.h\"\n\n// Contact between two particles where AT LEAST ONE is not a solid\nclass ContactConstraint : public Constraint\n{\npublic:\n    ContactConstraint(int first, int second, bool st = false);\n    virtual ~ContactConstraint();\n\n    void project(QList<Particle *> *estimates, int *counts);\n    void draw(QList<Particle *> *particles);\n\n    double evaluate(QList<Particle *> *estimates);\n    glm::dvec2 gradient(QList<Particle *> *estimates, int respect);\n    void updateCounts(int *counts);\n\nprivate:\n    int i1, i2;\n    bool stabile;\n};\n\n#endif // CONTACTCONSTRAINT_H\n"
  },
  {
    "path": "cpu/src/constraint/distanceconstraint.cpp",
    "content": "#include \"distanceconstraint.h\"\n\nDistanceConstraint::DistanceConstraint(double distance, int first, int second, bool st)\n    : Constraint(), d(distance), i1(first), i2(second), stabile(st)\n{\n\n}\n\nDistanceConstraint::DistanceConstraint(int first, int second, QList<Particle *> *particles)\n    : Constraint(), d(0.0), i1(first), i2(second)\n{\n    d = glm::length(particles->at(i1)->p - particles->at(i2)->p);\n}\n\nDistanceConstraint::~DistanceConstraint()\n{\n\n}\n\nvoid DistanceConstraint::project(QList<Particle *> *estimates, int *counts)\n{\n    Particle *p1 = estimates->at(i1), *p2 = estimates->at(i2);\n\n    if (p1->imass == 0.f && p2->imass == 0.f) {\n        return;\n    }\n\n    glm::dvec2 diff = p1->ep - p2->ep;\n    double wSum = p1->imass + p2->imass,\n            dist = glm::length(diff),\n            mag = dist - d,\n            scale = mag / wSum;\n\n    glm::dvec2 dp = (scale / dist) * diff,\n              dp1 = -p1->imass * dp / (double)counts[i1],\n              dp2 = p2->imass * dp / (double)counts[i2];\n\n    p1->ep += dp1;\n    p2->ep += dp2;\n}\n\nvoid DistanceConstraint::draw(QList<Particle *> *particles)\n{\n    Particle *p1 = particles->at(i1), *p2 = particles->at(i2);\n\n    glColor3f(1,1,0);\n    glBegin(GL_LINES);\n\n    glVertex2f(p1->p.x, p1->p.y);\n    glVertex2f(p2->p.x, p2->p.y);\n\n    glEnd();\n\n    glPointSize(3);\n    glBegin(GL_POINTS);\n\n    glVertex2f(p1->p.x, p1->p.y);\n    glVertex2f(p2->p.x, p2->p.y);\n\n    glEnd();\n}\n\ndouble DistanceConstraint::evaluate(QList<Particle *> *estimates)\n{\n    Particle *p1 = estimates->at(i1), *p2 = estimates->at(i2);\n    return glm::length(p1->getP(stabile) - p2->getP(stabile)) - d;\n}\n\nglm::dvec2 DistanceConstraint::gradient(QList<Particle *> *estimates, int respect)\n{\n    if (!(respect == i1 || respect == i2)) {\n        return glm::dvec2();\n    }\n\n    Particle *p1 = estimates->at(i1), *p2 = estimates->at(i2);\n    glm::dvec2 n = glm::normalize(p1->getP(stabile) - p2->getP(stabile));\n    if (respect == i1) {\n        return n;\n    } else {\n        return -n;\n    }\n}\n\nvoid DistanceConstraint::updateCounts(int *counts)\n{\n    counts[i1]++;\n    counts[i2]++;\n}\n"
  },
  {
    "path": "cpu/src/constraint/distanceconstraint.h",
    "content": "#ifndef DISTANCECONSTRAINT_H\n#define DISTANCECONSTRAINT_H\n\n#include \"particle.h\"\n\n// Two particles must be exactly a certain distance away\nclass DistanceConstraint : public Constraint\n{\npublic:\n    DistanceConstraint(double distance, int first, int second, bool st = false);\n    DistanceConstraint(int first, int second, QList<Particle *> *particles);\n    virtual ~DistanceConstraint();\n\n    void project(QList<Particle *> *estimates, int *counts);\n    void draw(QList<Particle *> *particles);\n\n    double evaluate(QList<Particle *> *estimates);\n    glm::dvec2 gradient(QList<Particle *> *estimates, int respect);\n    void updateCounts(int *counts);\n\nprivate:\n    double d;\n    int i1, i2;\n    bool stabile;\n};\n\n#endif // DISTANCECONSTRAINT_H\n"
  },
  {
    "path": "cpu/src/constraint/gasconstraint.cpp",
    "content": "#include \"gasconstraint.h\"\n\nGasConstraint::GasConstraint(double density, QList<int> *particles, bool open)\n    : Constraint(), p0(density), m_open(open)\n{\n    neighbors = new QList<int>[particles->size()];\n    deltas = new glm::dvec2[particles->size()];\n\n    numParticles = particles->size();\n\n    for (int i = 0; i < particles->size(); i++) {\n        ps.append(particles->at(i));\n    }\n}\n\nGasConstraint::~GasConstraint()\n{\n    delete[] neighbors;\n}\n\nvoid GasConstraint::addParticle(Particle *p, int index) {\n    delete[] neighbors;\n    delete[] deltas;\n    numParticles++;\n    neighbors = new QList<int>[numParticles];\n    deltas = new glm::dvec2[numParticles];\n    ps.append(index);\n}\n\nvoid GasConstraint::project(QList<Particle *> *estimates, int *counts)\n{\n\n    // Find neighboring particles and estimate pi for each particle\n    lambdas.clear();\n    for (int k = 0; k < ps.size(); k++) {\n        neighbors[k].clear();\n        int i = ps[k];\n        Particle *p_i = estimates->at(i);\n        double pi = 0., denom = 0.;\n\n        // Find neighbors\n        for (int j = 0; j < estimates->size(); j++) {\n\n            // Check if the next particle is actually this particle\n            if (j != i) {\n                Particle *p_j = estimates->at(j);\n\n                // Ignore fixed particles\n                if (p_j->imass == 0) continue;\n                glm::dvec2 r = p_i->ep - p_j->ep;\n                double rlen2 = glm::dot(r, r);\n                if (rlen2 < H2) {\n\n                    // Found a neighbor! Remember it and add to pi and the gamma denominator\n                    neighbors[k].append(j);\n                    double incr = poly6(rlen2) / p_j->imass;\n                    if (p_j->ph == SOLID) {\n                        incr *= S_SOLID;\n                    }\n                    pi += incr;\n\n                    glm::dvec2 gr = grad(estimates, k, j);\n                    denom += glm::dot(gr, gr);\n                }\n\n            // If it is, cut to the chase\n            } else {\n                neighbors[k].append(j);\n                pi += poly6(0) / p_i->imass;\n            }\n        }\n\n        glm::dvec2 gr = grad(estimates, k, i);\n        denom += glm::dot(gr, gr);\n\n        // Compute the gamma value\n//        cout << i << \" estimated \" << pi << endl;\n\n        double p_rat = (pi/p0);\n        if(m_open) p_i->f += p_i->v * (1.-p_rat) * -50.;\n//        if(p_rat < 1) p_rat = 1;\n        double lambda = -(p_rat - 1.) / (denom + RELAXATION);\n        lambdas[i] = lambda;\n    }\n\n    // Compute actual deltas\n    for (int k = 0; k < ps.size(); k++) {\n        glm::dvec2 delta = glm::dvec2();\n        glm::dvec2 f_vort = glm::dvec2();\n        int i = ps[k];\n        Particle *p_i = estimates->at(i);\n\n        for (int x = 0; x < neighbors[k].size(); x++) {\n            int j = neighbors[k][x];\n            if (i == j) continue;\n            Particle *p_j = estimates->at(j);\n            glm::dvec2 r = p_i->ep - p_j->ep;\n            double rlen = glm::length(r);\n            glm::dvec2 sg = spikyGrad(r, rlen);\n            double lambdaCorr = -K_P * pow((poly6(rlen * rlen) / poly6(DQ_P * DQ_P * H * H)), E_P);\n            delta += (lambdas[i] + lambdas[j] + lambdaCorr) * sg;\n//            vorticity\n            glm::dvec2 gradient = spikyGrad(r, glm::dot(r,r));\n            glm::dvec2 w = gradient * p_j->v;\n            glm::dvec3 cross = glm::cross(glm::dvec3(0,0,glm::length(w)), glm::dvec3(r.x, r.y, 0));\n            f_vort += glm::dvec2(cross.x, cross.y) * poly6(glm::dot(r,r));\n        }\n        deltas[k] = (delta / p0);\n        p_i->f += f_vort;\n    }\n\n    for (int k = 0; k < ps.size(); k++) {\n        int i = ps[k];\n        Particle *p_i = estimates->at(i);\n        p_i->ep += deltas[k] / ((double) neighbors[k].size() + counts[i]);\n    }\n\n//    // Find neighboring particles and estimate pi for each particle\n//    lambdas.clear();\n//    for (int k = 0; k < ps.size(); k++) {\n//        neighbors[k].clear();\n//        int i = ps[k];\n//        Particle *p_i = estimates->at(i);\n//        double pi = 0., denom = 0.;\n\n//        // Find neighbors and calculate forces\n//        for (int j = 0; j < estimates->size(); j++) {\n\n//            // Check if the next particle is actually this particle\n//            if (j != i) {\n//                Particle *p_j = estimates->at(j);\n//                glm::dvec2 r = p_i->ep - p_j->ep;\n//                double rlen2 = glm::dot(r, r);\n//                if (rlen2 < H2) {\n\n//                    // Found a neighbor! Remember it and add to pi and the gamma denominator\n//                    neighbors[k].append(j);\n//                    double incr = poly6(rlen2) / p_j->imass;\n//                    if (p_j->ph == SOLID) {\n//                        incr *= S_SOLID;\n//                    }\n//                    pi += incr;\n\n//                    glm::dvec2 gr = grad(estimates, k, j);\n//                    denom += glm::dot(gr, gr);\n//                }\n\n//            // If it is, cut to the chase\n//            } else {\n//                neighbors[k].append(j);\n//                pi += poly6(0) / p_i->imass;\n//            }\n//        }\n\n//        glm::dvec2 gr = grad(estimates, k, i);\n//        denom += glm::dot(gr, gr);\n\n//        // Compute the gamma value\n////        cout << i << \" estimated \" << pi << endl;\n//        double p_rat = (pi/p0);\n////        if(m_open) p_i->f += p_i->v * (1.-p_rat) * -50.;\n////        if(p_rat < 1) p_rat = 1;\n//        double lambda = -(p_rat - 1.) / (denom + RELAXATION);\n//        lambdas[i] = lambda;\n//    }\n\n//    // Compute actual deltas\n//    for (int k = 0; k < ps.size(); k++) {\n//        glm::dvec2 delta = glm::dvec2();\n//        glm::dvec2 f_vort = glm::dvec2();\n//        int i = ps[k];\n//        Particle *p_i = estimates->at(i);\n\n//        for (int x = 0; x < neighbors[k].size(); x++) {\n//            int j = neighbors[k][x];\n//            if (i == j) continue;\n//            Particle *p_j = estimates->at(j);\n//            glm::dvec2 r = p_i->ep - p_j->ep;\n//            double rlen = glm::length(r);\n//            glm::dvec2 sg = spikyGrad(r, rlen);\n//            double lambdaCorr = -K_P * pow((poly6(rlen) / poly6(DQ_P * H)), E_P);\n//            delta += (lambdas[i] + lambdas[j] + lambdaCorr) * sg;\n\n//            // vorticity\n////            glm::dvec2 gradient = spikyGrad(r, glm::dot(r,r));\n////            glm::dvec2 w = gradient * p_j->v;\n////            glm::dvec3 cross = glm::cross(glm::dvec3(0,0,glm::length(w)), glm::dvec3(r.x, r.y, 0));\n////            f_vort += glm::dvec2(cross.x, cross.y) * poly6(glm::dot(r,r));\n//        }\n//        deltas[k] = (delta / p0);\n////        p_i->f += f_vort;\n//    }\n\n//    for (int k = 0; k < ps.size(); k++) {\n//        int i = ps[k];\n//        Particle *p_i = estimates->at(i);\n//        p_i->ep += deltas[k] / ((double) neighbors[k].size() + counts[i]);\n//    }\n}\n\nvoid GasConstraint::draw(QList<Particle *> *particles)\n{\n\n}\n\ndouble GasConstraint::poly6(double r2)\n{\n    if(r2 >= H2) return 0;\n    double term2 = (H2 - r2);\n    return (315. / (64. * M_PI * H9)) * (term2 * term2 * term2);\n//    return (H-r) / (H*H);\n}\n\nglm::dvec2 GasConstraint::spikyGrad(const glm::dvec2 &r, double rlen)\n{\n    if(rlen >= H) return glm::dvec2();\n    if(rlen == 0) return glm::dvec2();\n    return -glm::normalize(r) * (45. / (M_PI * H6)) * (H - rlen) * (H - rlen);\n//    return -r / (H*H*rlen);\n}\n\nglm::dvec2 GasConstraint::grad(QList<Particle *> *estimates, int k, int j)\n{\n    int i = ps[k];\n    Particle *p_i = estimates->at(i), *p_j = estimates->at(j);\n    glm::dvec2 r = p_i->ep - p_j->ep;\n    double rlen = glm::length(r);\n    if (p_i != p_j) {\n        return -spikyGrad(r, rlen) / (p0);\n    }\n\n    glm::dvec2 out = glm::dvec2();\n    for (int x = 0; x < neighbors[k].size(); x++) {\n        r = p_i->ep - estimates->at(neighbors[k][x])->ep;\n        rlen = glm::length(r);\n        out += spikyGrad(r, rlen);\n    }\n\n    return out / (p0);\n}\n\ndouble GasConstraint::evaluate(QList<Particle *> *estimates)\n{\n    std::cout << \"You shouldn't be calling evaluate on fluids\" << std::endl;\n    exit(1);\n}\n\nglm::dvec2 GasConstraint::gradient(QList<Particle *> *estimates, int respect)\n{\n    std::cout << \"You shouldn't be calling gradient on fluids\" << std::endl;\n    exit(1);\n}\n\nvoid GasConstraint::updateCounts(int *counts)\n{\n}\n"
  },
  {
    "path": "cpu/src/constraint/gasconstraint.h",
    "content": "#ifndef GASCONSTRAINT_H\n#define GASCONSTRAINT_H\n\n#define H 2.\n#define H2 4.\n#define H6 64.\n#define H9 512.\n\n// USE H = 4, density = .5, look for the lattice\n\n// Epsilon in gamma correction denominator\n#define RELAXATION .01\n\n// Pressure terms\n#define K_P .2\n#define E_P 4\n#define DQ_P .25\n\n// Fluid-solid coupling constant\n#define S_SOLID .5\n\n#include \"particle.h\"\n#include <QSet>\n\nclass GasConstraint : public Constraint\n{\npublic:\n    GasConstraint(double density, QList<int> *particles, bool open);\n    virtual ~GasConstraint();\n\n    void project(QList<Particle *> *estimates, int *counts);\n    void draw(QList<Particle *> *particles);\n\n    double evaluate(QList<Particle *> *estimates);\n    glm::dvec2 gradient(QList<Particle *> *estimates, int respect);\n    void updateCounts(int *counts);\n\n    double poly6(double rlen);\n    glm::dvec2 spikyGrad(const glm::dvec2 &r, double rlen);\n    glm::dvec2 grad(QList<Particle *> *estimates, int k, int j);\n\n    void addParticle(Particle *p, int index);\n\nprivate:\n    double p0;\n    QList<int> ps;\n    QList<int> *neighbors;\n    int numParticles;\n    glm::dvec2 *deltas;\n    QHash<int, double> lambdas;\n    bool m_open;\n};\n\n#endif // GASCONSTRAINT_H\n"
  },
  {
    "path": "cpu/src/constraint/rigidcontactconstraint.cpp",
    "content": "#include \"rigidcontactconstraint.h\"\n\nRigidContactConstraint::RigidContactConstraint(int first, int second, QList<Body *> *bodies, bool st)\n    : Constraint(), d(0.0), i1(first), i2(second), stabile(st), bods(bodies)\n{\n\n}\n\nRigidContactConstraint::~RigidContactConstraint()\n{\n}\n\nbool RigidContactConstraint::initBoundary(Particle *p1, Particle *p2)\n{\n    glm::dvec2 x12 = p1->getP(stabile) - p2->getP(stabile);\n    double len = glm::length(x12);\n    d = PARTICLE_DIAM - len;\n    if (d < EPSILON) return true;\n    x12 = len > EPSILON ? x12 / len : glm::dvec2(0,1);\n    double dp = glm::dot(x12, n);\n    if (dp < 0) {\n        n = x12 - 2.0 * dp * n;\n    } else {\n        n = x12;\n    }\n    return false;\n}\n\nvoid RigidContactConstraint::project(QList<Particle *> *estimates, int *counts)\n{\n    Particle *p1 = estimates->at(i1), *p2 = estimates->at(i2);\n    SDFData dat1 = p1->getSDFData(bods, i1), dat2 = p2->getSDFData(bods, i2);\n\n    if (dat1.distance < 0 || dat2.distance < 0) {\n        glm::dvec2 x12 = p2->getP(stabile) - p1->getP(stabile);\n        double len = glm::length(x12);\n        d = PARTICLE_DIAM - len;\n        if (d < EPSILON) return;\n        n = x12 / len;\n    } else {\n        if (dat1.distance < dat2.distance) {\n            d = dat1.distance;\n            n = dat1.gradient;\n        } else {\n            d = dat2.distance;\n            n = -dat2.gradient;\n        }\n\n        if (d < PARTICLE_DIAM + EPSILON) {\n            if (initBoundary(p1, p2)) {\n                return;\n            }\n        }\n    }\n\n    double wSum = p1->tmass + p2->tmass;\n    glm::dvec2 dp = (1.0 / wSum) * d * n,\n              dp1 = -p1->tmass * dp  / (double)counts[i1],\n              dp2 = p2->tmass * dp / (double)counts[i2];\n\n    if (!stabile) {\n        p1->ep += dp1;\n        p2->ep += dp2;\n    } else {\n        p1->p += dp1;\n        p2->p += dp2;\n    }\n\n    // Apply friction\n    glm::dvec2 nf = glm::normalize(n);\n    glm::dvec2 dpf = (p1->ep - p1->p) - (p2->ep - p2->p),\n               dpt = dpf - glm::dot(dpf, nf) * nf;\n    double ldpt = glm::length(dpt);\n    if (ldpt < EPSILON) {\n        return;\n    }\n    double sFric = sqrt(p1->sFriction * p2->sFriction),\n            kFric = sqrt(p1->kFriction * p2->kFriction);\n\n    if (ldpt < sFric * d) {\n        if (stabile) {\n            p1->p -= dpt * p1->tmass / wSum;\n            p2->p += dpt * p2->tmass / wSum;\n        }\n        p1->ep -= dpt * p1->tmass / wSum;\n        p2->ep += dpt * p2->tmass / wSum;\n    } else {\n        glm::dvec2 delta = dpt * min(kFric * d / ldpt, 1.);\n        if (stabile) {\n            p1->p -= delta * p1->tmass / wSum;\n            p2->p += delta * p2->tmass / wSum;\n        }\n        p1->ep -= delta * p1->tmass / wSum;\n        p2->ep += delta * p2->tmass / wSum;\n    }\n}\n\nvoid RigidContactConstraint::draw(QList<Particle *> *particles)\n{\n\n}\n\ndouble RigidContactConstraint::evaluate(QList<Particle *> *estimates)\n{\n    Particle *p1 = estimates->at(i1), *p2 = estimates->at(i2);\n    SDFData dat1 = p1->getSDFData(bods, i1), dat2 = p2->getSDFData(bods, i2);\n\n    if (dat1.distance < 0 || dat2.distance < 0) {\n        glm::dvec2 x12 = p2->getP(stabile) - p1->getP(stabile);\n        double len = glm::length(x12);\n        d = PARTICLE_DIAM - len;\n        n = len > EPSILON ? -x12 / len : glm::dvec2(0,1);\n    } else {\n        if (dat1.distance < dat2.distance) {\n            d = dat1.distance;\n            n = dat1.gradient;\n        } else {\n            d = dat2.distance;\n            n = -dat2.gradient;\n        }\n\n        if (d < PARTICLE_DIAM + EPSILON) {\n            initBoundary(p1, p2);\n        }\n    }\n\n    return d;\n}\n\nglm::dvec2 RigidContactConstraint::gradient(QList<Particle *> *estimates, int respect)\n{\n    if (respect == i1) {\n        return -n;\n    }\n\n    if (respect == i2) {\n        return n;\n    }\n\n    return glm::dvec2();\n}\n\nvoid RigidContactConstraint::updateCounts(int *counts)\n{\n    counts[i1]++;\n    counts[i2]++;\n}\n"
  },
  {
    "path": "cpu/src/constraint/rigidcontactconstraint.h",
    "content": "#ifndef RIGIDCONTACTCONSTRAINT_H\n#define RIGIDCONTACTCONSTRAINT_H\n\n#include \"particle.h\"\n\nclass RigidContactConstraint : public Constraint\n{\npublic:\n    RigidContactConstraint(int first, int second, QList<Body *> *bodies, bool st = false);\n    virtual ~RigidContactConstraint();\n\n    bool initBoundary(Particle *p1, Particle *p2);\n\n    void project(QList<Particle *> *estimates, int *counts);\n    void draw(QList<Particle *> *particles);\n\n    double evaluate(QList<Particle *> *estimates);\n    glm::dvec2 gradient(QList<Particle *> *estimates, int respect);\n    void updateCounts(int *counts);\n\nprivate:\n    QList<Body *> *bods;\n    glm::dvec2 n;\n    double d;\n    int i1, i2;\n    bool stabile;\n};\n\n#endif // RIGIDCONTACTCONSTRAINT_H\n"
  },
  {
    "path": "cpu/src/constraint/smokeparticle.cpp",
    "content": "#include \"smokeparticle.h\"\n\nSmokeParticle::SmokeParticle()\n{\n}\n"
  },
  {
    "path": "cpu/src/constraint/smokeparticle.h",
    "content": "#ifndef SMOKEPARTICLE_H\n#define SMOKEPARTICLE_H\n\nclass SmokeParticle\n{\npublic:\n    SmokeParticle();\n};\n\n#endif // SMOKEPARTICLE_H\n"
  },
  {
    "path": "cpu/src/constraint/totalfluidconstraint.cpp",
    "content": "#include \"totalfluidconstraint.h\"\n\nTotalFluidConstraint::TotalFluidConstraint(double density, QList<int> *particles)\n    : Constraint(), p0(density)\n{\n    neighbors = new QList<int>[particles->size()];\n    deltas = new glm::dvec2[particles->size()];\n\n    numParticles = particles->size();\n\n    for (int i = 0; i < particles->size(); i++) {\n        ps.append(particles->at(i));\n    }\n}\n\nTotalFluidConstraint::~TotalFluidConstraint()\n{\n    delete[] neighbors;\n}\n\nvoid TotalFluidConstraint::addParticle(int index) {\n    delete[] neighbors;\n    delete[] deltas;\n    numParticles++;\n    neighbors = new QList<int>[numParticles];\n    deltas = new glm::dvec2[numParticles];\n    ps.append(index);\n}\n\nvoid TotalFluidConstraint::removeParticle(int index) {\n    delete[] neighbors;\n    delete[] deltas;\n//    if(ps.contains(index)) {\n        numParticles--;\n        neighbors = new QList<int>[numParticles];\n        deltas = new glm::dvec2[numParticles];\n        ps.removeAt(index);\n//    }\n}\n\nvoid TotalFluidConstraint::project(QList<Particle *> *estimates, int *counts)\n{\n    // Find neighboring particles and estimate pi for each particle\n    lambdas.clear();\n    for (int k = 0; k < ps.size(); k++) {\n        neighbors[k].clear();\n        int i = ps[k];\n        Particle *p_i = estimates->at(i);\n        double pi = 0., denom = 0.;\n\n        // Find neighbors\n        for (int j = 0; j < estimates->size(); j++) {\n\n            // Check if the next particle is actually this particle\n            if (j != i) {\n                Particle *p_j = estimates->at(j);\n\n                // Ignore fixed particles\n                if (p_j->imass == 0) continue;\n                glm::dvec2 r = p_i->ep - p_j->ep;\n                double rlen2 = glm::dot(r, r);\n                if (rlen2 < H2) {\n\n                    // Found a neighbor! Remember it and add to pi and the gamma denominator\n                    neighbors[k].append(j);\n                    double incr = poly6(rlen2) / p_j->imass;\n                    if (p_j->ph == SOLID) {\n                        incr *= S_SOLID;\n                    }\n                    pi += incr;\n\n                    glm::dvec2 gr = grad(estimates, k, j);\n                    denom += glm::dot(gr, gr);\n                }\n\n            // If it is, cut to the chase\n            } else {\n                neighbors[k].append(j);\n                pi += poly6(0) / p_i->imass;\n            }\n        }\n\n        glm::dvec2 gr = grad(estimates, k, i);\n        denom += glm::dot(gr, gr);\n\n        // Compute the gamma value\n//        cout << i << \" estimated \" << pi << endl;\n        double lambda = -((pi / p0) - 1.) / (denom + RELAXATION);\n        lambdas[i] = lambda;\n    }\n\n    // Compute actual deltas\n    for (int k = 0; k < ps.size(); k++) {\n        glm::dvec2 delta = glm::dvec2();\n        int i = ps[k];\n        Particle *p_i = estimates->at(i);\n\n        for (int x = 0; x < neighbors[k].size(); x++) {\n            int j = neighbors[k][x];\n            if (i == j) continue;\n            Particle *p_j = estimates->at(j);\n            glm::dvec2 r = p_i->ep - p_j->ep;\n            double rlen = glm::length(r);\n            glm::dvec2 sg = spikyGrad(r, rlen);\n            double lambdaCorr = -K_P * pow((poly6(rlen * rlen) / poly6(DQ_P * DQ_P * H * H)), E_P);\n            delta += (lambdas[i] + lambdas[j] + lambdaCorr) * sg;\n        }\n        deltas[k] = (delta / p0);\n    }\n\n    for (int k = 0; k < ps.size(); k++) {\n        int i = ps[k];\n        Particle *p_i = estimates->at(i);\n        p_i->ep += deltas[k] / ((double) neighbors[k].size() + counts[i]);\n    }\n}\n\nvoid TotalFluidConstraint::draw(QList<Particle *> *particles)\n{\n\n}\n\ndouble TotalFluidConstraint::poly6(double r2)\n{\n    if(r2 >= H2) return 0;\n    double term2 = (H2 - r2);\n    return (315. / (64. * M_PI * H9)) * (term2 * term2 * term2);\n//    return (H-r) / (H*H);\n}\n\nglm::dvec2 TotalFluidConstraint::spikyGrad(const glm::dvec2 &r, double rlen2)\n{\n    if(rlen2 >= H) return glm::dvec2();\n    if(rlen2 == 0) return glm::dvec2();\n    return -glm::normalize(r) * (45. / (M_PI * H6)) * (H - rlen2) * (H - rlen2);\n//    return -r / (H*H*rlen);\n}\n\nglm::dvec2 TotalFluidConstraint::grad(QList<Particle *> *estimates, int k, int j)\n{\n    int i = ps[k];\n    Particle *p_i = estimates->at(i), *p_j = estimates->at(j);\n    glm::dvec2 r = p_i->ep - p_j->ep;\n    double rlen = glm::length(r);\n    if (p_i != p_j) {\n        return -spikyGrad(r, rlen) / (p0);\n    }\n\n    glm::dvec2 out = glm::dvec2();\n    for (int x = 0; x < neighbors[k].size(); x++) {\n        Particle *p_j = estimates->at(neighbors[k][x]);\n        r = p_i->ep - p_j->ep;\n        rlen = glm::length(r);\n        out += (p_j->ph == SOLID ? S_SOLID : 1.) * spikyGrad(r, rlen);\n    }\n\n    return out / (p0);\n}\n\ndouble TotalFluidConstraint::evaluate(QList<Particle *> *estimates)\n{\n    std::cout << \"You shouldn't be calling evaluate on fluids\" << std::endl;\n    exit(1);\n}\n\nglm::dvec2 TotalFluidConstraint::gradient(QList<Particle *> *estimates, int respect)\n{\n    std::cout << \"You shouldn't be calling gradient on fluids\" << std::endl;\n    exit(1);\n}\n\nvoid TotalFluidConstraint::updateCounts(int *counts)\n{\n}\n"
  },
  {
    "path": "cpu/src/constraint/totalfluidconstraint.h",
    "content": "#ifndef TOTALFLUIDCONSTRAINT_H\n#define TOTALFLUIDCONSTRAINT_H\n\n//#define H 3.5\n//#define H6 1838.265625\n//#define H9 78815.6386719\n\n//#define H 5.\n//#define H6 15625.\n//#define H9 1953125.\n\n//#define H 4.\n//#define H6 4096.\n//#define H9 262144.\n\n#define H 2.\n#define H2 4.\n#define H6 64.\n#define H9 512.\n\n// Epsilon in gamma correction denominator\n#define RELAXATION .01\n\n// Pressure terms\n#define K_P .1\n#define E_P 4\n#define DQ_P .2\n\n// Fluid-solid coupling constant\n#define S_SOLID 0.\n\n#include \"particle.h\"\n\nclass TotalFluidConstraint : public Constraint\n{\npublic:\n    TotalFluidConstraint(double density, QList<int> *particles);\n    virtual ~TotalFluidConstraint();\n\n    void project(QList<Particle *> *estimates, int *counts);\n    void draw(QList<Particle *> *particles);\n\n    double evaluate(QList<Particle *> *estimates);\n    glm::dvec2 gradient(QList<Particle *> *estimates, int respect);\n    void updateCounts(int *counts);\n\n    double poly6(double rlen);\n    glm::dvec2 spikyGrad(const glm::dvec2 &r, double rlen);\n    glm::dvec2 grad(QList<Particle *> *estimates, int k, int j);\n    void addParticle(int index);\n    void removeParticle(int i);\n\n    QList<int> *neighbors;\n    QList<int> ps;\n    double p0;\n    QHash<int, double> lambdas;\n\nprivate:\n    glm::dvec2 *deltas;\n    int numParticles;\n};\n\n#endif // TOTALFLUIDCONSTRAINT_H\n"
  },
  {
    "path": "cpu/src/constraint/totalshapeconstraint.cpp",
    "content": "#include \"totalshapeconstraint.h\"\n\nTotalShapeConstraint::TotalShapeConstraint(Body *bod, double stiff)\n    : Constraint(), body(bod)\n{\n    stiffness = stiff;\n}\n\nTotalShapeConstraint::~TotalShapeConstraint()\n{\n\n}\n\nvoid TotalShapeConstraint::project(QList<Particle *> *estimates, int *counts)\n{\n    body->updateCOM(estimates);\n\n    // implemented using http://labs.byhook.com/2010/06/29/particle-based-rigid-bodies-using-shape-matching/\n    for (int i = 0; i < body->particles.size(); i++) {\n        int idx = body->particles[i];\n        Particle *p = estimates->at(idx);\n        p->ep += (guess(idx) - p->ep) * stiffness;\n    }\n}\n\nvoid TotalShapeConstraint::draw(QList<Particle *> *particles)\n{\n    glColor3f(0,1,0);\n    glBegin(GL_LINES);\n\n    for (int i = 0; i < body->particles.size(); i++) {\n        int idx = body->particles[i];\n        Particle *p = particles->at(idx);\n\n        glVertex2f(p->p.x, p->p.y);\n        glVertex2f(body->center.x, body->center.y);\n    }\n\n    glEnd();\n\n    glPointSize(3);\n    glBegin(GL_POINTS);\n    glVertex2f(body->center.x, body->center.y);\n    for (int i = 0; i < body->particles.size(); i++) {\n        int idx = body->particles[i];\n        Particle *p = particles->at(idx);\n        glVertex2f(p->p.x, p->p.y);\n    }\n    glEnd();\n}\n\ndouble TotalShapeConstraint::evaluate(QList<Particle *> *estimates)\n{\n    (void) estimates;\n    return 0;\n}\n\nglm::dvec2 TotalShapeConstraint::gradient(QList<Particle *> *estimates, int respect)\n{\n//    if (body->rs.contains(respect)) {\n//        Particle *p = estimates->at(respect);\n//        glm::dvec2 out = guess(respect) - p->ep;\n//        if (out == glm::dvec2()) {\n//            return glm::dvec2(0,0);\n//        }\n//        return -glm::normalize(out);\n//    }\n    (void) estimates;\n    (void) respect;\n    return glm::dvec2();\n}\n\nvoid TotalShapeConstraint::updateCounts(int *counts)\n{\n    for (int i = 0; i < body->particles.size(); i++) {\n        counts[body->particles[i]]++;\n    }\n}\n\nglm::dvec2 TotalShapeConstraint::guess(int idx)\n{\n    double c = cos(body->angle), s = sin(body->angle);\n\n    glm::dvec2 q = body->rs[idx],\n               d = glm::dvec2(c * q.x - s * q.y, s * q.x + c * q.y);\n    return d + body->center;\n}\n"
  },
  {
    "path": "cpu/src/constraint/totalshapeconstraint.h",
    "content": "#ifndef TOTALSHAPECONSTRAINT_H\n#define TOTALSHAPECONSTRAINT_H\n\n#include \"particle.h\"\n\nclass TotalShapeConstraint : public Constraint\n{\npublic:\n    TotalShapeConstraint(Body *bod, double stiff = 1.0);\n    virtual ~TotalShapeConstraint();\n\n    void project(QList<Particle *> *estimates, int *counts);\n    void draw(QList<Particle *> *particles);\n\n    double evaluate(QList<Particle *> *estimates);\n    glm::dvec2 gradient(QList<Particle *> *estimates, int respect);\n    void updateCounts(int *counts);\n\n    glm::dvec2 guess(int idx);\n\nprivate:\n    Body *body;\n};\n\n#endif // TOTALSHAPECONSTRAINT_H\n"
  },
  {
    "path": "cpu/src/fluidemitter.cpp",
    "content": "#include \"fluidemitter.h\"\n\nFluidEmitter::FluidEmitter(glm::dvec2 posn, double particlesPerSec, TotalFluidConstraint *fs) :\n    m_posn(posn), m_particlesPerSec(particlesPerSec), m_fs(fs)\n{\n    timer = 0;\n    totalTimer = 0;\n}\n\nFluidEmitter::~FluidEmitter() {\n}\n\nvoid FluidEmitter::tick(QList<Particle *> *estimates, double secs) {\n    for(int i = m_fs->ps.size()-1; i >= 0; i--) {\n        Particle *p = estimates->at(m_fs->ps.at(i));\n            //            std::cout << p << std::endl;\n//            double lambda = m_fs->lambdas[i];\n            //            std::cout << lambda << std::endl;\n        //            if(lambda >= -.1 && glm::length(p->v) < .05 && glm::length(p->p - p->ep) < .05) {\n        //            if(p->p.y >= 10 || fabs(p->p.x) >= 10 ) {\n        if(glm::length(p->v) < .06 && p->p.y <= 5) {\n            if(m_fs->lambdas[i] <= 0) {\n                p->t -= 1;\n                if(p->t <= 0) {\n                    p->t = 0;\n\n                    //                p->ph = SOLID;\n                    //                Particle *newP = new Particle(p->p, 0, SOLID);\n                    //                newP->v = p->v;\n                    //            p->imass -= secs;\n                    //            if(p->imass == 0)\n\n                    p->imass = 0;\n                    p->ph = SOLID;\n                    p->ep = p->p;\n                    p->v = glm::dvec2();\n                    p->f = glm::dvec2();\n                    //                grains.append(newP);\n                    //                estimates->append(newP);\n                    //                estimates->removeAt(m_fs->ps.at(i));\n                    //                if(m_fs->ps.contains(i))\n                    m_fs->removeParticle(i);\n                    //                delete p;\n                    //                p->imass = 1;\n                    //                p->ph = SOLID;\n                    //                m_fs->ps.removeAt(i);\n                }\n            } else {\n                p->t += secs;\n                if(p->t > 3) p->t = 3;\n            }\n            //        }\n        }\n    }\n\n\n    //    for(int i=0; i<grains.size(); i++) {\n    //        Particle *p = grains.at(i);\n//        if(glm::length(p->v) <= .02) {\n//            grains.removeAt(i);\n//            p->imass = 0;\n//            p->v = glm::dvec2();\n//            p->f = glm::dvec2();\n//            p->ep = p->p;\n//        }\n//    }\n\n    timer += secs;\n    totalTimer += secs;\n    while(totalTimer < 5 && timer >= 1./m_particlesPerSec) {\n        timer -= 1./m_particlesPerSec;\n        if(m_fs != NULL) {\n            Particle *p = new Particle(m_posn, 1, FLUID);\n            p->v = glm::dvec2(frand(),1);\n            m_fs->addParticle(estimates->size());\n            estimates->append(p);\n        }\n    }\n}\n"
  },
  {
    "path": "cpu/src/fluidemitter.h",
    "content": "#ifndef FLUIDEMITTER_H\n#define FLUIDEMITTER_H\n\n#include \"includes.h\"\n#include \"particle.h\"\n#include \"totalfluidconstraint.h\"\n\n#define H 2.\n#define H2 4.\n#define H6 64.\n#define H9 512.\n\nclass FluidEmitter\n{\npublic:\n    FluidEmitter(glm::dvec2 posn, double particlesPerSec, TotalFluidConstraint *fs);\n    virtual ~FluidEmitter();\n    void tick(QList<Particle *> *estimates, double secs);\n    QList<Particle *> *getParticles();\n    inline glm::dvec2 getPosn() { return m_posn; }\n\nprivate:\n    glm::dvec2 m_posn;\n    double m_particlesPerSec;\n    double timer;\n    double totalTimer;\n    TotalFluidConstraint *m_fs;\n    QList<Particle *> grains;\n};\n\n#endif // FLUIDEMITTER_H\n"
  },
  {
    "path": "cpu/src/includes.h",
    "content": "#ifndef INCLUDES_H\n#define INCLUDES_H\n\n#define GLM_FORCE_RADIANS\n\n// Standard includes\n#include <stdlib.h>\n#include <iostream>\n\n// GL includes\n#define GL_GLEXT_PROTOTYPES\n#include <qgl.h>\n#include <GL/glu.h>\n\n// GLM includes\n#include <glm/vec2.hpp>\n#include <glm.hpp>\n#include <glm/gtx/rotate_vector.hpp>\n\n// Qt data includes\n#include <QList>\n#include <QHash>\n\n// Generally helpful functions\ninline float frand() { return (double)rand() / (double)RAND_MAX; }\ninline float urand(double a, double b) { return a + (b - a) * frand(); }\n\nusing namespace std;\n\ninline void printVec(const glm::dvec2 v) {\n    cout << \"(\" << v.x << \", \" << v.y << \")\" << endl;\n}\n\n#define EPSILON .0001\n\n#define D2R(d) (d * M_PI / 180)\n#define R2D(r) (r * 180 / M_PI)\n\n#endif // INCLUDES_H\n"
  },
  {
    "path": "cpu/src/main.cpp",
    "content": "#include <QtGui/QApplication>\n#include \"mainwindow.h\"\n\nint main(int argc, char *argv[])\n{\n    QApplication a(argc, argv);\n    MainWindow w;\n\n    // We cannot use w.showFullscreen() here because on Linux that creates the\n    // window behind all other windows, so we have to set it to fullscreen after\n    // it has been shown.\n\n    w.setFixedSize(800, 800);\n    w.show();\n//    w.setWindowState(w.windowState() | Qt::WindowFullScreen); // Comment out this line to have a windowed 800x600 game on startup.\n\n    return a.exec();\n}\n\n"
  },
  {
    "path": "cpu/src/mainwindow.cpp",
    "content": "#include \"mainwindow.h\"\n#include \"ui_mainwindow.h\"\n\nMainWindow::MainWindow(QWidget *parent) :\n    QMainWindow(parent),\n    ui(new Ui::MainWindow)\n{\n    ui->setupUi(this);\n}\n\nMainWindow::~MainWindow()\n{\n    delete ui;\n}\n\n"
  },
  {
    "path": "cpu/src/mainwindow.h",
    "content": "#ifndef MAINWINDOW_H\n#define MAINWINDOW_H\n\n#include <QMainWindow>\n\nnamespace Ui {\n    class MainWindow;\n}\n\nclass MainWindow : public QMainWindow\n{\n    Q_OBJECT\n\npublic:\n    explicit MainWindow(QWidget *parent = 0);\n    ~MainWindow();\n\nprivate:\n    Ui::MainWindow *ui;\n};\n\n#endif // MAINWINDOW_H\n\n"
  },
  {
    "path": "cpu/src/mainwindow.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>MainWindow</class>\n <widget class=\"QMainWindow\" name=\"MainWindow\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>800</width>\n    <height>600</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>The mighty Greek hero Particles!</string>\n  </property>\n  <widget class=\"QWidget\" name=\"centralWidget\">\n   <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\n    <property name=\"margin\">\n     <number>0</number>\n    </property>\n    <item>\n     <widget class=\"View\" name=\"view\" native=\"true\"/>\n    </item>\n   </layout>\n  </widget>\n </widget>\n <layoutdefault spacing=\"6\" margin=\"11\"/>\n <customwidgets>\n  <customwidget>\n   <class>View</class>\n   <extends>QGLWidget</extends>\n   <header>view.h</header>\n  </customwidget>\n </customwidgets>\n <resources/>\n <connections/>\n</ui>\n\n"
  },
  {
    "path": "cpu/src/opensmokeemitter.cpp",
    "content": "#include \"opensmokeemitter.h\"\n\nOpenSmokeEmitter::OpenSmokeEmitter(glm::dvec2 posn, double particlesPerSec, GasConstraint *gs) :\n    m_posn(posn), m_particlesPerSec(particlesPerSec), m_gs(gs)\n{\n    timer = 0;\n}\n\nOpenSmokeEmitter::~OpenSmokeEmitter() {\n//    for(int i = m_particles.size()-1; i >= 0; i--) {\n//        Particle *p = m_particles.at(i);\n//        m_particles.removeAt(i);\n//        delete(p);\n//    }\n}\n\nvoid OpenSmokeEmitter::tick(QList<Particle *> *estimates, double secs) {\n    timer += secs;\n    while(timer >= 1./m_particlesPerSec) {\n        timer -= 1./m_particlesPerSec;\n        Particle *p = new Particle(m_posn, .1, GAS);\n        m_particles.append(p);\n        if(m_gs != NULL) {\n            p = new Particle(m_posn, 1, GAS);\n            m_gs->addParticle(p, estimates->size());\n            estimates->append(p);\n        }\n    }\n    for(Particle *p: m_particles) {\n        if(p->ph == FLUID || p->ph == GAS) {\n            p->v = glm::dvec2();\n            double sum = 0;\n            for(Particle *n: *estimates) {\n                glm::dvec2 r = p->p - n->p;\n                double p6 = poly6(glm::dot(r,r));\n                p->v += n->v * p6;\n                sum += p6;\n            }\n\n            if(sum > 0)\n                p->p += p->v * secs / sum;\n        }\n    }\n}\n\nQList<Particle *> *OpenSmokeEmitter::getParticles()\n{\n    return &m_particles;\n}\n\ndouble OpenSmokeEmitter::poly6(double r2)\n{\n    if(r2 >= H2) return 0;\n    double term2 = (H2 - r2);\n    return (315. / (64. * M_PI * H9)) * (term2 * term2 * term2);\n}\n\nglm::dvec2 OpenSmokeEmitter::spikyGrad(const glm::dvec2 &r, double rlen2)\n{\n    if(rlen2 >= H) return glm::dvec2();\n    if(rlen2 == 0) return glm::dvec2();\n    return -glm::normalize(r) * (45. / (M_PI * H6)) * (H - rlen2) * (H - rlen2);\n//    return -r / (H*H*rlen);\n}\n"
  },
  {
    "path": "cpu/src/opensmokeemitter.h",
    "content": "#ifndef SMOKEEMITTER_H\n#define SMOKEEMITTER_H\n\n#include \"includes.h\"\n#include \"particle.h\"\n#include \"gasconstraint.h\"\n\n#define H 2.\n#define H2 4.\n#define H6 64.\n#define H9 512.\n\nclass OpenSmokeEmitter\n{\npublic:\n    OpenSmokeEmitter(glm::dvec2 posn, double particlesPerSec, GasConstraint *gs);\n    virtual ~OpenSmokeEmitter();\n    void tick(QList<Particle *> *estimates, double secs);\n    QList<Particle *> *getParticles();\n    inline glm::dvec2 getPosn() { return m_posn; }\n\nprivate:\n    double poly6(double r2);\n    glm::dvec2 spikyGrad(const glm::dvec2 &r, double rlen2);\n\n    glm::dvec2 m_posn;\n    double m_particlesPerSec;\n    QList<Particle *> m_particles;\n    double timer;\n    GasConstraint *m_gs;\n};\n\n#endif // SMOKEEMITTER_H\n"
  },
  {
    "path": "cpu/src/particle.h",
    "content": "#ifndef PARTICLE_H\n#define PARTICLE_H\n\n#include \"includes.h\"\n\n#define PARTICLE_RAD .25\n#define PARTICLE_DIAM .5\n\n// Phase of mass for particles\nenum Phase {\n    SOLID,\n    FLUID,\n    GAS,\n    NUM_PHASES\n};\n\nstruct Body;\nstruct SDFData;\n\n// Individual particle representation\nstruct Particle\n{\n    glm::dvec2 p, ep, v, f; // position, guess position, and velocity\n    double imass, tmass, sFriction, kFriction, t; // inverse mass, temporary height-scaled mass, coeffs of friction\n    int bod; // body (if any) this particle belongs to, for disabling collisions\n    Phase ph; // phase of this particle\n\n    Particle()\n        : p(glm::dvec2()), v(glm::dvec2()), ph(NUM_PHASES) { init(0); }\n\n    Particle(glm::dvec2 pos, double mass, Phase phase = SOLID)\n        : p(pos), v(glm::dvec2()), ph(phase) { init(mass); }\n\n    Particle(glm::dvec2 pos, glm::dvec2 vel, double mass, Phase phase)\n        : p(pos), v(vel), ph(phase) { init(mass); }\n\n    void init(double mass) {\n        t = 4.;\n        ep = glm::dvec2();\n        bod = -1;\n\n        if (mass <= 0) {\n            imass = -mass;\n        } else {\n            imass = 1. / mass;\n        }\n        tmass = imass;\n\n        f = glm::dvec2();\n        sFriction = 0;\n        kFriction = 0; // usually smaller the coefficient of static friction\n    }\n\n    inline void setStatic() { imass = 0.; }\n\n    inline glm::dvec2 guess(double seconds) {\n        return imass == 0. ? p : p + seconds * v;\n    }\n\n    inline void confirmGuess() {\n        if (glm::length(ep - p) < EPSILON) {\n            v = glm::dvec2(0,0); return;\n        }\n        p = ep;\n    }\n\n    void scaleMass() {\n        if (imass != 0.0) {\n            tmass = 1. / ((1. / imass) * exp(-p.y));\n        } else {\n            tmass = 0.0;\n        }\n    }\n\n    // Used for stabilization-related constraints\n    inline glm::dvec2 getP(bool stabile) { return stabile ? p : ep; }\n\n    SDFData getSDFData(QList<Body *> *bodies, int idx);\n};\n\n// Signed distance field data for rigid-body collisions\nstruct SDFData {\n    SDFData()\n        : gradient(glm::dvec2()), distance(-1.0) {}\n\n    SDFData(const glm::dvec2 grad, double dist)\n        : gradient(grad), distance(dist) {}\n\n    inline void rotate(double angle) { gradient = glm::rotate(gradient, angle); }\n\n    glm::dvec2 gradient;\n    double distance;\n};\n\n// Groups of constraints to be solved together\nenum ConstraintGroup {\n    STABILIZATION,\n    CONTACT,\n    STANDARD,\n    SHAPE,\n    NUM_CONSTRAINT_GROUPS\n};\n\n// Abstract superclass of all constraint types\nclass Constraint\n{\npublic:\n    Constraint() : stiffness(1) {}\n    virtual ~Constraint() {}\n\n    virtual void draw(QList<Particle *> *particles) = 0;\n\n    // For iterative solving of constraints\n    virtual void project(QList<Particle *> *estimates, int *counts) = 0;\n\n    // For matrix-oriented solving of constraints\n    virtual double evaluate(QList<Particle *> *estimates) = 0;\n    virtual glm::dvec2 gradient(QList<Particle *> *estimates, int respect) = 0;\n    virtual void updateCounts(int *counts) = 0;\n\nprotected:\n    double stiffness;\n};\n\n// A single rigid body\nstruct Body\n{\n    virtual ~Body() { delete shape; }\n    QList<int> particles; // index into global particles list\n    QHash<int, glm::dvec2> rs; // map from global particles index to r vector\n    QHash<int, SDFData> sdf; // map from global particles index to SDF data\n    Constraint *shape;\n    glm::dvec2 center; // center of mass\n    double imass, angle; // total inverse mass\n\n    void updateCOM(QList<Particle *> *estimates, bool useEstimates = true);\n    void computeRs(QList<Particle *> *estimates);\n};\n\n#endif // PARTICLE_H\n"
  },
  {
    "path": "cpu/src/simulation.cpp",
    "content": "#include \"simulation.h\"\n\n#include \"distanceconstraint.h\"\n#include \"totalshapeconstraint.h\"\n#include \"boundaryconstraint.h\"\n#include \"contactconstraint.h\"\n#include \"rigidcontactconstraint.h\"\n#include \"totalfluidconstraint.h\"\n#include \"gasconstraint.h\"\n\nSimulation::Simulation()\n{\n    m_counts = NULL;\n    init(WRECKING_BALL);\n    debug = true;\n}\n\nSimulation::~Simulation()\n{\n    clear();\n}\n\nvoid Simulation::clear() {\n    for(int i = m_particles.size()-1; i >= 0; i--) {\n        Particle *p = m_particles.at(i);\n        m_particles.removeAt(i);\n        delete(p);\n    }\n    for(int i = m_smokeEmitters.size()-1; i >= 0; i--) {\n        OpenSmokeEmitter *p = m_smokeEmitters.at(i);\n        m_smokeEmitters.removeAt(i);\n        delete(p);\n    }\n    for(int i = m_fluidEmitters.size()-1; i >= 0; i--) {\n        FluidEmitter *p = m_fluidEmitters.at(i);\n        m_fluidEmitters.removeAt(i);\n        delete(p);\n    }\n    for(int i = m_bodies.size()-1; i >= 0; i--) {\n        Body *b = m_bodies.at(i);\n        m_bodies.removeAt(i);\n        delete(b);\n    }\n    for (int i = 0; i < NUM_CONSTRAINT_GROUPS; i++) {\n        if(m_globalConstraints.contains((ConstraintGroup) i)) {\n            QList<Constraint *> group = m_globalConstraints[(ConstraintGroup) i];\n            for (int j = group.size()-1; j >=0; j--) {\n                Constraint *c = group.at(j);\n                for (int k = 0; k < NUM_CONSTRAINT_GROUPS; k++) {\n                    if(m_globalConstraints.contains((ConstraintGroup) k)) {\n                        m_globalConstraints[(ConstraintGroup) k].removeAll(c);\n                    }\n                }\n                delete(c);\n            }\n        }\n    }\n\n    if (m_counts) {\n        delete[] m_counts;\n    }\n}\n\nvoid Simulation::init(SimulationType type)\n{\n    this->clear();\n\n    // Default gravity value\n    m_gravity = glm::dvec2(0,-9.8);\n\n    switch (type) {\n    case FRICTION_TEST:\n        initFriction(); break;\n    case SDF_TEST:\n        initSdf(); break;\n    case GRANULAR_TEST:\n        initGranular(); break;\n    case STACKS_TEST:\n        initBoxes(); break;\n    case WALL_TEST:\n        initWall(); break;\n    case PENDULUM_TEST:\n        initPendulum(); break;\n    case ROPE_TEST:\n        initRope(); break;\n    case FLUID_TEST:\n        initFluid(); break;\n    case FLUID_SOLID_TEST:\n        initFluidSolid(); break;\n    case GAS_ROPE_TEST:\n        initRopeGas(); break;\n    case WATER_BALLOON_TEST:\n        initWaterBalloon(); break;\n    case CRADLE_TEST:\n        initNewtonsCradle(); break;\n    case SMOKE_OPEN_TEST:\n        initSmokeOpen(); break;\n    case SMOKE_CLOSED_TEST:\n        initSmokeClosed(); break;\n    case VOLCANO_TEST:\n        initVolcano(); break;\n    case WRECKING_BALL:\n        initWreckingBall(); break;\n    default:\n        initBoxes(); break;\n    }\n\n    // Set up the M^-1 matrix\n    m_standardSolver.setupM(&m_particles);\n\n    m_counts = new int[m_particles.size()];\n}\n\n// (#) in the main simulation loop refer to lines from the main loop in the paper\nvoid Simulation::tick(double seconds)\n{\n    QHash<ConstraintGroup, QList<Constraint *> > constraints;\n\n    // Add all rigid body shape constraints\n    for (int i = 0; i < m_bodies.size(); i++) {\n        Body *b = m_bodies[i];\n        if (TotalShapeConstraint *c = dynamic_cast<TotalShapeConstraint *>(b->shape)) {\n            constraints[SHAPE].append(c);\n        } else {\n            cout << \"Rigid body's attached constraint was not a shape constraint.\" << endl;\n            exit(1);\n        }\n    }\n\n    // Add all other global constraints\n    for (int i = 0; i < m_globalConstraints.size(); i++) {\n        QList<Constraint *> group = m_globalConstraints[(ConstraintGroup) i];\n        for (int j = 0; j < group.size(); j++) {\n            constraints[(ConstraintGroup) i].append(group.at(j));\n        }\n    }\n\n    // (1) For all particles\n    for (int i = 0; i < m_particles.size(); i++) {\n        Particle *p = m_particles[i];\n\n        // (2) Apply forces\n        glm::dvec2 myGravity = m_gravity;\n        if(p->ph == GAS) myGravity *= ALPHA;\n//        for(OpenSmokeEmitter *e: m_emitters) {\n//            for(Particle *p: m_particles) {\n//                if(glm::distance(p->p, e->getPosn()) < 1) {\n//                    p->f += glm::dvec2(0,.03);\n//                }\n//            }\n//        }\n        p->v = p->v + seconds * myGravity + seconds * p->f;\n        p->f = glm::dvec2();\n\n        // (3) Predict positions, reset n\n        p->ep = p->guess(seconds);\n        m_counts[i] = 0;\n\n        // (4) Apply mass scaling (used by certain constraints)\n        p->scaleMass();\n    }\n    // (5) End for\n\n    m_contactSolver.setupM(&m_particles, true);\n\n    // (6) For all particles\n    for (int i = 0; i < m_particles.size(); i++) {\n        Particle *p = m_particles[i];\n\n        // (7) Find neighboring particles and solid contacts, naive solution\n        for (int j = i + 1; j < m_particles.size(); j++) {\n            Particle *p2 = m_particles[j];\n\n            // Skip collision between two immovables\n            if (p->imass == 0 && p2->imass == 0) {\n                continue;\n\n            // Skip collisions betwee particles in the same rigid body\n            } else if (p->ph == SOLID && p2->ph == SOLID && p->bod == p2->bod && p->bod != -1) {\n                continue;\n            } else {\n\n                // Collision happens when circles overlap\n                double dist = glm::distance(p->ep, p2->ep);\n                if (dist < PARTICLE_DIAM - EPSILON) {\n\n                    // Rigid contact constraints (which include friction) apply to solid-solid contact\n                    if (p->ph == SOLID && p2->ph == SOLID) {\n                        constraints[CONTACT].append(new RigidContactConstraint(i, j, &m_bodies));\n#ifdef USE_STABILIZATION\n                        constraints[STABILIZATION].append(new RigidContactConstraint(i, j, &m_bodies, true));\n#endif\n                    // Regular contact constraints (which have no friction) apply to other solid-other contact\n                    } else if (p->ph == SOLID || p2->ph == SOLID) {\n                        constraints[CONTACT].append(new ContactConstraint(i, j));\n                    }\n                }\n            }\n        }\n\n        // (8) Find solid boundary contacts\n        if (p->ep.x < m_xBoundaries.x + PARTICLE_RAD) {\n            constraints[CONTACT].append(new BoundaryConstraint(i, m_xBoundaries.x, true, true));\n#ifdef USE_STABILIZATION\n            constraints[STABILIZATION].append(new BoundaryConstraint(i, m_xBoundaries.x, true, true, true));\n#endif\n        } else if (p->ep.x > m_xBoundaries.y - PARTICLE_RAD) {\n            constraints[CONTACT].append(new BoundaryConstraint(i, m_xBoundaries.y, true, false));\n#ifdef USE_STABILIZATION\n            constraints[STABILIZATION].append(new BoundaryConstraint(i, m_xBoundaries.y, true, false, true));\n#endif\n        }\n\n        if (p->ep.y < m_yBoundaries.x + PARTICLE_RAD) {\n            constraints[CONTACT].append(new BoundaryConstraint(i, m_yBoundaries.x, false, true));\n#ifdef USE_STABILIZATION\n            constraints[STABILIZATION].append(new BoundaryConstraint(i, m_yBoundaries.x, false, true, true));\n#endif\n        } else if (p->ep.y > m_yBoundaries.y - PARTICLE_RAD) {\n            constraints[CONTACT].append(new BoundaryConstraint(i, m_yBoundaries.y, false, false));\n#ifdef USE_STABILIZATION\n            constraints[STABILIZATION].append(new BoundaryConstraint(i, m_yBoundaries.y, false, false, true));\n#endif\n        }\n    }\n    // (9) End for\n\n    m_contactSolver.setupSizes(m_particles.size(), &constraints[STABILIZATION]);\n\n#ifdef ITERATIVE\n\n    // (17) For constraint group\n    for (int j = 0; j < (int) NUM_CONSTRAINT_GROUPS; j++) {\n        ConstraintGroup g = (ConstraintGroup) j;\n\n        // Skip the stabilization constraints\n        if (g == STABILIZATION) {\n            continue;\n        }\n\n        //  (18, 19, 20) Update n based on constraints in g\n        for (int k = 0; k < constraints[g].size(); k++) {\n            constraints[g].at(k)->updateCounts(m_counts);\n        }\n    }\n\n#endif\n\n#ifdef USE_STABILIZATION\n\n    // (10) For stabilization iterations\n    for (int i = 0; i < STABILIZATION_ITERATIONS; i++) {\n\n#ifdef ITERATIVE\n        // (11, 12, 13, 14) Solve contact constraints and update p, ep, and n\n        for (int k = 0; k < constraints[STABILIZATION].size(); k++) {\n            constraints[STABILIZATION].at(k)->project(&m_particles, m_counts);\n        }\n#else\n        // (11, 12, 13, 14) Solve contact constraints and update p, ep, and n\n        if (constraints[STABILIZATION].size() > 0) {\n            m_contactSolver.solveAndUpdate(&m_particles, &constraints[STABILIZATION], true);\n        } else {\n            break;\n        }\n#endif\n\n    }\n    // (15) End for\n\n#endif\n\n#ifdef ITERATIVE\n\n    // (16) For solver iterations\n    for (int i = 0; i < SOLVER_ITERATIONS; i++) {\n\n        // (17) For constraint group\n        for (int j = 0; j < (int) NUM_CONSTRAINT_GROUPS; j++) {\n            ConstraintGroup g = (ConstraintGroup) j;\n\n            // Skip the stabilization constraints\n            if (g == STABILIZATION) {\n                continue;\n            }\n\n            //  (18, 19, 20) Solve constraints in g and update ep\n            for (int k = 0; k < constraints[g].size(); k++) {\n                constraints[g].at(k)->project(&m_particles, m_counts);\n            }\n        }\n    }\n\n#else\n\n    m_standardSolver.setupSizes(m_particles.size(), &constraints[STANDARD]);\n    m_contactSolver.setupSizes(m_particles.size(), &constraints[CONTACT]);\n\n    // (16) For solver iterations\n    for (int i = 0; i < SOLVER_ITERATIONS; i++) {\n\n        // (17, 18, 19, 20) for constraint group, solve constraints and update ep\n        if (constraints[CONTACT].size() > 0) {\n            m_contactSolver.solveAndUpdate(&m_particles, &constraints[CONTACT]);\n        }\n\n        if (constraints[STANDARD].size() > 0) {\n            m_standardSolver.solveAndUpdate(&m_particles, &constraints[STANDARD]);\n        }\n\n        if (constraints[SHAPE].size() > 0) {\n            for (int j = 0; j < constraints[SHAPE].size(); j++) {\n                constraints[SHAPE][j]->project(&m_particles, m_counts);\n            }\n        }\n        // (21) End for\n    }\n    // (22) End for\n#endif\n\n    // (23) For all particles\n    for (int i = 0; i < m_particles.size(); i++) {\n        Particle *p = m_particles[i];\n\n        // (24) Update velocities\n        p->v = (p->ep - p->p) / seconds;\n\n        // (25, 26) Advect diffuse particles, apply internal forces\n        /// TODO\n\n        // (27) Update positions or apply sleeping\n        p->confirmGuess();\n    }\n    // (28) End for\n\n    // Delete temporary conact constraints\n    for(int i = constraints[CONTACT].size()-1; i >= 0; i--) {\n        Constraint *c = constraints[CONTACT].at(i);\n        constraints[CONTACT].removeAt(i);\n        delete(c);\n    }\n    for(int i = constraints[STABILIZATION].size()-1; i >= 0; i--) {\n        Constraint *c = constraints[STABILIZATION].at(i);\n        constraints[STABILIZATION].removeAt(i);\n        delete(c);\n    }\n\n    for(OpenSmokeEmitter *e: m_smokeEmitters) {\n        e->tick(&m_particles, seconds);\n        // (8) Find solid boundary contacts\n        for(Particle *p: *(e->getParticles())) {\n            if (p->p.x < m_xBoundaries.x) {\n                p->p.x = m_xBoundaries.x;\n            } else if (p->p.x > m_xBoundaries.y) {\n                p->p.x = m_xBoundaries.y;\n            }\n            if (p->p.y < m_yBoundaries.x) {\n                p->p.y = m_yBoundaries.x;\n            } else if (p->p.y > m_yBoundaries.y) {\n                p->p.y = m_yBoundaries.y;\n            }\n        }\n    }\n    for(FluidEmitter *e: m_fluidEmitters) {\n        e->tick(&m_particles, seconds);\n    }\n    delete[] m_counts;\n    m_counts = new int[m_particles.size()];\n}\n\nBody *Simulation::createRigidBody(QList<Particle *> *verts, QList<SDFData> *sdfData)\n{\n    if(verts->size() <= 1) {\n        cout << \"Rigid bodies must be at least 2 points.\" << endl;\n        exit(1);\n    }\n\n    // Compute the total mass, add all the particles to the system and the body\n    Body *body = new Body(); int offset = m_particles.size(), bodyIdx = m_bodies.size();\n    double totalMass = 0.0;\n    for (int i = 0; i < verts->size(); i++) {\n        Particle *p = verts->at(i);\n        p->bod = bodyIdx;\n        p->ph = SOLID;\n\n        if (p->imass == 0.0) {\n            cout << \"A rigid body cannot have a point of infinite mass.\" << endl;\n            exit(1);\n        }\n\n        totalMass += (1.0 / p->imass);\n\n        m_particles.append(p);\n        body->particles.append(i + offset);\n        body->sdf[i + offset] = sdfData->at(i);\n    }\n\n    // Update the body's global properties, including initial r_i vectors\n    body->imass = 1.0 / totalMass;\n    body->updateCOM(&m_particles, false);\n    body->computeRs(&m_particles);\n    body->shape = new TotalShapeConstraint(body);\n\n    m_bodies.append(body);\n    return body;\n}\n\nGasConstraint *Simulation::createGas(QList<Particle *> *verts, double density, bool open=false)\n{\n    int offset = m_particles.size();\n    int bod = 100 * frand();\n    QList<int> indices;\n    for (int i = 0; i < verts->size(); i++) {\n        Particle *p = verts->at(i);\n        p->ph = GAS;\n        p->bod = bod;\n\n        if (p->imass == 0.0) {\n            cout << \"A fluid cannot have a point of infinite mass.\" << endl;\n            exit(1);\n        }\n\n        m_particles.append(p);\n        indices.append(offset + i);\n    }\n    GasConstraint *gs = new GasConstraint(density, &indices, open);\n    m_globalConstraints[STANDARD].append(gs);\n    return gs;\n}\n\nTotalFluidConstraint *Simulation::createFluid(QList<Particle *> *verts, double density)\n{\n    int offset = m_particles.size();\n    int bod = 100 * frand();\n    QList<int> indices;\n    for (int i = 0; i < verts->size(); i++) {\n        Particle *p = verts->at(i);\n        p->ph = FLUID;\n        p->bod = bod;\n\n        if (p->imass == 0.0) {\n            cout << \"A fluid cannot have a point of infinite mass.\" << endl;\n            exit(1);\n        }\n\n        m_particles.append(p);\n        indices.append(offset + i);\n    }\n    TotalFluidConstraint *fs = new TotalFluidConstraint(density, &indices);\n    m_globalConstraints[STANDARD].append(fs);\n    return fs;\n}\n\nvoid Simulation::createSmokeEmitter(glm::dvec2 posn, double particlesPerSec, GasConstraint *gs)\n{\n    m_smokeEmitters.append(new OpenSmokeEmitter(posn, particlesPerSec, gs));\n}\n\nvoid Simulation::createFluidEmitter(glm::dvec2 posn, double particlesPerSec, TotalFluidConstraint *fs) {\n    m_fluidEmitters.append(new FluidEmitter(posn, particlesPerSec, fs));\n}\n\nvoid Simulation::draw()\n{\n    drawGrid();\n    if (debug) {\n        drawParticles();\n    }\n    drawBodies();\n    drawGlobals();\n    drawSmoke();\n\n    glColor3f(1,1,1);\n    glPointSize(5);\n    glBegin(GL_POINTS);\n    glVertex2f(m_point.x, m_point.y);\n    glEnd();\n}\n\nvoid Simulation::resize(const glm::ivec2 &dim)\n{\n    m_dimensions = dim;\n}\n\nvoid Simulation::drawGrid()\n{\n    glColor3f(.2,.2,.2);\n    glBegin(GL_LINES);\n\n    for (int x = -m_dimensions.x; x <= m_dimensions.x; x++) {\n        glVertex2f(x, -m_dimensions.y);\n        glVertex2f(x, m_dimensions.y);\n    }\n    for (int y = -m_dimensions.y; y <= m_dimensions.y; y++) {\n        glVertex2f(-m_dimensions.y, y);\n        glVertex2f(m_dimensions.y, y);\n    }\n\n    glColor3f(1,1,1);\n\n    glVertex2f(-m_dimensions.x, 0);\n    glVertex2f(m_dimensions.x, 0);\n    glVertex2f(0, -m_dimensions.y);\n    glVertex2f(0, m_dimensions.y);\n\n    glEnd();\n\n    glLineWidth(3);\n    glBegin(GL_LINES);\n    glVertex2f(m_xBoundaries.x, m_yBoundaries.x);\n    glVertex2f(m_xBoundaries.x, m_yBoundaries.y);\n\n    glVertex2f(m_xBoundaries.y, m_yBoundaries.x);\n    glVertex2f(m_xBoundaries.y, m_yBoundaries.y);\n\n    glVertex2f(m_xBoundaries.x, m_yBoundaries.x);\n    glVertex2f(m_xBoundaries.y, m_yBoundaries.x);\n\n    glVertex2f(m_xBoundaries.x, m_yBoundaries.y);\n    glVertex2f(m_xBoundaries.y, m_yBoundaries.y);\n    glEnd();\n    glLineWidth(1);\n}\n\nvoid Simulation::drawParticles()\n{\n    for (int i = 0; i < m_particles.size(); i++) {\n        const Particle *p = m_particles[i];\n\n        if (p->imass == 0.f) {\n            glColor3f(1,0,0);\n        } else if (p->ph == FLUID || p->ph == GAS){\n            glColor3f(0,p->bod / 100., 1-p->bod / 100.);\n        } else if (p->ph == SOLID) {\n            setColor(p->bod, 1);\n        } else {\n            glColor3f(0,0,1);\n        }\n\n        glPushMatrix();\n        glTranslatef(p->p.x, p->p.y, 0);\n        glScalef(PARTICLE_RAD, PARTICLE_RAD, 0);\n        drawCircle();\n        glPopMatrix();\n    }\n\n    glEnd();\n}\n\nvoid Simulation::drawBodies()\n{\n    for (int i = 0; i < m_bodies.size(); i++) {\n        Body *b = m_bodies[i];\n        if (debug) {\n//            b->shape->draw(&m_particles);\n        } else {\n            for (int i = 0; i < b->particles.size(); i++) {\n                Particle *p = m_particles[(b->particles[i])];\n\n                glPushMatrix();\n                glTranslatef(p->p.x, p->p.y, 0);\n                glPushMatrix();\n                glRotatef(R2D(b->angle), 0, 0, 1);\n\n                glEnable(GL_BLEND);\n                setColor(p->bod, .6);\n                glBegin(GL_QUADS);\n                glVertex2f(-PARTICLE_RAD, -PARTICLE_RAD);\n                glVertex2f(-PARTICLE_RAD, PARTICLE_RAD);\n                glVertex2f(PARTICLE_RAD, PARTICLE_RAD);\n                glVertex2f(PARTICLE_RAD, -PARTICLE_RAD);\n                glEnd();\n                glDisable(GL_BLEND);\n\n                glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);\n                glBegin(GL_QUADS);\n                glVertex2f(-PARTICLE_RAD, -PARTICLE_RAD);\n                glVertex2f(-PARTICLE_RAD, PARTICLE_RAD);\n                glVertex2f(PARTICLE_RAD, PARTICLE_RAD);\n                glVertex2f(PARTICLE_RAD, -PARTICLE_RAD);\n                glEnd();\n                glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);\n\n//                glColor3f(0,0,0);\n//                glPopMatrix();\n//                glm::dvec2 s = b->sdf[b->particles[i]].gradient * b->sdf[b->particles[i]].distance;\n//                s = glm::rotate(s, b->angle);\n//                glBegin(GL_LINES);\n//                glVertex2f(0,0);\n//                glVertex2f(s.x, s.y);\n//                glEnd();\n\n                glPopMatrix();\n            }\n        }\n    }\n}\n\nvoid Simulation::drawGlobals()\n{\n    for (int i = 0; i < m_globalConstraints.size(); i++) {\n        for (int j = 0; j < m_globalConstraints[(ConstraintGroup) i].size(); j++) {\n            m_globalConstraints[(ConstraintGroup)i ][j]->draw(&m_particles);\n        }\n    }\n}\n\nvoid Simulation::drawSmoke()\n{\n    glColor3f(1,1,1);\n    glBegin(GL_QUADS);\n    double rad = PARTICLE_RAD/7.;\n    for (int i = 0; i < m_smokeEmitters.size(); i++) {\n        QList<Particle *> *particles = m_smokeEmitters.at(i)->getParticles();\n        for(int j = 0; j < particles->size(); j++) {\n            Particle *p = particles->at(j);\n            glVertex2d(p->p.x-rad, p->p.y-rad);\n            glVertex2d(p->p.x+rad, p->p.y-rad);\n            glVertex2d(p->p.x+rad, p->p.y+rad);\n            glVertex2d(p->p.x-rad, p->p.y+rad);\n//            glPushMatrix();\n//            glTranslatef(p->p.x, p->p.y, 0);\n//            glScalef(PARTICLE_RAD/7., PARTICLE_RAD/7., 0);\n//            drawCircle();\n//            glPopMatrix();\n        }\n    }\n}\n\nvoid Simulation::setColor(int body, float alpha)\n{\n    int choice = abs(body) % 5;\n    if (choice == 0) {\n        glColor4f(1,.7,0,alpha);\n    } else if (choice == 1) {\n        glColor4f(.35,.75,.95,alpha);\n    } else if (choice == 2) {\n        glColor4f(1,.55,.8,alpha);\n    } else if (choice == 3) {\n        glColor4f(.1,.85,.9,alpha);\n    } else {\n        glColor4f(.1,.9,.6,alpha);\n    }\n}\n\nvoid Simulation::drawCircle()\n{\n    glBegin(GL_TRIANGLE_FAN);\n\n    glVertex2f(0,0);\n    for (int f = 0; f <= 32; f++) {\n        double a = f * M_PI / 16.f;\n        glVertex2f(sin(a), cos(a));\n    }\n\n    glEnd();\n}\n\nvoid Simulation::initFriction()\n{\n    m_xBoundaries = glm::dvec2(-20,20);\n    m_yBoundaries = glm::dvec2(0,1000000);\n\n    double root2 = sqrt(2);\n    QList<Particle *> vertices;\n    QList<SDFData> data;\n    data.append(SDFData(glm::normalize(glm::dvec2(-1,-1)), PARTICLE_RAD * root2));\n    data.append(SDFData(glm::normalize(glm::dvec2(-1,1)), PARTICLE_RAD * root2));\n    data.append(SDFData(glm::normalize(glm::dvec2(0,-1)), PARTICLE_RAD));\n    data.append(SDFData(glm::normalize(glm::dvec2(0,1)), PARTICLE_RAD));\n    data.append(SDFData(glm::normalize(glm::dvec2(1,-1)), PARTICLE_RAD * root2));\n    data.append(SDFData(glm::normalize(glm::dvec2(1,1)), PARTICLE_RAD * root2));\n\n    glm::ivec2 dim = glm::ivec2(3,2);\n    for (int x = 0; x < dim.x; x++) {\n        double xVal = PARTICLE_DIAM * ((x % dim.x) - dim.x / 2);\n        for (int y = 0; y < dim.y; y++) {\n            double yVal = (dim.y + (y % dim.y) + 1) * PARTICLE_DIAM;\n            Particle *part =new Particle(glm::dvec2(xVal, yVal), (x == 0 && y == 0 ? 1 : 1.));\n            part->v.x = 5;\n            part->kFriction = .01;\n            part->sFriction = .1;\n            vertices.append(part);\n        }\n    }\n    Body *body = createRigidBody(&vertices, &data);\n}\n\nvoid Simulation::initGranular()\n{\n    m_xBoundaries = glm::dvec2(-100,100);\n    m_yBoundaries = glm::dvec2(-5, 1000);\n    m_gravity = glm::dvec2(0,-9.8);\n\n    for (int i = -15; i <= 15; i++) {\n        for (int j = 0; j < 30; j++) {\n            glm::dvec2 pos = glm::dvec2(i * (PARTICLE_DIAM + EPSILON), pow(j,1.2) * (PARTICLE_DIAM) + PARTICLE_RAD + m_yBoundaries.x);\n            Particle *part= new Particle(pos, 1, SOLID);\n            part->sFriction = .35;\n            part->kFriction = .3;\n            m_particles.append(part);\n        }\n    }\n\n    Particle *jerk = new Particle(glm::dvec2(-25.55, 40), 100.f, SOLID);\n    jerk->v.x = 8.5;\n    m_particles.append(jerk);\n}\n\nvoid Simulation::initSdf()\n{\n    m_xBoundaries = glm::dvec2(-20,20);\n    m_yBoundaries = glm::dvec2(0,1000000);\n\n    int numBoxes = 2;\n    double root2 = sqrt(2);\n    QList<Particle *> vertices;\n    QList<SDFData> data;\n    data.append(SDFData(glm::normalize(glm::dvec2(-1,-1)), PARTICLE_RAD * root2));\n    data.append(SDFData(glm::normalize(glm::dvec2(-1,0)), PARTICLE_RAD));\n    data.append(SDFData(glm::normalize(glm::dvec2(-1,1)), PARTICLE_RAD * root2));\n    data.append(SDFData(glm::normalize(glm::dvec2(1,-1)), PARTICLE_RAD * root2));\n    data.append(SDFData(glm::normalize(glm::dvec2(1,0)), PARTICLE_RAD));\n    data.append(SDFData(glm::normalize(glm::dvec2(1,1)), PARTICLE_RAD * root2));\n\n    glm::ivec2 dim = glm::ivec2(2,3);\n    for (int i = numBoxes - 1; i >= 0; i--) {\n        for (int x = 0; x < dim.x; x++) {\n            double xVal = PARTICLE_DIAM * ((x % dim.x) - dim.x / 2) + i * PARTICLE_RAD;\n            for (int y = 0; y < dim.y; y++) {\n                double yVal = ((40 * i) * dim.y + (y % dim.y) + 1) * PARTICLE_DIAM;\n                Particle *part = new Particle(glm::dvec2(xVal, yVal), 4.);\n                if (i > 0) part->v.y = -120;\n                vertices.append(part);\n            }\n        }\n        Body *body = createRigidBody(&vertices, &data);\n        vertices.clear();\n    }\n}\n\nvoid Simulation::initBoxes()\n{\n    m_xBoundaries = glm::dvec2(-20,20);\n    m_yBoundaries = glm::dvec2(0,1000000);\n\n    int numBoxes = 25, numColumns = 2;\n    double root2 = sqrt(2);\n    QList<Particle *> vertices;\n    QList<SDFData> data;\n    data.append(SDFData(glm::normalize(glm::dvec2(-1,-1)), PARTICLE_RAD * root2));\n    data.append(SDFData(glm::normalize(glm::dvec2(-1,1)), PARTICLE_RAD * root2));\n    data.append(SDFData(glm::normalize(glm::dvec2(0,-1)), PARTICLE_RAD));\n    data.append(SDFData(glm::normalize(glm::dvec2(0,1)), PARTICLE_RAD));\n    data.append(SDFData(glm::normalize(glm::dvec2(1,-1)), PARTICLE_RAD * root2));\n    data.append(SDFData(glm::normalize(glm::dvec2(1,1)), PARTICLE_RAD * root2));\n\n    for (int j = -numColumns; j <= numColumns; j++) {\n        glm::ivec2 dim = glm::ivec2(3,2);\n        for (int i = numBoxes - 1; i >= 0; i--) {\n            for (int x = 0; x < dim.x; x++) {\n                double xVal = j * 4 + PARTICLE_DIAM * ((x % dim.x) - dim.x / 2);\n                for (int y = 0; y < dim.y; y++) {\n                    double yVal = ((2 * i + 1) * dim.y + (y % dim.y) + 1) * PARTICLE_DIAM;\n                    Particle *part = new Particle(glm::dvec2(xVal, yVal), 4.);\n                    part->sFriction = 1.;\n                    part->kFriction = 1.;\n                    vertices.append(part);\n                }\n            }\n            Body *body = createRigidBody(&vertices, &data);\n            vertices.clear();\n        }\n    }\n}\n\nvoid Simulation::initWall()\n{\n    m_xBoundaries = glm::dvec2(-50,50);\n    m_yBoundaries = glm::dvec2(0,1000000);\n\n    glm::dvec2 dim = glm::dvec2(6,2);\n    int height = 11, width = 5;\n    double root2 = sqrt(2);\n    QList<Particle *> vertices;\n    QList<SDFData> data;\n    data.append(SDFData(glm::normalize(glm::dvec2(-1,-1)), PARTICLE_RAD * root2));\n    data.append(SDFData(glm::normalize(glm::dvec2(-1,1)), PARTICLE_RAD * root2));\n\n    for (int i = 0; i < dim.x - 2; i++) {\n        data.append(SDFData(glm::normalize(glm::dvec2(0,-1)), PARTICLE_RAD));\n        data.append(SDFData(glm::normalize(glm::dvec2(0,1)), PARTICLE_RAD));\n    }\n\n    data.append(SDFData(glm::normalize(glm::dvec2(1,-1)), PARTICLE_RAD * root2));\n    data.append(SDFData(glm::normalize(glm::dvec2(1,1)), PARTICLE_RAD * root2));\n\n    for (int j = -width; j <= width; j++) {\n        for (int i = height - 1; i >= 0; i--) {\n            for (int x = 0; x < dim.x; x++) {\n                double num = (i % 2 == 0 ? 3 : -1);\n                double xVal = j * (EPSILON + dim.x / 2.) + PARTICLE_DIAM * (x % (int)dim.x) - num * PARTICLE_RAD;\n                for (int y = 0; y < dim.y; y++) {\n                    double yVal = (i * dim.y + (y % (int)dim.y) + EPSILON) * PARTICLE_DIAM + PARTICLE_RAD;\n                    Particle *part = new Particle(glm::dvec2(xVal, yVal), 1.);\n                    part->sFriction = 1;\n                    part->kFriction = 0;\n                    vertices.append(part);\n                }\n            }\n            Body *body = createRigidBody(&vertices, &data);\n            vertices.clear();\n        }\n    }\n}\n\nvoid Simulation::initPendulum()\n{\n    m_xBoundaries = glm::dvec2(-10,10);\n    m_yBoundaries = glm::dvec2(0,1000000);\n\n    int chainLength = 3;\n    m_particles.append(new Particle(glm::dvec2(0, chainLength * 3 + 6) * PARTICLE_DIAM + glm::dvec2(0,2), 0, SOLID));\n\n    QList<SDFData> data;\n    data.append(SDFData(glm::normalize(glm::dvec2(-1,-1)), PARTICLE_RAD));\n    data.append(SDFData(glm::normalize(glm::dvec2(-1,1)), PARTICLE_RAD));\n    data.append(SDFData(glm::normalize(glm::dvec2(0,-1)), PARTICLE_RAD));\n    data.append(SDFData(glm::normalize(glm::dvec2(0,1)), PARTICLE_RAD));\n    data.append(SDFData(glm::normalize(glm::dvec2(1,-1)), PARTICLE_RAD));\n    data.append(SDFData(glm::normalize(glm::dvec2(1,1)), PARTICLE_RAD));\n\n    QList<Particle *> vertices;\n    double xs[6] = {-1,-1,0,0,1,1};\n\n    for (int i = chainLength; i >= 0; i--) {\n        for (int j = 0; j < 6; j++) {\n            double y = ((i + 1) * 3 + (j % 2)) * PARTICLE_DIAM + 2;\n            Particle *part = new Particle(glm::dvec2(xs[j] * PARTICLE_DIAM, y), 1.);\n            part->v.x = 3;\n            vertices.append(part);\n        }\n        Body *body = createRigidBody(&vertices, &data);\n        vertices.clear();\n\n        if (i < chainLength) {\n            int basePrev = 1 + (chainLength - i - 1) * 6, baseCur = basePrev + 6;\n            m_globalConstraints[STANDARD].append(new DistanceConstraint(baseCur + 1, basePrev, &m_particles));\n            m_globalConstraints[STANDARD].append(new DistanceConstraint(baseCur + 5, basePrev + 4, &m_particles));\n        }\n    }\n\n    m_globalConstraints[STANDARD].append(new DistanceConstraint(0, 4, &m_particles));\n}\n\nvoid Simulation::initRope()\n{\n    double scale = 5.;\n    m_xBoundaries = glm::dvec2(-scale,scale);\n    m_yBoundaries = glm::dvec2(0,1000000);\n\n    double top = 6, dist = PARTICLE_RAD;\n\n    Particle *e1 = new Particle(glm::dvec2(m_xBoundaries.x, top), 0, SOLID);\n    e1->bod = -2;\n    m_particles.append(e1);\n\n    for (double i = m_xBoundaries.x + dist; i < m_xBoundaries.y - dist; i += dist) {\n        Particle *part = new Particle(glm::dvec2(i, top), 1., SOLID);\n        part->bod = -2;\n        m_particles.append(part);\n        m_globalConstraints[STANDARD].append(\n                    new DistanceConstraint(dist, m_particles.size() - 2, m_particles.size() - 1));\n    }\n\n    Particle *e2 = new Particle(glm::dvec2(m_xBoundaries.y, top), 0, SOLID);\n    e2->bod = -2;\n    m_particles.append(e2);\n\n    m_globalConstraints[STANDARD].append(\n                new DistanceConstraint(dist, m_particles.size() - 2, m_particles.size() - 1));\n\n    double delta = .7;\n    QList<Particle *> particles;\n\n    for(double x = -scale; x < scale; x += delta) {\n        for(double y = 10; y < 10 + scale; y += delta) {\n            particles.append(new Particle(glm::dvec2(x,y) + .2 * glm::dvec2(frand() - .5, frand() - .5), 1));\n        }\n    }\n    createFluid(&particles, 1.75);\n}\n\nvoid Simulation::initFluid()\n{\n    double scale = 4., delta = .7;\n    m_gravity = glm::dvec2(0,-9.8);\n    m_xBoundaries = glm::dvec2(-2 * scale,2 * scale);\n    m_yBoundaries = glm::dvec2(-2 * scale, 10 * scale);\n    QList<Particle *> particles;\n\n    double num = 2.;\n    for (int d = 0; d < num; d++) {\n        double start = -2 * scale + 4 * scale * (d / num);\n        for(double x = start; x < start + (4 * scale / num); x += delta) {\n            for(double y = -2 * scale; y < scale; y += delta) {\n                particles.append(new Particle(glm::dvec2(x,y) + .2 * glm::dvec2(frand() - .5, frand() - .5), 1));\n            }\n        }\n        createFluid(&particles, 1 + .75 * d);\n        particles.clear();\n    }\n}\n\nvoid Simulation::initFluidSolid()\n{\n    double scale = 3., delta = .7;\n    m_gravity = glm::dvec2(0, -9.8);\n    m_xBoundaries = glm::dvec2(-2 * scale,2 * scale);\n    m_yBoundaries = glm::dvec2(-2 * scale, 100 * scale);\n    QList<Particle *> particles;\n\n    double num = 1.;\n    for (int d = 0; d < num; d++) {\n        double start = -2 * scale + 4 * scale * (d / num);\n        for(double x = start; x < start + (4 * scale / num); x += delta) {\n            for(double y = -2 * scale; y < 2 * scale; y += delta) {\n                particles.append(new Particle(glm::dvec2(x,y + 3) + .2 * glm::dvec2(frand() - .5, frand() - .5), 1));\n            }\n        }\n        createFluid(&particles, 1. + 1.25 * (d + 1));\n        particles.clear();\n    }\n\n    if(true) {\n        particles.clear();\n        QList<SDFData> data;\n        double root2 = sqrt(2);\n        glm::ivec2 dim = glm::ivec2(5,2);\n        data.append(SDFData(glm::normalize(glm::dvec2(-1,-1)), PARTICLE_RAD * root2));\n        data.append(SDFData(glm::normalize(glm::dvec2(-1,1)), PARTICLE_RAD * root2));\n        for (int i = 0; i < dim.x - 2; i++) {\n            data.append(SDFData(glm::normalize(glm::dvec2(0,-1)), PARTICLE_RAD));\n            data.append(SDFData(glm::normalize(glm::dvec2(0,1)), PARTICLE_RAD));\n        }\n        data.append(SDFData(glm::normalize(glm::dvec2(1,-1)), PARTICLE_RAD * root2));\n        data.append(SDFData(glm::normalize(glm::dvec2(1,1)), PARTICLE_RAD * root2));\n\n        for (int x = 0; x < dim.x; x++) {\n            double xVal = PARTICLE_DIAM * ((x % dim.x) - dim.x / 2);\n            for (int y = 0; y < dim.y; y++) {\n                double yVal = (dim.y + (y % dim.y) + 1) * PARTICLE_DIAM;\n                particles.append(new Particle(glm::dvec2(xVal-3, yVal + 10), 2));\n            }\n        }\n        Body *body = createRigidBody(&particles, &data);\n    }\n\n    if(true) {\n        particles.clear();\n        QList<SDFData> data;\n        double root2 = sqrt(2);\n        glm::ivec2 dim = glm::ivec2(5,2);\n        data.append(SDFData(glm::normalize(glm::dvec2(-1,-1)), PARTICLE_RAD * root2));\n        data.append(SDFData(glm::normalize(glm::dvec2(-1,1)), PARTICLE_RAD * root2));\n        for (int i = 0; i < dim.x - 2; i++) {\n            data.append(SDFData(glm::normalize(glm::dvec2(0,-1)), PARTICLE_RAD));\n            data.append(SDFData(glm::normalize(glm::dvec2(0,1)), PARTICLE_RAD));\n        }\n        data.append(SDFData(glm::normalize(glm::dvec2(1,-1)), PARTICLE_RAD * root2));\n        data.append(SDFData(glm::normalize(glm::dvec2(1,1)), PARTICLE_RAD * root2));\n\n        for (int x = 0; x < dim.x; x++) {\n            double xVal = PARTICLE_DIAM * ((x % dim.x) - dim.x / 2);\n            for (int y = 0; y < dim.y; y++) {\n                double yVal = (dim.y + (y % dim.y) + 1) * PARTICLE_DIAM;\n                particles.append(new Particle(glm::dvec2(xVal+3, yVal + 10), .2));\n            }\n        }\n        Body *body = createRigidBody(&particles, &data);\n    }\n}\n\n\nvoid Simulation::initGas()\n{\n    double scale = 2., delta = .7;\n    m_gravity = glm::dvec2(0, -9.8);\n    m_xBoundaries = glm::dvec2(-2  * scale,2 * scale);\n    m_yBoundaries = glm::dvec2(-2  * scale, 10 * scale);\n    QList<Particle *> particles;\n\n    double num = 2.;\n    for (int d = 0; d < num; d++) {\n        double start = -2 * scale + 4 * scale * (d / num);\n        for(double x = start; x < start + (4 * scale / num); x += delta) {\n            for(double y = -2 * scale; y < 2 * scale; y += delta) {\n                particles.append(new Particle(glm::dvec2(x,y) + .2 * glm::dvec2(frand() - .5, frand() - .5), 1));\n            }\n        }\n        createGas(&particles, .75 + 3*(d));\n        particles.clear();\n    }\n\n    scale = 3;\n    for (int d = 0; d < num; d++) {\n        double start = -2 * scale + 4 * scale * (d / num);\n        for(double x = start; x < start + (4 * scale / num); x += delta) {\n            for(double y = -2 * scale; y < 2 * scale; y += delta) {\n                particles.append(new Particle(glm::dvec2(x,y+10) + .2 * glm::dvec2(frand() - .5, frand() - .5), 1));\n            }\n        }\n        createFluid(&particles, 4. + .75 * (d + 1));\n        particles.clear();\n    }\n}\n\nvoid Simulation::initWaterBalloon()\n{\n    double scale = 10.;\n    m_xBoundaries = glm::dvec2(-scale,scale);\n    m_yBoundaries = glm::dvec2(-10,1000000);\n\n    double samples = 60, da = 360. / samples;\n\n    for (int i = 0; i < samples; i++) {\n        double angle = D2R(i * da);\n        Particle *part = new Particle(glm::dvec2(sin(angle), cos(angle)) * 3., 1);\n        part->bod = -2;\n        int idx = m_particles.size();\n        m_particles.append(part);\n\n        if (i > 0) {\n            m_globalConstraints[STANDARD].append(\n                        new DistanceConstraint(idx, idx - 1, &m_particles));\n        }\n    }\n    m_globalConstraints[STANDARD].append(\n                new DistanceConstraint(0, m_particles.size() - 1, &m_particles));\n    int idk = m_particles.size();\n\n    for (int i = 0; i < samples; i++) {\n        double angle = D2R(i * da);\n        Particle *part = new Particle(glm::dvec2(sin(angle), cos(angle) + 3) * 3., 1);\n        part->bod = -3;\n        int idx = m_particles.size();\n        m_particles.append(part);\n\n        if (i > 0) {\n            m_globalConstraints[STANDARD].append(\n                        new DistanceConstraint(idx, idx - 1, &m_particles));\n        }\n    }\n    m_globalConstraints[STANDARD].append(\n                new DistanceConstraint(idk, m_particles.size() - 1, &m_particles));\n\n    double delta = 1.5 * PARTICLE_RAD;\n    QList<Particle *> particles;\n\n    for(double x = -2; x <= 2; x += delta) {\n        for(double y = -2; y <= 2; y += delta) {\n            particles.append(new Particle(glm::dvec2(x,y) + .2 * glm::dvec2(frand() - .5, frand() - .5), 1));\n        }\n    }\n    createFluid(&particles, 1.75);\n\n    particles.clear();\n    for(double x = -2; x <= 2; x += delta) {\n        for(double y = -2; y <= 2; y += delta) {\n            particles.append(new Particle(glm::dvec2(x,y + 9) + .2 * glm::dvec2(frand() - .5, frand() - .5), 1));\n        }\n    }\n    createFluid(&particles, 1.75);\n}\n\nvoid Simulation::initNewtonsCradle()\n{\n    m_xBoundaries = glm::dvec2(-10,10);\n    m_yBoundaries = glm::dvec2(-5,1000000);\n\n    int n = 2;\n\n    for (int i = -n; i <= n; i++) {\n        int idx = m_particles.size();\n        m_particles.append(new Particle(glm::dvec2(i * PARTICLE_DIAM, 0), 0.f));\n        if (i != -n) {\n            m_particles.append(new Particle(glm::dvec2(i * PARTICLE_DIAM, -3), 1.f));\n        } else {\n            Particle *part = new Particle(glm::dvec2(i * PARTICLE_DIAM - 3, 0), 1.f);\n            m_particles.append(part);\n        }\n        m_globalConstraints[STANDARD].append(new DistanceConstraint(idx, idx+1, &m_particles));\n    }\n}\n\nvoid Simulation::initSmokeOpen()\n{\n    double scale = 2., delta = .63;\n    m_gravity = glm::dvec2(0, -9.8);\n    m_xBoundaries = glm::dvec2(-3  * scale,3 * scale);\n    m_yBoundaries = glm::dvec2(-2  * scale,100 * scale);\n    QList<Particle *> particles;\n\n    double start = -2 * scale;\n    for(double x = start; x < start + (4 * scale); x += delta) {\n        for(double y = -2 * scale; y < 2 * scale; y += delta) {\n            particles.append(new Particle(glm::dvec2(x,y) + .2 * glm::dvec2(frand() - .5, frand() - .5), 1));\n        }\n    }\n    GasConstraint *gs = createGas(&particles, 1.5, true);\n    particles.clear();\n\n    createSmokeEmitter(glm::dvec2(0,-2*scale+1), 15, gs);\n}\n\nvoid Simulation::initSmokeClosed()\n{\n    double scale = 2., delta = .63;\n    m_gravity = glm::dvec2(0, -9.8);\n    m_xBoundaries = glm::dvec2(-2  * scale,2 * scale);\n    m_yBoundaries = glm::dvec2(-2  * scale,2 * scale);\n    QList<Particle *> particles;\n\n    double start = -2 * scale;\n    for(double x = start; x < start + (4 * scale); x += delta) {\n        for(double y = -2 * scale; y < 2 * scale; y += delta) {\n            particles.append(new Particle(glm::dvec2(x,y) + .2 * glm::dvec2(frand() - .5, frand() - .5), 1));\n        }\n    }\n    GasConstraint *gs = createGas(&particles, 1.5, false);\n    particles.clear();\n\n    createSmokeEmitter(glm::dvec2(0,-2*scale+1), 15, NULL);\n}\n\nvoid Simulation::initRopeGas()\n{\n    double scale = 2., delta = .63;\n    m_gravity = glm::dvec2(0, -9.8);\n    m_xBoundaries = glm::dvec2(-4  * scale,4 * scale);\n    m_yBoundaries = glm::dvec2(-2  * scale,100 * scale);\n\n    double top = 12, dist = PARTICLE_RAD;\n\n    Particle *e1 = new Particle(glm::dvec2(0, top), 0, SOLID);\n    e1->bod = -2;\n    m_particles.append(e1);\n\n    for (double i = 0 + dist; i < 4*scale - dist; i += dist) {\n        Particle *part = new Particle(glm::dvec2(i, top), 2, SOLID);\n        part->bod = -2;\n        m_particles.append(part);\n        m_globalConstraints[STANDARD].append(\n                    new DistanceConstraint(dist, m_particles.size() - 2, m_particles.size() - 1));\n    }\n\n//    Particle *e2 = new Particle(glm::dvec2(2*scale, top), 0, SOLID);\n//    e2->bod = -2;\n//    m_particles.append(e2);\n\n    m_globalConstraints[STANDARD].append(\n                new DistanceConstraint(dist, m_particles.size() - 2, m_particles.size() - 1));\n\n    QList<Particle *> particles;\n\n    double start = -.5 * scale;\n    for(double x = start; x < start + (1 * scale); x += delta) {\n        for(double y = -.5 * scale; y < .5 * scale; y += delta) {\n            particles.append(new Particle(glm::dvec2(x,y) + .2 * glm::dvec2(frand() - .5, frand() - .5), 1));\n        }\n    }\n    GasConstraint *gs = createGas(&particles, 1.5, true);\n\n    createSmokeEmitter(glm::dvec2(0,0), 15, gs);\n    particles.clear();\n}\n\nvoid Simulation::initVolcano()\n{\n    double scale = 10., delta = .2;\n\n    for(double x = 1.; x <= scale; x+=delta) {\n        m_particles.append(new Particle(glm::dvec2(-x,scale-x), 0));\n        m_particles.append(new Particle(glm::dvec2(x,scale-x), 0));\n    }\n\n    m_gravity = glm::dvec2(0,-9.8);\n    m_xBoundaries = glm::dvec2(-2 * scale,2 * scale);\n    m_yBoundaries = glm::dvec2(0, 10 * scale);\n    QList<Particle *> particles;\n\n    delta = .8;\n    for(double y = 0.; y < scale-1.; y+=delta) {\n        for(double x = 0.; x < scale-y-1; x += delta) {\n            particles.append(new Particle(glm::dvec2(x,y) + .2 * glm::dvec2(frand() - .5, frand() - .5), 1.1));\n            particles.append(new Particle(glm::dvec2(-x,y) + .2 * glm::dvec2(frand() - .5, frand() - .5), 1.1));\n        }\n    }\n    TotalFluidConstraint *fs = createFluid(&particles, 1);\n    particles.clear();\n\n    createFluidEmitter(glm::dvec2(0,0), scale*4, fs);\n\n//    double top = scale-.5, dist = PARTICLE_RAD;\n\n//    Particle *e1 = new Particle(glm::dvec2(-1-dist, top), 0, SOLID);\n//    e1->bod = -2;\n//    m_particles.append(e1);\n\n//    for (double i = -1; i <= 2; i += dist) {\n//        Particle *part = new Particle(glm::dvec2(i, top), 1, SOLID);\n//        part->bod = -2;\n//        m_particles.append(part);\n//        m_globalConstraints[STANDARD].append(\n//                    new DistanceConstraint(dist, m_particles.size() - 2, m_particles.size() - 1));\n//    }\n}\n\nvoid Simulation::initWreckingBall()\n{\n    m_xBoundaries = glm::dvec2(-15,100);\n    m_yBoundaries = glm::dvec2(0,1000000);\n\n    glm::dvec2 dim = glm::dvec2(6,2);\n    int height = 8, width = 2;\n    double root2 = sqrt(2);\n    QList<Particle *> vertices;\n    QList<SDFData> data;\n    data.append(SDFData(glm::normalize(glm::dvec2(-1,-1)), PARTICLE_RAD * root2));\n    data.append(SDFData(glm::normalize(glm::dvec2(-1,1)), PARTICLE_RAD * root2));\n\n    for (int i = 0; i < dim.x - 2; i++) {\n        data.append(SDFData(glm::normalize(glm::dvec2(0,-1)), PARTICLE_RAD));\n        data.append(SDFData(glm::normalize(glm::dvec2(0,1)), PARTICLE_RAD));\n    }\n\n    data.append(SDFData(glm::normalize(glm::dvec2(1,-1)), PARTICLE_RAD * root2));\n    data.append(SDFData(glm::normalize(glm::dvec2(1,1)), PARTICLE_RAD * root2));\n\n    for (int j = -width; j <= width; j++) {\n        for (int i = height - 1; i >= 0; i--) {\n            for (int x = 0; x < dim.x; x++) {\n                double num = (i % 2 == 0 ? 3 : -1);\n                double xVal = j * (EPSILON + dim.x / 2.) + PARTICLE_DIAM * (x % (int)dim.x) - num * PARTICLE_RAD;\n                for (int y = 0; y < dim.y; y++) {\n                    double yVal = (i * dim.y + (y % (int)dim.y) + EPSILON) * PARTICLE_DIAM + PARTICLE_RAD;\n                    Particle *part = new Particle(glm::dvec2(xVal, yVal), 30.);\n                    part->sFriction = 1;\n                    part->kFriction = 1;\n                    vertices.append(part);\n                }\n            }\n            Body *body = createRigidBody(&vertices, &data);\n            vertices.clear();\n        }\n    }\n\n    double scale = 6., delta = .4;\n    QList<Particle *> particles;\n\n    double num = 1.;\n    double start = m_xBoundaries.x + 1;\n    for(double x = start; x < start + (scale / num); x += delta) {\n        for(double y = 0; y < 1.2 * scale; y += delta) {\n            particles.append(new Particle(glm::dvec2(x,y) + .2 * glm::dvec2(frand() - .5, frand() - .5), 1));\n        }\n    }\n    createFluid(&particles, 2.5);\n    particles.clear();\n\n    int idx = m_particles.size();\n    m_particles.append(new Particle(glm::dvec2(10, 50), 0));\n    data.clear();\n\n    glm::dvec2 base = glm::dvec2(57, 50);\n    particles.append(new Particle(base, 1000));\n    for (double a = 0; a <= 360; a+=30) {\n        glm::dvec2 vec = glm::dvec2(cos(D2R(a)), sin(D2R(a)));\n        particles.append(new Particle(vec * PARTICLE_RAD + base, 1000));\n        data.append(SDFData(vec, PARTICLE_RAD * 1.5));\n    }\n    data.append(SDFData());\n    createRigidBody(&particles, &data);\n\n    m_globalConstraints[STANDARD].append(new DistanceConstraint(idx, idx + 1, &m_particles));\n}\n\nint Simulation::getNumParticles()\n{\n    return m_particles.size();\n}\n\ndouble Simulation::getKineticEnergy()\n{\n    double energy = 0;\n    for (int i = 0; i < m_particles.size(); i++) {\n        Particle *p = m_particles[i];\n        if (p->imass != 0.) {\n            energy += .5 * glm::dot(p->v, p->v) / p->imass;\n        }\n    }\n    return energy;\n}\n\nvoid Simulation::mousePressed(const glm::dvec2 &p)\n{\n    for (int i = 0; i < m_particles.size(); i++) {\n        Particle *part = m_particles.at(i);\n\n        glm::dvec2 to = glm::normalize(p - part->p);\n        part->v += 7. * to;\n    }\n    m_point = p;\n}\n"
  },
  {
    "path": "cpu/src/simulation.h",
    "content": "#ifndef SIMULATION_H\n#define SIMULATION_H\n\n#include \"includes.h\"\n#include \"particle.h\"\n#include \"opensmokeemitter.h\"\n#include \"solver.h\"\n#include \"fluidemitter.h\"\n\n// Number of solver iterations per timestep\n#define SOLVER_ITERATIONS 3\n\n// Iterative or matrix solve\n#define ITERATIVE\n\n// Use stabilization pass or not, and if so how many iterations\n//#define USE_STABILIZATION\n#define STABILIZATION_ITERATIONS 2\n\n// Gravity scaling factor for gases\n#define ALPHA -.2\n\n// Built-in simulation scenes\nenum SimulationType {\n    FRICTION_TEST,\n    SDF_TEST,\n    GRANULAR_TEST,\n    STACKS_TEST,\n    WALL_TEST,\n    PENDULUM_TEST,\n    ROPE_TEST,\n    FLUID_TEST,\n    FLUID_SOLID_TEST,\n    GAS_ROPE_TEST,\n    WATER_BALLOON_TEST,\n    CRADLE_TEST,\n    NUM_SIMULATION_TYPES,\n    SMOKE_OPEN_TEST,\n    SMOKE_CLOSED_TEST,\n    VOLCANO_TEST,\n    WRECKING_BALL\n};\n\n// The basic simulation, implementing the \"main solve loop\" from the paper.\nclass Simulation\n{\npublic:\n    Simulation();\n    virtual ~Simulation();\n    void init(SimulationType type);\n\n    // Initializers for test scenes\n    void initFriction();\n    void initSdf();\n    void initGranular();\n    void initBoxes();\n    void initPendulum();\n    void initRope();\n    void initFluid();\n    void initFluidSolid();\n    void initWall();\n    void initGas();\n    void initWaterBalloon();\n    void initNewtonsCradle();\n    void initSmokeOpen();\n    void initSmokeClosed();\n    void initRopeGas();\n    void initVolcano();\n    void initWreckingBall();\n\n    // Basic interaction events\n    void tick(double seconds);\n    void draw();\n    void resize(const glm::ivec2 &dim);\n    void mousePressed(const glm::dvec2 &p);\n\n    // Debug information and flags\n    int getNumParticles();\n    double getKineticEnergy();\n    bool debug;\n\nprivate:\n\n    // Reset the simulation\n    void clear();\n\n    // Creation functions for different types of matter\n    Body *createRigidBody(QList<Particle *> *verts, QList<SDFData> *sdfData);\n    TotalFluidConstraint *createFluid(QList<Particle *> *particles, double density);\n    GasConstraint *createGas(QList<Particle *> *particles, double density, bool open);\n    void createSmokeEmitter(glm::dvec2 posn, double particlesPerSec, GasConstraint *gs);\n    void createFluidEmitter(glm::dvec2 posn, double particlesPerSec, TotalFluidConstraint *fs);\n\n    // Simple drawing routines\n    void drawGrid();\n    void drawParticles();\n    void drawBodies();\n    void drawGlobals();\n    void drawCircle();\n    void drawSmoke();\n\n    void setColor(int body, float alpha);\n\n    // Counts for iterative particle solver\n    int *m_counts;\n\n    // Storage of global particles, rigid bodies, and general constraints\n    QList<Particle *> m_particles;\n    QList<Body *> m_bodies;\n    QList<OpenSmokeEmitter *> m_smokeEmitters;\n    QList<FluidEmitter *> m_fluidEmitters;\n    QHash<ConstraintGroup, QList<Constraint *> > m_globalConstraints;\n\n    // Solvers for regular and contact constraints\n    Solver m_standardSolver;\n    Solver m_contactSolver;\n\n    // Drawing and boundary information\n    glm::ivec2 m_dimensions;\n    glm::dvec2 m_xBoundaries, m_yBoundaries;\n    glm::dvec2 m_gravity;\n    glm::dvec2 m_point;\n};\n\n#endif // SIMULATION_H\n"
  },
  {
    "path": "cpu/src/solver/lineareq.cpp",
    "content": "/**<!-------------------------------------------------------------------->\n   @file   LinearEquation.cpp\n   @author Travis Fischer (fisch0920@gmail.com)\n   @date   Spring 2009\n   \n   @brief\n      Wrapper around UMFPack for efficiently solving sparse linear systems of \n   the standard form Ax=b, including a cache of the factorization of A=LU such \n   that repeated invocations of solving Ax=b with the same A=LU can be \n   performed in nearly linear time by back-substitution of LUx=b.\n   \n   @note for more info on UMFPack (the internal linear solver), see \n      http://www.cise.ufl.edu/research/sparse/umfpack\n   <!-------------------------------------------------------------------->**/\n\n#include \"lineareq.h\"\n#include <UMFPACK/umfpack.h>\n#include <algorithm>\n\nstruct SparseMatrixElement {\n   unsigned row;\n   unsigned col;\n   double value;\n   \n   inline SparseMatrixElement() {\n      row   = 0;\n      col   = 0;\n      value = 0;\n   }\n\n   inline SparseMatrixElement(unsigned r, unsigned c, double v) {\n      row   = r;\n      col   = c;\n      value = v;\n   }\n\n   inline bool operator< (const SparseMatrixElement& e) const {\n      if (col < e.col)\n         return true;\n      if (col > e.col)\n         return false;\n\n      return (row < e.row);\n   }\n\n   inline bool operator==(const SparseMatrixElement &e) const {\n      return (row == e.row && col == e.col && value == e.value);\n   }\n};\n\nvoid LinearData::clean() {\n   umfpack_di_free_symbolic(&symbolic);\n   umfpack_di_free_numeric(&numeric);\n   if(Ap) delete[] Ap;\n   if(Ai) delete[] Ai;\n   if(Ax) delete[] Ax;\n\n}\n\nvoid LinearData::init(unsigned n_, unsigned nElements_) {\n   clean();\n   \n   n = n_;\n   nElements = nElements_;\n   \n   Ap = new int[n + 1];\n   Ai = new int[nElements];\n   Ax = new double[nElements];\n}\n\nbool LinearData::init(const SparseMatrix &A) {\n   const SparseArray &elements = A.getData();\n   vector<SparseMatrixElement> temp;\n   SparseColArrayConstIterator j;\n   SparseArrayConstIterator i;\n   \n   for(i = elements.begin(); i != elements.end(); ++i) {\n      for(j = i->second.begin(); j != i->second.end(); ++j) {\n         SparseMatrixElement element(i->first, j->first, j->second);\n         temp.push_back(element);\n      }\n   }\n   \n   std::sort(temp.begin(), temp.end());\n   init(A.getN(), temp.size());\n   \n   Ap[0]\t= 0;\n   Ap[1]\t= 0;\n   \n   unsigned cur   = 1;\n   unsigned index = 0;\n   \n   // convert the sparse data into the format umfpack expects\n   for(unsigned i = 0; i < temp.size(); ++i) {\n      const SparseMatrixElement &element = temp[i];\n      \n      Ax[index] = element.value;\n      Ai[index] = element.row;\n      ++index;\n      \n      if (element.col == cur) {\n         ++cur;\n         Ap[cur] = Ap[cur - 1];\n      }\n      \n      ++Ap[cur];\n   }\n   \n   int status = UMFPACK_OK;\n   bool ret   = true;\n   \n   status = umfpack_di_symbolic(n, n, Ap, Ai, Ax, &symbolic, NULL, NULL);\n   if (status != UMFPACK_OK) {\n      ret = false;\n      printf(\"umfpack_di_symbolic failed: %d\\n\", status);\n   }\n   \n   status = umfpack_di_numeric(Ap, Ai, Ax, symbolic, &numeric, NULL, NULL);\n   if (status != UMFPACK_OK) {\n      ret = false;\n      printf(\"umfpack_di_numeric failed: %d\\n\", status);\n   }\n   \n   return ret;\n}\n\nvoid LinearEquation::setA(const SparseMatrix *A) {\n   m_A = A;\n   m_dirty = true;\n   \n}\n\nbool LinearEquation::solve(const double *b, double *x) {\n   if (m_dirty) {\n      if (!m_data.init(*m_A))\n         return false;\n      \n      m_dirty = false;\n   }\n   \n   int ret = umfpack_di_solve(UMFPACK_A, m_data.Ap, m_data.Ai, m_data.Ax, x, b, \n                              m_data.numeric, NULL, NULL);\n\n   if (ret != UMFPACK_OK)\n       printf(\"umfpack_di_solve failed: %d\\n\", ret);\n\n   return ret == UMFPACK_OK;\n}\n\n"
  },
  {
    "path": "cpu/src/solver/lineareq.h",
    "content": "/**<!-------------------------------------------------------------------->\n   @class  LinearEquation\n   @author Travis Fischer (fisch0920@gmail.com)\n   @date   Spring 2009\n   \n   @brief\n      Wrapper around UMFPack for efficiently solving sparse linear systems of \n   the standard form Ax=b, including a cache of the factorization of A=LU such \n   that repeated invocations of solving Ax=b with the same A=LU can be \n   performed in nearly linear time by back-substitution of LUx=b.\n   \n   @note for more info on UMFPack (the internal linear solver), see \n      http://www.cise.ufl.edu/research/sparse/umfpack\n   <!-------------------------------------------------------------------->**/\n\n#ifndef LINEAREQ_H\n#define LINEAREQ_H\n\n#include \"matrix.h\"\n\n/**\n * @brief\n *    Underlying data encapsulating UMFPack LU decomposition of a sparse \n * matrix A, used internally by LinearEquation (you should not need to touch \n * this)\n */\nstruct LinearData {\n   int     n;\n   int     nElements;\n   \n   int    *Ap;\n   int    *Ai;\n   double *Ax;\n   \n   void   *symbolic;\n   void   *numeric;\n   \n   inline LinearData()\n      : n(0), nElements(0), Ap(NULL), Ai(NULL), Ax(NULL), \n        symbolic(NULL), numeric(NULL)\n   { }\n   \n   ~LinearData() {\n      clean();\n   }\n   \n   void clean();\n   \n   bool init(const SparseMatrix &A);\n   void init(unsigned n_, unsigned nElements_);\n};\n\nclass LinearEquation {\n   public:\n      typedef shared_ptr<LinearEquation> Ref;\n\n      inline LinearEquation(const SparseMatrix *A)\n         : m_A(A), m_dirty(true)\n      {\n\n      }\n      \n      LinearEquation()\n         : m_A(NULL), m_dirty(true)\n      { }\n      \n      /**\n       * @brief\n       *    Solves a linear equation of the standard form Ax=b, with x and b \n       * passed in and A having previously been set either in this \n       * LinearEquation's constructor or via the setA mutator.\n       * \n       * Will compute the LU decomposition of A if this is the first call to \n       * solve since A has been modified (if A's underlying data has changed \n       * since the last call to solve, LinearEquation has no way of knowing \n       * this, and so if you want to dirty the cache, you must explicitly call \n       * setA to force the recomputation of A's LU cache, encapsulated in \n       * the LinearData struct)\n       * \n       * @htmlonly\n       * Example usage:\n       * <pre><code>\n       *    LinearEquation solver;\n       *    double b[5], x[5];\n       *    // fill in b...\n       *    \n       *    SparseMatrix A(5, 5);\n       *    // fill in A\n       *    \n       *    // setup solver and solve Ax=b\n       *    solver.setA(A);\n       *    bool solved = solver.solve(b, x);\n       *    ASSERT(solved);\n       *    \n       *    // solve Ax=c using the same factorization of A\n       *    double c[5];\n       *    // fill in c\n       *    \n       *    solved = solver.solve(c, x);\n       *    ASSERT(solved);\n       *    // ...\n       * </code></pre>\n       * @endhtmonly\n       * \n       * @note if A is nxn (must be square for Ax=b to be well-defined), b and \n       *    x are both assumed to be preallocated to hold n doubles)\n       * \n       * @returns whether or not Ax=b was successfully solved, and upon \n       *    success, the solution vector x will be filled in appropriately\n       */\n      virtual bool solve(const double *b, double *x);\n      \n      /**\n       * @brief\n       *    Sets 'A' in Ax=b and \"dirties\" the underlying LinearData cache \n       * which stores the LU factorization of A such that the next call to \n       * solve will implicitly factor the current A before solving\n       * \n       * @note because setA dirties the factorization cache, you are advised \n       *    to change A only when absolutely necessary, as factoring A=LU is \n       *    the most time-consuming part of solving a sparse Ax=b\n       * \n       * @note A must be a square matrix for Ax=b to be solvable\n       */\n      virtual void setA(const SparseMatrix *A);\n      \n      /**\n       * @returns the currently set 'A' which will be used in calls to \n       *    solve(b, x) for Ax=b\n       * \n       * @note getLinearData optionally returns the cached LU decomposition \n       *    of A in UMFPack format iff the cache is not dirty (iff solve has \n       *    been called since the last call to setA)\n       */\n      inline const SparseMatrix *getA() const {\n         return m_A;\n      }\n      \n      /**\n       * @returns the underlying UMFPack cache, including the most recently \n       *    computed LU decomposition of A during a call to solve\n       * \n       * @note this method is provided for convenience only and its use is in \n       *    no way necessary to solve Ax=b\n       */\n      inline const LinearData &getLinearData() const {\n         return m_data;\n      }\n      \n   protected:\n      const SparseMatrix *m_A;\n      \n      LinearData m_data;\n      bool       m_dirty;\n};\n\n#endif // LINEAREQ_H\n\n"
  },
  {
    "path": "cpu/src/solver/matrix.cpp",
    "content": "/* ---------------------------------------------- \n   file: SparseMatrix.cpp\n   auth: Travis Fischer\n   acct: tfischer\n   date: Spring 2008\n\n   Provides basic functionality for a sparse matrix of \n   arbitrary dimensions\n   ---------------------------------------------- */\n\n#include \"matrix.h\"\n\n#include <math.h>\n\n// Returns the transpose of this matrix\nSparseMatrix SparseMatrix::getTranspose() const {\n   SparseArray m;\n   \n   SparseColArrayConstIterator j;\n   SparseArrayConstIterator i;\n   \n   for(i = m_elements.begin(); i != m_elements.end(); ++i)\n      for(j = i->second.begin(); j != i->second.end(); ++j)\n         m[j->first][i->first] = j->second;\n   \n   // note m and n are switched\n   return SparseMatrix(m_n, m_m, m);\n}\n\n// Returns the Frobenius Norm of this matrix\ndouble SparseMatrix::getFrobeniusNorm() {\n   double squaredNorm = 0.0;\n   \n   SparseColArrayConstIterator j;\n   SparseArrayConstIterator i;\n   \n   for(i = m_elements.begin(); i != m_elements.end(); ++i)\n      for(j = i->second.begin(); j != i->second.end(); ++j)\n         squaredNorm += j->second * j->second;\n   \n   return sqrt(squaredNorm);\n}\n\n// Multiplies this MxN SparseMatrix by the dense mxn matrix 'rhs' and stores \n// the dense result in 'out' which should be preallocated to hold Mxn doubles\nvoid SparseMatrix::multiply(double *out, const double *rhs, int m, int n) {\n   \n   memset(out, 0, sizeof(double) * m_m * n);\n   SparseColArrayConstIterator j;\n   SparseArrayConstIterator i;\n   \n   for(i = m_elements.begin(); i != m_elements.end(); ++i) {\n      const int row = i->first;\n      \n      for(j = i->second.begin(); j != i->second.end(); ++j) {\n         const int col = j->first;\n         \n         for(int k = n; k--;)\n            out[row * n + k] += j->second * rhs[col * n + k];\n      }\n   }\n}\n\n// Multiplies this MxN SparseMatrix by the dense mxn matrix 'rhs' and stores \n// the result in the sparse Mxn matrix 'out'\nvoid SparseMatrix::multiply(SparseMatrix &out, const double *rhs, int m, int n) {\n\n   SparseColArrayConstIterator j;\n   SparseArrayConstIterator i;\n\n   for(i = m_elements.begin(); i != m_elements.end(); ++i) {\n      const int row = i->first;\n\n      for(j = i->second.begin(); j != i->second.end(); ++j) {\n         const int col = j->first;\n\n         for(int k = n; k--;) {\n            double value = j->second * rhs[col * n + k];\n\n            if (value != 0)\n               out.setValue(row, k, out.getValue(row, k) + value);\n         }\n      }\n   }\n}\n\n"
  },
  {
    "path": "cpu/src/solver/matrix.h",
    "content": "/* ---------------------------------------------- \n   file: SparseMatrix.h\n   auth: Travis Fischer\n   acct: tfischer\n   date: Spring 2008\n\n   Provides basic functionality for a sparse matrix of \n   arbitrary dimensions\n   ---------------------------------------------- */\n\n#ifndef MATRIX_H\n#define MATRIX_H\n\n#include <memory>\n#include <iostream>\n#include <sstream>\n#include <vector>\n#include <map>\nusing namespace std;\n\ntypedef map<int, double>               SparseColArray;\ntypedef SparseColArray::iterator       SparseColArrayIterator;\ntypedef SparseColArray::const_iterator SparseColArrayConstIterator;\n\ntypedef map<int, SparseColArray >   SparseArray;\ntypedef SparseArray::iterator       SparseArrayIterator;\ntypedef SparseArray::const_iterator SparseArrayConstIterator;\n\nclass SparseMatrix {\n   public:\n      typedef shared_ptr<SparseMatrix> Ref;\n\n      // Constructors / Initialization\n      // -----------------------------\n\n      // Constructs an invalid matrix temporarily. This constructor lets you add\n      // SparseMatrix as a member of your Solver class.\n      //\n      // If you initialize a SparseMatrix using this function, you *MUST* call\n      // reset(m, n) before using any other method on this SparseMatrix, or the\n      // results will be undefined.\n      inline SparseMatrix();\n\n      // Constructs an m by n sparse matrix\n      inline SparseMatrix(int m, int n);\n      \n      inline SparseMatrix(int m, int n, const SparseArray &elements);\n      \n      // Copy Constructor\n      inline SparseMatrix(const SparseMatrix &m);\n      \n      inline void reset(int m, int n);\n\n      inline void reset();\n      \n      // Static convenience constructors to generate common matrices\n      // -----------------------------------------------------------\n\n      // Generates an empty sparse matrix of the desired dimension\n      static inline SparseMatrix zero(int m, int n = -1) {\n         if (n == -1)\n            n = m; // square\n         \n         return SparseMatrix(m, n);\n      }\n      \n      // Generates a sparse nxn identity matrix\n      static inline SparseMatrix identity(int n) {\n         SparseArray a;\n         \n         for(int i = n; i--;)\n            a[i][i] = 1.0;\n         \n         return SparseMatrix(n, n, a);\n      }\n      \n      \n      // Accessor Operators\n      // ------------------\n      \n      // Returns the number of rows in this SparseMatrix\n      inline int getM() const;\n      inline int numRows() const;\n      // Returns the number of cols in this SparseMatrix\n      inline int getN() const;\n      inline int numCols() const;\n      \n      inline SparseArray &getData();\n      inline const SparseArray &getData() const;\n      \n      \n      // Equality Operators\n      // ------------------\n      inline       bool       operator==(const SparseMatrix &m) const;\n      inline       bool       operator!=(const SparseMatrix &m) const;\n      \n      \n      // Mutator Operators\n      // -----------------\n      inline       SparseMatrix &operator =(const SparseMatrix &m);\n      inline       SparseMatrix &operator*=(const SparseMatrix &m);\n      inline       SparseMatrix &operator+=(const SparseMatrix &m);\n      inline       SparseMatrix &operator-=(const SparseMatrix &m);\n      \n      // Scalar Mutator Operators\n      inline       SparseMatrix &operator*=(const double scale);\n      inline       SparseMatrix &operator/=(const double scale);\n      \n      \n      // Arithmetic Operators\n      // -----------------\n      inline       SparseMatrix  operator* (const SparseMatrix &rhs) const;\n      inline       SparseMatrix  operator+ (const SparseMatrix &rhs) const;\n      inline       SparseMatrix  operator- (const SparseMatrix &rhs) const;\n      \n      inline       SparseMatrix  operator* (const double scale) const;\n      inline       SparseMatrix  operator/ (const double scale) const;\n      \n      \n      // More Complex Functionality\n      // --------------------------\n      \n      // Multiplies this MxN SparseMatrix by the dense mxn matrix 'rhs' and stores \n      // the dense result in 'out' which should be preallocated to hold Mxn doubles\n      void multiply(double *out, const double *rhs, int m, int n);\n      \n      // Multiplies this MxN SparseMatrix by the dense mxn matrix 'rhs' and stores \n      // the result in the sparse Mxn matrix 'out'\n      void multiply(SparseMatrix &out, const double *rhs, int m, int n);\n      \n      // Returns whether or not this SparseMatrix is square\n      inline bool isSquare() const;\n      \n      // Returns whether or not this SparseMatrix is diagonal\n      inline bool isDiagonal() const;\n      \n      // Returns the number of elements currently in this SparseMatrix\n      inline int getSize() const;\n      \n      // Returns the full size in bytes of this SparseMatrix if it were to be \n      // expanded in non-sparse form\n      inline int fullSize() const;\n      \n      // Stores a (row-major) full version of this SparseMatrix in paramater out, \n      // which should be a preallocated buffer of fullSize() bytes\n      inline void toFull(double *out) const;\n      \n      // Sets the value in this SparseMatrix as specified\n      inline SparseMatrix &setValue(int row, int col, double value);\n      \n      inline void setIdentityColumn(int col);\n      \n      // Returns whether or not this SparseMatrix contains a value for the \n      // given cell\n      inline bool   hasValue(int row, int col);\n      \n      // Returns the value stored at (row, col) or zero if none exists\n      inline double getValue(int row, int col);\n      \n      inline void clearRow(int row);\n      \n      // Returns the transpose of this matrix\n      SparseMatrix getTranspose() const;\n      \n      // Returns the Frobenius Norm of this matrix\n      double getFrobeniusNorm();\n      \n      // Cleans up a matrix (0's out entries that are less than epsilon)\n      void cleanup();\n      \n      // Saves an image representation of this SparseMatrix to the file given, \n      // with black pixels representing data and white pixels representing \n      // sparse regions\n      bool save(const std::string &filename) const;\n\n      void printMatrix(int precision, bool sparse) {\n          std::ostringstream oss;\n          oss << \"%.\" << precision << \"f \";\n          std::string format = oss.str();\n          printf(\"\\n\");\n\n          if (!sparse) {\n              for (int r = 0; r < numRows(); r++) {\n                  for (int c = 0; c < numCols(); c++) {\n                      printf(format.data(), getValue(r,c));\n                  }\n                  printf(\"\\n\");\n                  fflush(stdout);\n              }\n          } else {\n              for (int r = 0; r < numRows(); r++) {\n                  for (int c = 0; c < numCols(); c++) {\n                      if (getValue(r,c) == 0.0 || getValue(r,c) == -0.0) {\n                          continue;\n                      }\n                      printf(\"(%i,%i) \", r, c);\n                      printf(format.data(), getValue(r,c));\n                      printf(\"\\n\");\n                      fflush(stdout);\n                  }\n              }\n          }\n      }\n      \n   protected:\n      // Sparse representation of data\n      SparseArray m_elements;\n      \n      // Dimensions\n      int m_m, m_n;\n};\n\n\n// Extra operators where SparseMatrix is on right-hand side\n// -----------------------------------------------------\ninline       SparseMatrix  operator* (const double scale, const SparseMatrix &rhs);\n\n\n/* Include inline implementations */\n#include \"matrix.inl\"\n\n#endif\n\n"
  },
  {
    "path": "cpu/src/solver/matrix.inl",
    "content": "/* ---------------------------------------------- \n   file: SparseMatrix.inl\n   auth: Travis Fischer\n   acct: tfischer\n   date: Spring 2008\n\n   Inline function definitions for a sparse matrix\n   ---------------------------------------------- */\n\n#ifndef MATRIX_INL\n#define MATRIX_INL\n\n#include <string.h>\n\n// Constructors\n// ------------\n\ninline SparseMatrix::SparseMatrix()\n  : m_elements(), m_m(-1), m_n(-1)\n{ }\n\n// Constructs an m by n sparse matrix\ninline SparseMatrix::SparseMatrix(int m, int n)\n   : m_elements(), m_m(m), m_n(n)\n{ }\n\ninline SparseMatrix::SparseMatrix(int m, int n, const SparseArray &elements) \n   : m_elements(elements), m_m(m), m_n(n)\n{ }\n\n// Copy Constructor\ninline SparseMatrix::SparseMatrix(const SparseMatrix &m) {\n   m_elements = m.m_elements;\n   m_m = m.m_m;\n   m_n = m.m_n;\n}\n      \ninline void SparseMatrix::reset(int m, int n) {\n  m_elements.clear();\n  m_m = m;\n  m_n = n;\n}\n\ninline void SparseMatrix::reset() {\n  reset(m_m, m_n);\n}\n\n\n// Accessor Operators\n// ------------------\n\n// Returns the number of rows in this SparseMatrix\ninline int SparseMatrix::getM() const {\n   return m_m;\n}\n\ninline int SparseMatrix::numRows() const {\n    return m_m;\n}\n\n// Returns the number of cols in this SparseMatrix\ninline int SparseMatrix::getN() const {\n   return m_n;\n}\n\ninline int SparseMatrix::numCols() const {\n    return m_n;\n}\n\ninline SparseArray &SparseMatrix::getData() {\n   return m_elements;\n}\n\ninline const SparseArray &SparseMatrix::getData() const {\n   return m_elements;\n}\n\n\n// Equality Operators\n// ------------------\ninline       bool       SparseMatrix::operator==(const SparseMatrix &m) const {\n   return (m_m == m.m_m && m_n == m.m_n && m_elements == m.m_elements);\n}\n\ninline       bool       SparseMatrix::operator!=(const SparseMatrix &m) const {\n   return !((*this) == m);\n}\n\n\n// Mutator Operators\n// -----------------\ninline       SparseMatrix &SparseMatrix::operator =(const SparseMatrix &m) {\n   m_m = m.m_m;\n   m_n = m.m_n;\n   m_elements = m.m_elements;\n   \n   return *this;\n}\n\ninline       SparseMatrix &SparseMatrix::operator*=(const SparseMatrix &m) {\n   return (*this = (*this) * m);\n}\n\ninline       SparseMatrix &SparseMatrix::operator+=(const SparseMatrix &m) {\n   return (*this = (*this) + m);\n}\n\ninline       SparseMatrix &SparseMatrix::operator-=(const SparseMatrix &m) {\n   return (*this = (*this) - m);\n}\n\n\n// Arithmetic Operators\n// -----------------\ninline       SparseMatrix  SparseMatrix::operator* (const SparseMatrix &rhs) const {\n\n   SparseColArrayConstIterator j, p;\n   SparseArrayConstIterator i;\n   \n   SparseArray a;\n   \n   for(i = m_elements.begin(); i != m_elements.end(); ++i) {\n      int row = i->first;\n      SparseColArray &aRow = a[row];\n      \n      for(j = i->second.begin(); j != i->second.end(); ++j) {\n         int col = j->first;\n         \n         if (rhs.m_elements.count(col) > 0) {\n            const SparseColArray &o = rhs.m_elements.find(col)->second;\n            \n            for(p = o.begin(); p != o.end(); ++p)\n               aRow[p->first] += p->second * j->second;\n         }\n      }\n   }\n  \n   return SparseMatrix(m_m, rhs.m_n, a);\n}\n\ninline       SparseMatrix  SparseMatrix::operator+ (const SparseMatrix &rhs) const {\n\n   SparseColArrayConstIterator j, p;\n   SparseArrayConstIterator i;\n   \n   SparseArray a;\n   \n   for(i = m_elements.begin(); i != m_elements.end(); ++i) {\n      int row = i->first;\n      SparseColArray &aRow = a[row];\n      \n      for(j = i->second.begin(); j != i->second.end(); ++j) {\n         int col = j->first;\n         \n         aRow[col] = j->second;\n      }\n   }\n   \n   for(i = rhs.m_elements.begin(); i != rhs.m_elements.end(); ++i) {\n      int row = i->first;\n      SparseColArray &aRow = a[row];\n      \n      for(j = i->second.begin(); j != i->second.end(); ++j) {\n         int col = j->first;\n         \n         aRow[col] += j->second;\n      }\n   }\n  \n   return SparseMatrix(m_m, m_n, a);\n}\n\ninline       SparseMatrix  SparseMatrix::operator- (const SparseMatrix &rhs) const {\n\n   SparseColArrayConstIterator j, p;\n   SparseArrayConstIterator i;\n   \n   SparseArray a;\n   \n   for(i = m_elements.begin(); i != m_elements.end(); ++i) {\n      int row = i->first;\n      SparseColArray &aRow = a[row];\n      \n      for(j = i->second.begin(); j != i->second.end(); ++j) {\n         int col = j->first;\n         \n         aRow[col] = j->second;\n      }\n   }\n   \n   for(i = rhs.m_elements.begin(); i != rhs.m_elements.end(); ++i) {\n      int row = i->first;\n      SparseColArray &aRow = a[row];\n      \n      for(j = i->second.begin(); j != i->second.end(); ++j) {\n         int col = j->first;\n         \n         aRow[col] -= j->second;\n      }\n   }\n  \n   return SparseMatrix(m_m, m_n, a);\n}\n\ninline       SparseMatrix  SparseMatrix::operator* (const double scale) const {\n   SparseArray a(m_elements);\n   SparseColArrayIterator j;\n   SparseArrayIterator i;\n   \n   for(i = a.begin(); i != a.end(); ++i)\n      for(j = i->second.begin(); j != i->second.end(); ++j)\n         j->second *= scale;\n\n   return SparseMatrix(m_m, m_n, a);\n}\n\ninline       SparseMatrix  SparseMatrix::operator/ (const double scale) const {\n   SparseArray a(m_elements);\n   SparseColArrayIterator j;\n   SparseArrayIterator i;\n   \n\n   \n   for(i = a.begin(); i != a.end(); ++i)\n      for(j = i->second.begin(); j != i->second.end(); ++j)\n         j->second *= scale;\n\n   return SparseMatrix(m_m, m_n, a);\n}\n\n\n// More Complex Functionality\n// --------------------------\n\n// Returns whether or not this SparseMatrix is square\ninline bool SparseMatrix::isSquare() const {\n   return (m_m == m_n);\n}\n\n// Returns whether or not this SparseMatrix is diagonal\ninline bool SparseMatrix::isDiagonal() const {\n   SparseColArrayConstIterator j;\n   SparseArrayConstIterator i;\n   \n   for(i = m_elements.begin(); i != m_elements.end(); ++i)\n      for(j = i->second.begin(); j != i->second.end(); ++j)\n         if (i->first != j->second)\n            return false;\n\n   return true;\n}\n\n\n// Returns the number of elements currently in this SparseMatrix\ninline int SparseMatrix::getSize() const {\n   SparseColArrayConstIterator j;\n   SparseArrayConstIterator i;\n   int size = 0;\n   \n   //cerr << \"SparseMatrix::getSize()\" << endl;\n   for(i = m_elements.begin(); i != m_elements.end(); ++i)\n      size += i->second.size();\n   \n   return size;\n}\n\n// Returns the full size in bytes of this SparseMatrix if it were to be \n// expanded in non-sparse form\ninline int SparseMatrix::fullSize() const {\n   return m_m * m_n * sizeof(double);\n}\n\n// Stores a (row-major) full version of this SparseMatrix in paramater out, \n// which should be a preallocated buffer of fullSize() bytes\ninline void SparseMatrix::toFull(double *out) const {\n   memset(out, 0, fullSize());\n   \n   SparseColArrayConstIterator j;\n   SparseArrayConstIterator i;\n   \n   for(i = m_elements.begin(); i != m_elements.end(); ++i)\n      for(j = i->second.begin(); j != i->second.end(); ++j)\n         out[i->first * m_n + j->first] = j->second;\n}\n\n// Adds the value to this SparseMatrix\ninline SparseMatrix &SparseMatrix::setValue(int row, int col, double value) {\n   if (row < 0 || col < 0 || row >= m_m || col >= m_n)\n       throw \"lol\";\n   if (value == 0.) return *this;\n   m_elements[row][col] = value;\n   return *this;\n}\n\n// Returns whether or not this SparseMatrix contains a value for the given cell\ninline bool   SparseMatrix::hasValue(int row, int col) {\n\n   return m_elements.count(row) > 0 && m_elements[row].count(col) > 0;\n}\n\n// Returns the value stored at (row, col) or zero if none exists\ninline double SparseMatrix::getValue(int row, int col) {\n\n   if (!hasValue(row, col))\n      return 0;\n   \n   return m_elements[row][col];\n}\n\ninline void SparseMatrix::setIdentityColumn(int col) {\n   SparseArrayIterator i;\n   \n   for(i = m_elements.begin(); i != m_elements.end(); ++i) {\n      if (i->second.count(col) > 0)\n         i->second[col] = 0;\n   }\n   \n   setValue(col, col, 1.0);\n}\n\n// Cleans up a matrix (0's out entries that are less than epsilon)\ninline void SparseMatrix::cleanup() {\n   SparseColArrayIterator j;\n   SparseArrayIterator i;\n   \n   for(i = m_elements.begin(); i != m_elements.end(); ++i) {\n      for(j = i->second.begin(); j != i->second.end(); ++j) {\n         if (j->second == 0)\n            j->second = 0;\n      }\n   }\n}\n\ninline void SparseMatrix::clearRow(int row) {\n\n   if (m_elements.find(row) != m_elements.end())\n      m_elements.erase(m_elements.find(row));\n}\n\n// Extra operators where SparseMatrix is on right-hand side\n// -----------------------------------------------------\ninline       SparseMatrix  operator* (const double scale, const SparseMatrix &rhs) {\n   return rhs * scale;\n}\n\n#endif\n\n"
  },
  {
    "path": "cpu/src/solver/particle.cpp",
    "content": "#include \"particle.h\"\n\nSDFData Particle::getSDFData(QList<Body *> *bodies, int idx)\n{\n    if (ph != SOLID || bod < 0) {\n        return SDFData();\n    }\n\n    Body *body = bodies->at(bod);\n    SDFData out = body->sdf[idx];\n    out.rotate(body->angle);\n    return out;\n}\n\nvoid Body::updateCOM(QList<Particle *> *estimates, bool useEstimates)\n{\n    // Recompute center of mass\n    glm::dvec2 total;\n    for (int i = 0; i < particles.size(); i++) {\n        Particle *p = estimates->at(particles[i]);\n        total += (useEstimates ? p->ep : p->p) / p->imass;\n    }\n    center = total * imass;\n\n    // Recompute angle delta guess\n    angle = 0.0;\n    double prev = 0.0;\n    for (int i = 0; i < particles.size(); i++) {\n        int index = particles[i];\n        glm::dvec2 q = rs[index];\n        if (glm::dot(q,q) == 0) {\n            continue;\n        }\n        Particle *p = estimates->at(index);\n        glm::dvec2 r = p->ep - center;\n\n        double cos = r.x * q.x + r.y * q.y,\n               sin = r.y * q.x - r.x * q.y,\n               next = atan2(sin, cos);\n\n        // Ensure all guesses are close to each other\n        if (i > 0) {\n            if (prev - next >= M_PI) {\n                next += 2 * M_PI;\n            }\n        } else {\n            if (next < 0) {\n                next += 2 * M_PI;\n            }\n        }\n\n        prev = next;\n        next /= p->imass;\n        angle += next;\n    }\n    angle *= imass;\n}\n\nvoid Body::computeRs(QList<Particle *> *estimates)\n{\n    imass = 0.0;\n    for (int i = 0; i < particles.size(); i++) {\n        int idx = particles[i];\n        Particle *p = estimates->at(idx);\n        glm::dvec2 r = p->p - center;\n        rs[idx] = r;\n\n        if (glm::dot(r,r) != 0) {\n            imass += (1.0 / p->imass);\n        }\n    }\n    imass = 1.0 / imass;\n}\n"
  },
  {
    "path": "cpu/src/solver/solver.cpp",
    "content": "#include \"solver.h\"\n\nSolver::Solver()\n{\n    m_b = new double[2];\n    m_gamma = new double[2];\n    m_nCons = -1;\n\n    m_dp = new double[2];\n    m_counts = new int[2];\n    m_nParts = -1;\n}\n\nSolver::~Solver()\n{\n    delete[] m_b;\n    delete[] m_gamma;\n    delete[] m_dp;\n    delete[] m_counts;\n}\n\nint Solver::getCount(int idx)\n{\n    return m_counts[idx];\n}\n\nvoid Solver::setupM(QList<Particle *> *particles, bool contact)\n{\n    m_invM.reset(particles->size() * 2, particles->size() * 2);\n    for (int i = 0; i < particles->size(); i++) {\n\n        // Down the diagonal\n        Particle *p = particles->at(i);\n        m_invM.setValue(2 * i, 2 * i, contact ? p->tmass : p->imass);\n        m_invM.setValue(2 * i + 1, 2 * i + 1, contact ? p->tmass : p->imass);\n    }\n}\n\nvoid Solver::setupSizes(int numParts, QList<Constraint *> *constraints)\n{\n    bool change = true;\n    int numCons = constraints->size();\n\n    // Only update some things if the number of particles changed\n    if (m_nParts != numParts) {\n        m_nParts = numParts;\n        delete[] m_dp;\n        delete[] m_counts;\n        m_dp = new double[m_nParts * 2];\n        m_counts = new int[m_nParts];\n        change = true;\n    }\n\n    // Update how many constraints affect each particle\n    for (int i = 0; i < m_nParts; i++) {\n        m_counts[i] = 0;\n    }\n    for (int i = 0; i < numCons; i++) {\n        constraints->at(i)->updateCounts(m_counts);\n    }\n\n    if (m_nCons != numCons) {\n        m_nCons = numCons;\n        delete[] m_b;\n        delete[] m_gamma;\n        m_b = new double[m_nCons];\n        m_gamma = new double[m_nCons];\n        change = true;\n    }\n\n    if (change) {\n        m_JT.reset(m_nParts * 2, m_nCons);\n    }\n}\n\nvoid Solver::solveAndUpdate(QList<Particle *> *particles, QList<Constraint *> *constraints, bool stabile)\n{\n    if (constraints->size() == 0) {\n        return;\n    }\n\n    // Reset J^T and b\n    bool updated = false;\n\n    // Loop!\n    for (int i = 0; i < particles->size(); i++) {\n        for (int j = 0; j < constraints->size(); j++) {\n            Constraint *cons = constraints->at(j);\n\n            // Update b\n            if (!updated) {\n                m_b[j] = -cons->evaluate(particles);\n            }\n            glm::vec2 grad_ji = cons->gradient(particles, i);\n            m_JT.setValue(2 * i, j, grad_ji.x);\n            m_JT.setValue(2 * i + 1, j, grad_ji.y);\n        }\n        updated = true;\n    }\n\n    SparseMatrix temp = m_invM * m_JT;\n    m_A = m_JT.getTranspose() * temp;\n//    m_JT.printMatrix(4,false);\n    m_eq.setA(&m_A);\n//    cout << endl;\n//    for (int i = 0; i < particles->size(); i++) {\n//        printf(\"%.4f\\n\", m_b[i]);\n//    }\n    bool result = m_eq.solve(m_b, m_gamma);\n//    cout << result << endl;\n//    for (int i = 0; i < particles->size(); i++) {\n//        printf(\"%.4f\\n\", m_gamma[i]);\n//    }\n//    cout << endl;\n    temp.multiply(m_dp, m_gamma, particles->size() * 2, 1);\n\n    for (int i = 0; i < particles->size(); i++) {\n        Particle *p = particles->at(i);\n        int n = m_counts[i];\n        double mult = n > 0 ? (RELAXATION_PARAMETER / (double)n) : 0.,\n               dx = m_dp[2 * i] * mult,\n               dy = m_dp[2 * i + 1] * mult;\n//        cout << dx << \" \" << dy << endl;\n\n        p->ep.x += (fabs(dx) > EPSILON ? dx : 0);\n        p->ep.y += (fabs(dy) > EPSILON ? dy : 0);\n\n        if (stabile) {\n            p->p.x += (fabs(dx) > EPSILON ? dx : 0);\n            p->p.y += (fabs(dy) > EPSILON ? dy : 0);\n        }\n    }\n}\n"
  },
  {
    "path": "cpu/src/solver/solver.h",
    "content": "#ifndef SOLVER_H\n#define SOLVER_H\n\n#include \"matrix.h\"\n#include \"particle.h\"\n#include \"lineareq.h\"\n\n#define RELAXATION_PARAMETER 1.\n\nclass Solver\n{\npublic:\n    Solver();\n    virtual ~Solver();\n\n    SparseMatrix m_invM, m_JT, m_A;\n    double *m_b, *m_gamma, *m_dp;\n    int *m_counts;\n    int m_nParts, m_nCons;\n    LinearEquation m_eq;\n\n    int getCount(int idx);\n\n    void setupM(QList<Particle *> *particles, bool contact = false);\n    void setupSizes(int numParts, QList<Constraint *> *constraints);\n    void solveAndUpdate(QList<Particle *> *particles, QList<Constraint *> *constraints, bool stabile = false);\n};\n\n#endif // SOLVER_H\n"
  },
  {
    "path": "cpu/src/view.cpp",
    "content": "#include \"view.h\"\n#include <QApplication>\n#include <QKeyEvent>\n\nView::View(QWidget *parent) : QGLWidget(parent)\n{\n    // View needs all mouse move events, not just mouse drag events\n    setMouseTracking(true);\n\n    // Hide the cursor since this is a fullscreen app\n//    setCursor(Qt::BlankCursor);\n\n    // View needs keyboard focus\n    setFocusPolicy(Qt::StrongFocus);\n\n    // The game loop is implemented using a timer\n    connect(&timer, SIGNAL(timeout()), this, SLOT(tick()));\n\n    fps = 60;\n    scale = 10;\n    tickTime = 0.0;\n    timestepMode = true;\n    current = FLUID_TEST;\n}\n\nView::~View()\n{\n}\n\nvoid View::initializeGL()\n{\n    // All OpenGL initialization *MUST* be done during or after this\n    // method. Before this method is called, there is no active OpenGL\n    // context and all OpenGL calls have no effect.\n\n    // Start a timer that will try to get 60 frames per second (the actual\n    // frame rate depends on the operating system and other running programs)\n    time.start();\n    timer.start(1000 / 60);\n\n    // Center the mouse, which is explained more in mouseMoveEvent() below.\n    // This needs to be done here because the mouse may be initially outside\n    // the fullscreen window and will not automatically receive mouse move\n    // events. This occurs if there are two monitors and the mouse is on the\n    // secondary monitor.\n//    QCursor::setPos(mapToGlobal(QPoint(width() / 2, height() / 2)));\n\n}\n\nvoid View::paintGL()\n{\n    glClearColor(0,0,0,1);\n    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);\n\n    glMatrixMode(GL_PROJECTION);\n    glLoadIdentity();\n    glOrtho(-scale, scale, -scale, scale, -1, 1);\n    glMatrixMode(GL_MODELVIEW);\n    glLoadIdentity();\n\n    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\n\n    sim.draw();\n\n    glColor3f(1,1,1);\n    renderText(10, 20, \"FPS: \" + QString::number((int) (fps)), this->font());\n    renderText(10, 40, \"# Particles: \" + QString::number(sim.getNumParticles()), this->font());\n    renderText(10, 60, \"Kinetic Energy: \" + QString::number(sim.getKineticEnergy()), this->font());\n}\n\nvoid View::resizeGL(int w, int h)\n{\n    glViewport(0, 0, w, h);\n    dimensions.x = w;\n    dimensions.y = h;\n\n    sim.resize(glm::ivec2(scale, scale));\n}\n\n\n\nvoid View::mousePressEvent(QMouseEvent *event)\n{\n    glm::dvec2 screen(event->x(), height() - event->y());\n    glm::dvec2 world = (scale * 2.) * (screen / glm::dvec2(width(), height())) - glm::dvec2((double)scale, (double)scale);\n    sim.mousePressed(world);\n}\n\nvoid View::mouseMoveEvent(QMouseEvent *event)\n{\n    // This starter code implements mouse capture, which gives the change in\n    // mouse position since the last mouse movement. The mouse needs to be\n    // recentered after every movement because it might otherwise run into\n    // the edge of the screen, which would stop the user from moving further\n    // in that direction. Note that it is important to check that deltaX and\n    // deltaY are not zero before recentering the mouse, otherwise there will\n    // be an infinite loop of mouse move events.\n    int deltaX = event->x() - width() / 2;\n    int deltaY = event->y() - height() / 2;\n    if (!deltaX && !deltaY) return;\n//    QCursor::setPos(mapToGlobal(QPoint(width() / 2, height() / 2)));\n\n    // TODO: Handle mouse movements here\n}\n\nvoid View::mouseReleaseEvent(QMouseEvent *event)\n{\n\n}\n\nvoid View::wheelEvent(QWheelEvent *event)\n{\n    if (event->delta() > 0) {\n        scale /= 1.2;\n    } else {\n        scale *= 1.2;\n    }\n    sim.resize(glm::ivec2(scale, scale));\n}\n\nvoid View::keyPressEvent(QKeyEvent *event)\n{\n    if (event->key() == Qt::Key_Escape) QApplication::quit();\n    if (event->key() == Qt::Key_R) sim.init(current);\n    if (event->key() == Qt::Key_T) timestepMode = !timestepMode;\n    if (event->key() == Qt::Key_Space) tickTime = .01;\n    if (event->key() == Qt::Key_Backspace) tickTime = -.01;\n    if (event->key() == Qt::Key_C) sim.debug = !sim.debug;\n\n    if (event->key() == Qt::Key_1) {\n        current = GRANULAR_TEST;\n        sim.init(current);\n    } else if (event->key() == Qt::Key_2) {\n        current = STACKS_TEST;\n        sim.init(current);\n    } else if (event->key() == Qt::Key_3) {\n        current = WALL_TEST;\n        sim.init(current);\n    } else if (event->key() == Qt::Key_4) {\n        current = PENDULUM_TEST;\n        sim.init(current);\n    } else if (event->key() == Qt::Key_5) {\n        current = ROPE_TEST;\n        sim.init(current);\n    } else if (event->key() == Qt::Key_6) {\n        current = FLUID_TEST;\n        sim.init(current);\n    } else if (event->key() == Qt::Key_7) {\n        current = FLUID_SOLID_TEST;\n        sim.init(current);\n    } else if (event->key() == Qt::Key_8) {\n        current = GAS_ROPE_TEST;\n        sim.init(current);\n    } else if (event->key() == Qt::Key_9) {\n        current = FRICTION_TEST;\n        sim.init(current);\n    } else if (event->key() == Qt::Key_0) {\n        current = WATER_BALLOON_TEST;\n        sim.init(current);\n    } else if (event->key() == Qt::Key_N) {\n        current = CRADLE_TEST;\n        sim.init(current);\n    } else if (event->key() == Qt::Key_S) {\n        current = SMOKE_OPEN_TEST;\n        sim.init(current);\n    } else if (event->key() == Qt::Key_D) {\n        current = SMOKE_CLOSED_TEST;\n        sim.init(current);\n    } else if (event->key() == Qt::Key_Period) {\n        current = SDF_TEST;\n        sim.init(current);\n    } else if (event->key() == Qt::Key_V) {\n        current = VOLCANO_TEST;\n        sim.init(current);\n    } else if (event->key() == Qt::Key_W) {\n        current = WRECKING_BALL;\n        sim.init(current);\n    }\n}\n\nvoid View::keyReleaseEvent(QKeyEvent *event)\n{\n}\n\nvoid View::tick()\n{\n    // Get the number of seconds since the last tick (variable update rate)\n    double seconds = time.restart() * 0.001;\n    fps = .02 / seconds + .98 * fps;\n\n    if (timestepMode) {\n        if (tickTime != 0.0) {\n            sim.tick(tickTime);\n            tickTime = 0.0;\n        }\n    } else {\n        sim.tick(.01);\n    }\n\n    // Flag this view for repainting (Qt will call paintGL() soon after)\n    update();\n}\n"
  },
  {
    "path": "cpu/src/view.h",
    "content": "#ifndef VIEW_H\n#define VIEW_H\n\n#include \"simulation.h\"\n\n#include <QTime>\n#include <QTimer>\n\nclass View : public QGLWidget\n{\n    Q_OBJECT\n\npublic:\n    View(QWidget *parent);\n    ~View();\n\nprivate:\n    QTime time;\n    QTimer timer;\n    double fps, tickTime;\n    double scale;\n    bool timestepMode;\n\n    glm::ivec2 dimensions;\n    Simulation sim;\n    SimulationType current;\n\n    void initializeGL();\n    void paintGL();\n    void resizeGL(int w, int h);\n\n    void mousePressEvent(QMouseEvent *event);\n    void mouseMoveEvent(QMouseEvent *event);\n    void mouseReleaseEvent(QMouseEvent *event);\n\n    void wheelEvent(QWheelEvent *event);\n\n    void keyPressEvent(QKeyEvent *event);\n    void keyReleaseEvent(QKeyEvent *event);\n\nprivate slots:\n    void tick();\n};\n\n#endif // VIEW_H\n\n"
  },
  {
    "path": "gpu/glm/CMakeLists.txt",
    "content": "set(NAME glm_dummy)\r\n\r\nfile(GLOB ROOT_SOURCE *.cpp)\r\nfile(GLOB ROOT_INLINE *.inl)\r\nfile(GLOB ROOT_HEADER *.hpp)\r\nfile(GLOB ROOT_TEXT ../*.txt)\r\n\r\nfile(GLOB_RECURSE CORE_SOURCE ./detail/*.cpp)\r\nfile(GLOB_RECURSE CORE_INLINE ./detail/*.inl)\r\nfile(GLOB_RECURSE CORE_HEADER ./detail/*.hpp)\r\n\r\nfile(GLOB_RECURSE GTC_SOURCE ./gtc/*.cpp)\r\nfile(GLOB_RECURSE GTC_INLINE ./gtc/*.inl)\r\nfile(GLOB_RECURSE GTC_HEADER ./gtc/*.hpp)\r\n\r\nfile(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp)\r\nfile(GLOB_RECURSE GTX_INLINE ./gtx/*.inl)\r\nfile(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp)\r\n\r\nsource_group(\"Text Files\" FILES ${ROOT_TEXT})\r\nsource_group(\"Core Files\" FILES ${CORE_SOURCE})\r\nsource_group(\"Core Files\" FILES ${CORE_INLINE})\r\nsource_group(\"Core Files\" FILES ${CORE_HEADER})\r\nsource_group(\"GTC Files\" FILES ${GTC_SOURCE})\r\nsource_group(\"GTC Files\" FILES ${GTC_INLINE})\r\nsource_group(\"GTC Files\" FILES ${GTC_HEADER})\r\nsource_group(\"GTX Files\" FILES ${GTX_SOURCE})\r\nsource_group(\"GTX Files\" FILES ${GTX_INLINE})\r\nsource_group(\"GTX Files\" FILES ${GTX_HEADER})\r\n\r\ninclude_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)\r\n\r\nadd_executable(${NAME} ${ROOT_TEXT}\r\n\t${ROOT_SOURCE}    ${ROOT_INLINE}    ${ROOT_HEADER}\r\n\t${CORE_SOURCE}    ${CORE_INLINE}    ${CORE_HEADER}\r\n\t${GTC_SOURCE}     ${GTC_INLINE}     ${GTC_HEADER}\r\n\t${GTX_SOURCE}     ${GTX_INLINE}     ${GTX_HEADER})\r\n\r\n#add_library(glm STATIC glm.cpp)\r\n#add_library(glm_shared SHARED glm.cpp)\r\n"
  },
  {
    "path": "gpu/glm/common.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/common.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_COMMON_INCLUDED\r\n#define GLM_COMMON_INCLUDED\r\n\r\n#include \"detail/func_common.hpp\"\r\n\r\n#endif//GLM_COMMON_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/detail/_features.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/_features.hpp\r\n/// @date 2013-02-20 / 2013-02-20\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_features\r\n#define glm_core_features\r\n\r\n// #define GLM_CXX98_EXCEPTIONS\r\n// #define GLM_CXX98_RTTI\r\n\r\n// #define GLM_CXX11_RVALUE_REFERENCES\r\n// Rvalue references - GCC 4.3\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html\r\n\r\n// GLM_CXX11_TRAILING_RETURN\r\n// Rvalue references for *this - GCC not supported\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2439.htm\r\n\r\n// GLM_CXX11_NONSTATIC_MEMBER_INIT\r\n// Initialization of class objects by rvalues - GCC any\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1610.html\r\n\r\n// GLM_CXX11_NONSTATIC_MEMBER_INIT\r\n// Non-static data member initializers - GCC 4.7\r\n// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2008/n2756.htm\r\n\r\n// #define GLM_CXX11_VARIADIC_TEMPLATE\r\n// Variadic templates - GCC 4.3\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2242.pdf\r\n\r\n// \r\n// Extending variadic template template parameters - GCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf\r\n\r\n// #define GLM_CXX11_GENERALIZED_INITIALIZERS\r\n// Initializer lists - GCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm\r\n\r\n// #define GLM_CXX11_STATIC_ASSERT \r\n// Static assertions - GCC 4.3\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html\r\n\r\n// #define GLM_CXX11_AUTO_TYPE\r\n// auto-typed variables - GCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1984.pdf\r\n\r\n// #define GLM_CXX11_AUTO_TYPE\r\n// Multi-declarator auto - GCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1737.pdf\r\n\r\n// #define GLM_CXX11_AUTO_TYPE\r\n// Removal of auto as a storage-class specifier - GCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2546.htm\r\n\r\n// #define GLM_CXX11_AUTO_TYPE\r\n// New function declarator syntax - GCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm\r\n\r\n// #define GLM_CXX11_LAMBDAS\r\n// New wording for C++0x lambdas - GCC 4.5\r\n// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2927.pdf\r\n\r\n// #define GLM_CXX11_DECLTYPE\r\n// Declared type of an expression - GCC 4.3\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf\r\n\r\n// \r\n// Right angle brackets - GCC 4.3\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1757.html\r\n\r\n// \r\n// Default template arguments for function templates\tDR226\tGCC 4.3\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#226\r\n\r\n// \r\n// Solving the SFINAE problem for expressions\tDR339\tGCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2634.html\r\n\r\n// #define GLM_CXX11_ALIAS_TEMPLATE\r\n// Template aliases\tN2258\tGCC 4.7\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2258.pdf\r\n\r\n// \r\n// Extern templates\tN1987\tYes\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1987.htm\r\n\r\n// #define GLM_CXX11_NULLPTR\r\n// Null pointer constant\tN2431\tGCC 4.6\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf\r\n\r\n// #define GLM_CXX11_STRONG_ENUMS\r\n// Strongly-typed enums\tN2347\tGCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf\r\n\r\n// \r\n// Forward declarations for enums\tN2764\tGCC 4.6\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2764.pdf\r\n\r\n// \r\n// Generalized attributes\tN2761\tGCC 4.8\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf\r\n\r\n// \r\n// Generalized constant expressions\tN2235\tGCC 4.6\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf\r\n\r\n// \r\n// Alignment support\tN2341\tGCC 4.8\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2341.pdf\r\n\r\n// #define GLM_CXX11_DELEGATING_CONSTRUCTORS\r\n// Delegating constructors\tN1986\tGCC 4.7\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1986.pdf\r\n\r\n// \r\n// Inheriting constructors\tN2540\tGCC 4.8\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2540.htm\r\n\r\n// #define GLM_CXX11_EXPLICIT_CONVERSIONS\r\n// Explicit conversion operators\tN2437\tGCC 4.5\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2437.pdf\r\n\r\n// \r\n// New character types\tN2249\tGCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2249.html\r\n\r\n// \r\n// Unicode string literals\tN2442\tGCC 4.5\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm\r\n\r\n// \r\n// Raw string literals\tN2442\tGCC 4.5\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2442.htm\r\n\r\n// \r\n// Universal character name literals\tN2170\tGCC 4.5\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2170.html\r\n\r\n// #define GLM_CXX11_USER_LITERALS\r\n// User-defined literals\t\tN2765\tGCC 4.7\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2765.pdf\r\n\r\n// \r\n// Standard Layout Types\tN2342\tGCC 4.5\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2342.htm\r\n\r\n// #define GLM_CXX11_DEFAULTED_FUNCTIONS\r\n// #define GLM_CXX11_DELETED_FUNCTIONS\r\n// Defaulted and deleted functions\tN2346\tGCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2346.htm\r\n\r\n// \r\n// Extended friend declarations\tN1791\tGCC 4.7\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1791.pdf\r\n\r\n// \r\n// Extending sizeof\tN2253\tGCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2253.html\r\n\r\n// #define GLM_CXX11_INLINE_NAMESPACES\r\n// Inline namespaces\tN2535\tGCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2535.htm\r\n\r\n// #define GLM_CXX11_UNRESTRICTED_UNIONS\r\n// Unrestricted unions\tN2544\tGCC 4.6\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf\r\n\r\n// #define GLM_CXX11_LOCAL_TYPE_TEMPLATE_ARGS\r\n// Local and unnamed types as template arguments\tN2657\tGCC 4.5\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm\r\n\r\n// #define GLM_CXX11_RANGE_FOR\r\n// Range-based for\tN2930\tGCC 4.6\r\n// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2930.html\r\n\r\n// #define GLM_CXX11_OVERRIDE_CONTROL\r\n// Explicit virtual overrides\tN2928 N3206 N3272\tGCC 4.7\r\n// http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm\r\n\r\n// \r\n// Minimal support for garbage collection and reachability-based leak detection\tN2670\tNo\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2670.htm\r\n\r\n// #define GLM_CXX11_NOEXCEPT\r\n// Allowing move constructors to throw [noexcept]\tN3050\tGCC 4.6 (core language only)\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3050.html\r\n\r\n// \r\n// Defining move special member functions\tN3053\tGCC 4.6\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3053.html\r\n\r\n// \r\n// Sequence points\tN2239\tYes\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html\r\n\r\n// \r\n// Atomic operations\tN2427\tGCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html\r\n\r\n// \r\n// Strong Compare and Exchange\tN2748\tGCC 4.5\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2427.html\r\n\r\n// \r\n// Bidirectional Fences\tN2752\tGCC 4.8\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2752.htm\r\n\r\n// \r\n// Memory model\tN2429\tGCC 4.8\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2429.htm\r\n\r\n// \r\n// Data-dependency ordering: atomics and memory model\tN2664\tGCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2664.htm\r\n\r\n// \r\n// Propagating exceptions\tN2179\tGCC 4.4\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html\r\n\r\n// \r\n// Abandoning a process and at_quick_exit\tN2440\tGCC 4.8\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2440.htm\r\n\r\n// \r\n// Allow atomics use in signal handlers\tN2547\tYes\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2547.htm\r\n\r\n// \r\n// Thread-local storage\tN2659\tGCC 4.8\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm\r\n\r\n// \r\n// Dynamic initialization and destruction with concurrency\tN2660\tGCC 4.3\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm\r\n\r\n// \r\n// __func__ predefined identifier\tN2340\tGCC 4.3\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2340.htm\r\n\r\n// \r\n// C99 preprocessor\tN1653\tGCC 4.3\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm\r\n\r\n// \r\n// long long\tN1811\tGCC 4.3\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1811.pdf\r\n\r\n// \r\n// Extended integral types\tN1988\tYes\r\n// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1988.pdf\r\n\r\n#if(GLM_COMPILER & GLM_COMPILER_GCC)\r\n\r\n#\tif(GLM_COMPILER >= GLM_COMPILER_GCC43)\r\n#\t\tdefine GLM_CXX11_STATIC_ASSERT\r\n#\tendif\r\n\r\n#elif(GLM_COMPILER & GLM_COMPILER_CLANG)\r\n#\tif(__has_feature(cxx_exceptions))\r\n#\t\tdefine GLM_CXX98_EXCEPTIONS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_rtti))\r\n#\t\tdefine GLM_CXX98_RTTI\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_access_control_sfinae))\r\n#\t\tdefine GLM_CXX11_ACCESS_CONTROL_SFINAE\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_alias_templates))\r\n#\t\tdefine GLM_CXX11_ALIAS_TEMPLATE\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_alignas))\r\n#\t\tdefine GLM_CXX11_ALIGNAS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_attributes))\r\n#\t\tdefine GLM_CXX11_ATTRIBUTES\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_constexpr))\r\n#\t\tdefine GLM_CXX11_CONSTEXPR\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_decltype))\r\n#\t\tdefine GLM_CXX11_DECLTYPE\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_default_function_template_args))\r\n#\t\tdefine GLM_CXX11_DEFAULT_FUNCTION_TEMPLATE_ARGS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_defaulted_functions))\r\n#\t\tdefine GLM_CXX11_DEFAULTED_FUNCTIONS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_delegating_constructors))\r\n#\t\tdefine GLM_CXX11_DELEGATING_CONSTRUCTORS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_deleted_functions))\r\n#\t\tdefine GLM_CXX11_DELETED_FUNCTIONS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_explicit_conversions))\r\n#\t\tdefine GLM_CXX11_EXPLICIT_CONVERSIONS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_generalized_initializers))\r\n#\t\tdefine GLM_CXX11_GENERALIZED_INITIALIZERS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_implicit_moves))\r\n#\t\tdefine GLM_CXX11_IMPLICIT_MOVES\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_inheriting_constructors))\r\n#\t\tdefine GLM_CXX11_INHERITING_CONSTRUCTORS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_inline_namespaces))\r\n#\t\tdefine GLM_CXX11_INLINE_NAMESPACES\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_lambdas))\r\n#\t\tdefine GLM_CXX11_LAMBDAS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_local_type_template_args))\r\n#\t\tdefine GLM_CXX11_LOCAL_TYPE_TEMPLATE_ARGS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_noexcept))\r\n#\t\tdefine GLM_CXX11_NOEXCEPT\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_nonstatic_member_init))\r\n#\t\tdefine GLM_CXX11_NONSTATIC_MEMBER_INIT\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_nullptr))\r\n#\t\tdefine GLM_CXX11_NULLPTR\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_override_control))\r\n#\t\tdefine GLM_CXX11_OVERRIDE_CONTROL\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_reference_qualified_functions))\r\n#\t\tdefine GLM_CXX11_REFERENCE_QUALIFIED_FUNCTIONS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_range_for))\r\n#\t\tdefine GLM_CXX11_RANGE_FOR\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_raw_string_literals))\r\n#\t\tdefine GLM_CXX11_RAW_STRING_LITERALS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_rvalue_references))\r\n#\t\tdefine GLM_CXX11_RVALUE_REFERENCES\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_static_assert))\r\n#\t\tdefine GLM_CXX11_STATIC_ASSERT\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_auto_type))\r\n#\t\tdefine GLM_CXX11_AUTO_TYPE\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_strong_enums))\r\n#\t\tdefine GLM_CXX11_STRONG_ENUMS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_trailing_return))\r\n#\t\tdefine GLM_CXX11_TRAILING_RETURN\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_unicode_literals))\r\n#\t\tdefine GLM_CXX11_UNICODE_LITERALS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_unrestricted_unions))\r\n#\t\tdefine GLM_CXX11_UNRESTRICTED_UNIONS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_user_literals))\r\n#\t\tdefine GLM_CXX11_USER_LITERALS\r\n#\tendif\r\n\r\n#\tif(__has_feature(cxx_variadic_templates))\r\n#\t\tdefine GLM_CXX11_VARIADIC_TEMPLATES\r\n#\tendif\r\n\r\n#endif//(GLM_COMPILER & GLM_COMPILER_CLANG)\r\n\r\n#endif//glm_core_features\r\n"
  },
  {
    "path": "gpu/glm/detail/_fixes.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/_fixes.hpp\r\n/// @date 2011-02-21 / 2011-11-22\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include <cmath>\r\n\r\n//! Workaround for compatibility with other libraries\r\n#ifdef max\r\n#undef max\r\n#endif\r\n\r\n//! Workaround for compatibility with other libraries\r\n#ifdef min\r\n#undef min\r\n#endif\r\n\r\n//! Workaround for Android\r\n#ifdef isnan\r\n#undef isnan\r\n#endif\r\n\r\n//! Workaround for Android\r\n#ifdef isinf\r\n#undef isinf\r\n#endif\r\n\r\n//! Workaround for Chrone Native Client\r\n#ifdef log2\r\n#undef log2\r\n#endif\r\n\r\n"
  },
  {
    "path": "gpu/glm/detail/_literals.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/_literals.hpp\r\n/// @date 2013-05-06 / 2013-05-06\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_literals\r\n#define glm_core_literals\r\n\r\nnamespace glm\r\n{\r\n#define GLM_CXX11_USER_LITERALS\r\n#ifdef GLM_CXX11_USER_LITERALS\r\n/*\r\n\tGLM_FUNC_QUALIFIER detail::half operator \"\" _h(long double const s)\r\n\t{\r\n\t\treturn detail::half(s);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER float operator \"\" _f(long double const s)\r\n\t{\r\n\t\treturn static_cast<float>(s);\r\n\t}\r\n*/\r\n#endif//GLM_CXX11_USER_LITERALS\r\n\r\n}//namespace glm\r\n\r\n#endif//glm_core_literals\r\n"
  },
  {
    "path": "gpu/glm/detail/_noise.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/detail/_noise.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_DETAIL_NOISE_INCLUDED\r\n#define GLM_DETAIL_NOISE_INCLUDED\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T mod289(T const & x)\r\n\t{\r\n\t\treturn x - floor(x * static_cast<T>(1.0) / static_cast<T>(289.0)) * static_cast<T>(289.0);\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T permute(T const & x)\r\n\t{\r\n\t\treturn mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> permute(tvec2<T, P> const & x)\r\n\t{\r\n\t\treturn mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> permute(tvec3<T, P> const & x)\r\n\t{\r\n\t\treturn mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> permute(tvec4<T, P> const & x)\r\n\t{\r\n\t\treturn mod289(((x * static_cast<T>(34)) + static_cast<T>(1)) * x);\r\n\t}\r\n/*\r\n\ttemplate <typename T, precision P, template<typename> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> permute(vecType<T, P> const & x)\r\n\t{\r\n\t\treturn mod289(((x * T(34)) + T(1)) * x);\r\n\t}\r\n*/\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T taylorInvSqrt(T const & r)\r\n\t{\r\n\t\treturn T(1.79284291400159) - T(0.85373472095314) * r;\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> taylorInvSqrt(detail::tvec2<T, P> const & r)\r\n\t{\r\n\t\treturn T(1.79284291400159) - T(0.85373472095314) * r;\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> taylorInvSqrt(detail::tvec3<T, P> const & r)\r\n\t{\r\n\t\treturn T(1.79284291400159) - T(0.85373472095314) * r;\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> taylorInvSqrt(detail::tvec4<T, P> const & r)\r\n\t{\r\n\t\treturn T(1.79284291400159) - T(0.85373472095314) * r;\r\n\t}\r\n/*\r\n\ttemplate <typename T, precision P, template<typename> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> taylorInvSqrt(vecType<T, P> const & r)\r\n\t{\r\n\t\treturn T(1.79284291400159) - T(0.85373472095314) * r;\r\n\t}\r\n*/\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> fade(detail::tvec2<T, P> const & t)\r\n\t{\r\n\t\treturn (t * t * t) * (t * (t * T(6) - T(15)) + T(10));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> fade(detail::tvec3<T, P> const & t)\r\n\t{\r\n\t\treturn (t * t * t) * (t * (t * T(6) - T(15)) + T(10));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> fade(detail::tvec4<T, P> const & t)\r\n\t{\r\n\t\treturn (t * t * t) * (t * (t * T(6) - T(15)) + T(10));\r\n\t}\r\n/*\r\n\ttemplate <typename T, precision P, template <typename> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> fade(vecType<T, P> const & t)\r\n\t{\r\n\t\treturn (t * t * t) * (t * (t * T(6) - T(15)) + T(10));\r\n\t}\r\n*/\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#endif//GLM_DETAIL_NOISE_INCLUDED\r\n\r\n"
  },
  {
    "path": "gpu/glm/detail/_swizzle.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/_swizzle.hpp\r\n/// @date 2006-04-20 / 2011-02-16\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_swizzle\r\n#define glm_core_swizzle\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\t// Internal class for implementing swizzle operators\r\n\ttemplate <typename T, int N>\r\n\tstruct _swizzle_base0\r\n\t{\r\n\t\ttypedef T       value_type;\r\n\r\n\tprotected:\r\n\t\tGLM_FUNC_QUALIFIER value_type&         elem   (size_t i)       { return (reinterpret_cast<value_type*>(_buffer))[i]; }\r\n\t\tGLM_FUNC_QUALIFIER const value_type&   elem   (size_t i) const { return (reinterpret_cast<const value_type*>(_buffer))[i]; }\r\n\r\n\t\t// Use an opaque buffer to *ensure* the compiler doesn't call a constructor.\r\n\t\t// The size 1 buffer is assumed to aligned to the actual members so that the\r\n\t\t// elem() \r\n\t\tchar    _buffer[1];\r\n\t};\r\n\r\n\ttemplate <typename T, precision P, typename V, int E0, int E1, int E2, int E3, int N>\r\n\tstruct _swizzle_base1 : public _swizzle_base0<T, N>\r\n\t{\r\n\t};\r\n\r\n\ttemplate <typename T, precision P, typename V, int E0, int E1>\r\n\tstruct _swizzle_base1<T, P, V,E0,E1,-1,-2,2> : public _swizzle_base0<T, 2>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER V operator ()()  const { return V(this->elem(E0), this->elem(E1)); }\r\n\t};\r\n\r\n\ttemplate <typename T, precision P, typename V, int E0, int E1, int E2>\r\n\tstruct _swizzle_base1<T, P, V,E0,E1,E2,-1,3> : public _swizzle_base0<T, 3>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER V operator ()()  const { return V(this->elem(E0), this->elem(E1), this->elem(E2)); }\r\n\t};\r\n\r\n\ttemplate <typename T, precision P, typename V, int E0, int E1, int E2, int E3>\r\n\tstruct _swizzle_base1<T, P, V,E0,E1,E2,E3,4> : public _swizzle_base0<T, 4>\r\n\t{ \r\n\t\tGLM_FUNC_QUALIFIER V operator ()()  const { return V(this->elem(E0), this->elem(E1), this->elem(E2), this->elem(E3)); }\r\n\t};\r\n\r\n\t// Internal class for implementing swizzle operators\r\n\t/*\r\n\t\tTemplate parameters:\r\n\r\n\t\tValueType = type of scalar values (e.g. float, double)\r\n\t\tVecType   = class the swizzle is applies to (e.g. tvec3<float>)\r\n\t\tN         = number of components in the vector (e.g. 3)\r\n\t\tE0...3    = what index the n-th element of this swizzle refers to in the unswizzled vec\r\n\r\n\t\tDUPLICATE_ELEMENTS = 1 if there is a repeated element, 0 otherwise (used to specialize swizzles\r\n\t\t\tcontaining duplicate elements so that they cannot be used as r-values).            \r\n\t*/\r\n\ttemplate <typename ValueType, precision P, typename VecType, int N, int E0, int E1, int E2, int E3, int DUPLICATE_ELEMENTS>\r\n\tstruct _swizzle_base2 : public _swizzle_base1<ValueType, P, VecType,E0,E1,E2,E3,N>\r\n\t{\r\n\t\ttypedef VecType vec_type;\r\n\t\ttypedef ValueType value_type;\r\n\r\n\t\tGLM_FUNC_QUALIFIER _swizzle_base2& operator= (const ValueType& t)\r\n\t\t{\r\n\t\t\tfor (int i = 0; i < N; ++i)\r\n\t\t\t\t(*this)[i] = t;\r\n\t\t\treturn *this;\r\n\t\t}\r\n\r\n\t\tGLM_FUNC_QUALIFIER _swizzle_base2& operator= (const VecType& that)\r\n\t\t{\r\n\t\t\tstruct op { \r\n\t\t\t\tGLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e = t; } \r\n\t\t\t};\r\n\t\t\t_apply_op(that, op());\r\n\t\t\treturn *this;\r\n\t\t}\r\n\r\n\t\tGLM_FUNC_QUALIFIER void operator -= (const VecType& that)\r\n\t\t{\r\n\t\t\tstruct op { \r\n\t\t\t\tGLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e -= t; } \r\n\t\t\t};\r\n\t\t\t_apply_op(that, op());\r\n\t\t}\r\n\r\n\t\tGLM_FUNC_QUALIFIER void operator += (const VecType& that)\r\n\t\t{\r\n\t\t\tstruct op { \r\n\t\t\t\tGLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e += t; } \r\n\t\t\t};\r\n\t\t\t_apply_op(that, op());\r\n\t\t}\r\n\r\n\t\tGLM_FUNC_QUALIFIER void operator *= (const VecType& that)\r\n\t\t{\r\n\t\t\tstruct op { \r\n\t\t\t\tGLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e *= t; } \r\n\t\t\t};\r\n\t\t\t_apply_op(that, op());\r\n\t\t}\r\n\r\n\t\tGLM_FUNC_QUALIFIER void operator /= (const VecType& that)\r\n\t\t{\r\n\t\t\tstruct op { \r\n\t\t\t\tGLM_FUNC_QUALIFIER void operator() (value_type& e, value_type& t) { e /= t; } \r\n\t\t\t};\r\n\t\t\t_apply_op(that, op());\r\n\t\t}\r\n\r\n\t\tGLM_FUNC_QUALIFIER value_type& operator[]  (size_t i)\r\n\t\t{\r\n#ifndef __CUDA_ARCH__\r\n\t\t\tstatic\r\n#endif\r\n\t\t\t\tconst int offset_dst[4] = { E0, E1, E2, E3 };\r\n\t\t\treturn this->elem(offset_dst[i]);\r\n\t\t}\r\n\t\tGLM_FUNC_QUALIFIER value_type  operator[]  (size_t i) const\r\n\t\t{\r\n#ifndef __CUDA_ARCH__\r\n\t\t\tstatic\r\n#endif\r\n\t\t\t\tconst int offset_dst[4] = { E0, E1, E2, E3 };\r\n\t\t\treturn this->elem(offset_dst[i]);\r\n\t\t}\r\n\tprotected:\r\n\t\ttemplate <typename T>\r\n\t\tGLM_FUNC_QUALIFIER void _apply_op(const VecType& that, T op)\r\n\t\t{\r\n\t\t\t// Make a copy of the data in this == &that.\r\n\t\t\t// The copier should optimize out the copy in cases where the function is\r\n\t\t\t// properly inlined and the copy is not necessary.\r\n\t\t\tValueType t[N];\r\n\t\t\tfor (int i = 0; i < N; ++i)\r\n\t\t\t\tt[i] = that[i];\r\n\t\t\tfor (int i = 0; i < N; ++i)\r\n\t\t\t\top( (*this)[i], t[i] );\r\n\t\t}\r\n\t};\r\n\r\n\t// Specialization for swizzles containing duplicate elements.  These cannot be modified.\r\n\ttemplate <typename ValueType, precision P, typename VecType, int N, int E0, int E1, int E2, int E3>\r\n\tstruct _swizzle_base2<ValueType, P, VecType,N,E0,E1,E2,E3,1> : public _swizzle_base1<ValueType, P, VecType,E0,E1,E2,E3,N>\r\n\t{\r\n\t\ttypedef VecType         vec_type;        \r\n\t\ttypedef ValueType       value_type;\r\n\r\n\t\tstruct Stub {};\r\n\t\tGLM_FUNC_QUALIFIER _swizzle_base2& operator= (Stub const &) { return *this; }\r\n\r\n\t\tGLM_FUNC_QUALIFIER value_type  operator[]  (size_t i) const\r\n\t\t{\r\n#ifndef __CUDA_ARCH__\r\n\t\t\tstatic\r\n#endif\r\n\t\t\t\tconst int offset_dst[4] = { E0, E1, E2, E3 };\r\n\t\t\treturn this->elem(offset_dst[i]);\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <int N,typename ValueType, precision P, typename VecType, int E0,int E1,int E2,int E3>\r\n\tstruct _swizzle : public _swizzle_base2<ValueType, P, VecType, N,E0,E1,E2,E3,(E0==E1||E0==E2||E0==E3||E1==E2||E1==E3||E2==E3)>\r\n\t{\r\n\t\ttypedef _swizzle_base2<ValueType, P, VecType,N,E0,E1,E2,E3,(E0==E1||E0==E2||E0==E3||E1==E2||E1==E3||E2==E3)> base_type;\r\n\r\n\t\tusing base_type::operator=;\r\n\r\n\t\tGLM_FUNC_QUALIFIER operator VecType () const { return (*this)(); }\r\n\t};\r\n\r\n//\r\n// To prevent the C++ syntax from getting entirely overwhelming, define some alias macros\r\n//\r\n#define _GLM_SWIZZLE_TEMPLATE1   template <int N, typename T, precision P, typename V, int E0, int E1, int E2, int E3>\r\n#define _GLM_SWIZZLE_TEMPLATE2   template <int N, typename T, precision P, typename V, int E0, int E1, int E2, int E3, int F0, int F1, int F2, int F3>\r\n#define _GLM_SWIZZLE_TYPE1       _swizzle<N, T, P, V, E0, E1, E2, E3>\r\n#define _GLM_SWIZZLE_TYPE2       _swizzle<N, T, P, V, F0, F1, F2, F3>\r\n\r\n//\r\n// Wrapper for a binary operator (e.g. u.yy + v.zy)\r\n//\r\n#define _GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND)                 \\\r\n\t_GLM_SWIZZLE_TEMPLATE2                                                          \\\r\n\tGLM_FUNC_QUALIFIER V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b)  \\\r\n\t{                                                                               \\\r\n\t\treturn a() OPERAND b();                                                     \\\r\n\t}                                                                               \\\r\n\t_GLM_SWIZZLE_TEMPLATE1                                                          \\\r\n\tGLM_FUNC_QUALIFIER V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const V& b)                   \\\r\n\t{                                                                               \\\r\n\t\treturn a() OPERAND b;                                                       \\\r\n\t}                                                                               \\\r\n\t_GLM_SWIZZLE_TEMPLATE1                                                          \\\r\n\tGLM_FUNC_QUALIFIER V operator OPERAND ( const V& a, const _GLM_SWIZZLE_TYPE1& b)                   \\\r\n\t{                                                                               \\\r\n\t\treturn a OPERAND b();                                                       \\\r\n\t}\r\n\r\n//\r\n// Wrapper for a operand between a swizzle and a binary (e.g. 1.0f - u.xyz)\r\n//\r\n#define _GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(OPERAND)                 \\\r\n\t_GLM_SWIZZLE_TEMPLATE1                                                          \\\r\n\tGLM_FUNC_QUALIFIER V operator OPERAND ( const _GLM_SWIZZLE_TYPE1& a, const T& b)                   \\\r\n\t{                                                                               \\\r\n\t\treturn a() OPERAND b;                                                       \\\r\n\t}                                                                               \\\r\n\t_GLM_SWIZZLE_TEMPLATE1                                                          \\\r\n\tGLM_FUNC_QUALIFIER V operator OPERAND ( const T& a, const _GLM_SWIZZLE_TYPE1& b)                   \\\r\n\t{                                                                               \\\r\n\t\treturn a OPERAND b();                                                       \\\r\n\t}\r\n\r\n//\r\n// Macro for wrapping a function taking one argument (e.g. abs())\r\n//\r\n#define _GLM_SWIZZLE_FUNCTION_1_ARGS(RETURN_TYPE,FUNCTION)                          \\\r\n\t_GLM_SWIZZLE_TEMPLATE1                                                          \\\r\n\tGLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a)  \\\r\n\t{                                                                               \\\r\n\t\treturn FUNCTION(a());                                                       \\\r\n\t}\r\n\r\n//\r\n// Macro for wrapping a function taking two vector arguments (e.g. dot()).\r\n//\r\n#define _GLM_SWIZZLE_FUNCTION_2_ARGS(RETURN_TYPE,FUNCTION)                                                      \\\r\n\t_GLM_SWIZZLE_TEMPLATE2                                                                                      \\\r\n\tGLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b) \\\r\n\t{                                                                                                           \\\r\n\t\treturn FUNCTION(a(), b());                                                                              \\\r\n\t}                                                                                                           \\\r\n\t_GLM_SWIZZLE_TEMPLATE1                                                                                      \\\r\n\tGLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b) \\\r\n\t{                                                                                                           \\\r\n\t\treturn FUNCTION(a(), b());                                                                              \\\r\n\t}                                                                                                           \\\r\n\t_GLM_SWIZZLE_TEMPLATE1                                                                                      \\\r\n\tGLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename V& b)         \\\r\n\t{                                                                                                           \\\r\n\t\treturn FUNCTION(a(), b);                                                                                \\\r\n\t}                                                                                                           \\\r\n\t_GLM_SWIZZLE_TEMPLATE1                                                                                      \\\r\n\tGLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const V& a, const _GLM_SWIZZLE_TYPE1& b)                  \\\r\n\t{                                                                                                           \\\r\n\t\treturn FUNCTION(a, b());                                                                                \\\r\n\t} \r\n\r\n//\r\n// Macro for wrapping a function take 2 vec arguments followed by a scalar (e.g. mix()).\r\n//\r\n#define _GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(RETURN_TYPE,FUNCTION)                                                             \\\r\n\t_GLM_SWIZZLE_TEMPLATE2                                                                                                    \\\r\n\tGLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE2& b, const T& c)   \\\r\n\t{                                                                                                                         \\\r\n\t\treturn FUNCTION(a(), b(), c);                                                                                         \\\r\n\t}                                                                                                                         \\\r\n\t_GLM_SWIZZLE_TEMPLATE1                                                                                                    \\\r\n\tGLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const _GLM_SWIZZLE_TYPE1& b, const T& c)   \\\r\n\t{                                                                                                                         \\\r\n\t\treturn FUNCTION(a(), b(), c);                                                                                         \\\r\n\t}                                                                                                                         \\\r\n\t_GLM_SWIZZLE_TEMPLATE1                                                                                                    \\\r\n\tGLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const _GLM_SWIZZLE_TYPE1& a, const typename S0::vec_type& b, const T& c)\\\r\n\t{                                                                                                                         \\\r\n\t\treturn FUNCTION(a(), b, c);                                                                                           \\\r\n\t}                                                                                                                         \\\r\n\t_GLM_SWIZZLE_TEMPLATE1                                                                                                    \\\r\n\tGLM_FUNC_QUALIFIER typename _GLM_SWIZZLE_TYPE1::RETURN_TYPE FUNCTION(const typename V& a, const _GLM_SWIZZLE_TYPE1& b, const T& c)           \\\r\n\t{                                                                                                                         \\\r\n\t\treturn FUNCTION(a, b(), c);                                                                                           \\\r\n\t} \r\n \r\n}//namespace detail \r\n}//namespace glm\r\n\r\nnamespace glm\r\n{\r\n\tnamespace detail\r\n\t{\r\n\t\t_GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(-)\r\n\t\t_GLM_SWIZZLE_SCALAR_BINARY_OPERATOR_IMPLEMENTATION(*)\r\n\t\t_GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(+)\r\n\t\t_GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(-)\r\n\t\t_GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(*)\r\n\t\t_GLM_SWIZZLE_VECTOR_BINARY_OPERATOR_IMPLEMENTATION(/)\r\n\t}\r\n\r\n\t//\r\n\t// Swizzles are distinct types from the unswizzled type.  The below macros will\r\n\t// provide template specializations for the swizzle types for the given functions\r\n\t// so that the compiler does not have any ambiguity to choosing how to handle\r\n\t// the function.\r\n\t//\r\n\t// The alternative is to use the operator()() when calling the function in order\r\n\t// to explicitly convert the swizzled type to the unswizzled type.\r\n\t//\r\n\r\n\t//_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type,    abs);\r\n\t//_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type,    acos);\r\n\t//_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type,    acosh);\r\n\t//_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type,    all);\r\n\t//_GLM_SWIZZLE_FUNCTION_1_ARGS(vec_type,    any);\r\n\r\n\t//_GLM_SWIZZLE_FUNCTION_2_ARGS(value_type,  dot);\r\n\t//_GLM_SWIZZLE_FUNCTION_2_ARGS(vec_type,    cross);\r\n\t//_GLM_SWIZZLE_FUNCTION_2_ARGS(vec_type,    step);    \r\n\t//_GLM_SWIZZLE_FUNCTION_2_ARGS_SCALAR(vec_type, mix);\r\n}\r\n\r\n#define _GLM_SWIZZLE2_2_MEMBERS(T, P, V, E0,E1) \\\r\n\tstruct { _swizzle<2, T, P, V<T, P>, 0,0,-1,-2> E0 ## E0; }; \\\r\n\tstruct { _swizzle<2, T, P, V<T, P>, 0,1,-1,-2> E0 ## E1; }; \\\r\n\tstruct { _swizzle<2, T, P, V<T, P>, 1,0,-1,-2> E1 ## E0; }; \\\r\n\tstruct { _swizzle<2, T, P, V<T, P>, 1,1,-1,-2> E1 ## E1; }; \r\n\r\n#define _GLM_SWIZZLE2_3_MEMBERS(T, P, V, E0,E1) \\\r\n\tstruct { _swizzle<3,T, P, V<T, P>, 0,0,0,-1> E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<3,T, P, V<T, P>, 0,0,1,-1> E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<3,T, P, V<T, P>, 0,1,0,-1> E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<3,T, P, V<T, P>, 0,1,1,-1> E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<3,T, P, V<T, P>, 1,0,0,-1> E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<3,T, P, V<T, P>, 1,0,1,-1> E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<3,T, P, V<T, P>, 1,1,0,-1> E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<3,T, P, V<T, P>, 1,1,1,-1> E1 ## E1 ## E1; };  \r\n\r\n#define _GLM_SWIZZLE2_4_MEMBERS(T, P, V, E0,E1) \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,1,1> E1 ## E1 ## E1 ## E1; };  \r\n\r\n#define _GLM_SWIZZLE3_2_MEMBERS(T, P, V, E0,E1,E2) \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 0,0,-1,-2> E0 ## E0; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 0,1,-1,-2> E0 ## E1; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 0,2,-1,-2> E0 ## E2; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 1,0,-1,-2> E1 ## E0; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 1,1,-1,-2> E1 ## E1; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 1,2,-1,-2> E1 ## E2; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 2,0,-1,-2> E2 ## E0; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 2,1,-1,-2> E2 ## E1; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 2,2,-1,-2> E2 ## E2; }; \r\n\r\n#define _GLM_SWIZZLE3_3_MEMBERS(T, P, V ,E0,E1,E2) \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,0,0,-1> E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,0,1,-1> E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,0,2,-1> E0 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,1,0,-1> E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,1,1,-1> E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,1,2,-1> E0 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,2,0,-1> E0 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,2,1,-1> E0 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,2,2,-1> E0 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,0,0,-1> E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,0,1,-1> E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,0,2,-1> E1 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,1,0,-1> E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,1,1,-1> E1 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,1,2,-1> E1 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,2,0,-1> E1 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,2,1,-1> E1 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,2,2,-1> E1 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,0,0,-1> E2 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,0,1,-1> E2 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,0,2,-1> E2 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,1,0,-1> E2 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,1,1,-1> E2 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,1,2,-1> E2 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,2,0,-1> E2 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,2,1,-1> E2 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,2,2,-1> E2 ## E2 ## E2; };\r\n\r\n#define _GLM_SWIZZLE3_4_MEMBERS(T, P, V, E0,E1,E2) \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,0,2> E0 ## E0 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,1,2> E0 ## E0 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,2,0> E0 ## E0 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,2,1> E0 ## E0 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,0,2,2> E0 ## E0 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,0,2> E0 ## E1 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,1,2> E0 ## E1 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,2,0> E0 ## E1 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,2,1> E0 ## E1 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,1,2,2> E0 ## E1 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,2,0,0> E0 ## E2 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,2,0,1> E0 ## E2 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,2,0,2> E0 ## E2 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,2,1,0> E0 ## E2 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,2,1,1> E0 ## E2 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,2,1,2> E0 ## E2 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,2,2,0> E0 ## E2 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,2,2,1> E0 ## E2 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 0,2,2,2> E0 ## E2 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,0,2> E1 ## E0 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,1,2> E1 ## E0 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,2,0> E1 ## E0 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,2,1> E1 ## E0 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,0,2,2> E1 ## E0 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,0,2> E1 ## E1 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,1,1> E1 ## E1 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,1,2> E1 ## E1 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,2,0> E1 ## E1 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,2,1> E1 ## E1 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,1,2,2> E1 ## E1 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,2,0,0> E1 ## E2 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,2,0,1> E1 ## E2 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,2,0,2> E1 ## E2 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,2,1,0> E1 ## E2 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,2,1,1> E1 ## E2 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,2,1,2> E1 ## E2 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,2,2,0> E1 ## E2 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,2,2,1> E1 ## E2 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 1,2,2,2> E1 ## E2 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,0,0,0> E2 ## E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,0,0,1> E2 ## E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,0,0,2> E2 ## E0 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,0,1,0> E2 ## E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,0,1,1> E2 ## E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,0,1,2> E2 ## E0 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,0,2,0> E2 ## E0 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,0,2,1> E2 ## E0 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,0,2,2> E2 ## E0 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,1,0,0> E2 ## E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,1,0,1> E2 ## E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,1,0,2> E2 ## E1 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,1,1,0> E2 ## E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,1,1,1> E2 ## E1 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,1,1,2> E2 ## E1 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,1,2,0> E2 ## E1 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,1,2,1> E2 ## E1 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,1,2,2> E2 ## E1 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,2,0,0> E2 ## E2 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,2,0,1> E2 ## E2 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,2,0,2> E2 ## E2 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,2,1,0> E2 ## E2 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,2,1,1> E2 ## E2 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,2,1,2> E2 ## E2 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,2,2,0> E2 ## E2 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,2,2,1> E2 ## E2 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4,T, P, V<T, P>, 2,2,2,2> E2 ## E2 ## E2 ## E2; }; \r\n\r\n#define _GLM_SWIZZLE4_2_MEMBERS(T, P, V, E0,E1,E2,E3) \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 0,0,-1,-2> E0 ## E0; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 0,1,-1,-2> E0 ## E1; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 0,2,-1,-2> E0 ## E2; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 0,3,-1,-2> E0 ## E3; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 1,0,-1,-2> E1 ## E0; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 1,1,-1,-2> E1 ## E1; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 1,2,-1,-2> E1 ## E2; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 1,3,-1,-2> E1 ## E3; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 2,0,-1,-2> E2 ## E0; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 2,1,-1,-2> E2 ## E1; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 2,2,-1,-2> E2 ## E2; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 2,3,-1,-2> E2 ## E3; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 3,0,-1,-2> E3 ## E0; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 3,1,-1,-2> E3 ## E1; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 3,2,-1,-2> E3 ## E2; }; \\\r\n\tstruct { _swizzle<2,T, P, V<T, P>, 3,3,-1,-2> E3 ## E3; }; \r\n\r\n#define _GLM_SWIZZLE4_3_MEMBERS(T,P, V, E0,E1,E2,E3) \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,0,0,-1> E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,0,1,-1> E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,0,2,-1> E0 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,0,3,-1> E0 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,1,0,-1> E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,1,1,-1> E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,1,2,-1> E0 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,1,3,-1> E0 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,2,0,-1> E0 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,2,1,-1> E0 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,2,2,-1> E0 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,2,3,-1> E0 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,3,0,-1> E0 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,3,1,-1> E0 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,3,2,-1> E0 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 0,3,3,-1> E0 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,0,0,-1> E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,0,1,-1> E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,0,2,-1> E1 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,0,3,-1> E1 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,1,0,-1> E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,1,1,-1> E1 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,1,2,-1> E1 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,1,3,-1> E1 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,2,0,-1> E1 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,2,1,-1> E1 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,2,2,-1> E1 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,2,3,-1> E1 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,3,0,-1> E1 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,3,1,-1> E1 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,3,2,-1> E1 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 1,3,3,-1> E1 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,0,0,-1> E2 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,0,1,-1> E2 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,0,2,-1> E2 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,0,3,-1> E2 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,1,0,-1> E2 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,1,1,-1> E2 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,1,2,-1> E2 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,1,3,-1> E2 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,2,0,-1> E2 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,2,1,-1> E2 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,2,2,-1> E2 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,2,3,-1> E2 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,3,0,-1> E2 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,3,1,-1> E2 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,3,2,-1> E2 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 2,3,3,-1> E2 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,0,0,-1> E3 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,0,1,-1> E3 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,0,2,-1> E3 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,0,3,-1> E3 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,1,0,-1> E3 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,1,1,-1> E3 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,1,2,-1> E3 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,1,3,-1> E3 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,2,0,-1> E3 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,2,1,-1> E3 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,2,2,-1> E3 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,2,3,-1> E3 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,3,0,-1> E3 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,3,1,-1> E3 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,3,2,-1> E3 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<3,T,P, V<T, P>, 3,3,3,-1> E3 ## E3 ## E3; };  \r\n\r\n#define _GLM_SWIZZLE4_4_MEMBERS(T, P, V, E0,E1,E2,E3) \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,0,0> E0 ## E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,0,1> E0 ## E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,0,2> E0 ## E0 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,0,3> E0 ## E0 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,1,0> E0 ## E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,1,1> E0 ## E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,1,2> E0 ## E0 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,1,3> E0 ## E0 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,2,0> E0 ## E0 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,2,1> E0 ## E0 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,2,2> E0 ## E0 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,2,3> E0 ## E0 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,3,0> E0 ## E0 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,3,1> E0 ## E0 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,3,2> E0 ## E0 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,0,3,3> E0 ## E0 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,0,0> E0 ## E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,0,1> E0 ## E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,0,2> E0 ## E1 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,0,3> E0 ## E1 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,1,0> E0 ## E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,1,1> E0 ## E1 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,1,2> E0 ## E1 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,1,3> E0 ## E1 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,2,0> E0 ## E1 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,2,1> E0 ## E1 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,2,2> E0 ## E1 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,2,3> E0 ## E1 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,3,0> E0 ## E1 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,3,1> E0 ## E1 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,3,2> E0 ## E1 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,1,3,3> E0 ## E1 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,0,0> E0 ## E2 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,0,1> E0 ## E2 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,0,2> E0 ## E2 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,0,3> E0 ## E2 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,1,0> E0 ## E2 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,1,1> E0 ## E2 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,1,2> E0 ## E2 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,1,3> E0 ## E2 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,2,0> E0 ## E2 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,2,1> E0 ## E2 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,2,2> E0 ## E2 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,2,3> E0 ## E2 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,3,0> E0 ## E2 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,3,1> E0 ## E2 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,3,2> E0 ## E2 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,2,3,3> E0 ## E2 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,0,0> E0 ## E3 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,0,1> E0 ## E3 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,0,2> E0 ## E3 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,0,3> E0 ## E3 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,1,0> E0 ## E3 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,1,1> E0 ## E3 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,1,2> E0 ## E3 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,1,3> E0 ## E3 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,2,0> E0 ## E3 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,2,1> E0 ## E3 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,2,2> E0 ## E3 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,2,3> E0 ## E3 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,3,0> E0 ## E3 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,3,1> E0 ## E3 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,3,2> E0 ## E3 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 0,3,3,3> E0 ## E3 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,0,0> E1 ## E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,0,1> E1 ## E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,0,2> E1 ## E0 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,0,3> E1 ## E0 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,1,0> E1 ## E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,1,1> E1 ## E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,1,2> E1 ## E0 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,1,3> E1 ## E0 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,2,0> E1 ## E0 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,2,1> E1 ## E0 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,2,2> E1 ## E0 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,2,3> E1 ## E0 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,3,0> E1 ## E0 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,3,1> E1 ## E0 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,3,2> E1 ## E0 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,0,3,3> E1 ## E0 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,0,0> E1 ## E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,0,1> E1 ## E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,0,2> E1 ## E1 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,0,3> E1 ## E1 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,1,0> E1 ## E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,1,1> E1 ## E1 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,1,2> E1 ## E1 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,1,3> E1 ## E1 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,2,0> E1 ## E1 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,2,1> E1 ## E1 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,2,2> E1 ## E1 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,2,3> E1 ## E1 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,3,0> E1 ## E1 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,3,1> E1 ## E1 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,3,2> E1 ## E1 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,1,3,3> E1 ## E1 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,0,0> E1 ## E2 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,0,1> E1 ## E2 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,0,2> E1 ## E2 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,0,3> E1 ## E2 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,1,0> E1 ## E2 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,1,1> E1 ## E2 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,1,2> E1 ## E2 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,1,3> E1 ## E2 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,2,0> E1 ## E2 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,2,1> E1 ## E2 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,2,2> E1 ## E2 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,2,3> E1 ## E2 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,3,0> E1 ## E2 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,3,1> E1 ## E2 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,3,2> E1 ## E2 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,2,3,3> E1 ## E2 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,0,0> E1 ## E3 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,0,1> E1 ## E3 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,0,2> E1 ## E3 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,0,3> E1 ## E3 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,1,0> E1 ## E3 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,1,1> E1 ## E3 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,1,2> E1 ## E3 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,1,3> E1 ## E3 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,2,0> E1 ## E3 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,2,1> E1 ## E3 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,2,2> E1 ## E3 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,2,3> E1 ## E3 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,3,0> E1 ## E3 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,3,1> E1 ## E3 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,3,2> E1 ## E3 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 1,3,3,3> E1 ## E3 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,0,0> E2 ## E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,0,1> E2 ## E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,0,2> E2 ## E0 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,0,3> E2 ## E0 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,1,0> E2 ## E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,1,1> E2 ## E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,1,2> E2 ## E0 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,1,3> E2 ## E0 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,2,0> E2 ## E0 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,2,1> E2 ## E0 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,2,2> E2 ## E0 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,2,3> E2 ## E0 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,3,0> E2 ## E0 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,3,1> E2 ## E0 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,3,2> E2 ## E0 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,0,3,3> E2 ## E0 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,0,0> E2 ## E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,0,1> E2 ## E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,0,2> E2 ## E1 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,0,3> E2 ## E1 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,1,0> E2 ## E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,1,1> E2 ## E1 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,1,2> E2 ## E1 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,1,3> E2 ## E1 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,2,0> E2 ## E1 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,2,1> E2 ## E1 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,2,2> E2 ## E1 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,2,3> E2 ## E1 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,3,0> E2 ## E1 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,3,1> E2 ## E1 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,3,2> E2 ## E1 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,1,3,3> E2 ## E1 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,0,0> E2 ## E2 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,0,1> E2 ## E2 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,0,2> E2 ## E2 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,0,3> E2 ## E2 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,1,0> E2 ## E2 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,1,1> E2 ## E2 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,1,2> E2 ## E2 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,1,3> E2 ## E2 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,2,0> E2 ## E2 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,2,1> E2 ## E2 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,2,2> E2 ## E2 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,2,3> E2 ## E2 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,3,0> E2 ## E2 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,3,1> E2 ## E2 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,3,2> E2 ## E2 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,2,3,3> E2 ## E2 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,0,0> E2 ## E3 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,0,1> E2 ## E3 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,0,2> E2 ## E3 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,0,3> E2 ## E3 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,1,0> E2 ## E3 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,1,1> E2 ## E3 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,1,2> E2 ## E3 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,1,3> E2 ## E3 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,2,0> E2 ## E3 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,2,1> E2 ## E3 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,2,2> E2 ## E3 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,2,3> E2 ## E3 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,3,0> E2 ## E3 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,3,1> E2 ## E3 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,3,2> E2 ## E3 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 2,3,3,3> E2 ## E3 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,0,0> E3 ## E0 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,0,1> E3 ## E0 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,0,2> E3 ## E0 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,0,3> E3 ## E0 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,1,0> E3 ## E0 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,1,1> E3 ## E0 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,1,2> E3 ## E0 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,1,3> E3 ## E0 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,2,0> E3 ## E0 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,2,1> E3 ## E0 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,2,2> E3 ## E0 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,2,3> E3 ## E0 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,3,0> E3 ## E0 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,3,1> E3 ## E0 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,3,2> E3 ## E0 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,0,3,3> E3 ## E0 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,0,0> E3 ## E1 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,0,1> E3 ## E1 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,0,2> E3 ## E1 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,0,3> E3 ## E1 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,1,0> E3 ## E1 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,1,1> E3 ## E1 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,1,2> E3 ## E1 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,1,3> E3 ## E1 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,2,0> E3 ## E1 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,2,1> E3 ## E1 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,2,2> E3 ## E1 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,2,3> E3 ## E1 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,3,0> E3 ## E1 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,3,1> E3 ## E1 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,3,2> E3 ## E1 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,1,3,3> E3 ## E1 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,0,0> E3 ## E2 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,0,1> E3 ## E2 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,0,2> E3 ## E2 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,0,3> E3 ## E2 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,1,0> E3 ## E2 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,1,1> E3 ## E2 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,1,2> E3 ## E2 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,1,3> E3 ## E2 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,2,0> E3 ## E2 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,2,1> E3 ## E2 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,2,2> E3 ## E2 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,2,3> E3 ## E2 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,3,0> E3 ## E2 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,3,1> E3 ## E2 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,3,2> E3 ## E2 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,2,3,3> E3 ## E2 ## E3 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,0,0> E3 ## E3 ## E0 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,0,1> E3 ## E3 ## E0 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,0,2> E3 ## E3 ## E0 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,0,3> E3 ## E3 ## E0 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,1,0> E3 ## E3 ## E1 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,1,1> E3 ## E3 ## E1 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,1,2> E3 ## E3 ## E1 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,1,3> E3 ## E3 ## E1 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,2,0> E3 ## E3 ## E2 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,2,1> E3 ## E3 ## E2 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,2,2> E3 ## E3 ## E2 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,2,3> E3 ## E3 ## E2 ## E3; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,3,0> E3 ## E3 ## E3 ## E0; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,3,1> E3 ## E3 ## E3 ## E1; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,3,2> E3 ## E3 ## E3 ## E2; }; \\\r\n\tstruct { _swizzle<4, T, P, V<T, P>, 3,3,3,3> E3 ## E3 ## E3 ## E3; };\r\n\r\n#endif//glm_core_swizzle\r\n"
  },
  {
    "path": "gpu/glm/detail/_swizzle_func.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/_swizzle_func.hpp\r\n/// @date 2011-10-16 / 2011-10-16\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_swizzle_func\r\n#define glm_core_swizzle_func\r\n\r\n#define GLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B)\t\\\r\n\tSWIZZLED_TYPE<TMPL_TYPE, PRECISION> A ## B() CONST\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B);\t\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define GLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C)\t\t\\\r\n\tSWIZZLED_TYPE<TMPL_TYPE, PRECISION> A ## B ## C() CONST\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B, this->C);\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define GLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C, D)\t\\\r\n\tSWIZZLED_TYPE<TMPL_TYPE, PRECISION> A ## B ## C ## D() CONST\t\t\t\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B, this->C, this->D);\t\t\t\t\t\\\r\n\t}\r\n\r\n#define GLM_SWIZZLE_GEN_VEC2_ENTRY_DEF(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B)\t\\\r\n\ttemplate <typename TMPL_TYPE>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\tSWIZZLED_TYPE<TMPL_TYPE> CLASS_TYPE<TMPL_TYPE, PRECISION>::A ## B() CONST\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B);\t\t\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define GLM_SWIZZLE_GEN_VEC3_ENTRY_DEF(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C)\t\t\\\r\n\ttemplate <typename TMPL_TYPE>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\tSWIZZLED_TYPE<TMPL_TYPE> CLASS_TYPE<TMPL_TYPE, PRECISION>::A ## B ## C() CONST\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B, this->C);\t\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define GLM_SWIZZLE_GEN_VEC4_ENTRY_DEF(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, CONST, A, B, C, D)\t\\\r\n\ttemplate <typename TMPL_TYPE>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\tSWIZZLED_TYPE<TMPL_TYPE> CLASS_TYPE<TMPL_TYPE, PRECISION>::A ## B ## C ## D() CONST\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn SWIZZLED_TYPE<TMPL_TYPE, PRECISION>(this->A, this->B, this->C, this->D);\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define GLM_MUTABLE\r\n\r\n#define GLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A)\r\n\r\n#define GLM_SWIZZLE_GEN_REF_FROM_VEC2(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE) \\\r\n\tGLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, x, y) \\\r\n\tGLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, r, g) \\\r\n\tGLM_SWIZZLE_GEN_REF2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, s, t)\r\n\r\n//GLM_SWIZZLE_GEN_REF_FROM_VEC2(valType, detail::vec2, detail::ref2)\r\n\r\n#define GLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B)\r\n\r\n#define GLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B, A)\r\n\r\n#define GLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_REF3_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_REF2_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C)\r\n\r\n#define GLM_SWIZZLE_GEN_REF_FROM_VEC3(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE) \\\r\n\tGLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, x, y, z) \\\r\n\tGLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, r, g, b) \\\r\n\tGLM_SWIZZLE_GEN_REF_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, s, t, p)\r\n\r\n//GLM_SWIZZLE_GEN_REF_FROM_VEC3(valType, detail::vec3, detail::ref2, detail::ref3)\r\n\r\n#define GLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, GLM_MUTABLE, D, C)\r\n\r\n#define GLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, C, B)\r\n\r\n#define GLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, C, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, C, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, D, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, D, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, B, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, C, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, C, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, D, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, D, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, A, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , B, A, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, B, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, B, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, D, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, D, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, A, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , C, A, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, C, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, , D, B, C, A)\r\n\r\n#define GLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_REF2_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_REF3_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_REF4_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D)\r\n\r\n#define GLM_SWIZZLE_GEN_REF_FROM_VEC4(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \\\r\n\tGLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z, w) \\\r\n\tGLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b, a) \\\r\n\tGLM_SWIZZLE_GEN_REF_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, p, q)\r\n\r\n//GLM_SWIZZLE_GEN_REF_FROM_VEC4(valType, detail::vec4, detail::ref2, detail::ref3, detail::ref4)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_FROM_VEC2_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC_FROM_VEC2(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE)\t\t\t\\\r\n\tGLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y)\t\\\r\n\tGLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g)\t\\\r\n\tGLM_SWIZZLE_GEN_VEC_FROM_VEC2_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t)\r\n\r\n//GLM_SWIZZLE_GEN_VEC_FROM_VEC2(valType, detail::vec2, detail::vec2, detail::vec3, detail::vec4)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, C)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_FROM_VEC3_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC_FROM_VEC3(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \\\r\n\tGLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z) \\\r\n\tGLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b) \\\r\n\tGLM_SWIZZLE_GEN_VEC_FROM_VEC3_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, p)\r\n\r\n//GLM_SWIZZLE_GEN_VEC_FROM_VEC3(valType, detail::vec3, detail::vec2, detail::vec3, detail::vec4)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, A, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, B, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, C, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, A, D, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, A, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, B, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, C, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, B, D, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, A, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, B, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, C, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, C, D, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, A, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, B, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, C, D, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, A, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, B, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, A) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, B) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, C) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_ENTRY(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_TYPE, const, D, D, D, D)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC2_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC3_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC3_TYPE, A, B, C, D) \\\r\n\tGLM_SWIZZLE_GEN_VEC4_FROM_VEC4_SWIZZLE(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC4_TYPE, A, B, C, D)\r\n\r\n#define GLM_SWIZZLE_GEN_VEC_FROM_VEC4(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE) \\\r\n\tGLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, x, y, z, w) \\\r\n\tGLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, r, g, b, a) \\\r\n\tGLM_SWIZZLE_GEN_VEC_FROM_VEC4_COMP(TMPL_TYPE, PRECISION, CLASS_TYPE, SWIZZLED_VEC2_TYPE, SWIZZLED_VEC3_TYPE, SWIZZLED_VEC4_TYPE, s, t, p, q)\r\n\r\n//GLM_SWIZZLE_GEN_VEC_FROM_VEC4(valType, detail::vec4, detail::vec2, detail::vec3, detail::vec4)\r\n\r\n#endif//glm_core_swizzle_func\r\n"
  },
  {
    "path": "gpu/glm/detail/_vectorize.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/_vectorize.hpp\r\n/// @date 2011-10-14 / 2011-10-14\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_CORE_DETAIL_INCLUDED\r\n#define GLM_CORE_DETAIL_INCLUDED\r\n\r\n#include \"type_vec1.hpp\"\r\n#include \"type_vec2.hpp\"\r\n#include \"type_vec3.hpp\"\r\n#include \"type_vec4.hpp\"\r\n\r\n#define VECTORIZE1_VEC(func)\t\t\t\t\t\t\\\r\n\ttemplate <typename T, precision P>\t\t\t\t\\\r\n\tGLM_FUNC_QUALIFIER detail::tvec1<T, P> func(\t\\\r\n\t\tdetail::tvec1<T, P> const & v)\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn detail::tvec1<T, P>(\t\t\t\t\t\\\r\n\t\t\tfunc(v.x));\t\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define VECTORIZE2_VEC(func)\t\t\t\t\t\t\\\r\n\ttemplate <typename T, precision P>\t\t\t\t\\\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> func(\t\\\r\n\t\tdetail::tvec2<T, P> const & v)\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn detail::tvec2<T, P>(\t\t\t\t\t\\\r\n\t\t\tfunc(v.x),\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(v.y));\t\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define VECTORIZE3_VEC(func)\t\t\t\t\t\t\\\r\n\ttemplate <typename T, precision P>\t\t\t\t\\\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> func(\t\\\r\n\t\tdetail::tvec3<T, P> const & v)\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn detail::tvec3<T, P>(\t\t\t\t\t\\\r\n\t\t\tfunc(v.x),\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(v.y),\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(v.z));\t\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define VECTORIZE4_VEC(func)\t\t\t\t\t\t\\\r\n\ttemplate <typename T, precision P>\t\t\t\t\\\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> func(\t\\\r\n\t\tdetail::tvec4<T, P> const & v)\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn detail::tvec4<T, P>(\t\t\t\t\t\\\r\n\t\t\tfunc(v.x),\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(v.y),\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(v.z),\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(v.w));\t\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define VECTORIZE_VEC(func)\t\t\\\r\n\tVECTORIZE1_VEC(func)\t\t\\\r\n\tVECTORIZE2_VEC(func)\t\t\\\r\n\tVECTORIZE3_VEC(func)\t\t\\\r\n\tVECTORIZE4_VEC(func)\r\n\r\n#define VECTORIZE1_VEC_SCA(func)\t\t\t\t\t\t\t\\\r\n\ttemplate <typename T, precision P>\t\t\t\t\t\t\\\r\n\tGLM_FUNC_QUALIFIER detail::tvec1<T, P> func\t\t\t\t\\\r\n\t(\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\tdetail::tvec1<T, P> const & x,\t\t\t\t\t\t\\\r\n\t\tT const & y\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn detail::tvec1<T, P>(\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.x, y));\t\t\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define VECTORIZE2_VEC_SCA(func)\t\t\t\t\t\t\t\\\r\n\ttemplate <typename T, precision P>\t\t\t\t\t\t\\\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> func\t\t\t\t\\\r\n\t(\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\tdetail::tvec2<T, P> const & x,\t\t\t\t\t\t\\\r\n\t\tT const & y\t\\\r\n\t)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn detail::tvec2<T, P>(\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.x, y),\t\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.y, y));\t\t\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define VECTORIZE3_VEC_SCA(func)\t\t\t\t\t\t\t\\\r\n\ttemplate <typename T, precision P>\t\t\t\t\t\t\\\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> func\t\t\t\t\\\r\n\t(\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\tdetail::tvec3<T, P> const & x,\t\t\t\t\t\t\\\r\n\t\tT const & y\t\\\r\n\t)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn detail::tvec3<T, P>(\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.x, y),\t\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.y, y),\t\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.z, y));\t\t\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define VECTORIZE4_VEC_SCA(func)\t\t\t\t\t\t\t\\\r\n\ttemplate <typename T, precision P>\t\t\t\t\t\t\\\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> func\t\t\t\t\\\r\n\t(\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\tdetail::tvec4<T, P> const & x,\t\t\t\t\t\t\\\r\n\t\tT const & y\t\\\r\n\t)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn detail::tvec4<T, P>(\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.x, y),\t\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.y, y),\t\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.z, y),\t\t\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.w, y));\t\t\t\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define VECTORIZE_VEC_SCA(func)\t\t\\\r\n\tVECTORIZE1_VEC_SCA(func)\t\t\\\r\n\tVECTORIZE2_VEC_SCA(func)\t\t\\\r\n\tVECTORIZE3_VEC_SCA(func)\t\t\\\r\n\tVECTORIZE4_VEC_SCA(func)\r\n\r\n#define VECTORIZE2_VEC_VEC(func)\t\t\t\t\t\\\r\n\ttemplate <typename T, precision P>\t\t\t\t\\\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> func\t\t\\\r\n\t(\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\tdetail::tvec2<T, P> const & x,\t\t\t\t\\\r\n\t\tdetail::tvec2<T, P> const & y\t\t\t\t\\\r\n\t)\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn detail::tvec2<T, P>(\t\t\t\t\t\\\r\n\t\t\tfunc(x.x, y.x),\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.y, y.y));\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define VECTORIZE3_VEC_VEC(func)\t\t\t\t\t\\\r\n\ttemplate <typename T, precision P>\t\t\t\t\\\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> func\t\t\\\r\n\t(\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\tdetail::tvec3<T, P> const & x,\t\t\t\t\\\r\n\t\tdetail::tvec3<T, P> const & y\t\t\t\t\\\r\n\t)\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn detail::tvec3<T, P>(\t\t\t\t\t\\\r\n\t\t\tfunc(x.x, y.x),\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.y, y.y),\t\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.z, y.z));\t\t\t\t\t\t\\\r\n\t}\r\n\r\n#define VECTORIZE4_VEC_VEC(func)\t\t\t\t\\\r\n\ttemplate <typename T, precision P>\t\t\t\\\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> func\t\\\r\n\t(\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\tdetail::tvec4<T, P> const & x,\t\t\t\\\r\n\t\tdetail::tvec4<T, P> const & y\t\t\t\\\r\n\t)\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\\\r\n\t\treturn detail::tvec4<T, P>(\t\t\t\t\\\r\n\t\t\tfunc(x.x, y.x),\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.y, y.y),\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.z, y.z),\t\t\t\t\t\t\\\r\n\t\t\tfunc(x.w, y.w));\t\t\t\t\t\\\r\n\t}\r\n\r\n#define VECTORIZE_VEC_VEC(func)\t\t\\\r\n\tVECTORIZE2_VEC_VEC(func)\t\t\\\r\n\tVECTORIZE3_VEC_VEC(func)\t\t\\\r\n\tVECTORIZE4_VEC_VEC(func)\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate<bool C>\r\n\tstruct If\r\n\t{\r\n\t\ttemplate<typename F, typename T>\r\n\t\tstatic GLM_FUNC_QUALIFIER T apply(F functor, const T& val)\r\n\t\t{\r\n\t\t\treturn functor(val);\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate<>\r\n\tstruct If<false>\r\n\t{\r\n\t\ttemplate<typename F, typename T>\r\n\t\tstatic GLM_FUNC_QUALIFIER T apply(F, const T& val)\r\n\t\t{\r\n\t\t\treturn val;\r\n\t\t}\r\n\t};\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#endif//GLM_CORE_DETAIL_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/detail/dummy.cpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/dummy.cpp\r\n/// @date 2011-01-19 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///\r\n/// GLM is a header only library. There is nothing to compile. \r\n/// dummy.cpp exist only a wordaround for CMake file.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#define GLM_FORCE_RADIANS\r\n#define GLM_MESSAGES\r\n#include \"../glm.hpp\"\r\n#include <limits>\r\n/*\r\n#if(GLM_ARCH & GLM_ARCH_SSE2)\r\nstruct float4\r\n{\r\n\tunion\r\n\t{\r\n\t\tstruct {float r, g, b, a;};\r\n\t\tstruct {float s, t, p, q;};\r\n\t\tstruct {float x, y, z, w;};\r\n\t\t__m128 data;\r\n\t};\r\n};\r\n\r\nint test_simd()\r\n{\r\n\tfloat4 f;\r\n\r\n\r\n\r\n\treturn 0;\r\n}\r\n\r\n#endif//GLM_ARCH\r\n*/\r\n\r\ntemplate <class T = int>\r\nclass C;\r\n\r\ntemplate <class T>\r\nclass C\r\n{\r\npublic:\r\n\tT value;\r\n};\r\n\r\nint main()\r\n{\r\n/*\r\n#\tif(GLM_ARCH & GLM_ARCH_SSE2)\r\n\t\ttest_simd();\r\n#\tendif\r\n*/ \r\n\r\n\tC<> c;\r\n\r\n\treturn 0;\r\n}\r\n"
  },
  {
    "path": "gpu/glm/detail/func_common.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_common.hpp\r\n/// @date 2008-03-08 / 2010-01-26\r\n/// @author Christophe Riccio\r\n/// \r\n/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n///\r\n/// @defgroup core_func_common Common functions\r\n/// @ingroup core\r\n/// \r\n/// These all operate component-wise. The description is per component.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_FUNC_COMMON_INCLUDED\r\n#define GLM_FUNC_COMMON_INCLUDED\r\n\r\n#include \"setup.hpp\"\r\n#include \"precision.hpp\"\r\n#include \"type_int.hpp\"\r\n#include \"_fixes.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup core_func_common\r\n\t/// @{\r\n\r\n\t/// Returns x if x >= 0; otherwise, it returns -x.\r\n\t/// \r\n\t/// @tparam genType floating-point or signed integer; scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/abs.xml\">GLSL abs man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType abs(genType const & x);\r\n\r\n\t/// Returns 1.0 if x > 0, 0.0 if x == 0, or -1.0 if x < 0. \r\n\t/// \r\n\t/// @tparam genType Floating-point or signed integer; scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/sign.xml\">GLSL sign man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType sign(genType const & x);\r\n\t\r\n\t/// Returns a value equal to the nearest integer that is less then or equal to x. \r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/floor.xml\">GLSL floor man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType floor(genType const & x);\r\n\r\n\t/// Returns a value equal to the nearest integer to x\r\n\t/// whose absolute value is not larger than the absolute value of x.\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/trunc.xml\">GLSL trunc man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType trunc(genType const & x);\r\n\r\n\t/// Returns a value equal to the nearest integer to x.\r\n\t/// The fraction 0.5 will round in a direction chosen by the\r\n\t/// implementation, presumably the direction that is fastest.\r\n\t/// This includes the possibility that round(x) returns the\r\n\t/// same value as roundEven(x) for all values of x.\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/round.xml\">GLSL round man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType round(genType const & x);\r\n\t\r\n\t/// Returns a value equal to the nearest integer to x.\r\n\t/// A fractional part of 0.5 will round toward the nearest even\r\n\t/// integer. (Both 3.5 and 4.5 for x will return 4.0.)\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/roundEven.xml\">GLSL roundEven man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\t/// @see <a href=\"http://developer.amd.com/documentation/articles/pages/New-Round-to-Even-Technique.aspx\">New round to even technique</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType roundEven(genType const & x);\r\n\r\n\t/// Returns a value equal to the nearest integer\r\n\t/// that is greater than or equal to x.\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/ceil.xml\">GLSL ceil man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType ceil(genType const & x);\r\n\r\n\t/// Return x - floor(x).\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/fract.xml\">GLSL fract man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType fract(genType const & x);\r\n\r\n\t/// Modulus. Returns x - y * floor(x / y)\r\n\t/// for each component in x using the floating point value y.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml\">GLSL mod man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType mod(\r\n\t\tgenType const & x,\r\n\t\tgenType const & y);\r\n\r\n\t/// Modulus. Returns x - y * floor(x / y)\r\n\t/// for each component in x using the floating point value y.\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/mod.xml\">GLSL mod man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType mod(\r\n\t\tgenType const & x,\r\n\t\ttypename genType::value_type const & y);\r\n\r\n\t/// Returns the fractional part of x and sets i to the integer\r\n\t/// part (as a whole number floating point value). Both the\r\n\t/// return value and the output parameter will have the same\r\n\t/// sign as x.\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/modf.xml\">GLSL modf man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType modf(\r\n\t\tgenType const & x,\r\n\t\tgenType & i);\r\n\r\n\t/// Returns y if y < x; otherwise, it returns x.\r\n\t///\r\n\t/// @tparam genType Floating-point or integer; scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/min.xml\">GLSL min man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a><<<<<<< HEAD\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType min(\r\n\t\tgenType const & x,\r\n\t\tgenType const & y);\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType min(\r\n\t\tgenType const & x,\r\n\t\ttypename genType::value_type const & y);\r\n\r\n\t/// Returns y if x < y; otherwise, it returns x.\r\n\t/// \r\n\t/// @tparam genType Floating-point or integer; scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/max.xml\">GLSL max man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType max(\r\n\t\tgenType const & x,\r\n\t\tgenType const & y);\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType max(\r\n\t\tgenType const & x,\r\n\t\ttypename genType::value_type const & y);\r\n\r\n\t/// Returns min(max(x, minVal), maxVal) for each component in x \r\n\t/// using the floating-point values minVal and maxVal.\r\n\t///\r\n\t/// @tparam genType Floating-point or integer; scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/clamp.xml\">GLSL clamp man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType clamp(\r\n\t\tgenType const & x,\r\n\t\tgenType const & minVal,\r\n\t\tgenType const & maxVal);\r\n\r\n\ttemplate <typename genType, precision P>\r\n\tGLM_FUNC_DECL genType clamp(\r\n\t\tgenType const & x,\r\n\t\ttypename genType::value_type const & minVal,\r\n\t\ttypename genType::value_type const & maxVal);\r\n\r\n\t/// If genTypeU is a floating scalar or vector:\r\n\t/// Returns x * (1.0 - a) + y * a, i.e., the linear blend of\r\n\t/// x and y using the floating-point value a.\r\n\t/// The value for a is not restricted to the range [0, 1].\r\n\t/// \r\n\t/// If genTypeU is a boolean scalar or vector:\r\n\t/// Selects which vector each returned component comes\r\n\t/// from. For a component of <a> that is false, the\r\n\t/// corresponding component of x is returned. For a\r\n\t/// component of a that is true, the corresponding\r\n\t/// component of y is returned. Components of x and y that\r\n\t/// are not selected are allowed to be invalid floating point\r\n\t/// values and will have no effect on the results. Thus, this\r\n\t/// provides different functionality than\r\n\t/// genType mix(genType x, genType y, genType(a))\r\n\t/// where a is a Boolean vector.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/mix.xml\">GLSL mix man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\t/// \r\n\t/// @param[in]  x Value to interpolate.\r\n\t/// @param[in]  y Value to interpolate.\r\n\t/// @param[in]  a Interpolant.\r\n\t/// \r\n\t/// @tparam\tgenTypeT Floating point scalar or vector.\r\n\t/// @tparam genTypeU Floating point or boolean scalar or vector. It can't be a vector if it is the length of genTypeT.\r\n\t/// \r\n\t/// @code\r\n\t/// #include <glm/glm.hpp>\r\n\t/// ...\r\n\t/// float a;\r\n\t/// bool b;\r\n\t/// glm::dvec3 e;\r\n\t/// glm::dvec3 f;\r\n\t/// glm::vec4 g;\r\n\t/// glm::vec4 h;\r\n\t/// ...\r\n\t/// glm::vec4 r = glm::mix(g, h, a); // Interpolate with a floating-point scalar two vectors. \r\n\t/// glm::vec4 s = glm::mix(g, h, b); // Teturns g or h;\r\n\t/// glm::dvec3 t = glm::mix(e, f, a); // Types of the third parameter is not required to match with the first and the second.\r\n\t/// glm::vec4 u = glm::mix(g, h, r); // Interpolations can be perform per component with a vector for the last parameter.\r\n\t/// @endcode\r\n\ttemplate <typename T, typename U, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL vecType<T, P> mix(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y,\r\n\t\tvecType<U, P> const & a);\r\n\r\n\ttemplate <typename T, typename U, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL vecType<T, P> mix(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y,\r\n\t\tU const & a);\r\n\r\n\ttemplate <typename genTypeT, typename genTypeU>\r\n\tGLM_FUNC_DECL genTypeT mix(\r\n\t\tgenTypeT const & x,\r\n\t\tgenTypeT const & y,\r\n\t\tgenTypeU const & a);\r\n\r\n\t/// Returns 0.0 if x < edge, otherwise it returns 1.0 for each component of a genType.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/step.xml\">GLSL step man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType step(\r\n\t\tgenType const & edge,\r\n\t\tgenType const & x);\r\n\r\n\t/// Returns 0.0 if x < edge, otherwise it returns 1.0.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/step.xml\">GLSL step man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <template <typename, precision> class vecType, typename T, precision P>\r\n\tGLM_FUNC_DECL vecType<T, P> step(\r\n\t\tT const & edge,\r\n\t\tvecType<T, P> const & x);\r\n\r\n\t/// Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and\r\n\t/// performs smooth Hermite interpolation between 0 and 1\r\n\t/// when edge0 < x < edge1. This is useful in cases where\r\n\t/// you would want a threshold function with a smooth\r\n\t/// transition. This is equivalent to:\r\n\t/// genType t;\r\n\t/// t = clamp ((x - edge0) / (edge1 - edge0), 0, 1);\r\n\t/// return t * t * (3 - 2 * t);\r\n\t/// Results are undefined if edge0 >= edge1.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/smoothstep.xml\">GLSL smoothstep man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType smoothstep(\r\n\t\tgenType const & edge0,\r\n\t\tgenType const & edge1,\r\n\t\tgenType const & x);\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType smoothstep(\r\n\t\ttypename genType::value_type const & edge0,\r\n\t\ttypename genType::value_type const & edge1,\r\n\t\tgenType const & x);\r\n\r\n\t/// Returns true if x holds a NaN (not a number)\r\n\t/// representation in the underlying implementation's set of\r\n\t/// floating point representations. Returns false otherwise,\r\n\t/// including for implementations with no NaN\r\n\t/// representations.\r\n\t/// \r\n\t/// /!\\ When using compiler fast math, this function may fail.\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/isnan.xml\">GLSL isnan man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL typename genType::bool_type isnan(genType const & x);\r\n\r\n\t/// Returns true if x holds a positive infinity or negative\r\n\t/// infinity representation in the underlying implementation's\r\n\t/// set of floating point representations. Returns false\r\n\t/// otherwise, including for implementations with no infinity\r\n\t/// representations.\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/isinf.xml\">GLSL isinf man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL typename genType::bool_type isinf(genType const & x);\r\n\r\n\t/// Returns a signed integer value representing\r\n\t/// the encoding of a floating-point value. The floating-point\r\n\t/// value's bit-level representation is preserved.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToInt.xml\">GLSL floatBitsToInt man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\tGLM_FUNC_DECL int floatBitsToInt(float const & v);\r\n\r\n\t/// Returns a signed integer value representing\r\n\t/// the encoding of a floating-point value. The floatingpoint\r\n\t/// value's bit-level representation is preserved.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToInt.xml\">GLSL floatBitsToInt man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <template <typename, precision> class vecType, precision P>\r\n\tGLM_FUNC_DECL vecType<int, P> floatBitsToInt(vecType<float, P> const & v);\r\n\r\n\t/// Returns a unsigned integer value representing\r\n\t/// the encoding of a floating-point value. The floatingpoint\r\n\t/// value's bit-level representation is preserved.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToUint.xml\">GLSL floatBitsToUint man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\tGLM_FUNC_DECL uint floatBitsToUint(float const & v);\r\n\r\n\t/// Returns a unsigned integer value representing\r\n\t/// the encoding of a floating-point value. The floatingpoint\r\n\t/// value's bit-level representation is preserved.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/floatBitsToUint.xml\">GLSL floatBitsToUint man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <template <typename, precision> class vecType, precision P>\r\n\tGLM_FUNC_DECL vecType<uint, P> floatBitsToUint(vecType<float, P> const & v);\r\n\r\n\t/// Returns a floating-point value corresponding to a signed\r\n\t/// integer encoding of a floating-point value.\r\n\t/// If an inf or NaN is passed in, it will not signal, and the\r\n\t/// resulting floating point value is unspecified. Otherwise,\r\n\t/// the bit-level representation is preserved.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/intBitsToFloat.xml\">GLSL intBitsToFloat man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\tGLM_FUNC_DECL float intBitsToFloat(int const & v);\r\n\r\n\t/// Returns a floating-point value corresponding to a signed\r\n\t/// integer encoding of a floating-point value.\r\n\t/// If an inf or NaN is passed in, it will not signal, and the\r\n\t/// resulting floating point value is unspecified. Otherwise,\r\n\t/// the bit-level representation is preserved.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/intBitsToFloat.xml\">GLSL intBitsToFloat man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <template <typename, precision> class vecType, precision P>\r\n\tGLM_FUNC_DECL vecType<float, P> intBitsToFloat(vecType<int, P> const & v);\r\n\r\n\t/// Returns a floating-point value corresponding to a\r\n\t/// unsigned integer encoding of a floating-point value.\r\n\t/// If an inf or NaN is passed in, it will not signal, and the\r\n\t/// resulting floating point value is unspecified. Otherwise,\r\n\t/// the bit-level representation is preserved.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/uintBitsToFloat.xml\">GLSL uintBitsToFloat man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\tGLM_FUNC_DECL float uintBitsToFloat(uint const & v);\r\n\r\n\t/// Returns a floating-point value corresponding to a\r\n\t/// unsigned integer encoding of a floating-point value.\r\n\t/// If an inf or NaN is passed in, it will not signal, and the\r\n\t/// resulting floating point value is unspecified. Otherwise,\r\n\t/// the bit-level representation is preserved.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/uintBitsToFloat.xml\">GLSL uintBitsToFloat man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <template <typename, precision> class vecType, precision P>\r\n\tGLM_FUNC_DECL vecType<float, P> uintBitsToFloat(vecType<uint, P> const & v);\r\n\r\n\t/// Computes and returns a * b + c.\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/fma.xml\">GLSL fma man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType fma(genType const & a, genType const & b, genType const & c);\r\n\r\n\t/// Splits x into a floating-point significand in the range\r\n\t/// [0.5, 1.0) and an integral exponent of two, such that:\r\n\t/// x = significand * exp(2, exponent)\r\n\t/// \r\n\t/// The significand is returned by the function and the\r\n\t/// exponent is returned in the parameter exp. For a\r\n\t/// floating-point value of zero, the significant and exponent\r\n\t/// are both zero. For a floating-point value that is an\r\n\t/// infinity or is not a number, the results are undefined.\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/frexp.xml\">GLSL frexp man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType, typename genIType>\r\n\tGLM_FUNC_DECL genType frexp(genType const & x, genIType & exp);\r\n\r\n\t/// Builds a floating-point number from x and the\r\n\t/// corresponding integral exponent of two in exp, returning:\r\n\t/// significand * exp(2, exponent)\r\n\t/// \r\n\t/// If this product is too large to be represented in the\r\n\t/// floating-point type, the result is undefined.\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///  \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/ldexp.xml\">GLSL ldexp man page</a>; \r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.3 Common Functions</a>\r\n\ttemplate <typename genType, typename genIType>\r\n\tGLM_FUNC_DECL genType ldexp(genType const & x, genIType const & exp);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"func_common.inl\"\r\n\r\n#endif//GLM_FUNC_COMMON_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/detail/func_common.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_common.inl\r\n/// @date 2008-08-03 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"func_vector_relational.hpp\"\r\n#include \"type_vec2.hpp\"\r\n#include \"type_vec3.hpp\"\r\n#include \"type_vec4.hpp\"\r\n#include \"_vectorize.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename genFIType, bool /*signed*/>\r\n\tstruct compute_abs\r\n\t{};\r\n\r\n\ttemplate <typename genFIType>\r\n\tstruct compute_abs<genFIType, true>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static genFIType call(genFIType const & x)\r\n\t\t{\r\n\t\t\tGLM_STATIC_ASSERT(\r\n\t\t\t\tstd::numeric_limits<genFIType>::is_iec559 || std::numeric_limits<genFIType>::is_signed,\r\n\t\t\t\t\"'abs' only accept floating-point and integer scalar or vector inputs\");\r\n\t\t\treturn x >= genFIType(0) ? x : -x;\r\n\t\t\t// TODO, perf comp with: *(((int *) &x) + 1) &= 0x7fffffff;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename genFIType>\r\n\tstruct compute_abs<genFIType, false>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static genFIType call(genFIType const & x)\r\n\t\t{\r\n\t\t\tGLM_STATIC_ASSERT(\r\n\t\t\t\t!std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer,\r\n\t\t\t\t\"'abs' only accept floating-point and integer scalar or vector inputs\");\r\n\t\t\treturn x;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, typename U, precision P, template <class, precision> class vecType>\r\n\tstruct compute_mix_vector\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, vecType<U, P> const & a)\r\n\t\t{\r\n\t\t\tGLM_STATIC_ASSERT(std::numeric_limits<U>::is_iec559, \"'mix' only accept floating-point inputs for the interpolator a\");\r\n\r\n\t\t\treturn vecType<T, P>(vecType<U, P>(x) + a * vecType<U, P>(y - x));\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P, template <class, precision> class vecType>\r\n\tstruct compute_mix_vector<T, bool, P, vecType>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, vecType<bool, P> const & a)\r\n\t\t{\r\n\t\t\tvecType<T, P> Result;\r\n\t\t\tfor(length_t i = 0; i < x.length(); ++i)\r\n\t\t\t\tResult[i] = a[i] ? y[i] : x[i];\r\n\t\t\treturn Result;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, typename U, precision P, template <class, precision> class vecType>\r\n\tstruct compute_mix_scalar\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, U const & a)\r\n\t\t{\r\n\t\t\tGLM_STATIC_ASSERT(std::numeric_limits<U>::is_iec559, \"'mix' only accept floating-point inputs for the interpolator a\");\r\n\r\n\t\t\treturn vecType<T, P>(vecType<U, P>(x) + a * vecType<U, P>(y - x));\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P, template <class, precision> class vecType>\r\n\tstruct compute_mix_scalar<T, bool, P, vecType>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static vecType<T, P> call(vecType<T, P> const & x, vecType<T, P> const & y, bool const & a)\r\n\t\t{\r\n\t\t\treturn a ? y : x;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, typename U>\r\n\tstruct compute_mix\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static T call(T const & x, T const & y, U const & a)\r\n\t\t{\r\n\t\t\tGLM_STATIC_ASSERT(std::numeric_limits<U>::is_iec559, \"'mix' only accept floating-point inputs for the interpolator a\");\r\n\r\n\t\t\treturn static_cast<T>(static_cast<U>(x) + a * static_cast<U>(y - x));\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T>\r\n\tstruct compute_mix<T, bool>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static T call(T const & x, T const & y, bool const & a)\r\n\t\t{\r\n\t\t\treturn a ? y : x;\r\n\t\t}\r\n\t};\r\n}//namespace detail\r\n\r\n\t// abs\r\n\ttemplate <typename genFIType>\r\n\tGLM_FUNC_QUALIFIER genFIType abs\r\n\t(\r\n\t\tgenFIType const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::compute_abs<genFIType, std::numeric_limits<genFIType>::is_signed>::call(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(abs)\r\n\r\n\t// sign\r\n\t//Try something like based on x >> 31 to get the sign bit\r\n\ttemplate <typename genFIType> \r\n\tGLM_FUNC_QUALIFIER genFIType sign\r\n\t(\r\n\t\tgenFIType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genFIType>::is_iec559 ||\r\n\t\t\t(std::numeric_limits<genFIType>::is_signed && std::numeric_limits<genFIType>::is_integer), \"'sign' only accept signed inputs\");\r\n\r\n\t\tgenFIType result;\r\n\t\tif(x > genFIType(0))\r\n\t\t\tresult = genFIType(1);\r\n\t\telse if(x < genFIType(0))\r\n\t\t\tresult = genFIType(-1);\r\n\t\telse\r\n\t\t\tresult = genFIType(0);\r\n\t\treturn result;\r\n\t}\r\n\t\r\n\tVECTORIZE_VEC(sign)\r\n\r\n\t// floor\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType floor(genType const & x)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'floor' only accept floating-point inputs\");\r\n\r\n\t\treturn ::std::floor(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(floor)\r\n\r\n\t// trunc\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType trunc(genType const & x)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'trunc' only accept floating-point inputs\");\r\n\r\n\t\t// TODO, add C++11 std::trunk\r\n\t\treturn x < 0 ? -floor(-x) : floor(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(trunc)\r\n\r\n\t// round\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType round(genType const& x)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'round' only accept floating-point inputs\");\r\n\r\n\t\t// TODO, add C++11 std::round\r\n\t\treturn x < 0 ? genType(int(x - genType(0.5))) : genType(int(x + genType(0.5)));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(round)\r\n\r\n/*\r\n\t// roundEven\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType roundEven(genType const& x)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'roundEven' only accept floating-point inputs\");\r\n\r\n\t\treturn genType(int(x + genType(int(x) % 2)));\r\n\t}\r\n*/\r\n\t\r\n\t// roundEven\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType roundEven(genType const & x)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'roundEven' only accept floating-point inputs\");\r\n\t\t\r\n\t\tint Integer = static_cast<int>(x);\r\n\t\tgenType IntegerPart = static_cast<genType>(Integer);\r\n\t\tgenType FractionalPart = fract(x);\r\n\r\n\t\tif(FractionalPart > static_cast<genType>(0.5) || FractionalPart < static_cast<genType>(0.5))\r\n\t\t{\r\n\t\t\treturn round(x);\r\n\t\t}\r\n\t\telse if((Integer % 2) == 0)\r\n\t\t{\r\n\t\t\treturn IntegerPart;\r\n\t\t}\r\n\t\telse if(x <= static_cast<genType>(0)) // Work around... \r\n\t\t{\r\n\t\t\treturn IntegerPart - static_cast<genType>(1);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn IntegerPart + static_cast<genType>(1);\r\n\t\t}\r\n\t\t//else // Bug on MinGW 4.5.2\r\n\t\t//{\r\n\t\t//\treturn mix(IntegerPart + genType(-1), IntegerPart + genType(1), x <= genType(0));\r\n\t\t//}\r\n\t}\r\n\t\r\n\tVECTORIZE_VEC(roundEven)\r\n\r\n\t// ceil\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType ceil(genType const & x)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'ceil' only accept floating-point inputs\");\r\n\r\n\t\treturn ::std::ceil(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(ceil)\r\n\r\n\t// fract\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType fract\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'fract' only accept floating-point inputs\");\r\n\r\n\t\treturn x - floor(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(fract)\r\n\r\n\t// mod\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType mod\r\n\t(\r\n\t\tgenType const & x, \r\n\t\tgenType const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'mod' only accept floating-point inputs\");\r\n\r\n\t\treturn x - y * floor(x / y);\r\n\t}\r\n\r\n\tVECTORIZE_VEC_SCA(mod)\r\n\tVECTORIZE_VEC_VEC(mod)\r\n\r\n\t// modf\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType modf\r\n\t(\r\n\t\tgenType const & x, \r\n\t\tgenType & i\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'modf' only accept floating-point inputs\");\r\n\r\n\t\treturn std::modf(x, &i);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> modf\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x,\r\n\t\tdetail::tvec2<T, P> & i\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tmodf(x.x, i.x),\r\n\t\t\tmodf(x.y, i.y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> modf\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<T, P> & i\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tmodf(x.x, i.x),\r\n\t\t\tmodf(x.y, i.y),\r\n\t\t\tmodf(x.z, i.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> modf\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & x,\r\n\t\tdetail::tvec4<T, P> & i\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tmodf(x.x, i.x),\r\n\t\t\tmodf(x.y, i.y),\r\n\t\t\tmodf(x.z, i.z),\r\n\t\t\tmodf(x.w, i.w));\r\n\t}\r\n\r\n\t//// Only valid if (INT_MIN <= x-y <= INT_MAX)\r\n\t//// min(x,y)\r\n\t//r = y + ((x - y) & ((x - y) >> (sizeof(int) *\r\n\t//CHAR_BIT - 1)));\r\n\t//// max(x,y)\r\n\t//r = x - ((x - y) & ((x - y) >> (sizeof(int) *\r\n\t//CHAR_BIT - 1)));\r\n\r\n\t// min\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType min\r\n\t(\r\n\t\tgenType const & x,\r\n\t\tgenType const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559 || std::numeric_limits<genType>::is_integer,\r\n\t\t\t\"'min' only accept floating-point or integer inputs\");\r\n\r\n\t\treturn x < y ? x : y;\r\n\t}\r\n\r\n\tVECTORIZE_VEC_SCA(min)\r\n\tVECTORIZE_VEC_VEC(min)\r\n\r\n\t// max\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType max\r\n\t(\r\n\t\tgenType const & x,\r\n\t\tgenType const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559 || std::numeric_limits<genType>::is_integer,\r\n\t\t\t\"'max' only accept floating-point or integer inputs\");\r\n\r\n\t\treturn x > y ? x : y;\r\n\t}\r\n\r\n\tVECTORIZE_VEC_SCA(max)\r\n\tVECTORIZE_VEC_VEC(max)\r\n\r\n\t// clamp\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType clamp\r\n\t(\r\n\t\tgenType const & x,\r\n\t\tgenType const & minVal,\r\n\t\tgenType const & maxVal\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559 || std::numeric_limits<genType>::is_integer,\r\n\t\t\t\"'clamp' only accept floating-point or integer inputs\");\r\n\t\t\r\n\t\treturn min(maxVal, max(minVal, x));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> clamp\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x,\r\n\t\tT const & minVal,\r\n\t\tT const & maxVal\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,\r\n\t\t\t\"'clamp' only accept floating-point or integer inputs\");\r\n\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tclamp(x.x, minVal, maxVal),\r\n\t\t\tclamp(x.y, minVal, maxVal));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> clamp\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tT const & minVal,\r\n\t\tT const & maxVal\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,\r\n\t\t\t\"'clamp' only accept floating-point or integer inputs\");\r\n\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tclamp(x.x, minVal, maxVal),\r\n\t\t\tclamp(x.y, minVal, maxVal),\r\n\t\t\tclamp(x.z, minVal, maxVal));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> clamp\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & x,\r\n\t\tT const & minVal,\r\n\t\tT const & maxVal\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,\r\n\t\t\t\"'clamp' only accept floating-point or integer inputs\");\r\n\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tclamp(x.x, minVal, maxVal),\r\n\t\t\tclamp(x.y, minVal, maxVal),\r\n\t\t\tclamp(x.z, minVal, maxVal),\r\n\t\t\tclamp(x.w, minVal, maxVal));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> clamp\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x,\r\n\t\tdetail::tvec2<T, P> const & minVal,\r\n\t\tdetail::tvec2<T, P> const & maxVal\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,\r\n\t\t\t\"'clamp' only accept floating-point or integer inputs\");\r\n\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tclamp(x.x, minVal.x, maxVal.x),\r\n\t\t\tclamp(x.y, minVal.y, maxVal.y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> clamp\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<T, P> const & minVal,\r\n\t\tdetail::tvec3<T, P> const & maxVal\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,\r\n\t\t\t\"'clamp' only accept floating-point or integer inputs\");\r\n\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tclamp(x.x, minVal.x, maxVal.x),\r\n\t\t\tclamp(x.y, minVal.y, maxVal.y),\r\n\t\t\tclamp(x.z, minVal.z, maxVal.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> clamp\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & x,\r\n\t\tdetail::tvec4<T, P> const & minVal,\r\n\t\tdetail::tvec4<T, P> const & maxVal\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,\r\n\t\t\t\"'clamp' only accept floating-point or integer inputs\");\r\n\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tclamp(x.x, minVal.x, maxVal.x),\r\n\t\t\tclamp(x.y, minVal.y, maxVal.y),\r\n\t\t\tclamp(x.z, minVal.z, maxVal.z),\r\n\t\t\tclamp(x.w, minVal.w, maxVal.w));\r\n\t}\r\n\r\n\ttemplate <typename T, typename U, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> mix\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y,\r\n\t\tvecType<U, P> const & a\r\n\t)\r\n\t{\r\n\t\treturn detail::compute_mix_vector<T, U, P, vecType>::call(x, y, a);\r\n\t}\r\n\r\n\ttemplate <typename T, typename U, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> mix\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y,\r\n\t\tU const & a\r\n\t)\r\n\t{\r\n\t\treturn detail::compute_mix_scalar<T, U, P, vecType>::call(x, y, a);\r\n\t}\r\n\r\n\ttemplate <typename genTypeT, typename genTypeU>\r\n\tGLM_FUNC_QUALIFIER genTypeT mix\r\n\t(\r\n\t\tgenTypeT const & x,\r\n\t\tgenTypeT const & y,\r\n\t\tgenTypeU const & a\r\n\t)\r\n\t{\r\n\t\treturn detail::compute_mix<genTypeT, genTypeU>::call(x, y, a);\r\n\t}\r\n\r\n\t// step\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType step\r\n\t(\r\n\t\tgenType const & edge,\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\treturn mix(genType(1), genType(0), glm::lessThan(x, edge));\r\n\t}\r\n\r\n\ttemplate <template <typename, precision> class vecType, typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> step\r\n\t(\r\n\t\tT const & edge,\r\n\t\tvecType<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'step' only accept floating-point inputs\");\r\n\r\n\t\treturn mix(vecType<T, P>(1), vecType<T, P>(0), glm::lessThan(x, vecType<T, P>(edge)));\r\n\t}\r\n\r\n\t// smoothstep\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType smoothstep\r\n\t(\r\n\t\tgenType const & edge0,\r\n\t\tgenType const & edge1,\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'smoothstep' only accept floating-point inputs\");\r\n\r\n\t\tgenType tmp = clamp((x - edge0) / (edge1 - edge0), genType(0), genType(1));\r\n\t\treturn tmp * tmp * (genType(3) - genType(2) * tmp);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> smoothstep\r\n\t(\r\n\t\tT const & edge0,\r\n\t\tT const & edge1,\r\n\t\tdetail::tvec2<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'smoothstep' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tsmoothstep(edge0, edge1, x.x),\r\n\t\t\tsmoothstep(edge0, edge1, x.y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> smoothstep\r\n\t(\r\n\t\tT const & edge0,\r\n\t\tT const & edge1,\r\n\t\tdetail::tvec3<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'smoothstep' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tsmoothstep(edge0, edge1, x.x),\r\n\t\t\tsmoothstep(edge0, edge1, x.y),\r\n\t\t\tsmoothstep(edge0, edge1, x.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> smoothstep\r\n\t(\r\n\t\tT const & edge0,\r\n\t\tT const & edge1,\r\n\t\tdetail::tvec4<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'smoothstep' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tsmoothstep(edge0, edge1, x.x),\r\n\t\t\tsmoothstep(edge0, edge1, x.y),\r\n\t\t\tsmoothstep(edge0, edge1, x.z),\r\n\t\t\tsmoothstep(edge0, edge1, x.w));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> smoothstep\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & edge0,\r\n\t\tdetail::tvec2<T, P> const & edge1,\r\n\t\tdetail::tvec2<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'smoothstep' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tsmoothstep(edge0.x, edge1.x, x.x),\r\n\t\t\tsmoothstep(edge0.y, edge1.y, x.y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> smoothstep\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & edge0,\r\n\t\tdetail::tvec3<T, P> const & edge1,\r\n\t\tdetail::tvec3<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'smoothstep' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tsmoothstep(edge0.x, edge1.x, x.x),\r\n\t\t\tsmoothstep(edge0.y, edge1.y, x.y),\r\n\t\t\tsmoothstep(edge0.z, edge1.z, x.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> smoothstep\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & edge0,\r\n\t\tdetail::tvec4<T, P> const & edge1,\r\n\t\tdetail::tvec4<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'smoothstep' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tsmoothstep(edge0.x, edge1.x, x.x),\r\n\t\t\tsmoothstep(edge0.y, edge1.y, x.y),\r\n\t\t\tsmoothstep(edge0.z, edge1.z, x.z),\r\n\t\t\tsmoothstep(edge0.w, edge1.w, x.w));\r\n\t}\r\n\r\n\t// TODO: Not working on MinGW...\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER bool isnan(genType const & x)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'isnan' only accept floating-point inputs\");\r\n\r\n#\t\tif(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_INTEL))\r\n\t\t\treturn _isnan(x) != 0;\r\n#\t\telif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG))\r\n#\t\t\tif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)\r\n\t\t\t\treturn _isnan(x) != 0;\r\n#\t\t\telse\r\n\t\t\t\treturn std::isnan(x);\r\n#\t\t\tendif\r\n#\t\telif(GLM_COMPILER & GLM_COMPILER_CUDA)\r\n\t\t\treturn isnan(x) != 0;\r\n#\t\telse\r\n\t\t\treturn std::isnan(x);\r\n#\t\tendif\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename detail::tvec2<T, P>::bool_type isnan\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'isnan' only accept floating-point inputs\");\r\n\r\n\t\treturn typename detail::tvec2<T, P>::bool_type(\r\n\t\t\tisnan(x.x),\r\n\t\t\tisnan(x.y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename detail::tvec3<T, P>::bool_type isnan\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'isnan' only accept floating-point inputs\");\r\n\r\n\t\treturn typename detail::tvec3<T, P>::bool_type(\r\n\t\t\tisnan(x.x),\r\n\t\t\tisnan(x.y),\r\n\t\t\tisnan(x.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename detail::tvec4<T, P>::bool_type isnan\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'isnan' only accept floating-point inputs\");\r\n\r\n\t\treturn typename detail::tvec4<T, P>::bool_type(\r\n\t\t\tisnan(x.x),\r\n\t\t\tisnan(x.y),\r\n\t\t\tisnan(x.z),\r\n\t\t\tisnan(x.w));\r\n\t}\r\n\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER bool isinf(\r\n\t\tgenType const & x)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'isinf' only accept floating-point inputs\");\r\n\r\n#\t\tif(GLM_COMPILER & (GLM_COMPILER_INTEL | GLM_COMPILER_VC))\r\n\t\t\treturn _fpclass(x) == _FPCLASS_NINF || _fpclass(x) == _FPCLASS_PINF;\r\n#\t\telif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG))\r\n#\t\t\tif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)\r\n\t\t\t\treturn _isinf(x) != 0;\r\n#\t\t\telse\r\n\t\t\t\treturn std::isinf(x);\r\n#\t\t\tendif\r\n#\t\telif(GLM_COMPILER & GLM_COMPILER_CUDA)\r\n\t\t\t// http://developer.download.nvidia.com/compute/cuda/4_2/rel/toolkit/docs/online/group__CUDA__MATH__DOUBLE_g13431dd2b40b51f9139cbb7f50c18fab.html#g13431dd2b40b51f9139cbb7f50c18fab\r\n\t\t\treturn isinf(double(x)) != 0;\r\n#\t\telse\r\n\t\t\treturn std::isinf(x);\r\n#\t\tendif\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename detail::tvec2<T, P>::bool_type isinf\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'isinf' only accept floating-point inputs\");\r\n\r\n\t\treturn typename detail::tvec2<T, P>::bool_type(\r\n\t\t\tisinf(x.x),\r\n\t\t\tisinf(x.y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename detail::tvec3<T, P>::bool_type isinf\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'isinf' only accept floating-point inputs\");\r\n\r\n\t\treturn typename detail::tvec3<T, P>::bool_type(\r\n\t\t\tisinf(x.x),\r\n\t\t\tisinf(x.y),\r\n\t\t\tisinf(x.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename detail::tvec4<T, P>::bool_type isinf\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'isinf' only accept floating-point inputs\");\r\n\r\n\t\treturn typename detail::tvec4<T, P>::bool_type(\r\n\t\t\tisinf(x.x),\r\n\t\t\tisinf(x.y),\r\n\t\t\tisinf(x.z),\r\n\t\t\tisinf(x.w));\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER int floatBitsToInt(float const & v)\r\n\t{\r\n\t\treturn reinterpret_cast<int&>(const_cast<float&>(v));\r\n\t}\r\n\r\n\ttemplate <template <typename, precision> class vecType, precision P>\r\n\tGLM_FUNC_QUALIFIER vecType<int, P> floatBitsToInt(vecType<float, P> const & v)\r\n\t{\r\n\t\treturn reinterpret_cast<vecType<int, P>&>(const_cast<vecType<float, P>&>(v));\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint floatBitsToUint(float const & v)\r\n\t{\r\n\t\treturn reinterpret_cast<uint&>(const_cast<float&>(v));\r\n\t}\r\n\r\n\ttemplate <template <typename, precision> class vecType, precision P>\r\n\tGLM_FUNC_QUALIFIER vecType<uint, P> floatBitsToUint(vecType<float, P> const & v)\r\n\t{\r\n\t\treturn reinterpret_cast<vecType<uint, P>&>(const_cast<vecType<float, P>&>(v));\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER float intBitsToFloat(int const & v)\r\n\t{\r\n\t\treturn reinterpret_cast<float&>(const_cast<int&>(v));\r\n\t}\r\n\r\n\ttemplate <template <typename, precision> class vecType, precision P>\r\n\tGLM_FUNC_QUALIFIER vecType<float, P> intBitsToFloat(vecType<int, P> const & v)\r\n\t{\r\n\t\treturn reinterpret_cast<vecType<float, P>&>(const_cast<vecType<int, P>&>(v));\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER float uintBitsToFloat(uint const & v)\r\n\t{\r\n\t\treturn reinterpret_cast<float&>(const_cast<uint&>(v));\r\n\t}\r\n\r\n\ttemplate <template <typename, precision> class vecType, precision P>\r\n\tGLM_FUNC_QUALIFIER vecType<float, P> uintBitsToFloat(vecType<uint, P> const & v)\r\n\t{\r\n\t\treturn reinterpret_cast<vecType<float, P>&>(const_cast<vecType<uint, P>&>(v));\r\n\t}\r\n\t\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType fma\r\n\t(\r\n\t\tgenType const & a,\r\n\t\tgenType const & b,\r\n\t\tgenType const & c\r\n\t)\r\n\t{\r\n\t\treturn a * b + c;\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType frexp\r\n\t(\r\n\t\tgenType const & x,\r\n\t\tint & exp\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'frexp' only accept floating-point inputs\");\r\n\r\n\t\treturn std::frexp(x, exp);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> frexp\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x,\r\n\t\tdetail::tvec2<int, P> & exp\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'frexp' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tfrexp(x.x, exp.x),\r\n\t\t\tfrexp(x.y, exp.y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> frexp\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<int, P> & exp\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'frexp' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tfrexp(x.x, exp.x),\r\n\t\t\tfrexp(x.y, exp.y),\r\n\t\t\tfrexp(x.z, exp.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> frexp\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & x,\r\n\t\tdetail::tvec4<int, P> & exp\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'frexp' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tfrexp(x.x, exp.x),\r\n\t\t\tfrexp(x.y, exp.y),\r\n\t\t\tfrexp(x.z, exp.z),\r\n\t\t\tfrexp(x.w, exp.w));\r\n\t}\r\n\r\n\ttemplate <typename genType, precision P>\r\n\tGLM_FUNC_QUALIFIER genType ldexp\r\n\t(\r\n\t\tgenType const & x,\r\n\t\tint const & exp\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'frexp' only accept floating-point inputs\");\r\n\r\n\t\treturn std::ldexp(x, exp);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> ldexp\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x,\r\n\t\tdetail::tvec2<int, P> const & exp\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'ldexp' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tldexp(x.x, exp.x),\r\n\t\t\tldexp(x.y, exp.y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> ldexp\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<int, P> const & exp\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'ldexp' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tldexp(x.x, exp.x),\r\n\t\t\tldexp(x.y, exp.y),\r\n\t\t\tldexp(x.z, exp.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> ldexp\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & x,\r\n\t\tdetail::tvec4<int, P> const & exp\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<T>::is_iec559,\r\n\t\t\t\"'ldexp' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tldexp(x.x, exp.x),\r\n\t\t\tldexp(x.y, exp.y),\r\n\t\t\tldexp(x.z, exp.z),\r\n\t\t\tldexp(x.w, exp.w));\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/detail/func_exponential.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_exponential.hpp\r\n/// @date 2008-08-08 / 2011-06-14\r\n/// @author Christophe Riccio\r\n/// \r\n/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>\r\n///\r\n/// @defgroup core_func_exponential Exponential functions\r\n/// @ingroup core\r\n/// \r\n/// These all operate component-wise. The description is per component.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_func_exponential\r\n#define glm_core_func_exponential\r\n\r\n#include \"type_vec1.hpp\"\r\n#include \"type_vec2.hpp\"\r\n#include \"type_vec3.hpp\"\r\n#include \"type_vec4.hpp\"\r\n#include <cmath>\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup core_func_exponential\r\n\t/// @{\r\n\r\n\t/// Returns 'base' raised to the power 'exponent'. \r\n\t///\r\n\t/// @param base Floating point value. pow function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision.\r\n\t/// @param exponent Floating point value representing the 'exponent'.\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/pow.xml\">GLSL pow man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType pow(genType const & base, genType const & exponent);\r\n\r\n\t/// Returns the natural exponentiation of x, i.e., e^x.\r\n\t///\r\n\t/// @param x exp function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision.\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/exp.xml\">GLSL exp man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType exp(genType const & x);\r\n\r\n\t/// Returns the natural logarithm of x, i.e., \r\n\t/// returns the value y which satisfies the equation x = e^y. \r\n\t/// Results are undefined if x <= 0.\r\n\t///\r\n\t/// @param x log function is defined for input values of x defined in the range (0, inf+) in the limit of the type precision.\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/log.xml\">GLSL log man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType log(genType const & x);\r\n\r\n\t/// Returns 2 raised to the x power.\r\n\t/// \r\n\t/// @param x exp2 function is defined for input values of x defined in the range (inf-, inf+) in the limit of the type precision.\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/exp2.xml\">GLSL exp2 man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType exp2(genType const & x);\r\n\r\n\t/// Returns the base 2 log of x, i.e., returns the value y, \r\n\t/// which satisfies the equation x = 2 ^ y.\r\n\t/// \r\n\t/// @param x log2 function is defined for input values of x defined in the range (0, inf+) in the limit of the type precision.\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/log2.xml\">GLSL log2 man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType log2(genType x);\r\n\r\n\t/// Returns the positive square root of x.\r\n\t/// \r\n\t/// @param x sqrt function is defined for input values of x defined in the range [0, inf+) in the limit of the type precision.\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/sqrt.xml\">GLSL sqrt man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>\r\n\t//template <typename genType>\r\n\t//GLM_FUNC_DECL genType sqrt(genType const & x);\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL vecType<T, P> sqrt(vecType<T, P> const & x);\r\n\t\r\n\t/// Returns the reciprocal of the positive square root of x.\r\n\t/// \r\n\t/// @param x inversesqrt function is defined for input values of x defined in the range [0, inf+) in the limit of the type precision.\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/inversesqrt.xml\">GLSL inversesqrt man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.2 Exponential Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType inversesqrt(genType const & x);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"func_exponential.inl\"\r\n\r\n#endif//glm_core_func_exponential\r\n"
  },
  {
    "path": "gpu/glm/detail/func_exponential.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_exponential.inl\r\n/// @date 2008-08-03 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"func_vector_relational.hpp\"\r\n#include \"_vectorize.hpp\"\r\n#include <limits>\r\n#include <cassert>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <bool isFloat>\r\n\tstruct compute_log2\r\n\t{\r\n\t\ttemplate <typename T>\r\n\t\tT operator() (T const & Value) const;\r\n\t};\r\n\r\n\ttemplate <>\r\n\tstruct compute_log2<true>\r\n\t{\r\n\t\ttemplate <typename T>\r\n\t\tT operator() (T const & Value) const\r\n\t\t{\r\n\t\t\treturn static_cast<T>(::std::log(Value)) * static_cast<T>(1.4426950408889634073599246810019);\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <template <class, precision> class vecType, typename T, precision P>\r\n\tstruct compute_inversesqrt\r\n\t{\r\n\t\tstatic vecType<T, P> call(vecType<T, P> const & x)\r\n\t\t{\r\n\t\t\treturn static_cast<T>(1) / sqrt(x);\r\n\t\t}\r\n\t};\r\n\t\t\r\n\ttemplate <template <class, precision> class vecType>\r\n\tstruct compute_inversesqrt<vecType, float, lowp>\r\n\t{\r\n\t\tstatic vecType<float, lowp> call(vecType<float, lowp> const & x)\r\n\t\t{\r\n\t\t\tvecType<float, lowp> tmp(x);\r\n\t\t\tvecType<float, lowp> xhalf(tmp * 0.5f);\r\n\t\t\tvecType<uint, lowp>* p = reinterpret_cast<vecType<uint, lowp>*>(const_cast<vecType<float, lowp>*>(&x));\r\n\t\t\tvecType<uint, lowp> i = vecType<uint, lowp>(0x5f375a86) - (*p >> vecType<uint, lowp>(1));\r\n\t\t\tvecType<float, lowp>* ptmp = reinterpret_cast<vecType<float, lowp>*>(&i);\r\n\t\t\ttmp = *ptmp;\r\n\t\t\ttmp = tmp * (1.5f - xhalf * tmp * tmp);\r\n\t\t\treturn tmp;\r\n\t\t}\r\n\t};\r\n}//namespace detail\r\n\r\n\t// pow\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType pow\r\n\t(\r\n\t\tgenType const & x, \r\n\t\tgenType const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'pow' only accept floating-point inputs\");\r\n\r\n\t\treturn std::pow(x, y);\r\n\t}\r\n\r\n\tVECTORIZE_VEC_VEC(pow)\r\n\r\n\t// exp\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType exp\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'exp' only accept floating-point inputs\");\r\n\r\n\t\treturn std::exp(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(exp)\r\n\r\n\t// log\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType log\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'log' only accept floating-point inputs\");\r\n\r\n\t\treturn std::log(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(log)\r\n\r\n\t//exp2, ln2 = 0.69314718055994530941723212145818f\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType exp2(genType const & x)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(\r\n\t\t\tstd::numeric_limits<genType>::is_iec559,\r\n\t\t\t\"'exp2' only accept floating-point inputs\");\r\n\r\n\t\treturn std::exp(static_cast<genType>(0.69314718055994530941723212145818) * x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(exp2)\r\n\r\n\t// log2, ln2 = 0.69314718055994530941723212145818f\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType log2(genType x)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559 || std::numeric_limits<genType>::is_integer,\r\n\t\t\t\"GLM core 'log2' only accept floating-point inputs. Include <glm/gtx/integer.hpp> for additional integer support.\");\r\n\r\n\t\tassert(x > genType(0)); // log2 is only defined on the range (0, inf]\r\n\t\treturn detail::compute_log2<std::numeric_limits<genType>::is_iec559>()(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(log2)\r\n\r\n\tnamespace detail\r\n\t{\r\n\t\ttemplate <template <class, precision> class vecType, typename T, precision P>\r\n\t\tstruct compute_sqrt{};\r\n\t\t\r\n\t\ttemplate <typename T, precision P>\r\n\t\tstruct compute_sqrt<detail::tvec1, T, P>\r\n\t\t{\r\n\t\t\tstatic detail::tvec1<T, P> call(detail::tvec1<T, P> const & x)\r\n\t\t\t{\r\n\t\t\t\treturn detail::tvec1<T, P>(std::sqrt(x.x));\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\ttemplate <typename T, precision P>\r\n\t\tstruct compute_sqrt<detail::tvec2, T, P>\r\n\t\t{\r\n\t\t\tstatic detail::tvec2<T, P> call(detail::tvec2<T, P> const & x)\r\n\t\t\t{\r\n\t\t\t\treturn detail::tvec2<T, P>(std::sqrt(x.x), std::sqrt(x.y));\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\ttemplate <typename T, precision P>\r\n\t\tstruct compute_sqrt<detail::tvec3, T, P>\r\n\t\t{\r\n\t\t\tstatic detail::tvec3<T, P> call(detail::tvec3<T, P> const & x)\r\n\t\t\t{\r\n\t\t\t\treturn detail::tvec3<T, P>(std::sqrt(x.x), std::sqrt(x.y), std::sqrt(x.z));\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\ttemplate <typename T, precision P>\r\n\t\tstruct compute_sqrt<detail::tvec4, T, P>\r\n\t\t{\r\n\t\t\tstatic detail::tvec4<T, P> call(detail::tvec4<T, P> const & x)\r\n\t\t\t{\r\n\t\t\t\treturn detail::tvec4<T, P>(std::sqrt(x.x), std::sqrt(x.y), std::sqrt(x.z), std::sqrt(x.w));\r\n\t\t\t}\r\n\t\t};\r\n\t}//namespace detail\r\n\t\r\n\t// sqrt\r\n\tGLM_FUNC_QUALIFIER float sqrt(float x)\r\n\t{\r\n\t\treturn detail::compute_sqrt<detail::tvec1, float, highp>::call(x).x;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER double sqrt(double x)\r\n\t{\r\n\t\treturn detail::compute_sqrt<detail::tvec1, double, highp>::call(x).x;\r\n\t}\r\n\t\t\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> sqrt(vecType<T, P> const & x)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'sqrt' only accept floating-point inputs\");\r\n\t\treturn detail::compute_sqrt<vecType, T, P>::call(x);\r\n\t}\r\n\r\n\t// inversesqrt\r\n\tGLM_FUNC_QUALIFIER float inversesqrt(float const & x)\r\n\t{\r\n\t\treturn 1.0f / sqrt(x);\r\n\t}\r\n\t\r\n\tGLM_FUNC_QUALIFIER double inversesqrt(double const & x)\r\n\t{\r\n\t\treturn 1.0 / sqrt(x);\r\n\t}\r\n\t\r\n\ttemplate <template <class, precision> class vecType, typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> inversesqrt\r\n\t(\r\n\t\tvecType<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'inversesqrt' only accept floating-point inputs\");\r\n\t\treturn detail::compute_inversesqrt<vecType, T, P>::call(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(inversesqrt)\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/detail/func_geometric.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_geometric.hpp\r\n/// @date 2008-08-03 / 2011-06-14\r\n/// @author Christophe Riccio\r\n///\r\n/// @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>\r\n/// \r\n/// @defgroup core_func_geometric Geometric functions\r\n/// @ingroup core\r\n/// \r\n/// These operate on vectors as vectors, not component-wise.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_func_geometric\r\n#define glm_core_func_geometric\r\n\r\n#include \"type_vec3.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup core_func_geometric\r\n\t/// @{\r\n\r\n\t/// Returns the length of x, i.e., sqrt(x * x).\r\n\t/// \r\n\t/// @tparam genType Floating-point vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/length.xml\">GLSL length man page</a>\r\n\t/// @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>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL typename genType::value_type length(\r\n\t\tgenType const & x); \r\n\r\n\t/// Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).\r\n\t///\r\n\t/// @tparam genType Floating-point vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/distance.xml\">GLSL distance man page</a>\r\n\t/// @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>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL typename genType::value_type distance(\r\n\t\tgenType const & p0, \r\n\t\tgenType const & p1);\r\n\r\n\t/// Returns the dot product of x and y, i.e., result = x * y.\r\n\t///\r\n\t/// @tparam genType Floating-point vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/dot.xml\">GLSL dot man page</a>\r\n\t/// @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>\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL T dot(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y);\r\n\r\n\t/// Returns the dot product of x and y, i.e., result = x * y.\r\n\t///\r\n\t/// @tparam genType Floating-point vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/dot.xml\">GLSL dot man page</a>\r\n\t/// @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>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType dot(\r\n\t\tgenType const & x,\r\n\t\tgenType const & y);\r\n\r\n\t/// Returns the cross product of x and y.\r\n\t///\r\n\t/// @tparam valType Floating-point scalar types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/cross.xml\">GLSL cross man page</a>\r\n\t/// @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>\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec3<T, P> cross(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<T, P> const & y);\r\n\r\n\t/// Returns a vector in the same direction as x but with length of 1.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/normalize.xml\">GLSL normalize man page</a>\r\n\t/// @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>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType normalize(\r\n\t\tgenType const & x);\r\n\r\n\t/// If dot(Nref, I) < 0.0, return N, otherwise, return -N.\r\n\t///\r\n\t/// @tparam genType Floating-point vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/faceforward.xml\">GLSL faceforward man page</a>\r\n\t/// @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>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType faceforward(\r\n\t\tgenType const & N,\r\n\t\tgenType const & I,\r\n\t\tgenType const & Nref);\r\n\r\n\t/// For the incident vector I and surface orientation N, \r\n\t/// returns the reflection direction : result = I - 2.0 * dot(N, I) * N.\r\n\t///\r\n\t/// @tparam genType Floating-point vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/reflect.xml\">GLSL reflect man page</a>\r\n\t/// @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>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType reflect(\r\n\t\tgenType const & I,\r\n\t\tgenType const & N);\r\n\r\n\t/// For the incident vector I and surface normal N, \r\n\t/// and the ratio of indices of refraction eta, \r\n\t/// return the refraction vector.\r\n\t///\r\n\t/// @tparam genType Floating-point vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/refract.xml\">GLSL refract man page</a>\r\n\t/// @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>\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL vecType<T, P> refract(\r\n\t\tvecType<T, P> const & I,\r\n\t\tvecType<T, P> const & N,\r\n\t\tT const & eta);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"func_geometric.inl\"\r\n\r\n#endif//glm_core_func_geometric\r\n"
  },
  {
    "path": "gpu/glm/detail/func_geometric.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_geometric.inl\r\n/// @date 2008-08-03 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"func_exponential.hpp\"\r\n#include \"func_common.hpp\"\r\n#include \"type_vec2.hpp\"\r\n#include \"type_vec4.hpp\"\r\n#include \"type_float.hpp\"\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <template <class, precision> class vecType, typename T, precision P>\r\n\tstruct compute_dot{};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_dot<detail::tvec1, T, P>\r\n\t{\r\n\t\tstatic T call(detail::tvec1<T, P> const & x, detail::tvec1<T, P> const & y)\r\n\t\t{\r\n\t\t\treturn detail::tvec1<T, P>(x * y).x;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_dot<detail::tvec2, T, P>\r\n\t{\r\n\t\tstatic T call(detail::tvec2<T, P> const & x, detail::tvec2<T, P> const & y)\r\n\t\t{\r\n\t\t\tdetail::tvec2<T, P> tmp(x * y);\r\n\t\t\treturn tmp.x + tmp.y;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_dot<detail::tvec3, T, P>\r\n\t{\r\n\t\tstatic T call(detail::tvec3<T, P> const & x, detail::tvec3<T, P> const & y)\r\n\t\t{\r\n\t\t\tdetail::tvec3<T, P> tmp(x * y);\r\n\t\t\treturn tmp.x + tmp.y + tmp.z;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_dot<detail::tvec4, T, P>\r\n\t{\r\n\t\tstatic T call(detail::tvec4<T, P> const & x, detail::tvec4<T, P> const & y)\r\n\t\t{\r\n\t\t\tdetail::tvec4<T, P> tmp(x * y);\r\n\t\t\treturn (tmp.x + tmp.y) + (tmp.z + tmp.w);\r\n\t\t}\r\n\t};\r\n}//namespace detail\r\n\r\n\t// length\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType length\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'length' only accept floating-point inputs\");\r\n\r\n\t\tgenType sqr = x * x;\r\n\t\treturn sqrt(sqr);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T length(detail::tvec2<T, P> const & v)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'length' only accept floating-point inputs\");\r\n\r\n\t\tT sqr = v.x * v.x + v.y * v.y;\r\n\t\treturn sqrt(sqr);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T length(detail::tvec3<T, P> const & v)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'length' only accept floating-point inputs\");\r\n\r\n\t\tT sqr = v.x * v.x + v.y * v.y + v.z * v.z;\r\n\t\treturn sqrt(sqr);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T length(detail::tvec4<T, P> const & v)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'length' only accept floating-point inputs\");\r\n\r\n\t\tT sqr = v.x * v.x + v.y * v.y + v.z * v.z + v.w * v.w;\r\n\t\treturn sqrt(sqr);\r\n\t}\r\n\r\n\t// distance\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType distance\r\n\t(\r\n\t\tgenType const & p0,\r\n\t\tgenType const & p1\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'distance' only accept floating-point inputs\");\r\n\r\n\t\treturn length(p1 - p0);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T distance\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & p0,\r\n\t\tdetail::tvec2<T, P> const & p1\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'distance' only accept floating-point inputs\");\r\n\r\n\t\treturn length(p1 - p0);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T distance\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & p0,\r\n\t\tdetail::tvec3<T, P> const & p1\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'distance' only accept floating-point inputs\");\r\n\r\n\t\treturn length(p1 - p0);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T distance\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & p0,\r\n\t\tdetail::tvec4<T, P> const & p1\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'distance' only accept floating-point inputs\");\r\n\r\n\t\treturn length(p1 - p0);\r\n\t}\r\n\r\n\t// dot\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T dot\r\n\t(\r\n\t\tT const & x,\r\n\t\tT const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'dot' only accept floating-point inputs\");\r\n\t\treturn detail::compute_dot<detail::tvec1, T, highp>::call(x, y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER T dot\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'dot' only accept floating-point inputs\");\r\n\t\treturn detail::compute_dot<vecType, T, P>::call(x, y);\r\n\t}\r\n\r\n/* // SSE3\r\n\tGLM_FUNC_QUALIFIER float dot(const tvec4<float>& x, const tvec4<float>& y)\r\n\t{\r\n\t\tfloat Result;\r\n\t\t__asm\r\n\t\t{\r\n\t\t\tmov\t\tesi, x\r\n\t\t\tmov\t\tedi, y\r\n\t\t\tmovaps\txmm0, [esi]\r\n\t\t\tmulps\txmm0, [edi]\r\n\t\t\thaddps(\t_xmm0, _xmm0 )\r\n\t\t\thaddps(\t_xmm0, _xmm0 )\r\n\t\t\tmovss\tResult, xmm0\r\n\t\t}\r\n\t\treturn Result;\r\n\t}\r\n*/\r\n\t// cross\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> cross\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'cross' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tx.y * y.z - y.y * x.z,\r\n\t\t\tx.z * y.x - y.z * x.x,\r\n\t\t\tx.x * y.y - y.x * x.y);\r\n\t}\r\n\r\n\t// normalize\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType normalize\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'normalize' only accept floating-point inputs\");\r\n\r\n\t\treturn x < genType(0) ? genType(-1) : genType(1);\r\n\t}\r\n\r\n\t// According to issue 10 GLSL 1.10 specification, if length(x) == 0 then result is undefine and generate an error\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> normalize\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'normalize' only accept floating-point inputs\");\r\n\t\t\r\n\t\tT sqr = x.x * x.x + x.y * x.y;\r\n\t\treturn x * inversesqrt(sqr);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> normalize\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'normalize' only accept floating-point inputs\");\r\n\r\n\t\tT sqr = x.x * x.x + x.y * x.y + x.z * x.z;\r\n\t\treturn x * inversesqrt(sqr);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> normalize\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'normalize' only accept floating-point inputs\");\r\n\t\t\r\n\t\tT sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w;\r\n\t\treturn x * inversesqrt(sqr);\r\n\t}\r\n\r\n\t// faceforward\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType faceforward\r\n\t(\r\n\t\tgenType const & N,\r\n\t\tgenType const & I,\r\n\t\tgenType const & Nref\r\n\t)\r\n\t{\r\n\t\treturn dot(Nref, I) < 0 ? N : -N;\r\n\t}\r\n\r\n\t// reflect\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType reflect\r\n\t(\r\n\t\tgenType const & I,\r\n\t\tgenType const & N\r\n\t)\r\n\t{\r\n\t\treturn I - N * dot(N, I) * genType(2);\r\n\t}\r\n\r\n\t// refract\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType refract\r\n\t(\r\n\t\tgenType const & I,\r\n\t\tgenType const & N,\r\n\t\tgenType const & eta\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'refract' only accept floating-point inputs\");\r\n\r\n\t\tgenType dotValue = dot(N, I);\r\n\t\tgenType k = genType(1) - eta * eta * (genType(1) - dotValue * dotValue);\r\n\t\tif(k < genType(0))\r\n\t\t\treturn genType(0);\r\n\t\telse\r\n\t\t\treturn eta * I - (eta * dotValue + sqrt(k)) * N;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> refract\r\n\t(\r\n\t\tvecType<T, P> const & I,\r\n\t\tvecType<T, P> const & N,\r\n\t\tT const & eta\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'refract' only accept floating-point inputs\");\r\n\r\n\t\tT dotValue = dot(N, I);\r\n\t\tT k = T(1) - eta * eta * (T(1) - dotValue * dotValue);\r\n\t\tif(k < T(0))\r\n\t\t\treturn vecType<T, P>(0);\r\n\t\telse\r\n\t\t\treturn eta * I - (eta * dotValue + std::sqrt(k)) * N;\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/detail/func_integer.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_integer.hpp\r\n/// @date 2010-03-17 / 2011-06-18\r\n/// @author Christophe Riccio\r\n///\r\n/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>\r\n/// \r\n/// @defgroup core_func_integer Integer functions\r\n/// @ingroup core\r\n/// \r\n/// These all operate component-wise. The description is per component. \r\n/// The notation [a, b] means the set of bits from bit-number a through bit-number \r\n/// b, inclusive. The lowest-order bit is bit 0.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_func_integer\r\n#define glm_core_func_integer\r\n\r\n#include \"setup.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup core_func_integer\r\n\t/// @{\r\n\r\n\t/// Adds 32-bit unsigned integer x and y, returning the sum\r\n\t/// modulo pow(2, 32). The value carry is set to 0 if the sum was\r\n\t/// less than pow(2, 32), or to 1 otherwise.\r\n\t///\r\n\t/// @tparam genUType Unsigned integer scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/uaddCarry.xml\">GLSL uaddCarry man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>\r\n\ttemplate <typename genUType>\r\n\tGLM_FUNC_DECL genUType uaddCarry(\r\n\t\tgenUType const & x,\r\n\t\tgenUType const & y,\r\n\t\tgenUType & carry);\r\n\r\n\t/// Subtracts the 32-bit unsigned integer y from x, returning\r\n\t/// the difference if non-negative, or pow(2, 32) plus the difference\r\n\t/// otherwise. The value borrow is set to 0 if x >= y, or to 1 otherwise.\r\n\t///\r\n\t/// @tparam genUType Unsigned integer scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/usubBorrow.xml\">GLSL usubBorrow man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>\r\n\ttemplate <typename genUType>\r\n\tGLM_FUNC_DECL genUType usubBorrow(\r\n\t\tgenUType const & x,\r\n\t\tgenUType const & y,\r\n\t\tgenUType & borrow);\r\n\t\t\r\n\t/// Multiplies 32-bit integers x and y, producing a 64-bit\r\n\t/// result. The 32 least-significant bits are returned in lsb.\r\n\t/// The 32 most-significant bits are returned in msb.\r\n\t///\r\n\t/// @tparam genUType Unsigned integer scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/umulExtended.xml\">GLSL umulExtended man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>\r\n\ttemplate <typename genUType>\r\n\tGLM_FUNC_DECL void umulExtended(\r\n\t\tgenUType const & x,\r\n\t\tgenUType const & y,\r\n\t\tgenUType & msb,\r\n\t\tgenUType & lsb);\r\n\t\t\r\n\t/// Multiplies 32-bit integers x and y, producing a 64-bit\r\n\t/// result. The 32 least-significant bits are returned in lsb.\r\n\t/// The 32 most-significant bits are returned in msb.\r\n\t/// \r\n\t/// @tparam genIType Signed integer scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/imulExtended.xml\">GLSL imulExtended man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>\r\n\ttemplate <typename genIType>\r\n\tGLM_FUNC_DECL void imulExtended(\r\n\t\tgenIType const & x,\r\n\t\tgenIType const & y,\r\n\t\tgenIType & msb,\r\n\t\tgenIType & lsb);\r\n\r\n\t/// Extracts bits [offset, offset + bits - 1] from value,\r\n\t/// returning them in the least significant bits of the result.\r\n\t/// For unsigned data types, the most significant bits of the\r\n\t/// result will be set to zero. For signed data types, the\r\n\t/// most significant bits will be set to the value of bit offset + base - 1.\r\n\t///\r\n\t/// If bits is zero, the result will be zero. The result will be\r\n\t/// undefined if offset or bits is negative, or if the sum of\r\n\t/// offset and bits is greater than the number of bits used\r\n\t/// to store the operand.\r\n\t///\r\n\t/// @tparam genIUType Signed or unsigned integer scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldExtract.xml\">GLSL bitfieldExtract man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_DECL genIUType bitfieldExtract(\r\n\t\tgenIUType const & Value,\r\n\t\tint const & Offset,\r\n\t\tint const & Bits);\r\n\r\n\t/// Returns the insertion the bits least-significant bits of insert into base.\r\n\t///\r\n\t/// The result will have bits [offset, offset + bits - 1] taken\r\n\t/// from bits [0, bits - 1] of insert, and all other bits taken\r\n\t/// directly from the corresponding bits of base. If bits is\r\n\t/// zero, the result will simply be base. The result will be\r\n\t/// undefined if offset or bits is negative, or if the sum of\r\n\t/// offset and bits is greater than the number of bits used to\r\n\t/// store the operand.\r\n\t///\r\n\t/// @tparam genIUType Signed or unsigned integer scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldInsert.xml\">GLSL bitfieldInsert man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_DECL genIUType bitfieldInsert(\r\n\t\tgenIUType const & Base,\r\n\t\tgenIUType const & Insert,\r\n\t\tint const & Offset,\r\n\t\tint const & Bits);\r\n\r\n\t/// Returns the reversal of the bits of value. \r\n\t/// The bit numbered n of the result will be taken from bit (bits - 1) - n of value, \r\n\t/// where bits is the total number of bits used to represent value.\r\n\t///\r\n\t/// @tparam genIUType Signed or unsigned integer scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/bitfieldReverse.xml\">GLSL bitfieldReverse man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_DECL genIUType bitfieldReverse(genIUType const & Value);\r\n\t\t\r\n\t/// Returns the number of bits set to 1 in the binary representation of value.\r\n\t///\r\n\t/// @tparam genIUType Signed or unsigned integer scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/bitCount.xml\">GLSL bitCount man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>\r\n\t///\r\n\t/// @todo Clarify the declaration to specify that scalars are suported.\r\n\ttemplate <typename T, template <typename> class genIUType>\r\n\tGLM_FUNC_DECL typename genIUType<T>::signed_type bitCount(genIUType<T> const & Value);\r\n\r\n\t/// Returns the bit number of the least significant bit set to\r\n\t/// 1 in the binary representation of value. \r\n\t/// If value is zero, -1 will be returned.\r\n\t///\r\n\t/// @tparam genIUType Signed or unsigned integer scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/findLSB.xml\">GLSL findLSB man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>\r\n\t///\r\n\t/// @todo Clarify the declaration to specify that scalars are suported.\r\n\ttemplate <typename T, template <typename> class genIUType>\r\n\tGLM_FUNC_DECL typename genIUType<T>::signed_type findLSB(genIUType<T> const & Value);\r\n\r\n\t/// Returns the bit number of the most significant bit in the binary representation of value.\r\n\t/// For positive integers, the result will be the bit number of the most significant bit set to 1. \r\n\t/// For negative integers, the result will be the bit number of the most significant\r\n\t/// bit set to 0. For a value of zero or negative one, -1 will be returned.\r\n\t///\r\n\t/// @tparam genIUType Signed or unsigned integer scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/findMSB.xml\">GLSL findMSB man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.8 Integer Functions</a>\r\n\t///\r\n\t/// @todo Clarify the declaration to specify that scalars are suported.\r\n\ttemplate <typename T, template <typename> class genIUType>\r\n\tGLM_FUNC_DECL typename genIUType<T>::signed_type findMSB(genIUType<T> const & Value);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"func_integer.inl\"\r\n\r\n#endif//glm_core_func_integer\r\n\r\n"
  },
  {
    "path": "gpu/glm/detail/func_integer.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_integer.inl\r\n/// @date 2010-03-17 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"type_vec2.hpp\"\r\n#include \"type_vec3.hpp\"\r\n#include \"type_vec4.hpp\"\r\n#include \"type_int.hpp\"\r\n#include \"_vectorize.hpp\"\r\n#if(GLM_ARCH != GLM_ARCH_PURE)\r\n#if(GLM_COMPILER & GLM_COMPILER_VC)\r\n#\tinclude <intrin.h>\r\n#\tpragma intrinsic(_BitScanReverse)\r\n#endif//(GLM_COMPILER & GLM_COMPILER_VC)\r\n#endif//(GLM_ARCH != GLM_ARCH_PURE)\r\n#include <limits>\r\n\r\nnamespace glm\r\n{\r\n\t// uaddCarry\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER uint uaddCarry\r\n\t(\r\n\t\tuint const & x,\r\n\t\tuint const & y,\r\n\t\tuint & Carry\r\n\t)\r\n\t{\r\n\t\tuint64 Value64 = static_cast<uint64>(x) + static_cast<uint64>(y);\r\n\t\tuint32 Result = static_cast<uint32>(Value64 % (static_cast<uint64>(1) << static_cast<uint64>(32)));\r\n\t\tCarry = (Value64 % (static_cast<uint64>(1) << static_cast<uint64>(32))) > 1 ? static_cast<uint32>(1) : static_cast<uint32>(0);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER uvec2 uaddCarry\r\n\t(\r\n\t\tuvec2 const & x,\r\n\t\tuvec2 const & y,\r\n\t\tuvec2 & Carry\r\n\t)\r\n\t{\r\n\t\treturn uvec2(\r\n\t\t\tuaddCarry(x[0], y[0], Carry[0]),\r\n\t\t\tuaddCarry(x[1], y[1], Carry[1]));\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER uvec3 uaddCarry\r\n\t(\r\n\t\tuvec3 const & x,\r\n\t\tuvec3 const & y,\r\n\t\tuvec3 & Carry\r\n\t)\r\n\t{\r\n\t\treturn uvec3(\r\n\t\t\tuaddCarry(x[0], y[0], Carry[0]),\r\n\t\t\tuaddCarry(x[1], y[1], Carry[1]),\r\n\t\t\tuaddCarry(x[2], y[2], Carry[2]));\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER uvec4 uaddCarry\r\n\t(\r\n\t\tuvec4 const & x,\r\n\t\tuvec4 const & y,\r\n\t\tuvec4 & Carry\r\n\t)\r\n\t{\r\n\t\treturn uvec4(\r\n\t\t\tuaddCarry(x[0], y[0], Carry[0]),\r\n\t\t\tuaddCarry(x[1], y[1], Carry[1]),\r\n\t\t\tuaddCarry(x[2], y[2], Carry[2]),\r\n\t\t\tuaddCarry(x[3], y[3], Carry[3]));\r\n\t}\r\n\r\n\t// usubBorrow\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER uint usubBorrow\r\n\t(\r\n\t\tuint const & x,\r\n\t\tuint const & y,\r\n\t\tuint & Borrow\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(sizeof(uint) == sizeof(uint32), \"uint and uint32 size mismatch\");\r\n\r\n\t\tBorrow = x >= y ? static_cast<uint32>(0) : static_cast<uint32>(1);\r\n\t\tif(x > y)\r\n\t\t\treturn static_cast<uint32>(static_cast<int64>(x) -static_cast<int64>(y));\r\n\t\telse\r\n\t\t\treturn static_cast<uint32>((static_cast<int64>(1) << static_cast<int64>(32)) + static_cast<int64>(x) - static_cast<int64>(y));\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER uvec2 usubBorrow\r\n\t(\r\n\t\tuvec2 const & x,\r\n\t\tuvec2 const & y,\r\n\t\tuvec2 & Borrow\r\n\t)\r\n\t{\r\n\t\treturn uvec2(\r\n\t\t\tusubBorrow(x[0], y[0], Borrow[0]),\r\n\t\t\tusubBorrow(x[1], y[1], Borrow[1]));\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER uvec3 usubBorrow\r\n\t(\r\n\t\tuvec3 const & x,\r\n\t\tuvec3 const & y,\r\n\t\tuvec3 & Borrow\r\n\t)\r\n\t{\r\n\t\treturn uvec3(\r\n\t\t\tusubBorrow(x[0], y[0], Borrow[0]),\r\n\t\t\tusubBorrow(x[1], y[1], Borrow[1]),\r\n\t\t\tusubBorrow(x[2], y[2], Borrow[2]));\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER uvec4 usubBorrow\r\n\t(\r\n\t\tuvec4 const & x,\r\n\t\tuvec4 const & y,\r\n\t\tuvec4 & Borrow\r\n\t)\r\n\t{\r\n\t\treturn uvec4(\r\n\t\t\tusubBorrow(x[0], y[0], Borrow[0]),\r\n\t\t\tusubBorrow(x[1], y[1], Borrow[1]),\r\n\t\t\tusubBorrow(x[2], y[2], Borrow[2]),\r\n\t\t\tusubBorrow(x[3], y[3], Borrow[3]));\r\n\t}\r\n\r\n\t// umulExtended\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER void umulExtended\r\n\t(\r\n\t\tuint const & x,\r\n\t\tuint const & y,\r\n\t\tuint & msb,\r\n\t\tuint & lsb\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(sizeof(uint) == sizeof(uint32), \"uint and uint32 size mismatch\");\r\n\r\n\t\tuint64 Value64 = static_cast<uint64>(x) * static_cast<uint64>(y);\r\n\t\tmsb = *(reinterpret_cast<uint32*>(&Value64) + 1);\r\n\t\tlsb = reinterpret_cast<uint32&>(Value64);\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER void umulExtended\r\n\t(\r\n\t\tuvec2 const & x,\r\n\t\tuvec2 const & y,\r\n\t\tuvec2 & msb,\r\n\t\tuvec2 & lsb\r\n\t)\r\n\t{\r\n\t\tumulExtended(x[0], y[0], msb[0], lsb[0]);\r\n\t\tumulExtended(x[1], y[1], msb[1], lsb[1]);\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER void umulExtended\r\n\t(\r\n\t\tuvec3 const & x,\r\n\t\tuvec3 const & y,\r\n\t\tuvec3 & msb,\r\n\t\tuvec3 & lsb\r\n\t)\r\n\t{\r\n\t\tumulExtended(x[0], y[0], msb[0], lsb[0]);\r\n\t\tumulExtended(x[1], y[1], msb[1], lsb[1]);\r\n\t\tumulExtended(x[2], y[2], msb[2], lsb[2]);\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER void umulExtended\r\n\t(\r\n\t\tuvec4 const & x,\r\n\t\tuvec4 const & y,\r\n\t\tuvec4 & msb,\r\n\t\tuvec4 & lsb\r\n\t)\r\n\t{\r\n\t\tumulExtended(x[0], y[0], msb[0], lsb[0]);\r\n\t\tumulExtended(x[1], y[1], msb[1], lsb[1]);\r\n\t\tumulExtended(x[2], y[2], msb[2], lsb[2]);\r\n\t\tumulExtended(x[3], y[3], msb[3], lsb[3]);\r\n\t}\r\n\r\n\t// imulExtended\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER void imulExtended\r\n\t(\r\n\t\tint const & x,\r\n\t\tint const & y,\r\n\t\tint & msb,\r\n\t\tint & lsb\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(sizeof(int) == sizeof(int32), \"int and int32 size mismatch\");\r\n\r\n\t\tint64 Value64 = static_cast<int64>(x) * static_cast<int64>(y);\r\n\t\tmsb = *(reinterpret_cast<int32*>(&Value64) + 1);\r\n\t\tlsb = reinterpret_cast<int32&>(Value64);\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER void imulExtended\r\n\t(\r\n\t\tivec2 const & x,\r\n\t\tivec2 const & y,\r\n\t\tivec2 & msb,\r\n\t\tivec2 & lsb\r\n\t)\r\n\t{\r\n\t\timulExtended(x[0], y[0], msb[0], lsb[0]),\r\n\t\timulExtended(x[1], y[1], msb[1], lsb[1]);\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER void imulExtended\r\n\t(\r\n\t\tivec3 const & x,\r\n\t\tivec3 const & y,\r\n\t\tivec3 & msb,\r\n\t\tivec3 & lsb\r\n\t)\r\n\t{\r\n\t\timulExtended(x[0], y[0], msb[0], lsb[0]),\r\n\t\timulExtended(x[1], y[1], msb[1], lsb[1]);\r\n\t\timulExtended(x[2], y[2], msb[2], lsb[2]);\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER void imulExtended\r\n\t(\r\n\t\tivec4 const & x,\r\n\t\tivec4 const & y,\r\n\t\tivec4 & msb,\r\n\t\tivec4 & lsb\r\n\t)\r\n\t{\r\n\t\timulExtended(x[0], y[0], msb[0], lsb[0]),\r\n\t\timulExtended(x[1], y[1], msb[1], lsb[1]);\r\n\t\timulExtended(x[2], y[2], msb[2], lsb[2]);\r\n\t\timulExtended(x[3], y[3], msb[3], lsb[3]);\r\n\t}\r\n\r\n\t// bitfieldExtract\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_QUALIFIER genIUType bitfieldExtract\r\n\t(\r\n\t\tgenIUType const & Value,\r\n\t\tint const & Offset,\r\n\t\tint const & Bits\r\n\t)\r\n\t{\r\n\t\tint GenSize = int(sizeof(genIUType)) << int(3);\r\n\r\n\t\tassert(Offset + Bits <= GenSize);\r\n\r\n\t\tgenIUType ShiftLeft = Bits ? Value << (GenSize - (Bits + Offset)) : genIUType(0);\r\n\t\tgenIUType ShiftBack = ShiftLeft >> genIUType(GenSize - Bits);\r\n\r\n\t\treturn ShiftBack;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> bitfieldExtract\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & Value,\r\n\t\tint const & Offset,\r\n\t\tint const & Bits\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tbitfieldExtract(Value[0], Offset, Bits),\r\n\t\t\tbitfieldExtract(Value[1], Offset, Bits));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> bitfieldExtract\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & Value,\r\n\t\tint const & Offset,\r\n\t\tint const & Bits\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tbitfieldExtract(Value[0], Offset, Bits),\r\n\t\t\tbitfieldExtract(Value[1], Offset, Bits),\r\n\t\t\tbitfieldExtract(Value[2], Offset, Bits));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> bitfieldExtract\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & Value,\r\n\t\tint const & Offset,\r\n\t\tint const & Bits\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tbitfieldExtract(Value[0], Offset, Bits),\r\n\t\t\tbitfieldExtract(Value[1], Offset, Bits),\r\n\t\t\tbitfieldExtract(Value[2], Offset, Bits),\r\n\t\t\tbitfieldExtract(Value[3], Offset, Bits));\r\n\t}\r\n\r\n\t// bitfieldInsert\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_QUALIFIER genIUType bitfieldInsert\r\n\t(\r\n\t\tgenIUType const & Base,\r\n\t\tgenIUType const & Insert,\r\n\t\tint const & Offset,\r\n\t\tint const & Bits\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, \"'bitfieldInsert' only accept integer values\");\r\n\t\tassert(Offset + Bits <= sizeof(genIUType));\r\n\r\n\t\tif(Bits == 0)\r\n\t\t\treturn Base;\r\n\r\n\t\tgenIUType Mask = 0;\r\n\t\tfor(int Bit = Offset; Bit < Offset + Bits; ++Bit)\r\n\t\t\tMask |= (1 << Bit);\r\n\r\n\t\treturn (Base & ~Mask) | (Insert & Mask);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> bitfieldInsert\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & Base,\r\n\t\tdetail::tvec2<T, P> const & Insert,\r\n\t\tint const & Offset,\r\n\t\tint const & Bits\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tbitfieldInsert(Base[0], Insert[0], Offset, Bits),\r\n\t\t\tbitfieldInsert(Base[1], Insert[1], Offset, Bits));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> bitfieldInsert\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & Base,\r\n\t\tdetail::tvec3<T, P> const & Insert,\r\n\t\tint const & Offset,\r\n\t\tint const & Bits\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tbitfieldInsert(Base[0], Insert[0], Offset, Bits),\r\n\t\t\tbitfieldInsert(Base[1], Insert[1], Offset, Bits),\r\n\t\t\tbitfieldInsert(Base[2], Insert[2], Offset, Bits));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> bitfieldInsert\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & Base,\r\n\t\tdetail::tvec4<T, P> const & Insert,\r\n\t\tint const & Offset,\r\n\t\tint const & Bits\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tbitfieldInsert(Base[0], Insert[0], Offset, Bits),\r\n\t\t\tbitfieldInsert(Base[1], Insert[1], Offset, Bits),\r\n\t\t\tbitfieldInsert(Base[2], Insert[2], Offset, Bits),\r\n\t\t\tbitfieldInsert(Base[3], Insert[3], Offset, Bits));\r\n\t}\r\n\r\n\t// bitfieldReverse\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_QUALIFIER genIUType bitfieldReverse(genIUType const & Value)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, \"'bitfieldReverse' only accept integer values\");\r\n\r\n\t\tgenIUType Out = 0;\r\n\t\tstd::size_t BitSize = sizeof(genIUType) * 8;\r\n\t\tfor(std::size_t i = 0; i < BitSize; ++i)\r\n\t\t\tif(Value & (genIUType(1) << i))\r\n\t\t\t\tOut |= genIUType(1) << (BitSize - 1 - i);\r\n\t\treturn Out;\r\n\t}\t\r\n\r\n\tVECTORIZE_VEC(bitfieldReverse)\r\n\r\n\t// bitCount\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_QUALIFIER int bitCount(genIUType const & Value)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, \"'bitCount' only accept integer values\");\r\n\r\n\t\tint Count = 0;\r\n\t\tfor(std::size_t i = 0; i < sizeof(genIUType) * std::size_t(8); ++i)\r\n\t\t{\r\n\t\t\tif(Value & (1 << i))\r\n\t\t\t\t++Count;\r\n\t\t}\r\n\t\treturn Count;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<int, P> bitCount\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<int, P>(\r\n\t\t\tbitCount(value[0]),\r\n\t\t\tbitCount(value[1]));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<int, P> bitCount\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<int, P>(\r\n\t\t\tbitCount(value[0]),\r\n\t\t\tbitCount(value[1]),\r\n\t\t\tbitCount(value[2]));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<int, P> bitCount\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<int, P>(\r\n\t\t\tbitCount(value[0]),\r\n\t\t\tbitCount(value[1]),\r\n\t\t\tbitCount(value[2]),\r\n\t\t\tbitCount(value[3]));\r\n\t}\r\n\r\n\t// findLSB\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_QUALIFIER int findLSB\r\n\t(\r\n\t\tgenIUType const & Value\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, \"'findLSB' only accept integer values\");\r\n\t\tif(Value == 0)\r\n\t\t\treturn -1;\r\n\r\n\t\tgenIUType Bit;\r\n\t\tfor(Bit = genIUType(0); !(Value & (1 << Bit)); ++Bit){}\r\n\t\treturn Bit;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<int, P> findLSB\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<int, P>(\r\n\t\t\tfindLSB(value[0]),\r\n\t\t\tfindLSB(value[1]));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<int, P> findLSB\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<int, P>(\r\n\t\t\tfindLSB(value[0]),\r\n\t\t\tfindLSB(value[1]),\r\n\t\t\tfindLSB(value[2]));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<int, P> findLSB\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<int, P>(\r\n\t\t\tfindLSB(value[0]),\r\n\t\t\tfindLSB(value[1]),\r\n\t\t\tfindLSB(value[2]),\r\n\t\t\tfindLSB(value[3]));\r\n\t}\r\n\r\n\t// findMSB\r\n#if((GLM_ARCH != GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_VC))\r\n\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_QUALIFIER int findMSB\r\n\t(\r\n\t\tgenIUType const & Value\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, \"'findMSB' only accept integer values\");\r\n\t\tif(Value == 0)\r\n\t\t\treturn -1;\r\n\r\n\t\tunsigned long Result(0);\r\n\t\t_BitScanReverse(&Result, Value);\r\n\t\treturn int(Result);\r\n\t}\r\n/*\r\n// __builtin_clz seems to be buggy as it crasks for some values, from 0x00200000 to 80000000\r\n#elif((GLM_ARCH != GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC40))\r\n\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_QUALIFIER int findMSB\r\n\t(\r\n\t\tgenIUType const & Value\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, \"'findMSB' only accept integer values\");\r\n\t\tif(Value == 0)\r\n\t\t\treturn -1;\r\n\r\n\t\t// clz returns the number or trailing 0-bits; see\r\n\t\t// http://gcc.gnu.org/onlinedocs/gcc-4.7.1/gcc/Other-Builtins.html\r\n\t\t//\r\n\t\t// NoteBecause __builtin_clz only works for unsigned ints, this\r\n\t\t// implementation will not work for 64-bit integers.\r\n\t\t//\r\n\t\treturn 31 - __builtin_clzl(Value);\r\n\t}\r\n*/\r\n#else\r\n\r\n/* SSE implementation idea\r\n\r\n\t\t__m128i const Zero = _mm_set_epi32( 0,  0,  0,  0);\r\n\t\t__m128i const One = _mm_set_epi32( 1,  1,  1,  1);\r\n\t\t__m128i Bit = _mm_set_epi32(-1, -1, -1, -1);\r\n\t\t__m128i Tmp = _mm_set_epi32(Value, Value, Value, Value);\r\n\t\t__m128i Mmi = Zero;\r\n\t\tfor(int i = 0; i < 32; ++i)\r\n\t\t{\r\n\t\t\t__m128i Shilt = _mm_and_si128(_mm_cmpgt_epi32(Tmp, One), One);\r\n\t\t\tTmp = _mm_srai_epi32(Tmp, One);\r\n\t\t\tBit = _mm_add_epi32(Bit, _mm_and_si128(Shilt, i));\r\n\t\t\tMmi = _mm_and_si128(Mmi, One);\r\n\t\t}\r\n\t\treturn Bit;\r\n\r\n*/\r\n\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_QUALIFIER int findMSB\r\n\t(\r\n\t\tgenIUType const & Value\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genIUType>::is_integer, \"'findMSB' only accept integer values\");\r\n\t\t\r\n\t\tif(Value == genIUType(0) || Value == genIUType(-1))\r\n\t\t\treturn -1;\r\n\t\telse if(Value > 0)\r\n\t\t{\r\n\t\t\tgenIUType Bit = genIUType(-1);\r\n\t\t\tfor(genIUType tmp = Value; tmp > 0; tmp >>= 1, ++Bit){}\r\n\t\t\treturn Bit;\r\n\t\t}\r\n\t\telse //if(Value < 0)\r\n\t\t{\r\n\t\t\tint const BitCount(sizeof(genIUType) * 8);\r\n\t\t\tint MostSignificantBit(-1);\r\n\t\t\tfor(int BitIndex(0); BitIndex < BitCount; ++BitIndex)\r\n\t\t\t\tMostSignificantBit = (Value & (1 << BitIndex)) ? MostSignificantBit : BitIndex;\r\n\t\t\tassert(MostSignificantBit >= 0);\r\n\t\t\treturn MostSignificantBit;\r\n\t\t}\r\n\t}\r\n#endif//(GLM_COMPILER)\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<int, P> findMSB\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<int, P>(\r\n\t\t\tfindMSB(value[0]),\r\n\t\t\tfindMSB(value[1]));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<int, P> findMSB\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<int, P>(\r\n\t\t\tfindMSB(value[0]),\r\n\t\t\tfindMSB(value[1]),\r\n\t\t\tfindMSB(value[2]));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<int, P> findMSB\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<int, P>(\r\n\t\t\tfindMSB(value[0]),\r\n\t\t\tfindMSB(value[1]),\r\n\t\t\tfindMSB(value[2]),\r\n\t\t\tfindMSB(value[3]));\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/detail/func_matrix.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_matrix.hpp\r\n/// @date 2008-08-03 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///\r\n/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>\r\n/// \r\n/// @defgroup core_func_matrix Matrix functions\r\n/// @ingroup core\r\n/// \r\n/// For each of the following built-in matrix functions, there is both a \r\n/// single-precision floating point version, where all arguments and return values \r\n/// are single precision, and a double-precision floating version, where all \r\n/// arguments and return values are double precision. Only the single-precision \r\n/// floating point version is shown.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_CORE_func_matrix\r\n#define GLM_CORE_func_matrix\r\n\r\n// Dependencies\r\n#include \"../detail/precision.hpp\"\r\n#include \"../detail/setup.hpp\"\r\n#include \"../detail/type_mat.hpp\"\r\n#include \"../vec2.hpp\"\r\n#include \"../vec3.hpp\"\r\n#include \"../vec4.hpp\"\r\n#include \"../mat2x2.hpp\"\r\n#include \"../mat2x3.hpp\"\r\n#include \"../mat2x4.hpp\"\r\n#include \"../mat3x2.hpp\"\r\n#include \"../mat3x3.hpp\"\r\n#include \"../mat3x4.hpp\"\r\n#include \"../mat4x2.hpp\"\r\n#include \"../mat4x3.hpp\"\r\n#include \"../mat4x4.hpp\"\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct outerProduct_trait<T, P, tvec2, tvec2>\r\n\t{\r\n\t\ttypedef tmat2x2<T, P> type;\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct outerProduct_trait<T, P, tvec2, tvec3>\r\n\t{\r\n\t\ttypedef tmat2x3<T, P> type;\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct outerProduct_trait<T, P, tvec2, tvec4>\r\n\t{\r\n\t\ttypedef tmat2x4<T, P> type;\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct outerProduct_trait<T, P, tvec3, tvec2>\r\n\t{\r\n\t\ttypedef tmat3x2<T, P> type;\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct outerProduct_trait<T, P, tvec3, tvec3>\r\n\t{\r\n\t\ttypedef tmat3x3<T, P> type;\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct outerProduct_trait<T, P, tvec3, tvec4>\r\n\t{\r\n\t\ttypedef tmat3x4<T, P> type;\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct outerProduct_trait<T, P, tvec4, tvec2>\r\n\t{\r\n\t\ttypedef tmat4x2<T, P> type;\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct outerProduct_trait<T, P, tvec4, tvec3>\r\n\t{\r\n\t\ttypedef tmat4x3<T, P> type;\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct outerProduct_trait<T, P, tvec4, tvec4>\r\n\t{\r\n\t\ttypedef tmat4x4<T, P> type;\r\n\t};\r\n\r\n}//namespace detail\r\n\r\n\t/// @addtogroup core_func_matrix\r\n\t/// @{\r\n\r\n\t/// Multiply matrix x by matrix y component-wise, i.e., \r\n\t/// result[i][j] is the scalar product of x[i][j] and y[i][j].\r\n\t/// \r\n\t/// @tparam matType Floating-point matrix types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/matrixCompMult.xml\">GLSL matrixCompMult man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>\r\n\ttemplate <typename T, precision P, template <typename, precision> class matType>\r\n\tGLM_FUNC_DECL matType<T, P> matrixCompMult(matType<T, P> const & x, matType<T, P> const & y);\r\n\r\n\t/// Treats the first parameter c as a column vector\r\n\t/// and the second parameter r as a row vector\r\n\t/// and does a linear algebraic matrix multiply c * r.\r\n\t/// \r\n\t/// @tparam matType Floating-point matrix types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/outerProduct.xml\">GLSL outerProduct man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>\r\n\t/// \r\n\t/// @todo Clarify the declaration to specify that matType doesn't have to be provided when used.\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecTypeA, template <typename, precision> class vecTypeB>\r\n\tGLM_FUNC_DECL typename detail::outerProduct_trait<T, P, vecTypeA, vecTypeB>::type outerProduct(vecTypeA<T, P> const & c, vecTypeB<T, P> const & r);\r\n\r\n\t/// Returns the transposed matrix of x\r\n\t/// \r\n\t/// @tparam matType Floating-point matrix types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/transpose.xml\">GLSL transpose man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>\r\n#\tif((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC11))\r\n\t\ttemplate <typename T, precision P, template <typename, precision> class matType>\r\n\t\tGLM_FUNC_DECL typename matType<T, P>::transpose_type transpose(matType<T, P> const & x);\r\n#\tendif\r\n\t\r\n\t/// Return the determinant of a squared matrix.\r\n\t/// \r\n\t/// @tparam valType Floating-point scalar types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/determinant.xml\">GLSL determinant man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>\t\r\n\ttemplate <typename T, precision P, template <typename, precision> class matType>\r\n\tGLM_FUNC_DECL T determinant(matType<T, P> const & m);\r\n\r\n\t/// Return the inverse of a squared matrix.\r\n\t/// \r\n\t/// @tparam valType Floating-point scalar types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/inverse.xml\">GLSL inverse man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.6 Matrix Functions</a>\t \r\n\ttemplate <typename T, precision P, template <typename, precision> class matType>\r\n\tGLM_FUNC_DECL matType<T, P> inverse(matType<T, P> const & m);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"func_matrix.inl\"\r\n\r\n#endif//GLM_CORE_func_matrix\r\n"
  },
  {
    "path": "gpu/glm/detail/func_matrix.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_matrix.inl\r\n/// @date 2008-03-08 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../geometric.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate\r\n\t<\r\n\t\ttemplate <class, precision> class vecTypeA,\r\n\t\ttemplate <class, precision> class vecTypeB,\r\n\t\ttypename T, precision P\r\n\t>\r\n\tstruct compute_outerProduct{};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_outerProduct<detail::tvec2, detail::tvec2, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, detail::tvec2, detail::tvec2>::type call(detail::tvec2<T, P> const & c, detail::tvec2<T, P> const & r)\r\n\t\t{\r\n\t\t\tdetail::tmat2x2<T, P> m(detail::tmat2x2<T, P>::_null);\r\n\t\t\tm[0][0] = c[0] * r[0];\r\n\t\t\tm[0][1] = c[1] * r[0];\r\n\t\t\tm[1][0] = c[0] * r[1];\r\n\t\t\tm[1][1] = c[1] * r[1];\r\n\t\t\treturn m;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_outerProduct<detail::tvec3, detail::tvec3, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, detail::tvec3, detail::tvec3>::type call(detail::tvec3<T, P> const & c, detail::tvec3<T, P> const & r)\r\n\t\t{\r\n\t\t\tdetail::tmat3x3<T, P> m(detail::tmat3x3<T, P>::_null);\r\n\t\t\tfor(length_t i(0); i < m.length(); ++i)\r\n\t\t\t\tm[i] = c * r[i];\r\n\t\t\treturn m;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_outerProduct<detail::tvec4, detail::tvec4, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, detail::tvec4, detail::tvec4>::type call(detail::tvec4<T, P> const & c, detail::tvec4<T, P> const & r)\r\n\t\t{\r\n\t\t\tdetail::tmat4x4<T, P> m(detail::tmat4x4<T, P>::_null);\r\n\t\t\tfor(length_t i(0); i < m.length(); ++i)\r\n\t\t\t\tm[i] = c * r[i];\r\n\t\t\treturn m;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_outerProduct<detail::tvec3, detail::tvec2, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, detail::tvec3, detail::tvec2>::type call(detail::tvec3<T, P> const & c, detail::tvec2<T, P> const & r)\r\n\t\t{\r\n\t\t\tdetail::tmat2x3<T, P> m(detail::tmat2x3<T, P>::_null);\r\n\t\t\tm[0][0] = c.x * r.x;\r\n\t\t\tm[0][1] = c.y * r.x;\r\n\t\t\tm[0][2] = c.z * r.x;\r\n\t\t\tm[1][0] = c.x * r.y;\r\n\t\t\tm[1][1] = c.y * r.y;\r\n\t\t\tm[1][2] = c.z * r.y;\r\n\t\t\treturn m;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_outerProduct<detail::tvec2, detail::tvec3, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, detail::tvec2, detail::tvec3>::type call(detail::tvec2<T, P> const & c, detail::tvec3<T, P> const & r)\r\n\t\t{\r\n\t\t\tdetail::tmat3x2<T, P> m(detail::tmat3x2<T, P>::_null);\r\n\t\t\tm[0][0] = c.x * r.x;\r\n\t\t\tm[0][1] = c.y * r.x;\r\n\t\t\tm[1][0] = c.x * r.y;\r\n\t\t\tm[1][1] = c.y * r.y;\r\n\t\t\tm[2][0] = c.x * r.z;\r\n\t\t\tm[2][1] = c.y * r.z;\r\n\t\t\treturn m;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_outerProduct<detail::tvec4, detail::tvec2, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, detail::tvec4, detail::tvec2>::type call(detail::tvec4<T, P> const & c, detail::tvec2<T, P> const & r)\r\n\t\t{\r\n\t\t\tdetail::tmat2x4<T, P> m(detail::tmat2x4<T, P>::_null);\r\n\t\t\tm[0][0] = c.x * r.x;\r\n\t\t\tm[0][1] = c.y * r.x;\r\n\t\t\tm[0][2] = c.z * r.x;\r\n\t\t\tm[0][3] = c.w * r.x;\r\n\t\t\tm[1][0] = c.x * r.y;\r\n\t\t\tm[1][1] = c.y * r.y;\r\n\t\t\tm[1][2] = c.z * r.y;\r\n\t\t\tm[1][3] = c.w * r.y;\r\n\t\t\treturn m;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_outerProduct<detail::tvec2, detail::tvec4, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, detail::tvec2, detail::tvec4>::type call(detail::tvec2<T, P> const & c, detail::tvec4<T, P> const & r)\r\n\t\t{\r\n\t\t\tdetail::tmat4x2<T, P> m(detail::tmat4x2<T, P>::_null);\r\n\t\t\tm[0][0] = c.x * r.x;\r\n\t\t\tm[0][1] = c.y * r.x;\r\n\t\t\tm[1][0] = c.x * r.y;\r\n\t\t\tm[1][1] = c.y * r.y;\r\n\t\t\tm[2][0] = c.x * r.z;\r\n\t\t\tm[2][1] = c.y * r.z;\r\n\t\t\tm[3][0] = c.x * r.w;\r\n\t\t\tm[3][1] = c.y * r.w;\r\n\t\t\treturn m;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_outerProduct<detail::tvec4, detail::tvec3, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, detail::tvec4, detail::tvec3>::type call(detail::tvec4<T, P> const & c, detail::tvec3<T, P> const & r)\r\n\t\t{\r\n\t\t\tdetail::tmat3x4<T, P> m(detail::tmat3x4<T, P>::_null);\r\n\t\t\tm[0][0] = c.x * r.x;\r\n\t\t\tm[0][1] = c.y * r.x;\r\n\t\t\tm[0][2] = c.z * r.x;\r\n\t\t\tm[0][3] = c.w * r.x;\r\n\t\t\tm[1][0] = c.x * r.y;\r\n\t\t\tm[1][1] = c.y * r.y;\r\n\t\t\tm[1][2] = c.z * r.y;\r\n\t\t\tm[1][3] = c.w * r.y;\r\n\t\t\tm[2][0] = c.x * r.z;\r\n\t\t\tm[2][1] = c.y * r.z;\r\n\t\t\tm[2][2] = c.z * r.z;\r\n\t\t\tm[2][3] = c.w * r.z;\r\n\t\t\treturn m;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_outerProduct<detail::tvec3, detail::tvec4, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static typename detail::outerProduct_trait<T, P, detail::tvec3, detail::tvec4>::type call(detail::tvec3<T, P> const & c, detail::tvec4<T, P> const & r)\r\n\t\t{\r\n\t\t\tdetail::tmat4x3<T, P> m(detail::tmat4x3<T, P>::_null);\r\n\t\t\tm[0][0] = c.x * r.x;\r\n\t\t\tm[0][1] = c.y * r.x;\r\n\t\t\tm[0][2] = c.z * r.x;\r\n\t\t\tm[1][0] = c.x * r.y;\r\n\t\t\tm[1][1] = c.y * r.y;\r\n\t\t\tm[1][2] = c.z * r.y;\r\n\t\t\tm[2][0] = c.x * r.z;\r\n\t\t\tm[2][1] = c.y * r.z;\r\n\t\t\tm[2][2] = c.z * r.z;\r\n\t\t\tm[3][0] = c.x * r.w;\r\n\t\t\tm[3][1] = c.y * r.w;\r\n\t\t\tm[3][2] = c.z * r.w;\r\n\t\t\treturn m;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <template <class, precision> class matType, typename T, precision P>\r\n\tstruct compute_transpose{};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_transpose<detail::tmat2x2, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static detail::tmat2x2<T, P> call(detail::tmat2x2<T, P> const & m)\r\n\t\t{\r\n\t\t\tdetail::tmat2x2<T, P> result(detail::tmat2x2<T, P>::_null);\r\n\t\t\tresult[0][0] = m[0][0];\r\n\t\t\tresult[0][1] = m[1][0];\r\n\t\t\tresult[1][0] = m[0][1];\r\n\t\t\tresult[1][1] = m[1][1];\r\n\t\t\treturn result;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_transpose<detail::tmat2x3, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static detail::tmat3x2<T, P> call(detail::tmat2x3<T, P> const & m)\r\n\t\t{\r\n\t\t\tdetail::tmat3x2<T, P> result(detail::tmat3x2<T, P>::_null);\r\n\t\t\tresult[0][0] = m[0][0];\r\n\t\t\tresult[0][1] = m[1][0];\r\n\t\t\tresult[1][0] = m[0][1];\r\n\t\t\tresult[1][1] = m[1][1];\r\n\t\t\tresult[2][0] = m[0][2];\r\n\t\t\tresult[2][1] = m[1][2];\r\n\t\t\treturn result;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_transpose<detail::tmat2x4, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static detail::tmat4x2<T, P> call(detail::tmat2x4<T, P> const & m)\r\n\t\t{\r\n\t\t\tdetail::tmat4x2<T, P> result(detail::tmat4x2<T, P>::_null);\r\n\t\t\tresult[0][0] = m[0][0];\r\n\t\t\tresult[0][1] = m[1][0];\r\n\t\t\tresult[1][0] = m[0][1];\r\n\t\t\tresult[1][1] = m[1][1];\r\n\t\t\tresult[2][0] = m[0][2];\r\n\t\t\tresult[2][1] = m[1][2];\r\n\t\t\tresult[3][0] = m[0][3];\r\n\t\t\tresult[3][1] = m[1][3];\r\n\t\t\treturn result;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_transpose<detail::tmat3x2, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static detail::tmat2x3<T, P> call(detail::tmat3x2<T, P> const & m)\r\n\t\t{\r\n\t\t\tdetail::tmat2x3<T, P> result(detail::tmat2x3<T, P>::_null);\r\n\t\t\tresult[0][0] = m[0][0];\r\n\t\t\tresult[0][1] = m[1][0];\r\n\t\t\tresult[0][2] = m[2][0];\r\n\t\t\tresult[1][0] = m[0][1];\r\n\t\t\tresult[1][1] = m[1][1];\r\n\t\t\tresult[1][2] = m[2][1];\r\n\t\t\treturn result;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_transpose<detail::tmat3x3, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static detail::tmat3x3<T, P> call(detail::tmat3x3<T, P> const & m)\r\n\t\t{\r\n\t\t\tdetail::tmat3x3<T, P> result(detail::tmat3x3<T, P>::_null);\r\n\t\t\tresult[0][0] = m[0][0];\r\n\t\t\tresult[0][1] = m[1][0];\r\n\t\t\tresult[0][2] = m[2][0];\r\n\r\n\t\t\tresult[1][0] = m[0][1];\r\n\t\t\tresult[1][1] = m[1][1];\r\n\t\t\tresult[1][2] = m[2][1];\r\n\r\n\t\t\tresult[2][0] = m[0][2];\r\n\t\t\tresult[2][1] = m[1][2];\r\n\t\t\tresult[2][2] = m[2][2];\r\n\t\t\treturn result;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_transpose<detail::tmat3x4, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static detail::tmat4x3<T, P> call(detail::tmat3x4<T, P> const & m)\r\n\t\t{\r\n\t\t\tdetail::tmat4x3<T, P> result(detail::tmat4x3<T, P>::_null);\r\n\t\t\tresult[0][0] = m[0][0];\r\n\t\t\tresult[0][1] = m[1][0];\r\n\t\t\tresult[0][2] = m[2][0];\r\n\t\t\tresult[1][0] = m[0][1];\r\n\t\t\tresult[1][1] = m[1][1];\r\n\t\t\tresult[1][2] = m[2][1];\r\n\t\t\tresult[2][0] = m[0][2];\r\n\t\t\tresult[2][1] = m[1][2];\r\n\t\t\tresult[2][2] = m[2][2];\r\n\t\t\tresult[3][0] = m[0][3];\r\n\t\t\tresult[3][1] = m[1][3];\r\n\t\t\tresult[3][2] = m[2][3];\r\n\t\t\treturn result;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_transpose<detail::tmat4x2, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static detail::tmat2x4<T, P> call(detail::tmat4x2<T, P> const & m)\r\n\t\t{\r\n\t\t\tdetail::tmat2x4<T, P> result(detail::tmat2x4<T, P>::_null);\r\n\t\t\tresult[0][0] = m[0][0];\r\n\t\t\tresult[0][1] = m[1][0];\r\n\t\t\tresult[0][2] = m[2][0];\r\n\t\t\tresult[0][3] = m[3][0];\r\n\t\t\tresult[1][0] = m[0][1];\r\n\t\t\tresult[1][1] = m[1][1];\r\n\t\t\tresult[1][2] = m[2][1];\r\n\t\t\tresult[1][3] = m[3][1];\r\n\t\t\treturn result;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_transpose<detail::tmat4x3, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static detail::tmat3x4<T, P> call(detail::tmat4x3<T, P> const & m)\r\n\t\t{\r\n\t\t\tdetail::tmat3x4<T, P> result(detail::tmat3x4<T, P>::_null);\r\n\t\t\tresult[0][0] = m[0][0];\r\n\t\t\tresult[0][1] = m[1][0];\r\n\t\t\tresult[0][2] = m[2][0];\r\n\t\t\tresult[0][3] = m[3][0];\r\n\t\t\tresult[1][0] = m[0][1];\r\n\t\t\tresult[1][1] = m[1][1];\r\n\t\t\tresult[1][2] = m[2][1];\r\n\t\t\tresult[1][3] = m[3][1];\r\n\t\t\tresult[2][0] = m[0][2];\r\n\t\t\tresult[2][1] = m[1][2];\r\n\t\t\tresult[2][2] = m[2][2];\r\n\t\t\tresult[2][3] = m[3][2];\r\n\t\t\treturn result;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_transpose<detail::tmat4x4, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static detail::tmat4x4<T, P> call(detail::tmat4x4<T, P> const & m)\r\n\t\t{\r\n\t\t\tdetail::tmat4x4<T, P> result(detail::tmat4x4<T, P>::_null);\r\n\t\t\tresult[0][0] = m[0][0];\r\n\t\t\tresult[0][1] = m[1][0];\r\n\t\t\tresult[0][2] = m[2][0];\r\n\t\t\tresult[0][3] = m[3][0];\r\n\r\n\t\t\tresult[1][0] = m[0][1];\r\n\t\t\tresult[1][1] = m[1][1];\r\n\t\t\tresult[1][2] = m[2][1];\r\n\t\t\tresult[1][3] = m[3][1];\r\n\r\n\t\t\tresult[2][0] = m[0][2];\r\n\t\t\tresult[2][1] = m[1][2];\r\n\t\t\tresult[2][2] = m[2][2];\r\n\t\t\tresult[2][3] = m[3][2];\r\n\r\n\t\t\tresult[3][0] = m[0][3];\r\n\t\t\tresult[3][1] = m[1][3];\r\n\t\t\tresult[3][2] = m[2][3];\r\n\t\t\tresult[3][3] = m[3][3];\r\n\t\t\treturn result;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <template <class, precision> class matType, typename T, precision P>\r\n\tstruct compute_determinant{};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_determinant<detail::tmat2x2, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static T call(detail::tmat2x2<T, P> const & m)\r\n\t\t{\r\n\t\t\treturn m[0][0] * m[1][1] - m[1][0] * m[0][1];\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_determinant<detail::tmat3x3, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static T call(detail::tmat3x3<T, P> const & m)\r\n\t\t{\r\n\t\t\treturn\r\n\t\t\t\t+ m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2])\r\n\t\t\t\t- m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2])\r\n\t\t\t\t+ m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]);\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_determinant<detail::tmat4x4, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static T call(detail::tmat4x4<T, P> const & m)\r\n\t\t{\r\n\t\t\tT SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\r\n\t\t\tT SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\r\n\t\t\tT SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\r\n\t\t\tT SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\r\n\t\t\tT SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\r\n\t\t\tT SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\r\n\r\n\t\t\tdetail::tvec4<T, P> DetCof(\r\n\t\t\t\t+ (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02),\r\n\t\t\t\t- (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04),\r\n\t\t\t\t+ (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05),\r\n\t\t\t\t- (m[1][0] * SubFactor02 - m[1][1] * SubFactor04 + m[1][2] * SubFactor05));\r\n\r\n\t\t\treturn\r\n\t\t\t\tm[0][0] * DetCof[0] + m[0][1] * DetCof[1] +\r\n\t\t\t\tm[0][2] * DetCof[2] + m[0][3] * DetCof[3];\r\n\t\t}\r\n\t};\r\n}//namespace detail\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class matType>\r\n\tGLM_FUNC_QUALIFIER matType<T, P> matrixCompMult(matType<T, P> const & x, matType<T, P> const & y)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'matrixCompMult' only accept floating-point inputs\");\r\n\r\n\t\tmatType<T, P> result(matType<T, P>::_null);\r\n\t\tfor(length_t i = 0; i < result.length(); ++i)\r\n\t\t\tresult[i] = x[i] * y[i];\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate<typename T, precision P, template <typename, precision> class vecTypeA, template <typename, precision> class vecTypeB>\r\n\tGLM_FUNC_QUALIFIER typename detail::outerProduct_trait<T, P, vecTypeA, vecTypeB>::type outerProduct(vecTypeA<T, P> const & c, vecTypeB<T, P> const & r)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'outerProduct' only accept floating-point inputs\");\r\n\t\treturn detail::compute_outerProduct<vecTypeA, vecTypeB, T, P>::call(c, r);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class matType>\r\n\tGLM_FUNC_QUALIFIER typename matType<T, P>::transpose_type transpose(matType<T, P> const & m)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'transpose' only accept floating-point inputs\");\r\n\t\treturn detail::compute_transpose<matType, T, P>::call(m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class matType>\r\n\tGLM_FUNC_QUALIFIER T determinant(matType<T, P> const & m)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'determinant' only accept floating-point inputs\");\r\n\t\treturn detail::compute_determinant<matType, T, P>::call(m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class matType>\r\n\tGLM_FUNC_QUALIFIER matType<T, P> inverse(matType<T, P> const & m)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'inverse' only accept floating-point inputs\");\r\n\t\treturn detail::compute_inverse<matType, T, P>::call(m);\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/detail/func_noise.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_noise.hpp\r\n/// @date 2008-08-01 / 2011-06-18\r\n/// @author Christophe Riccio\r\n///\r\n/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>\r\n/// \r\n/// @defgroup core_func_noise Noise functions\r\n/// @ingroup core\r\n/// \r\n/// Noise functions are stochastic functions that can be used to increase visual \r\n/// complexity. Values returned by the following noise functions give the \r\n/// appearance of randomness, but are not truly random.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_func_noise\r\n#define glm_core_func_noise\r\n\r\n#include \"type_vec1.hpp\"\r\n#include \"type_vec2.hpp\"\r\n#include \"type_vec3.hpp\"\r\n#include \"setup.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup core_func_noise\r\n\t/// @{\r\n\r\n\t/// Returns a 1D noise value based on the input value x.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/noise1.xml\">GLSL noise1 man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL typename genType::value_type noise1(genType const & x);\r\n\r\n\t/// Returns a 2D noise value based on the input value x.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/noise2.xml\">GLSL noise2 man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL detail::tvec2<typename genType::value_type, defaultp> noise2(genType const & x);\r\n\r\n\t/// Returns a 3D noise value based on the input value x.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/noise3.xml\">GLSL noise3 man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL detail::tvec3<typename genType::value_type, defaultp> noise3(genType const & x);\r\n\r\n\t/// Returns a 4D noise value based on the input value x.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/noise4.xml\">GLSL noise4 man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.13 Noise Functions</a>\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL detail::tvec4<typename genType::value_type, defaultp> noise4(genType const & x);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"func_noise.inl\"\r\n\r\n#endif//glm_core_func_noise\r\n"
  },
  {
    "path": "gpu/glm/detail/func_noise.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_noise.inl\r\n/// @date 2008-08-01 / 2011-09-27\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../detail/_noise.hpp\"\r\n#include \"./func_common.hpp\"\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> grad4(T const & j, detail::tvec4<T, P> const & ip)\r\n\t{\r\n\t\tdetail::tvec3<T, P> pXYZ = floor(fract(detail::tvec3<T, P>(j) * detail::tvec3<T, P>(ip)) * T(7)) * ip[2] - T(1);\r\n\t\tT pW = static_cast<T>(1.5) - dot(abs(pXYZ), detail::tvec3<T, P>(1));\r\n\t\tdetail::tvec4<T, P> s = detail::tvec4<T, P>(lessThan(detail::tvec4<T, P>(pXYZ, pW), detail::tvec4<T, P>(0.0)));\r\n\t\tpXYZ = pXYZ + (detail::tvec3<T, P>(s) * T(2) - T(1)) * s.w; \r\n\t\treturn detail::tvec4<T, P>(pXYZ, pW);\r\n\t}\r\n}//namespace detail\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T noise1(T const & x)\r\n\t{\r\n\t\treturn noise1(detail::tvec2<T, defaultp>(x, T(0)));\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, defaultp> noise2(T const & x)\r\n\t{\r\n\t\treturn detail::tvec2<T, defaultp>(\r\n\t\t\tnoise1(x + T(0.0)),\r\n\t\t\tnoise1(x + T(1.0)));\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, defaultp> noise3(T const & x)\r\n\t{\r\n\t\treturn detail::tvec3<T, defaultp>(\r\n\t\t\tnoise1(x - T(1.0)),\r\n\t\t\tnoise1(x + T(0.0)),\r\n\t\t\tnoise1(x + T(1.0)));\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, defaultp> noise4(T const & x)\r\n\t{\r\n\t\treturn detail::tvec4<T, defaultp>(\r\n\t\t\tnoise1(x - T(1.0)),\r\n\t\t\tnoise1(x + T(0.0)),\r\n\t\t\tnoise1(x + T(1.0)),\r\n\t\t\tnoise1(x + T(2.0)));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T noise1(detail::tvec2<T, P> const & v)\r\n\t{\r\n\t\tdetail::tvec4<T, P> const C = detail::tvec4<T, P>(\r\n\t\t\tT( 0.211324865405187),\t\t// (3.0 -  sqrt(3.0)) / 6.0\r\n\t\t\tT( 0.366025403784439),\t\t//  0.5 * (sqrt(3.0)  - 1.0)\r\n\t\t\tT(-0.577350269189626),\t\t// -1.0 + 2.0 * C.x\r\n\t\t\tT( 0.024390243902439));\t\t//  1.0 / 41.0\r\n\t\t\r\n\t\t// First corner\r\n\t\tdetail::tvec2<T, P> i  = floor(v + dot(v, detail::tvec2<T, P>(C[1])));\r\n\t\tdetail::tvec2<T, P> x0 = v -   i + dot(i, detail::tvec2<T, P>(C[0]));\r\n\t\t\r\n\t\t// Other corners\r\n\t\t//i1.x = step( x0.y, x0.x ); // x0.x > x0.y ? 1.0 : 0.0\r\n\t\t//i1.y = 1.0 - i1.x;\r\n\t\tdetail::tvec2<T, P> i1 = (x0.x > x0.y) ? detail::tvec2<T, P>(1, 0) : detail::tvec2<T, P>(0, 1);\r\n\r\n\t\t// x0 = x0 - 0.0 + 0.0 * C.xx ;\r\n\t\t// x1 = x0 - i1 + 1.0 * C.xx ;\r\n\t\t// x2 = x0 - 1.0 + 2.0 * C.xx ;\r\n\t\tdetail::tvec4<T, P> x12 = detail::tvec4<T, P>(x0.x, x0.y, x0.x, x0.y) + detail::tvec4<T, P>(C.x, C.x, C.z, C.z);\r\n\t\tx12 = detail::tvec4<T, P>(detail::tvec2<T, P>(x12) - i1, x12.z, x12.w);\r\n\t\t\r\n\t\t// Permutations\r\n\t\ti = mod(i, T(289)); // Avoid truncation effects in permutation\r\n\t\tdetail::tvec3<T, P> p = detail::permute(\r\n\t\t\tdetail::permute(i.y + detail::tvec3<T, P>(T(0), i1.y, T(1))) + i.x + detail::tvec3<T, P>(T(0), i1.x, T(1)));\r\n\t\t\r\n\t\tdetail::tvec3<T, P> m = max(T(0.5) - detail::tvec3<T, P>(\r\n\t\t\tdot(x0, x0),\r\n\t\t\tdot(detail::tvec2<T, P>(x12.x, x12.y), detail::tvec2<T, P>(x12.x, x12.y)),\r\n\t\t\tdot(detail::tvec2<T, P>(x12.z, x12.w), detail::tvec2<T, P>(x12.z, x12.w))), T(0));\r\n\t\t\r\n\t\tm = m * m;\r\n\t\tm = m * m;\r\n\t\t\r\n\t\t// Gradients: 41 points uniformly over a line, mapped onto a diamond.\r\n\t\t// The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287)\r\n\t\t\r\n\t\tdetail::tvec3<T, P> x = static_cast<T>(2) * fract(p * C.w) - T(1);\r\n\t\tdetail::tvec3<T, P> h = abs(x) - T(0.5);\r\n\t\tdetail::tvec3<T, P> ox = floor(x + T(0.5));\r\n\t\tdetail::tvec3<T, P> a0 = x - ox;\r\n\t\t\r\n\t\t// Normalise gradients implicitly by scaling m\r\n\t\t// Inlined for speed: m *= taylorInvSqrt( a0*a0 + h*h );\r\n\t\tm *= static_cast<T>(1.79284291400159) - T(0.85373472095314) * (a0 * a0 + h * h);\r\n\t\t\r\n\t\t// Compute final noise value at P\r\n\t\tdetail::tvec3<T, P> g;\r\n\t\tg.x  = a0.x  * x0.x  + h.x  * x0.y;\r\n\t\t//g.yz = a0.yz * x12.xz + h.yz * x12.yw;\r\n\t\tg.y = a0.y * x12.x + h.y * x12.y;\r\n\t\tg.z = a0.z * x12.z + h.z * x12.w;\r\n\t\treturn T(130) * dot(m, g);\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T noise1(detail::tvec3<T, P> const & v)\r\n\t{\r\n\t\tdetail::tvec2<T, P> const C(1.0 / 6.0, 1.0 / 3.0);\r\n\t\tdetail::tvec4<T, P> const D(0.0, 0.5, 1.0, 2.0);\r\n\t\t\r\n\t\t// First corner\r\n\t\tdetail::tvec3<T, P> i(floor(v + dot(v, detail::tvec3<T, P>(C.y))));\r\n\t\tdetail::tvec3<T, P> x0(v - i + dot(i, detail::tvec3<T, P>(C.x)));\r\n\t\t\r\n\t\t// Other corners\r\n\t\tdetail::tvec3<T, P> g(step(detail::tvec3<T, P>(x0.y, x0.z, x0.x), x0));\r\n\t\tdetail::tvec3<T, P> l(T(1) - g);\r\n\t\tdetail::tvec3<T, P> i1(min(g, detail::tvec3<T, P>(l.z, l.x, l.y)));\r\n\t\tdetail::tvec3<T, P> i2(max(g, detail::tvec3<T, P>(l.z, l.x, l.y)));\r\n\t\t\r\n\t\t// x0 = x0 - 0.0 + 0.0 * C.xxx;\r\n\t\t// x1 = x0 - i1  + 1.0 * C.xxx;\r\n\t\t// x2 = x0 - i2  + 2.0 * C.xxx;\r\n\t\t// x3 = x0 - 1.0 + 3.0 * C.xxx;\r\n\t\tdetail::tvec3<T, P> x1(x0 - i1 + C.x);\r\n\t\tdetail::tvec3<T, P> x2(x0 - i2 + C.y);\t\t// 2.0*C.x = 1/3 = C.y\r\n\t\tdetail::tvec3<T, P> x3(x0 - D.y);\t\t\t// -1.0+3.0*C.x = -0.5 = -D.y\r\n\t\t\r\n\t\t// Permutations\r\n\t\ti = mod289(i); \r\n\t\tdetail::tvec4<T, P> p(detail::permute(detail::permute(detail::permute(\r\n\t\t\ti.z + detail::tvec4<T, P>(T(0), i1.z, i2.z, T(1))) +\r\n\t\t\ti.y + detail::tvec4<T, P>(T(0), i1.y, i2.y, T(1))) +\r\n\t\t\ti.x + detail::tvec4<T, P>(T(0), i1.x, i2.x, T(1))));\r\n\t\t\r\n\t\t// Gradients: 7x7 points over a square, mapped onto an octahedron.\r\n\t\t// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\r\n\t\tT n_ = static_cast<T>(0.142857142857); // 1.0/7.0\r\n\t\tdetail::tvec3<T, P> ns(n_ * detail::tvec3<T, P>(D.w, D.y, D.z) - detail::tvec3<T, P>(D.x, D.z, D.x));\r\n\t\t\r\n\t\tdetail::tvec4<T, P> j(p - T(49) * floor(p * ns.z * ns.z));\t// mod(p,7*7)\r\n\t\t\r\n\t\tdetail::tvec4<T, P> x_(floor(j * ns.z));\r\n\t\tdetail::tvec4<T, P> y_(floor(j - T(7) * x_));\t\t\t\t// mod(j,N)\r\n\t\t\r\n\t\tdetail::tvec4<T, P> x(x_ * ns.x + ns.y);\r\n\t\tdetail::tvec4<T, P> y(y_ * ns.x + ns.y);\r\n\t\tdetail::tvec4<T, P> h(T(1) - abs(x) - abs(y));\r\n\t\t\r\n\t\tdetail::tvec4<T, P> b0(x.x, x.y, y.x, y.y);\r\n\t\tdetail::tvec4<T, P> b1(x.z, x.w, y.z, y.w);\r\n\t\t\r\n\t\t// vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\r\n\t\t// vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\r\n\t\tdetail::tvec4<T, P> s0(floor(b0) * T(2) + T(1));\r\n\t\tdetail::tvec4<T, P> s1(floor(b1) * T(2) + T(1));\r\n\t\tdetail::tvec4<T, P> sh(-step(h, detail::tvec4<T, P>(0.0)));\r\n\t\t\r\n\t\tdetail::tvec4<T, P> a0 = detail::tvec4<T, P>(b0.x, b0.z, b0.y, b0.w) + detail::tvec4<T, P>(s0.x, s0.z, s0.y, s0.w) * detail::tvec4<T, P>(sh.x, sh.x, sh.y, sh.y);\r\n\t\tdetail::tvec4<T, P> a1 = detail::tvec4<T, P>(b1.x, b1.z, b1.y, b1.w) + detail::tvec4<T, P>(s1.x, s1.z, s1.y, s1.w) * detail::tvec4<T, P>(sh.z, sh.z, sh.w, sh.w);\r\n\t\t\r\n\t\tdetail::tvec3<T, P> p0(a0.x, a0.y, h.x);\r\n\t\tdetail::tvec3<T, P> p1(a0.z, a0.w, h.y);\r\n\t\tdetail::tvec3<T, P> p2(a1.x, a1.y, h.z);\r\n\t\tdetail::tvec3<T, P> p3(a1.z, a1.w, h.w);\r\n\t\t\r\n\t\t// Normalise gradients\r\n\t\tdetail::tvec4<T, P> norm = taylorInvSqrt(detail::tvec4<T, P>(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3)));\r\n\t\tp0 *= norm.x;\r\n\t\tp1 *= norm.y;\r\n\t\tp2 *= norm.z;\r\n\t\tp3 *= norm.w;\r\n\t\t\r\n\t\t// Mix final noise value\r\n\t\tdetail::tvec4<T, P> m = max(T(0.6) - detail::tvec4<T, P>(dot(x0, x0), dot(x1, x1), dot(x2, x2), dot(x3, x3)), T(0));\r\n\t\tm = m * m;\r\n\t\treturn T(42) * dot(m * m, detail::tvec4<T, P>(dot(p0, x0), dot(p1, x1), dot(p2, x2), dot(p3, x3)));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T noise1(detail::tvec4<T, P> const & v)\r\n\t{\r\n\t\tdetail::tvec4<T, P> const C(\r\n\t\t\t0.138196601125011,\t\t// (5 - sqrt(5))/20  G4\r\n\t\t\t0.276393202250021,\t\t// 2 * G4\r\n\t\t\t0.414589803375032,\t\t// 3 * G4\r\n\t\t\t-0.447213595499958);\t// -1 + 4 * G4\r\n\t\t\r\n\t\t// (sqrt(5) - 1)/4 = F4, used once below\r\n\t\tT const F4 = static_cast<T>(0.309016994374947451);\r\n\t\t\r\n\t\t// First corner\r\n\t\tdetail::tvec4<T, P> i  = floor(v + dot(v, detail::tvec4<T, P>(F4)));\r\n\t\tdetail::tvec4<T, P> x0 = v -   i + dot(i, detail::tvec4<T, P>(C.x));\r\n\t\t\r\n\t\t// Other corners\r\n\t\t\r\n\t\t// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)\r\n\t\tdetail::tvec4<T, P> i0;\r\n\t\tdetail::tvec3<T, P> isX = step(detail::tvec3<T, P>(x0.y, x0.z, x0.w), detail::tvec3<T, P>(x0.x));\r\n\t\tdetail::tvec3<T, P> isYZ = step(detail::tvec3<T, P>(x0.z, x0.w, x0.w), detail::tvec3<T, P>(x0.y, x0.y, x0.z));\r\n\t\t\r\n\t\t//  i0.x = dot(isX, vec3(1.0));\r\n\t\t//i0.x = isX.x + isX.y + isX.z;\r\n\t\t//i0.yzw = static_cast<T>(1) - isX;\r\n\t\ti0 = detail::tvec4<T, P>(isX.x + isX.y + isX.z, T(1) - isX);\r\n\t\t\r\n\t\t//  i0.y += dot(isYZ.xy, vec2(1.0));\r\n\t\ti0.y += isYZ.x + isYZ.y;\r\n\t\t\r\n\t\t//i0.zw += 1.0 - detail::tvec2<T, P>(isYZ.x, isYZ.y);\r\n\t\ti0.z += static_cast<T>(1) - isYZ.x;\r\n\t\ti0.w += static_cast<T>(1) - isYZ.y;\r\n\t\ti0.z += isYZ.z;\r\n\t\ti0.w += static_cast<T>(1) - isYZ.z;\r\n\t\t\r\n\t\t// i0 now contains the unique values 0,1,2,3 in each channel\r\n\t\tdetail::tvec4<T, P> i3 = clamp(i0, T(0), T(1));\r\n\t\tdetail::tvec4<T, P> i2 = clamp(i0 - T(1), T(0), T(1));\r\n\t\tdetail::tvec4<T, P> i1 = clamp(i0 - T(2), T(0), T(1));\r\n\t\t\r\n\t\t//  x0 = x0 - 0.0 + 0.0 * C.xxxx\r\n\t\t//  x1 = x0 - i1  + 0.0 * C.xxxx\r\n\t\t//  x2 = x0 - i2  + 0.0 * C.xxxx\r\n\t\t//  x3 = x0 - i3  + 0.0 * C.xxxx\r\n\t\t//  x4 = x0 - 1.0 + 4.0 * C.xxxx\r\n\t\tdetail::tvec4<T, P> x1 = x0 - i1 + C.x;\r\n\t\tdetail::tvec4<T, P> x2 = x0 - i2 + C.y;\r\n\t\tdetail::tvec4<T, P> x3 = x0 - i3 + C.z;\r\n\t\tdetail::tvec4<T, P> x4 = x0 + C.w;\r\n\t\t\r\n\t\t// Permutations\r\n\t\ti = mod(i, T(289));\r\n\t\tT j0 = detail::permute(detail::permute(detail::permute(detail::permute(i.w) + i.z) + i.y) + i.x);\r\n\t\tdetail::tvec4<T, P> j1 = detail::permute(detail::permute(detail::permute(detail::permute(\r\n\t\t\ti.w + detail::tvec4<T, P>(i1.w, i2.w, i3.w, T(1))) +\r\n\t\t\ti.z + detail::tvec4<T, P>(i1.z, i2.z, i3.z, T(1))) +\r\n\t\t\ti.y + detail::tvec4<T, P>(i1.y, i2.y, i3.y, T(1))) +\r\n\t\t\ti.x + detail::tvec4<T, P>(i1.x, i2.x, i3.x, T(1)));\r\n\t\t\r\n\t\t// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope\r\n\t\t// 7*7*6 = 294, which is close to the ring size 17*17 = 289.\r\n\t\tdetail::tvec4<T, P> ip = detail::tvec4<T, P>(T(1) / T(294), T(1) / T(49), T(1) / T(7), T(0));\r\n\t\t\r\n\t\tdetail::tvec4<T, P> p0 = detail::grad4(j0,   ip);\r\n\t\tdetail::tvec4<T, P> p1 = detail::grad4(j1.x, ip);\r\n\t\tdetail::tvec4<T, P> p2 = detail::grad4(j1.y, ip);\r\n\t\tdetail::tvec4<T, P> p3 = detail::grad4(j1.z, ip);\r\n\t\tdetail::tvec4<T, P> p4 = detail::grad4(j1.w, ip);\r\n\t\t\r\n\t\t// Normalise gradients\r\n\t\tdetail::tvec4<T, P> norm = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3)));\r\n\t\tp0 *= norm.x;\r\n\t\tp1 *= norm.y;\r\n\t\tp2 *= norm.z;\r\n\t\tp3 *= norm.w;\r\n\t\tp4 *= taylorInvSqrt(dot(p4, p4));\r\n\t\t\r\n\t\t// Mix contributions from the five corners\r\n\t\tdetail::tvec3<T, P> m0 = max(T(0.6) - detail::tvec3<T, P>(dot(x0, x0), dot(x1, x1), dot(x2, x2)), T(0));\r\n\t\tdetail::tvec2<T, P> m1 = max(T(0.6) - detail::tvec2<T, P>(dot(x3, x3), dot(x4, x4)             ), T(0));\r\n\t\tm0 = m0 * m0;\r\n\t\tm1 = m1 * m1;\r\n\t\t\r\n\t\treturn T(49) * (\r\n\t\t\tdot(m0 * m0, detail::tvec3<T, P>(dot(p0, x0), dot(p1, x1), dot(p2, x2))) +\r\n\t\t\tdot(m1 * m1, detail::tvec2<T, P>(dot(p3, x3), dot(p4, x4))));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> noise2(detail::tvec2<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tnoise1(x + detail::tvec2<T, P>(0.0)),\r\n\t\t\tnoise1(detail::tvec2<T, P>(0.0) - x));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> noise2(detail::tvec3<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tnoise1(x + detail::tvec3<T, P>(0.0)),\r\n\t\t\tnoise1(detail::tvec3<T, P>(0.0) - x));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> noise2(detail::tvec4<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tnoise1(x + detail::tvec4<T, P>(0)),\r\n\t\t\tnoise1(detail::tvec4<T, P>(0) - x));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> noise3(detail::tvec2<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tnoise1(x - detail::tvec2<T, P>(1.0)),\r\n\t\t\tnoise1(x + detail::tvec2<T, P>(0.0)),\r\n\t\t\tnoise1(x + detail::tvec2<T, P>(1.0)));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> noise3(detail::tvec3<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tnoise1(x - detail::tvec3<T, P>(1.0)),\r\n\t\t\tnoise1(x + detail::tvec3<T, P>(0.0)),\r\n\t\t\tnoise1(x + detail::tvec3<T, P>(1.0)));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> noise3(detail::tvec4<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tnoise1(x - detail::tvec4<T, P>(1)),\r\n\t\t\tnoise1(x + detail::tvec4<T, P>(0)),\r\n\t\t\tnoise1(x + detail::tvec4<T, P>(1)));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> noise4(detail::tvec2<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tnoise1(x - detail::tvec2<T, P>(1)),\r\n\t\t\tnoise1(x + detail::tvec2<T, P>(0)),\r\n\t\t\tnoise1(x + detail::tvec2<T, P>(1)),\r\n\t\t\tnoise1(x + detail::tvec2<T, P>(2)));\r\n\t}\r\n\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> noise4(detail::tvec3<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tnoise1(x - detail::tvec3<T, P>(1)),\r\n\t\t\tnoise1(x + detail::tvec3<T, P>(0)),\r\n\t\t\tnoise1(x + detail::tvec3<T, P>(1)),\r\n\t\t\tnoise1(x + detail::tvec3<T, P>(2)));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> noise4(detail::tvec4<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tnoise1(x - detail::tvec4<T, P>(1)),\r\n\t\t\tnoise1(x + detail::tvec4<T, P>(0)),\r\n\t\t\tnoise1(x + detail::tvec4<T, P>(1)),\r\n\t\t\tnoise1(x + detail::tvec4<T, P>(2)));\r\n\t}\r\n\t\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/detail/func_packing.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_packing.hpp\r\n/// @date 2010-03-17 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///\r\n/// @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>\r\n/// \r\n/// @defgroup core_func_packing Floating-Point Pack and Unpack Functions\r\n/// @ingroup core\r\n/// \r\n/// These functions do not operate component-wise, rather as described in each case.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_CORE_func_packing\r\n#define GLM_CORE_func_packing\r\n\r\n#include \"type_vec2.hpp\"\r\n#include \"type_vec4.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup core_func_packing\r\n\t/// @{\r\n\r\n\t/// First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. \r\n\t/// Then, the results are packed into the returned 32-bit unsigned integer.\r\n\t/// \r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packUnorm2x16: round(clamp(c, 0, +1) * 65535.0) \r\n\t/// \r\n\t/// The first component of the vector will be written to the least significant bits of the output; \r\n\t/// the last component will be written to the most significant bits.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm2x16.xml\">GLSL packUnorm2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint packUnorm2x16(vec2 const & v);\r\n\r\n\t/// First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. \r\n\t/// Then, the results are packed into the returned 32-bit unsigned integer.\r\n\t/// \r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packSnorm2x16: round(clamp(v, -1, +1) * 32767.0)\r\n\t/// \r\n\t/// The first component of the vector will be written to the least significant bits of the output; \r\n\t/// the last component will be written to the most significant bits.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm2x16.xml\">GLSL packSnorm2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint packSnorm2x16(vec2 const & v);\r\n\r\n\t/// First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. \r\n\t/// Then, the results are packed into the returned 32-bit unsigned integer.\r\n\t/// \r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packUnorm4x8:\tround(clamp(c, 0, +1) * 255.0)\r\n\t/// \r\n\t/// The first component of the vector will be written to the least significant bits of the output; \r\n\t/// the last component will be written to the most significant bits.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml\">GLSL packUnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint packUnorm4x8(vec4 const & v);\r\n\r\n\t/// First, converts each component of the normalized floating-point value v into 8- or 16-bit integer values. \r\n\t/// Then, the results are packed into the returned 32-bit unsigned integer.\r\n\t/// \r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packSnorm4x8:\tround(clamp(c, -1, +1) * 127.0) \r\n\t/// \r\n\t/// The first component of the vector will be written to the least significant bits of the output; \r\n\t/// the last component will be written to the most significant bits.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml\">GLSL packSnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint packSnorm4x8(vec4 const & v);\r\n\r\n\t/// 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. \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackUnorm2x16: f / 65535.0 \r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml\">GLSL unpackUnorm2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL vec2 unpackUnorm2x16(uint const & p);\r\n\r\n\t/// 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. \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackSnorm2x16: clamp(f / 32767.0, -1, +1)\r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm2x16.xml\">GLSL unpackSnorm2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL vec2 unpackSnorm2x16(uint const & p);\r\n\r\n\t/// 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. \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackUnorm4x8: f / 255.0\r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml\">GLSL unpackUnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL vec4 unpackUnorm4x8(uint const & p);\r\n\r\n\t/// 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. \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned two- or four-component vector.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackSnorm4x8: clamp(f / 127.0, -1, +1)\r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml\">GLSL unpackSnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL vec4 unpackSnorm4x8(uint const & p);\r\n\r\n\t/// Returns a double-precision value obtained by packing the components of v into a 64-bit value. \r\n\t/// If an IEEE 754 Inf or NaN is created, it will not signal, and the resulting floating point value is unspecified. \r\n\t/// Otherwise, the bit- level representation of v is preserved. \r\n\t/// The first vector component specifies the 32 least significant bits; \r\n\t/// the second component specifies the 32 most significant bits.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packDouble2x32.xml\">GLSL packDouble2x32 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL double packDouble2x32(uvec2 const & v);\r\n\r\n\t/// Returns a two-component unsigned integer vector representation of v. \r\n\t/// The bit-level representation of v is preserved. \r\n\t/// The first component of the vector contains the 32 least significant bits of the double; \r\n\t/// the second component consists the 32 most significant bits.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackDouble2x32.xml\">GLSL unpackDouble2x32 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uvec2 unpackDouble2x32(double const & v);\r\n\r\n\t/// Returns an unsigned integer obtained by converting the components of a two-component floating-point vector \r\n\t/// to the 16-bit floating-point representation found in the OpenGL Specification, \r\n\t/// and then packing these two 16- bit integers into a 32-bit unsigned integer.\r\n\t/// The first vector component specifies the 16 least-significant bits of the result; \r\n\t/// the second component specifies the 16 most-significant bits.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml\">GLSL packHalf2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint packHalf2x16(vec2 const & v);\r\n\t\r\n\t/// Returns a two-component floating-point vector with components obtained by unpacking a 32-bit unsigned integer into a pair of 16-bit values, \r\n\t/// interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification, \r\n\t/// and converting them to 32-bit floating-point values.\r\n\t/// The first component of the vector is obtained from the 16 least-significant bits of v; \r\n\t/// the second component is obtained from the 16 most-significant bits of v.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml\">GLSL unpackHalf2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL vec2 unpackHalf2x16(uint const & v);\r\n\t\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"func_packing.inl\"\r\n\r\n#endif//GLM_CORE_func_packing\r\n"
  },
  {
    "path": "gpu/glm/detail/func_packing.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_packing.inl\r\n/// @date 2010-03-17 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"func_common.hpp\"\r\n#include \"type_half.hpp\"\r\n#include \"../fwd.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\tGLM_FUNC_QUALIFIER uint packUnorm2x16(vec2 const & v)\r\n\t{\r\n\t\tu16vec2 Topack(round(clamp(v, 0.0f, 1.0f) * 65535.0f));\r\n\t\treturn reinterpret_cast<uint&>(Topack);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER vec2 unpackUnorm2x16(uint const & p)\r\n\t{\r\n\t\tvec2 Unpack(reinterpret_cast<u16vec2 const &>(p));\r\n\t\treturn Unpack * float(1.5259021896696421759365224689097e-5); // 1.0 / 65535.0\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint packSnorm2x16(vec2 const & v)\r\n\t{\r\n\t\ti16vec2 Topack(round(clamp(v ,-1.0f, 1.0f) * 32767.0f));\r\n\t\treturn reinterpret_cast<uint32&>(Topack);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER vec2 unpackSnorm2x16(uint const & p)\r\n\t{\r\n\t\tvec2 Unpack(reinterpret_cast<i16vec2 const &>(p));\r\n\t\treturn clamp(\r\n\t\t\tUnpack * 3.0518509475997192297128208258309e-5f, //1.0f / 32767.0f,\r\n\t\t\t-1.0f, 1.0f);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint packUnorm4x8(vec4 const & v)\r\n\t{\r\n\t\tu8vec4 Topack(round(clamp(v, 0.0f, 1.0f) * 255.0f));\r\n\t\treturn reinterpret_cast<uint&>(Topack);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER vec4 unpackUnorm4x8(uint const & p)\r\n\t{\r\n\t\tvec4 Unpack(reinterpret_cast<u8vec4 const&>(p));\r\n\t\treturn Unpack * float(0.0039215686274509803921568627451); // 1 / 255\r\n\t}\r\n\t\r\n\tGLM_FUNC_QUALIFIER uint packSnorm4x8(vec4 const & v)\r\n\t{\r\n\t\ti8vec4 Topack(round(clamp(v ,-1.0f, 1.0f) * 127.0f));\r\n\t\treturn reinterpret_cast<uint&>(Topack);\r\n\t}\r\n\t\r\n\tGLM_FUNC_QUALIFIER glm::vec4 unpackSnorm4x8(uint const & p)\r\n\t{\r\n\t\tvec4 Unpack(reinterpret_cast<i8vec4 const &>(p));\r\n\t\treturn clamp(\r\n\t\t\tUnpack * 0.0078740157480315f, // 1.0f / 127.0f\r\n\t\t\t-1.0f, 1.0f);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER double packDouble2x32(uvec2 const & v)\r\n\t{\r\n\t\treturn reinterpret_cast<double const &>(v);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uvec2 unpackDouble2x32(double const & v)\r\n\t{\r\n\t\treturn reinterpret_cast<uvec2 const &>(v);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint packHalf2x16(vec2 const & v)\r\n\t{\r\n\t\ti16vec2 Unpack(\r\n\t\t\tdetail::toFloat16(v.x),\r\n\t\t\tdetail::toFloat16(v.y));\r\n\r\n\t\tuint * Result = reinterpret_cast<uint*>(&Unpack);\r\n\t\treturn *Result;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER vec2 unpackHalf2x16(uint const & v)\r\n\t{\r\n\t\ti16vec2 Unpack(reinterpret_cast<i16vec2 const &>(v));\r\n\t\r\n\t\treturn vec2(\r\n\t\t\tdetail::toFloat32(Unpack.x), \r\n\t\t\tdetail::toFloat32(Unpack.y));\r\n\t}\r\n}//namespace glm\r\n\r\n"
  },
  {
    "path": "gpu/glm/detail/func_trigonometric.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_trigonometric.hpp\r\n/// @date 2008-08-01 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///\r\n/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n/// \r\n/// @defgroup core_func_trigonometric Angle and Trigonometry Functions\r\n/// @ingroup core\r\n/// \r\n/// Function parameters specified as angle are assumed to be in units of radians. \r\n/// In no case will any of these functions result in a divide by zero error. If \r\n/// the divisor of a ratio is 0, then results will be undefined.\r\n/// \r\n/// These all operate component-wise. The description is per component.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_CORE_func_trigonometric\r\n#define GLM_CORE_func_trigonometric\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup core_func_trigonometric\r\n\t/// @{\r\n\r\n\t/// Converts degrees to radians and returns the result.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/radians.xml\">GLSL radians man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType radians(genType const & degrees);\r\n\r\n\t/// Converts radians to degrees and returns the result.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/degrees.xml\">GLSL degrees man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType degrees(genType const & radians);\r\n\r\n\t/// The standard trigonometric sine function. \r\n\t/// The values returned by this function will range from [-1, 1].\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/sin.xml\">GLSL sin man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType sin(genType const & angle);\r\n\r\n\t/// The standard trigonometric cosine function. \r\n\t/// The values returned by this function will range from [-1, 1].\r\n\t/// \r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/cos.xml\">GLSL cos man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType cos(genType const & angle);\r\n\r\n\t/// The standard trigonometric tangent function.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/tan.xml\">GLSL tan man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType tan(genType const & angle); \r\n\r\n\t/// Arc sine. Returns an angle whose sine is x. \r\n\t/// The range of values returned by this function is [-PI/2, PI/2]. \r\n\t/// Results are undefined if |x| > 1.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/asin.xml\">GLSL asin man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType asin(genType const & x);\r\n\r\n\t/// Arc cosine. Returns an angle whose sine is x. \r\n\t/// The range of values returned by this function is [0, PI]. \r\n\t/// Results are undefined if |x| > 1.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/acos.xml\">GLSL acos man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType acos(genType const & x);\r\n\r\n\t/// Arc tangent. Returns an angle whose tangent is y/x. \r\n\t/// The signs of x and y are used to determine what \r\n\t/// quadrant the angle is in. The range of values returned \r\n\t/// by this function is [-PI, PI]. Results are undefined \r\n\t/// if x and y are both 0. \r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/atan.xml\">GLSL atan man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType atan(genType const & y, genType const & x);\r\n\r\n\t/// Arc tangent. Returns an angle whose tangent is y_over_x. \r\n\t/// The range of values returned by this function is [-PI/2, PI/2].\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/atan.xml\">GLSL atan man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType atan(genType const & y_over_x);\r\n\r\n\t/// Returns the hyperbolic sine function, (exp(x) - exp(-x)) / 2\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/sinh.xml\">GLSL sinh man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType sinh(genType const & angle);\r\n\r\n\t/// Returns the hyperbolic cosine function, (exp(x) + exp(-x)) / 2\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/cosh.xml\">GLSL cosh man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType cosh(genType const & angle);\r\n\r\n\t/// Returns the hyperbolic tangent function, sinh(angle) / cosh(angle)\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/tanh.xml\">GLSL tanh man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType tanh(genType const & angle);\r\n\r\n\t/// Arc hyperbolic sine; returns the inverse of sinh.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/asinh.xml\">GLSL asinh man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType asinh(genType const & x);\r\n\t\r\n\t/// Arc hyperbolic cosine; returns the non-negative inverse\r\n\t/// of cosh. Results are undefined if x < 1.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/acosh.xml\">GLSL acosh man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType acosh(genType const & x);\r\n\r\n\t/// Arc hyperbolic tangent; returns the inverse of tanh.\r\n\t/// Results are undefined if abs(x) >= 1.\r\n\t///\r\n\t/// @tparam genType Floating-point scalar or vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/atanh.xml\">GLSL atanh man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.1 Angle and Trigonometry Functions</a>\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType atanh(genType const & x);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"func_trigonometric.inl\"\r\n\r\n#endif//GLM_CORE_func_trigonometric\r\n\r\n\r\n"
  },
  {
    "path": "gpu/glm/detail/func_trigonometric.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_trigonometric.inl\r\n/// @date 2008-08-03 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"_vectorize.hpp\"\r\n#include <cmath>\r\n#include <limits>\r\n\r\nnamespace glm\r\n{\r\n\t// radians\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType radians\r\n\t(\r\n\t\tgenType const & degrees\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'radians' only accept floating-point input\");\r\n\r\n\t\treturn degrees * genType(0.01745329251994329576923690768489);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(radians)\r\n\t\r\n\t// degrees\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType degrees\r\n\t(\r\n\t\tgenType const & radians\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'degrees' only accept floating-point input\");\r\n\r\n\t\treturn radians * genType(57.295779513082320876798154814105);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(degrees)\r\n\r\n\t// sin\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType sin\r\n\t(\r\n\t\tgenType const & angle\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'sin' only accept floating-point input\");\r\n\r\n\t\treturn genType(::std::sin(angle));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(sin)\r\n\r\n\t// cos\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType cos(genType const & angle)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'cos' only accept floating-point input\");\r\n\r\n\t\treturn genType(::std::cos(angle));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(cos)\r\n\r\n\t// tan\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType tan\r\n\t(\r\n\t\tgenType const & angle\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'tan' only accept floating-point input\");\r\n\r\n\t\treturn genType(::std::tan(angle));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(tan)\r\n\r\n\t// asin\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType asin\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'asin' only accept floating-point input\");\r\n\r\n\t\treturn genType(::std::asin(x));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(asin)\r\n\r\n\t// acos\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType acos\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'acos' only accept floating-point input\");\r\n\r\n\t\treturn genType(::std::acos(x));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(acos)\r\n\r\n\t// atan\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType atan\r\n\t(\r\n\t\tgenType const & y, \r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'atan' only accept floating-point input\");\r\n\r\n\t\treturn genType(::std::atan2(y, x));\r\n\t}\r\n\r\n\tVECTORIZE_VEC_VEC(atan)\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType atan\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'atan' only accept floating-point input\");\r\n\r\n\t\treturn genType(::std::atan(x));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(atan)\r\n\r\n\t// sinh\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType sinh\r\n\t(\r\n\t\tgenType const & angle\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'sinh' only accept floating-point input\");\r\n\r\n\t\treturn genType(std::sinh(angle));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(sinh)\r\n\r\n\t// cosh\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType cosh\r\n\t(\r\n\t\tgenType const & angle\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'cosh' only accept floating-point input\");\r\n\r\n\t\treturn genType(std::cosh(angle));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(cosh)\r\n\r\n\t// tanh\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType tanh\r\n\t(\r\n\t\tgenType const & angle\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'tanh' only accept floating-point input\");\r\n\r\n\t\treturn genType(std::tanh(angle));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(tanh)\r\n\r\n\t// asinh\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType asinh\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'asinh' only accept floating-point input\");\r\n\t\t\r\n\t\treturn (x < genType(0) ? genType(-1) : (x > genType(0) ? genType(1) : genType(0))) * log(abs(x) + sqrt(genType(1) + x * x));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(asinh)\r\n\r\n\t// acosh\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType acosh\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'acosh' only accept floating-point input\");\r\n\r\n\t\tif(x < genType(1))\r\n\t\t\treturn genType(0);\r\n\t\treturn log(x + sqrt(x * x - genType(1)));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(acosh)\r\n\r\n\t// atanh\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType atanh\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'atanh' only accept floating-point input\");\r\n\t\t\r\n\t\tif(abs(x) >= genType(1))\r\n\t\t\treturn 0;\r\n\t\treturn genType(0.5) * log((genType(1) + x) / (genType(1) - x));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(atanh)\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/detail/func_vector_relational.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_vector_relational.hpp\r\n/// @date 2008-08-03 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///\r\n/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>\r\n/// \r\n/// @defgroup core_func_vector_relational Vector Relational Functions\r\n/// @ingroup core\r\n/// \r\n/// Relational and equality operators (<, <=, >, >=, ==, !=) are defined to \r\n/// operate on scalars and produce scalar Boolean results. For vector results, \r\n/// use the following built-in functions. \r\n/// \r\n/// In all cases, the sizes of all the input and return vectors for any particular \r\n/// call must match.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_CORE_func_vector_relational\r\n#define GLM_CORE_func_vector_relational\r\n\r\n#include \"precision.hpp\"\r\n#include \"setup.hpp\"\r\n\r\n#if !((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER <= GLM_COMPILER_VC10)) // Workaround a Visual C++ bug\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup core_func_vector_relational\r\n\t/// @{\r\n\r\n\t/// Returns the component-wise comparison result of x < y.\r\n\t/// \r\n\t/// @tparam vecType Floating-point or integer vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThan.xml\">GLSL lessThan man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>\r\n\t// TODO: Mismatched \r\n\t//template <typename T, precision P, template <typename, precision> class vecType>\r\n\t//GLM_FUNC_DECL typename vecType<T, P>::bool_type lessThan(vecType<T, P> const & x, vecType<T, P> const & y);\r\n\r\n\t/// Returns the component-wise comparison of result x <= y.\r\n\t///\r\n\t/// @tparam vecType Floating-point or integer vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/lessThanEqual.xml\">GLSL lessThanEqual man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL typename vecType<T, P>::bool_type lessThanEqual(vecType<T, P> const & x, vecType<T, P> const & y);\r\n\r\n\t/// Returns the component-wise comparison of result x > y.\r\n\t///\r\n\t/// @tparam vecType Floating-point or integer vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThan.xml\">GLSL greaterThan man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL typename vecType<T, P>::bool_type greaterThan(vecType<T, P> const & x, vecType<T, P> const & y);\r\n\r\n\t/// Returns the component-wise comparison of result x >= y.\r\n\t///\r\n\t/// @tparam vecType Floating-point or integer vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/greaterThanEqual.xml\">GLSL greaterThanEqual man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL typename vecType<T, P>::bool_type greaterThanEqual(vecType<T, P> const & x, vecType<T, P> const & y);\r\n\r\n\t/// Returns the component-wise comparison of result x == y.\r\n\t///\r\n\t/// @tparam vecType Floating-point, integer or boolean vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/equal.xml\">GLSL equal man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>\r\n\t//TODO: conflicts with definision\r\n\t//template <typename T, precision P, template <typename, precision> class vecType>\r\n\t//GLM_FUNC_DECL typename vecType<T, P>::bool_type equal(vecType<T, P> const & x, vecType<T, P> const & y);\r\n\r\n\t/// Returns the component-wise comparison of result x != y.\r\n\t/// \r\n\t/// @tparam vecType Floating-point, integer or boolean vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/notEqual.xml\">GLSL notEqual man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL typename vecType<T, P>::bool_type notEqual(vecType<T, P> const & x, vecType<T, P> const & y);\r\n\r\n\t/// Returns true if any component of x is true.\r\n\t///\r\n\t/// @tparam vecType Boolean vector types.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/any.xml\">GLSL any man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>\r\n\ttemplate <precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL bool any(vecType<bool, P> const & v);\r\n\r\n\t/// Returns true if all components of x are true.\r\n\t///\r\n\t/// @tparam vecType Boolean vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/all.xml\">GLSL all man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>\r\n\ttemplate <precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL bool all(vecType<bool, P> const & v);\r\n\r\n\t/// Returns the component-wise logical complement of x.\r\n\t/// /!\\ Because of language incompatibilities between C++ and GLSL, GLM defines the function not but not_ instead.\r\n\t///\r\n\t/// @tparam vecType Boolean vector types.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/not.xml\">GLSL not man page</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 8.7 Vector Relational Functions</a>\r\n\ttemplate <precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL vecType<bool, P> not_(vecType<bool, P> const & v);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#endif\r\n\r\n#include \"func_vector_relational.inl\"\r\n\r\n#endif//GLM_CORE_func_vector_relational\r\n"
  },
  {
    "path": "gpu/glm/detail/func_vector_relational.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/func_vector_relational.inl\r\n/// @date 2008-08-03 / 2011-09-09\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include <limits>\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER typename vecType<T, P>::bool_type lessThan\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,\r\n\t\t\t\"Invalid template instantiation of 'lessThan', GLM vector types required floating-point or integer value types vectors\");\r\n\t\tassert(x.length() == y.length());\r\n\r\n\t\ttypename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);\r\n\t\tfor(int i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] < y[i];\r\n\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER typename vecType<T, P>::bool_type lessThanEqual\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,\r\n\t\t\t\"Invalid template instantiation of 'lessThanEqual', GLM vector types required floating-point or integer value types vectors\");\r\n\t\tassert(x.length() == y.length());\r\n\r\n\t\ttypename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);\r\n\t\tfor(int i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] <= y[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER typename vecType<T, P>::bool_type greaterThan\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,\r\n\t\t\t\"Invalid template instantiation of 'greaterThan', GLM vector types required floating-point or integer value types vectors\");\r\n\t\tassert(x.length() == y.length());\r\n\r\n\t\ttypename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);\r\n\t\tfor(int i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] > y[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER typename vecType<T, P>::bool_type greaterThanEqual\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559 || std::numeric_limits<T>::is_integer,\r\n\t\t\t\"Invalid template instantiation of 'greaterThanEqual', GLM vector types required floating-point or integer value types vectors\");\r\n\t\tassert(x.length() == y.length());\r\n\r\n\t\ttypename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);\r\n\t\tfor(int i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] >= y[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER typename vecType<T, P>::bool_type equal\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tassert(x.length() == y.length());\r\n\r\n\t\ttypename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);\r\n\t\tfor(int i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] == y[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER typename vecType<T, P>::bool_type notEqual\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tassert(x.length() == y.length());\r\n\r\n\t\ttypename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);\r\n\t\tfor(int i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] != y[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER bool any(vecType<bool, P> const & v)\r\n\t{\r\n\t\tbool Result = false;\r\n\t\tfor(int i = 0; i < v.length(); ++i)\r\n\t\t\tResult = Result || v[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER bool all(vecType<bool, P> const & v)\r\n\t{\r\n\t\tbool Result = true;\r\n\t\tfor(int i = 0; i < v.length(); ++i)\r\n\t\t\tResult = Result && v[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<bool, P> not_(vecType<bool, P> const & v)\r\n\t{\r\n\t\ttypename vecType<bool, P>::bool_type Result(vecType<bool, P>::_null);\r\n\t\tfor(int i = 0; i < v.length(); ++i)\r\n\t\t\tResult[i] = !v[i];\r\n\t\treturn Result;\r\n\t}\r\n}//namespace glm\r\n\r\n"
  },
  {
    "path": "gpu/glm/detail/glm.cpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/glm.cpp\r\n/// @date 2013-04-22 / 2013-04-22\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include <glm/glm.hpp>\r\n#include <glm/gtc/quaternion.hpp>\r\n#include <glm/gtx/dual_quaternion.hpp>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n// tvec1 type explicit instantiation\r\n/*\r\ntemplate struct tvec1<uint8, lowp>;\r\ntemplate struct tvec1<uint16, lowp>;\r\ntemplate struct tvec1<uint32, lowp>;\r\ntemplate struct tvec1<uint64, lowp>;\r\ntemplate struct tvec1<int8, lowp>;\r\ntemplate struct tvec1<int16, lowp>;\r\ntemplate struct tvec1<int32, lowp>;\r\ntemplate struct tvec1<int64, lowp>;\r\ntemplate struct tvec1<float16, lowp>;\r\ntemplate struct tvec1<float32, lowp>;\r\ntemplate struct tvec1<float64, lowp>;\r\n\r\ntemplate struct tvec1<uint8, mediump>;\r\ntemplate struct tvec1<uint16, mediump>;\r\ntemplate struct tvec1<uint32, mediump>;\r\ntemplate struct tvec1<uint64, mediump>;\r\ntemplate struct tvec1<int8, mediump>;\r\ntemplate struct tvec1<int16, mediump>;\r\ntemplate struct tvec1<int32, mediump>;\r\ntemplate struct tvec1<int64, mediump>;\r\ntemplate struct tvec1<float16, mediump>;\r\ntemplate struct tvec1<float32, mediump>;\r\ntemplate struct tvec1<float64, mediump>;\r\n\r\ntemplate struct tvec1<uint8, highp>;\r\ntemplate struct tvec1<uint16, highp>;\r\ntemplate struct tvec1<uint32, highp>;\r\ntemplate struct tvec1<uint64, highp>;\r\ntemplate struct tvec1<int8, highp>;\r\ntemplate struct tvec1<int16, highp>;\r\ntemplate struct tvec1<int32, highp>;\r\ntemplate struct tvec1<int64, highp>;\r\ntemplate struct tvec1<float16, highp>;\r\ntemplate struct tvec1<float32, highp>;\r\ntemplate struct tvec1<float64, highp>;\r\n*/\r\n// tvec2 type explicit instantiation\r\ntemplate struct tvec2<uint8, lowp>;\r\ntemplate struct tvec2<uint16, lowp>;\r\ntemplate struct tvec2<uint32, lowp>;\r\ntemplate struct tvec2<uint64, lowp>;\r\ntemplate struct tvec2<int8, lowp>;\r\ntemplate struct tvec2<int16, lowp>;\r\ntemplate struct tvec2<int32, lowp>;\r\ntemplate struct tvec2<int64, lowp>;\r\ntemplate struct tvec2<float32, lowp>;\r\ntemplate struct tvec2<float64, lowp>;\r\n\r\ntemplate struct tvec2<uint8, mediump>;\r\ntemplate struct tvec2<uint16, mediump>;\r\ntemplate struct tvec2<uint32, mediump>;\r\ntemplate struct tvec2<uint64, mediump>;\r\ntemplate struct tvec2<int8, mediump>;\r\ntemplate struct tvec2<int16, mediump>;\r\ntemplate struct tvec2<int32, mediump>;\r\ntemplate struct tvec2<int64, mediump>;\r\ntemplate struct tvec2<float32, mediump>;\r\ntemplate struct tvec2<float64, mediump>;\r\n\r\ntemplate struct tvec2<uint8, highp>;\r\ntemplate struct tvec2<uint16, highp>;\r\ntemplate struct tvec2<uint32, highp>;\r\ntemplate struct tvec2<uint64, highp>;\r\ntemplate struct tvec2<int8, highp>;\r\ntemplate struct tvec2<int16, highp>;\r\ntemplate struct tvec2<int32, highp>;\r\ntemplate struct tvec2<int64, highp>;\r\ntemplate struct tvec2<float32, highp>;\r\ntemplate struct tvec2<float64, highp>;\r\n\r\n// tvec3 type explicit instantiation\r\ntemplate struct tvec3<uint8, lowp>;\r\ntemplate struct tvec3<uint16, lowp>;\r\ntemplate struct tvec3<uint32, lowp>;\r\ntemplate struct tvec3<uint64, lowp>;\r\ntemplate struct tvec3<int8, lowp>;\r\ntemplate struct tvec3<int16, lowp>;\r\ntemplate struct tvec3<int32, lowp>;\r\ntemplate struct tvec3<int64, lowp>;\r\ntemplate struct tvec3<float32, lowp>;\r\ntemplate struct tvec3<float64, lowp>;\r\n\r\ntemplate struct tvec3<uint8, mediump>;\r\ntemplate struct tvec3<uint16, mediump>;\r\ntemplate struct tvec3<uint32, mediump>;\r\ntemplate struct tvec3<uint64, mediump>;\r\ntemplate struct tvec3<int8, mediump>;\r\ntemplate struct tvec3<int16, mediump>;\r\ntemplate struct tvec3<int32, mediump>;\r\ntemplate struct tvec3<int64, mediump>;\r\ntemplate struct tvec3<float32, mediump>;\r\ntemplate struct tvec3<float64, mediump>;\r\n\r\ntemplate struct tvec3<uint8, highp>;\r\ntemplate struct tvec3<uint16, highp>;\r\ntemplate struct tvec3<uint32, highp>;\r\ntemplate struct tvec3<uint64, highp>;\r\ntemplate struct tvec3<int8, highp>;\r\ntemplate struct tvec3<int16, highp>;\r\ntemplate struct tvec3<int32, highp>;\r\ntemplate struct tvec3<int64, highp>;\r\ntemplate struct tvec3<float32, highp>;\r\ntemplate struct tvec3<float64, highp>;\r\n\r\n// tvec4 type explicit instantiation\r\ntemplate struct tvec4<uint8, lowp>;\r\ntemplate struct tvec4<uint16, lowp>;\r\ntemplate struct tvec4<uint32, lowp>;\r\ntemplate struct tvec4<uint64, lowp>;\r\ntemplate struct tvec4<int8, lowp>;\r\ntemplate struct tvec4<int16, lowp>;\r\ntemplate struct tvec4<int32, lowp>;\r\ntemplate struct tvec4<int64, lowp>;\r\ntemplate struct tvec4<float32, lowp>;\r\ntemplate struct tvec4<float64, lowp>;\r\n\r\ntemplate struct tvec4<uint8, mediump>;\r\ntemplate struct tvec4<uint16, mediump>;\r\ntemplate struct tvec4<uint32, mediump>;\r\ntemplate struct tvec4<uint64, mediump>;\r\ntemplate struct tvec4<int8, mediump>;\r\ntemplate struct tvec4<int16, mediump>;\r\ntemplate struct tvec4<int32, mediump>;\r\ntemplate struct tvec4<int64, mediump>;\r\ntemplate struct tvec4<float32, mediump>;\r\ntemplate struct tvec4<float64, mediump>;\r\n\r\ntemplate struct tvec4<uint8, highp>;\r\ntemplate struct tvec4<uint16, highp>;\r\ntemplate struct tvec4<uint32, highp>;\r\ntemplate struct tvec4<uint64, highp>;\r\ntemplate struct tvec4<int8, highp>;\r\ntemplate struct tvec4<int16, highp>;\r\ntemplate struct tvec4<int32, highp>;\r\ntemplate struct tvec4<int64, highp>;\r\ntemplate struct tvec4<float32, highp>;\r\ntemplate struct tvec4<float64, highp>;\r\n\r\n// tmat2x2 type explicit instantiation\r\ntemplate struct tmat2x2<float32, lowp>;\r\ntemplate struct tmat2x2<float64, lowp>;\r\n\r\ntemplate struct tmat2x2<float32, mediump>;\r\ntemplate struct tmat2x2<float64, mediump>;\r\n\r\ntemplate struct tmat2x2<float32, highp>;\r\ntemplate struct tmat2x2<float64, highp>;\r\n\r\n// tmat2x3 type explicit instantiation\r\ntemplate struct tmat2x3<float32, lowp>;\r\ntemplate struct tmat2x3<float64, lowp>;\r\n\r\ntemplate struct tmat2x3<float32, mediump>;\r\ntemplate struct tmat2x3<float64, mediump>;\r\n\r\ntemplate struct tmat2x3<float32, highp>;\r\ntemplate struct tmat2x3<float64, highp>;\r\n\r\n// tmat2x4 type explicit instantiation\r\ntemplate struct tmat2x4<float32, lowp>;\r\ntemplate struct tmat2x4<float64, lowp>;\r\n\r\ntemplate struct tmat2x4<float32, mediump>;\r\ntemplate struct tmat2x4<float64, mediump>;\r\n\r\ntemplate struct tmat2x4<float32, highp>;\r\ntemplate struct tmat2x4<float64, highp>;\r\n\r\n// tmat3x2 type explicit instantiation\r\ntemplate struct tmat3x2<float32, lowp>;\r\ntemplate struct tmat3x2<float64, lowp>;\r\n\r\ntemplate struct tmat3x2<float32, mediump>;\r\ntemplate struct tmat3x2<float64, mediump>;\r\n\r\ntemplate struct tmat3x2<float32, highp>;\r\ntemplate struct tmat3x2<float64, highp>;\r\n\r\n// tmat3x3 type explicit instantiation\r\ntemplate struct tmat3x3<float32, lowp>;\r\ntemplate struct tmat3x3<float64, lowp>;\r\n\r\ntemplate struct tmat3x3<float32, mediump>;\r\ntemplate struct tmat3x3<float64, mediump>;\r\n\r\ntemplate struct tmat3x3<float32, highp>;\r\ntemplate struct tmat3x3<float64, highp>;\r\n\r\n// tmat3x4 type explicit instantiation\r\ntemplate struct tmat3x4<float32, lowp>;\r\ntemplate struct tmat3x4<float64, lowp>;\r\n\r\ntemplate struct tmat3x4<float32, mediump>;\r\ntemplate struct tmat3x4<float64, mediump>;\r\n\r\ntemplate struct tmat3x4<float32, highp>;\r\ntemplate struct tmat3x4<float64, highp>;\r\n\r\n// tmat4x2 type explicit instantiation\r\ntemplate struct tmat4x2<float32, lowp>;\r\ntemplate struct tmat4x2<float64, lowp>;\r\n\r\ntemplate struct tmat4x2<float32, mediump>;\r\ntemplate struct tmat4x2<float64, mediump>;\r\n\r\ntemplate struct tmat4x2<float32, highp>;\r\ntemplate struct tmat4x2<float64, highp>;\r\n\r\n// tmat4x3 type explicit instantiation\r\ntemplate struct tmat4x3<float32, lowp>;\r\ntemplate struct tmat4x3<float64, lowp>;\r\n\r\ntemplate struct tmat4x3<float32, mediump>;\r\ntemplate struct tmat4x3<float64, mediump>;\r\n\r\ntemplate struct tmat4x3<float32, highp>;\r\ntemplate struct tmat4x3<float64, highp>;\r\n\r\n// tmat4x4 type explicit instantiation\r\ntemplate struct tmat4x4<float32, lowp>;\r\ntemplate struct tmat4x4<float64, lowp>;\r\n\r\ntemplate struct tmat4x4<float32, mediump>;\r\ntemplate struct tmat4x4<float64, mediump>;\r\n\r\ntemplate struct tmat4x4<float32, highp>;\r\ntemplate struct tmat4x4<float64, highp>;\r\n\r\n// tquat type explicit instantiation\r\ntemplate struct tquat<float32, lowp>;\r\ntemplate struct tquat<float64, lowp>;\r\n\r\ntemplate struct tquat<float32, mediump>;\r\ntemplate struct tquat<float64, mediump>;\r\n\r\ntemplate struct tquat<float32, highp>;\r\ntemplate struct tquat<float64, highp>;\r\n\r\n//tdualquat type explicit instantiation\r\ntemplate struct tdualquat<float32, lowp>;\r\ntemplate struct tdualquat<float64, lowp>;\r\n\r\ntemplate struct tdualquat<float32, mediump>;\r\ntemplate struct tdualquat<float64, mediump>;\r\n\r\ntemplate struct tdualquat<float32, highp>;\r\ntemplate struct tdualquat<float64, highp>;\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n"
  },
  {
    "path": "gpu/glm/detail/hint.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/hint.hpp\r\n/// @date 2008-08-14 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type\r\n#define glm_core_type\r\n\r\nnamespace glm\r\n{\r\n\t// Use dont_care, nicest and fastest to optimize implementations.\r\n\tclass dont_care {};\r\n\tclass nicest {};\r\n\tclass fastest {};\r\n}//namespace glm\r\n\r\n#endif//glm_core_type\r\n"
  },
  {
    "path": "gpu/glm/detail/intrinsic_common.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_common.hpp\r\n/// @date 2009-05-11 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_detail_intrinsic_common\r\n#define glm_detail_intrinsic_common\r\n\r\n#include \"setup.hpp\"\r\n\r\n#if(!(GLM_ARCH & GLM_ARCH_SSE2))\r\n#\terror \"SSE2 instructions not supported or enabled\"\r\n#else\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\t__m128 sse_abs_ps(__m128 x);\r\n\r\n\t__m128 sse_sgn_ps(__m128 x);\r\n\r\n\t//floor\r\n\t__m128 sse_flr_ps(__m128 v);\r\n\r\n\t//trunc\r\n\t__m128 sse_trc_ps(__m128 v);\r\n\r\n\t//round\r\n\t__m128 sse_nd_ps(__m128 v);\r\n\r\n\t//roundEven\r\n\t__m128 sse_rde_ps(__m128 v);\r\n\r\n\t__m128 sse_rnd_ps(__m128 x);\r\n\r\n\t__m128 sse_ceil_ps(__m128 v);\r\n\r\n\t__m128 sse_frc_ps(__m128 x);\r\n\r\n\t__m128 sse_mod_ps(__m128 x, __m128 y);\r\n\r\n\t__m128 sse_modf_ps(__m128 x, __m128i & i);\r\n\r\n\t//GLM_FUNC_QUALIFIER __m128 sse_min_ps(__m128 x, __m128 y)\r\n\r\n\t//GLM_FUNC_QUALIFIER __m128 sse_max_ps(__m128 x, __m128 y)\r\n\r\n\t__m128 sse_clp_ps(__m128 v, __m128 minVal, __m128 maxVal);\r\n\r\n\t__m128 sse_mix_ps(__m128 v1, __m128 v2, __m128 a);\r\n\r\n\t__m128 sse_stp_ps(__m128 edge, __m128 x);\r\n\r\n\t__m128 sse_ssp_ps(__m128 edge0, __m128 edge1, __m128 x);\r\n\r\n\t__m128 sse_nan_ps(__m128 x);\r\n\r\n\t__m128 sse_inf_ps(__m128 x);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#include \"intrinsic_common.inl\"\r\n\r\n#endif//GLM_ARCH\r\n#endif//glm_detail_intrinsic_common\r\n"
  },
  {
    "path": "gpu/glm/detail/intrinsic_common.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_common.inl\r\n/// @date 2009-05-08 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail{\r\n\r\n#if(GLM_COMPILER & GLM_COMPILER_VC)\r\n#pragma warning(push)\r\n#pragma warning(disable : 4510 4512 4610)\r\n#endif\r\n\r\n\tunion ieee754_QNAN\r\n\t{\r\n\t\tconst float f;\r\n\t\tstruct i\r\n\t\t{\r\n\t\t\tconst unsigned int mantissa:23, exp:8, sign:1;\r\n\t\t};\r\n\r\n\t\tieee754_QNAN() : f(0.0)/*, mantissa(0x7FFFFF), exp(0xFF), sign(0x0)*/ {}\r\n\t};\r\n\r\n#if(GLM_COMPILER & GLM_COMPILER_VC)\r\n#pragma warning(pop)\r\n#endif\r\n\r\n\tstatic const __m128 GLM_VAR_USED zero = _mm_setzero_ps();\r\n\tstatic const __m128 GLM_VAR_USED one = _mm_set_ps1(1.0f);\r\n\tstatic const __m128 GLM_VAR_USED minus_one = _mm_set_ps1(-1.0f);\r\n\tstatic const __m128 GLM_VAR_USED two = _mm_set_ps1(2.0f);\r\n\tstatic const __m128 GLM_VAR_USED three = _mm_set_ps1(3.0f);\r\n\tstatic const __m128 GLM_VAR_USED pi = _mm_set_ps1(3.1415926535897932384626433832795f);\r\n\tstatic const __m128 GLM_VAR_USED hundred_eighty = _mm_set_ps1(180.f);\r\n\tstatic const __m128 GLM_VAR_USED pi_over_hundred_eighty = _mm_set_ps1(0.017453292519943295769236907684886f);\r\n\tstatic const __m128 GLM_VAR_USED hundred_eighty_over_pi = _mm_set_ps1(57.295779513082320876798154814105f);\r\n\r\n\tstatic const ieee754_QNAN absMask;\r\n\tstatic const __m128 GLM_VAR_USED abs4Mask = _mm_set_ps1(absMask.f);\r\n\r\n\tstatic const __m128 GLM_VAR_USED _epi32_sign_mask = _mm_castsi128_ps(_mm_set1_epi32(static_cast<int>(0x80000000)));\r\n\t//static const __m128 GLM_VAR_USED _epi32_inv_sign_mask = _mm_castsi128_ps(_mm_set1_epi32(0x7FFFFFFF));\r\n\t//static const __m128 GLM_VAR_USED _epi32_mant_mask = _mm_castsi128_ps(_mm_set1_epi32(0x7F800000));\r\n\t//static const __m128 GLM_VAR_USED _epi32_inv_mant_mask = _mm_castsi128_ps(_mm_set1_epi32(0x807FFFFF));\r\n\t//static const __m128 GLM_VAR_USED _epi32_min_norm_pos = _mm_castsi128_ps(_mm_set1_epi32(0x00800000));\r\n\tstatic const __m128 GLM_VAR_USED _epi32_0 = _mm_set_ps1(0);\r\n\tstatic const __m128 GLM_VAR_USED _epi32_1 = _mm_set_ps1(1);\r\n\tstatic const __m128 GLM_VAR_USED _epi32_2 = _mm_set_ps1(2);\r\n\tstatic const __m128 GLM_VAR_USED _epi32_3 = _mm_set_ps1(3);\r\n\tstatic const __m128 GLM_VAR_USED _epi32_4 = _mm_set_ps1(4);\r\n\tstatic const __m128 GLM_VAR_USED _epi32_5 = _mm_set_ps1(5);\r\n\tstatic const __m128 GLM_VAR_USED _epi32_6 = _mm_set_ps1(6);\r\n\tstatic const __m128 GLM_VAR_USED _epi32_7 = _mm_set_ps1(7);\r\n\tstatic const __m128 GLM_VAR_USED _epi32_8 = _mm_set_ps1(8);\r\n\tstatic const __m128 GLM_VAR_USED _epi32_9 = _mm_set_ps1(9);\r\n\tstatic const __m128 GLM_VAR_USED _epi32_127 = _mm_set_ps1(127);\r\n\t//static const __m128 GLM_VAR_USED _epi32_ninf = _mm_castsi128_ps(_mm_set1_epi32(0xFF800000));\r\n\t//static const __m128 GLM_VAR_USED _epi32_pinf = _mm_castsi128_ps(_mm_set1_epi32(0x7F800000));\r\n\r\n\tstatic const __m128 GLM_VAR_USED _ps_1_3 = _mm_set_ps1(0.33333333333333333333333333333333f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_0p5 = _mm_set_ps1(0.5f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_1 = _mm_set_ps1(1.0f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_m1 = _mm_set_ps1(-1.0f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_2 = _mm_set_ps1(2.0f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_3 = _mm_set_ps1(3.0f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_127 = _mm_set_ps1(127.0f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_255 = _mm_set_ps1(255.0f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_2pow23 = _mm_set_ps1(8388608.0f);\r\n\r\n\tstatic const __m128 GLM_VAR_USED _ps_1_0_0_0 = _mm_set_ps(1.0f, 0.0f, 0.0f, 0.0f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_0_1_0_0 = _mm_set_ps(0.0f, 1.0f, 0.0f, 0.0f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_0_0_1_0 = _mm_set_ps(0.0f, 0.0f, 1.0f, 0.0f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_0_0_0_1 = _mm_set_ps(0.0f, 0.0f, 0.0f, 1.0f);\r\n\r\n\tstatic const __m128 GLM_VAR_USED _ps_pi = _mm_set_ps1(3.1415926535897932384626433832795f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_pi2 = _mm_set_ps1(6.283185307179586476925286766560f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_2_pi = _mm_set_ps1(0.63661977236758134307553505349006f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_pi_2 = _mm_set_ps1(1.5707963267948966192313216916398f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_4_pi = _mm_set_ps1(1.2732395447351626861510701069801f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_pi_4 = _mm_set_ps1(0.78539816339744830961566084581988f);\r\n\r\n\tstatic const __m128 GLM_VAR_USED _ps_sincos_p0 = _mm_set_ps1(0.15707963267948963959e1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_sincos_p1 = _mm_set_ps1(-0.64596409750621907082e0f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_sincos_p2 = _mm_set_ps1(0.7969262624561800806e-1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_sincos_p3 = _mm_set_ps1(-0.468175413106023168e-2f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_tan_p0 = _mm_set_ps1(-1.79565251976484877988e7f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_tan_p1 = _mm_set_ps1(1.15351664838587416140e6f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_tan_p2 = _mm_set_ps1(-1.30936939181383777646e4f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_tan_q0 = _mm_set_ps1(-5.38695755929454629881e7f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_tan_q1 = _mm_set_ps1(2.50083801823357915839e7f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_tan_q2 = _mm_set_ps1(-1.32089234440210967447e6f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_tan_q3 = _mm_set_ps1(1.36812963470692954678e4f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_tan_poleval = _mm_set_ps1(3.68935e19f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_atan_t0 = _mm_set_ps1(-0.91646118527267623468e-1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_atan_t1 = _mm_set_ps1(-0.13956945682312098640e1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_atan_t2 = _mm_set_ps1(-0.94393926122725531747e2f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_atan_t3 = _mm_set_ps1(0.12888383034157279340e2f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_atan_s0 = _mm_set_ps1(0.12797564625607904396e1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_atan_s1 = _mm_set_ps1(0.21972168858277355914e1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_atan_s2 = _mm_set_ps1(0.68193064729268275701e1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_atan_s3 = _mm_set_ps1(0.28205206687035841409e2f);\r\n\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp_hi = _mm_set_ps1(88.3762626647949f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp_lo = _mm_set_ps1(-88.3762626647949f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp_rln2 = _mm_set_ps1(1.4426950408889634073599f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp_p0 = _mm_set_ps1(1.26177193074810590878e-4f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp_p1 = _mm_set_ps1(3.02994407707441961300e-2f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp_q0 = _mm_set_ps1(3.00198505138664455042e-6f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp_q1 = _mm_set_ps1(2.52448340349684104192e-3f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp_q2 = _mm_set_ps1(2.27265548208155028766e-1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp_q3 = _mm_set_ps1(2.00000000000000000009e0f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp_c1 = _mm_set_ps1(6.93145751953125e-1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp_c2 = _mm_set_ps1(1.42860682030941723212e-6f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp2_hi = _mm_set_ps1(127.4999961853f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp2_lo = _mm_set_ps1(-127.4999961853f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp2_p0 = _mm_set_ps1(2.30933477057345225087e-2f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp2_p1 = _mm_set_ps1(2.02020656693165307700e1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp2_p2 = _mm_set_ps1(1.51390680115615096133e3f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp2_q0 = _mm_set_ps1(2.33184211722314911771e2f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_exp2_q1 = _mm_set_ps1(4.36821166879210612817e3f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_log_p0 = _mm_set_ps1(-7.89580278884799154124e-1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_log_p1 = _mm_set_ps1(1.63866645699558079767e1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_log_p2 = _mm_set_ps1(-6.41409952958715622951e1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_log_q0 = _mm_set_ps1(-3.56722798256324312549e1f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_log_q1 = _mm_set_ps1(3.12093766372244180303e2f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_log_q2 = _mm_set_ps1(-7.69691943550460008604e2f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_log_c0 = _mm_set_ps1(0.693147180559945f);\r\n\tstatic const __m128 GLM_VAR_USED _ps_log2_c0 = _mm_set_ps1(1.44269504088896340735992f);\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_abs_ps(__m128 x)\r\n{\r\n\treturn _mm_and_ps(glm::detail::abs4Mask, x);\r\n} \r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_sgn_ps(__m128 x)\r\n{\r\n\t__m128 Neg = _mm_set1_ps(-1.0f);\r\n\t__m128 Pos = _mm_set1_ps(1.0f);\r\n\r\n\t__m128 Cmp0 = _mm_cmplt_ps(x, zero);\r\n\t__m128 Cmp1 = _mm_cmpgt_ps(x, zero);\r\n\r\n\t__m128 And0 = _mm_and_ps(Cmp0, Neg);\r\n\t__m128 And1 = _mm_and_ps(Cmp1, Pos);\r\n\r\n\treturn _mm_or_ps(And0, And1);\r\n}\r\n\r\n//floor\r\nGLM_FUNC_QUALIFIER __m128 sse_flr_ps(__m128 x)\r\n{\r\n\t__m128 rnd0 = sse_rnd_ps(x);\r\n\t__m128 cmp0 = _mm_cmplt_ps(x, rnd0);\r\n\t__m128 and0 = _mm_and_ps(cmp0, glm::detail::_ps_1);\r\n\t__m128 sub0 = _mm_sub_ps(rnd0, and0);\r\n\treturn sub0;\r\n}\r\n\r\n//trunc\r\n/*\r\nGLM_FUNC_QUALIFIER __m128 _mm_trc_ps(__m128 v)\r\n{\r\n\treturn __m128();\r\n}\r\n*/\r\n//round\r\nGLM_FUNC_QUALIFIER __m128 sse_rnd_ps(__m128 x)\r\n{\r\n\t__m128 and0 = _mm_and_ps(glm::detail::_epi32_sign_mask, x);\r\n\t__m128 or0 = _mm_or_ps(and0, glm::detail::_ps_2pow23);\r\n\t__m128 add0 = _mm_add_ps(x, or0);\r\n\t__m128 sub0 = _mm_sub_ps(add0, or0);\r\n\treturn sub0;\r\n}\r\n\r\n//roundEven\r\nGLM_FUNC_QUALIFIER __m128 sse_rde_ps(__m128 x)\r\n{\r\n\t__m128 and0 = _mm_and_ps(glm::detail::_epi32_sign_mask, x);\r\n\t__m128 or0 = _mm_or_ps(and0, glm::detail::_ps_2pow23);\r\n\t__m128 add0 = _mm_add_ps(x, or0);\r\n\t__m128 sub0 = _mm_sub_ps(add0, or0);\r\n\treturn sub0;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_ceil_ps(__m128 x)\r\n{\r\n\t__m128 rnd0 = sse_rnd_ps(x);\r\n\t__m128 cmp0 = _mm_cmpgt_ps(x, rnd0);\r\n\t__m128 and0 = _mm_and_ps(cmp0, glm::detail::_ps_1);\r\n\t__m128 add0 = _mm_add_ps(rnd0, and0);\r\n\treturn add0;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_frc_ps(__m128 x)\r\n{\r\n\t__m128 flr0 = sse_flr_ps(x);\r\n\t__m128 sub0 = _mm_sub_ps(x, flr0);\r\n\treturn sub0;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_mod_ps(__m128 x, __m128 y)\r\n{\r\n\t__m128 div0 = _mm_div_ps(x, y);\r\n\t__m128 flr0 = sse_flr_ps(div0);\r\n\t__m128 mul0 = _mm_mul_ps(y, flr0);\r\n\t__m128 sub0 = _mm_sub_ps(x, mul0);\r\n\treturn sub0;\r\n}\r\n\r\n/// TODO\r\n/*\r\nGLM_FUNC_QUALIFIER __m128 sse_modf_ps(__m128 x, __m128i & i)\r\n{\r\n\t__m128 empty;\r\n\treturn empty;\r\n}\r\n*/\r\n\r\n//GLM_FUNC_QUALIFIER __m128 _mm_min_ps(__m128 x, __m128 y)\r\n\r\n//GLM_FUNC_QUALIFIER __m128 _mm_max_ps(__m128 x, __m128 y)\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_clp_ps(__m128 v, __m128 minVal, __m128 maxVal)\r\n{\r\n\t__m128 min0 = _mm_min_ps(v, maxVal);\r\n\t__m128 max0 = _mm_max_ps(min0, minVal);\r\n\treturn max0;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_mix_ps(__m128 v1, __m128 v2, __m128 a)\r\n{\r\n\t__m128 sub0 = _mm_sub_ps(glm::detail::one, a);\r\n\t__m128 mul0 = _mm_mul_ps(v1, sub0);\r\n\t__m128 mul1 = _mm_mul_ps(v2, a);\r\n\t__m128 add0 = _mm_add_ps(mul0, mul1);\r\n\treturn add0;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_stp_ps(__m128 edge, __m128 x)\r\n{\r\n\t__m128 cmp = _mm_cmple_ps(x, edge);\r\n\tif(_mm_movemask_ps(cmp) == 0)\r\n\t\treturn glm::detail::one;\r\n\telse\r\n\t\treturn glm::detail::zero;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_ssp_ps(__m128 edge0, __m128 edge1, __m128 x)\r\n{\r\n\t__m128 sub0 = _mm_sub_ps(x, edge0);\r\n\t__m128 sub1 = _mm_sub_ps(edge1, edge0);\r\n\t__m128 div0 = _mm_sub_ps(sub0, sub1);\r\n\t__m128 clp0 = sse_clp_ps(div0, glm::detail::zero, glm::detail::one);\r\n\t__m128 mul0 = _mm_mul_ps(glm::detail::two, clp0);\r\n\t__m128 sub2 = _mm_sub_ps(glm::detail::three, mul0);\r\n\t__m128 mul1 = _mm_mul_ps(clp0, clp0);\r\n\t__m128 mul2 = _mm_mul_ps(mul1, sub2);\r\n\treturn mul2;\r\n}\r\n\r\n/// \\todo\r\n//GLM_FUNC_QUALIFIER __m128 sse_nan_ps(__m128 x)\r\n//{\r\n//\t__m128 empty;\r\n//\treturn empty;\r\n//}\r\n\r\n/// \\todo\r\n//GLM_FUNC_QUALIFIER __m128 sse_inf_ps(__m128 x)\r\n//{\r\n//\t__m128 empty;\r\n//\treturn empty;\r\n//}\r\n\r\n// SSE scalar reciprocal sqrt using rsqrt op, plus one Newton-Rhaphson iteration\r\n// By Elan Ruskin, http://assemblyrequired.crashworks.org/\r\nGLM_FUNC_QUALIFIER __m128 sse_sqrt_wip_ss(__m128 const & x)\r\n{\r\n\t__m128 recip = _mm_rsqrt_ss(x);  // \"estimate\" opcode\r\n\tconst static __m128 three = {3, 3, 3, 3}; // aligned consts for fast load\r\n\tconst static __m128 half = {0.5,0.5,0.5,0.5};\r\n\t__m128 halfrecip = _mm_mul_ss(half, recip);\r\n\t__m128 threeminus_xrr = _mm_sub_ss(three, _mm_mul_ss(x, _mm_mul_ss (recip, recip)));\r\n\treturn _mm_mul_ss( halfrecip, threeminus_xrr);\r\n}\r\n\r\n}//namespace detail\r\n}//namespace glms\r\n"
  },
  {
    "path": "gpu/glm/detail/intrinsic_exponential.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_exponential.hpp\r\n/// @date 2009-05-11 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_detail_intrinsic_exponential\r\n#define glm_detail_intrinsic_exponential\r\n\r\n#include \"setup.hpp\"\r\n\r\n#if(!(GLM_ARCH & GLM_ARCH_SSE2))\r\n#\terror \"SSE2 instructions not supported or enabled\"\r\n#else\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n/*\r\nGLM_FUNC_QUALIFIER __m128 sse_rsqrt_nr_ss(__m128 const x)\r\n{\r\n\t__m128 recip = _mm_rsqrt_ss( x );  // \"estimate\" opcode\r\n\tconst static __m128 three = { 3, 3, 3, 3 }; // aligned consts for fast load\r\n\tconst static __m128 half = { 0.5,0.5,0.5,0.5 };\r\n\t__m128 halfrecip = _mm_mul_ss( half, recip );\r\n\t__m128 threeminus_xrr = _mm_sub_ss( three, _mm_mul_ss( x, _mm_mul_ss ( recip, recip ) ) );\r\n\treturn _mm_mul_ss( halfrecip, threeminus_xrr );\r\n}\r\n \r\nGLM_FUNC_QUALIFIER __m128 sse_normalize_fast_ps(  float * RESTRICT vOut, float * RESTRICT vIn )\r\n{\r\n        __m128 x = _mm_load_ss(&vIn[0]);\r\n        __m128 y = _mm_load_ss(&vIn[1]);\r\n        __m128 z = _mm_load_ss(&vIn[2]);\r\n \r\n        const __m128 l =  // compute x*x + y*y + z*z\r\n                _mm_add_ss(\r\n                 _mm_add_ss( _mm_mul_ss(x,x),\r\n                             _mm_mul_ss(y,y)\r\n                            ),\r\n                 _mm_mul_ss( z, z )\r\n                );\r\n \r\n \r\n        const __m128 rsqt = _mm_rsqrt_nr_ss( l );\r\n        _mm_store_ss( &vOut[0] , _mm_mul_ss( rsqt, x ) );\r\n        _mm_store_ss( &vOut[1] , _mm_mul_ss( rsqt, y ) );\r\n        _mm_store_ss( &vOut[2] , _mm_mul_ss( rsqt, z ) );\r\n \r\n        return _mm_mul_ss( l , rsqt );\r\n}\r\n*/\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#endif//GLM_ARCH\r\n#endif//glm_detail_intrinsic_exponential\r\n"
  },
  {
    "path": "gpu/glm/detail/intrinsic_exponential.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_exponential.inl\r\n/// @date 2011-06-15 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n"
  },
  {
    "path": "gpu/glm/detail/intrinsic_geometric.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_geometric.hpp\r\n/// @date 2009-05-08 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_intrinsic_geometric\r\n#define glm_core_intrinsic_geometric\r\n\r\n#include \"setup.hpp\"\r\n\r\n#if(!(GLM_ARCH & GLM_ARCH_SSE2))\r\n#\terror \"SSE2 instructions not supported or enabled\"\r\n#else\r\n\r\n#include \"intrinsic_common.hpp\"\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\t//length\r\n\t__m128 sse_len_ps(__m128 x);\r\n\r\n\t//distance\r\n\t__m128 sse_dst_ps(__m128 p0, __m128 p1);\r\n\r\n\t//dot\r\n\t__m128 sse_dot_ps(__m128 v1, __m128 v2);\r\n\r\n\t// SSE1\r\n\t__m128 sse_dot_ss(__m128 v1, __m128 v2);\r\n\r\n\t//cross\r\n\t__m128 sse_xpd_ps(__m128 v1, __m128 v2);\r\n\r\n\t//normalize\r\n\t__m128 sse_nrm_ps(__m128 v);\r\n\r\n\t//faceforward\r\n\t__m128 sse_ffd_ps(__m128 N, __m128 I, __m128 Nref);\r\n\r\n\t//reflect\r\n\t__m128 sse_rfe_ps(__m128 I, __m128 N);\r\n\r\n\t//refract\r\n\t__m128 sse_rfa_ps(__m128 I, __m128 N, __m128 eta);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#include \"intrinsic_geometric.inl\"\r\n\r\n#endif//GLM_ARCH\r\n#endif//glm_core_intrinsic_geometric\r\n"
  },
  {
    "path": "gpu/glm/detail/intrinsic_geometric.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_geometric.inl\r\n/// @date 2009-05-08 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail{\r\n\r\n//length\r\nGLM_FUNC_QUALIFIER __m128 sse_len_ps(__m128 x)\r\n{\r\n    __m128 dot0 = sse_dot_ps(x, x);\r\n\t__m128 sqt0 = _mm_sqrt_ps(dot0);\r\n    return sqt0;\r\n}\r\n\r\n//distance\r\nGLM_FUNC_QUALIFIER __m128 sse_dst_ps(__m128 p0, __m128 p1)\r\n{\r\n\t__m128 sub0 = _mm_sub_ps(p0, p1);\r\n    __m128 len0 = sse_len_ps(sub0);\r\n    return len0;\r\n}\r\n\r\n//dot\r\nGLM_FUNC_QUALIFIER __m128 sse_dot_ps(__m128 v1, __m128 v2)\r\n{\r\n#   if((GLM_ARCH & GLM_ARCH_SSE4) == GLM_ARCH_SSE4)\r\n        return _mm_dp_ps(v1, v2, 0xff);\r\n#   else\r\n        __m128 mul0 = _mm_mul_ps(v1, v2);\r\n        __m128 swp0 = _mm_shuffle_ps(mul0, mul0, _MM_SHUFFLE(2, 3, 0, 1));\r\n        __m128 add0 = _mm_add_ps(mul0, swp0);\r\n        __m128 swp1 = _mm_shuffle_ps(add0, add0, _MM_SHUFFLE(0, 1, 2, 3));\r\n        __m128 add1 = _mm_add_ps(add0, swp1);\r\n        return add1;\r\n#   endif\r\n}\r\n\r\n// SSE1\r\nGLM_FUNC_QUALIFIER __m128 sse_dot_ss(__m128 v1, __m128 v2)\r\n{\r\n\t__m128 mul0 = _mm_mul_ps(v1, v2);\r\n\t__m128 mov0 = _mm_movehl_ps(mul0, mul0);\r\n\t__m128 add0 = _mm_add_ps(mov0, mul0);\r\n\t__m128 swp1 = _mm_shuffle_ps(add0, add0, 1);\r\n\t__m128 add1 = _mm_add_ss(add0, swp1);\r\n\treturn add1;\r\n}\r\n\r\n//cross\r\nGLM_FUNC_QUALIFIER __m128 sse_xpd_ps(__m128 v1, __m128 v2)\r\n{\r\n\t__m128 swp0 = _mm_shuffle_ps(v1, v1, _MM_SHUFFLE(3, 0, 2, 1));\r\n\t__m128 swp1 = _mm_shuffle_ps(v1, v1, _MM_SHUFFLE(3, 1, 0, 2));\r\n\t__m128 swp2 = _mm_shuffle_ps(v2, v2, _MM_SHUFFLE(3, 0, 2, 1));\r\n\t__m128 swp3 = _mm_shuffle_ps(v2, v2, _MM_SHUFFLE(3, 1, 0, 2));\r\n\t__m128 mul0 = _mm_mul_ps(swp0, swp3);\r\n\t__m128 mul1 = _mm_mul_ps(swp1, swp2);\r\n\t__m128 sub0 = _mm_sub_ps(mul0, mul1);\r\n\treturn sub0;\r\n}\r\n\r\n//normalize\r\nGLM_FUNC_QUALIFIER __m128 sse_nrm_ps(__m128 v)\r\n{\r\n\t__m128 dot0 = sse_dot_ps(v, v);\r\n\t__m128 isr0 = _mm_rsqrt_ps(dot0);\r\n\t__m128 mul0 = _mm_mul_ps(v, isr0);\r\n\treturn mul0;\r\n}\r\n\r\n//faceforward\r\nGLM_FUNC_QUALIFIER __m128 sse_ffd_ps(__m128 N, __m128 I, __m128 Nref)\r\n{\r\n\t//__m128 dot0 = _mm_dot_ps(v, v);\r\n\t//__m128 neg0 = _mm_neg_ps(N);\r\n\t//__m128 sgn0 = _mm_sgn_ps(dot0);\r\n\t//__m128 mix0 = _mm_mix_ps(N, neg0, sgn0);\r\n\t//return mix0;\r\n\r\n\t__m128 dot0 = sse_dot_ps(Nref, I);\r\n\t__m128 sgn0 = sse_sgn_ps(dot0);\r\n\t__m128 mul0 = _mm_mul_ps(sgn0, glm::detail::minus_one);\r\n\t__m128 mul1 = _mm_mul_ps(N, mul0);\r\n\treturn mul1;\r\n}\r\n\r\n//reflect\r\nGLM_FUNC_QUALIFIER __m128 sse_rfe_ps(__m128 I, __m128 N)\r\n{\r\n\t__m128 dot0 = sse_dot_ps(N, I);\r\n\t__m128 mul0 = _mm_mul_ps(N, dot0);\r\n\t__m128 mul1 = _mm_mul_ps(mul0, glm::detail::two);\r\n\t__m128 sub0 = _mm_sub_ps(I, mul1);\r\n\treturn sub0;\r\n}\r\n\r\n//refract\r\nGLM_FUNC_QUALIFIER __m128 sse_rfa_ps(__m128 I, __m128 N, __m128 eta)\r\n{\r\n\t__m128 dot0 = sse_dot_ps(N, I);\r\n\t__m128 mul0 = _mm_mul_ps(eta, eta);\r\n\t__m128 mul1 = _mm_mul_ps(dot0, dot0);\r\n\t__m128 sub0 = _mm_sub_ps(glm::detail::one, mul0);\r\n\t__m128 sub1 = _mm_sub_ps(glm::detail::one, mul1);\r\n\t__m128 mul2 = _mm_mul_ps(sub0, sub1);\r\n\t\r\n\tif(_mm_movemask_ps(_mm_cmplt_ss(mul2, glm::detail::zero)) == 0)\r\n\t\treturn glm::detail::zero;\r\n\r\n\t__m128 sqt0 = _mm_sqrt_ps(mul2);\r\n\t__m128 mul3 = _mm_mul_ps(eta, dot0);\r\n\t__m128 add0 = _mm_add_ps(mul3, sqt0);\r\n\t__m128 mul4 = _mm_mul_ps(add0, N);\r\n\t__m128 mul5 = _mm_mul_ps(eta, I);\r\n\t__m128 sub2 = _mm_sub_ps(mul5, mul4);\r\n\r\n\treturn sub2;\r\n}\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/detail/intrinsic_integer.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_integer.hpp\r\n/// @date 2009-05-11 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_detail_intrinsic_integer\r\n#define glm_detail_intrinsic_integer\r\n\r\n#include \"glm/glm.hpp\"\r\n\r\n#if(!(GLM_ARCH & GLM_ARCH_SSE2))\r\n#\terror \"SSE2 instructions not supported or enabled\"\r\n#else\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\t__m128i _mm_bit_interleave_si128(__m128i x);\r\n\t__m128i _mm_bit_interleave_si128(__m128i x, __m128i y);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#include \"intrinsic_integer.inl\"\r\n\r\n#endif//GLM_ARCH\r\n#endif//glm_detail_intrinsic_integer\r\n"
  },
  {
    "path": "gpu/glm/detail/intrinsic_integer.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_integer.inl\r\n/// @date 2009-05-08 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\tinline __m128i _mm_bit_interleave_si128(__m128i x)\r\n\t{\r\n\t\t__m128i const Mask4 = _mm_set1_epi32(0x0000FFFF);\r\n\t\t__m128i const Mask3 = _mm_set1_epi32(0x00FF00FF);\r\n\t\t__m128i const Mask2 = _mm_set1_epi32(0x0F0F0F0F);\r\n\t\t__m128i const Mask1 = _mm_set1_epi32(0x33333333);\r\n\t\t__m128i const Mask0 = _mm_set1_epi32(0x55555555);\r\n\r\n\t\t__m128i Reg1;\r\n\t\t__m128i Reg2;\r\n\r\n\t\t// REG1 = x;\r\n\t\t// REG2 = y;\r\n\t\t//Reg1 = _mm_unpacklo_epi64(x, y);\r\n\t\tReg1 = x;\r\n\r\n\t\t//REG1 = ((REG1 << 16) | REG1) & glm::uint64(0x0000FFFF0000FFFF);\r\n\t\t//REG2 = ((REG2 << 16) | REG2) & glm::uint64(0x0000FFFF0000FFFF);\r\n\t\tReg2 = _mm_slli_si128(Reg1, 2);\r\n\t\tReg1 = _mm_or_si128(Reg2, Reg1);\r\n\t\tReg1 = _mm_and_si128(Reg1, Mask4);\r\n\r\n\t\t//REG1 = ((REG1 <<  8) | REG1) & glm::uint64(0x00FF00FF00FF00FF);\r\n\t\t//REG2 = ((REG2 <<  8) | REG2) & glm::uint64(0x00FF00FF00FF00FF);\r\n\t\tReg2 = _mm_slli_si128(Reg1, 1);\r\n\t\tReg1 = _mm_or_si128(Reg2, Reg1);\r\n\t\tReg1 = _mm_and_si128(Reg1, Mask3);\r\n\r\n\t\t//REG1 = ((REG1 <<  4) | REG1) & glm::uint64(0x0F0F0F0F0F0F0F0F);\r\n\t\t//REG2 = ((REG2 <<  4) | REG2) & glm::uint64(0x0F0F0F0F0F0F0F0F);\r\n\t\tReg2 = _mm_slli_epi32(Reg1, 4);\r\n\t\tReg1 = _mm_or_si128(Reg2, Reg1);\r\n\t\tReg1 = _mm_and_si128(Reg1, Mask2);\r\n\r\n\t\t//REG1 = ((REG1 <<  2) | REG1) & glm::uint64(0x3333333333333333);\r\n\t\t//REG2 = ((REG2 <<  2) | REG2) & glm::uint64(0x3333333333333333);\r\n\t\tReg2 = _mm_slli_epi32(Reg1, 2);\r\n\t\tReg1 = _mm_or_si128(Reg2, Reg1);\r\n\t\tReg1 = _mm_and_si128(Reg1, Mask1);\r\n\r\n\t\t//REG1 = ((REG1 <<  1) | REG1) & glm::uint64(0x5555555555555555);\r\n\t\t//REG2 = ((REG2 <<  1) | REG2) & glm::uint64(0x5555555555555555);\r\n\t\tReg2 = _mm_slli_epi32(Reg1, 1);\r\n\t\tReg1 = _mm_or_si128(Reg2, Reg1);\r\n\t\tReg1 = _mm_and_si128(Reg1, Mask0);\r\n\r\n\t\t//return REG1 | (REG2 << 1);\r\n\t\tReg2 = _mm_slli_epi32(Reg1, 1);\r\n\t\tReg2 = _mm_srli_si128(Reg2, 8);\r\n\t\tReg1 = _mm_or_si128(Reg1, Reg2);\r\n\t\r\n\t\treturn Reg1;\r\n\t}\r\n\r\n\tinline __m128i _mm_bit_interleave_si128(__m128i x, __m128i y)\r\n\t{\r\n\t\t__m128i const Mask4 = _mm_set1_epi32(0x0000FFFF);\r\n\t\t__m128i const Mask3 = _mm_set1_epi32(0x00FF00FF);\r\n\t\t__m128i const Mask2 = _mm_set1_epi32(0x0F0F0F0F);\r\n\t\t__m128i const Mask1 = _mm_set1_epi32(0x33333333);\r\n\t\t__m128i const Mask0 = _mm_set1_epi32(0x55555555);\r\n\r\n\t\t__m128i Reg1;\r\n\t\t__m128i Reg2;\r\n\r\n\t\t// REG1 = x;\r\n\t\t// REG2 = y;\r\n\t\tReg1 = _mm_unpacklo_epi64(x, y);\r\n\r\n\t\t//REG1 = ((REG1 << 16) | REG1) & glm::uint64(0x0000FFFF0000FFFF);\r\n\t\t//REG2 = ((REG2 << 16) | REG2) & glm::uint64(0x0000FFFF0000FFFF);\r\n\t\tReg2 = _mm_slli_si128(Reg1, 2);\r\n\t\tReg1 = _mm_or_si128(Reg2, Reg1);\r\n\t\tReg1 = _mm_and_si128(Reg1, Mask4);\r\n\r\n\t\t//REG1 = ((REG1 <<  8) | REG1) & glm::uint64(0x00FF00FF00FF00FF);\r\n\t\t//REG2 = ((REG2 <<  8) | REG2) & glm::uint64(0x00FF00FF00FF00FF);\r\n\t\tReg2 = _mm_slli_si128(Reg1, 1);\r\n\t\tReg1 = _mm_or_si128(Reg2, Reg1);\r\n\t\tReg1 = _mm_and_si128(Reg1, Mask3);\r\n\r\n\t\t//REG1 = ((REG1 <<  4) | REG1) & glm::uint64(0x0F0F0F0F0F0F0F0F);\r\n\t\t//REG2 = ((REG2 <<  4) | REG2) & glm::uint64(0x0F0F0F0F0F0F0F0F);\r\n\t\tReg2 = _mm_slli_epi32(Reg1, 4);\r\n\t\tReg1 = _mm_or_si128(Reg2, Reg1);\r\n\t\tReg1 = _mm_and_si128(Reg1, Mask2);\r\n\r\n\t\t//REG1 = ((REG1 <<  2) | REG1) & glm::uint64(0x3333333333333333);\r\n\t\t//REG2 = ((REG2 <<  2) | REG2) & glm::uint64(0x3333333333333333);\r\n\t\tReg2 = _mm_slli_epi32(Reg1, 2);\r\n\t\tReg1 = _mm_or_si128(Reg2, Reg1);\r\n\t\tReg1 = _mm_and_si128(Reg1, Mask1);\r\n\r\n\t\t//REG1 = ((REG1 <<  1) | REG1) & glm::uint64(0x5555555555555555);\r\n\t\t//REG2 = ((REG2 <<  1) | REG2) & glm::uint64(0x5555555555555555);\r\n\t\tReg2 = _mm_slli_epi32(Reg1, 1);\r\n\t\tReg1 = _mm_or_si128(Reg2, Reg1);\r\n\t\tReg1 = _mm_and_si128(Reg1, Mask0);\r\n\r\n\t\t//return REG1 | (REG2 << 1);\r\n\t\tReg2 = _mm_slli_epi32(Reg1, 1);\r\n\t\tReg2 = _mm_srli_si128(Reg2, 8);\r\n\t\tReg1 = _mm_or_si128(Reg1, Reg2);\r\n\t\r\n\t\treturn Reg1;\r\n\t}\r\n}//namespace detail\r\n}//namespace glms\r\n"
  },
  {
    "path": "gpu/glm/detail/intrinsic_matrix.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_common.hpp\r\n/// @date 2009-06-05 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_detail_intrinsic_matrix\r\n#define glm_detail_intrinsic_matrix\r\n\r\n#include \"setup.hpp\"\r\n\r\n#if(!(GLM_ARCH & GLM_ARCH_SSE2))\r\n#\terror \"SSE2 instructions not supported or enabled\"\r\n#else\r\n\r\n#include \"intrinsic_geometric.hpp\"\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\tvoid sse_add_ps(__m128 in1[4], __m128 in2[4], __m128 out[4]);\r\n\r\n\tvoid sse_sub_ps(__m128 in1[4], __m128 in2[4], __m128 out[4]);\r\n\r\n\t__m128 sse_mul_ps(__m128 m[4], __m128 v);\r\n\r\n\t__m128 sse_mul_ps(__m128 v, __m128 m[4]);\r\n\r\n\tvoid sse_mul_ps(__m128 const in1[4], __m128 const in2[4], __m128 out[4]);\r\n\r\n\tvoid sse_transpose_ps(__m128 const in[4], __m128 out[4]);\r\n\r\n\tvoid sse_inverse_ps(__m128 const in[4], __m128 out[4]);\r\n\r\n\tvoid sse_rotate_ps(__m128 const in[4], float Angle, float const v[3], __m128 out[4]);\r\n\r\n\t__m128 sse_det_ps(__m128 const m[4]);\r\n\r\n\t__m128 sse_slow_det_ps(__m128 const m[4]);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#include \"intrinsic_matrix.inl\"\r\n\r\n#endif//GLM_ARCH\r\n#endif//glm_detail_intrinsic_matrix\r\n"
  },
  {
    "path": "gpu/glm/detail/intrinsic_matrix.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_common.inl\r\n/// @date 2009-06-05 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail{\r\n\r\nstatic const __m128 GLM_VAR_USED _m128_rad_ps = _mm_set_ps1(3.141592653589793238462643383279f / 180.f);\r\nstatic const __m128 GLM_VAR_USED _m128_deg_ps = _mm_set_ps1(180.f / 3.141592653589793238462643383279f);\r\n\r\ntemplate <typename matType>\r\nGLM_FUNC_QUALIFIER matType sse_comp_mul_ps\r\n(\r\n\t__m128 const in1[4],\r\n\t__m128 const in2[4],\r\n\t__m128 out[4]\r\n)\r\n{\r\n\tout[0] = _mm_mul_ps(in1[0], in2[0]);\r\n\tout[1] = _mm_mul_ps(in1[1], in2[1]);\r\n\tout[2] = _mm_mul_ps(in1[2], in2[2]);\r\n\tout[3] = _mm_mul_ps(in1[3], in2[3]);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER void sse_add_ps(__m128 const in1[4], __m128 const in2[4], __m128 out[4])\r\n{\r\n\t{\r\n\t\tout[0] = _mm_add_ps(in1[0], in2[0]);\r\n\t\tout[1] = _mm_add_ps(in1[1], in2[1]);\r\n\t\tout[2] = _mm_add_ps(in1[2], in2[2]);\r\n\t\tout[3] = _mm_add_ps(in1[3], in2[3]);\r\n\t}\r\n}\r\n\r\nGLM_FUNC_QUALIFIER void sse_sub_ps(__m128 const in1[4], __m128 const in2[4], __m128 out[4])\r\n{\r\n\t{\r\n\t\tout[0] = _mm_sub_ps(in1[0], in2[0]);\r\n\t\tout[1] = _mm_sub_ps(in1[1], in2[1]);\r\n\t\tout[2] = _mm_sub_ps(in1[2], in2[2]);\r\n\t\tout[3] = _mm_sub_ps(in1[3], in2[3]);\r\n\t}\r\n}\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_mul_ps(__m128 const m[4], __m128 v)\r\n{\r\n\t__m128 v0 = _mm_shuffle_ps(v, v, _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 v1 = _mm_shuffle_ps(v, v, _MM_SHUFFLE(1, 1, 1, 1));\r\n\t__m128 v2 = _mm_shuffle_ps(v, v, _MM_SHUFFLE(2, 2, 2, 2));\r\n\t__m128 v3 = _mm_shuffle_ps(v, v, _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t__m128 m0 = _mm_mul_ps(m[0], v0);\r\n\t__m128 m1 = _mm_mul_ps(m[1], v1);\r\n\t__m128 m2 = _mm_mul_ps(m[2], v2);\r\n\t__m128 m3 = _mm_mul_ps(m[3], v3);\r\n\r\n\t__m128 a0 = _mm_add_ps(m0, m1);\r\n\t__m128 a1 = _mm_add_ps(m2, m3);\r\n\t__m128 a2 = _mm_add_ps(a0, a1);\r\n\r\n\treturn a2;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_mul_ps(__m128 v, __m128 const m[4])\r\n{\r\n\t__m128 i0 = m[0];\r\n\t__m128 i1 = m[1];\r\n\t__m128 i2 = m[2];\r\n\t__m128 i3 = m[3];\r\n\r\n\t__m128 m0 = _mm_mul_ps(v, i0);\r\n\t__m128 m1 = _mm_mul_ps(v, i1);\r\n\t__m128 m2 = _mm_mul_ps(v, i2);\r\n\t__m128 m3 = _mm_mul_ps(v, i3);\r\n\r\n\t__m128 u0 = _mm_unpacklo_ps(m0, m1);\r\n\t__m128 u1 = _mm_unpackhi_ps(m0, m1);\r\n\t__m128 a0 = _mm_add_ps(u0, u1);\r\n\r\n\t__m128 u2 = _mm_unpacklo_ps(m2, m3);\r\n\t__m128 u3 = _mm_unpackhi_ps(m2, m3);\r\n\t__m128 a1 = _mm_add_ps(u2, u3);\r\n\r\n\t__m128 f0 = _mm_movelh_ps(a0, a1);\r\n\t__m128 f1 = _mm_movehl_ps(a1, a0);\r\n\t__m128 f2 = _mm_add_ps(f0, f1);\r\n\r\n\treturn f2;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER void sse_mul_ps(__m128 const in1[4], __m128 const in2[4], __m128 out[4])\r\n{\r\n\t{\r\n\t\t__m128 e0 = _mm_shuffle_ps(in2[0], in2[0], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 e1 = _mm_shuffle_ps(in2[0], in2[0], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 e2 = _mm_shuffle_ps(in2[0], in2[0], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 e3 = _mm_shuffle_ps(in2[0], in2[0], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 m0 = _mm_mul_ps(in1[0], e0);\r\n\t\t__m128 m1 = _mm_mul_ps(in1[1], e1);\r\n\t\t__m128 m2 = _mm_mul_ps(in1[2], e2);\r\n\t\t__m128 m3 = _mm_mul_ps(in1[3], e3);\r\n\r\n\t\t__m128 a0 = _mm_add_ps(m0, m1);\r\n\t\t__m128 a1 = _mm_add_ps(m2, m3);\r\n\t\t__m128 a2 = _mm_add_ps(a0, a1);\r\n\r\n\t\tout[0] = a2;\r\n\t}\r\n\r\n\t{\r\n\t\t__m128 e0 = _mm_shuffle_ps(in2[1], in2[1], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 e1 = _mm_shuffle_ps(in2[1], in2[1], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 e2 = _mm_shuffle_ps(in2[1], in2[1], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 e3 = _mm_shuffle_ps(in2[1], in2[1], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 m0 = _mm_mul_ps(in1[0], e0);\r\n\t\t__m128 m1 = _mm_mul_ps(in1[1], e1);\r\n\t\t__m128 m2 = _mm_mul_ps(in1[2], e2);\r\n\t\t__m128 m3 = _mm_mul_ps(in1[3], e3);\r\n\r\n\t\t__m128 a0 = _mm_add_ps(m0, m1);\r\n\t\t__m128 a1 = _mm_add_ps(m2, m3);\r\n\t\t__m128 a2 = _mm_add_ps(a0, a1);\r\n\r\n\t\tout[1] = a2;\r\n\t}\r\n\r\n\t{\r\n\t\t__m128 e0 = _mm_shuffle_ps(in2[2], in2[2], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 e1 = _mm_shuffle_ps(in2[2], in2[2], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 e2 = _mm_shuffle_ps(in2[2], in2[2], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 e3 = _mm_shuffle_ps(in2[2], in2[2], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 m0 = _mm_mul_ps(in1[0], e0);\r\n\t\t__m128 m1 = _mm_mul_ps(in1[1], e1);\r\n\t\t__m128 m2 = _mm_mul_ps(in1[2], e2);\r\n\t\t__m128 m3 = _mm_mul_ps(in1[3], e3);\r\n\r\n\t\t__m128 a0 = _mm_add_ps(m0, m1);\r\n\t\t__m128 a1 = _mm_add_ps(m2, m3);\r\n\t\t__m128 a2 = _mm_add_ps(a0, a1);\r\n\r\n\t\tout[2] = a2;\r\n\t}\r\n\r\n\t{\r\n\t\t//(__m128&)_mm_shuffle_epi32(__m128i&)in2[0], _MM_SHUFFLE(3, 3, 3, 3))\r\n\t\t__m128 e0 = _mm_shuffle_ps(in2[3], in2[3], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 e1 = _mm_shuffle_ps(in2[3], in2[3], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 e2 = _mm_shuffle_ps(in2[3], in2[3], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 e3 = _mm_shuffle_ps(in2[3], in2[3], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 m0 = _mm_mul_ps(in1[0], e0);\r\n\t\t__m128 m1 = _mm_mul_ps(in1[1], e1);\r\n\t\t__m128 m2 = _mm_mul_ps(in1[2], e2);\r\n\t\t__m128 m3 = _mm_mul_ps(in1[3], e3);\r\n\r\n\t\t__m128 a0 = _mm_add_ps(m0, m1);\r\n\t\t__m128 a1 = _mm_add_ps(m2, m3);\r\n\t\t__m128 a2 = _mm_add_ps(a0, a1);\r\n\r\n\t\tout[3] = a2;\r\n\t}\r\n}\r\n\r\nGLM_FUNC_QUALIFIER void sse_transpose_ps(__m128 const in[4], __m128 out[4])\r\n{\r\n    __m128 tmp0 = _mm_shuffle_ps(in[0], in[1], 0x44);\r\n    __m128 tmp2 = _mm_shuffle_ps(in[0], in[1], 0xEE);\r\n    __m128 tmp1 = _mm_shuffle_ps(in[2], in[3], 0x44);\r\n    __m128 tmp3 = _mm_shuffle_ps(in[2], in[3], 0xEE);\r\n\r\n    out[0] = _mm_shuffle_ps(tmp0, tmp1, 0x88);\r\n    out[1] = _mm_shuffle_ps(tmp0, tmp1, 0xDD);\r\n    out[2] = _mm_shuffle_ps(tmp2, tmp3, 0x88);\r\n    out[3] = _mm_shuffle_ps(tmp2, tmp3, 0xDD);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_slow_det_ps(__m128 const in[4])\r\n{\r\n\t__m128 Fac0;\r\n\t{\r\n\t\t//\tvalType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\r\n\t\t//\tvalType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\r\n\t\t//\tvalType SubFactor06 = m[1][2] * m[3][3] - m[3][2] * m[1][3];\r\n\t\t//\tvalType SubFactor13 = m[1][2] * m[2][3] - m[2][2] * m[1][3];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac0 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 Fac1;\r\n\t{\r\n\t\t//\tvalType SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\r\n\t\t//\tvalType SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\r\n\t\t//\tvalType SubFactor07 = m[1][1] * m[3][3] - m[3][1] * m[1][3];\r\n\t\t//\tvalType SubFactor14 = m[1][1] * m[2][3] - m[2][1] * m[1][3];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac1 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\r\n\t__m128 Fac2;\r\n\t{\r\n\t\t//\tvalType SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\r\n\t\t//\tvalType SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\r\n\t\t//\tvalType SubFactor08 = m[1][1] * m[3][2] - m[3][1] * m[1][2];\r\n\t\t//\tvalType SubFactor15 = m[1][1] * m[2][2] - m[2][1] * m[1][2];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac2 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 Fac3;\r\n\t{\r\n\t\t//\tvalType SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\r\n\t\t//\tvalType SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\r\n\t\t//\tvalType SubFactor09 = m[1][0] * m[3][3] - m[3][0] * m[1][3];\r\n\t\t//\tvalType SubFactor16 = m[1][0] * m[2][3] - m[2][0] * m[1][3];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac3 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 Fac4;\r\n\t{\r\n\t\t//\tvalType SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\r\n\t\t//\tvalType SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\r\n\t\t//\tvalType SubFactor10 = m[1][0] * m[3][2] - m[3][0] * m[1][2];\r\n\t\t//\tvalType SubFactor17 = m[1][0] * m[2][2] - m[2][0] * m[1][2];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac4 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 Fac5;\r\n\t{\r\n\t\t//\tvalType SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\r\n\t\t//\tvalType SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\r\n\t\t//\tvalType SubFactor12 = m[1][0] * m[3][1] - m[3][0] * m[1][1];\r\n\t\t//\tvalType SubFactor18 = m[1][0] * m[2][1] - m[2][0] * m[1][1];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac5 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 SignA = _mm_set_ps( 1.0f,-1.0f, 1.0f,-1.0f);\r\n\t__m128 SignB = _mm_set_ps(-1.0f, 1.0f,-1.0f, 1.0f);\r\n\r\n\t// m[1][0]\r\n\t// m[0][0]\r\n\t// m[0][0]\r\n\t// m[0][0]\r\n\t__m128 Temp0 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 Vec0 = _mm_shuffle_ps(Temp0, Temp0, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// m[1][1]\r\n\t// m[0][1]\r\n\t// m[0][1]\r\n\t// m[0][1]\r\n\t__m128 Temp1 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t__m128 Vec1 = _mm_shuffle_ps(Temp1, Temp1, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// m[1][2]\r\n\t// m[0][2]\r\n\t// m[0][2]\r\n\t// m[0][2]\r\n\t__m128 Temp2 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t__m128 Vec2 = _mm_shuffle_ps(Temp2, Temp2, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// m[1][3]\r\n\t// m[0][3]\r\n\t// m[0][3]\r\n\t// m[0][3]\r\n\t__m128 Temp3 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t__m128 Vec3 = _mm_shuffle_ps(Temp3, Temp3, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// col0\r\n\t// + (Vec1[0] * Fac0[0] - Vec2[0] * Fac1[0] + Vec3[0] * Fac2[0]),\r\n\t// - (Vec1[1] * Fac0[1] - Vec2[1] * Fac1[1] + Vec3[1] * Fac2[1]),\r\n\t// + (Vec1[2] * Fac0[2] - Vec2[2] * Fac1[2] + Vec3[2] * Fac2[2]),\r\n\t// - (Vec1[3] * Fac0[3] - Vec2[3] * Fac1[3] + Vec3[3] * Fac2[3]),\r\n\t__m128 Mul00 = _mm_mul_ps(Vec1, Fac0);\r\n\t__m128 Mul01 = _mm_mul_ps(Vec2, Fac1);\r\n\t__m128 Mul02 = _mm_mul_ps(Vec3, Fac2);\r\n\t__m128 Sub00 = _mm_sub_ps(Mul00, Mul01);\r\n\t__m128 Add00 = _mm_add_ps(Sub00, Mul02);\r\n\t__m128 Inv0 = _mm_mul_ps(SignB, Add00);\r\n\r\n\t// col1\r\n\t// - (Vec0[0] * Fac0[0] - Vec2[0] * Fac3[0] + Vec3[0] * Fac4[0]),\r\n\t// + (Vec0[0] * Fac0[1] - Vec2[1] * Fac3[1] + Vec3[1] * Fac4[1]),\r\n\t// - (Vec0[0] * Fac0[2] - Vec2[2] * Fac3[2] + Vec3[2] * Fac4[2]),\r\n\t// + (Vec0[0] * Fac0[3] - Vec2[3] * Fac3[3] + Vec3[3] * Fac4[3]),\r\n\t__m128 Mul03 = _mm_mul_ps(Vec0, Fac0);\r\n\t__m128 Mul04 = _mm_mul_ps(Vec2, Fac3);\r\n\t__m128 Mul05 = _mm_mul_ps(Vec3, Fac4);\r\n\t__m128 Sub01 = _mm_sub_ps(Mul03, Mul04);\r\n\t__m128 Add01 = _mm_add_ps(Sub01, Mul05);\r\n\t__m128 Inv1 = _mm_mul_ps(SignA, Add01);\r\n\r\n\t// col2\r\n\t// + (Vec0[0] * Fac1[0] - Vec1[0] * Fac3[0] + Vec3[0] * Fac5[0]),\r\n\t// - (Vec0[0] * Fac1[1] - Vec1[1] * Fac3[1] + Vec3[1] * Fac5[1]),\r\n\t// + (Vec0[0] * Fac1[2] - Vec1[2] * Fac3[2] + Vec3[2] * Fac5[2]),\r\n\t// - (Vec0[0] * Fac1[3] - Vec1[3] * Fac3[3] + Vec3[3] * Fac5[3]),\r\n\t__m128 Mul06 = _mm_mul_ps(Vec0, Fac1);\r\n\t__m128 Mul07 = _mm_mul_ps(Vec1, Fac3);\r\n\t__m128 Mul08 = _mm_mul_ps(Vec3, Fac5);\r\n\t__m128 Sub02 = _mm_sub_ps(Mul06, Mul07);\r\n\t__m128 Add02 = _mm_add_ps(Sub02, Mul08);\r\n\t__m128 Inv2 = _mm_mul_ps(SignB, Add02);\r\n\r\n\t// col3\r\n\t// - (Vec1[0] * Fac2[0] - Vec1[0] * Fac4[0] + Vec2[0] * Fac5[0]),\r\n\t// + (Vec1[0] * Fac2[1] - Vec1[1] * Fac4[1] + Vec2[1] * Fac5[1]),\r\n\t// - (Vec1[0] * Fac2[2] - Vec1[2] * Fac4[2] + Vec2[2] * Fac5[2]),\r\n\t// + (Vec1[0] * Fac2[3] - Vec1[3] * Fac4[3] + Vec2[3] * Fac5[3]));\r\n\t__m128 Mul09 = _mm_mul_ps(Vec0, Fac2);\r\n\t__m128 Mul10 = _mm_mul_ps(Vec1, Fac4);\r\n\t__m128 Mul11 = _mm_mul_ps(Vec2, Fac5);\r\n\t__m128 Sub03 = _mm_sub_ps(Mul09, Mul10);\r\n\t__m128 Add03 = _mm_add_ps(Sub03, Mul11);\r\n\t__m128 Inv3 = _mm_mul_ps(SignA, Add03);\r\n\r\n\t__m128 Row0 = _mm_shuffle_ps(Inv0, Inv1, _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 Row1 = _mm_shuffle_ps(Inv2, Inv3, _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 Row2 = _mm_shuffle_ps(Row0, Row1, _MM_SHUFFLE(2, 0, 2, 0));\r\n\r\n\t//\tvalType Determinant = m[0][0] * Inverse[0][0]\r\n\t//\t\t\t\t\t\t+ m[0][1] * Inverse[1][0]\r\n\t//\t\t\t\t\t\t+ m[0][2] * Inverse[2][0]\r\n\t//\t\t\t\t\t\t+ m[0][3] * Inverse[3][0];\r\n\t__m128 Det0 = sse_dot_ps(in[0], Row2);\r\n\treturn Det0;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_detd_ps\r\n(\r\n\t__m128 const m[4]\r\n)\r\n{\r\n\t// _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(\r\n\r\n\t//T SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\r\n\t//T SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\r\n\t//T SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\r\n\t//T SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\r\n\t//T SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\r\n\t//T SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\r\n\r\n\t// First 2 columns\r\n \t__m128 Swp2A = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[2]), _MM_SHUFFLE(0, 1, 1, 2)));\r\n \t__m128 Swp3A = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[3]), _MM_SHUFFLE(3, 2, 3, 3)));\r\n\t__m128 MulA = _mm_mul_ps(Swp2A, Swp3A);\r\n\r\n\t// Second 2 columns\r\n\t__m128 Swp2B = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[2]), _MM_SHUFFLE(3, 2, 3, 3)));\r\n\t__m128 Swp3B = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[3]), _MM_SHUFFLE(0, 1, 1, 2)));\r\n\t__m128 MulB = _mm_mul_ps(Swp2B, Swp3B);\r\n\r\n\t// Columns subtraction\r\n\t__m128 SubE = _mm_sub_ps(MulA, MulB);\r\n\r\n\t// Last 2 rows\r\n\t__m128 Swp2C = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[2]), _MM_SHUFFLE(0, 0, 1, 2)));\r\n\t__m128 Swp3C = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[3]), _MM_SHUFFLE(1, 2, 0, 0)));\r\n\t__m128 MulC = _mm_mul_ps(Swp2C, Swp3C);\r\n\t__m128 SubF = _mm_sub_ps(_mm_movehl_ps(MulC, MulC), MulC);\r\n\r\n\t//detail::tvec4<T, P> DetCof(\r\n\t//\t+ (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02),\r\n\t//\t- (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04),\r\n\t//\t+ (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05),\r\n\t//\t- (m[1][0] * SubFactor02 - m[1][1] * SubFactor04 + m[1][2] * SubFactor05));\r\n\r\n\t__m128 SubFacA = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(SubE), _MM_SHUFFLE(2, 1, 0, 0)));\r\n\t__m128 SwpFacA = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[1]), _MM_SHUFFLE(0, 0, 0, 1)));\r\n\t__m128 MulFacA = _mm_mul_ps(SwpFacA, SubFacA);\r\n\r\n\t__m128 SubTmpB = _mm_shuffle_ps(SubE, SubF, _MM_SHUFFLE(0, 0, 3, 1));\r\n\t__m128 SubFacB = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(SubTmpB), _MM_SHUFFLE(3, 1, 1, 0)));//SubF[0], SubE[3], SubE[3], SubE[1];\r\n\t__m128 SwpFacB = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[1]), _MM_SHUFFLE(1, 1, 2, 2)));\r\n\t__m128 MulFacB = _mm_mul_ps(SwpFacB, SubFacB);\r\n\r\n\t__m128 SubRes = _mm_sub_ps(MulFacA, MulFacB);\r\n\r\n\t__m128 SubTmpC = _mm_shuffle_ps(SubE, SubF, _MM_SHUFFLE(1, 0, 2, 2));\r\n\t__m128 SubFacC = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(SubTmpC), _MM_SHUFFLE(3, 3, 2, 0)));\r\n\t__m128 SwpFacC = _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(m[1]), _MM_SHUFFLE(2, 3, 3, 3)));\r\n\t__m128 MulFacC = _mm_mul_ps(SwpFacC, SubFacC);\r\n\r\n\t__m128 AddRes = _mm_add_ps(SubRes, MulFacC);\r\n\t__m128 DetCof = _mm_mul_ps(AddRes, _mm_setr_ps( 1.0f,-1.0f, 1.0f,-1.0f));\r\n\r\n\t//return m[0][0] * DetCof[0]\r\n\t//\t + m[0][1] * DetCof[1]\r\n\t//\t + m[0][2] * DetCof[2]\r\n\t//\t + m[0][3] * DetCof[3];\r\n\r\n\treturn sse_dot_ps(m[0], DetCof);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER __m128 sse_det_ps\r\n(\r\n\t__m128 const m[4]\r\n)\r\n{\r\n\t// _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(add)\r\n\r\n\t//T SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\r\n\t//T SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\r\n\t//T SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\r\n\t//T SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\r\n\t//T SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\r\n\t//T SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\r\n\r\n\t// First 2 columns\r\n \t__m128 Swp2A = _mm_shuffle_ps(m[2], m[2], _MM_SHUFFLE(0, 1, 1, 2));\r\n \t__m128 Swp3A = _mm_shuffle_ps(m[3], m[3], _MM_SHUFFLE(3, 2, 3, 3));\r\n\t__m128 MulA = _mm_mul_ps(Swp2A, Swp3A);\r\n\r\n\t// Second 2 columns\r\n\t__m128 Swp2B = _mm_shuffle_ps(m[2], m[2], _MM_SHUFFLE(3, 2, 3, 3));\r\n\t__m128 Swp3B = _mm_shuffle_ps(m[3], m[3], _MM_SHUFFLE(0, 1, 1, 2));\r\n\t__m128 MulB = _mm_mul_ps(Swp2B, Swp3B);\r\n\r\n\t// Columns subtraction\r\n\t__m128 SubE = _mm_sub_ps(MulA, MulB);\r\n\r\n\t// Last 2 rows\r\n\t__m128 Swp2C = _mm_shuffle_ps(m[2], m[2], _MM_SHUFFLE(0, 0, 1, 2));\r\n\t__m128 Swp3C = _mm_shuffle_ps(m[3], m[3], _MM_SHUFFLE(1, 2, 0, 0));\r\n\t__m128 MulC = _mm_mul_ps(Swp2C, Swp3C);\r\n\t__m128 SubF = _mm_sub_ps(_mm_movehl_ps(MulC, MulC), MulC);\r\n\r\n\t//detail::tvec4<T, P> DetCof(\r\n\t//\t+ (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02),\r\n\t//\t- (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04),\r\n\t//\t+ (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05),\r\n\t//\t- (m[1][0] * SubFactor02 - m[1][1] * SubFactor04 + m[1][2] * SubFactor05));\r\n\r\n\t__m128 SubFacA = _mm_shuffle_ps(SubE, SubE, _MM_SHUFFLE(2, 1, 0, 0));\r\n\t__m128 SwpFacA = _mm_shuffle_ps(m[1], m[1], _MM_SHUFFLE(0, 0, 0, 1));\r\n\t__m128 MulFacA = _mm_mul_ps(SwpFacA, SubFacA);\r\n\r\n\t__m128 SubTmpB = _mm_shuffle_ps(SubE, SubF, _MM_SHUFFLE(0, 0, 3, 1));\r\n\t__m128 SubFacB = _mm_shuffle_ps(SubTmpB, SubTmpB, _MM_SHUFFLE(3, 1, 1, 0));//SubF[0], SubE[3], SubE[3], SubE[1];\r\n\t__m128 SwpFacB = _mm_shuffle_ps(m[1], m[1], _MM_SHUFFLE(1, 1, 2, 2));\r\n\t__m128 MulFacB = _mm_mul_ps(SwpFacB, SubFacB);\r\n\r\n\t__m128 SubRes = _mm_sub_ps(MulFacA, MulFacB);\r\n\r\n\t__m128 SubTmpC = _mm_shuffle_ps(SubE, SubF, _MM_SHUFFLE(1, 0, 2, 2));\r\n\t__m128 SubFacC = _mm_shuffle_ps(SubTmpC, SubTmpC, _MM_SHUFFLE(3, 3, 2, 0));\r\n\t__m128 SwpFacC = _mm_shuffle_ps(m[1], m[1], _MM_SHUFFLE(2, 3, 3, 3));\r\n\t__m128 MulFacC = _mm_mul_ps(SwpFacC, SubFacC);\r\n\r\n\t__m128 AddRes = _mm_add_ps(SubRes, MulFacC);\r\n\t__m128 DetCof = _mm_mul_ps(AddRes, _mm_setr_ps( 1.0f,-1.0f, 1.0f,-1.0f));\r\n\r\n\t//return m[0][0] * DetCof[0]\r\n\t//\t + m[0][1] * DetCof[1]\r\n\t//\t + m[0][2] * DetCof[2]\r\n\t//\t + m[0][3] * DetCof[3];\r\n\r\n\treturn sse_dot_ps(m[0], DetCof);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER void sse_inverse_ps(__m128 const in[4], __m128 out[4])\r\n{\r\n\t__m128 Fac0;\r\n\t{\r\n\t\t//\tvalType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\r\n\t\t//\tvalType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\r\n\t\t//\tvalType SubFactor06 = m[1][2] * m[3][3] - m[3][2] * m[1][3];\r\n\t\t//\tvalType SubFactor13 = m[1][2] * m[2][3] - m[2][2] * m[1][3];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac0 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 Fac1;\r\n\t{\r\n\t\t//\tvalType SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\r\n\t\t//\tvalType SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\r\n\t\t//\tvalType SubFactor07 = m[1][1] * m[3][3] - m[3][1] * m[1][3];\r\n\t\t//\tvalType SubFactor14 = m[1][1] * m[2][3] - m[2][1] * m[1][3];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac1 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\r\n\t__m128 Fac2;\r\n\t{\r\n\t\t//\tvalType SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\r\n\t\t//\tvalType SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\r\n\t\t//\tvalType SubFactor08 = m[1][1] * m[3][2] - m[3][1] * m[1][2];\r\n\t\t//\tvalType SubFactor15 = m[1][1] * m[2][2] - m[2][1] * m[1][2];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac2 = _mm_sub_ps(Mul00, Mul01);\r\n    }\r\n\r\n\t__m128 Fac3;\r\n\t{\r\n\t\t//\tvalType SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\r\n\t\t//\tvalType SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\r\n\t\t//\tvalType SubFactor09 = m[1][0] * m[3][3] - m[3][0] * m[1][3];\r\n\t\t//\tvalType SubFactor16 = m[1][0] * m[2][3] - m[2][0] * m[1][3];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac3 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 Fac4;\r\n\t{\r\n\t\t//\tvalType SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\r\n\t\t//\tvalType SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\r\n\t\t//\tvalType SubFactor10 = m[1][0] * m[3][2] - m[3][0] * m[1][2];\r\n\t\t//\tvalType SubFactor17 = m[1][0] * m[2][2] - m[2][0] * m[1][2];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac4 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 Fac5;\r\n\t{\r\n\t\t//\tvalType SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\r\n\t\t//\tvalType SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\r\n\t\t//\tvalType SubFactor12 = m[1][0] * m[3][1] - m[3][0] * m[1][1];\r\n\t\t//\tvalType SubFactor18 = m[1][0] * m[2][1] - m[2][0] * m[1][1];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac5 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 SignA = _mm_set_ps( 1.0f,-1.0f, 1.0f,-1.0f);\r\n\t__m128 SignB = _mm_set_ps(-1.0f, 1.0f,-1.0f, 1.0f);\r\n\r\n\t// m[1][0]\r\n\t// m[0][0]\r\n\t// m[0][0]\r\n\t// m[0][0]\r\n\t__m128 Temp0 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 Vec0 = _mm_shuffle_ps(Temp0, Temp0, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// m[1][1]\r\n\t// m[0][1]\r\n\t// m[0][1]\r\n\t// m[0][1]\r\n\t__m128 Temp1 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t__m128 Vec1 = _mm_shuffle_ps(Temp1, Temp1, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// m[1][2]\r\n\t// m[0][2]\r\n\t// m[0][2]\r\n\t// m[0][2]\r\n\t__m128 Temp2 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t__m128 Vec2 = _mm_shuffle_ps(Temp2, Temp2, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// m[1][3]\r\n\t// m[0][3]\r\n\t// m[0][3]\r\n\t// m[0][3]\r\n\t__m128 Temp3 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t__m128 Vec3 = _mm_shuffle_ps(Temp3, Temp3, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// col0\r\n\t// + (Vec1[0] * Fac0[0] - Vec2[0] * Fac1[0] + Vec3[0] * Fac2[0]),\r\n\t// - (Vec1[1] * Fac0[1] - Vec2[1] * Fac1[1] + Vec3[1] * Fac2[1]),\r\n\t// + (Vec1[2] * Fac0[2] - Vec2[2] * Fac1[2] + Vec3[2] * Fac2[2]),\r\n\t// - (Vec1[3] * Fac0[3] - Vec2[3] * Fac1[3] + Vec3[3] * Fac2[3]),\r\n\t__m128 Mul00 = _mm_mul_ps(Vec1, Fac0);\r\n\t__m128 Mul01 = _mm_mul_ps(Vec2, Fac1);\r\n\t__m128 Mul02 = _mm_mul_ps(Vec3, Fac2);\r\n\t__m128 Sub00 = _mm_sub_ps(Mul00, Mul01);\r\n\t__m128 Add00 = _mm_add_ps(Sub00, Mul02);\r\n\t__m128 Inv0 = _mm_mul_ps(SignB, Add00);\r\n\r\n\t// col1\r\n\t// - (Vec0[0] * Fac0[0] - Vec2[0] * Fac3[0] + Vec3[0] * Fac4[0]),\r\n\t// + (Vec0[0] * Fac0[1] - Vec2[1] * Fac3[1] + Vec3[1] * Fac4[1]),\r\n\t// - (Vec0[0] * Fac0[2] - Vec2[2] * Fac3[2] + Vec3[2] * Fac4[2]),\r\n\t// + (Vec0[0] * Fac0[3] - Vec2[3] * Fac3[3] + Vec3[3] * Fac4[3]),\r\n\t__m128 Mul03 = _mm_mul_ps(Vec0, Fac0);\r\n\t__m128 Mul04 = _mm_mul_ps(Vec2, Fac3);\r\n\t__m128 Mul05 = _mm_mul_ps(Vec3, Fac4);\r\n\t__m128 Sub01 = _mm_sub_ps(Mul03, Mul04);\r\n\t__m128 Add01 = _mm_add_ps(Sub01, Mul05);\r\n\t__m128 Inv1 = _mm_mul_ps(SignA, Add01);\r\n\r\n\t// col2\r\n\t// + (Vec0[0] * Fac1[0] - Vec1[0] * Fac3[0] + Vec3[0] * Fac5[0]),\r\n\t// - (Vec0[0] * Fac1[1] - Vec1[1] * Fac3[1] + Vec3[1] * Fac5[1]),\r\n\t// + (Vec0[0] * Fac1[2] - Vec1[2] * Fac3[2] + Vec3[2] * Fac5[2]),\r\n\t// - (Vec0[0] * Fac1[3] - Vec1[3] * Fac3[3] + Vec3[3] * Fac5[3]),\r\n\t__m128 Mul06 = _mm_mul_ps(Vec0, Fac1);\r\n\t__m128 Mul07 = _mm_mul_ps(Vec1, Fac3);\r\n\t__m128 Mul08 = _mm_mul_ps(Vec3, Fac5);\r\n\t__m128 Sub02 = _mm_sub_ps(Mul06, Mul07);\r\n\t__m128 Add02 = _mm_add_ps(Sub02, Mul08);\r\n\t__m128 Inv2 = _mm_mul_ps(SignB, Add02);\r\n\r\n\t// col3\r\n\t// - (Vec1[0] * Fac2[0] - Vec1[0] * Fac4[0] + Vec2[0] * Fac5[0]),\r\n\t// + (Vec1[0] * Fac2[1] - Vec1[1] * Fac4[1] + Vec2[1] * Fac5[1]),\r\n\t// - (Vec1[0] * Fac2[2] - Vec1[2] * Fac4[2] + Vec2[2] * Fac5[2]),\r\n\t// + (Vec1[0] * Fac2[3] - Vec1[3] * Fac4[3] + Vec2[3] * Fac5[3]));\r\n\t__m128 Mul09 = _mm_mul_ps(Vec0, Fac2);\r\n\t__m128 Mul10 = _mm_mul_ps(Vec1, Fac4);\r\n\t__m128 Mul11 = _mm_mul_ps(Vec2, Fac5);\r\n\t__m128 Sub03 = _mm_sub_ps(Mul09, Mul10);\r\n\t__m128 Add03 = _mm_add_ps(Sub03, Mul11);\r\n\t__m128 Inv3 = _mm_mul_ps(SignA, Add03);\r\n\r\n\t__m128 Row0 = _mm_shuffle_ps(Inv0, Inv1, _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 Row1 = _mm_shuffle_ps(Inv2, Inv3, _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 Row2 = _mm_shuffle_ps(Row0, Row1, _MM_SHUFFLE(2, 0, 2, 0));\r\n\r\n\t//\tvalType Determinant = m[0][0] * Inverse[0][0] \r\n\t//\t\t\t\t\t\t+ m[0][1] * Inverse[1][0] \r\n\t//\t\t\t\t\t\t+ m[0][2] * Inverse[2][0] \r\n\t//\t\t\t\t\t\t+ m[0][3] * Inverse[3][0];\r\n\t__m128 Det0 = sse_dot_ps(in[0], Row2);\r\n\t__m128 Rcp0 = _mm_div_ps(one, Det0);\r\n\t//__m128 Rcp0 = _mm_rcp_ps(Det0);\r\n\r\n\t//\tInverse /= Determinant;\r\n\tout[0] = _mm_mul_ps(Inv0, Rcp0);\r\n\tout[1] = _mm_mul_ps(Inv1, Rcp0);\r\n\tout[2] = _mm_mul_ps(Inv2, Rcp0);\r\n\tout[3] = _mm_mul_ps(Inv3, Rcp0);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER void sse_inverse_fast_ps(__m128 const in[4], __m128 out[4])\r\n{\r\n\t__m128 Fac0;\r\n\t{\r\n\t\t//\tvalType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\r\n\t\t//\tvalType SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\r\n\t\t//\tvalType SubFactor06 = m[1][2] * m[3][3] - m[3][2] * m[1][3];\r\n\t\t//\tvalType SubFactor13 = m[1][2] * m[2][3] - m[2][2] * m[1][3];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac0 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 Fac1;\r\n\t{\r\n\t\t//\tvalType SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\r\n\t\t//\tvalType SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\r\n\t\t//\tvalType SubFactor07 = m[1][1] * m[3][3] - m[3][1] * m[1][3];\r\n\t\t//\tvalType SubFactor14 = m[1][1] * m[2][3] - m[2][1] * m[1][3];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac1 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\r\n\t__m128 Fac2;\r\n\t{\r\n\t\t//\tvalType SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\r\n\t\t//\tvalType SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\r\n\t\t//\tvalType SubFactor08 = m[1][1] * m[3][2] - m[3][1] * m[1][2];\r\n\t\t//\tvalType SubFactor15 = m[1][1] * m[2][2] - m[2][1] * m[1][2];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac2 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 Fac3;\r\n\t{\r\n\t\t//\tvalType SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\r\n\t\t//\tvalType SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\r\n\t\t//\tvalType SubFactor09 = m[1][0] * m[3][3] - m[3][0] * m[1][3];\r\n\t\t//\tvalType SubFactor16 = m[1][0] * m[2][3] - m[2][0] * m[1][3];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac3 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 Fac4;\r\n\t{\r\n\t\t//\tvalType SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\r\n\t\t//\tvalType SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\r\n\t\t//\tvalType SubFactor10 = m[1][0] * m[3][2] - m[3][0] * m[1][2];\r\n\t\t//\tvalType SubFactor17 = m[1][0] * m[2][2] - m[2][0] * m[1][2];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(2, 2, 2, 2));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac4 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 Fac5;\r\n\t{\r\n\t\t//\tvalType SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\r\n\t\t//\tvalType SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\r\n\t\t//\tvalType SubFactor12 = m[1][0] * m[3][1] - m[3][0] * m[1][1];\r\n\t\t//\tvalType SubFactor18 = m[1][0] * m[2][1] - m[2][0] * m[1][1];\r\n\r\n\t\t__m128 Swp0a = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 Swp0b = _mm_shuffle_ps(in[3], in[2], _MM_SHUFFLE(0, 0, 0, 0));\r\n\r\n\t\t__m128 Swp00 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 Swp01 = _mm_shuffle_ps(Swp0a, Swp0a, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp02 = _mm_shuffle_ps(Swp0b, Swp0b, _MM_SHUFFLE(2, 0, 0, 0));\r\n\t\t__m128 Swp03 = _mm_shuffle_ps(in[2], in[1], _MM_SHUFFLE(1, 1, 1, 1));\r\n\r\n\t\t__m128 Mul00 = _mm_mul_ps(Swp00, Swp01);\r\n\t\t__m128 Mul01 = _mm_mul_ps(Swp02, Swp03);\r\n\t\tFac5 = _mm_sub_ps(Mul00, Mul01);\r\n\t}\r\n\r\n\t__m128 SignA = _mm_set_ps( 1.0f,-1.0f, 1.0f,-1.0f);\r\n\t__m128 SignB = _mm_set_ps(-1.0f, 1.0f,-1.0f, 1.0f);\r\n\r\n\t// m[1][0]\r\n\t// m[0][0]\r\n\t// m[0][0]\r\n\t// m[0][0]\r\n\t__m128 Temp0 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 Vec0 = _mm_shuffle_ps(Temp0, Temp0, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// m[1][1]\r\n\t// m[0][1]\r\n\t// m[0][1]\r\n\t// m[0][1]\r\n\t__m128 Temp1 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(1, 1, 1, 1));\r\n\t__m128 Vec1 = _mm_shuffle_ps(Temp1, Temp1, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// m[1][2]\r\n\t// m[0][2]\r\n\t// m[0][2]\r\n\t// m[0][2]\r\n\t__m128 Temp2 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(2, 2, 2, 2));\r\n\t__m128 Vec2 = _mm_shuffle_ps(Temp2, Temp2, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// m[1][3]\r\n\t// m[0][3]\r\n\t// m[0][3]\r\n\t// m[0][3]\r\n\t__m128 Temp3 = _mm_shuffle_ps(in[1], in[0], _MM_SHUFFLE(3, 3, 3, 3));\r\n\t__m128 Vec3 = _mm_shuffle_ps(Temp3, Temp3, _MM_SHUFFLE(2, 2, 2, 0));\r\n\r\n\t// col0\r\n\t// + (Vec1[0] * Fac0[0] - Vec2[0] * Fac1[0] + Vec3[0] * Fac2[0]),\r\n\t// - (Vec1[1] * Fac0[1] - Vec2[1] * Fac1[1] + Vec3[1] * Fac2[1]),\r\n\t// + (Vec1[2] * Fac0[2] - Vec2[2] * Fac1[2] + Vec3[2] * Fac2[2]),\r\n\t// - (Vec1[3] * Fac0[3] - Vec2[3] * Fac1[3] + Vec3[3] * Fac2[3]),\r\n\t__m128 Mul00 = _mm_mul_ps(Vec1, Fac0);\r\n\t__m128 Mul01 = _mm_mul_ps(Vec2, Fac1);\r\n\t__m128 Mul02 = _mm_mul_ps(Vec3, Fac2);\r\n\t__m128 Sub00 = _mm_sub_ps(Mul00, Mul01);\r\n\t__m128 Add00 = _mm_add_ps(Sub00, Mul02);\r\n\t__m128 Inv0 = _mm_mul_ps(SignB, Add00);\r\n\r\n\t// col1\r\n\t// - (Vec0[0] * Fac0[0] - Vec2[0] * Fac3[0] + Vec3[0] * Fac4[0]),\r\n\t// + (Vec0[0] * Fac0[1] - Vec2[1] * Fac3[1] + Vec3[1] * Fac4[1]),\r\n\t// - (Vec0[0] * Fac0[2] - Vec2[2] * Fac3[2] + Vec3[2] * Fac4[2]),\r\n\t// + (Vec0[0] * Fac0[3] - Vec2[3] * Fac3[3] + Vec3[3] * Fac4[3]),\r\n\t__m128 Mul03 = _mm_mul_ps(Vec0, Fac0);\r\n\t__m128 Mul04 = _mm_mul_ps(Vec2, Fac3);\r\n\t__m128 Mul05 = _mm_mul_ps(Vec3, Fac4);\r\n\t__m128 Sub01 = _mm_sub_ps(Mul03, Mul04);\r\n\t__m128 Add01 = _mm_add_ps(Sub01, Mul05);\r\n\t__m128 Inv1 = _mm_mul_ps(SignA, Add01);\r\n\r\n\t// col2\r\n\t// + (Vec0[0] * Fac1[0] - Vec1[0] * Fac3[0] + Vec3[0] * Fac5[0]),\r\n\t// - (Vec0[0] * Fac1[1] - Vec1[1] * Fac3[1] + Vec3[1] * Fac5[1]),\r\n\t// + (Vec0[0] * Fac1[2] - Vec1[2] * Fac3[2] + Vec3[2] * Fac5[2]),\r\n\t// - (Vec0[0] * Fac1[3] - Vec1[3] * Fac3[3] + Vec3[3] * Fac5[3]),\r\n\t__m128 Mul06 = _mm_mul_ps(Vec0, Fac1);\r\n\t__m128 Mul07 = _mm_mul_ps(Vec1, Fac3);\r\n\t__m128 Mul08 = _mm_mul_ps(Vec3, Fac5);\r\n\t__m128 Sub02 = _mm_sub_ps(Mul06, Mul07);\r\n\t__m128 Add02 = _mm_add_ps(Sub02, Mul08);\r\n\t__m128 Inv2 = _mm_mul_ps(SignB, Add02);\r\n\r\n\t// col3\r\n\t// - (Vec1[0] * Fac2[0] - Vec1[0] * Fac4[0] + Vec2[0] * Fac5[0]),\r\n\t// + (Vec1[0] * Fac2[1] - Vec1[1] * Fac4[1] + Vec2[1] * Fac5[1]),\r\n\t// - (Vec1[0] * Fac2[2] - Vec1[2] * Fac4[2] + Vec2[2] * Fac5[2]),\r\n\t// + (Vec1[0] * Fac2[3] - Vec1[3] * Fac4[3] + Vec2[3] * Fac5[3]));\r\n\t__m128 Mul09 = _mm_mul_ps(Vec0, Fac2);\r\n\t__m128 Mul10 = _mm_mul_ps(Vec1, Fac4);\r\n\t__m128 Mul11 = _mm_mul_ps(Vec2, Fac5);\r\n\t__m128 Sub03 = _mm_sub_ps(Mul09, Mul10);\r\n\t__m128 Add03 = _mm_add_ps(Sub03, Mul11);\r\n\t__m128 Inv3 = _mm_mul_ps(SignA, Add03);\r\n\r\n\t__m128 Row0 = _mm_shuffle_ps(Inv0, Inv1, _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 Row1 = _mm_shuffle_ps(Inv2, Inv3, _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 Row2 = _mm_shuffle_ps(Row0, Row1, _MM_SHUFFLE(2, 0, 2, 0));\r\n\r\n\t//\tvalType Determinant = m[0][0] * Inverse[0][0] \r\n\t//\t\t\t\t\t\t+ m[0][1] * Inverse[1][0] \r\n\t//\t\t\t\t\t\t+ m[0][2] * Inverse[2][0] \r\n\t//\t\t\t\t\t\t+ m[0][3] * Inverse[3][0];\r\n\t__m128 Det0 = sse_dot_ps(in[0], Row2);\r\n\t__m128 Rcp0 = _mm_rcp_ps(Det0);\r\n\t//__m128 Rcp0 = _mm_div_ps(one, Det0);\r\n\t//\tInverse /= Determinant;\r\n\tout[0] = _mm_mul_ps(Inv0, Rcp0);\r\n\tout[1] = _mm_mul_ps(Inv1, Rcp0);\r\n\tout[2] = _mm_mul_ps(Inv2, Rcp0);\r\n\tout[3] = _mm_mul_ps(Inv3, Rcp0);\r\n}\r\n/*\r\nGLM_FUNC_QUALIFIER void sse_rotate_ps(__m128 const in[4], float Angle, float const v[3], __m128 out[4])\r\n{\r\n\tfloat a = glm::radians(Angle);\r\n    float c = cos(a);\r\n    float s = sin(a);\r\n\r\n\tglm::vec4 AxisA(v[0], v[1], v[2], float(0));\r\n\t__m128 AxisB = _mm_set_ps(AxisA.w, AxisA.z, AxisA.y, AxisA.x);\r\n    __m128 AxisC = detail::sse_nrm_ps(AxisB);\r\n\r\n\t__m128 Cos0 = _mm_set_ss(c);\r\n\t__m128 CosA = _mm_shuffle_ps(Cos0, Cos0, _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 Sin0 = _mm_set_ss(s);\r\n\t__m128 SinA = _mm_shuffle_ps(Sin0, Sin0, _MM_SHUFFLE(0, 0, 0, 0));\r\n\r\n\t// detail::tvec3<T, P> temp = (valType(1) - c) * axis;\r\n\t__m128 Temp0 = _mm_sub_ps(one, CosA);\r\n\t__m128 Temp1 = _mm_mul_ps(Temp0, AxisC);\r\n\t\r\n\t//Rotate[0][0] = c + temp[0] * axis[0];\r\n\t//Rotate[0][1] = 0 + temp[0] * axis[1] + s * axis[2];\r\n\t//Rotate[0][2] = 0 + temp[0] * axis[2] - s * axis[1];\r\n\t__m128 Axis0 = _mm_shuffle_ps(AxisC, AxisC, _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 TmpA0 = _mm_mul_ps(Axis0, AxisC);\r\n\t__m128 CosA0 = _mm_shuffle_ps(Cos0, Cos0, _MM_SHUFFLE(1, 1, 1, 0));\r\n\t__m128 TmpA1 = _mm_add_ps(CosA0, TmpA0);\r\n\t__m128 SinA0 = SinA;//_mm_set_ps(0.0f, s, -s, 0.0f);\r\n\t__m128 TmpA2 = _mm_shuffle_ps(AxisC, AxisC, _MM_SHUFFLE(3, 1, 2, 3));\r\n\t__m128 TmpA3 = _mm_mul_ps(SinA0, TmpA2);\r\n\t__m128 TmpA4 = _mm_add_ps(TmpA1, TmpA3);\r\n\r\n\t//Rotate[1][0] = 0 + temp[1] * axis[0] - s * axis[2];\r\n\t//Rotate[1][1] = c + temp[1] * axis[1];\r\n\t//Rotate[1][2] = 0 + temp[1] * axis[2] + s * axis[0];\r\n\t__m128 Axis1 = _mm_shuffle_ps(AxisC, AxisC, _MM_SHUFFLE(1, 1, 1, 1));\r\n\t__m128 TmpB0 = _mm_mul_ps(Axis1, AxisC);\r\n\t__m128 CosA1 = _mm_shuffle_ps(Cos0, Cos0, _MM_SHUFFLE(1, 1, 0, 1));\r\n\t__m128 TmpB1 = _mm_add_ps(CosA1, TmpB0);\r\n\t__m128 SinB0 = SinA;//_mm_set_ps(-s, 0.0f, s, 0.0f);\r\n\t__m128 TmpB2 = _mm_shuffle_ps(AxisC, AxisC, _MM_SHUFFLE(3, 0, 3, 2));\r\n\t__m128 TmpB3 = _mm_mul_ps(SinA0, TmpB2);\r\n\t__m128 TmpB4 = _mm_add_ps(TmpB1, TmpB3);\r\n\r\n    //Rotate[2][0] = 0 + temp[2] * axis[0] + s * axis[1];\r\n    //Rotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0];\r\n    //Rotate[2][2] = c + temp[2] * axis[2];\r\n\t__m128 Axis2 = _mm_shuffle_ps(AxisC, AxisC, _MM_SHUFFLE(2, 2, 2, 2));\r\n\t__m128 TmpC0 = _mm_mul_ps(Axis2, AxisC);\r\n\t__m128 CosA2 = _mm_shuffle_ps(Cos0, Cos0, _MM_SHUFFLE(1, 0, 1, 1));\r\n\t__m128 TmpC1 = _mm_add_ps(CosA2, TmpC0);\r\n\t__m128 SinC0 = SinA;//_mm_set_ps(s, -s, 0.0f, 0.0f);\r\n\t__m128 TmpC2 = _mm_shuffle_ps(AxisC, AxisC, _MM_SHUFFLE(3, 3, 0, 1));\r\n\t__m128 TmpC3 = _mm_mul_ps(SinA0, TmpC2);\r\n\t__m128 TmpC4 = _mm_add_ps(TmpC1, TmpC3);\r\n\r\n\t__m128 Result[4];\r\n\tResult[0] = TmpA4;\r\n\tResult[1] = TmpB4;\r\n\tResult[2] = TmpC4;\r\n\tResult[3] = _mm_set_ps(1, 0, 0, 0);\r\n\r\n\t//detail::tmat4x4<valType> Result(detail::tmat4x4<valType>::_null);\r\n\t//Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2];\r\n\t//Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2];\r\n\t//Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2];\r\n\t//Result[3] = m[3];\r\n\t//return Result;\r\n\tsse_mul_ps(in, Result, out);\r\n}\r\n*/\r\nGLM_FUNC_QUALIFIER void sse_outer_ps(__m128 const & c, __m128 const & r, __m128 out[4])\r\n{\r\n\tout[0] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(0, 0, 0, 0)));\r\n\tout[1] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(1, 1, 1, 1)));\r\n\tout[2] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(2, 2, 2, 2)));\r\n\tout[3] = _mm_mul_ps(c, _mm_shuffle_ps(r, r, _MM_SHUFFLE(3, 3, 3, 3)));\r\n}\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/detail/intrinsic_trigonometric.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_trigonometric.hpp\r\n/// @date 2009-06-09 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_detail_intrinsic_trigonometric\r\n#define glm_detail_intrinsic_trigonometric\r\n\r\n#include \"setup.hpp\"\r\n\r\n#if(!(GLM_ARCH & GLM_ARCH_SSE2))\r\n#\terror \"SSE2 instructions not supported or enabled\"\r\n#else\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#include \"intrinsic_trigonometric.inl\"\r\n\r\n#endif//GLM_ARCH\r\n#endif//glm_detail_intrinsic_trigonometric\r\n"
  },
  {
    "path": "gpu/glm/detail/intrinsic_trigonometric.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_trigonometric.inl\r\n/// @date 2011-06-15 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n"
  },
  {
    "path": "gpu/glm/detail/intrinsic_vector_relational.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_vector_relational.hpp\r\n/// @date 2009-06-09 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_detail_intrinsic_vector_relational\r\n#define glm_detail_intrinsic_vector_relational\r\n\r\n#include \"setup.hpp\"\r\n\r\n#if(!(GLM_ARCH & GLM_ARCH_SSE2))\r\n#\terror \"SSE2 instructions not supported or enabled\"\r\n#else\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#include \"intrinsic_vector_relational.inl\"\r\n\r\n#endif//GLM_ARCH\r\n#endif//glm_detail_intrinsic_vector_relational\r\n"
  },
  {
    "path": "gpu/glm/detail/intrinsic_vector_relational.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/intrinsic_vector_relational.inl\r\n/// @date 2009-06-09 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n//\r\n//// lessThan\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec2<T, P>::bool_type lessThan\r\n//(\r\n//\tdetail::tvec2<T, P> const & x, \r\n//\tdetail::tvec2<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\r\n//    return typename detail::tvec2<bool>::bool_type(x.x < y.x, x.y < y.y);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec3<T, P>::bool_type lessThan\r\n//(\r\n//\tdetail::tvec3<T, P> const & x, \r\n//\tdetail::tvec3<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\t\r\n//\treturn typename detail::tvec3<bool>::bool_type(x.x < y.x, x.y < y.y, x.z < y.z);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec4<T, P>::bool_type lessThan\r\n//(\r\n//\tdetail::tvec4<T, P> const & x, \r\n//\tdetail::tvec4<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\r\n//\treturn typename detail::tvec4<bool>::bool_type(x.x < y.x, x.y < y.y, x.z < y.z, x.w < y.w);\r\n//}\r\n//\r\n//// lessThanEqual\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec2<T, P>::bool_type lessThanEqual\r\n//(\r\n//\tdetail::tvec2<T, P> const & x, \r\n//\tdetail::tvec2<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\r\n//\treturn typename detail::tvec2<bool>::bool_type(x.x <= y.x, x.y <= y.y);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec3<T, P>::bool_type lessThanEqual\r\n//(\r\n//\tdetail::tvec3<T, P> const & x, \r\n//\tdetail::tvec3<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\t\r\n//\treturn typename detail::tvec3<bool>::bool_type(x.x <= y.x, x.y <= y.y, x.z <= y.z);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec4<T, P>::bool_type lessThanEqual\r\n//(\r\n//\tdetail::tvec4<T, P> const & x, \r\n//\tdetail::tvec4<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\t\r\n//\treturn typename detail::tvec4<bool>::bool_type(x.x <= y.x, x.y <= y.y, x.z <= y.z, x.w <= y.w);\r\n//}\r\n//\r\n//// greaterThan\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec2<T, P>::bool_type greaterThan\r\n//(\r\n//\tdetail::tvec2<T, P> const & x, \r\n//\tdetail::tvec2<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\r\n//\treturn typename detail::tvec2<bool>::bool_type(x.x > y.x, x.y > y.y);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec3<T, P>::bool_type greaterThan\r\n//(\r\n//\tdetail::tvec3<T, P> const & x, \r\n//\tdetail::tvec3<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\t\r\n//\treturn typename detail::tvec3<bool>::bool_type(x.x > y.x, x.y > y.y, x.z > y.z);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec4<T, P>::bool_type greaterThan\r\n//(\r\n//\tdetail::tvec4<T, P> const & x, \r\n//\tdetail::tvec4<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\t\r\n//\treturn typename detail::tvec4<bool>::bool_type(x.x > y.x, x.y > y.y, x.z > y.z, x.w > y.w);\r\n//}\r\n//\r\n//// greaterThanEqual\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec2<T, P>::bool_type greaterThanEqual\r\n//(\r\n//\tdetail::tvec2<T, P> const & x, \r\n//\tdetail::tvec2<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\r\n//\treturn typename detail::tvec2<bool>::bool_type(x.x >= y.x, x.y >= y.y);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec3<T, P>::bool_type greaterThanEqual\r\n//(\r\n//\tdetail::tvec3<T, P> const & x, \r\n//\tdetail::tvec3<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\r\n//\treturn typename detail::tvec3<bool>::bool_type(x.x >= y.x, x.y >= y.y, x.z >= y.z);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec4<T, P>::bool_type greaterThanEqual\r\n//(\r\n//\tdetail::tvec4<T, P> const & x, \r\n//\tdetail::tvec4<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint);\r\n//\r\n//\treturn typename detail::tvec4<bool>::bool_type(x.x >= y.x, x.y >= y.y, x.z >= y.z, x.w >= y.w);\r\n//}\r\n//\r\n//// equal\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec2<T, P>::bool_type equal\r\n//(\r\n//\tdetail::tvec2<T, P> const & x, \r\n//\tdetail::tvec2<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint || \r\n//\t\tdetail::type<valType>::is_bool);\r\n//\r\n//\treturn typename detail::tvec2<T, P>::bool_type(x.x == y.x, x.y == y.y);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec3<T, P>::bool_type equal\r\n//(\r\n//\tdetail::tvec3<T, P> const & x, \r\n//\tdetail::tvec3<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint || \r\n//\t\tdetail::type<valType>::is_bool);\r\n//\r\n//\treturn typename detail::tvec3<T, P>::bool_type(x.x == y.x, x.y == y.y, x.z == y.z);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec4<T, P>::bool_type equal\r\n//(\r\n//\tdetail::tvec4<T, P> const & x, \r\n//\tdetail::tvec4<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint || \r\n//\t\tdetail::type<valType>::is_bool);\r\n//\r\n//\treturn typename detail::tvec4<T, P>::bool_type(x.x == y.x, x.y == y.y, x.z == y.z, x.w == y.w);\r\n//}\r\n//\r\n//// notEqual\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec2<T, P>::bool_type notEqual\r\n//(\r\n//\tdetail::tvec2<T, P> const & x, \r\n//\tdetail::tvec2<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint || \r\n//\t\tdetail::type<valType>::is_bool);\r\n//\r\n//\treturn typename detail::tvec2<T, P>::bool_type(x.x != y.x, x.y != y.y);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec3<T, P>::bool_type notEqual\r\n//(\r\n//\tdetail::tvec3<T, P> const & x, \r\n//\tdetail::tvec3<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint || \r\n//\t\tdetail::type<valType>::is_bool);\r\n//\r\n//\treturn typename detail::tvec3<T, P>::bool_type(x.x != y.x, x.y != y.y, x.z != y.z);\r\n//}\r\n//\r\n//template <typename valType>\r\n//GLM_FUNC_QUALIFIER typename detail::tvec4<T, P>::bool_type notEqual\r\n//(\r\n//\tdetail::tvec4<T, P> const & x, \r\n//\tdetail::tvec4<T, P> const & y\r\n//)\r\n//{\r\n//\tGLM_STATIC_ASSERT(\r\n//\t\tdetail::type<valType>::is_float || \r\n//\t\tdetail::type<valType>::is_int || \r\n//\t\tdetail::type<valType>::is_uint || \r\n//\t\tdetail::type<valType>::is_bool);\r\n//\r\n//\treturn typename detail::tvec4<T, P>::bool_type(x.x != y.x, x.y != y.y, x.z != y.z, x.w != y.w);\r\n//}\r\n//\r\n//// any\r\n//GLM_FUNC_QUALIFIER bool any(detail::tvec2<bool> const & x)\r\n//{\r\n//\treturn x.x || x.y;\r\n//}\r\n//\r\n//GLM_FUNC_QUALIFIER bool any(detail::tvec3<bool> const & x)\r\n//{\r\n//    return x.x || x.y || x.z;\r\n//}\r\n//\r\n//GLM_FUNC_QUALIFIER bool any(detail::tvec4<bool> const & x)\r\n//{\r\n//    return x.x || x.y || x.z || x.w;\r\n//}\r\n//\r\n//// all\r\n//GLM_FUNC_QUALIFIER bool all(const detail::tvec2<bool>& x)\r\n//{\r\n//    return x.x && x.y;\r\n//}\r\n//\r\n//GLM_FUNC_QUALIFIER bool all(const detail::tvec3<bool>& x)\r\n//{\r\n//    return x.x && x.y && x.z;\r\n//}\r\n//\r\n//GLM_FUNC_QUALIFIER bool all(const detail::tvec4<bool>& x)\r\n//{\r\n//    return x.x && x.y && x.z && x.w;\r\n//}\r\n//\r\n//// not\r\n//GLM_FUNC_QUALIFIER detail::tvec2<bool>::bool_type not_\r\n//(\r\n//\tdetail::tvec2<bool> const & v\r\n//)\r\n//{\r\n//    return detail::tvec2<bool>::bool_type(!v.x, !v.y);\r\n//}\r\n//\r\n//GLM_FUNC_QUALIFIER detail::tvec3<bool>::bool_type not_\r\n//(\r\n//\tdetail::tvec3<bool> const & v\r\n//)\r\n//{\r\n//    return detail::tvec3<bool>::bool_type(!v.x, !v.y, !v.z);\r\n//}\r\n//\r\n//GLM_FUNC_QUALIFIER detail::tvec4<bool>::bool_type not_\r\n//(\r\n//\tdetail::tvec4<bool> const & v\r\n//)\r\n//{\r\n//    return detail::tvec4<bool>::bool_type(!v.x, !v.y, !v.z, !v.w);\r\n//}"
  },
  {
    "path": "gpu/glm/detail/precision.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n///\r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n///\r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/precision.hpp\r\n/// @date 2013-04-01 / 2013-04-01\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_CORE_PRECISION_INCLUDED\r\n#define GLM_CORE_PRECISION_INCLUDED\r\n\r\nnamespace glm\r\n{\r\n\tenum precision\r\n\t{\r\n\t\thighp,\r\n\t\tmediump,\r\n\t\tlowp,\r\n\t\tdefaultp = highp\r\n\t};\r\n}//namespace glm\r\n\r\n#endif//GLM_CORE_PRECISION_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/detail/precision.inl",
    "content": ""
  },
  {
    "path": "gpu/glm/detail/setup.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/setup.hpp\r\n/// @date 2006-11-13 / 2013-03-30\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_SETUP_INCLUDED\r\n#define GLM_SETUP_INCLUDED\r\n\r\n#include <cassert>\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Version\r\n\r\n#define GLM_VERSION\t\t\t\t\t95\r\n#define GLM_VERSION_MAJOR\t\t\t0\r\n#define GLM_VERSION_MINOR\t\t\t9\r\n#define GLM_VERSION_PATCH\t\t\t5\r\n#define GLM_VERSION_REVISION\t\t2\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Platform\r\n\r\n#define GLM_PLATFORM_UNKNOWN\t\t0x00000000\r\n#define GLM_PLATFORM_WINDOWS\t\t0x00010000\r\n#define GLM_PLATFORM_LINUX\t\t\t0x00020000\r\n#define GLM_PLATFORM_APPLE\t\t\t0x00040000\r\n//#define GLM_PLATFORM_IOS\t\t\t0x00080000\r\n#define GLM_PLATFORM_ANDROID\t\t0x00100000\r\n#define GLM_PLATFORM_CHROME_NACL\t0x00200000\r\n#define GLM_PLATFORM_UNIX\t\t\t0x00400000\r\n#define GLM_PLATFORM_QNXNTO\t\t\t0x00800000\r\n#define GLM_PLATFORM_WINCE\t\t\t0x01000000\r\n\r\n#ifdef GLM_FORCE_PLATFORM_UNKNOWN\r\n#\tdefine GLM_PLATFORM GLM_PLATFORM_UNKNOWN\r\n#elif defined(__QNXNTO__)\r\n#\tdefine GLM_PLATFORM GLM_PLATFORM_QNXNTO\r\n#elif defined(__APPLE__)\r\n#\tdefine GLM_PLATFORM GLM_PLATFORM_APPLE\r\n#elif defined(WINCE)\r\n#\tdefine GLM_PLATFORM GLM_PLATFORM_WINCE\r\n#elif defined(_WIN32)\r\n#\tdefine GLM_PLATFORM GLM_PLATFORM_WINDOWS\r\n#elif defined(__native_client__)\r\n#\tdefine GLM_PLATFORM GLM_PLATFORM_CHROME_NACL\r\n#elif defined(__ANDROID__)\r\n#\tdefine GLM_PLATFORM GLM_PLATFORM_ANDROID\r\n#elif defined(__linux)\r\n#\tdefine GLM_PLATFORM GLM_PLATFORM_LINUX\r\n#elif defined(__unix)\r\n#\tdefine GLM_PLATFORM GLM_PLATFORM_UNIX\r\n#else\r\n#\tdefine GLM_PLATFORM GLM_PLATFORM_UNKNOWN\r\n#endif//\r\n\r\n// Report platform detection\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_PLATFORM_DISPLAYED))\r\n#\tdefine GLM_MESSAGE_PLATFORM_DISPLAYED\r\n#\tif(GLM_PLATFORM & GLM_PLATFORM_QNXNTO)\r\n#\t\tpragma message(\"GLM: QNX platform detected\")\r\n//#\telif(GLM_PLATFORM & GLM_PLATFORM_IOS)\r\n//#\t\tpragma message(\"GLM: iOS platform detected\")\r\n#\telif(GLM_PLATFORM & GLM_PLATFORM_APPLE)\r\n#\t\tpragma message(\"GLM: Apple platform detected\")\r\n#\telif(GLM_PLATFORM & GLM_PLATFORM_WINCE)\r\n#\t\tpragma message(\"GLM: WinCE platform detected\")\r\n#\telif(GLM_PLATFORM & GLM_PLATFORM_WINDOWS)\r\n#\t\tpragma message(\"GLM: Windows platform detected\")\r\n#\telif(GLM_PLATFORM & GLM_PLATFORM_CHROME_NACL)\r\n#\t\tpragma message(\"GLM: Native Client detected\")\r\n#\telif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)\r\n#\t\tpragma message(\"GLM: Android platform detected\")\r\n#\telif(GLM_PLATFORM & GLM_PLATFORM_LINUX)\r\n#\t\tpragma message(\"GLM: Linux platform detected\")\r\n#\telif(GLM_PLATFORM & GLM_PLATFORM_UNIX)\r\n#\t\tpragma message(\"GLM: UNIX platform detected\")\r\n#\telif(GLM_PLATFORM & GLM_PLATFORM_UNKNOWN)\r\n#\t\tpragma message(\"GLM: platform unknown\")\r\n#\telse\r\n#\t\tpragma message(\"GLM: platform not detected\")\r\n#\tendif\r\n#endif//GLM_MESSAGE\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Compiler\r\n\r\n// User defines: GLM_FORCE_COMPILER_UNKNOWN\r\n// TODO ? __llvm__ \r\n\r\n#define GLM_COMPILER_UNKNOWN\t\t0x00000000\r\n\r\n// Intel\r\n#define GLM_COMPILER_INTEL\t\t\t0x00100000\r\n#define GLM_COMPILER_INTEL9\t\t\t0x00100010\r\n#define GLM_COMPILER_INTEL10_0\t\t0x00100020\r\n#define GLM_COMPILER_INTEL10_1\t\t0x00100030\r\n#define GLM_COMPILER_INTEL11_0\t\t0x00100040\r\n#define GLM_COMPILER_INTEL11_1\t\t0x00100050\r\n#define GLM_COMPILER_INTEL12_0\t\t0x00100060\r\n#define GLM_COMPILER_INTEL12_1\t\t0x00100070\r\n#define GLM_COMPILER_INTEL13_0\t\t0x00100080\r\n\r\n// Visual C++ defines\r\n#define GLM_COMPILER_VC\t\t\t\t0x01000000\r\n#define GLM_COMPILER_VC8\t\t\t0x01000070\r\n#define GLM_COMPILER_VC9\t\t\t0x01000080\r\n#define GLM_COMPILER_VC10\t\t\t0x01000090\r\n#define GLM_COMPILER_VC11\t\t\t0x010000A0\r\n#define GLM_COMPILER_VC12\t\t\t0x010000B0\r\n\r\n// GCC defines\r\n#define GLM_COMPILER_GCC\t\t\t0x02000000\r\n#define GLM_COMPILER_GCC34\t\t\t0x02000050\r\n#define GLM_COMPILER_GCC35\t\t\t0x02000060\r\n#define GLM_COMPILER_GCC40\t\t\t0x02000070\r\n#define GLM_COMPILER_GCC41\t\t\t0x02000080\r\n#define GLM_COMPILER_GCC42\t\t\t0x02000090\r\n#define GLM_COMPILER_GCC43\t\t\t0x020000A0\r\n#define GLM_COMPILER_GCC44\t\t\t0x020000B0\r\n#define GLM_COMPILER_GCC45\t\t\t0x020000C0\r\n#define GLM_COMPILER_GCC46\t\t\t0x020000D0\r\n#define GLM_COMPILER_GCC47\t\t\t0x020000E0\r\n#define GLM_COMPILER_GCC48\t\t\t0x020000F0\r\n#define GLM_COMPILER_GCC49\t\t\t0x02000100\r\n\r\n// Borland C++\r\n#define GLM_COMPILER_BC\t\t\t\t0x04000000\r\n\r\n// CodeWarrior\r\n#define GLM_COMPILER_CODEWARRIOR\t0x08000000\r\n\r\n// CUDA\r\n#define GLM_COMPILER_CUDA\t\t\t0x10000000\r\n#define GLM_COMPILER_CUDA30\t\t\t0x10000010\r\n#define GLM_COMPILER_CUDA31\t\t\t0x10000020\r\n#define GLM_COMPILER_CUDA32\t\t\t0x10000030\r\n#define GLM_COMPILER_CUDA40\t\t\t0x10000040\r\n#define GLM_COMPILER_CUDA41\t\t\t0x10000050\r\n#define GLM_COMPILER_CUDA42\t\t\t0x10000060\r\n\r\n// Clang\r\n#define GLM_COMPILER_CLANG\t\t\t0x20000000\r\n#define GLM_COMPILER_CLANG26\t\t0x20000010\r\n#define GLM_COMPILER_CLANG27\t\t0x20000020\r\n#define GLM_COMPILER_CLANG28\t\t0x20000030\r\n#define GLM_COMPILER_CLANG29\t\t0x20000040\r\n#define GLM_COMPILER_CLANG30\t\t0x20000050\r\n#define GLM_COMPILER_CLANG31\t\t0x20000060\r\n#define GLM_COMPILER_CLANG32\t\t0x20000070\r\n#define GLM_COMPILER_CLANG33\t\t0x20000080\r\n#define GLM_COMPILER_CLANG40\t\t0x20000090\r\n#define GLM_COMPILER_CLANG41\t\t0x200000A0\r\n#define GLM_COMPILER_CLANG42\t\t0x200000B0\r\n#define GLM_COMPILER_CLANG43\t\t0x200000C0\r\n#define GLM_COMPILER_CLANG50\t\t0x200000D0\r\n\r\n// LLVM GCC\r\n#define GLM_COMPILER_LLVM_GCC\t\t0x40000000\r\n\r\n// Build model\r\n#define GLM_MODEL_32\t\t\t\t0x00000010\r\n#define GLM_MODEL_64\t\t\t\t0x00000020\r\n\r\n// Force generic C++ compiler\r\n#ifdef GLM_FORCE_COMPILER_UNKNOWN\r\n#\tdefine GLM_COMPILER GLM_COMPILER_UNKNOWN\r\n\r\n#elif defined(__INTEL_COMPILER)\r\n#\tif __INTEL_COMPILER == 900\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL9\r\n#\telif __INTEL_COMPILER == 1000\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL10_0\r\n#\telif __INTEL_COMPILER == 1010\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL10_1\r\n#\telif __INTEL_COMPILER == 1100\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL11_0\r\n#\telif __INTEL_COMPILER == 1110\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL11_1\r\n#\telif __INTEL_COMPILER == 1200\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL12_0\r\n#\telif __INTEL_COMPILER == 1210\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL12_1\r\n#\telif __INTEL_COMPILER >= 1300\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL13_0\r\n#\telse\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_INTEL\r\n#\tendif\r\n\r\n// CUDA\r\n#elif defined(__CUDACC__)\r\n#\tif CUDA_VERSION < 3000\r\n#\t\terror \"GLM requires CUDA 3.0 or higher\"\r\n#\telse\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CUDA\r\n#\tendif\r\n\r\n// Visual C++\r\n#elif defined(_MSC_VER)\r\n#\tif _MSC_VER < 1400\r\n#\t\terror \"GLM requires Visual C++ 2005 or higher\"\r\n#\telif _MSC_VER == 1400\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC8\r\n#\telif _MSC_VER == 1500\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC9\r\n#\telif _MSC_VER == 1600\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC10\r\n#\telif _MSC_VER == 1700\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC11\r\n#\telif _MSC_VER >= 1800\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC12\r\n#\telse//_MSC_VER\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_VC\r\n#\tendif//_MSC_VER\r\n\r\n// Clang\r\n#elif defined(__clang__)\r\n#\tif (__clang_major__ <= 1) || ((__clang_major__ == 2) && (__clang_minor__ < 6))\r\n#\t\terror \"GLM requires Clang 2.6 or higher\"\r\n#\telif(__clang_major__ == 2) && (__clang_minor__ == 6)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG26\r\n#\telif(__clang_major__ == 2) && (__clang_minor__ == 7)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG27\r\n#\telif(__clang_major__ == 2) && (__clang_minor__ == 8)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG28\r\n#\telif(__clang_major__ == 2) && (__clang_minor__ == 9)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG29\r\n#\telif(__clang_major__ == 3) && (__clang_minor__ == 0)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG30\r\n#\telif(__clang_major__ == 3) && (__clang_minor__ == 1)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG31\r\n#\telif(__clang_major__ == 3) && (__clang_minor__ == 2)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG32\r\n#\telif(__clang_major__ == 3) && (__clang_minor__ == 3)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG33\r\n#\telif(__clang_major__ == 4) && (__clang_minor__ == 0)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG40\r\n#\telif(__clang_major__ == 4) && (__clang_minor__ == 1)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG41\r\n#\telif(__clang_major__ == 4) && (__clang_minor__ == 2)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG42\r\n#\telif(__clang_major__ == 4) && (__clang_minor__ >= 3)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG43\r\n#\telif(__clang_major__ > 4)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG50\r\n#\telse\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_CLANG\r\n#\tendif\r\n\r\n// G++ \r\n#elif(defined(__GNUC__) || defined(__MINGW32__))// || defined(__llvm__) || defined(__clang__)\r\n#\tif (__GNUC__ == 3) && (__GNUC_MINOR__ == 4)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_GCC34\r\n#\telif (__GNUC__ == 3) && (__GNUC_MINOR__ == 5)\r\n#\t\tdefine GLM_COMPILER GLM_COMPILER_GCC35\r\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 0)\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC40)\r\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 1)\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC41)\r\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 2)\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC42)\r\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 3)\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC43)\r\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 4)\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC44)\r\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 5)\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC45)\r\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 6)\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC46)\r\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 7)\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC47)\r\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ == 8)\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC48)\r\n#\telif (__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC49)\r\n#\telif (__GNUC__ > 4 )\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC49)\r\n#\telse\r\n#\t\tdefine GLM_COMPILER (GLM_COMPILER_GCC)\r\n#\tendif\r\n\r\n// Borland C++\r\n#elif defined(_BORLANDC_)\r\n#\tdefine GLM_COMPILER GLM_COMPILER_BC\r\n\r\n// Codewarrior\r\n#elif defined(__MWERKS__)\r\n#\tdefine GLM_COMPILER GLM_COMPILER_CODEWARRIOR\r\n\r\n#else\r\n#\tdefine GLM_COMPILER GLM_COMPILER_UNKNOWN\r\n#endif\r\n\r\n#ifndef GLM_COMPILER\r\n#error \"GLM_COMPILER undefined, your compiler may not be supported by GLM. Add #define GLM_COMPILER 0 to ignore this message.\"\r\n#endif//GLM_COMPILER\r\n\r\n// Report compiler detection\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_COMPILER_DISPLAYED))\r\n#\tdefine GLM_MESSAGE_COMPILER_DISPLAYED\r\n#\tif(GLM_COMPILER & GLM_COMPILER_CUDA)\r\n#\t\tpragma message(\"GLM: CUDA compiler detected\")\r\n#\telif(GLM_COMPILER & GLM_COMPILER_VC)\r\n#\t\tpragma message(\"GLM: Visual C++ compiler detected\")\r\n#\telif(GLM_COMPILER & GLM_COMPILER_CLANG)\r\n#\t\tpragma message(\"GLM: Clang compiler detected\")\r\n#\telif(GLM_COMPILER & GLM_COMPILER_LLVM_GCC)\r\n#\t\tpragma message(\"GLM: LLVM GCC compiler detected\")\r\n#\telif(GLM_COMPILER & GLM_COMPILER_INTEL)\r\n#\t\tpragma message(\"GLM: Intel Compiler detected\")\r\n#\telif(GLM_COMPILER & GLM_COMPILER_GCC)\r\n#\t\tif(GLM_COMPILER == GLM_COMPILER_GCC_LLVM)\r\n#\t\t\tpragma message(\"GLM: LLVM GCC compiler detected\")\r\n#\t\telif(GLM_COMPILER == GLM_COMPILER_GCC_CLANG)\r\n#\t\t\tpragma message(\"GLM: CLANG compiler detected\")\r\n#\t\telse\r\n#\t\t\tpragma message(\"GLM: GCC compiler detected\")\r\n#\t\tendif\r\n#\telif(GLM_COMPILER & GLM_COMPILER_BC)\r\n#\t\tpragma message(\"GLM: Borland compiler detected but not supported\")\r\n#\telif(GLM_COMPILER & GLM_COMPILER_CODEWARRIOR)\r\n#\t\tpragma message(\"GLM: Codewarrior compiler detected but not supported\")\r\n#\telse\r\n#\t\tpragma message(\"GLM: Compiler not detected\")\r\n#\tendif\r\n#endif//GLM_MESSAGE\r\n\r\n/////////////////\r\n// Build model //\r\n\r\n#if(defined(__arch64__) || defined(__LP64__) || defined(_M_X64) || defined(__ppc64__) || defined(__x86_64__))\r\n#\t\tdefine GLM_MODEL\tGLM_MODEL_64\r\n#elif(defined(__i386__) || defined(__ppc__))\r\n#\tdefine GLM_MODEL\tGLM_MODEL_32\r\n#else\r\n#\tdefine GLM_MODEL\tGLM_MODEL_32\r\n#endif//\r\n\r\n#if(!defined(GLM_MODEL) && GLM_COMPILER != 0)\r\n#\terror \"GLM_MODEL undefined, your compiler may not be supported by GLM. Add #define GLM_MODEL 0 to ignore this message.\"\r\n#endif//GLM_MODEL\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_MODEL_DISPLAYED))\r\n#\tdefine GLM_MESSAGE_MODEL_DISPLAYED\r\n#\tif(GLM_MODEL == GLM_MODEL_64)\r\n#\t\tpragma message(\"GLM: 64 bits model\")\r\n#\telif(GLM_MODEL == GLM_MODEL_32)\r\n#\t\tpragma message(\"GLM: 32 bits model\")\r\n#\tendif//GLM_MODEL\r\n#endif//GLM_MESSAGE\r\n\r\n/////////////////\r\n// C++ Version //\r\n\r\n// User defines: GLM_FORCE_CXX98\r\n\r\n#define GLM_LANG_CXX_FLAG\t\t\t(1 << 0)\r\n#define GLM_LANG_CXX98_FLAG\t\t\t(1 << 1)\r\n#define GLM_LANG_CXX03_FLAG\t\t\t(1 << 2)\r\n#define GLM_LANG_CXX0X_FLAG\t\t\t(1 << 3)\r\n#define GLM_LANG_CXX11_FLAG\t\t\t(1 << 4)\r\n#define GLM_LANG_CXX1Y_FLAG\t\t\t(1 << 5)\r\n#define GLM_LANG_CXXMS_FLAG\t\t\t(1 << 6)\r\n#define GLM_LANG_CXXGNU_FLAG\t\t(1 << 7)\r\n\r\n#define GLM_LANG_CXX\t\t\tGLM_LANG_CXX_FLAG\r\n#define GLM_LANG_CXX98\t\t\t(GLM_LANG_CXX | GLM_LANG_CXX98_FLAG)\r\n#define GLM_LANG_CXX03\t\t\t(GLM_LANG_CXX98 | GLM_LANG_CXX03_FLAG)\r\n#define GLM_LANG_CXX0X\t\t\t(GLM_LANG_CXX03 | GLM_LANG_CXX0X_FLAG)\r\n#define GLM_LANG_CXX11\t\t\t(GLM_LANG_CXX0X | GLM_LANG_CXX11_FLAG)\r\n#define GLM_LANG_CXX1Y\t\t\t(GLM_LANG_CXX11 | GLM_LANG_CXX1Y_FLAG)\r\n#define GLM_LANG_CXXMS\t\t\tGLM_LANG_CXXMS_FLAG\r\n#define GLM_LANG_CXXGNU\t\t\tGLM_LANG_CXXGNU_FLAG\r\n\r\n#if(defined(GLM_FORCE_CXX1Y))\r\n#\tdefine GLM_LANG GLM_LANG_CXX1Y\r\n#elif(defined(GLM_FORCE_CXX11))\r\n#\tdefine GLM_LANG GLM_LANG_CXX11\r\n#elif(defined(GLM_FORCE_CXX03))\r\n#\tdefine GLM_LANG GLM_LANG_CXX03\r\n#elif(defined(GLM_FORCE_CXX98))\r\n#\tdefine GLM_LANG GLM_LANG_CXX98\r\n#else\r\n#\tif(__cplusplus >= 201103L)\r\n#\t\tdefine GLM_LANG GLM_LANG_CXX11\r\n#\telif((GLM_COMPILER & GLM_COMPILER_CLANG) == GLM_COMPILER_CLANG)\r\n#\t\tif(GLM_PLATFORM == GLM_PLATFORM_APPLE)\r\n#\t\t\tdefine GLM_DETAIL_MAJOR 1\r\n#\t\telse\r\n#\t\t\tdefine GLM_DETAIL_MAJOR 0\r\n#\t\tendif\r\n#\t\tif(__clang_major__ < (2 + GLM_DETAIL_MAJOR))\r\n#\t\t\tdefine GLM_LANG GLM_LANG_CXX\r\n#\t\telif(__has_feature(cxx_auto_type))\r\n#\t\t\tdefine GLM_LANG GLM_LANG_CXX0X\r\n#\t\telse\r\n#\t\t\tdefine GLM_LANG GLM_LANG_CXX98\r\n#\t\tendif\r\n#\telif((GLM_COMPILER & GLM_COMPILER_GCC) == GLM_COMPILER_GCC)\r\n#\t\tif defined(__GXX_EXPERIMENTAL_CXX0X__)\r\n#\t\t\tdefine GLM_LANG GLM_LANG_CXX0X\r\n#\t\telse\r\n#\t\t\tdefine GLM_LANG GLM_LANG_CXX98\r\n#\t\tendif\r\n#\telif(GLM_COMPILER & GLM_COMPILER_VC)\r\n#\t\tif(defined(_MSC_EXTENSIONS))\r\n#\t\t\tif(GLM_COMPILER >= GLM_COMPILER_VC10)\r\n#\t\t\t\tdefine GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG)\r\n#\t\t\telse\r\n#\t\t\t\tdefine GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG)\r\n#\t\t\tendif\r\n#\t\telse\r\n#\t\t\tif(GLM_COMPILER >= GLM_COMPILER_VC10)\r\n#\t\t\t\tdefine GLM_LANG GLM_LANG_CXX0X\r\n#\t\t\telse\r\n#\t\t\t\tdefine GLM_LANG GLM_LANG_CXX98\r\n#\t\t\tendif\r\n#\t\tendif\r\n#\telif(GLM_COMPILER & GLM_COMPILER_INTEL)\r\n#\t\tif(defined(_MSC_EXTENSIONS))\r\n#\t\t\tif(GLM_COMPILER >= GLM_COMPILER_INTEL13_0)\r\n#\t\t\t\tdefine GLM_LANG (GLM_LANG_CXX0X | GLM_LANG_CXXMS_FLAG)\r\n#\t\t\telse\r\n#\t\t\t\tdefine GLM_LANG (GLM_LANG_CXX98 | GLM_LANG_CXXMS_FLAG)\r\n#\t\t\tendif\r\n#\t\telse\r\n#\t\t\tif(GLM_COMPILER >= GLM_COMPILER_INTEL13_0)\r\n#\t\t\t\tdefine GLM_LANG (GLM_LANG_CXX0X)\r\n#\t\t\telse\r\n#\t\t\t\tdefine GLM_LANG (GLM_LANG_CXX98)\r\n#\t\t\tendif\r\n#\t\tendif\r\n#\telif(__cplusplus >= 199711L)\r\n#\t\tdefine GLM_LANG GLM_LANG_CXX98\r\n#\telse\r\n#\t\tdefine GLM_LANG GLM_LANG_CXX\r\n#\tendif\r\n#endif\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_LANG_DISPLAYED))\r\n#\tdefine GLM_MESSAGE_LANG_DISPLAYED\r\n#\tif(GLM_LANG & GLM_LANG_CXXGNU_FLAG)\r\n#\t\tpragma message(\"GLM: C++ with language extensions\")\r\n#\telif(GLM_LANG & GLM_LANG_CXXMS_FLAG)\r\n#\t\tpragma message(\"GLM: C++ with language extensions\")\r\n#\telif(GLM_LANG & GLM_LANG_CXX11_FLAG)\r\n#\t\tpragma message(\"GLM: C++11\")\r\n#\telif(GLM_LANG & GLM_LANG_CXX0X_FLAG)\r\n#\t\tpragma message(\"GLM: C++0x\")\r\n#\telif(GLM_LANG & GLM_LANG_CXX03_FLAG)\r\n#\t\tpragma message(\"GLM: C++03\")\r\n#\telif(GLM_LANG & GLM_LANG_CXX98_FLAG)\r\n#\t\tpragma message(\"GLM: C++98\")\r\n#\telse\r\n#\t\tpragma message(\"GLM: C++ language undetected\")\r\n#\tendif//GLM_MODEL\r\n#\tpragma 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\")\r\n#endif//GLM_MESSAGE\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Has of C++ features\r\n\r\n#ifndef __has_feature\r\n#\tdefine __has_feature(x) 0  // Compatibility with non-clang compilers.\r\n#endif\r\n#ifndef __has_extension\r\n#\tdefine __has_extension __has_feature // Compatibility with pre-3.0 compilers.\r\n#endif\r\n\r\n// http://clang.llvm.org/cxx_status.html\r\n// http://gcc.gnu.org/projects/cxx0x.html\r\n// http://msdn.microsoft.com/en-us/library/vstudio/hh567368(v=vs.120).aspx\r\n\r\n// N1720\r\n#define GLM_HAS_STATIC_ASSERT ( \\\r\n\t(GLM_LANG & GLM_LANG_CXX11_FLAG) || \\\r\n\t((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC10)) || \\\r\n\t((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \\\r\n\t__has_feature(cxx_static_assert))\r\n\r\n// N1988\r\n#define GLM_HAS_EXTENDED_INTEGER_TYPE ( \\\r\n\t(GLM_LANG & GLM_LANG_CXX11_FLAG) || \\\r\n\t((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC11)) || \\\r\n\t((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC43)) || \\\r\n\t((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_CLANG) && (GLM_COMPILER >= GLM_COMPILER_CLANG29)))\r\n\r\n// N2235\r\n#define GLM_HAS_CONSTEXPR ( \\\r\n\t(GLM_LANG & GLM_LANG_CXX11_FLAG) || \\\r\n\t((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)) || \\\r\n\t__has_feature(cxx_constexpr))\r\n\r\n// N2672\r\n#define GLM_HAS_INITIALIZER_LISTS ( \\\r\n\t(GLM_LANG & GLM_LANG_CXX11_FLAG) || \\\r\n\t((GLM_LANG & GLM_LANG_CXX0X_FLAG) && ((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC12))) || \\\r\n\t((GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC44)) || \\\r\n\t__has_feature(cxx_generalized_initializers))\r\n\r\n// OpenMP\r\n#ifdef _OPENMP \r\n#\tif(GLM_COMPILER & GLM_COMPILER_GCC)\r\n#\t\tif(GLM_COMPILER > GLM_COMPILER_GCC47)\r\n#\t\t\tdefine GLM_HAS_OPENMP 31\r\n#\t\telif(GLM_COMPILER > GLM_COMPILER_GCC44)\r\n#\t\t\tdefine GLM_HAS_OPENMP 30\r\n#\t\telif(GLM_COMPILER > GLM_COMPILER_GCC42)\r\n#\t\t\tdefine GLM_HAS_OPENMP 25\r\n#\t\tendif\r\n#\tendif//(GLM_COMPILER & GLM_COMPILER_GCC)\r\n\r\n#\tif(GLM_COMPILER & GLM_COMPILER_VC)\r\n#\t\tif(GLM_COMPILER > GLM_COMPILER_VC8)\r\n#\t\t\tdefine GLM_HAS_OPENMP 20\r\n#\t\tendif\r\n#\tendif//(GLM_COMPILER & GLM_COMPILER_GCC)\r\n#endif\r\n\r\n// Not standard\r\n#define GLM_HAS_ANONYMOUS_UNION (GLM_LANG & GLM_LANG_CXXMS_FLAG)\r\n\r\n/////////////////\r\n// Platform \r\n\r\n// User defines: GLM_FORCE_PURE GLM_FORCE_SSE2 GLM_FORCE_AVX\r\n\r\n#define GLM_ARCH_PURE\t\t0x0000\r\n#define GLM_ARCH_SSE2\t\t0x0001\r\n#define GLM_ARCH_SSE3\t\t0x0002// | GLM_ARCH_SSE2\r\n#define GLM_ARCH_SSE4\t\t0x0004// | GLM_ARCH_SSE3 | GLM_ARCH_SSE2\r\n#define GLM_ARCH_AVX\t\t0x0008// | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2\r\n#define GLM_ARCH_AVX2\t\t0x0010// | GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2\r\n\r\n#if(defined(GLM_FORCE_PURE))\r\n#\tdefine GLM_ARCH GLM_ARCH_PURE\r\n#elif(defined(GLM_FORCE_AVX2))\r\n#\tdefine GLM_ARCH (GLM_ARCH_AVX2 | GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\r\n#elif(defined(GLM_FORCE_AVX))\r\n#\tdefine GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\r\n#elif(defined(GLM_FORCE_SSE4))\r\n#\tdefine GLM_ARCH (GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\r\n#elif(defined(GLM_FORCE_SSE3))\r\n#\tdefine GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\r\n#elif(defined(GLM_FORCE_SSE2))\r\n#\tdefine GLM_ARCH (GLM_ARCH_SSE2)\r\n#elif((GLM_COMPILER & GLM_COMPILER_VC) && (defined(_M_IX86) || defined(_M_X64)))\r\n#\tif(GLM_PLATFORM == GLM_PLATFORM_WINCE)\r\n#\t\tdefine GLM_ARCH GLM_ARCH_PURE\r\n#\telif(defined(_M_CEE_PURE))\r\n#\t\tdefine GLM_ARCH GLM_ARCH_PURE\r\n/* TODO: Explore auto detection of instruction set support\r\n#\telif(defined(_M_IX86_FP))\r\n#\t\tif(_M_IX86_FP >= 3)\r\n#\t\t\tdefine GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\r\n#\t\telif(_M_IX86_FP >= 2)\r\n#\t\t\tdefine GLM_ARCH (GLM_ARCH_SSE2)\r\n#\t\telse\r\n#\t\t\tdefine GLM_ARCH GLM_ARCH_PURE\r\n#\t\tendif\r\n*/\r\n#\telif(GLM_COMPILER >= GLM_COMPILER_VC11)\r\n#\t\tdefine GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\r\n#\telif(GLM_COMPILER >= GLM_COMPILER_VC10)\r\n#\t\tif(_MSC_FULL_VER >= 160031118) //160031118: VC2010 SP1 beta full version\r\n#\t\t\tdefine GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)//GLM_ARCH_AVX (Require SP1)\r\n#\t\telse\r\n#\t\t\tdefine GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\r\n#\t\tendif\r\n#\telif(GLM_COMPILER >= GLM_COMPILER_VC9) \r\n#\t\tdefine GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)\r\n#\telif(GLM_COMPILER >= GLM_COMPILER_VC8)\r\n#\t\tdefine GLM_ARCH GLM_ARCH_SSE2\r\n#\telse\r\n#\t\tdefine GLM_ARCH GLM_ARCH_PURE\r\n#\tendif\r\n#elif((GLM_PLATFORM & GLM_PLATFORM_APPLE) && (GLM_COMPILER & GLM_COMPILER_GCC))\r\n#\tdefine GLM_ARCH GLM_ARCH_PURE\r\n#elif(((GLM_COMPILER & GLM_COMPILER_GCC) && (defined(__i386__) || defined(__x86_64__))) || (GLM_COMPILER & GLM_COMPILER_LLVM_GCC))\r\n#\tdefine GLM_ARCH (GLM_ARCH_PURE \\\r\n| (defined(__AVX2__) ? GLM_ARCH_AVX2 : 0) \\\r\n| (defined(__AVX__) ? GLM_ARCH_AVX : 0) \\\r\n| (defined(__SSE4__) ? GLM_ARCH_SSE4 : 0) \\\r\n| (defined(__SSE3__) ? GLM_ARCH_SSE3 : 0) \\\r\n| (defined(__SSE2__) ? GLM_ARCH_SSE2 : 0))\r\n#else\r\n#\tdefine GLM_ARCH GLM_ARCH_PURE\r\n#endif\r\n\r\n// With MinGW-W64, including intrinsic headers before intrin.h will produce some errors. The problem is\r\n// that windows.h (and maybe other headers) will silently include intrin.h, which of course causes problems.\r\n// To fix, we just explicitly include intrin.h here.\r\n#if defined(__MINGW32__) && (GLM_ARCH != GLM_ARCH_PURE)\r\n#\tinclude <intrin.h>\r\n#endif\r\n\r\n//#if(GLM_ARCH != GLM_ARCH_PURE)\r\n#if(GLM_ARCH & GLM_ARCH_AVX2)\r\n#\tinclude <immintrin.h>\r\n#endif//GLM_ARCH\r\n#if(GLM_ARCH & GLM_ARCH_AVX)\r\n#\tinclude <immintrin.h>\r\n#endif//GLM_ARCH\r\n#if(GLM_ARCH & GLM_ARCH_SSE4)\r\n#\tinclude <smmintrin.h>\r\n#endif//GLM_ARCH\r\n#if(GLM_ARCH & GLM_ARCH_SSE3)\r\n#\tinclude <pmmintrin.h>\r\n#endif//GLM_ARCH\r\n#if(GLM_ARCH & GLM_ARCH_SSE2)\r\n#\tinclude <emmintrin.h>\r\n#\tif(GLM_COMPILER == GLM_COMPILER_VC8) // VC8 is missing some intrinsics, workaround\r\n\t\tinline float _mm_cvtss_f32(__m128 A) { return A.m128_f32[0]; }\r\n\t\tinline __m128 _mm_castpd_ps(__m128d PD) { union { __m128 ps; __m128d pd; } c; c.pd = PD; return c.ps; }\r\n\t\tinline __m128d _mm_castps_pd(__m128 PS) { union { __m128 ps; __m128d pd; } c; c.ps = PS; return c.pd; }\r\n\t\tinline __m128i _mm_castps_si128(__m128 PS) { union { __m128 ps; __m128i pi; } c; c.ps = PS; return c.pi; }\r\n\t\tinline __m128 _mm_castsi128_ps(__m128i PI) { union { __m128 ps; __m128i pi; } c; c.pi = PI; return c.ps; }\r\n#\tendif\r\n#endif//GLM_ARCH\r\n//#endif//(GLM_ARCH != GLM_ARCH_PURE)\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_ARCH_DISPLAYED))\r\n#\tdefine GLM_MESSAGE_ARCH_DISPLAYED\r\n#\tif(GLM_ARCH == GLM_ARCH_PURE)\r\n#\t\tpragma message(\"GLM: Platform independent code\")\r\n#\telif(GLM_ARCH & GLM_ARCH_SSE2)\r\n#\t\tpragma message(\"GLM: SSE2 instruction set\")\r\n#\telif(GLM_ARCH & GLM_ARCH_SSE3)\r\n#\t\tpragma message(\"GLM: SSE3 instruction set\")\r\n#\telif(GLM_ARCH & GLM_ARCH_SSE4)\r\n#\t\tpragma message(\"GLM: SSE4 instruction set\")\r\n#\telif(GLM_ARCH & GLM_ARCH_AVX)\r\n#\t\tpragma message(\"GLM: AVX instruction set\")\r\n#\telif(GLM_ARCH & GLM_ARCH_AVX2)\r\n#\t\tpragma message(\"GLM: AVX2 instruction set\")\r\n#\tendif//GLM_ARCH\r\n#\tpragma message(\"GLM: #define GLM_FORCE_PURE to avoid using platform specific instruction sets\")\r\n#endif//GLM_MESSAGE\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Radians\r\n\r\n//#define GLM_FORCE_RADIANS\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Static assert\r\n\r\n#if GLM_HAS_STATIC_ASSERT\r\n#\tdefine GLM_STATIC_ASSERT(x, message) static_assert(x, message)\r\n#elif(defined(BOOST_STATIC_ASSERT))\r\n#\tdefine GLM_STATIC_ASSERT(x, message) BOOST_STATIC_ASSERT(x)\r\n#elif(GLM_COMPILER & GLM_COMPILER_VC)\r\n#\tdefine GLM_STATIC_ASSERT(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1]\r\n#else\r\n#\tdefine GLM_STATIC_ASSERT(x, message)\r\n#\tdefine GLM_STATIC_ASSERT_NULL\r\n#endif//GLM_LANG\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Qualifiers \r\n\r\n// User defines: GLM_FORCE_INLINE GLM_FORCE_CUDA\r\n\r\n#if(defined(GLM_FORCE_CUDA) || (GLM_COMPILER & GLM_COMPILER_CUDA))\r\n#\tdefine GLM_CUDA_FUNC_DEF __device__ __host__ \r\n#\tdefine GLM_CUDA_FUNC_DECL __device__ __host__ \r\n#else\r\n#\tdefine GLM_CUDA_FUNC_DEF\r\n#\tdefine GLM_CUDA_FUNC_DECL\r\n#endif\r\n\r\n#if GLM_COMPILER & GLM_COMPILER_GCC\r\n#\tdefine GLM_VAR_USED __attribute__ ((unused))\r\n#else\r\n#\tdefine GLM_VAR_USED\r\n#endif\r\n\r\n#if(defined(GLM_FORCE_INLINE))\r\n#\tif((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC8))\r\n#\t\tdefine GLM_INLINE __forceinline\r\n#\telif((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC34))\r\n#\t\tdefine GLM_INLINE __attribute__((always_inline)) inline\r\n#\telif(GLM_COMPILER & GLM_COMPILER_CLANG)\r\n#\t\tdefine GLM_INLINE __attribute__((always_inline))\r\n#\telse\r\n#\t\tdefine GLM_INLINE inline\r\n#\tendif//GLM_COMPILER\r\n#else\r\n#\tdefine GLM_INLINE inline\r\n#endif//defined(GLM_FORCE_INLINE)\r\n\r\n#define GLM_FUNC_DECL GLM_CUDA_FUNC_DECL\r\n#define GLM_FUNC_QUALIFIER GLM_CUDA_FUNC_DEF GLM_INLINE\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Swizzle operators\r\n\r\n// User defines: GLM_SWIZZLE\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_SWIZZLE_DISPLAYED))\r\n#\tdefine GLM_MESSAGE_SWIZZLE_DISPLAYED\r\n#\tif defined(GLM_SWIZZLE)\r\n#\t\tpragma message(\"GLM: Swizzling operators enabled\")\r\n#\telse\r\n#\t\tpragma message(\"GLM: Swizzling operators disabled, #define GLM_SWIZZLE to enable swizzle operators\")\r\n#\tendif\r\n#endif//GLM_MESSAGE\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Length type\r\n\r\n// User defines: GLM_FORCE_SIZE_T_LENGTH\r\n\r\nnamespace glm\r\n{\r\n#if defined(GLM_FORCE_SIZE_T_LENGTH)\r\n\ttypedef std::size_t length_t;\r\n#else\r\n\ttypedef int length_t;\r\n#endif\r\n}//namespace glm\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_FORCE_SIZE_T_LENGTH))\r\n#\tdefine GLM_MESSAGE_FORCE_SIZE_T_LENGTH\r\n#\tif defined(GLM_FORCE_SIZE_T_LENGTH)\r\n#\t\tpragma message(\"GLM: .length() returns glm::length_t, a typedef of std::size_t\")\r\n#\telse\r\n#\t\tpragma message(\"GLM: .length() returns glm::length_t, a typedef of int following the GLSL specification\")\r\n#\t\tpragma message(\"GLM: #define GLM_FORCE_SIZE_T_LENGTH for .length() to return a std::size_t\")\r\n#\tendif\r\n#endif//GLM_MESSAGE\r\n\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Qualifiers\r\n\r\n#if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC8))\r\n#\tdefine GLM_DEPRECATED __declspec(deprecated)\r\n#\tdefine GLM_ALIGN(x) __declspec(align(x))\r\n#\tdefine GLM_ALIGNED_STRUCT(x) __declspec(align(x)) struct\r\n#\tdefine GLM_RESTRICT __declspec(restrict)\r\n#\tdefine GLM_RESTRICT_VAR __restrict\r\n#elif(GLM_COMPILER & GLM_COMPILER_INTEL)\r\n#\tdefine GLM_DEPRECATED\r\n#\tdefine GLM_ALIGN(x) __declspec(align(x))\r\n#\tdefine GLM_ALIGNED_STRUCT(x) __declspec(align(x)) struct\r\n#\tdefine GLM_RESTRICT\r\n#\tdefine GLM_RESTRICT_VAR __restrict\r\n#elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_CLANG))\r\n#\tdefine GLM_DEPRECATED __attribute__((__deprecated__))\r\n#\tdefine GLM_ALIGN(x) __attribute__((aligned(x)))\r\n#\tdefine GLM_ALIGNED_STRUCT(x) struct __attribute__((aligned(x)))\r\n#\tdefine GLM_RESTRICT __restrict__\r\n#\tdefine GLM_RESTRICT_VAR __restrict__\r\n#else\r\n#\tdefine GLM_DEPRECATED\r\n#\tdefine GLM_ALIGN\r\n#\tdefine GLM_ALIGNED_STRUCT(x)\r\n#\tdefine GLM_RESTRICT\r\n#\tdefine GLM_RESTRICT_VAR\r\n#endif//GLM_COMPILER\r\n\r\n#if GLM_HAS_CONSTEXPR\r\n#\tdefine GLM_CONSTEXPR constexpr\r\n#else\r\n#\tdefine GLM_CONSTEXPR\r\n#endif\r\n\r\n#endif//GLM_SETUP_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/detail/type_float.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_float.hpp\r\n/// @date 2008-08-22 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_float\r\n#define glm_core_type_float\r\n\r\n#include \"setup.hpp\"\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttypedef float\t\t\t\tfloat32;\r\n\ttypedef double\t\t\t\tfloat64;\r\n}//namespace detail\r\n\t\r\n\ttypedef float\t\t\t\tlowp_float_t;\r\n\ttypedef float\t\t\t\tmediump_float_t;\r\n\ttypedef double\t\t\t\thighp_float_t;\r\n\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\r\n\t/// Low precision floating-point numbers. \r\n\t/// There is no guarantee on the actual precision.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.4 Floats</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef lowp_float_t\t\tlowp_float;\r\n\r\n\t/// Medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.4 Floats</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef mediump_float_t\t\tmediump_float;\r\n\r\n\t/// High precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.4 Floats</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef highp_float_t\t\thighp_float;\r\n\r\n#if(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef mediump_float\t\tfloat_t;\r\n#elif(defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef highp_float\t\t\tfloat_t;\r\n#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef mediump_float\t\tfloat_t;\r\n#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef lowp_float\t\t\tfloat_t;\r\n#else\r\n#\terror \"GLM error: multiple default precision requested for floating-point types\"\r\n#endif\r\n\r\n\ttypedef float\t\t\t\tfloat32;\r\n\ttypedef double\t\t\t\tfloat64;\r\n\r\n////////////////////\r\n// check type sizes\r\n#ifndef GLM_STATIC_ASSERT_NULL\r\n\tGLM_STATIC_ASSERT(sizeof(glm::float32) == 4, \"float32 size isn't 4 bytes on this platform\");\r\n\tGLM_STATIC_ASSERT(sizeof(glm::float64) == 8, \"float64 size isn't 8 bytes on this platform\");\r\n#endif//GLM_STATIC_ASSERT_NULL\r\n\r\n\t/// @}\r\n\r\n}//namespace glm\r\n\r\n#endif//glm_core_type_float\r\n"
  },
  {
    "path": "gpu/glm/detail/type_gentype.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_gentype.hpp\r\n/// @date 2008-10-05 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_gentype\r\n#define glm_core_type_gentype\r\n\r\nnamespace glm\r\n{\r\n\tenum profile\r\n\t{\r\n\t\tnice,\r\n\t\tfast,\r\n\t\tsimd\r\n\t};\r\n\r\n\ttypedef std::size_t sizeType;\r\n\t\r\nnamespace detail\r\n{\r\n\ttemplate\r\n\t<\r\n\t\ttypename VALTYPE, \r\n\t\ttemplate <typename> class TYPE\r\n\t>\r\n\tstruct genType\r\n\t{\r\n\tpublic:\r\n\t\tenum ctor{null};\r\n\r\n\t\ttypedef VALTYPE value_type;\r\n\t\ttypedef VALTYPE & value_reference;\r\n\t\ttypedef VALTYPE * value_pointer;\r\n\t\ttypedef VALTYPE const * value_const_pointer;\r\n\t\ttypedef TYPE<bool> bool_type;\r\n\r\n\t\ttypedef sizeType size_type;\r\n\t\tstatic bool is_vector();\r\n\t\tstatic bool is_matrix();\r\n\t\t\r\n\t\ttypedef TYPE<VALTYPE> type;\r\n\t\ttypedef TYPE<VALTYPE> * pointer;\r\n\t\ttypedef TYPE<VALTYPE> const * const_pointer;\r\n\t\ttypedef TYPE<VALTYPE> const * const const_pointer_const;\r\n\t\ttypedef TYPE<VALTYPE> * const pointer_const;\r\n\t\ttypedef TYPE<VALTYPE> & reference;\r\n\t\ttypedef TYPE<VALTYPE> const & const_reference;\r\n\t\ttypedef TYPE<VALTYPE> const & param_type;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Address (Implementation details)\r\n\r\n\t\tvalue_const_pointer value_address() const{return value_pointer(this);}\r\n\t\tvalue_pointer value_address(){return value_pointer(this);}\r\n\r\n\t//protected:\r\n\t//\tenum kind\r\n\t//\t{\r\n\t//\t\tGEN_TYPE,\r\n\t//\t\tVEC_TYPE,\r\n\t//\t\tMAT_TYPE\r\n\t//\t};\r\n\r\n\t//\ttypedef typename TYPE::kind kind;\r\n\t};\r\n\r\n\ttemplate\r\n\t<\r\n\t\ttypename VALTYPE, \r\n\t\ttemplate <typename> class TYPE\r\n\t>\r\n\tbool genType<VALTYPE, TYPE>::is_vector()\r\n\t{\r\n\t\treturn true;\r\n\t}\r\n/*\r\n\ttemplate <typename valTypeT, unsigned int colT, unsigned int rowT, profile proT = nice>\r\n\tclass base\r\n\t{\r\n\tpublic:\r\n\t\t//////////////////////////////////////\r\n\t\t// Traits\r\n\r\n\t\ttypedef sizeType\t\t\t\t\t\t\tsize_type;\r\n\t\ttypedef valTypeT\t\t\t\t\t\t\tvalue_type;\r\n\r\n\t\ttypedef base<value_type, colT, rowT>\t\tclass_type;\r\n\r\n\t\ttypedef base<bool, colT, rowT>\t\t\t\tbool_type;\r\n\t\ttypedef base<value_type, rowT, 1>\t\t\tcol_type;\r\n\t\ttypedef base<value_type, colT, 1>\t\t\trow_type;\r\n\t\ttypedef base<value_type, rowT, colT>\t\ttranspose_type;\r\n\r\n\t\tstatic size_type\t\t\t\t\t\t\tcol_size();\r\n\t\tstatic size_type\t\t\t\t\t\t\trow_size();\r\n\t\tstatic size_type\t\t\t\t\t\t\tvalue_size();\r\n\t\tstatic bool\t\t\t\t\t\t\t\t\tis_scalar();\r\n\t\tstatic bool\t\t\t\t\t\t\t\t\tis_vector();\r\n\t\tstatic bool\t\t\t\t\t\t\t\t\tis_matrix();\r\n\r\n\tprivate:\r\n\t\t// Data \r\n\t\tcol_type value[colT];\t\t\r\n\r\n\tpublic:\r\n\t\t//////////////////////////////////////\r\n\t\t// Constructors\r\n\t\tbase();\r\n\t\tbase(class_type const & m);\r\n\r\n\t\texplicit base(T const & x);\r\n\t\texplicit base(value_type const * const x);\r\n\t\texplicit base(col_type const * const x);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversions\r\n\t\ttemplate <typename vU, uint cU, uint rU, profile pU>\r\n\t\texplicit base(base<vU, cU, rU, pU> const & m);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Accesses\r\n\t\tcol_type& operator[](size_type i);\r\n\t\tcol_type const & operator[](size_type i) const;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Unary updatable operators\r\n\t\tclass_type& operator=  (class_type const & x);\r\n\t\tclass_type& operator+= (T const & x);\r\n\t\tclass_type& operator+= (class_type const & x);\r\n\t\tclass_type& operator-= (T const & x);\r\n\t\tclass_type& operator-= (class_type const & x);\r\n\t\tclass_type& operator*= (T const & x);\r\n\t\tclass_type& operator*= (class_type const & x);\r\n\t\tclass_type& operator/= (T const & x);\r\n\t\tclass_type& operator/= (class_type const & x);\r\n\t\tclass_type& operator++ ();\r\n\t\tclass_type& operator-- ();\r\n\t};\r\n*/\r\n\t\r\n\t//template <typename T>\r\n\t//struct traits\r\n\t//{\r\n\t//\tstatic const bool is_signed = false;\r\n\t//\tstatic const bool is_float = false;\r\n\t//\tstatic const bool is_vector = false;\r\n\t//\tstatic const bool is_matrix = false;\r\n\t//\tstatic const bool is_genType = false;\r\n\t//\tstatic const bool is_genIType = false;\r\n\t//\tstatic const bool is_genUType = false;\r\n\t//};\r\n\t\r\n\t//template <>\r\n\t//struct traits<half>\r\n\t//{\r\n\t//\tstatic const bool is_float = true;\r\n\t//\tstatic const bool is_genType = true;\r\n\t//};\r\n\t\r\n\t//template <>\r\n\t//struct traits<float>\r\n\t//{\r\n\t//\tstatic const bool is_float = true;\r\n\t//\tstatic const bool is_genType = true;\r\n\t//};\r\n\t\r\n\t//template <>\r\n\t//struct traits<double>\r\n\t//{\r\n\t//\tstatic const bool is_float = true;\r\n\t//\tstatic const bool is_genType = true;\r\n\t//};\r\n\t\r\n\t//template <typename genType>\r\n\t//struct desc\r\n\t//{\r\n\t//\ttypedef genType\t\t\t\t\t\t\ttype;\r\n\t//\ttypedef genType *\t\t\t\t\t\tpointer;\r\n\t//\ttypedef genType const*\t\t\t\t\tconst_pointer;\r\n\t//\ttypedef genType const *const\t\t\tconst_pointer_const;\r\n\t//\ttypedef genType *const\t\t\t\t\tpointer_const;\r\n\t//\ttypedef genType &\t\t\t\t\t\treference;\r\n\t//\ttypedef genType const&\t\t\t\t\tconst_reference;\r\n\t//\ttypedef genType const&\t\t\t\t\tparam_type;\r\n\t\r\n\t//\ttypedef typename genType::value_type\tvalue_type;\r\n\t//\ttypedef typename genType::size_type\t\tsize_type;\r\n\t//\tstatic const typename size_type\t\t\tvalue_size;\r\n\t//};\r\n\t\r\n\t//template <typename genType>\r\n\t//const typename desc<genType>::size_type desc<genType>::value_size = genType::value_size();\r\n\t\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n//#include \"type_gentype.inl\"\r\n\r\n#endif//glm_core_type_gentype\r\n"
  },
  {
    "path": "gpu/glm/detail/type_gentype.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_gentype.inl\r\n/// @date 2008-10-05 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail{\r\n\r\n/////////////////////////////////\r\n// Static functions\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::size_type base<vT, cT, rT, pT>::col_size()\r\n{\r\n\treturn cT;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::size_type base<vT, cT, rT, pT>::row_size()\r\n{\r\n\treturn rT;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::size_type base<vT, cT, rT, pT>::value_size()\r\n{\r\n\treturn rT * cT;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\nbool base<vT, cT, rT, pT>::is_scalar()\r\n{\r\n\treturn rT == 1 && cT == 1;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\nbool base<vT, cT, rT, pT>::is_vector()\r\n{\r\n\treturn rT == 1;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\nbool base<vT, cT, rT, pT>::is_matrix()\r\n{\r\n\treturn rT != 1;\r\n}\r\n\r\n/////////////////////////////////\r\n// Constructor\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\nbase<vT, cT, rT, pT>::base()\r\n{\r\n\tmemset(&this->value, 0, cT * rT * sizeof(vT));\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\nbase<vT, cT, rT, pT>::base\r\n(\r\n\ttypename base<vT, cT, rT, pT>::class_type const & m\r\n)\r\n{\r\n\tfor\r\n\t(\r\n\t\ttypename genType<vT, cT, rT, pT>::size_type i = typename base<vT, cT, rT, pT>::size_type(0);\r\n\t\ti < base<vT, cT, rT, pT>::col_size();\r\n\t\t++i\r\n\t)\r\n\t{\r\n\t\tthis->value[i] = m[i];\r\n\t}\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\nbase<vT, cT, rT, pT>::base\r\n(\r\n\ttypename base<vT, cT, rT, pT>::T const & x\r\n)\r\n{\r\n\tif(rT == 1) // vector\r\n\t{\r\n\t\tfor\r\n\t\t(\r\n\t\t\ttypename base<vT, cT, rT, pT>::size_type i = typename base<vT, cT, rT, pT>::size_type(0);\r\n\t\t\ti < base<vT, cT, rT, pT>::col_size();\r\n\t\t\t++i\r\n\t\t)\r\n\t\t{\r\n\t\t\tthis->value[i][rT] = x;\r\n\t\t}\r\n\t}\r\n\telse // matrix\r\n\t{\r\n\t\tmemset(&this->value, 0, cT * rT * sizeof(vT));\r\n\r\n\t\ttypename base<vT, cT, rT, pT>::size_type stop = cT < rT ? cT : rT;\r\n\r\n\t\tfor\r\n\t\t(\r\n\t\t\ttypename base<vT, cT, rT, pT>::size_type i = typename base<vT, cT, rT, pT>::size_type(0);\r\n\t\t\ti < stop;\r\n\t\t\t++i\r\n\t\t)\r\n\t\t{\r\n\t\t\tthis->value[i][i] = x;\r\n\t\t}\r\n\t}\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\nbase<vT, cT, rT, pT>::base\r\n(\r\n\ttypename base<vT, cT, rT, pT>::value_type const * const x\r\n)\r\n{\r\n\tmemcpy(&this->value, &x.value, cT * rT * sizeof(vT));\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\nbase<vT, cT, rT, pT>::base\r\n(\r\n\ttypename base<vT, cT, rT, pT>::col_type const * const x\r\n)\r\n{\r\n\tfor\r\n\t(\r\n\t\ttypename base<vT, cT, rT, pT>::size_type i = typename base<vT, cT, rT, pT>::size_type(0);\r\n\t\ti < base<vT, cT, rT, pT>::col_size();\r\n\t\t++i\r\n\t)\r\n\t{\r\n\t\tthis->value[i] = x[i];\r\n\t}\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntemplate <typename vU, uint cU, uint rU, profile pU>\r\nbase<vT, cT, rT, pT>::base\r\n(\r\n\tbase<vU, cU, rU, pU> const & m\r\n)\r\n{\r\n\tfor\r\n\t(\r\n\t\ttypename base<vT, cT, rT, pT>::size_type i = typename base<vT, cT, rT, pT>::size_type(0);\r\n\t\ti < base<vT, cT, rT, pT>::col_size();\r\n\t\t++i\r\n\t)\r\n\t{\r\n\t\tthis->value[i] = base<vT, cT, rT, pT>(m[i]);\r\n\t}\r\n}\r\n\r\n//////////////////////////////////////\r\n// Accesses\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::col_type& base<vT, cT, rT, pT>::operator[]\r\n(\r\n\ttypename base<vT, cT, rT, pT>::size_type i\r\n)\r\n{\r\n\treturn this->value[i];\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::col_type const & base<vT, cT, rT, pT>::operator[]\r\n(\r\n\ttypename base<vT, cT, rT, pT>::size_type i\r\n) const\r\n{\r\n\treturn this->value[i];\r\n}\r\n\r\n//////////////////////////////////////\r\n// Unary updatable operators\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator= \r\n(\r\n\ttypename base<vT, cT, rT, pT>::class_type const & x\r\n)\r\n{\r\n\tmemcpy(&this->value, &x.value, cT * rT * sizeof(vT));\r\n\treturn *this;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator+= \r\n(\r\n\ttypename base<vT, cT, rT, pT>::T const & x\r\n)\r\n{\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();\r\n\r\n\tfor(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)\r\n\tfor(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)\r\n\t\tthis->value[j][i] += x;\r\n\r\n\treturn *this;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator+= \r\n(\r\n\ttypename base<vT, cT, rT, pT>::class_type const & x\r\n)\r\n{\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();\r\n\r\n\tfor(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)\r\n\tfor(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)\r\n\t\tthis->value[j][i] += x[j][i];\r\n\r\n\treturn *this;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator-= \r\n(\r\n\ttypename base<vT, cT, rT, pT>::T const & x\r\n)\r\n{\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();\r\n\r\n\tfor(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)\r\n\tfor(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)\r\n\t\tthis->value[j][i] -= x;\r\n\r\n\treturn *this;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator-= \r\n(\r\n\ttypename base<vT, cT, rT, pT>::class_type const & x\r\n)\r\n{\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();\r\n\r\n\tfor(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)\r\n\tfor(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)\r\n\t\tthis->value[j][i] -= x[j][i];\r\n\r\n\treturn *this;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator*= \r\n(\r\n\ttypename base<vT, cT, rT, pT>::T const & x\r\n)\r\n{\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();\r\n\r\n\tfor(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)\r\n\tfor(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)\r\n\t\tthis->value[j][i] *= x;\r\n\r\n\treturn *this;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator*= \r\n(\r\n\ttypename base<vT, cT, rT, pT>::class_type const & x\r\n)\r\n{\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();\r\n\r\n\tfor(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)\r\n\tfor(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)\r\n\t\tthis->value[j][i] *= x[j][i];\r\n\r\n\treturn *this;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator/= \r\n(\r\n\ttypename base<vT, cT, rT, pT>::T const & x\r\n)\r\n{\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();\r\n\r\n\tfor(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)\r\n\tfor(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)\r\n\t\tthis->value[j][i] /= x;\r\n\r\n\treturn *this;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator/= \r\n(\r\n\ttypename base<vT, cT, rT, pT>::class_type const & x\r\n)\r\n{\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_col = x.col_size();\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_row = x.row_size();\r\n\r\n\tfor(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)\r\n\tfor(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)\r\n\t\tthis->value[j][i] /= x[j][i];\r\n\r\n\treturn *this;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator++ ()\r\n{\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_col = col_size();\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_row = row_size();\r\n\r\n\tfor(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)\r\n\tfor(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)\r\n\t\t++this->value[j][i];\r\n\r\n\treturn *this;\r\n}\r\n\r\ntemplate <typename vT, uint cT, uint rT, profile pT>\r\ntypename base<vT, cT, rT, pT>::class_type& base<vT, cT, rT, pT>::operator-- ()\r\n{\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_col = col_size();\r\n\ttypename base<vT, cT, rT, pT>::size_type stop_row = row_size();\r\n\r\n\tfor(typename base<vT, cT, rT, pT>::size_type j = 0; j < stop_col; ++j)\r\n\tfor(typename base<vT, cT, rT, pT>::size_type i = 0; i < stop_row; ++i)\r\n\t\t--this->value[j][i];\r\n\r\n\treturn *this;\r\n}\r\n\r\n} //namespace detail\r\n} //namespace glm\r\n"
  },
  {
    "path": "gpu/glm/detail/type_half.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_half.hpp\r\n/// @date 2008-08-17 / 2011-09-20\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_half\r\n#define glm_core_type_half\r\n\r\n#include \"setup.hpp\"\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttypedef short hdata;\r\n\r\n\tGLM_FUNC_DECL float toFloat32(hdata value);\r\n\tGLM_FUNC_DECL hdata toFloat16(float const & value);\r\n\r\n}//namespace detail\r\n\r\n\t/// half-precision floating-point numbers.\r\n\t//typedef detail::hdata\t\thalf;\r\n\t\t\r\n}//namespace glm\r\n\r\n#include \"type_half.inl\"\r\n\r\n#endif//glm_core_type_half\r\n"
  },
  {
    "path": "gpu/glm/detail/type_half.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///\r\n/// This half implementation is based on OpenEXR which is Copyright (c) 2002, \r\n/// Industrial Light & Magic, a division of Lucas Digital Ltd. LLC\r\n///\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_half.inl\r\n/// @date 2008-08-17 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\tGLM_FUNC_QUALIFIER float overflow()\r\n\t{\r\n\t\tvolatile float f = 1e10;\r\n\r\n\t\tfor(int i = 0; i < 10; ++i)\t\r\n\t\t\tf *= f;             // this will overflow before\r\n\t\t\t\t\t\t\t\t// the forloop terminates\r\n\t\treturn f;\r\n\t}\r\n\r\n\tunion uif32\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER uif32() :\r\n\t\t\ti(0)\r\n\t\t{}\r\n\r\n\t\tGLM_FUNC_QUALIFIER uif32(float f) :\r\n\t\t\tf(f)\r\n\t\t{}\r\n\r\n\t\tGLM_FUNC_QUALIFIER uif32(uint32 i) :\r\n\t\t\ti(i)\r\n\t\t{}\r\n\r\n\t\tfloat f;\r\n\t\tuint32 i;\r\n\t};\r\n\r\n\tGLM_FUNC_QUALIFIER float toFloat32(hdata value)\r\n\t{\r\n\t\tint s = (value >> 15) & 0x00000001;\r\n\t\tint e = (value >> 10) & 0x0000001f;\r\n\t\tint m =  value        & 0x000003ff;\r\n\r\n\t\tif(e == 0)\r\n\t\t{\r\n\t\t\tif(m == 0)\r\n\t\t\t{\r\n\t\t\t\t//\r\n\t\t\t\t// Plus or minus zero\r\n\t\t\t\t//\r\n\r\n\t\t\t\tdetail::uif32 result;\r\n\t\t\t\tresult.i = (unsigned int)(s << 31);\r\n\t\t\t\treturn result.f;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//\r\n\t\t\t\t// Denormalized number -- renormalize it\r\n\t\t\t\t//\r\n\r\n\t\t\t\twhile(!(m & 0x00000400))\r\n\t\t\t\t{\r\n\t\t\t\t\tm <<= 1;\r\n\t\t\t\t\te -=  1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\te += 1;\r\n\t\t\t\tm &= ~0x00000400;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(e == 31)\r\n\t\t{\r\n\t\t\tif(m == 0)\r\n\t\t\t{\r\n\t\t\t\t//\r\n\t\t\t\t// Positive or negative infinity\r\n\t\t\t\t//\r\n\r\n\t\t\t\tuif32 result;\r\n\t\t\t\tresult.i = (unsigned int)((s << 31) | 0x7f800000);\r\n\t\t\t\treturn result.f;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//\r\n\t\t\t\t// Nan -- preserve sign and significand bits\r\n\t\t\t\t//\r\n\r\n\t\t\t\tuif32 result;\r\n\t\t\t\tresult.i = (unsigned int)((s << 31) | 0x7f800000 | (m << 13));\r\n\t\t\t\treturn result.f;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t// Normalized number\r\n\t\t//\r\n\r\n\t\te = e + (127 - 15);\r\n\t\tm = m << 13;\r\n\r\n\t\t//\r\n\t\t// Assemble s, e and m.\r\n\t\t//\r\n\r\n\t\tuif32 Result;\r\n\t\tResult.i = (unsigned int)((s << 31) | (e << 23) | m);\r\n\t\treturn Result.f;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER hdata toFloat16(float const & f)\r\n\t{\r\n\t\tuif32 Entry;\r\n\t\tEntry.f = f;\r\n\t\tint i = (int)Entry.i;\r\n\r\n\t\t//\r\n\t\t// Our floating point number, f, is represented by the bit\r\n\t\t// pattern in integer i.  Disassemble that bit pattern into\r\n\t\t// the sign, s, the exponent, e, and the significand, m.\r\n\t\t// Shift s into the position where it will go in in the\r\n\t\t// resulting half number.\r\n\t\t// Adjust e, accounting for the different exponent bias\r\n\t\t// of float and half (127 versus 15).\r\n\t\t//\r\n\r\n\t\tint s =  (i >> 16) & 0x00008000;\r\n\t\tint e = ((i >> 23) & 0x000000ff) - (127 - 15);\r\n\t\tint m =   i        & 0x007fffff;\r\n\r\n\t\t//\r\n\t\t// Now reassemble s, e and m into a half:\r\n\t\t//\r\n\r\n\t\tif(e <= 0)\r\n\t\t{\r\n\t\t\tif(e < -10)\r\n\t\t\t{\r\n\t\t\t\t//\r\n\t\t\t\t// E is less than -10.  The absolute value of f is\r\n\t\t\t\t// less than half_MIN (f may be a small normalized\r\n\t\t\t\t// float, a denormalized float or a zero).\r\n\t\t\t\t//\r\n\t\t\t\t// We convert f to a half zero.\r\n\t\t\t\t//\r\n\r\n\t\t\t\treturn hdata(s);\r\n\t\t\t}\r\n\r\n\t\t\t//\r\n\t\t\t// E is between -10 and 0.  F is a normalized float,\r\n\t\t\t// whose magnitude is less than __half_NRM_MIN.\r\n\t\t\t//\r\n\t\t\t// We convert f to a denormalized half.\r\n\t\t\t// \r\n\r\n\t\t\tm = (m | 0x00800000) >> (1 - e);\r\n\r\n\t\t\t//\r\n\t\t\t// Round to nearest, round \"0.5\" up.\r\n\t\t\t//\r\n\t\t\t// Rounding may cause the significand to overflow and make\r\n\t\t\t// our number normalized.  Because of the way a half's bits\r\n\t\t\t// are laid out, we don't have to treat this case separately;\r\n\t\t\t// the code below will handle it correctly.\r\n\t\t\t// \r\n\r\n\t\t\tif(m & 0x00001000) \r\n\t\t\t\tm += 0x00002000;\r\n\r\n\t\t\t//\r\n\t\t\t// Assemble the half from s, e (zero) and m.\r\n\t\t\t//\r\n\r\n\t\t\treturn hdata(s | (m >> 13));\r\n\t\t}\r\n\t\telse if(e == 0xff - (127 - 15))\r\n\t\t{\r\n\t\t\tif(m == 0)\r\n\t\t\t{\r\n\t\t\t\t//\r\n\t\t\t\t// F is an infinity; convert f to a half\r\n\t\t\t\t// infinity with the same sign as f.\r\n\t\t\t\t//\r\n\r\n\t\t\t\treturn hdata(s | 0x7c00);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//\r\n\t\t\t\t// F is a NAN; we produce a half NAN that preserves\r\n\t\t\t\t// the sign bit and the 10 leftmost bits of the\r\n\t\t\t\t// significand of f, with one exception: If the 10\r\n\t\t\t\t// leftmost bits are all zero, the NAN would turn \r\n\t\t\t\t// into an infinity, so we have to set at least one\r\n\t\t\t\t// bit in the significand.\r\n\t\t\t\t//\r\n\r\n\t\t\t\tm >>= 13;\r\n\r\n\t\t\t\treturn hdata(s | 0x7c00 | m | (m == 0));\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//\r\n\t\t\t// E is greater than zero.  F is a normalized float.\r\n\t\t\t// We try to convert f to a normalized half.\r\n\t\t\t//\r\n\r\n\t\t\t//\r\n\t\t\t// Round to nearest, round \"0.5\" up\r\n\t\t\t//\r\n\r\n\t\t\tif(m &  0x00001000)\r\n\t\t\t{\r\n\t\t\t\tm += 0x00002000;\r\n\r\n\t\t\t\tif(m & 0x00800000)\r\n\t\t\t\t{\r\n\t\t\t\t\tm =  0;     // overflow in significand,\r\n\t\t\t\t\te += 1;     // adjust exponent\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//\r\n\t\t\t// Handle exponent overflow\r\n\t\t\t//\r\n\r\n\t\t\tif (e > 30)\r\n\t\t\t{\r\n\t\t\t\toverflow();        // Cause a hardware floating point overflow;\r\n\r\n\t\t\t\treturn hdata(s | 0x7c00);\r\n\t\t\t\t// if this returns, the half becomes an\r\n\t\t\t}   // infinity with the same sign as f.\r\n\r\n\t\t\t//\r\n\t\t\t// Assemble the half from s, e and m.\r\n\t\t\t//\r\n\r\n\t\t\treturn hdata(s | (e << 10) | (m >> 13));\r\n\t\t}\r\n\t}\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/detail/type_int.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_int.hpp\r\n/// @date 2008-08-22 / 2013-03-30\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_int\r\n#define glm_core_type_int\r\n\r\n#include \"setup.hpp\"\r\n\r\n#if GLM_HAS_EXTENDED_INTEGER_TYPE\r\n#\tinclude <cstdint>\r\n#endif\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n#\tif GLM_HAS_EXTENDED_INTEGER_TYPE\r\n\t\ttypedef std::int8_t\t\t\t\t\tint8;\r\n\t\ttypedef std::int16_t\t\t\t\tint16;\r\n\t\ttypedef std::int32_t\t\t\t\tint32;\r\n\t\ttypedef std::int64_t\t\t\t\tint64;\r\n\t\r\n\t\ttypedef std::uint8_t\t\t\t\tuint8;\r\n\t\ttypedef std::uint16_t\t\t\t\tuint16;\r\n\t\ttypedef std::uint32_t\t\t\t\tuint32;\r\n\t\ttypedef std::uint64_t\t\t\t\tuint64;\r\n#\telse\r\n#\t\tif(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) // C99 detected, 64 bit types available\r\n\t\t\ttypedef int64_t\t\t\t\t\tsint64;\r\n\t\t\ttypedef uint64_t\t\t\t\tuint64;\r\n#\t\telif(GLM_COMPILER & GLM_COMPILER_VC)\r\n\t\t\ttypedef signed __int64\t\t\tsint64;\r\n\t\t\ttypedef unsigned __int64\t\tuint64;\r\n#\t\telif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC | GLM_COMPILER_CLANG))\r\n\t\t\t__extension__ typedef signed long long\t\tsint64;\r\n\t\t\t__extension__ typedef unsigned long long\tuint64;\r\n#\t\telif(GLM_COMPILER & GLM_COMPILER_BC)\r\n\t\t\ttypedef Int64\t\t\t\t\tsint64;\r\n\t\t\ttypedef Uint64\t\t\t\t\tuint64;\r\n#\t\telse//unknown compiler\r\n\t\t\ttypedef signed long\tlong\t\tsint64;\r\n\t\t\ttypedef unsigned long long\t\tuint64;\r\n#\t\tendif//GLM_COMPILER\r\n\t\t\r\n\t\ttypedef signed char\t\t\t\t\tint8;\r\n\t\ttypedef signed short\t\t\t\tint16;\r\n\t\ttypedef signed int\t\t\t\t\tint32;\r\n\t\ttypedef sint64\t\t\t\t\t\tint64;\r\n\t\r\n\t\ttypedef unsigned char\t\t\t\tuint8;\r\n\t\ttypedef unsigned short\t\t\t\tuint16;\r\n\t\ttypedef unsigned int\t\t\t\tuint32;\r\n\t\ttypedef uint64\t\t\t\t\t\tuint64;\r\n#endif//\r\n\t\r\n\ttypedef signed int\t\t\t\t\t\tlowp_int_t;\r\n\ttypedef signed int\t\t\t\t\t\tmediump_int_t;\r\n\ttypedef signed int\t\t\t\t\t\thighp_int_t;\r\n\t\r\n\ttypedef unsigned int\t\t\t\t\tlowp_uint_t;\r\n\ttypedef unsigned int\t\t\t\t\tmediump_uint_t;\r\n\ttypedef unsigned int\t\t\t\t\thighp_uint_t;\r\n}//namespace detail\r\n\r\n\ttypedef detail::int8\t\t\t\t\tint8;\r\n\ttypedef detail::int16\t\t\t\t\tint16;\r\n\ttypedef detail::int32\t\t\t\t\tint32;\r\n\ttypedef detail::int64\t\t\t\t\tint64;\r\n\t\r\n\ttypedef detail::uint8\t\t\t\t\tuint8;\r\n\ttypedef detail::uint16\t\t\t\t\tuint16;\r\n\ttypedef detail::uint32\t\t\t\t\tuint32;\r\n\ttypedef detail::uint64\t\t\t\t\tuint64;\r\n\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\r\n\t/// Low precision signed integer. \r\n\t/// There is no guarantee on the actual precision.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.3 Integers</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::lowp_int_t\t\t\t\tlowp_int;\r\n\r\n\t/// Medium precision signed integer. \r\n\t/// There is no guarantee on the actual precision.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.3 Integers</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::mediump_int_t\t\t\tmediump_int;\r\n\r\n\t/// High precision signed integer.\r\n\t/// There is no guarantee on the actual precision.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.3 Integers</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::highp_int_t\t\t\t\thighp_int;\r\n\r\n\t/// Low precision unsigned integer. \r\n\t/// There is no guarantee on the actual precision.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.3 Integers</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::lowp_uint_t\t\t\t\tlowp_uint;\r\n\r\n\t/// Medium precision unsigned integer. \r\n\t/// There is no guarantee on the actual precision.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.3 Integers</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::mediump_uint_t\t\t\tmediump_uint;\r\n\r\n\t/// High precision unsigned integer. \r\n\t/// There is no guarantee on the actual precision.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.3 Integers</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::highp_uint_t\t\t\thighp_uint;\r\n\r\n#if(!defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef mediump_int\t\t\t\t\tint_t;\r\n#elif(defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef highp_int\t\t\t\t\tint_t;\r\n#elif(!defined(GLM_PRECISION_HIGHP_INT) && defined(GLM_PRECISION_MEDIUMP_INT) && !defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef mediump_int\t\t\t\t\tint_t;\r\n#elif(!defined(GLM_PRECISION_HIGHP_INT) && !defined(GLM_PRECISION_MEDIUMP_INT) && defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_int\t\t\t\t\tint_t;\r\n#else\r\n#\terror \"GLM error: multiple default precision requested for signed interger types\"\r\n#endif\r\n\r\n#if(!defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT))\r\n\ttypedef mediump_uint\t\t\t\tuint_t;\r\n#elif(defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT))\r\n\ttypedef highp_uint\t\t\t\t\tuint_t;\r\n#elif(!defined(GLM_PRECISION_HIGHP_UINT) && defined(GLM_PRECISION_MEDIUMP_UINT) && !defined(GLM_PRECISION_LOWP_UINT))\r\n\ttypedef mediump_uint\t\t\t\tuint_t;\r\n#elif(!defined(GLM_PRECISION_HIGHP_UINT) && !defined(GLM_PRECISION_MEDIUMP_UINT) && defined(GLM_PRECISION_LOWP_UINT))\r\n\ttypedef lowp_uint\t\t\t\t\tuint_t;\r\n#else\r\n#\terror \"GLM error: multiple default precision requested for unsigned interger types\"\r\n#endif\r\n\r\n\t/// Unsigned integer type.\r\n\t/// \r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.3 Integers</a>\r\n\ttypedef unsigned int\t\t\t\tuint;\r\n\r\n\t/// @}\r\n\r\n////////////////////\r\n// check type sizes\r\n#ifndef GLM_STATIC_ASSERT_NULL\r\n\tGLM_STATIC_ASSERT(sizeof(glm::int8) == 1, \"int8 size isn't 1 byte on this platform\");\r\n\tGLM_STATIC_ASSERT(sizeof(glm::int16) == 2, \"int16 size isn't 2 bytes on this platform\");\r\n\tGLM_STATIC_ASSERT(sizeof(glm::int32) == 4, \"int32 size isn't 4 bytes on this platform\");\r\n\tGLM_STATIC_ASSERT(sizeof(glm::int64) == 8, \"int64 size isn't 8 bytes on this platform\");\r\n\r\n\tGLM_STATIC_ASSERT(sizeof(glm::uint8) == 1, \"uint8 size isn't 1 byte on this platform\");\r\n\tGLM_STATIC_ASSERT(sizeof(glm::uint16) == 2, \"uint16 size isn't 2 bytes on this platform\");\r\n\tGLM_STATIC_ASSERT(sizeof(glm::uint32) == 4, \"uint32 size isn't 4 bytes on this platform\");\r\n\tGLM_STATIC_ASSERT(sizeof(glm::uint64) == 8, \"uint64 size isn't 8 bytes on this platform\");\r\n#endif//GLM_STATIC_ASSERT_NULL\r\n\r\n}//namespace glm\r\n\r\n#endif//glm_core_type_int\r\n"
  },
  {
    "path": "gpu/glm/detail/type_mat.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat.hpp\r\n/// @date 2010-01-26 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_mat\r\n#define glm_core_type_mat\r\n\r\n#include \"precision.hpp\"\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P> struct tvec2;\r\n\ttemplate <typename T, precision P> struct tvec3;\r\n\ttemplate <typename T, precision P> struct tvec4;\r\n\ttemplate <typename T, precision P> struct tmat2x2;\r\n\ttemplate <typename T, precision P> struct tmat2x3;\r\n\ttemplate <typename T, precision P> struct tmat2x4;\r\n\ttemplate <typename T, precision P> struct tmat3x2;\r\n\ttemplate <typename T, precision P> struct tmat3x3;\r\n\ttemplate <typename T, precision P> struct tmat3x4;\r\n\ttemplate <typename T, precision P> struct tmat4x2;\r\n\ttemplate <typename T, precision P> struct tmat4x3;\r\n\ttemplate <typename T, precision P> struct tmat4x4;\r\n\r\n\ttemplate <typename T, precision P, template <class, precision> class colType, template <class, precision> class rowType>\r\n\tstruct outerProduct_trait{};\r\n\r\n\ttemplate <template <class, precision> class matType, typename T, precision P>\r\n\tstruct compute_inverse{};\r\n}//namespace detail\r\n\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 2 columns of 2 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, lowp>\t\tlowp_mat2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, mediump>\t\tmediump_mat2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, highp>\t\thighp_mat2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, lowp>\t\tlowp_mat2x2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, mediump>\t\tmediump_mat2x2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, highp>\t\thighp_mat2x2;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 2 columns of 3 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x3<float, lowp>\t\tlowp_mat2x3;\r\n\t\r\n\t/// 2 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x3<float, mediump>\t\tmediump_mat2x3;\r\n\t\r\n\t/// 2 columns of 3 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x3<float, highp>\t\thighp_mat2x3;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 2 columns of 4 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x4<float, lowp>\t\tlowp_mat2x4;\r\n\t\r\n\t/// 2 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x4<float, mediump>\t\tmediump_mat2x4;\r\n\t\r\n\t/// 2 columns of 4 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x4<float, highp>\t\thighp_mat2x4;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 3 columns of 2 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x2<float, lowp>\t\tlowp_mat3x2;\r\n\t\r\n\t/// 3 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x2<float, mediump>\t\tmediump_mat3x2;\r\n\t\r\n\t/// 3 columns of 2 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x2<float, highp>\t\thighp_mat3x2;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 3 columns of 3 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, lowp>\t\tlowp_mat3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, mediump>\t\tmediump_mat3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, highp>\t\thighp_mat3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, lowp>\t\tlowp_mat3x3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, mediump>\t\tmediump_mat3x3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, highp>\t\thighp_mat3x3;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 3 columns of 4 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x4<float, lowp>\t\tlowp_mat3x4;\r\n\t\r\n\t/// 3 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x4<float, mediump>\t\tmediump_mat3x4;\r\n\t\r\n\t/// 3 columns of 4 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x4<float, highp>\t\thighp_mat3x4;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 4 columns of 2 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x2<float, lowp>\t\tlowp_mat4x2;\r\n\t\r\n\t/// 4 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x2<float, mediump>\t\tmediump_mat4x2;\r\n\t\r\n\t/// 4 columns of 2 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x2<float, highp>\t\thighp_mat4x2;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 4 columns of 3 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x3<float, lowp>\t\tlowp_mat4x3;\r\n\t\r\n\t/// 4 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x3<float, mediump>\t\tmediump_mat4x3;\r\n\t\r\n\t/// 4 columns of 3 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x3<float, highp>\t\thighp_mat4x3;\r\n\t\r\n\t/// @}\r\n\t\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 4 columns of 4 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, lowp>\t\tlowp_mat4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, mediump>\t\tmediump_mat4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, highp>\t\thighp_mat4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, lowp>\t\tlowp_mat4x4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, mediump>\t\tmediump_mat4x4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, highp>\t\thighp_mat4x4;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_types\r\n\t/// @{\r\n\t\r\n\t//////////////////////////\r\n\t// Float definition\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef lowp_mat2x2\t\t\tmat2x2;\r\n\ttypedef lowp_mat2x3\t\t\tmat2x3;\r\n\ttypedef lowp_mat2x4\t\t\tmat2x4;\r\n\ttypedef lowp_mat3x2\t\t\tmat3x2;\r\n\ttypedef lowp_mat3x3\t\t\tmat3x3;\r\n\ttypedef lowp_mat3x4\t\t\tmat3x4;\r\n\ttypedef lowp_mat4x2\t\t\tmat4x2;\r\n\ttypedef lowp_mat4x3\t\t\tmat4x3;\r\n\ttypedef lowp_mat4x4\t\t\tmat4x4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))\r\n\ttypedef mediump_mat2x2\t\tmat2x2;\r\n\ttypedef mediump_mat2x3\t\tmat2x3;\r\n\ttypedef mediump_mat2x4\t\tmat2x4;\r\n\ttypedef mediump_mat3x2\t\tmat3x2;\r\n\ttypedef mediump_mat3x3\t\tmat3x3;\r\n\ttypedef mediump_mat3x4\t\tmat3x4;\r\n\ttypedef mediump_mat4x2\t\tmat4x2;\r\n\ttypedef mediump_mat4x3\t\tmat4x3;\r\n\ttypedef mediump_mat4x4\t\tmat4x4;\r\n#else\t\r\n\t//! 2 columns of 2 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_mat2x2\t\t\tmat2x2;\r\n\t\r\n\t//! 2 columns of 3 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_mat2x3\t\t\tmat2x3;\r\n\t\r\n\t//! 2 columns of 4 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_mat2x4\t\t\tmat2x4;\r\n\t\r\n\t//! 3 columns of 2 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_mat3x2\t\t\tmat3x2;\r\n\t\r\n\t//! 3 columns of 3 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_mat3x3\t\t\tmat3x3;\r\n\t\r\n\t//! 3 columns of 4 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_mat3x4\t\t\tmat3x4;\r\n\t\r\n\t//! 4 columns of 2 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_mat4x2\t\t\tmat4x2;\r\n\t\r\n\t//! 4 columns of 3 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_mat4x3\t\t\tmat4x3;\r\n\t\r\n\t//! 4 columns of 4 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_mat4x4\t\t\tmat4x4;\r\n\t\r\n#endif//GLM_PRECISION\r\n\t\r\n\t//! 2 columns of 2 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef mat2x2\t\t\t\t\tmat2;\r\n\t\r\n\t//! 3 columns of 3 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef mat3x3\t\t\t\t\tmat3;\r\n\t\r\n\t//! 4 columns of 4 components matrix of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef mat4x4\t\t\t\t\tmat4;\r\n\t\t\r\n\t//////////////////////////\r\n\t// Double definition\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 2 columns of 2 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<double, lowp>\t\tlowp_dmat2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<double, mediump>\tmediump_dmat2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<double, highp>\t\thighp_dmat2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<double, lowp>\t\tlowp_dmat2x2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<double, mediump>\tmediump_dmat2x2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<double, highp>\t\thighp_dmat2x2;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 2 columns of 3 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x3<double, lowp>\t\tlowp_dmat2x3;\r\n\t\r\n\t/// 2 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x3<double, mediump>\tmediump_dmat2x3;\r\n\t\r\n\t/// 2 columns of 3 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x3<double, highp>\t\thighp_dmat2x3;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 2 columns of 4 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x4<double, lowp>\t\tlowp_dmat2x4;\r\n\t\r\n\t/// 2 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x4<double, mediump>\tmediump_dmat2x4;\r\n\t\r\n\t/// 2 columns of 4 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x4<double, highp>\t\thighp_dmat2x4;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 3 columns of 2 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x2<double, lowp>\t\tlowp_dmat3x2;\r\n\t\r\n\t/// 3 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x2<double, mediump>\tmediump_dmat3x2;\r\n\t\r\n\t/// 3 columns of 2 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x2<double, highp>\t\thighp_dmat3x2;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 3 columns of 3 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, lowp>\t\tlowp_dmat3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<double, mediump>\tmediump_dmat3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<double, highp>\t\thighp_dmat3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<double, lowp>\t\tlowp_dmat3x3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<double, mediump>\tmediump_dmat3x3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<double, highp>\t\thighp_dmat3x3;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 3 columns of 4 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x4<double, lowp>\t\tlowp_dmat3x4;\r\n\t\r\n\t/// 3 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x4<double, mediump>\tmediump_dmat3x4;\r\n\t\r\n\t/// 3 columns of 4 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x4<double, highp>\t\thighp_dmat3x4;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 4 columns of 2 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x2<double, lowp>\t\tlowp_dmat4x2;\r\n\t\r\n\t/// 4 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x2<double, mediump>\tmediump_dmat4x2;\r\n\t\r\n\t/// 4 columns of 2 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x2<double, highp>\t\thighp_dmat4x2;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 4 columns of 3 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x3<double, lowp>\t\tlowp_dmat4x3;\r\n\t\r\n\t/// 4 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x3<double, mediump>\tmediump_dmat4x3;\r\n\t\r\n\t/// 4 columns of 3 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x3<double, highp>\t\thighp_dmat4x3;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 4 columns of 4 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<double, lowp>\t\tlowp_dmat4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<double, mediump>\tmediump_dmat4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<double, highp>\t\thighp_dmat4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of low precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<double, lowp>\t\tlowp_dmat4x4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<double, mediump>\tmediump_dmat4x4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of high precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<double, highp>\t\thighp_dmat4x4;\r\n\t\r\n\t/// @}\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_DOUBLE))\r\n\ttypedef lowp_dmat2x2\t\tdmat2x2;\r\n\ttypedef lowp_dmat2x3\t\tdmat2x3;\r\n\ttypedef lowp_dmat2x4\t\tdmat2x4;\r\n\ttypedef lowp_dmat3x2\t\tdmat3x2;\r\n\ttypedef lowp_dmat3x3\t\tdmat3x3;\r\n\ttypedef lowp_dmat3x4\t\tdmat3x4;\r\n\ttypedef lowp_dmat4x2\t\tdmat4x2;\r\n\ttypedef lowp_dmat4x3\t\tdmat4x3;\r\n\ttypedef lowp_dmat4x4\t\tdmat4x4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))\r\n\ttypedef mediump_dmat2x2\t\tdmat2x2;\r\n\ttypedef mediump_dmat2x3\t\tdmat2x3;\r\n\ttypedef mediump_dmat2x4\t\tdmat2x4;\r\n\ttypedef mediump_dmat3x2\t\tdmat3x2;\r\n\ttypedef mediump_dmat3x3\t\tdmat3x3;\r\n\ttypedef mediump_dmat3x4\t\tdmat3x4;\r\n\ttypedef mediump_dmat4x2\t\tdmat4x2;\r\n\ttypedef mediump_dmat4x3\t\tdmat4x3;\r\n\ttypedef mediump_dmat4x4\t\tdmat4x4;\r\n#else //defined(GLM_PRECISION_HIGHP_DOUBLE)\r\n\t\r\n\t//! 2 * 2 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat2x2\t\tdmat2;\r\n\t\r\n\t//! 3 * 3 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat3x3\t\tdmat3;\r\n\t\r\n\t//! 4 * 4 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat4x4\t\tdmat4;\r\n\t\r\n\t//! 2 * 2 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat2x2\t\tdmat2x2;\r\n\t\r\n\t//! 2 * 3 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat2x3\t\tdmat2x3;\r\n\t\r\n\t//! 2 * 4 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat2x4\t\tdmat2x4;\r\n\t\r\n\t//! 3 * 2 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat3x2\t\tdmat3x2;\r\n\t\r\n\t/// 3 * 3 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat3x3\t\tdmat3x3;\r\n\t\r\n\t/// 3 * 4 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat3x4\t\tdmat3x4;\r\n\t\r\n\t/// 4 * 2 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat4x2\t\tdmat4x2;\r\n\t\r\n\t/// 4 * 3 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat4x3\t\tdmat4x3;\r\n\t\r\n\t/// 4 * 4 matrix of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\ttypedef highp_dmat4x4\t\tdmat4x4;\r\n\r\n#endif//GLM_PRECISION\r\n\t\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#endif//glm_core_type_mat\r\n"
  },
  {
    "path": "gpu/glm/detail/type_mat.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat.inl\r\n/// @date 2011-06-15 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n"
  },
  {
    "path": "gpu/glm/detail/type_mat2x2.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\t\r\n/// @file glm/core/type_mat2x2.hpp\r\n/// @date 2005-01-27 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_mat2x2\r\n#define glm_core_type_mat2x2\r\n\r\n#include \"../fwd.hpp\"\r\n#include \"type_vec2.hpp\"\r\n#include \"type_mat.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tmat2x2\r\n\t{\r\n\t\tenum ctor{_null};\r\n\t\ttypedef T value_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\ttypedef tvec2<T, P> col_type;\r\n\t\ttypedef tvec2<T, P> row_type;\r\n\t\ttypedef tmat2x2<T, P> type;\r\n\t\ttypedef tmat2x2<T, P> transpose_type;\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tfriend tvec2<U, Q> operator/(tmat2x2<U, Q> const & m, tvec2<U, Q> const & v);\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tfriend tvec2<U, Q> operator/(tvec2<U, Q> const & v, tmat2x2<U, Q> const & m);\r\n\r\n\tprivate:\r\n\t\t/// @cond DETAIL\r\n\t\tcol_type value[2];\r\n\t\t/// @endcond\r\n\t\t\r\n\tpublic:\r\n\t\t//////////////////////////////////////\r\n\t\t// Constructors\r\n\t\tGLM_FUNC_DECL tmat2x2();\r\n\t\tGLM_FUNC_DECL tmat2x2(tmat2x2<T, P> const & m);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tmat2x2(tmat2x2<T, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat2x2(\r\n\t\t\tctor Null);\r\n\t\tGLM_FUNC_DECL explicit tmat2x2(\r\n\t\t\tT const & x);\r\n\t\tGLM_FUNC_DECL tmat2x2(\r\n\t\t\tT const & x1, T const & y1,\r\n\t\t\tT const & x2, T const & y2);\r\n\t\tGLM_FUNC_DECL tmat2x2(\r\n\t\t\tcol_type const & v1,\r\n\t\t\tcol_type const & v2);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversions\r\n\t\ttemplate <typename U, typename V, typename M, typename N>\r\n\t\tGLM_FUNC_DECL tmat2x2(\r\n\t\t\tU const & x1, V const & y1,\r\n\t\t\tM const & x2, N const & y2);\r\n\r\n\t\ttemplate <typename U, typename V>\r\n\t\tGLM_FUNC_DECL tmat2x2(\r\n\t\t\ttvec2<U, P> const & v1,\r\n\t\t\ttvec2<V, P> const & v2);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Matrix conversions\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tmat2x2(tmat2x2<U, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat2x2(tmat3x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x2(tmat4x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x2(tmat2x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x2(tmat3x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x2(tmat2x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x2(tmat4x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x2(tmat3x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x2(tmat4x3<T, P> const & x);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Accesses\r\n\r\n\t\tGLM_FUNC_DECL col_type & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL col_type const & operator[](length_t i) const;\r\n\r\n\t\t// Unary updatable operators\r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<T, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator=(tmat2x2<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator+=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator+=(tmat2x2<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator-=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator-=(tmat2x2<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator*=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator*=(tmat2x2<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator/=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator/=(tmat2x2<U, P> const & m);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator++ ();\r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> & operator-- ();\r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tmat2x2<T, P> operator--(int);\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> compute_inverse_mat2(tmat2x2<T, P> const & m);\r\n\r\n\t// Binary operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator+ (\r\n\t\ttmat2x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator+ (\r\n\t\tT const & s,\r\n\t\ttmat2x2<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator+ (\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator- (\r\n\t\ttmat2x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator- (\r\n\t\tT const & s,\r\n\t\ttmat2x2<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator- (\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator* (\r\n\t\ttmat2x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator* (\r\n\t\tT const & s, \r\n\t\ttmat2x2<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat2x2<T, P>::col_type operator* (\r\n\t\ttmat2x2<T, P> const & m,\r\n\t\ttypename tmat2x2<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat2x2<T, P>::row_type operator* (\r\n\t\ttypename tmat2x2<T, P>::col_type const & v,\r\n\t\ttmat2x2<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator* (\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> operator* (\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat3x2<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> operator* (\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat4x2<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator/ (\r\n\t\ttmat2x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator/ (\r\n\t\tT const & s,\r\n\t\ttmat2x2<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat2x2<T, P>::col_type operator/ (\r\n\t\ttmat2x2<T, P> const & m,\r\n\t\ttypename tmat2x2<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat2x2<T, P>::row_type operator/ (\r\n\t\ttypename tmat2x2<T, P>::col_type const & v,\r\n\t\ttmat2x2<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator/ (\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2);\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_DECL tmat2x2<T, P> const operator-(\r\n\t\ttmat2x2<T, P> const & m);\r\n} //namespace detail\r\n} //namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_mat2x2.inl\"\r\n#endif\r\n\r\n#endif //glm_core_type_mat2x2\r\n"
  },
  {
    "path": "gpu/glm/detail/type_mat2x2.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat2x2.inl\r\n/// @date 2005-01-16 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tmat2x2<T, P>::length() const\r\n\t{\r\n\t\treturn 2;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type &\r\n\ttmat2x2<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t)\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type const &\r\n\ttmat2x2<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t) const\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2()\r\n\t{\r\n\t\tthis->value[0] = col_type(1, 0);\r\n\t\tthis->value[1] = col_type(0, 1);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2(\r\n\t\ttmat2x2<T, Q> const & m)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\tctor\r\n\t)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tvalue_type const Zero(0);\r\n\t\tthis->value[0] = col_type(s, Zero);\r\n\t\tthis->value[1] = col_type(Zero, s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\tT const & x0, T const & y0,\r\n\t\tT const & x1, T const & y1\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(x0, y0);\r\n\t\tthis->value[1] = col_type(x1, y1);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\tcol_type const & v0,\r\n\t\tcol_type const & v1\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = v0;\r\n\t\tthis->value[1] = v1;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion constructors\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename X1, typename Y1, typename X2, typename Y2>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\tX1 const & x1, Y1 const & y1,\r\n\t\tX2 const & x2, Y2 const & y2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(static_cast<T>(x1), value_type(y1));\r\n\t\tthis->value[1] = col_type(static_cast<T>(x2), value_type(y2));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename V1, typename V2>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\ttvec2<V1, P> const & v1,\r\n\t\ttvec2<V2, P> const & v2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(v1);\r\n\t\tthis->value[1] = col_type(v2);\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// mat2x2 matrix conversions\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\ttmat2x2<U, Q> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>::tmat2x2\r\n\t(\r\n\t\ttmat4x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// mat2x2 operators\r\n\r\n\t// This function shouldn't required but it seems that VC7.1 have an optimisation bug if this operator wasn't declared\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator= (tmat2x2<T, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator= (tmat2x2<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator+= (U s)\r\n\t{\r\n\t\tthis->value[0] += s;\r\n\t\tthis->value[1] += s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator+= (tmat2x2<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] += m[0];\r\n\t\tthis->value[1] += m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator-= (U s)\r\n\t{\r\n\t\tthis->value[0] -= s;\r\n\t\tthis->value[1] -= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator-= (tmat2x2<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] -= m[0];\r\n\t\tthis->value[1] -= m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator*= (U s)\r\n\t{\r\n\t\tthis->value[0] *= s;\r\n\t\tthis->value[1] *= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator*= (tmat2x2<U, P> const & m)\r\n\t{\r\n\t\treturn (*this = *this * m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator/= (U s)\r\n\t{\r\n\t\tthis->value[0] /= s;\r\n\t\tthis->value[1] /= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator/= (tmat2x2<U, P> const & m)\r\n\t{\r\n\t\treturn (*this = *this * detail::compute_inverse<detail::tmat2x2, T, P>::call(m));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator++()\r\n\t{\r\n\t\t++this->value[0];\r\n\t\t++this->value[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P>& tmat2x2<T, P>::operator--()\r\n\t{\r\n\t\t--this->value[0];\r\n\t\t--this->value[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> tmat2x2<T, P>::operator++(int)\r\n\t{\r\n\t\ttmat2x2<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> tmat2x2<T, P>::operator--(int)\r\n\t{\r\n\t\ttmat2x2<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_inverse<detail::tmat2x2, T, P>\r\n\t{\r\n\t\tGLM_FUNC_QUALIFIER static detail::tmat2x2<T, P> call(detail::tmat2x2<T, P> const & m)\r\n\t\t{\r\n\t\t\tT OneOverDeterminant = static_cast<T>(1) / (\r\n\t\t\t\t+ m[0][0] * m[1][1]\r\n\t\t\t\t- m[1][0] * m[0][1]);\r\n\r\n\t\t\tdetail::tmat2x2<T, P> Inverse(\r\n\t\t\t\t+ m[1][1] * OneOverDeterminant,\r\n\t\t\t\t- m[0][1] * OneOverDeterminant,\r\n\t\t\t\t- m[1][0] * OneOverDeterminant,\r\n\t\t\t\t+ m[0][0] * OneOverDeterminant);\r\n\r\n\t\t\treturn Inverse;\r\n\t\t}\r\n\t};\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Binary operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator+\r\n\t(\r\n\t\ttmat2x2<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator+\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator+\r\n\t(\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\tm1[0] + m2[0],\r\n\t\t\tm1[1] + m2[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator-\r\n\t(\r\n\t\ttmat2x2<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\tm[0] - s,\r\n\t\t\tm[1] - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator-\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\ts - m[0],\r\n\t\t\ts - m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator-\r\n\t(\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\tm1[0] - m2[0],\r\n\t\t\tm1[1] - m2[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator*\r\n\t(\r\n\t\ttmat2x2<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator*\r\n\t(\t\r\n\t\tT const & s,\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type operator*\r\n\t(\r\n\t\ttmat2x2<T, P> const & m,\r\n\t\ttypename tmat2x2<T, P>::row_type const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tm[0][0] * v.x + m[1][0] * v.y,\r\n\t\t\tm[0][1] * v.x + m[1][1] * v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x2<T, P>::row_type operator*\r\n\t(\r\n\t\ttypename tmat2x2<T, P>::col_type const & v,\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tv.x * m[0][0] + v.y * m[0][1],\r\n\t\t\tv.x * m[1][0] + v.y * m[1][1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator*\r\n\t(\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> operator*\r\n\t(\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat3x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> operator*\r\n\t(\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat4x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1],\r\n\t\t\tm1[0][0] * m2[3][0] + m1[1][0] * m2[3][1],\r\n\t\t\tm1[0][1] * m2[3][0] + m1[1][1] * m2[3][1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator/\r\n\t(\r\n\t\ttmat2x2<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\tm[0] / s,\r\n\t\t\tm[1] / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator/\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\ts / m[0],\r\n\t\t\ts / m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x2<T, P>::col_type operator/\r\n\t(\r\n\t\ttmat2x2<T, P> const & m, \r\n\t\ttypename tmat2x2<T, P>::row_type & v\r\n\t)\r\n\t{\r\n\t\treturn detail::compute_inverse<detail::tmat2x2, T, P>::call(m) * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x2<T, P>::row_type operator/ \r\n\t(\r\n\t\ttypename tmat2x2<T, P>::col_type const & v,\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn v * detail::compute_inverse<detail::tmat2x2, T, P>::call(m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator/\r\n\t(\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2\r\n\t)\r\n\t{\t\r\n\t\ttmat2x2<T, P> m1_copy(m1);\r\n\t\treturn m1_copy /= m2;\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> const operator-\r\n\t(\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat2x2<T, P>(\r\n\t\t\t-m[0], \r\n\t\t\t-m[1]);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] == m2[0]) && (m1[1] == m2[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttmat2x2<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] != m2[0]) || (m1[1] != m2[1]);\r\n\t}\r\n\r\n} //namespace detail\r\n} //namespace glm\r\n"
  },
  {
    "path": "gpu/glm/detail/type_mat2x3.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat2x3.hpp\r\n/// @date 2006-10-01 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_mat2x3\r\n#define glm_core_type_mat2x3\r\n\r\n#include \"../fwd.hpp\"\r\n#include \"type_vec2.hpp\"\r\n#include \"type_vec3.hpp\"\r\n#include \"type_mat.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tmat2x3\r\n\t{\r\n\t\tenum ctor{_null};\r\n\t\ttypedef T value_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\ttypedef tvec3<T, P> col_type;\r\n\t\ttypedef tvec2<T, P> row_type;\r\n\t\ttypedef tmat2x3<T, P> type;\r\n\t\ttypedef tmat3x2<T, P> transpose_type;\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\tprivate:\r\n\t\t// Data \r\n\t\tcol_type value[2];\r\n\r\n\tpublic:\r\n\t\t// Constructors\r\n\t\tGLM_FUNC_DECL tmat2x3();\r\n\t\tGLM_FUNC_DECL tmat2x3(tmat2x3<T, P> const & m);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tmat2x3(tmat2x3<T, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat2x3(\r\n\t\t\tctor);\r\n\t\tGLM_FUNC_DECL explicit tmat2x3(\r\n\t\t\tT const & s);\r\n\t\tGLM_FUNC_DECL tmat2x3(\r\n\t\t\tT const & x0, T const & y0, T const & z0,\r\n\t\t\tT const & x1, T const & y1, T const & z1);\r\n\t\tGLM_FUNC_DECL tmat2x3(\r\n\t\t\tcol_type const & v0,\r\n\t\t\tcol_type const & v1);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversions\r\n\t\ttemplate <typename X1, typename Y1, typename Z1, typename X2, typename Y2, typename Z2>\r\n\t\tGLM_FUNC_DECL tmat2x3(\r\n\t\t\tX1 const & x1, Y1 const & y1, Z1 const & z1,\r\n\t\t\tX2 const & x2, Y2 const & y2, Z2 const & z2);\r\n\t\t\t\r\n\t\ttemplate <typename U, typename V>\r\n\t\tGLM_FUNC_DECL tmat2x3(\r\n\t\t\ttvec3<U, P> const & v1,\r\n\t\t\ttvec3<V, P> const & v2);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Matrix conversion\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tmat2x3(tmat2x3<U, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat2x3(tmat2x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x3(tmat3x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x3(tmat4x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x3(tmat2x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x3(tmat3x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x3(tmat3x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x3(tmat4x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x3(tmat4x3<T, P> const & x);\r\n\r\n\t\t// Accesses\r\n\t\tGLM_FUNC_DECL col_type & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL col_type const & operator[](length_t i) const;\r\n\r\n\t\t// Unary updatable operators\r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> & operator=  (tmat2x3<T, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> & operator=  (tmat2x3<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> & operator+= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> & operator+= (tmat2x3<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> & operator-= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> & operator-= (tmat2x3<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> & operator*= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> & operator/= (U s);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> & operator++ ();\r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> & operator-- ();\r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tmat2x3<T, P> operator--(int);\r\n\t};\r\n\r\n\t// Binary operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> operator+ (\r\n\t\ttmat2x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttmat2x3<T, P> operator+ (\r\n\t\ttmat2x3<T, P> const & m1,\r\n\t\ttmat2x3<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> operator- (\r\n\t\ttmat2x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> operator- (\r\n\t\ttmat2x3<T, P> const & m1,\r\n\t\ttmat2x3<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> operator* (\r\n\t\ttmat2x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> operator* (\r\n\t\tT const & s,\r\n\t\ttmat2x3<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat2x3<T, P>::col_type operator* (\r\n\t\ttmat2x3<T, P> const & m, \r\n\t\ttypename tmat2x3<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat2x3<T, P>::row_type operator* (\r\n\t\ttypename tmat2x3<T, P>::col_type const & v,\r\n\t\ttmat2x3<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> operator* (\r\n\t\ttmat2x3<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator* (\r\n\t\ttmat2x3<T, P> const & m1,\r\n\t\ttmat3x2<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> operator* (\r\n\t\ttmat2x3<T, P> const & m1,\r\n\t\ttmat4x2<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> operator/ (\r\n\t\ttmat2x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> operator/ (\r\n\t\tT const & s,\r\n\t\ttmat2x3<T, P> const & m);\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> const operator- (\r\n\t\ttmat2x3<T, P> const & m);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_mat2x3.inl\"\r\n#endif\r\n\r\n#endif //glm_core_type_mat2x3\r\n"
  },
  {
    "path": "gpu/glm/detail/type_mat2x3.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat2x3.inl\r\n/// @date 2006-08-05 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tmat2x3<T, P>::length() const\r\n\t{\r\n\t\treturn 2;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type &\r\n\ttmat2x3<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t)\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type const &\r\n\ttmat2x3<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t) const\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Constructors\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3()\r\n\t{\r\n\t\tthis->value[0] = col_type(T(1), T(0), T(0));\r\n\t\tthis->value[1] = col_type(T(0), T(1), T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3(\r\n\t\ttmat2x3<T, Q> const & m)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\tctor\r\n\t)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(s, T(0), T(0));\r\n\t\tthis->value[1] = col_type(T(0), s, T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\tT const & x0, T const & y0, T const & z0,\r\n\t\tT const & x1, T const & y1, T const & z1\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(x0, y0, z0);\r\n\t\tthis->value[1] = col_type(x1, y1, z1);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\tcol_type const & v0,\r\n\t\tcol_type const & v1\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = v0;\r\n\t\tthis->value[1] = v1;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion constructors\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <\r\n\t\ttypename X1, typename Y1, typename Z1,\r\n\t\ttypename X2, typename Y2, typename Z2>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\tX1 const & x1, Y1 const & y1, Z1 const & z1,\r\n\t\tX2 const & x2, Y2 const & y2, Z2 const & z2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1));\r\n\t\tthis->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename V1, typename V2>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\ttvec3<V1, P> const & v1,\r\n\t\ttvec3<V2, P> const & v2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(v1);\r\n\t\tthis->value[1] = col_type(v2);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Matrix conversions\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\ttmat2x3<U, Q> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], T(0));\r\n\t\tthis->value[1] = col_type(m[1], T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], T(0));\r\n\t\tthis->value[1] = col_type(m[1], T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], T(0));\r\n\t\tthis->value[1] = col_type(m[1], T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>::tmat2x3\r\n\t(\r\n\t\ttmat4x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Unary updatable operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator= (tmat2x3<T, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator= (tmat2x3<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> & tmat2x3<T, P>::operator+= (U s)\r\n\t{\r\n\t\tthis->value[0] += s;\r\n\t\tthis->value[1] += s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator+= (tmat2x3<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] += m[0];\r\n\t\tthis->value[1] += m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator-= (U s)\r\n\t{\r\n\t\tthis->value[0] -= s;\r\n\t\tthis->value[1] -= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator-= (tmat2x3<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] -= m[0];\r\n\t\tthis->value[1] -= m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P>& tmat2x3<T, P>::operator*= (U s)\r\n\t{\r\n\t\tthis->value[0] *= s;\r\n\t\tthis->value[1] *= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> & tmat2x3<T, P>::operator/= (U s)\r\n\t{\r\n\t\tthis->value[0] /= s;\r\n\t\tthis->value[1] /= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> & tmat2x3<T, P>::operator++()\r\n\t{\r\n\t\t++this->value[0];\r\n\t\t++this->value[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> & tmat2x3<T, P>::operator--()\r\n\t{\r\n\t\t--this->value[0];\r\n\t\t--this->value[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> tmat2x3<T, P>::operator++(int)\r\n\t{\r\n\t\ttmat2x3<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> tmat2x3<T, P>::operator--(int)\r\n\t{\r\n\t\ttmat2x3<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Binary operators\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> operator+ \r\n\t(\r\n\t\ttmat2x3<T, P> const & m, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> operator+ \r\n\t(\r\n\t\ttmat2x3<T, P> const & m1, \r\n\t\ttmat2x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\tm1[0] + m2[0],\r\n\t\t\tm1[1] + m2[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> operator- \r\n\t(\r\n\t\ttmat2x3<T, P> const & m, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\tm[0] - s,\r\n\t\t\tm[1] - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> operator- \r\n\t(\r\n\t\ttmat2x3<T, P> const & m1, \r\n\t\ttmat2x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\tm1[0] - m2[0],\r\n\t\t\tm1[1] - m2[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> operator* \r\n\t(\r\n\t\ttmat2x3<T, P> const & m, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> operator*\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x3<T, P>::col_type operator*\r\n\t(\r\n\t\ttmat2x3<T, P> const & m,\r\n\t\ttypename tmat2x3<T, P>::row_type const & v)\r\n\t{\r\n\t\treturn typename tmat2x3<T, P>::col_type(\r\n\t\t\tm[0][0] * v.x + m[1][0] * v.y,\r\n\t\t\tm[0][1] * v.x + m[1][1] * v.y,\r\n\t\t\tm[0][2] * v.x + m[1][2] * v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x3<T, P>::row_type operator*\r\n\t(\r\n\t\ttypename tmat2x3<T, P>::col_type const & v,\r\n\t\ttmat2x3<T, P> const & m)\r\n\t{\r\n\t\treturn typename tmat2x3<T, P>::row_type(\r\n\t\t\tv.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2],\r\n\t\t\tv.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> operator*\r\n\t(\r\n\t\ttmat2x3<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator*\r\n\t(\r\n\t\ttmat2x3<T, P> const & m1,\r\n\t\ttmat3x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\tT SrcA00 = m1[0][0];\r\n\t\tT SrcA01 = m1[0][1];\r\n\t\tT SrcA02 = m1[0][2];\r\n\t\tT SrcA10 = m1[1][0];\r\n\t\tT SrcA11 = m1[1][1];\r\n\t\tT SrcA12 = m1[1][2];\r\n\r\n\t\tT SrcB00 = m2[0][0];\r\n\t\tT SrcB01 = m2[0][1];\r\n\t\tT SrcB10 = m2[1][0];\r\n\t\tT SrcB11 = m2[1][1];\r\n\t\tT SrcB20 = m2[2][0];\r\n\t\tT SrcB21 = m2[2][1];\r\n\r\n\t\ttmat3x3<T, P> Result(tmat3x3<T, P>::_null);\r\n\t\tResult[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01;\r\n\t\tResult[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01;\r\n\t\tResult[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01;\r\n\t\tResult[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11;\r\n\t\tResult[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11;\r\n\t\tResult[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11;\r\n\t\tResult[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21;\r\n\t\tResult[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21;\r\n\t\tResult[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> operator*\r\n\t(\r\n\t\ttmat2x3<T, P> const & m1,\r\n\t\ttmat4x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1],\r\n\t\t\tm1[0][2] * m2[2][0] + m1[1][2] * m2[2][1],\r\n\t\t\tm1[0][0] * m2[3][0] + m1[1][0] * m2[3][1],\r\n\t\t\tm1[0][1] * m2[3][0] + m1[1][1] * m2[3][1],\r\n\t\t\tm1[0][2] * m2[3][0] + m1[1][2] * m2[3][1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> operator/\r\n\t(\r\n\t\ttmat2x3<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\tm[0] / s,\r\n\t\t\tm[1] / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> operator/\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\ts / m[0],\r\n\t\t\ts / m[1]);\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> const operator-\r\n\t(\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\t-m[0],\r\n\t\t\t-m[1]);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttmat2x3<T, P> const & m1,\r\n\t\ttmat2x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] == m2[0]) && (m1[1] == m2[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttmat2x3<T, P> const & m1,\r\n\t\ttmat2x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] != m2[0]) || (m1[1] != m2[1]);\r\n\t}\r\n} //namespace detail\r\n} //namespace glm\r\n"
  },
  {
    "path": "gpu/glm/detail/type_mat2x4.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat2x4.hpp\r\n/// @date 2006-08-05 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_mat2x4\r\n#define glm_core_type_mat2x4\r\n\r\n#include \"../fwd.hpp\"\r\n#include \"type_vec2.hpp\"\r\n#include \"type_vec4.hpp\"\r\n#include \"type_mat.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tmat2x4\r\n\t{\r\n\t\tenum ctor{_null};\r\n\t\ttypedef T value_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\ttypedef tvec4<T, P> col_type;\r\n\t\ttypedef tvec2<T, P> row_type;\r\n\t\ttypedef tmat2x4<T, P> type;\r\n\t\ttypedef tmat4x2<T, P> transpose_type;\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\tprivate:\r\n\t\t// Data \r\n\t\tcol_type value[2];\r\n\r\n\tpublic:\r\n\t\t// Constructors\r\n\t\tGLM_FUNC_DECL tmat2x4();\r\n\t\tGLM_FUNC_DECL tmat2x4(tmat2x4<T, P> const & m);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tmat2x4(tmat2x4<T, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat2x4(\r\n\t\t\tctor);\r\n\t\tGLM_FUNC_DECL explicit tmat2x4(\r\n\t\t\tT const & s);\r\n\t\tGLM_FUNC_DECL tmat2x4(\r\n\t\t\tT const & x0, T const & y0, T const & z0, T const & w0,\r\n\t\t\tT const & x1, T const & y1, T const & z1, T const & w1);\r\n\t\tGLM_FUNC_DECL tmat2x4(\r\n\t\t\tcol_type const & v0, \r\n\t\t\tcol_type const & v1);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversions\r\n\t\ttemplate <\r\n\t\t\ttypename X1, typename Y1, typename Z1, typename W1,\r\n\t\t\ttypename X2, typename Y2, typename Z2, typename W2>\r\n\t\tGLM_FUNC_DECL tmat2x4(\r\n\t\t\tX1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,\r\n\t\t\tX2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2);\r\n\r\n\t\ttemplate <typename U, typename V>\r\n\t\tGLM_FUNC_DECL tmat2x4(\r\n\t\t\ttvec4<U, P> const & v1,\r\n\t\t\ttvec4<V, P> const & v2);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Matrix conversions\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tmat2x4(tmat2x4<U, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat2x4(tmat2x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x4(tmat3x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x4(tmat4x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x4(tmat2x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x4(tmat3x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x4(tmat3x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x4(tmat4x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat2x4(tmat4x3<T, P> const & x);\r\n\r\n\t\t// Accesses\r\n\t\tGLM_FUNC_DECL col_type & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL col_type const & operator[](length_t i) const;\r\n\r\n\t\t// Unary updatable operators\r\n\t\tGLM_FUNC_DECL tmat2x4<T, P>& operator=  (tmat2x4<T, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x4<T, P>& operator=  (tmat2x4<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x4<T, P>& operator+= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x4<T, P>& operator+= (tmat2x4<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x4<T, P>& operator-= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x4<T, P>& operator-= (tmat2x4<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x4<T, P>& operator*= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat2x4<T, P>& operator/= (U s);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tmat2x4<T, P> & operator++ ();\r\n\t\tGLM_FUNC_DECL tmat2x4<T, P> & operator-- ();\r\n\t\tGLM_FUNC_DECL tmat2x4<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tmat2x4<T, P> operator--(int);\r\n\t};\r\n\r\n\t// Binary operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x4<T, P> operator+ (\r\n\t\ttmat2x4<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x4<T, P> operator+ (\r\n\t\ttmat2x4<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x4<T, P> operator- (\r\n\t\ttmat2x4<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x4<T, P> operator- (\r\n\t\ttmat2x4<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x4<T, P> operator* (\r\n\t\ttmat2x4<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x4<T, P> operator* (\r\n\t\tT const & s,\r\n\t\ttmat2x4<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat2x4<T, P>::col_type operator* (\r\n\t\ttmat2x4<T, P> const & m,\r\n\t\ttypename tmat2x4<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat2x4<T, P>::row_type operator* (\r\n\t\ttypename tmat2x4<T, P>::col_type const & v,\r\n\t\ttmat2x4<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator* (\r\n\t\ttmat2x4<T, P> const & m1, \r\n\t\ttmat4x2<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x4<T, P> operator* (\r\n\t\ttmat2x4<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> operator* (\r\n\t\ttmat2x4<T, P> const & m1,\r\n\t\ttmat3x2<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x4<T, P> operator/ (\r\n\t\ttmat2x4<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_DECL tmat2x4<T, P> operator/ (\r\n\t\tT const & s,\r\n\t\ttmat2x4<T, P> const & m);\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x4<T, P> const operator- (\r\n\t\ttmat2x4<T, P> const & m);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_mat2x4.inl\"\r\n#endif\r\n\r\n#endif //glm_core_type_mat2x4\r\n"
  },
  {
    "path": "gpu/glm/detail/type_mat2x4.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat2x4.inl\r\n/// @date 2006-08-05 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tmat2x4<T, P>::length() const\r\n\t{\r\n\t\treturn 2;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type &\r\n\ttmat2x4<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t)\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type const &\r\n\ttmat2x4<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t) const\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4()\r\n\t{\r\n\t\tvalue_type const Zero(0);\r\n\t\tvalue_type const One(1);\r\n\t\tthis->value[0] = col_type(One, Zero, Zero, Zero);\r\n\t\tthis->value[1] = col_type(Zero, One, Zero, Zero);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4(\r\n\t\ttmat2x4<T, Q> const & m)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\tctor\r\n\t)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tvalue_type const Zero(0);\r\n\t\tthis->value[0] = col_type(s, Zero, Zero, Zero);\r\n\t\tthis->value[1] = col_type(Zero, s, Zero, Zero);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\tT const & x0, T const & y0, T const & z0, T const & w0,\r\n\t\tT const & x1, T const & y1, T const & z1, T const & w1\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(x0, y0, z0, w0);\r\n\t\tthis->value[1] = col_type(x1, y1, z1, w1);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\tcol_type const & v0,\r\n\t\tcol_type const & v1\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = v0;\r\n\t\tthis->value[1] = v1;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion constructors\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <\r\n\t\ttypename X1, typename Y1, typename Z1, typename W1,\r\n\t\ttypename X2, typename Y2, typename Z2, typename W2>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\tX1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,\r\n\t\tX2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1), value_type(w1));\r\n\t\tthis->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2), value_type(w2));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename V1, typename V2>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\ttvec4<V1, P> const & v1,\r\n\t\ttvec4<V2, P> const & v2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(v1);\r\n\t\tthis->value[1] = col_type(v2);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Matrix conversions\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\ttmat2x4<U, Q> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], detail::tvec2<T, P>(0));\r\n\t\tthis->value[1] = col_type(m[1], detail::tvec2<T, P>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], T(0));\r\n\t\tthis->value[1] = col_type(m[1], T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], T(0));\r\n\t\tthis->value[1] = col_type(m[1], T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], detail::tvec2<T, P>(0));\r\n\t\tthis->value[1] = col_type(m[1], detail::tvec2<T, P>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], detail::tvec2<T, P>(T(0)));\r\n\t\tthis->value[1] = col_type(m[1], detail::tvec2<T, P>(T(0)));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>::tmat2x4\r\n\t(\r\n\t\ttmat4x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], T(0));\r\n\t\tthis->value[1] = col_type(m[1], T(0));\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Unary updatable operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator= (tmat2x4<T, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator= (tmat2x4<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator+= (U s)\r\n\t{\r\n\t\tthis->value[0] += s;\r\n\t\tthis->value[1] += s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator+= (tmat2x4<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] += m[0];\r\n\t\tthis->value[1] += m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator-= (U s)\r\n\t{\r\n\t\tthis->value[0] -= s;\r\n\t\tthis->value[1] -= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator-= (tmat2x4<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] -= m[0];\r\n\t\tthis->value[1] -= m[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator*= (U s)\r\n\t{\r\n\t\tthis->value[0] *= s;\r\n\t\tthis->value[1] *= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> & tmat2x4<T, P>::operator/= (U s)\r\n\t{\r\n\t\tthis->value[0] /= s;\r\n\t\tthis->value[1] /= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator++()\r\n\t{\r\n\t\t++this->value[0];\r\n\t\t++this->value[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P>& tmat2x4<T, P>::operator--()\r\n\t{\r\n\t\t--this->value[0];\r\n\t\t--this->value[1];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> tmat2x4<T, P>::operator++(int)\r\n\t{\r\n\t\ttmat2x4<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> tmat2x4<T, P>::operator--(int)\r\n\t{\r\n\t\ttmat2x4<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Binary operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> operator+\r\n\t(\r\n\t\ttmat2x4<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> operator+\r\n\t(\r\n\t\ttmat2x4<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\tm1[0] + m2[0],\r\n\t\t\tm1[1] + m2[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> operator-\r\n\t(\r\n\t\ttmat2x4<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\tm[0] - s,\r\n\t\t\tm[1] - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> operator-\r\n\t(\r\n\t\ttmat2x4<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\tm1[0] - m2[0],\r\n\t\t\tm1[1] - m2[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> operator*\r\n\t(\r\n\t\ttmat2x4<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> operator*\r\n\t(\r\n\t\tT const & s, \r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x4<T, P>::col_type operator* \r\n\t(\r\n\t\ttmat2x4<T, P> const & m, \r\n\t\ttypename tmat2x4<T, P>::row_type const & v\r\n\t)\r\n\t{\r\n\t\treturn typename tmat2x4<T, P>::col_type(\r\n\t\t\tm[0][0] * v.x + m[1][0] * v.y,\r\n\t\t\tm[0][1] * v.x + m[1][1] * v.y,\r\n\t\t\tm[0][2] * v.x + m[1][2] * v.y,\r\n\t\t\tm[0][3] * v.x + m[1][3] * v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat2x4<T, P>::row_type operator*\r\n\t(\r\n\t\ttypename tmat2x4<T, P>::col_type const & v,\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn typename tmat2x4<T, P>::row_type(\r\n\t\t\tv.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2] + v.w * m[0][3],\r\n\t\t\tv.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2] + v.w * m[1][3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator*\r\n\t(\r\n\t\ttmat2x4<T, P> const & m1,\r\n\t\ttmat4x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\tT SrcA00 = m1[0][0];\r\n\t\tT SrcA01 = m1[0][1];\r\n\t\tT SrcA02 = m1[0][2];\r\n\t\tT SrcA03 = m1[0][3];\r\n\t\tT SrcA10 = m1[1][0];\r\n\t\tT SrcA11 = m1[1][1];\r\n\t\tT SrcA12 = m1[1][2];\r\n\t\tT SrcA13 = m1[1][3];\r\n\r\n\t\tT SrcB00 = m2[0][0];\r\n\t\tT SrcB01 = m2[0][1];\r\n\t\tT SrcB10 = m2[1][0];\r\n\t\tT SrcB11 = m2[1][1];\r\n\t\tT SrcB20 = m2[2][0];\r\n\t\tT SrcB21 = m2[2][1];\r\n\t\tT SrcB30 = m2[3][0];\r\n\t\tT SrcB31 = m2[3][1];\r\n\r\n\t\ttmat4x4<T, P> Result(tmat4x4<T, P>::_null);\r\n\t\tResult[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01;\r\n\t\tResult[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01;\r\n\t\tResult[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01;\r\n\t\tResult[0][3] = SrcA03 * SrcB00 + SrcA13 * SrcB01;\r\n\t\tResult[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11;\r\n\t\tResult[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11;\r\n\t\tResult[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11;\r\n\t\tResult[1][3] = SrcA03 * SrcB10 + SrcA13 * SrcB11;\r\n\t\tResult[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21;\r\n\t\tResult[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21;\r\n\t\tResult[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21;\r\n\t\tResult[2][3] = SrcA03 * SrcB20 + SrcA13 * SrcB21;\r\n\t\tResult[3][0] = SrcA00 * SrcB30 + SrcA10 * SrcB31;\r\n\t\tResult[3][1] = SrcA01 * SrcB30 + SrcA11 * SrcB31;\r\n\t\tResult[3][2] = SrcA02 * SrcB30 + SrcA12 * SrcB31;\r\n\t\tResult[3][3] = SrcA03 * SrcB30 + SrcA13 * SrcB31;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> operator*\r\n\t(\r\n\t\ttmat2x4<T, P> const & m1,\r\n\t\ttmat2x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1],\r\n\t\t\tm1[0][3] * m2[0][0] + m1[1][3] * m2[0][1],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1],\r\n\t\t\tm1[0][3] * m2[1][0] + m1[1][3] * m2[1][1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> operator*\r\n\t(\r\n\t\ttmat2x4<T, P> const & m1,\r\n\t\ttmat3x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1],\r\n\t\t\tm1[0][3] * m2[0][0] + m1[1][3] * m2[0][1],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1],\r\n\t\t\tm1[0][3] * m2[1][0] + m1[1][3] * m2[1][1],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1],\r\n\t\t\tm1[0][2] * m2[2][0] + m1[1][2] * m2[2][1],\r\n\t\t\tm1[0][3] * m2[2][0] + m1[1][3] * m2[2][1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> operator/\r\n\t(\r\n\t\ttmat2x4<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\tm[0] / s,\r\n\t\t\tm[1] / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> operator/\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\ts / m[0],\r\n\t\t\ts / m[1]);\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> const operator-\r\n\t(\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\t-m[0], \r\n\t\t\t-m[1]);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttmat2x4<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] == m2[0]) && (m1[1] == m2[1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttmat2x4<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] != m2[0]) || (m1[1] != m2[1]);\r\n\t}\r\n} //namespace detail\r\n} //namespace glm\r\n"
  },
  {
    "path": "gpu/glm/detail/type_mat3x2.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat3x2.hpp\r\n/// @date 2006-08-05 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_mat3x2\r\n#define glm_core_type_mat3x2\r\n\r\n#include \"../fwd.hpp\"\r\n#include \"type_vec2.hpp\"\r\n#include \"type_vec3.hpp\"\r\n#include \"type_mat.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tmat3x2\r\n\t{\r\n\t\tenum ctor{_null};\r\n\t\ttypedef T value_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\ttypedef tvec2<T, P> col_type;\r\n\t\ttypedef tvec3<T, P> row_type;\r\n\t\ttypedef tmat3x2<T, P> type;\r\n\t\ttypedef tmat2x3<T, P> transpose_type;\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\tprivate:\r\n\t\t// Data\r\n\t\tcol_type value[3];\r\n\r\n\tpublic:\r\n\t\t// Constructors\r\n\t\tGLM_FUNC_DECL tmat3x2();\r\n\t\tGLM_FUNC_DECL tmat3x2(tmat3x2<T, P> const & m);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tmat3x2(tmat3x2<T, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat3x2(\r\n\t\t\tctor);\r\n\t\tGLM_FUNC_DECL explicit tmat3x2(\r\n\t\t\tT const & s);\r\n\t\tGLM_FUNC_DECL tmat3x2(\r\n\t\t\tT const & x0, T const & y0,\r\n\t\t\tT const & x1, T const & y1,\r\n\t\t\tT const & x2, T const & y2);\r\n\t\tGLM_FUNC_DECL tmat3x2(\r\n\t\t\tcol_type const & v0,\r\n\t\t\tcol_type const & v1,\r\n\t\t\tcol_type const & v2);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversions\r\n\t\ttemplate<\r\n\t\t\ttypename X1, typename Y1,\r\n\t\t\ttypename X2, typename Y2,\r\n\t\t\ttypename X3, typename Y3>\r\n\t\tGLM_FUNC_DECL tmat3x2(\r\n\t\t\tX1 const & x1, Y1 const & y1,\r\n\t\t\tX2 const & x2, Y2 const & y2,\r\n\t\t\tX3 const & x3, Y3 const & y3);\r\n\t\t\t\r\n\t\ttemplate <typename V1, typename V2, typename V3>\r\n\t\tGLM_FUNC_DECL tmat3x2(\r\n\t\t\ttvec2<V1, P> const & v1,\r\n\t\t\ttvec2<V2, P> const & v2,\r\n\t\t\ttvec2<V3, P> const & v3);\r\n\r\n\t\t// Matrix conversions\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tmat3x2(tmat3x2<U, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat3x2(tmat2x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x2(tmat3x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x2(tmat4x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x2(tmat2x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x2(tmat2x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x2(tmat3x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x2(tmat4x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x2(tmat4x3<T, P> const & x);\r\n\r\n\t\t// Accesses\r\n\t\tGLM_FUNC_DECL col_type & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL col_type const & operator[](length_t i) const;\r\n\r\n\t\t// Unary updatable operators\r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> & operator=  (tmat3x2<T, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> & operator=  (tmat3x2<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> & operator+= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> & operator+= (tmat3x2<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> & operator-= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> & operator-= (tmat3x2<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> & operator*= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> & operator/= (U s);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> & operator++ ();\r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> & operator-- ();\r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tmat3x2<T, P> operator--(int);\r\n\t};\r\n\r\n\t// Binary operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> operator+ (\r\n\t\ttmat3x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> operator+ (\r\n\t\ttmat3x2<T, P> const & m1,\r\n\t\ttmat3x2<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> operator- (\r\n\t\ttmat3x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> operator- (\r\n\t\ttmat3x2<T, P> const & m1,\r\n\t\ttmat3x2<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> operator* (\r\n\t\ttmat3x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> operator* (\r\n\t\tT const & s,\r\n\t\ttmat3x2<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat3x2<T, P>::col_type operator* (\r\n\t\ttmat3x2<T, P> const & m,\r\n\t\ttypename tmat3x2<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat3x2<T, P>::row_type operator* (\r\n\t\ttypename tmat3x2<T, P>::col_type const & v,\r\n\t\ttmat3x2<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x2<T, P> operator* (\r\n\t\ttmat3x2<T, P> const & m1,\r\n\t\ttmat2x3<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> operator* (\r\n\t\ttmat3x2<T, P> const & m1,\r\n\t\ttmat3x3<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> operator* (\r\n\t\ttmat3x2<T, P> const & m1,\r\n\t\ttmat4x3<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> operator/ (\r\n\t\ttmat3x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> operator/ (\r\n\t\tT const & s,\r\n\t\ttmat3x2<T, P> const & m);\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> const operator-(\r\n\t\ttmat3x2<T, P> const & m);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_mat3x2.inl\"\r\n#endif\r\n\r\n#endif //glm_core_type_mat3x2\r\n"
  },
  {
    "path": "gpu/glm/detail/type_mat3x2.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat3x2.inl\r\n/// @date 2006-08-05 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tmat3x2<T, P>::length() const\r\n\t{\r\n\t\treturn 3;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type &\r\n\ttmat3x2<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t)\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type const & \r\n\ttmat3x2<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t) const\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Constructors\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2()\r\n\t{\r\n\t\tthis->value[0] = col_type(1, 0);\r\n\t\tthis->value[1] = col_type(0, 1);\r\n\t\tthis->value[2] = col_type(0, 0);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t\tthis->value[2] = m.value[2];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2(\r\n\t\ttmat3x2<T, Q> const & m)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t\tthis->value[2] = m.value[2];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\tctor\r\n\t)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(s, 0);\r\n\t\tthis->value[1] = col_type(0, s);\r\n\t\tthis->value[2] = col_type(0, 0);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\tT const & x0, T const & y0,\r\n\t\tT const & x1, T const & y1,\r\n\t\tT const & x2, T const & y2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(x0, y0);\r\n\t\tthis->value[1] = col_type(x1, y1);\r\n\t\tthis->value[2] = col_type(x2, y2);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\tcol_type const & v0,\r\n\t\tcol_type const & v1,\r\n\t\tcol_type const & v2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = v0;\r\n\t\tthis->value[1] = v1;\r\n\t\tthis->value[2] = v2;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion constructors\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <\r\n\t\ttypename X1, typename Y1,\r\n\t\ttypename X2, typename Y2,\r\n\t\ttypename X3, typename Y3>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\tX1 const & x1, Y1 const & y1,\r\n\t\tX2 const & x2, Y2 const & y2,\r\n\t\tX3 const & x3, Y3 const & y3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(static_cast<T>(x1), value_type(y1));\r\n\t\tthis->value[1] = col_type(static_cast<T>(x2), value_type(y2));\r\n\t\tthis->value[2] = col_type(static_cast<T>(x3), value_type(y3));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename V1, typename V2, typename V3>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\ttvec2<V1, P> const & v1,\r\n\t\ttvec2<V2, P> const & v2,\r\n\t\ttvec2<V3, P> const & v3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(v1);\r\n\t\tthis->value[1] = col_type(v2);\r\n\t\tthis->value[2] = col_type(v3);\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// mat3x2 matrix conversions\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\ttmat3x2<U, Q> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = col_type(T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>::tmat3x2\r\n\t(\r\n\t\ttmat4x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Unary updatable operators\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator= (tmat3x2<T, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator= (tmat3x2<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator+= (U s)\r\n\t{\r\n\t\tthis->value[0] += s;\r\n\t\tthis->value[1] += s;\r\n\t\tthis->value[2] += s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator+= (tmat3x2<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] += m[0];\r\n\t\tthis->value[1] += m[1];\r\n\t\tthis->value[2] += m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator-= (U s)\r\n\t{\r\n\t\tthis->value[0] -= s;\r\n\t\tthis->value[1] -= s;\r\n\t\tthis->value[2] -= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator-= (tmat3x2<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] -= m[0];\r\n\t\tthis->value[1] -= m[1];\r\n\t\tthis->value[2] -= m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator*= (U s)\r\n\t{\r\n\t\tthis->value[0] *= s;\r\n\t\tthis->value[1] *= s;\r\n\t\tthis->value[2] *= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> & tmat3x2<T, P>::operator/= (U s)\r\n\t{\r\n\t\tthis->value[0] /= s;\r\n\t\tthis->value[1] /= s;\r\n\t\tthis->value[2] /= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator++ ()\r\n\t{\r\n\t\t++this->value[0];\r\n\t\t++this->value[1];\r\n\t\t++this->value[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P>& tmat3x2<T, P>::operator-- ()\r\n\t{\r\n\t\t--this->value[0];\r\n\t\t--this->value[1];\r\n\t\t--this->value[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> tmat3x2<T, P>::operator++(int)\r\n\t{\r\n\t\ttmat3x2<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> tmat3x2<T, P>::operator--(int)\r\n\t{\r\n\t\ttmat3x2<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Binary operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> operator+\r\n\t(\r\n\t\ttmat3x2<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s,\r\n\t\t\tm[2] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> operator+\r\n\t(\r\n\t\ttmat3x2<T, P> const & m1,\r\n\t\ttmat3x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\tm1[0] + m2[0],\r\n\t\t\tm1[1] + m2[1],\r\n\t\t\tm1[2] + m2[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> operator-\r\n\t(\r\n\t\ttmat3x2<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\tm[0] - s,\r\n\t\t\tm[1] - s,\r\n\t\t\tm[2] - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> operator- \r\n\t(\t\r\n\t\ttmat3x2<T, P> const & m1, \r\n\t\ttmat3x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\tm1[0] - m2[0],\r\n\t\t\tm1[1] - m2[1],\r\n\t\t\tm1[2] - m2[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> operator* \r\n\t(\r\n\t\ttmat3x2<T, P> const & m, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> operator* \r\n\t(\r\n\t\tT const & s, \r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s);\r\n\t}\r\n   \r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x2<T, P>::col_type operator* \r\n\t(\r\n\t\ttmat3x2<T, P> const & m, \r\n\t\ttypename tmat3x2<T, P>::row_type const & v)\r\n\t{\r\n\t\treturn typename tmat3x2<T, P>::col_type(\r\n\t\t\tm[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z,\r\n\t\t\tm[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x2<T, P>::row_type operator*\r\n\t(\r\n\t\ttypename tmat3x2<T, P>::col_type const & v,\r\n\t\ttmat3x2<T, P> const & m)\r\n\t{\r\n\t\treturn typename tmat3x2<T, P>::row_type(\r\n\t\t\tv.x * m[0][0] + v.y * m[0][1],\r\n\t\t\tv.x * m[1][0] + v.y * m[1][1],\r\n\t\t\tv.x * m[2][0] + v.y * m[2][1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator*\r\n\t(\r\n\t\ttmat3x2<T, P> const & m1,\r\n\t\ttmat2x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\tconst T SrcA00 = m1[0][0];\r\n\t\tconst T SrcA01 = m1[0][1];\r\n\t\tconst T SrcA10 = m1[1][0];\r\n\t\tconst T SrcA11 = m1[1][1];\r\n\t\tconst T SrcA20 = m1[2][0];\r\n\t\tconst T SrcA21 = m1[2][1];\r\n\r\n\t\tconst T SrcB00 = m2[0][0];\r\n\t\tconst T SrcB01 = m2[0][1];\r\n\t\tconst T SrcB02 = m2[0][2];\r\n\t\tconst T SrcB10 = m2[1][0];\r\n\t\tconst T SrcB11 = m2[1][1];\r\n\t\tconst T SrcB12 = m2[1][2];\r\n\r\n\t\ttmat2x2<T, P> Result(tmat2x2<T, P>::_null);\r\n\t\tResult[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02;\r\n\t\tResult[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02;\r\n\t\tResult[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12;\r\n\t\tResult[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> operator*\r\n\t(\r\n\t\ttmat3x2<T, P> const & m1,\r\n\t\ttmat3x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> operator*\r\n\t(\r\n\t\ttmat3x2<T, P> const & m1,\r\n\t\ttmat4x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2],\r\n\t\t\tm1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2],\r\n\t\t\tm1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> operator/\r\n\t(\r\n\t\ttmat3x2<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\tm[0] / s,\r\n\t\t\tm[1] / s,\r\n\t\t\tm[2] / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> operator/\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\ts / m[0],\r\n\t\t\ts / m[1],\r\n\t\t\ts / m[2]);\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> const operator-\r\n\t(\r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\t-m[0],\r\n\t\t\t-m[1],\r\n\t\t\t-m[2]);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttmat3x2<T, P> const & m1,\r\n\t\ttmat3x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttmat3x2<T, P> const & m1, \r\n\t\ttmat3x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);\r\n\t}\r\n\r\n} //namespace detail\r\n} //namespace glm\r\n"
  },
  {
    "path": "gpu/glm/detail/type_mat3x3.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat3x3.hpp\r\n/// @date 2005-01-27 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_mat3x3\r\n#define glm_core_type_mat3x3\r\n\r\n#include \"../fwd.hpp\"\r\n#include \"type_vec3.hpp\"\r\n#include \"type_mat.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tmat3x3\r\n\t{\r\n\t\tenum ctor{_null};\r\n\t\ttypedef T value_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\ttypedef tvec3<T, P> col_type;\r\n\t\ttypedef tvec3<T, P> row_type;\r\n\t\ttypedef tmat3x3<T, P> type;\r\n\t\ttypedef tmat3x3<T, P> transpose_type;\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tfriend tvec3<U, Q> operator/(tmat3x3<U, Q> const & m, tvec3<U, Q> const & v);\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tfriend tvec3<U, Q> operator/(tvec3<U, Q> const & v, tmat3x3<U, Q> const & m);\r\n\r\n\tprivate:\r\n\t\t/// @cond DETAIL\r\n\t\tcol_type value[3];\r\n\t\t/// @endcond\r\n\t\t\r\n\tpublic:\r\n\t\t// Constructors\r\n\t\tGLM_FUNC_DECL tmat3x3();\r\n\t\tGLM_FUNC_DECL tmat3x3(tmat3x3<T, P> const & m);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tmat3x3(tmat3x3<T, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat3x3(\r\n\t\t\tctor Null);\r\n\t\tGLM_FUNC_DECL explicit tmat3x3(\r\n\t\t\tT const & s);\r\n\t\tGLM_FUNC_DECL tmat3x3(\r\n\t\t\tT const & x0, T const & y0, T const & z0,\r\n\t\t\tT const & x1, T const & y1, T const & z1,\r\n\t\t\tT const & x2, T const & y2, T const & z2);\r\n\t\tGLM_FUNC_DECL tmat3x3(\r\n\t\t\tcol_type const & v0,\r\n\t\t\tcol_type const & v1,\r\n\t\t\tcol_type const & v2);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversions\r\n\t\ttemplate<\r\n\t\t\ttypename X1, typename Y1, typename Z1,\r\n\t\t\ttypename X2, typename Y2, typename Z2,\r\n\t\t\ttypename X3, typename Y3, typename Z3>\r\n\t\tGLM_FUNC_DECL tmat3x3(\r\n\t\t\tX1 const & x1, Y1 const & y1, Z1 const & z1,\r\n\t\t\tX2 const & x2, Y2 const & y2, Z2 const & z2,\r\n\t\t\tX3 const & x3, Y3 const & y3, Z3 const & z3);\r\n\t\t\t\r\n\t\ttemplate <typename V1, typename V2, typename V3>\r\n\t\tGLM_FUNC_DECL tmat3x3(\r\n\t\t\ttvec3<V1, P> const & v1,\r\n\t\t\ttvec3<V2, P> const & v2,\r\n\t\t\ttvec3<V3, P> const & v3);\r\n\r\n\t\t// Matrix conversions\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tmat3x3(tmat3x3<U, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat3x3(tmat2x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x3(tmat4x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x3(tmat2x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x3(tmat3x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x3(tmat2x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x3(tmat4x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x3(tmat3x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x3(tmat4x3<T, P> const & x);\r\n\r\n\t\t// Accesses\r\n\t\tGLM_FUNC_DECL col_type & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL col_type const & operator[](length_t i) const;\r\n\r\n\t\t// Unary updatable operators\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P>& operator=  (tmat3x3<T, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P>& operator=  (tmat3x3<U, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P>& operator+= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P>& operator+= (tmat3x3<U, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P>& operator-= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P>& operator-= (tmat3x3<U, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P>& operator*= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P>& operator*= (tmat3x3<U, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P>& operator/= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P>& operator/= (tmat3x3<U, P> const & m);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P> & operator++ ();\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P> & operator-- ();\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tmat3x3<T, P> operator--(int);\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> compute_inverse_mat3(tmat3x3<T, P> const & m);\r\n\r\n\t// Binary operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator+ (\r\n\t\ttmat3x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator+ (\r\n\t\tT const & s,\r\n\t\ttmat3x3<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator+ (\r\n\t\ttmat3x3<T, P> const & m1,\r\n\t\ttmat3x3<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator- (\r\n\t\ttmat3x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator- (\r\n\t\tT const & s,\r\n\t\ttmat3x3<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator- (\r\n\t\ttmat3x3<T, P> const & m1,\r\n\t\ttmat3x3<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator* (\r\n\t\ttmat3x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator* (\r\n\t\tT const & s,\r\n\t\ttmat3x3<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator* (\r\n\t\ttmat3x3<T, P> const & m,\r\n\t\ttypename tmat3x3<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat3x3<T, P>::row_type operator* (\r\n\t\ttypename tmat3x3<T, P>::col_type const & v,\r\n\t\ttmat3x3<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator* (\r\n\t\ttmat3x3<T, P> const & m1,\r\n\t\ttmat3x3<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> operator* (\r\n\t\ttmat3x3<T, P> const & m1,\r\n\t\ttmat2x3<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> operator* (\r\n\t\ttmat3x3<T, P> const & m1,\r\n\t\ttmat4x3<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator/ (\r\n\t\ttmat3x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator/ (\r\n\t\tT const & s,\r\n\t\ttmat3x3<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat3x3<T, P>::col_type operator/ (\r\n\t\ttmat3x3<T, P> const & m,\r\n\t\ttypename tmat3x3<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat3x3<T, P>::row_type operator/ (\r\n\t\ttypename tmat3x3<T, P>::col_type const & v,\r\n\t\ttmat3x3<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator/ (\r\n\t\ttmat3x3<T, P> const & m1,\r\n\t\ttmat3x3<T, P> const & m2);\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> const operator-(\r\n\t\ttmat3x3<T, P> const & m);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_mat3x3.inl\"\r\n#endif\r\n\r\n#endif //glm_core_type_mat3x3\r\n"
  },
  {
    "path": "gpu/glm/detail/type_mat3x3.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat3x3.inl\r\n/// @date 2005-01-27 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tmat3x3<T, P>::length() const\r\n\t{\r\n\t\treturn 3;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type &\r\n\ttmat3x3<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t)\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type const &\r\n\ttmat3x3<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t) const\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3()\r\n\t{\r\n\t\tvalue_type const Zero(0);\r\n\t\tvalue_type const One(1);\r\n\t\tthis->value[0] = col_type(One, Zero, Zero);\r\n\t\tthis->value[1] = col_type(Zero, One, Zero);\r\n\t\tthis->value[2] = col_type(Zero, Zero, One);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t\tthis->value[2] = m.value[2];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\tctor\r\n\t)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3(\r\n\t\ttmat3x3<T, Q> const & m)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t\tthis->value[2] = m.value[2];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tvalue_type const Zero(0);\r\n\t\tthis->value[0] = col_type(s, Zero, Zero);\r\n\t\tthis->value[1] = col_type(Zero, s, Zero);\r\n\t\tthis->value[2] = col_type(Zero, Zero, s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\tT const & x0, T const & y0, T const & z0,\r\n\t\tT const & x1, T const & y1, T const & z1,\r\n\t\tT const & x2, T const & y2, T const & z2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(x0, y0, z0);\r\n\t\tthis->value[1] = col_type(x1, y1, z1);\r\n\t\tthis->value[2] = col_type(x2, y2, z2);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\tcol_type const & v0,\r\n\t\tcol_type const & v1,\r\n\t\tcol_type const & v2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = v0;\r\n\t\tthis->value[1] = v1;\r\n\t\tthis->value[2] = v2;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion constructors\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <\r\n\t\ttypename X1, typename Y1, typename Z1,\r\n\t\ttypename X2, typename Y2, typename Z2,\r\n\t\ttypename X3, typename Y3, typename Z3>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\tX1 const & x1, Y1 const & y1, Z1 const & z1,\r\n\t\tX2 const & x2, Y2 const & y2, Z2 const & z2,\r\n\t\tX3 const & x3, Y3 const & y3, Z3 const & z3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1));\r\n\t\tthis->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2));\r\n\t\tthis->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename V1, typename V2, typename V3>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\ttvec3<V1, P> const & v1,\r\n\t\ttvec3<V2, P> const & v2,\r\n\t\ttvec3<V3, P> const & v3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(v1);\r\n\t\tthis->value[1] = col_type(v2);\r\n\t\tthis->value[2] = col_type(v3);\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Conversions\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\ttmat3x3<U, Q> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], value_type(0));\r\n\t\tthis->value[1] = col_type(m[1], value_type(0));\r\n\t\tthis->value[2] = col_type(detail::tvec2<T, P>(0), value_type(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = col_type(detail::tvec2<T, P>(0), value_type(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], value_type(0));\r\n\t\tthis->value[1] = col_type(m[1], value_type(0));\r\n\t\tthis->value[2] = col_type(m[2], value_type(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(detail::tvec2<T, P>(0), value_type(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], value_type(0));\r\n\t\tthis->value[1] = col_type(m[1], value_type(0));\r\n\t\tthis->value[2] = col_type(m[2], value_type(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P>::tmat3x3\r\n\t(\r\n\t\ttmat4x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Operators\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator= (tmat3x3<T, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator= (tmat3x3<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator+= (U s)\r\n\t{\r\n\t\tthis->value[0] += s;\r\n\t\tthis->value[1] += s;\r\n\t\tthis->value[2] += s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator+= (tmat3x3<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] += m[0];\r\n\t\tthis->value[1] += m[1];\r\n\t\tthis->value[2] += m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator-= (U s)\r\n\t{\r\n\t\tthis->value[0] -= s;\r\n\t\tthis->value[1] -= s;\r\n\t\tthis->value[2] -= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator-= (tmat3x3<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] -= m[0];\r\n\t\tthis->value[1] -= m[1];\r\n\t\tthis->value[2] -= m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator*= (U s)\r\n\t{\r\n\t\tthis->value[0] *= s;\r\n\t\tthis->value[1] *= s;\r\n\t\tthis->value[2] *= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator*= (tmat3x3<U, P> const & m)\r\n\t{\r\n\t\treturn (*this = *this * m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator/= (U s)\r\n\t{\r\n\t\tthis->value[0] /= s;\r\n\t\tthis->value[1] /= s;\r\n\t\tthis->value[2] /= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator/= (tmat3x3<U, P> const & m)\r\n\t{\r\n\t\treturn (*this = *this * detail::compute_inverse<detail::tmat3x3, T, P>::call(m));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator++ ()\r\n\t{\r\n\t\t++this->value[0];\r\n\t\t++this->value[1];\r\n\t\t++this->value[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> & tmat3x3<T, P>::operator--()\r\n\t{\r\n\t\t--this->value[0];\r\n\t\t--this->value[1];\r\n\t\t--this->value[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> tmat3x3<T, P>::operator++(int)\r\n\t{\r\n\t\ttmat3x3<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> tmat3x3<T, P>::operator--(int)\r\n\t{\r\n\t\ttmat3x3<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_inverse<detail::tmat3x3, T, P>\r\n\t{\r\n\t\tstatic detail::tmat3x3<T, P> call(detail::tmat3x3<T, P> const & m)\r\n\t\t{\r\n\t\t\tT OneOverDeterminant = static_cast<T>(1) / (\r\n\t\t\t\t+ m[0][0] * (m[1][1] * m[2][2] - m[2][1] * m[1][2])\r\n\t\t\t\t- m[1][0] * (m[0][1] * m[2][2] - m[2][1] * m[0][2])\r\n\t\t\t\t+ m[2][0] * (m[0][1] * m[1][2] - m[1][1] * m[0][2]));\r\n\r\n\t\t\tdetail::tmat3x3<T, P> Inverse(detail::tmat3x3<T, P>::_null);\r\n\t\t\tInverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]) * OneOverDeterminant;\r\n\t\t\tInverse[1][0] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]) * OneOverDeterminant;\r\n\t\t\tInverse[2][0] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]) * OneOverDeterminant;\r\n\t\t\tInverse[0][1] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]) * OneOverDeterminant;\r\n\t\t\tInverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]) * OneOverDeterminant;\r\n\t\t\tInverse[2][1] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]) * OneOverDeterminant;\r\n\t\t\tInverse[0][2] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]) * OneOverDeterminant;\r\n\t\t\tInverse[1][2] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]) * OneOverDeterminant;\r\n\t\t\tInverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]) * OneOverDeterminant;\r\n\r\n\t\t\treturn Inverse;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> compute_inverse_mat3(tmat3x3<T, P> const & m)\r\n\t{\r\n\t\tT S00 = m[0][0];\r\n\t\tT S01 = m[0][1];\r\n\t\tT S02 = m[0][2];\r\n\r\n\t\tT S10 = m[1][0];\r\n\t\tT S11 = m[1][1];\r\n\t\tT S12 = m[1][2];\r\n\r\n\t\tT S20 = m[2][0];\r\n\t\tT S21 = m[2][1];\r\n\t\tT S22 = m[2][2];\r\n/*\r\n\t\ttmat3x3<T, P> Inverse(\r\n\t\t\t+ (S11 * S22 - S21 * S12),\r\n\t\t\t- (S10 * S22 - S20 * S12),\r\n\t\t\t+ (S10 * S21 - S20 * S11),\r\n\t\t\t- (S01 * S22 - S21 * S02),\r\n\t\t\t+ (S00 * S22 - S20 * S02),\r\n\t\t\t- (S00 * S21 - S20 * S01),\r\n\t\t\t+ (S01 * S12 - S11 * S02),\r\n\t\t\t- (S00 * S12 - S10 * S02),\r\n\t\t\t+ (S00 * S11 - S10 * S01));\r\n*/\r\n\t\ttmat3x3<T, P> Inverse(\r\n\t\t\tS11 * S22 - S21 * S12,\r\n\t\t\tS12 * S20 - S22 * S10,\r\n\t\t\tS10 * S21 - S20 * S11,\r\n\t\t\tS02 * S21 - S01 * S22,\r\n\t\t\tS00 * S22 - S02 * S20,\r\n\t\t\tS01 * S20 - S00 * S21,\r\n\t\t\tS12 * S01 - S11 * S02,\r\n\t\t\tS10 * S02 - S12 * S00,\r\n\t\t\tS11 * S00 - S10 * S01);\r\n\r\n\t\tT Determinant = \r\n\t\t\t+ S00 * (S11 * S22 - S21 * S12)\r\n\t\t\t- S10 * (S01 * S22 - S21 * S02)\r\n\t\t\t+ S20 * (S01 * S12 - S11 * S02);\r\n\r\n\t\tInverse /= Determinant;\r\n\t\treturn Inverse;\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Binary operators\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator+ \r\n\t(\r\n\t\ttmat3x3<T, P> const & m, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x3<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s,\r\n\t\t\tm[2] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator+ \r\n\t(\r\n\t\tT const & s, \r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat3x3<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s,\r\n\t\t\tm[2] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator+ \r\n\t(\r\n\t\ttmat3x3<T, P> const & m1, \r\n\t\ttmat3x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x3<T, P>(\r\n\t\t\tm1[0] + m2[0],\r\n\t\t\tm1[1] + m2[1],\r\n\t\t\tm1[2] + m2[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator- \r\n\t(\r\n\t\ttmat3x3<T, P> const & m, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x3<T, P>(\r\n\t\t\tm[0] - s,\r\n\t\t\tm[1] - s,\r\n\t\t\tm[2] - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator- \r\n\t(\r\n\t\tT const & s, \r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat3x3<T, P>(\r\n\t\t\ts - m[0],\r\n\t\t\ts - m[1],\r\n\t\t\ts - m[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator- \r\n\t(\r\n\t\ttmat3x3<T, P> const & m1, \r\n\t\ttmat3x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x3<T, P>(\r\n\t\t\tm1[0] - m2[0],\r\n\t\t\tm1[1] - m2[1],\r\n\t\t\tm1[2] - m2[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator* \r\n\t(\r\n\t\ttmat3x3<T, P> const & m, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x3<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator* \r\n\t(\r\n\t\tT const & s, \r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat3x3<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type operator* \r\n\t(\r\n\t\ttmat3x3<T, P> const & m, \r\n\t\ttypename tmat3x3<T, P>::row_type const & v\r\n\t)\r\n\t{\r\n\t\treturn typename tmat3x3<T, P>::col_type(\r\n\t\t\tm[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z,\r\n\t\t\tm[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z,\r\n\t\t\tm[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER typename tmat3x3<T, P>::row_type operator* \r\n\t(\r\n\t\ttypename tmat3x3<T, P>::col_type const & v, \r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn typename tmat3x3<T, P>::row_type(\r\n\t\t\tm[0][0] * v.x + m[0][1] * v.y + m[0][2] * v.z,\r\n\t\t\tm[1][0] * v.x + m[1][1] * v.y + m[1][2] * v.z,\r\n\t\t\tm[2][0] * v.x + m[2][1] * v.y + m[2][2] * v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator* \r\n\t(\r\n\t\ttmat3x3<T, P> const & m1, \r\n\t\ttmat3x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\tT const SrcA00 = m1[0][0];\r\n\t\tT const SrcA01 = m1[0][1];\r\n\t\tT const SrcA02 = m1[0][2];\r\n\t\tT const SrcA10 = m1[1][0];\r\n\t\tT const SrcA11 = m1[1][1];\r\n\t\tT const SrcA12 = m1[1][2];\r\n\t\tT const SrcA20 = m1[2][0];\r\n\t\tT const SrcA21 = m1[2][1];\r\n\t\tT const SrcA22 = m1[2][2];\r\n\r\n\t\tT const SrcB00 = m2[0][0];\r\n\t\tT const SrcB01 = m2[0][1];\r\n\t\tT const SrcB02 = m2[0][2];\r\n\t\tT const SrcB10 = m2[1][0];\r\n\t\tT const SrcB11 = m2[1][1];\r\n\t\tT const SrcB12 = m2[1][2];\r\n\t\tT const SrcB20 = m2[2][0];\r\n\t\tT const SrcB21 = m2[2][1];\r\n\t\tT const SrcB22 = m2[2][2];\r\n\r\n\t\ttmat3x3<T, P> Result(tmat3x3<T, P>::_null);\r\n\t\tResult[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02;\r\n\t\tResult[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02;\r\n\t\tResult[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02;\r\n\t\tResult[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12;\r\n\t\tResult[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12;\r\n\t\tResult[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11 + SrcA22 * SrcB12;\r\n\t\tResult[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21 + SrcA20 * SrcB22;\r\n\t\tResult[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21 + SrcA21 * SrcB22;\r\n\t\tResult[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21 + SrcA22 * SrcB22;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> operator*\r\n\t(\r\n\t\ttmat3x3<T, P> const & m1,\r\n\t\ttmat2x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> operator*\r\n\t(\r\n\t\ttmat3x3<T, P> const & m1,\r\n\t\ttmat4x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2],\r\n\t\t\tm1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2],\r\n\t\t\tm1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2],\r\n\t\t\tm1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2],\r\n\t\t\tm1[0][2] * m2[3][0] + m1[1][2] * m2[3][1] + m1[2][2] * m2[3][2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator/\r\n\t(\r\n\t\ttmat3x3<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x3<T, P>(\r\n\t\t\tm[0] / s,\r\n\t\t\tm[1] / s,\r\n\t\t\tm[2] / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator/\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat3x3<T, P>(\r\n\t\t\ts / m[0],\r\n\t\t\ts / m[1],\r\n\t\t\ts / m[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x3<T, P>::col_type operator/\r\n\t(\r\n\t\ttmat3x3<T, P> const & m,\r\n\t\ttypename tmat3x3<T, P>::row_type const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::compute_inverse<detail::tmat3x3, T, P>::call(m) * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x3<T, P>::row_type operator/\r\n\t(\r\n\t\ttypename tmat3x3<T, P>::col_type const & v,\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn v * detail::compute_inverse<detail::tmat3x3, T, P>::call(m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator/\r\n\t(\r\n\t\ttmat3x3<T, P> const & m1,\r\n\t\ttmat3x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\ttmat3x3<T, P> m1_copy(m1);\r\n\t\treturn m1_copy /= m2;\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> const operator-\r\n\t(\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat3x3<T, P>(\r\n\t\t\t-m[0], \r\n\t\t\t-m[1],\r\n\t\t\t-m[2]);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttmat3x3<T, P> const & m1,\r\n\t\ttmat3x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttmat3x3<T, P> const & m1,\r\n\t\ttmat3x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);\r\n\t}\r\n\r\n} //namespace detail\r\n} //namespace glm\r\n"
  },
  {
    "path": "gpu/glm/detail/type_mat3x4.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat3x4.hpp\r\n/// @date 2006-08-05 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_mat3x4\r\n#define glm_core_type_mat3x4\r\n\r\n#include \"../fwd.hpp\"\r\n#include \"type_vec3.hpp\"\r\n#include \"type_vec4.hpp\"\r\n#include \"type_mat.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tmat3x4\r\n\t{\r\n\t\tenum ctor{_null};\r\n\t\ttypedef T value_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\ttypedef tvec4<T, P> col_type;\r\n\t\ttypedef tvec3<T, P> row_type;\r\n\t\ttypedef tmat3x4<T, P> type;\r\n\t\ttypedef tmat4x3<T, P> transpose_type;\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\tprivate:\r\n\t\t// Data \r\n\t\tcol_type value[3];\r\n\r\n\tpublic:\r\n\t\t// Constructors\r\n\t\tGLM_FUNC_DECL tmat3x4();\r\n\t\tGLM_FUNC_DECL tmat3x4(tmat3x4<T, P> const & m);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tmat3x4(tmat3x4<T, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat3x4(\r\n\t\t\tctor Null);\r\n\t\tGLM_FUNC_DECL explicit tmat3x4(\r\n\t\t\tT const & s);\r\n\t\tGLM_FUNC_DECL tmat3x4(\r\n\t\t\tT const & x0, T const & y0, T const & z0, T const & w0,\r\n\t\t\tT const & x1, T const & y1, T const & z1, T const & w1,\r\n\t\t\tT const & x2, T const & y2, T const & z2, T const & w2);\r\n\t\tGLM_FUNC_DECL tmat3x4(\r\n\t\t\tcol_type const & v0,\r\n\t\t\tcol_type const & v1,\r\n\t\t\tcol_type const & v2);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversions\r\n\t\ttemplate<\r\n\t\t\ttypename X1, typename Y1, typename Z1, typename W1,\r\n\t\t\ttypename X2, typename Y2, typename Z2, typename W2,\r\n\t\t\ttypename X3, typename Y3, typename Z3, typename W3>\r\n\t\tGLM_FUNC_DECL tmat3x4(\r\n\t\t\tX1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,\r\n\t\t\tX2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,\r\n\t\t\tX3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3);\r\n\t\t\t\r\n\t\ttemplate <typename V1, typename V2, typename V3>\r\n\t\tGLM_FUNC_DECL tmat3x4(\r\n\t\t\ttvec4<V1, P> const & v1,\r\n\t\t\ttvec4<V2, P> const & v2,\r\n\t\t\ttvec4<V3, P> const & v3);\r\n\r\n\t\t// Matrix conversion\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tmat3x4(tmat3x4<U, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat3x4(tmat2x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x4(tmat3x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x4(tmat4x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x4(tmat2x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x4(tmat3x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x4(tmat2x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x4(tmat4x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat3x4(tmat4x3<T, P> const & x);\r\n\r\n\t\t// Accesses\r\n\t\tGLM_FUNC_DECL col_type & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL col_type const & operator[](length_t i) const;\r\n\r\n\t\t// Unary updatable operators\r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> & operator=  (tmat3x4<T, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> & operator=  (tmat3x4<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> & operator+= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> & operator+= (tmat3x4<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> & operator-= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> & operator-= (tmat3x4<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> & operator*= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> & operator/= (U s);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> & operator++ ();\r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> & operator-- ();\r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tmat3x4<T, P> operator--(int);\r\n\t};\r\n\r\n\t// Binary operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> operator+ (\r\n\t\ttmat3x4<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> operator+ (\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> operator- (\r\n\t\ttmat3x4<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> operator- (\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> operator* (\r\n\t\ttmat3x4<T, P> const & m, \r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> operator* (\r\n\t\tT const & s,\r\n\t\ttmat3x4<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat3x4<T, P>::col_type operator* (\r\n\t\ttmat3x4<T, P> const & m,\r\n\t\ttypename tmat3x4<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_DECL typename tmat3x4<T, P>::row_type operator* (\r\n\t\ttypename tmat3x4<T, P>::col_type const & v,\r\n\t\ttmat3x4<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator* (\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat4x3<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x4<T, P> operator* (\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat2x3<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> operator* (\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat3x3<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> operator/ (\r\n\t\ttmat3x4<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> operator/ (\r\n\t\tT const & s,\r\n\t\ttmat3x4<T, P> const & m);\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> const operator-(\r\n\t\ttmat3x4<T, P> const & m);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_mat3x4.inl\"\r\n#endif\r\n\r\n#endif //glm_core_type_mat3x4\r\n"
  },
  {
    "path": "gpu/glm/detail/type_mat3x4.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat3x4.inl\r\n/// @date 2006-08-05 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tmat3x4<T, P>::length() const\r\n\t{\r\n\t\treturn 3;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type &\r\n\ttmat3x4<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t)\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type const &\r\n\ttmat3x4<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t) const\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4()\r\n\t{\r\n\t\tthis->value[0] = col_type(1, 0, 0, 0);\r\n\t\tthis->value[1] = col_type(0, 1, 0, 0);\r\n\t\tthis->value[2] = col_type(0, 0, 1, 0);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t\tthis->value[2] = m.value[2];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4(\r\n\t\ttmat3x4<T, Q> const & m)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t\tthis->value[2] = m.value[2];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\tctor\r\n\t)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tvalue_type const Zero(0);\r\n\t\tthis->value[0] = col_type(s, Zero, Zero, Zero);\r\n\t\tthis->value[1] = col_type(Zero, s, Zero, Zero);\r\n\t\tthis->value[2] = col_type(Zero, Zero, s, Zero);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\tT const & x0, T const & y0, T const & z0, T const & w0,\r\n\t\tT const & x1, T const & y1, T const & z1, T const & w1,\r\n\t\tT const & x2, T const & y2, T const & z2, T const & w2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(x0, y0, z0, w0);\r\n\t\tthis->value[1] = col_type(x1, y1, z1, w1);\r\n\t\tthis->value[2] = col_type(x2, y2, z2, w2);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\tcol_type const & v0,\r\n\t\tcol_type const & v1,\r\n\t\tcol_type const & v2\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = v0;\r\n\t\tthis->value[1] = v1;\r\n\t\tthis->value[2] = v2;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion constructors\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <\r\n\t\ttypename X1, typename Y1, typename Z1, typename W1,\r\n\t\ttypename X2, typename Y2, typename Z2, typename W2,\r\n\t\ttypename X3, typename Y3, typename Z3, typename W3>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\tX1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,\r\n\t\tX2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,\r\n\t\tX3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1), value_type(w1));\r\n\t\tthis->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2), value_type(w2));\r\n\t\tthis->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3), value_type(w3));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename V1, typename V2, typename V3>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\ttvec4<V1, P> const & v1,\r\n\t\ttvec4<V2, P> const & v2,\r\n\t\ttvec4<V3, P> const & v3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(v1);\r\n\t\tthis->value[1] = col_type(v2);\r\n\t\tthis->value[2] = col_type(v3);\r\n\t}\r\n\t\r\n\t// Conversion\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\ttmat3x4<U, Q> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], detail::tvec2<T, P>(0));\r\n\t\tthis->value[1] = col_type(m[1], detail::tvec2<T, P>(0));\r\n\t\tthis->value[2] = col_type(T(0), T(0), T(1), T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], T(0));\r\n\t\tthis->value[1] = col_type(m[1], T(0));\r\n\t\tthis->value[2] = col_type(m[2], T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], T(0));\r\n\t\tthis->value[1] = col_type(m[1], T(0));\r\n\t\tthis->value[2] = col_type(T(0), T(0), T(1), T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], detail::tvec2<T, P>(0));\r\n\t\tthis->value[1] = col_type(m[1], detail::tvec2<T, P>(0));\r\n\t\tthis->value[2] = col_type(m[2], T(0), T(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(T(0), T(0), T(1), T(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], detail::tvec2<T, P>(T(0)));\r\n\t\tthis->value[1] = col_type(m[1], detail::tvec2<T, P>(T(0)));\r\n\t\tthis->value[2] = col_type(m[2], detail::tvec2<T, P>(T(1), T(0)));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>::tmat3x4\r\n\t(\r\n\t\ttmat4x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], T(0));\r\n\t\tthis->value[1] = col_type(m[1], T(0));\r\n\t\tthis->value[2] = col_type(m[2], T(0));\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Unary updatable operators\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator= (tmat3x4<T, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator= (tmat3x4<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator+= (U s)\r\n\t{\r\n\t\tthis->value[0] += s;\r\n\t\tthis->value[1] += s;\r\n\t\tthis->value[2] += s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator+= (tmat3x4<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] += m[0];\r\n\t\tthis->value[1] += m[1];\r\n\t\tthis->value[2] += m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator-= (U s)\r\n\t{\r\n\t\tthis->value[0] -= s;\r\n\t\tthis->value[1] -= s;\r\n\t\tthis->value[2] -= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator-= (tmat3x4<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] -= m[0];\r\n\t\tthis->value[1] -= m[1];\r\n\t\tthis->value[2] -= m[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator*= (U s)\r\n\t{\r\n\t\tthis->value[0] *= s;\r\n\t\tthis->value[1] *= s;\r\n\t\tthis->value[2] *= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> & tmat3x4<T, P>::operator/= (U s)\r\n\t{\r\n\t\tthis->value[0] /= s;\r\n\t\tthis->value[1] /= s;\r\n\t\tthis->value[2] /= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator++ ()\r\n\t{\r\n\t\t++this->value[0];\r\n\t\t++this->value[1];\r\n\t\t++this->value[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P>& tmat3x4<T, P>::operator-- ()\r\n\t{\r\n\t\t--this->value[0];\r\n\t\t--this->value[1];\r\n\t\t--this->value[2];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> tmat3x4<T, P>::operator++(int)\r\n\t{\r\n\t\ttmat3x4<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> tmat3x4<T, P>::operator--(int)\r\n\t{\r\n\t\ttmat3x4<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Binary operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> operator+\r\n\t(\r\n\t\ttmat3x4<T, P> const & m, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s,\r\n\t\t\tm[2] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> operator+\r\n\t(\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\tm1[0] + m2[0],\r\n\t\t\tm1[1] + m2[1],\r\n\t\t\tm1[2] + m2[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> operator-\r\n\t(\r\n\t\ttmat3x4<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\tm[0] - s,\r\n\t\t\tm[1] - s,\r\n\t\t\tm[2] - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> operator-\r\n\t(\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\tm1[0] - m2[0],\r\n\t\t\tm1[1] - m2[1],\r\n\t\t\tm1[2] - m2[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> operator*\r\n\t(\r\n\t\ttmat3x4<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> operator*\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x4<T, P>::col_type operator*\r\n\t(\r\n\t\ttmat3x4<T, P> const & m,\r\n\t\ttypename tmat3x4<T, P>::row_type const & v\r\n\t)\r\n\t{\r\n\t\treturn typename tmat3x4<T, P>::col_type(\r\n\t\t\tm[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z,\r\n\t\t\tm[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z,\r\n\t\t\tm[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z,\r\n\t\t\tm[0][3] * v.x + m[1][3] * v.y + m[2][3] * v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat3x4<T, P>::row_type operator*\r\n\t(\r\n\t\ttypename tmat3x4<T, P>::col_type const & v,\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn typename tmat3x4<T, P>::row_type(\r\n\t\t\tv.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2] + v.w * m[0][3],\r\n\t\t\tv.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2] + v.w * m[1][3],\r\n\t\t\tv.x * m[2][0] + v.y * m[2][1] + v.z * m[2][2] + v.w * m[2][3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator*\r\n\t(\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat4x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\tconst T SrcA00 = m1[0][0];\r\n\t\tconst T SrcA01 = m1[0][1];\r\n\t\tconst T SrcA02 = m1[0][2];\r\n\t\tconst T SrcA03 = m1[0][3];\r\n\t\tconst T SrcA10 = m1[1][0];\r\n\t\tconst T SrcA11 = m1[1][1];\r\n\t\tconst T SrcA12 = m1[1][2];\r\n\t\tconst T SrcA13 = m1[1][3];\r\n\t\tconst T SrcA20 = m1[2][0];\r\n\t\tconst T SrcA21 = m1[2][1];\r\n\t\tconst T SrcA22 = m1[2][2];\r\n\t\tconst T SrcA23 = m1[2][3];\r\n\r\n\t\tconst T SrcB00 = m2[0][0];\r\n\t\tconst T SrcB01 = m2[0][1];\r\n\t\tconst T SrcB02 = m2[0][2];\r\n\t\tconst T SrcB10 = m2[1][0];\r\n\t\tconst T SrcB11 = m2[1][1];\r\n\t\tconst T SrcB12 = m2[1][2];\r\n\t\tconst T SrcB20 = m2[2][0];\r\n\t\tconst T SrcB21 = m2[2][1];\r\n\t\tconst T SrcB22 = m2[2][2];\r\n\t\tconst T SrcB30 = m2[3][0];\r\n\t\tconst T SrcB31 = m2[3][1];\r\n\t\tconst T SrcB32 = m2[3][2];\r\n\r\n\t\ttmat4x4<T, P> Result(tmat4x4<T, P>::_null);\r\n\t\tResult[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02;\r\n\t\tResult[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02;\r\n\t\tResult[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02;\r\n\t\tResult[0][3] = SrcA03 * SrcB00 + SrcA13 * SrcB01 + SrcA23 * SrcB02;\r\n\t\tResult[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12;\r\n\t\tResult[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12;\r\n\t\tResult[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11 + SrcA22 * SrcB12;\r\n\t\tResult[1][3] = SrcA03 * SrcB10 + SrcA13 * SrcB11 + SrcA23 * SrcB12;\r\n\t\tResult[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21 + SrcA20 * SrcB22;\r\n\t\tResult[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21 + SrcA21 * SrcB22;\r\n\t\tResult[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21 + SrcA22 * SrcB22;\r\n\t\tResult[2][3] = SrcA03 * SrcB20 + SrcA13 * SrcB21 + SrcA23 * SrcB22;\r\n\t\tResult[3][0] = SrcA00 * SrcB30 + SrcA10 * SrcB31 + SrcA20 * SrcB32;\r\n\t\tResult[3][1] = SrcA01 * SrcB30 + SrcA11 * SrcB31 + SrcA21 * SrcB32;\r\n\t\tResult[3][2] = SrcA02 * SrcB30 + SrcA12 * SrcB31 + SrcA22 * SrcB32;\r\n\t\tResult[3][3] = SrcA03 * SrcB30 + SrcA13 * SrcB31 + SrcA23 * SrcB32;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> operator*\r\n\t(\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat2x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2],\r\n\t\t\tm1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2],\r\n\t\t\tm1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> operator*\r\n\t(\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat3x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2],\r\n\t\t\tm1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2],\r\n\t\t\tm1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2],\r\n\t\t\tm1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2],\r\n\t\t\tm1[0][3] * m2[2][0] + m1[1][3] * m2[2][1] + m1[2][3] * m2[2][2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> operator/\r\n\t(\r\n\t\ttmat3x4<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\tm[0] / s,\r\n\t\t\tm[1] / s,\r\n\t\t\tm[2] / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> operator/\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\ts / m[0],\r\n\t\t\ts / m[1],\r\n\t\t\ts / m[2]);\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> const operator-\r\n\t(\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\t-m[0],\r\n\t\t\t-m[1],\r\n\t\t\t-m[2]);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttmat3x4<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]);\r\n\t}\r\n} //namespace detail\r\n} //namespace glm\r\n"
  },
  {
    "path": "gpu/glm/detail/type_mat4x2.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat4x2.hpp\r\n/// @date 2006-10-01 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_mat4x2\r\n#define glm_core_type_mat4x2\r\n\r\n#include \"../fwd.hpp\"\r\n#include \"type_vec2.hpp\"\r\n#include \"type_vec4.hpp\"\r\n#include \"type_mat.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tmat4x2\r\n\t{\r\n\t\tenum ctor{_null};\r\n\t\ttypedef T value_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\ttypedef tvec2<T, P> col_type;\r\n\t\ttypedef tvec4<T, P> row_type;\r\n\t\ttypedef tmat4x2<T, P> type;\r\n\t\ttypedef tmat2x4<T, P> transpose_type;\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\tprivate:\r\n\t\t// Data \r\n\t\tcol_type value[4];\r\n\r\n\tpublic:\r\n\t\t// Constructors\r\n\t\tGLM_FUNC_DECL tmat4x2();\r\n\t\tGLM_FUNC_DECL tmat4x2(tmat4x2<T, P> const & m);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tmat4x2(tmat4x2<T, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat4x2(\r\n\t\t\tctor Null);\r\n\t\tGLM_FUNC_DECL explicit tmat4x2(\r\n\t\t\tT const & x);\r\n\t\tGLM_FUNC_DECL tmat4x2(\r\n\t\t\tT const & x0, T const & y0,\r\n\t\t\tT const & x1, T const & y1,\r\n\t\t\tT const & x2, T const & y2,\r\n\t\t\tT const & x3, T const & y3);\r\n\t\tGLM_FUNC_DECL tmat4x2(\r\n\t\t\tcol_type const & v0, \r\n\t\t\tcol_type const & v1,\r\n\t\t\tcol_type const & v2,\r\n\t\t\tcol_type const & v3);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversions\r\n\r\n\t\ttemplate<\r\n\t\t\ttypename X1, typename Y1,\r\n\t\t\ttypename X2, typename Y2,\r\n\t\t\ttypename X3, typename Y3,\r\n\t\t\ttypename X4, typename Y4>\r\n\t\tGLM_FUNC_DECL tmat4x2(\r\n\t\t\tX1 const & x1, Y1 const & y1,\r\n\t\t\tX2 const & x2, Y2 const & y2,\r\n\t\t\tX3 const & x3, Y3 const & y3,\r\n\t\t\tX4 const & x4, Y4 const & y4);\r\n\r\n\t\ttemplate <typename V1, typename V2, typename V3, typename V4>\r\n\t\tGLM_FUNC_DECL tmat4x2(\r\n\t\t\ttvec2<V1, P> const & v1,\r\n\t\t\ttvec2<V2, P> const & v2,\r\n\t\t\ttvec2<V3, P> const & v3,\r\n\t\t\ttvec2<V4, P> const & v4);\r\n\r\n\t\t// Matrix conversions\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tmat4x2(tmat4x2<U, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat4x2(tmat2x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x2(tmat3x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x2(tmat4x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x2(tmat2x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x2(tmat3x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x2(tmat2x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x2(tmat4x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x2(tmat3x4<T, P> const & x);\r\n\r\n\t\t// Accesses\r\n\t\tGLM_FUNC_DECL col_type & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL col_type const & operator[](length_t i) const;\r\n\r\n\t\t// Unary updatable operators\r\n\t\tGLM_FUNC_DECL tmat4x2<T, P>& operator=  (tmat4x2<T, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat4x2<T, P>& operator=  (tmat4x2<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat4x2<T, P>& operator+= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat4x2<T, P>& operator+= (tmat4x2<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat4x2<T, P>& operator-= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat4x2<T, P>& operator-= (tmat4x2<U, P> const & m);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat4x2<T, P>& operator*= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tmat4x2<T, P>& operator/= (U s);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tmat4x2<T, P> & operator++ ();\r\n\t\tGLM_FUNC_DECL tmat4x2<T, P> & operator-- ();\r\n\t\tGLM_FUNC_DECL tmat4x2<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tmat4x2<T, P> operator--(int);\r\n\t};\r\n\r\n\t// Binary operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> operator+ (\r\n\t\ttmat4x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> operator+ (\r\n\t\ttmat4x2<T, P> const & m1,\r\n\t\ttmat4x2<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> operator- (\r\n\t\ttmat4x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> operator- (\r\n\t\ttmat4x2<T, P> const & m1,\r\n\t\ttmat4x2<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> operator* (\r\n\t\ttmat4x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> operator* (\r\n\t\tT const & s,\r\n\t\ttmat4x2<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat4x2<T, P>::col_type operator* (\r\n\t\ttmat4x2<T, P> const & m,\r\n\t\ttypename tmat4x2<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat4x2<T, P>::row_type operator* (\r\n\t\ttypename tmat4x2<T, P>::col_type const & v,\r\n\t\ttmat4x2<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x2<T, P> operator* (\r\n\t\ttmat4x2<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> operator* (\r\n\t\ttmat4x2<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> operator* (\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> operator/ (\r\n\t\ttmat4x2<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> operator/ (\r\n\t\tT const & s,\r\n\t\ttmat4x2<T, P> const & m);\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x2<T, P> const operator-(\r\n\t\ttmat4x2<T, P> const & m);\r\n\t\t\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_mat4x2.inl\"\r\n#endif\r\n\r\n#endif //glm_core_type_mat4x2\r\n"
  },
  {
    "path": "gpu/glm/detail/type_mat4x2.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat4x2.inl\r\n/// @date 2006-10-01 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tmat4x2<T, P>::length() const\r\n\t{\r\n\t\treturn 4;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type &\r\n\ttmat4x2<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t)\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type const &\r\n\ttmat4x2<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t) const\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Constructors\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2()\r\n\t{\r\n\t\tvalue_type const Zero(0);\r\n\t\tvalue_type const One(1);\r\n\t\tthis->value[0] = col_type(One, Zero);\r\n\t\tthis->value[1] = col_type(Zero, One);\r\n\t\tthis->value[2] = col_type(Zero, Zero);\r\n\t\tthis->value[3] = col_type(Zero, Zero);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(\r\n\t\ttmat4x2<T, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t\tthis->value[2] = m.value[2];\r\n\t\tthis->value[3] = m.value[3];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(\r\n\t\ttmat4x2<T, Q> const & m)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t\tthis->value[2] = m.value[2];\r\n\t\tthis->value[3] = m.value[3];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2(ctor)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tvalue_type const Zero(0);\r\n\t\tthis->value[0] = col_type(s, Zero);\r\n\t\tthis->value[1] = col_type(Zero, s);\r\n\t\tthis->value[2] = col_type(Zero, Zero);\r\n\t\tthis->value[3] = col_type(Zero, Zero);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\tT const & x0, T const & y0,\r\n\t\tT const & x1, T const & y1,\r\n\t\tT const & x2, T const & y2,\r\n\t\tT const & x3, T const & y3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(x0, y0);\r\n\t\tthis->value[1] = col_type(x1, y1);\r\n\t\tthis->value[2] = col_type(x2, y2);\r\n\t\tthis->value[3] = col_type(x3, y3);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\tcol_type const & v0,\r\n\t\tcol_type const & v1,\r\n\t\tcol_type const & v2,\r\n\t\tcol_type const & v3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = v0;\r\n\t\tthis->value[1] = v1;\r\n\t\tthis->value[2] = v2;\r\n\t\tthis->value[3] = v3;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <\r\n\t\ttypename X1, typename Y1,\r\n\t\ttypename X2, typename Y2,\r\n\t\ttypename X3, typename Y3,\r\n\t\ttypename X4, typename Y4>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\tX1 const & x1, Y1 const & y1,\r\n\t\tX2 const & x2, Y2 const & y2,\r\n\t\tX3 const & x3, Y3 const & y3,\r\n\t\tX4 const & x4, Y4 const & y4\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(static_cast<T>(x1), value_type(y1));\r\n\t\tthis->value[1] = col_type(static_cast<T>(x2), value_type(y2));\r\n\t\tthis->value[2] = col_type(static_cast<T>(x3), value_type(y3));\r\n\t\tthis->value[3] = col_type(static_cast<T>(x4), value_type(y4));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename V1, typename V2, typename V3, typename V4>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\ttvec2<V1, P> const & v1,\r\n\t\ttvec2<V2, P> const & v2,\r\n\t\ttvec2<V3, P> const & v3,\r\n\t\ttvec2<V4, P> const & v4\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(v1);\r\n\t\tthis->value[1] = col_type(v2);\r\n\t\tthis->value[2] = col_type(v3);\r\n\t\tthis->value[3] = col_type(v4);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\ttmat4x2<U, Q> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t\tthis->value[3] = col_type(m[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(static_cast<T>(0));\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t\tthis->value[3] = col_type(m[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(static_cast<T>(0));\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(static_cast<T>(0));\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\ttmat4x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t\tthis->value[3] = col_type(m[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>::tmat4x2\r\n\t(\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Unary updatable operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>& tmat4x2<T, P>::operator=\r\n\t(\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\tthis->value[3] = m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P>& tmat4x2<T, P>::operator=\r\n\t(\r\n\t\ttmat4x2<U, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\tthis->value[3] = m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator+= (U s)\r\n\t{\r\n\t\tthis->value[0] += s;\r\n\t\tthis->value[1] += s;\r\n\t\tthis->value[2] += s;\r\n\t\tthis->value[3] += s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator+= (tmat4x2<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] += m[0];\r\n\t\tthis->value[1] += m[1];\r\n\t\tthis->value[2] += m[2];\r\n\t\tthis->value[3] += m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator-= (U s)\r\n\t{\r\n\t\tthis->value[0] -= s;\r\n\t\tthis->value[1] -= s;\r\n\t\tthis->value[2] -= s;\r\n\t\tthis->value[3] -= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator-= (tmat4x2<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] -= m[0];\r\n\t\tthis->value[1] -= m[1];\r\n\t\tthis->value[2] -= m[2];\r\n\t\tthis->value[3] -= m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator*= (U s)\r\n\t{\r\n\t\tthis->value[0] *= s;\r\n\t\tthis->value[1] *= s;\r\n\t\tthis->value[2] *= s;\r\n\t\tthis->value[3] *= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator/= (U s)\r\n\t{\r\n\t\tthis->value[0] /= s;\r\n\t\tthis->value[1] /= s;\r\n\t\tthis->value[2] /= s;\r\n\t\tthis->value[3] /= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator++ ()\r\n\t{\r\n\t\t++this->value[0];\r\n\t\t++this->value[1];\r\n\t\t++this->value[2];\r\n\t\t++this->value[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> & tmat4x2<T, P>::operator-- ()\r\n\t{\r\n\t\t--this->value[0];\r\n\t\t--this->value[1];\r\n\t\t--this->value[2];\r\n\t\t--this->value[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> tmat4x2<T, P>::operator++(int)\r\n\t{\r\n\t\ttmat4x2<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> tmat4x2<T, P>::operator--(int)\r\n\t{\r\n\t\ttmat4x2<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Binary operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> operator+\r\n\t(\r\n\t\ttmat4x2<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s,\r\n\t\t\tm[2] + s,\r\n\t\t\tm[3] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> operator+\r\n\t(\t\r\n\t\ttmat4x2<T, P> const & m1,\r\n\t\ttmat4x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\tm1[0] + m2[0],\r\n\t\t\tm1[1] + m2[1],\r\n\t\t\tm1[2] + m2[2],\r\n\t\t\tm1[3] + m2[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> operator-\r\n\t(\r\n\t\ttmat4x2<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\tm[0] - s,\r\n\t\t\tm[1] - s,\r\n\t\t\tm[2] - s,\r\n\t\t\tm[3] - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> operator-\r\n\t(\t\r\n\t\ttmat4x2<T, P> const & m1,\r\n\t\ttmat4x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\tm1[0] - m2[0],\r\n\t\t\tm1[1] - m2[1],\r\n\t\t\tm1[2] - m2[2],\r\n\t\t\tm1[3] - m2[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> operator*\r\n\t(\r\n\t\ttmat4x2<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s,\r\n\t\t\tm[3] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> operator*\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s,\r\n\t\t\tm[3] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x2<T, P>::col_type operator*\r\n\t(\r\n\t\ttmat4x2<T, P> const & m,\r\n\t\ttypename tmat4x2<T, P>::row_type const & v\r\n\t)\r\n\t{\r\n\t\treturn typename tmat4x2<T, P>::col_type(\r\n\t\t\tm[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w,\r\n\t\t\tm[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x2<T, P>::row_type operator*\r\n\t(\r\n\t\ttypename tmat4x2<T, P>::col_type const & v,\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn typename tmat4x2<T, P>::row_type(\r\n\t\t\tv.x * m[0][0] + v.y * m[0][1],\r\n\t\t\tv.x * m[1][0] + v.y * m[1][1],\r\n\t\t\tv.x * m[2][0] + v.y * m[2][1],\r\n\t\t\tv.x * m[3][0] + v.y * m[3][1]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x2<T, P> operator*\r\n\t(\r\n\t\ttmat4x2<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\tT const SrcA00 = m1[0][0];\r\n\t\tT const SrcA01 = m1[0][1];\r\n\t\tT const SrcA10 = m1[1][0];\r\n\t\tT const SrcA11 = m1[1][1];\r\n\t\tT const SrcA20 = m1[2][0];\r\n\t\tT const SrcA21 = m1[2][1];\r\n\t\tT const SrcA30 = m1[3][0];\r\n\t\tT const SrcA31 = m1[3][1];\r\n\r\n\t\tT const SrcB00 = m2[0][0];\r\n\t\tT const SrcB01 = m2[0][1];\r\n\t\tT const SrcB02 = m2[0][2];\r\n\t\tT const SrcB03 = m2[0][3];\r\n\t\tT const SrcB10 = m2[1][0];\r\n\t\tT const SrcB11 = m2[1][1];\r\n\t\tT const SrcB12 = m2[1][2];\r\n\t\tT const SrcB13 = m2[1][3];\r\n\r\n\t\ttmat2x2<T, P> Result(tmat2x2<T, P>::_null);\r\n\t\tResult[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02 + SrcA30 * SrcB03;\r\n\t\tResult[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02 + SrcA31 * SrcB03;\r\n\t\tResult[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12 + SrcA30 * SrcB13;\r\n\t\tResult[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12 + SrcA31 * SrcB13;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x2<T, P> operator*\r\n\t(\r\n\t\ttmat4x2<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x2<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> operator*\r\n\t(\r\n\t\ttmat4x2<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3],\r\n\t\t\tm1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2] + m1[3][0] * m2[3][3],\r\n\t\t\tm1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2] + m1[3][1] * m2[3][3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> operator/\r\n\t(\r\n\t\ttmat4x2<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\tm[0] / s,\r\n\t\t\tm[1] / s,\r\n\t\t\tm[2] / s,\r\n\t\t\tm[3] / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> operator/\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\ts / m[0],\r\n\t\t\ts / m[1],\r\n\t\t\ts / m[2],\r\n\t\t\ts / m[3]);\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x2<T, P> const operator-\r\n\t(\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat4x2<T, P>(\r\n\t\t\t-m[0], \r\n\t\t\t-m[1], \r\n\t\t\t-m[2], \r\n\t\t\t-m[3]);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttmat4x2<T, P> const & m1,\r\n\t\ttmat4x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttmat4x2<T, P> const & m1,\r\n\t\ttmat4x2<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);\r\n\t}\r\n} //namespace detail\r\n} //namespace glm\r\n"
  },
  {
    "path": "gpu/glm/detail/type_mat4x3.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat4x3.hpp\r\n/// @date 2006-08-04 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_mat4x3\r\n#define glm_core_type_mat4x3\r\n\r\n#include \"../fwd.hpp\"\r\n#include \"type_vec3.hpp\"\r\n#include \"type_vec4.hpp\"\r\n#include \"type_mat.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tmat4x3\r\n\t{\r\n\t\tenum ctor{_null};\r\n\t\ttypedef T value_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\ttypedef tvec3<T, P> col_type;\r\n\t\ttypedef tvec4<T, P> row_type;\r\n\t\ttypedef tmat4x3<T, P> type;\r\n\t\ttypedef tmat3x4<T, P> transpose_type;\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\tprivate:\r\n\t\t// Data \r\n\t\tcol_type value[4];\r\n\r\n\tpublic:\r\n\t\t// Constructors\r\n\t\tGLM_FUNC_DECL tmat4x3();\r\n\t\tGLM_FUNC_DECL tmat4x3(tmat4x3<T, P> const & m);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tmat4x3(tmat4x3<T, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat4x3(\r\n\t\t\tctor Null);\r\n\t\tGLM_FUNC_DECL explicit tmat4x3(\r\n\t\t\tT const & x);\r\n\t\tGLM_FUNC_DECL tmat4x3(\r\n\t\t\tT const & x0, T const & y0, T const & z0,\r\n\t\t\tT const & x1, T const & y1, T const & z1,\r\n\t\t\tT const & x2, T const & y2, T const & z2,\r\n\t\t\tT const & x3, T const & y3, T const & z3);\r\n\t\tGLM_FUNC_DECL tmat4x3(\r\n\t\t\tcol_type const & v0,\r\n\t\t\tcol_type const & v1,\r\n\t\t\tcol_type const & v2,\r\n\t\t\tcol_type const & v3);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversions\r\n\r\n\t\ttemplate <\r\n\t\t\ttypename X1, typename Y1, typename Z1,\r\n\t\t\ttypename X2, typename Y2, typename Z2,\r\n\t\t\ttypename X3, typename Y3, typename Z3,\r\n\t\t\ttypename X4, typename Y4, typename Z4>\r\n\t\tGLM_FUNC_DECL tmat4x3(\r\n\t\t\tX1 const & x1, Y1 const & y1, Z1 const & z1,\r\n\t\t\tX2 const & x2, Y2 const & y2, Z2 const & z2,\r\n\t\t\tX3 const & x3, Y3 const & y3, Z3 const & z3,\r\n\t\t\tX4 const & x4, Y4 const & y4, Z4 const & z4);\r\n\t\t\t\r\n\t\ttemplate <typename V1, typename V2, typename V3, typename V4>\r\n\t\tGLM_FUNC_DECL tmat4x3(\r\n\t\t\ttvec3<V1, P> const & v1,\r\n\t\t\ttvec3<V2, P> const & v2,\r\n\t\t\ttvec3<V3, P> const & v3,\r\n\t\t\ttvec3<V4, P> const & v4);\r\n\r\n\t\t// Matrix conversions\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tmat4x3(tmat4x3<U, Q> const & m);\r\n\t\t\t\r\n\t\tGLM_FUNC_DECL explicit tmat4x3(tmat2x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x3(tmat3x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x3(tmat4x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x3(tmat2x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x3(tmat3x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x3(tmat2x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x3(tmat4x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x3(tmat3x4<T, P> const & x);\r\n\r\n\t\t// Accesses\r\n\t\tGLM_FUNC_DECL col_type & operator[](size_type i);\r\n\t\tGLM_FUNC_DECL col_type const & operator[](size_type i) const;\r\n\r\n\t\t// Unary updatable operators\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> & operator=  (tmat4x3<T, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> & operator=  (tmat4x3<U, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> & operator+= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> & operator+= (tmat4x3<U, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> & operator-= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> & operator-= (tmat4x3<U, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> & operator*= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> & operator/= (U s);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> & operator++ ();\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> & operator-- ();\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tmat4x3<T, P> operator--(int);\r\n\t};\r\n\r\n\t// Binary operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> operator+ (\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> operator+ (\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat4x3<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> operator- (\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> operator- (\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat4x3<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> operator* (\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> operator* (\r\n\t\tT const & s,\r\n\t\ttmat4x3<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat4x3<T, P>::col_type operator* (\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\ttypename tmat4x3<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat4x3<T, P>::row_type operator* (\r\n\t\ttypename tmat4x3<T, P>::col_type const & v,\r\n\t\ttmat4x3<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x3<T, P> operator* (\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x3<T, P> operator* (\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> operator* (\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> operator/ (\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> operator/ (\r\n\t\tT const & s,\r\n\t\ttmat4x3<T, P> const & m);\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x3<T, P> const operator- (\r\n\t\ttmat4x3<T, P> const & m);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_mat4x3.inl\"\r\n#endif //GLM_EXTERNAL_TEMPLATE\r\n\r\n#endif//glm_core_type_mat4x3\r\n"
  },
  {
    "path": "gpu/glm/detail/type_mat4x3.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat4x3.inl\r\n/// @date 2006-04-17 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tmat4x3<T, P>::length() const\r\n\t{\r\n\t\treturn 4;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type & \r\n\ttmat4x3<T, P>::operator[]\r\n\t(\r\n\t\tsize_type i\r\n\t)\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type const & \r\n\ttmat4x3<T, P>::operator[]\r\n\t(\r\n\t\tsize_type i\r\n\t) const\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Constructors\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3()\r\n\t{\r\n\t\tvalue_type const Zero(0);\r\n\t\tvalue_type const One(1);\r\n\t\tthis->value[0] = col_type(One, Zero, Zero);\r\n\t\tthis->value[1] = col_type(Zero, One, Zero);\r\n\t\tthis->value[2] = col_type(Zero, Zero, One);\r\n\t\tthis->value[3] = col_type(Zero, Zero, Zero);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(\r\n\t\ttmat4x3<T, P> const & m)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t\tthis->value[2] = m.value[2];\r\n\t\tthis->value[3] = m.value[3];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(\r\n\t\ttmat4x3<T, Q> const & m)\r\n\t{\r\n\t\tthis->value[0] = m.value[0];\r\n\t\tthis->value[1] = m.value[1];\r\n\t\tthis->value[2] = m.value[2];\r\n\t\tthis->value[3] = m.value[3];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(ctor)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3(\r\n\t\tT const & s)\r\n\t{\r\n\t\tvalue_type const Zero(0);\r\n\t\tthis->value[0] = col_type(s, Zero, Zero);\r\n\t\tthis->value[1] = col_type(Zero, s, Zero);\r\n\t\tthis->value[2] = col_type(Zero, Zero, s);\r\n\t\tthis->value[3] = col_type(Zero, Zero, Zero);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\tT const & x0, T const & y0, T const & z0,\r\n\t\tT const & x1, T const & y1, T const & z1,\r\n\t\tT const & x2, T const & y2, T const & z2,\r\n\t\tT const & x3, T const & y3, T const & z3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(x0, y0, z0);\r\n\t\tthis->value[1] = col_type(x1, y1, z1);\r\n\t\tthis->value[2] = col_type(x2, y2, z2);\r\n\t\tthis->value[3] = col_type(x3, y3, z3);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\tcol_type const & v0, \r\n\t\tcol_type const & v1, \r\n\t\tcol_type const & v2,\r\n\t\tcol_type const & v3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = v0;\r\n\t\tthis->value[1] = v1;\r\n\t\tthis->value[2] = v2;\r\n\t\tthis->value[3] = v3;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion constructors\r\n\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <\r\n\t\ttypename X1, typename Y1, typename Z1,\r\n\t\ttypename X2, typename Y2, typename Z2,\r\n\t\ttypename X3, typename Y3, typename Z3,\r\n\t\ttypename X4, typename Y4, typename Z4>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\tX1 const & x1, Y1 const & y1, Z1 const & z1,\r\n\t\tX2 const & x2, Y2 const & y2, Z2 const & z2,\r\n\t\tX3 const & x3, Y3 const & y3, Z3 const & z3,\r\n\t\tX4 const & x4, Y4 const & y4, Z4 const & z4\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1));\r\n\t\tthis->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2));\r\n\t\tthis->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3));\r\n\t\tthis->value[3] = col_type(static_cast<T>(x4), value_type(y4), value_type(z4));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename V1, typename V2, typename V3, typename V4>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\ttvec3<V1, P> const & v1,\r\n\t\ttvec3<V2, P> const & v2,\r\n\t\ttvec3<V3, P> const & v3,\r\n\t\ttvec3<V4, P> const & v4\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(v1);\r\n\t\tthis->value[1] = col_type(v2);\r\n\t\tthis->value[2] = col_type(v3);\r\n\t\tthis->value[3] = col_type(v4);\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Matrix conversions\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\ttmat4x3<U, Q> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t\tthis->value[3] = col_type(m[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], value_type(0));\r\n\t\tthis->value[1] = col_type(m[1], value_type(0));\r\n\t\tthis->value[2] = col_type(m[2], value_type(1));\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t\tthis->value[3] = col_type(m[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(static_cast<T>(0), value_type(0), value_type(1));\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], value_type(0));\r\n\t\tthis->value[1] = col_type(m[1], value_type(0));\r\n\t\tthis->value[2] = col_type(m[2], value_type(1));\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(static_cast<T>(0), value_type(0), value_type(1));\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], value_type(0));\r\n\t\tthis->value[1] = col_type(m[1], value_type(0));\r\n\t\tthis->value[2] = col_type(m[2], value_type(1));\r\n\t\tthis->value[3] = col_type(m[3], value_type(0));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>::tmat4x3\r\n\t(\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t\tthis->value[3] = col_type(static_cast<T>(0));\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Unary updatable operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>& tmat4x3<T, P>::operator=\r\n\t(\r\n\t\ttmat4x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\tthis->value[3] = m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P>& tmat4x3<T, P>::operator=\r\n\t(\r\n\t\ttmat4x3<U, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\tthis->value[3] = m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator+= (U s)\r\n\t{\r\n\t\tthis->value[0] += s;\r\n\t\tthis->value[1] += s;\r\n\t\tthis->value[2] += s;\r\n\t\tthis->value[3] += s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator+= (tmat4x3<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] += m[0];\r\n\t\tthis->value[1] += m[1];\r\n\t\tthis->value[2] += m[2];\r\n\t\tthis->value[3] += m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator-= (U s)\r\n\t{\r\n\t\tthis->value[0] -= s;\r\n\t\tthis->value[1] -= s;\r\n\t\tthis->value[2] -= s;\r\n\t\tthis->value[3] -= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator-= (tmat4x3<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] -= m[0];\r\n\t\tthis->value[1] -= m[1];\r\n\t\tthis->value[2] -= m[2];\r\n\t\tthis->value[3] -= m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator*= (U s)\r\n\t{\r\n\t\tthis->value[0] *= s;\r\n\t\tthis->value[1] *= s;\r\n\t\tthis->value[2] *= s;\r\n\t\tthis->value[3] *= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator/= (U s)\r\n\t{\r\n\t\tthis->value[0] /= s;\r\n\t\tthis->value[1] /= s;\r\n\t\tthis->value[2] /= s;\r\n\t\tthis->value[3] /= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator++ ()\r\n\t{\r\n\t\t++this->value[0];\r\n\t\t++this->value[1];\r\n\t\t++this->value[2];\r\n\t\t++this->value[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> & tmat4x3<T, P>::operator-- ()\r\n\t{\r\n\t\t--this->value[0];\r\n\t\t--this->value[1];\r\n\t\t--this->value[2];\r\n\t\t--this->value[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Binary operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> operator+ (\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\tT const & s)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s,\r\n\t\t\tm[2] + s,\r\n\t\t\tm[3] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> operator+ (\r\n\t\ttmat4x3<T, P> const & m1, \r\n\t\ttmat4x3<T, P> const & m2)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm1[0] + m2[0],\r\n\t\t\tm1[1] + m2[1],\r\n\t\t\tm1[2] + m2[2],\r\n\t\t\tm1[3] + m2[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> operator- (\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\tT const & s)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm[0] - s,\r\n\t\t\tm[1] - s,\r\n\t\t\tm[2] - s,\r\n\t\t\tm[3] - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> operator- (\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat4x3<T, P> const & m2)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm1[0] - m2[0],\r\n\t\t\tm1[1] - m2[1],\r\n\t\t\tm1[2] - m2[2],\r\n\t\t\tm1[3] - m2[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> operator* (\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\tT const & s)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s,\r\n\t\t\tm[3] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> operator* (\r\n\t\tT const & s,\r\n\t\ttmat4x3<T, P> const & m)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s,\r\n\t\t\tm[3] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x3<T, P>::col_type operator*\r\n\t(\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\ttypename tmat4x3<T, P>::row_type const & v)\r\n\t{\r\n\t\treturn typename tmat4x3<T, P>::col_type(\r\n\t\t\tm[0][0] * v.x + m[1][0] * v.y + m[2][0] * v.z + m[3][0] * v.w,\r\n\t\t\tm[0][1] * v.x + m[1][1] * v.y + m[2][1] * v.z + m[3][1] * v.w,\r\n\t\t\tm[0][2] * v.x + m[1][2] * v.y + m[2][2] * v.z + m[3][2] * v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x3<T, P>::row_type operator*\r\n\t(\r\n\t\ttypename tmat4x3<T, P>::col_type const & v,\r\n\t\ttmat4x3<T, P> const & m)\r\n\t{\r\n\t\treturn typename tmat4x3<T, P>::row_type(\r\n\t\t\tv.x * m[0][0] + v.y * m[0][1] + v.z * m[0][2],\r\n\t\t\tv.x * m[1][0] + v.y * m[1][1] + v.z * m[1][2],\r\n\t\t\tv.x * m[2][0] + v.y * m[2][1] + v.z * m[2][2],\r\n\t\t\tv.x * m[3][0] + v.y * m[3][1] + v.z * m[3][2]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x3<T, P> operator*\r\n\t(\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x3<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x3<T, P> operator*\r\n\t(\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\tT const SrcA00 = m1[0][0];\r\n\t\tT const SrcA01 = m1[0][1];\r\n\t\tT const SrcA02 = m1[0][2];\r\n\t\tT const SrcA10 = m1[1][0];\r\n\t\tT const SrcA11 = m1[1][1];\r\n\t\tT const SrcA12 = m1[1][2];\r\n\t\tT const SrcA20 = m1[2][0];\r\n\t\tT const SrcA21 = m1[2][1];\r\n\t\tT const SrcA22 = m1[2][2];\r\n\t\tT const SrcA30 = m1[3][0];\r\n\t\tT const SrcA31 = m1[3][1];\r\n\t\tT const SrcA32 = m1[3][2];\r\n\r\n\t\tT const SrcB00 = m2[0][0];\r\n\t\tT const SrcB01 = m2[0][1];\r\n\t\tT const SrcB02 = m2[0][2];\r\n\t\tT const SrcB03 = m2[0][3];\r\n\t\tT const SrcB10 = m2[1][0];\r\n\t\tT const SrcB11 = m2[1][1];\r\n\t\tT const SrcB12 = m2[1][2];\r\n\t\tT const SrcB13 = m2[1][3];\r\n\t\tT const SrcB20 = m2[2][0];\r\n\t\tT const SrcB21 = m2[2][1];\r\n\t\tT const SrcB22 = m2[2][2];\r\n\t\tT const SrcB23 = m2[2][3];\r\n\r\n\t\ttmat3x3<T, P> Result(tmat3x3<T, P>::_null);\r\n\t\tResult[0][0] = SrcA00 * SrcB00 + SrcA10 * SrcB01 + SrcA20 * SrcB02 + SrcA30 * SrcB03;\r\n\t\tResult[0][1] = SrcA01 * SrcB00 + SrcA11 * SrcB01 + SrcA21 * SrcB02 + SrcA31 * SrcB03;\r\n\t\tResult[0][2] = SrcA02 * SrcB00 + SrcA12 * SrcB01 + SrcA22 * SrcB02 + SrcA32 * SrcB03;\r\n\t\tResult[1][0] = SrcA00 * SrcB10 + SrcA10 * SrcB11 + SrcA20 * SrcB12 + SrcA30 * SrcB13;\r\n\t\tResult[1][1] = SrcA01 * SrcB10 + SrcA11 * SrcB11 + SrcA21 * SrcB12 + SrcA31 * SrcB13;\r\n\t\tResult[1][2] = SrcA02 * SrcB10 + SrcA12 * SrcB11 + SrcA22 * SrcB12 + SrcA32 * SrcB13;\r\n\t\tResult[2][0] = SrcA00 * SrcB20 + SrcA10 * SrcB21 + SrcA20 * SrcB22 + SrcA30 * SrcB23;\r\n\t\tResult[2][1] = SrcA01 * SrcB20 + SrcA11 * SrcB21 + SrcA21 * SrcB22 + SrcA31 * SrcB23;\r\n\t\tResult[2][2] = SrcA02 * SrcB20 + SrcA12 * SrcB21 + SrcA22 * SrcB22 + SrcA32 * SrcB23;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> operator*\r\n\t(\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3],\r\n\t\t\tm1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2] + m1[3][2] * m2[2][3],\r\n\t\t\tm1[0][0] * m2[3][0] + m1[1][0] * m2[3][1] + m1[2][0] * m2[3][2] + m1[3][0] * m2[3][3],\r\n\t\t\tm1[0][1] * m2[3][0] + m1[1][1] * m2[3][1] + m1[2][1] * m2[3][2] + m1[3][1] * m2[3][3],\r\n\t\t\tm1[0][2] * m2[3][0] + m1[1][2] * m2[3][1] + m1[2][2] * m2[3][2] + m1[3][2] * m2[3][3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> operator/\r\n\t(\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm[0] / s,\r\n\t\t\tm[1] / s,\r\n\t\t\tm[2] / s,\r\n\t\t\tm[3] / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> operator/\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat4x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\ts / m[0],\r\n\t\t\ts / m[1],\r\n\t\t\ts / m[2],\r\n\t\t\ts / m[3]);\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> const operator-\r\n\t(\r\n\t\ttmat4x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\t-m[0],\r\n\t\t\t-m[1],\r\n\t\t\t-m[2],\r\n\t\t\t-m[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> const operator++\r\n\t(\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\tint\r\n\t)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm[0] + T(1),\r\n\t\t\tm[1] + T(1),\r\n\t\t\tm[2] + T(1),\r\n\t\t\tm[3] + T(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> const operator--\r\n\t(\r\n\t\ttmat4x3<T, P> const & m,\r\n\t\tint\r\n\t)\r\n\t{\r\n\t\treturn tmat4x3<T, P>(\r\n\t\t\tm[0] - T(1),\r\n\t\t\tm[1] - T(1),\r\n\t\t\tm[2] - T(1),\r\n\t\t\tm[3] - T(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> tmat4x3<T, P>::operator++(int)\r\n\t{\r\n\t\ttmat4x3<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x3<T, P> tmat4x3<T, P>::operator--(int)\r\n\t{\r\n\t\ttmat4x3<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat4x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttmat4x3<T, P> const & m1,\r\n\t\ttmat4x3<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);\r\n\t}\r\n} //namespace detail\r\n} //namespace glm\r\n\r\n"
  },
  {
    "path": "gpu/glm/detail/type_mat4x4.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat4x4.hpp\r\n/// @date 2005-01-27 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_mat4x4\r\n#define glm_core_type_mat4x4\r\n\r\n#include \"../fwd.hpp\"\r\n#include \"type_vec4.hpp\"\r\n#include \"type_mat.hpp\"\r\n#include <limits>\r\n#include <cstddef>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tmat4x4\r\n\t{\r\n\t\tenum ctor{_null};\r\n\t\ttypedef T value_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\ttypedef tvec4<T, P> col_type;\r\n\t\ttypedef tvec4<T, P> row_type;\r\n\t\ttypedef tmat4x4<T, P> type;\r\n\t\ttypedef tmat4x4<T, P> transpose_type;\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tfriend tvec4<U, Q> operator/(tmat4x4<U, Q> const & m, tvec4<U, Q> const & v);\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tfriend tvec4<U, Q> operator/(tvec4<U, Q> const & v, tmat4x4<U, Q> const & m);\r\n\r\n\tprivate:\r\n\t\t/// @cond DETAIL\r\n\t\tcol_type value[4];\r\n\r\n\tpublic:\r\n\t\t// Constructors\r\n\t\tGLM_FUNC_DECL tmat4x4();\r\n\t\tGLM_FUNC_DECL tmat4x4(tmat4x4<T, P> const & m);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tmat4x4(tmat4x4<T, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat4x4(\r\n\t\t\tctor Null);\r\n\t\tGLM_FUNC_DECL explicit tmat4x4(\r\n\t\t\tT const & x);\r\n\t\tGLM_FUNC_DECL tmat4x4(\r\n\t\t\tT const & x0, T const & y0, T const & z0, T const & w0,\r\n\t\t\tT const & x1, T const & y1, T const & z1, T const & w1,\r\n\t\t\tT const & x2, T const & y2, T const & z2, T const & w2,\r\n\t\t\tT const & x3, T const & y3, T const & z3, T const & w3);\r\n\t\tGLM_FUNC_DECL tmat4x4(\r\n\t\t\tcol_type const & v0,\r\n\t\t\tcol_type const & v1,\r\n\t\t\tcol_type const & v2,\r\n\t\t\tcol_type const & v3);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversions\r\n\r\n\t\ttemplate <\r\n\t\t\ttypename X1, typename Y1, typename Z1, typename W1,\r\n\t\t\ttypename X2, typename Y2, typename Z2, typename W2,\r\n\t\t\ttypename X3, typename Y3, typename Z3, typename W3,\r\n\t\t\ttypename X4, typename Y4, typename Z4, typename W4>\r\n\t\tGLM_FUNC_DECL tmat4x4(\r\n\t\t\tX1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,\r\n\t\t\tX2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,\r\n\t\t\tX3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3,\r\n\t\t\tX4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4);\r\n\t\t\t\r\n\t\ttemplate <typename V1, typename V2, typename V3, typename V4>\r\n\t\tGLM_FUNC_DECL tmat4x4(\r\n\t\t\ttvec4<V1, P> const & v1,\r\n\t\t\ttvec4<V2, P> const & v2,\r\n\t\t\ttvec4<V3, P> const & v3,\r\n\t\t\ttvec4<V4, P> const & v4);\r\n\t\r\n\t\t// Matrix conversions\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tmat4x4(tmat4x4<U, Q> const & m);\r\n\r\n\t\tGLM_FUNC_DECL explicit tmat4x4(tmat2x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x4(tmat3x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x4(tmat2x3<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x4(tmat3x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x4(tmat2x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x4(tmat4x2<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x4(tmat3x4<T, P> const & x);\r\n\t\tGLM_FUNC_DECL explicit tmat4x4(tmat4x3<T, P> const & x);\r\n\r\n\t\t// Accesses\r\n\t\tGLM_FUNC_DECL col_type & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL col_type const & operator[](length_t i) const;\r\n\r\n\t\t// Unary updatable operators\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator=  (tmat4x4<T, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator=  (tmat4x4<U, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator+= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator+= (tmat4x4<U, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator-= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator-= (tmat4x4<U, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator*= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator*= (tmat4x4<U, P> const & m);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator/= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator/= (tmat4x4<U, P> const & m);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator++ ();\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> & operator-- ();\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tmat4x4<T, P> operator--(int);\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> compute_inverse_mat4(tmat4x4<T, P> const & m);\r\n\r\n\t// Binary operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator+ (\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator+ (\r\n\t\tT const & s,\r\n\t\ttmat4x4<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator+ (\r\n\t\ttmat4x4<T, P> const & m1, \r\n\t\ttmat4x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator- (\r\n\t\ttmat4x4<T, P> const & m, \r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator- (\r\n\t\tT const & s,\r\n\t\ttmat4x4<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator- (\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator* (\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator* (\r\n\t\tT const & s,\r\n\t\ttmat4x4<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat4x4<T, P>::col_type operator* (\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\ttypename tmat4x4<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat4x4<T, P>::row_type operator* (\r\n\t\ttypename tmat4x4<T, P>::col_type const & v,\r\n\t\ttmat4x4<T, P> const & m);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat2x4<T, P> operator* (\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat3x4<T, P> operator* (\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator* (\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator/ (\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator/ (\r\n\t\tT const & s,\r\n\t\ttmat4x4<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat4x4<T, P>::col_type operator/ (\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\ttypename tmat4x4<T, P>::row_type const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL typename tmat4x4<T, P>::row_type operator/ (\r\n\t\ttypename tmat4x4<T, P>::col_type & v,\r\n\t\ttmat4x4<T, P> const & m);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> operator/ (\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2);\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tmat4x4<T, P> const operator-  (\r\n\t\ttmat4x4<T, P> const & m);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_mat4x4.inl\"\r\n#endif//GLM_EXTERNAL_TEMPLATE\r\n\r\n#endif//glm_core_type_mat4x4\r\n"
  },
  {
    "path": "gpu/glm/detail/type_mat4x4.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_mat4x4.inl\r\n/// @date 2005-01-27 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tmat4x4<T, P>::length() const\r\n\t{\r\n\t\treturn 4;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type &\r\n\ttmat4x4<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t)\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type const &\r\n\ttmat4x4<T, P>::operator[]\r\n\t(\r\n\t\tlength_t i\r\n\t) const\r\n\t{\r\n\t\tassert(i < this->length());\r\n\t\treturn this->value[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4()\r\n\t{\r\n\t\tT Zero(0);\r\n\t\tT One(1);\r\n\t\tthis->value[0] = col_type(One, Zero, Zero, Zero);\r\n\t\tthis->value[1] = col_type(Zero, One, Zero, Zero);\r\n\t\tthis->value[2] = col_type(Zero, Zero, One, Zero);\r\n\t\tthis->value[3] = col_type(Zero, Zero, Zero, One);\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\tthis->value[3] = m[3];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttmat4x4<T, Q> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\tthis->value[3] = m[3];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\tctor\r\n\t)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tvalue_type const Zero(0);\r\n\t\tthis->value[0] = col_type(s, Zero, Zero, Zero);\r\n\t\tthis->value[1] = col_type(Zero, s, Zero, Zero);\r\n\t\tthis->value[2] = col_type(Zero, Zero, s, Zero);\r\n\t\tthis->value[3] = col_type(Zero, Zero, Zero, s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\tT const & x0, T const & y0, T const & z0, T const & w0,\r\n\t\tT const & x1, T const & y1, T const & z1, T const & w1,\r\n\t\tT const & x2, T const & y2, T const & z2, T const & w2,\r\n\t\tT const & x3, T const & y3, T const & z3, T const & w3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(x0, y0, z0, w0);\r\n\t\tthis->value[1] = col_type(x1, y1, z1, w1);\r\n\t\tthis->value[2] = col_type(x2, y2, z2, w2);\r\n\t\tthis->value[3] = col_type(x3, y3, z3, w3);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\tcol_type const & v0,\r\n\t\tcol_type const & v1,\r\n\t\tcol_type const & v2,\r\n\t\tcol_type const & v3\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = v0;\r\n\t\tthis->value[1] = v1;\r\n\t\tthis->value[2] = v2;\r\n\t\tthis->value[3] = v3;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttmat4x4<U, Q> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0]);\r\n\t\tthis->value[1] = col_type(m[1]);\r\n\t\tthis->value[2] = col_type(m[2]);\r\n\t\tthis->value[3] = col_type(m[3]);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion constructors\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <\r\n\t\ttypename X1, typename Y1, typename Z1, typename W1,\r\n\t\ttypename X2, typename Y2, typename Z2, typename W2,\r\n\t\ttypename X3, typename Y3, typename Z3, typename W3,\r\n\t\ttypename X4, typename Y4, typename Z4, typename W4>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\tX1 const & x1, Y1 const & y1, Z1 const & z1, W1 const & w1,\r\n\t\tX2 const & x2, Y2 const & y2, Z2 const & z2, W2 const & w2,\r\n\t\tX3 const & x3, Y3 const & y3, Z3 const & z3, W3 const & w3,\r\n\t\tX4 const & x4, Y4 const & y4, Z4 const & z4, W4 const & w4\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<X1>::is_iec559 || std::numeric_limits<X1>::is_integer, \"*mat4x4 constructor only takes float and integer types, 1st parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<Y1>::is_iec559 || std::numeric_limits<Y1>::is_integer, \"*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<Z1>::is_iec559 || std::numeric_limits<Z1>::is_integer, \"*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<W1>::is_iec559 || std::numeric_limits<W1>::is_integer, \"*mat4x4 constructor only takes float and integer types, 4th parameter type invalid.\");\r\n\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<X2>::is_iec559 || std::numeric_limits<X2>::is_integer, \"*mat4x4 constructor only takes float and integer types, 5th parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<Y2>::is_iec559 || std::numeric_limits<Y2>::is_integer, \"*mat4x4 constructor only takes float and integer types, 6th parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<Z2>::is_iec559 || std::numeric_limits<Z2>::is_integer, \"*mat4x4 constructor only takes float and integer types, 7th parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<W2>::is_iec559 || std::numeric_limits<W2>::is_integer, \"*mat4x4 constructor only takes float and integer types, 8th parameter type invalid.\");\r\n\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<X3>::is_iec559 || std::numeric_limits<X3>::is_integer, \"*mat4x4 constructor only takes float and integer types, 9th parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<Y3>::is_iec559 || std::numeric_limits<Y3>::is_integer, \"*mat4x4 constructor only takes float and integer types, 10th parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<Z3>::is_iec559 || std::numeric_limits<Z3>::is_integer, \"*mat4x4 constructor only takes float and integer types, 11th parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<W3>::is_iec559 || std::numeric_limits<W3>::is_integer, \"*mat4x4 constructor only takes float and integer types, 12th parameter type invalid.\");\r\n\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<X4>::is_iec559 || std::numeric_limits<X4>::is_integer, \"*mat4x4 constructor only takes float and integer types, 13th parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<Y4>::is_iec559 || std::numeric_limits<Y4>::is_integer, \"*mat4x4 constructor only takes float and integer types, 14th parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<Z4>::is_iec559 || std::numeric_limits<Z4>::is_integer, \"*mat4x4 constructor only takes float and integer types, 15th parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<W4>::is_iec559 || std::numeric_limits<W4>::is_integer, \"*mat4x4 constructor only takes float and integer types, 16th parameter type invalid.\");\r\n\r\n\t\tthis->value[0] = col_type(static_cast<T>(x1), value_type(y1), value_type(z1), value_type(w1));\r\n\t\tthis->value[1] = col_type(static_cast<T>(x2), value_type(y2), value_type(z2), value_type(w2));\r\n\t\tthis->value[2] = col_type(static_cast<T>(x3), value_type(y3), value_type(z3), value_type(w3));\r\n\t\tthis->value[3] = col_type(static_cast<T>(x4), value_type(y4), value_type(z4), value_type(w4));\r\n\t}\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename V1, typename V2, typename V3, typename V4>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttvec4<V1, P> const & v1,\r\n\t\ttvec4<V2, P> const & v2,\r\n\t\ttvec4<V3, P> const & v3,\r\n\t\ttvec4<V4, P> const & v4\r\n\t)\t\t\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<V1>::is_iec559 || std::numeric_limits<V1>::is_integer, \"*mat4x4 constructor only takes float and integer types, 1st parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<V2>::is_iec559 || std::numeric_limits<V2>::is_integer, \"*mat4x4 constructor only takes float and integer types, 2nd parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<V3>::is_iec559 || std::numeric_limits<V3>::is_integer, \"*mat4x4 constructor only takes float and integer types, 3rd parameter type invalid.\");\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<V4>::is_iec559 || std::numeric_limits<V4>::is_integer, \"*mat4x4 constructor only takes float and integer types, 4th parameter type invalid.\");\r\n\r\n\t\tthis->value[0] = col_type(v1);\r\n\t\tthis->value[1] = col_type(v2);\r\n\t\tthis->value[2] = col_type(v3);\r\n\t\tthis->value[3] = col_type(v4);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Matrix convertion constructors\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], detail::tvec2<T, P>(0));\r\n\t\tthis->value[1] = col_type(m[1], detail::tvec2<T, P>(0));\r\n\t\tthis->value[2] = col_type(static_cast<T>(0));\r\n\t\tthis->value[3] = col_type(static_cast<T>(0), value_type(0), value_type(0), value_type(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], value_type(0));\r\n\t\tthis->value[1] = col_type(m[1], value_type(0));\r\n\t\tthis->value[2] = col_type(m[2], value_type(0));\r\n\t\tthis->value[3] = col_type(static_cast<T>(0), value_type(0), value_type(0), value_type(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttmat2x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], value_type(0));\r\n\t\tthis->value[1] = col_type(m[1], value_type(0));\r\n\t\tthis->value[2] = col_type(static_cast<T>(0));\r\n\t\tthis->value[3] = col_type(static_cast<T>(0), value_type(0), value_type(0), value_type(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttmat3x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], detail::tvec2<T, P>(0));\r\n\t\tthis->value[1] = col_type(m[1], detail::tvec2<T, P>(0));\r\n\t\tthis->value[2] = col_type(m[2], detail::tvec2<T, P>(0));\r\n\t\tthis->value[3] = col_type(static_cast<T>(0), value_type(0), value_type(0), value_type(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = col_type(T(0));\r\n\t\tthis->value[3] = col_type(T(0), T(0), T(0), T(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttmat4x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], detail::tvec2<T, P>(0));\r\n\t\tthis->value[1] = col_type(m[1], detail::tvec2<T, P>(0));\r\n\t\tthis->value[2] = col_type(T(0));\r\n\t\tthis->value[3] = col_type(T(0), T(0), T(0), T(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\tthis->value[3] = col_type(T(0), T(0), T(0), T(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>::tmat4x4\r\n\t(\r\n\t\ttmat4x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tthis->value[0] = col_type(m[0], T(0));\r\n\t\tthis->value[1] = col_type(m[1], T(0));\r\n\t\tthis->value[2] = col_type(m[2], T(0));\r\n\t\tthis->value[3] = col_type(m[3], T(1));\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// Operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator=\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\t//memcpy could be faster\r\n\t\t//memcpy(&this->value, &m.value, 16 * sizeof(valType));\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\tthis->value[3] = m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator=\r\n\t(\r\n\t\ttmat4x4<U, P> const & m\r\n\t)\r\n\t{\r\n\t\t//memcpy could be faster\r\n\t\t//memcpy(&this->value, &m.value, 16 * sizeof(valType));\r\n\t\tthis->value[0] = m[0];\r\n\t\tthis->value[1] = m[1];\r\n\t\tthis->value[2] = m[2];\r\n\t\tthis->value[3] = m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator+= (U s)\r\n\t{\r\n\t\tthis->value[0] += s;\r\n\t\tthis->value[1] += s;\r\n\t\tthis->value[2] += s;\r\n\t\tthis->value[3] += s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P>& tmat4x4<T, P>::operator+= (tmat4x4<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] += m[0];\r\n\t\tthis->value[1] += m[1];\r\n\t\tthis->value[2] += m[2];\r\n\t\tthis->value[3] += m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator-= (U s)\r\n\t{\r\n\t\tthis->value[0] -= s;\r\n\t\tthis->value[1] -= s;\r\n\t\tthis->value[2] -= s;\r\n\t\tthis->value[3] -= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator-= (tmat4x4<U, P> const & m)\r\n\t{\r\n\t\tthis->value[0] -= m[0];\r\n\t\tthis->value[1] -= m[1];\r\n\t\tthis->value[2] -= m[2];\r\n\t\tthis->value[3] -= m[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator*= (U s)\r\n\t{\r\n\t\tthis->value[0] *= s;\r\n\t\tthis->value[1] *= s;\r\n\t\tthis->value[2] *= s;\r\n\t\tthis->value[3] *= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator*= (tmat4x4<U, P> const & m)\r\n\t{\r\n\t\treturn (*this = *this * m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator/= (U s)\r\n\t{\r\n\t\tthis->value[0] /= s;\r\n\t\tthis->value[1] /= s;\r\n\t\tthis->value[2] /= s;\r\n\t\tthis->value[3] /= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator/= (tmat4x4<U, P> const & m)\r\n\t{\r\n\t\treturn (*this = *this * detail::compute_inverse<detail::tmat4x4, T, P>::call(m));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator++ ()\r\n\t{\r\n\t\t++this->value[0];\r\n\t\t++this->value[1];\r\n\t\t++this->value[2];\r\n\t\t++this->value[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> & tmat4x4<T, P>::operator-- ()\r\n\t{\r\n\t\t--this->value[0];\r\n\t\t--this->value[1];\r\n\t\t--this->value[2];\r\n\t\t--this->value[3];\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> tmat4x4<T, P>::operator++(int)\r\n\t{\r\n\t\ttmat4x4<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> tmat4x4<T, P>::operator--(int)\r\n\t{\r\n\t\ttmat4x4<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_inverse<detail::tmat4x4, T, P>\r\n\t{\r\n\t\tstatic detail::tmat4x4<T, P> call(detail::tmat4x4<T, P> const & m)\r\n\t\t{\r\n\t\t\tT Coef00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\r\n\t\t\tT Coef02 = m[1][2] * m[3][3] - m[3][2] * m[1][3];\r\n\t\t\tT Coef03 = m[1][2] * m[2][3] - m[2][2] * m[1][3];\r\n\r\n\t\t\tT Coef04 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\r\n\t\t\tT Coef06 = m[1][1] * m[3][3] - m[3][1] * m[1][3];\r\n\t\t\tT Coef07 = m[1][1] * m[2][3] - m[2][1] * m[1][3];\r\n\r\n\t\t\tT Coef08 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\r\n\t\t\tT Coef10 = m[1][1] * m[3][2] - m[3][1] * m[1][2];\r\n\t\t\tT Coef11 = m[1][1] * m[2][2] - m[2][1] * m[1][2];\r\n\r\n\t\t\tT Coef12 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\r\n\t\t\tT Coef14 = m[1][0] * m[3][3] - m[3][0] * m[1][3];\r\n\t\t\tT Coef15 = m[1][0] * m[2][3] - m[2][0] * m[1][3];\r\n\r\n\t\t\tT Coef16 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\r\n\t\t\tT Coef18 = m[1][0] * m[3][2] - m[3][0] * m[1][2];\r\n\t\t\tT Coef19 = m[1][0] * m[2][2] - m[2][0] * m[1][2];\r\n\r\n\t\t\tT Coef20 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\r\n\t\t\tT Coef22 = m[1][0] * m[3][1] - m[3][0] * m[1][1];\r\n\t\t\tT Coef23 = m[1][0] * m[2][1] - m[2][0] * m[1][1];\r\n\r\n\t\t\tdetail::tvec4<T, P> Fac0(Coef00, Coef00, Coef02, Coef03);\r\n\t\t\tdetail::tvec4<T, P> Fac1(Coef04, Coef04, Coef06, Coef07);\r\n\t\t\tdetail::tvec4<T, P> Fac2(Coef08, Coef08, Coef10, Coef11);\r\n\t\t\tdetail::tvec4<T, P> Fac3(Coef12, Coef12, Coef14, Coef15);\r\n\t\t\tdetail::tvec4<T, P> Fac4(Coef16, Coef16, Coef18, Coef19);\r\n\t\t\tdetail::tvec4<T, P> Fac5(Coef20, Coef20, Coef22, Coef23);\r\n\r\n\t\t\tdetail::tvec4<T, P> Vec0(m[1][0], m[0][0], m[0][0], m[0][0]);\r\n\t\t\tdetail::tvec4<T, P> Vec1(m[1][1], m[0][1], m[0][1], m[0][1]);\r\n\t\t\tdetail::tvec4<T, P> Vec2(m[1][2], m[0][2], m[0][2], m[0][2]);\r\n\t\t\tdetail::tvec4<T, P> Vec3(m[1][3], m[0][3], m[0][3], m[0][3]);\r\n\r\n\t\t\tdetail::tvec4<T, P> Inv0(Vec1 * Fac0 - Vec2 * Fac1 + Vec3 * Fac2);\r\n\t\t\tdetail::tvec4<T, P> Inv1(Vec0 * Fac0 - Vec2 * Fac3 + Vec3 * Fac4);\r\n\t\t\tdetail::tvec4<T, P> Inv2(Vec0 * Fac1 - Vec1 * Fac3 + Vec3 * Fac5);\r\n\t\t\tdetail::tvec4<T, P> Inv3(Vec0 * Fac2 - Vec1 * Fac4 + Vec2 * Fac5);\r\n\r\n\t\t\tdetail::tvec4<T, P> SignA(+1, -1, +1, -1);\r\n\t\t\tdetail::tvec4<T, P> SignB(-1, +1, -1, +1);\r\n\t\t\tdetail::tmat4x4<T, P> Inverse(Inv0 * SignA, Inv1 * SignB, Inv2 * SignA, Inv3 * SignB);\r\n\r\n\t\t\tdetail::tvec4<T, P> Row0(Inverse[0][0], Inverse[1][0], Inverse[2][0], Inverse[3][0]);\r\n\r\n\t\t\tdetail::tvec4<T, P> Dot0(m[0] * Row0);\r\n\t\t\tT Dot1 = (Dot0.x + Dot0.y) + (Dot0.z + Dot0.w);\r\n\r\n\t\t\tT OneOverDeterminant = static_cast<T>(1) / Dot1;\r\n\r\n\t\t\treturn Inverse * OneOverDeterminant;\r\n\t\t}\r\n\t};\r\n\r\n\t// Binary operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator+\r\n\t(\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s,\r\n\t\t\tm[2] + s,\r\n\t\t\tm[3] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator+\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\tm[0] + s,\r\n\t\t\tm[1] + s,\r\n\t\t\tm[2] + s,\r\n\t\t\tm[3] + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator+\r\n\t(\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\tm1[0] + m2[0],\r\n\t\t\tm1[1] + m2[1],\r\n\t\t\tm1[2] + m2[2],\r\n\t\t\tm1[3] + m2[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator-\r\n\t(\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\tm[0] - s,\r\n\t\t\tm[1] - s,\r\n\t\t\tm[2] - s,\r\n\t\t\tm[3] - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator-\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\ts - m[0],\r\n\t\t\ts - m[1],\r\n\t\t\ts - m[2],\r\n\t\t\ts - m[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator-\r\n\t(\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\tm1[0] - m2[0],\r\n\t\t\tm1[1] - m2[1],\r\n\t\t\tm1[2] - m2[2],\r\n\t\t\tm1[3] - m2[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator*\r\n\t(\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\tT const  & s\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s,\r\n\t\t\tm[3] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator*\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\tm[0] * s,\r\n\t\t\tm[1] * s,\r\n\t\t\tm[2] * s,\r\n\t\t\tm[3] * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type operator*\r\n\t(\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\ttypename tmat4x4<T, P>::row_type const & v\r\n\t)\r\n\t{\r\n/*\r\n\t\t__m128 v0 = _mm_shuffle_ps(v.data, v.data, _MM_SHUFFLE(0, 0, 0, 0));\r\n\t\t__m128 v1 = _mm_shuffle_ps(v.data, v.data, _MM_SHUFFLE(1, 1, 1, 1));\r\n\t\t__m128 v2 = _mm_shuffle_ps(v.data, v.data, _MM_SHUFFLE(2, 2, 2, 2));\r\n\t\t__m128 v3 = _mm_shuffle_ps(v.data, v.data, _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\t\t__m128 m0 = _mm_mul_ps(m[0].data, v0);\r\n\t\t__m128 m1 = _mm_mul_ps(m[1].data, v1);\r\n\t\t__m128 a0 = _mm_add_ps(m0, m1);\r\n\r\n\t\t__m128 m2 = _mm_mul_ps(m[2].data, v2);\r\n\t\t__m128 m3 = _mm_mul_ps(m[3].data, v3);\r\n\t\t__m128 a1 = _mm_add_ps(m2, m3);\r\n\r\n\t\t__m128 a2 = _mm_add_ps(a0, a1);\r\n\r\n\t\treturn typename tmat4x4<T, P>::col_type(a2);\r\n*/\r\n\r\n\t\ttypename tmat4x4<T, P>::col_type const Mov0(v[0]);\r\n\t\ttypename tmat4x4<T, P>::col_type const Mov1(v[1]);\r\n\t\ttypename tmat4x4<T, P>::col_type const Mul0 = m[0] * Mov0;\r\n\t\ttypename tmat4x4<T, P>::col_type const Mul1 = m[1] * Mov1;\r\n\t\ttypename tmat4x4<T, P>::col_type const Add0 = Mul0 + Mul1;\r\n\t\ttypename tmat4x4<T, P>::col_type const Mov2(v[2]);\r\n\t\ttypename tmat4x4<T, P>::col_type const Mov3(v[3]);\r\n\t\ttypename tmat4x4<T, P>::col_type const Mul2 = m[2] * Mov2;\r\n\t\ttypename tmat4x4<T, P>::col_type const Mul3 = m[3] * Mov3;\r\n\t\ttypename tmat4x4<T, P>::col_type const Add1 = Mul2 + Mul3;\r\n\t\ttypename tmat4x4<T, P>::col_type const Add2 = Add0 + Add1;\r\n\t\treturn Add2;\r\n\r\n/*\r\n\t\treturn typename tmat4x4<T, P>::col_type(\r\n\t\t\tm[0][0] * v[0] + m[1][0] * v[1] + m[2][0] * v[2] + m[3][0] * v[3],\r\n\t\t\tm[0][1] * v[0] + m[1][1] * v[1] + m[2][1] * v[2] + m[3][1] * v[3],\r\n\t\t\tm[0][2] * v[0] + m[1][2] * v[1] + m[2][2] * v[2] + m[3][2] * v[3],\r\n\t\t\tm[0][3] * v[0] + m[1][3] * v[1] + m[2][3] * v[2] + m[3][3] * v[3]);\r\n*/\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x4<T, P>::row_type operator*\r\n\t(\r\n\t\ttypename tmat4x4<T, P>::col_type const & v,\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn typename tmat4x4<T, P>::row_type(\r\n\t\t\tm[0][0] * v[0] + m[0][1] * v[1] + m[0][2] * v[2] + m[0][3] * v[3],\r\n\t\t\tm[1][0] * v[0] + m[1][1] * v[1] + m[1][2] * v[2] + m[1][3] * v[3],\r\n\t\t\tm[2][0] * v[0] + m[2][1] * v[1] + m[2][2] * v[2] + m[2][3] * v[3],\r\n\t\t\tm[3][0] * v[0] + m[3][1] * v[1] + m[3][2] * v[2] + m[3][3] * v[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat2x4<T, P> operator*\r\n\t(\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat2x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat2x4<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3],\r\n\t\t\tm1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2] + m1[3][3] * m2[0][3],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3],\r\n\t\t\tm1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2] + m1[3][3] * m2[1][3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat3x4<T, P> operator*\r\n\t(\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat3x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn tmat3x4<T, P>(\r\n\t\t\tm1[0][0] * m2[0][0] + m1[1][0] * m2[0][1] + m1[2][0] * m2[0][2] + m1[3][0] * m2[0][3],\r\n\t\t\tm1[0][1] * m2[0][0] + m1[1][1] * m2[0][1] + m1[2][1] * m2[0][2] + m1[3][1] * m2[0][3],\r\n\t\t\tm1[0][2] * m2[0][0] + m1[1][2] * m2[0][1] + m1[2][2] * m2[0][2] + m1[3][2] * m2[0][3],\r\n\t\t\tm1[0][3] * m2[0][0] + m1[1][3] * m2[0][1] + m1[2][3] * m2[0][2] + m1[3][3] * m2[0][3],\r\n\t\t\tm1[0][0] * m2[1][0] + m1[1][0] * m2[1][1] + m1[2][0] * m2[1][2] + m1[3][0] * m2[1][3],\r\n\t\t\tm1[0][1] * m2[1][0] + m1[1][1] * m2[1][1] + m1[2][1] * m2[1][2] + m1[3][1] * m2[1][3],\r\n\t\t\tm1[0][2] * m2[1][0] + m1[1][2] * m2[1][1] + m1[2][2] * m2[1][2] + m1[3][2] * m2[1][3],\r\n\t\t\tm1[0][3] * m2[1][0] + m1[1][3] * m2[1][1] + m1[2][3] * m2[1][2] + m1[3][3] * m2[1][3],\r\n\t\t\tm1[0][0] * m2[2][0] + m1[1][0] * m2[2][1] + m1[2][0] * m2[2][2] + m1[3][0] * m2[2][3],\r\n\t\t\tm1[0][1] * m2[2][0] + m1[1][1] * m2[2][1] + m1[2][1] * m2[2][2] + m1[3][1] * m2[2][3],\r\n\t\t\tm1[0][2] * m2[2][0] + m1[1][2] * m2[2][1] + m1[2][2] * m2[2][2] + m1[3][2] * m2[2][3],\r\n\t\t\tm1[0][3] * m2[2][0] + m1[1][3] * m2[2][1] + m1[2][3] * m2[2][2] + m1[3][3] * m2[2][3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator*\r\n\t(\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\ttypename tmat4x4<T, P>::col_type const SrcA0 = m1[0];\r\n\t\ttypename tmat4x4<T, P>::col_type const SrcA1 = m1[1];\r\n\t\ttypename tmat4x4<T, P>::col_type const SrcA2 = m1[2];\r\n\t\ttypename tmat4x4<T, P>::col_type const SrcA3 = m1[3];\r\n\r\n\t\ttypename tmat4x4<T, P>::col_type const SrcB0 = m2[0];\r\n\t\ttypename tmat4x4<T, P>::col_type const SrcB1 = m2[1];\r\n\t\ttypename tmat4x4<T, P>::col_type const SrcB2 = m2[2];\r\n\t\ttypename tmat4x4<T, P>::col_type const SrcB3 = m2[3];\r\n\r\n\t\ttmat4x4<T, P> Result(tmat4x4<T, P>::_null);\r\n\t\tResult[0] = SrcA0 * SrcB0[0] + SrcA1 * SrcB0[1] + SrcA2 * SrcB0[2] + SrcA3 * SrcB0[3];\r\n\t\tResult[1] = SrcA0 * SrcB1[0] + SrcA1 * SrcB1[1] + SrcA2 * SrcB1[2] + SrcA3 * SrcB1[3];\r\n\t\tResult[2] = SrcA0 * SrcB2[0] + SrcA1 * SrcB2[1] + SrcA2 * SrcB2[2] + SrcA3 * SrcB2[3];\r\n\t\tResult[3] = SrcA0 * SrcB3[0] + SrcA1 * SrcB3[1] + SrcA2 * SrcB3[2] + SrcA3 * SrcB3[3];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator/\r\n\t(\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\tm[0] / s,\r\n\t\t\tm[1] / s,\r\n\t\t\tm[2] / s,\r\n\t\t\tm[3] / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator/\r\n\t(\r\n\t\tT const & s,\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\ts / m[0],\r\n\t\t\ts / m[1],\r\n\t\t\ts / m[2],\r\n\t\t\ts / m[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x4<T, P>::col_type operator/\r\n\t(\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\ttypename tmat4x4<T, P>::row_type const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::compute_inverse<detail::tmat4x4, T, P>::call(m) * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tmat4x4<T, P>::row_type operator/\r\n\t(\r\n\t\ttypename tmat4x4<T, P>::col_type const & v,\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn v * detail::compute_inverse<detail::tmat4x4, T, P>::call(m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> operator/\r\n\t(\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\ttmat4x4<T, P> m1_copy(m1);\r\n\t\treturn m1_copy /= m2;\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> const operator-\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\t-m[0],\r\n\t\t\t-m[1],\r\n\t\t\t-m[2],\r\n\t\t\t-m[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> const operator++\r\n\t(\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\tint\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\tm[0] + static_cast<T>(1),\r\n\t\t\tm[1] + static_cast<T>(1),\r\n\t\t\tm[2] + static_cast<T>(1),\r\n\t\t\tm[3] + static_cast<T>(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tmat4x4<T, P> const operator--\r\n\t(\r\n\t\ttmat4x4<T, P> const & m,\r\n\t\tint\r\n\t)\r\n\t{\r\n\t\treturn tmat4x4<T, P>(\r\n\t\t\tm[0] - static_cast<T>(1),\r\n\t\t\tm[1] - static_cast<T>(1),\r\n\t\t\tm[2] - static_cast<T>(1),\r\n\t\t\tm[3] - static_cast<T>(1));\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] == m2[0]) && (m1[1] == m2[1]) && (m1[2] == m2[2]) && (m1[3] == m2[3]);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttmat4x4<T, P> const & m1,\r\n\t\ttmat4x4<T, P> const & m2\r\n\t)\r\n\t{\r\n\t\treturn (m1[0] != m2[0]) || (m1[1] != m2[1]) || (m1[2] != m2[2]) || (m1[3] != m2[3]);\r\n\t}\r\n\r\n} //namespace detail\r\n} //namespace glm\r\n"
  },
  {
    "path": "gpu/glm/detail/type_vec.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_vec.hpp\r\n/// @date 2010-01-26 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_vec\r\n#define glm_core_type_vec\r\n\r\n#include \"precision.hpp\"\r\n#include \"type_int.hpp\"\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P> struct tvec1;\r\n\ttemplate <typename T, precision P> struct tvec2;\r\n\ttemplate <typename T, precision P> struct tvec3;\r\n\ttemplate <typename T, precision P> struct tvec4;\r\n}//namespace detail\r\n\t\r\n\ttypedef detail::tvec1<float, highp>\t\thighp_vec1_t;\r\n\ttypedef detail::tvec1<float, mediump>\tmediump_vec1_t;\r\n\ttypedef detail::tvec1<float, lowp>\t\tlowp_vec1_t;\r\n\ttypedef detail::tvec1<int, highp>\t\thighp_ivec1_t;\r\n\ttypedef detail::tvec1<int, mediump>\t\tmediump_ivec1_t;\r\n\ttypedef detail::tvec1<int, lowp>\t\tlowp_ivec1_t;\r\n\ttypedef detail::tvec1<uint, highp>\t\thighp_uvec1_t;\r\n\ttypedef detail::tvec1<uint, mediump>\tmediump_uvec1_t;\r\n\ttypedef detail::tvec1<uint, lowp>\t\tlowp_uvec1_t;\r\n\ttypedef detail::tvec1<bool, highp>\t\thighp_bvec1_t;\r\n\ttypedef detail::tvec1<bool, mediump>\tmediump_bvec1_t;\r\n\ttypedef detail::tvec1<bool, lowp>\t\tlowp_bvec1_t;\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 2 components vector of high single-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<float, highp>\t\thighp_vec2;\r\n\t\r\n\t/// 2 components vector of medium single-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<float, mediump>\tmediump_vec2;\r\n\t\r\n\t/// 2 components vector of low single-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<float, lowp>\t\tlowp_vec2;\r\n\t\r\n\t/// 2 components vector of high double-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<double, highp>\thighp_dvec2;\r\n\t\r\n\t/// 2 components vector of medium double-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<double, mediump>\tmediump_dvec2;\r\n\t\r\n\t/// 2 components vector of low double-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<double, lowp>\t\tlowp_dvec2;\r\n\t\r\n\t/// 2 components vector of high precision signed integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<int, highp>\t\thighp_ivec2;\r\n\t\r\n\t/// 2 components vector of medium precision signed integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<int, mediump>\t\tmediump_ivec2;\r\n\t\r\n\t/// 2 components vector of low precision signed integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<int, lowp>\t\tlowp_ivec2;\r\n\t\r\n\t/// 2 components vector of high precision unsigned integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<uint, highp>\t\thighp_uvec2;\r\n\t\r\n\t/// 2 components vector of medium precision unsigned integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<uint, mediump>\tmediump_uvec2;\r\n\t\r\n\t/// 2 components vector of low precision unsigned integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<uint, lowp>\t\tlowp_uvec2;\r\n\r\n\t/// 2 components vector of high precision bool numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<bool, highp>\t\thighp_bvec2;\r\n\t\r\n\t/// 2 components vector of medium precision bool numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<bool, mediump>\tmediump_bvec2;\r\n\t\r\n\t/// 2 components vector of low precision bool numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec2<bool, lowp>\t\tlowp_bvec2;\r\n\t\r\n\t/// @}\r\n\t\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\t\r\n\t/// 3 components vector of high single-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<float, highp>\t\thighp_vec3;\r\n\t\r\n\t/// 3 components vector of medium single-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<float, mediump>\tmediump_vec3;\r\n\t\r\n\t/// 3 components vector of low single-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<float, lowp>\t\tlowp_vec3;\r\n\t\r\n\t/// 3 components vector of high double-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<double, highp>\thighp_dvec3;\r\n\t\r\n\t/// 3 components vector of medium double-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<double, mediump>\tmediump_dvec3;\r\n\t\r\n\t/// 3 components vector of low double-precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<double, lowp>\t\tlowp_dvec3;\r\n\t\r\n\t/// 3 components vector of high precision signed integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<int, highp>\t\thighp_ivec3;\r\n\t\r\n\t/// 3 components vector of medium precision signed integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<int, mediump>\t\tmediump_ivec3;\r\n\t\r\n\t/// 3 components vector of low precision signed integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<int, lowp>\t\tlowp_ivec3;\r\n\t\r\n\t/// 3 components vector of high precision unsigned integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<uint, highp>\t\thighp_uvec3;\r\n\t\r\n\t/// 3 components vector of medium precision unsigned integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<uint, mediump>\tmediump_uvec3;\r\n\t\r\n\t/// 3 components vector of low precision unsigned integer numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<uint, lowp>\t\tlowp_uvec3;\r\n\t\r\n\t/// 3 components vector of high precision bool numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<bool, highp>\t\thighp_bvec3;\r\n\t\r\n\t/// 3 components vector of medium precision bool numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<bool, mediump>\tmediump_bvec3;\r\n\t\r\n\t/// 3 components vector of low precision bool numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec3<bool, lowp>\t\tlowp_bvec3;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_precision\r\n\t/// @{\r\n\r\n\t/// 4 components vector of high single-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<float, highp>\t\thighp_vec4;\r\n\t\r\n\t/// 4 components vector of medium single-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<float, mediump>\tmediump_vec4;\r\n\t\r\n\t/// 4 components vector of low single-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<float, lowp>\t\tlowp_vec4;\r\n\t\r\n\t/// 4 components vector of high double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<double, highp>\thighp_dvec4;\r\n\t\r\n\t/// 4 components vector of medium double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<double, mediump>\tmediump_dvec4;\r\n\t\r\n\t/// 4 components vector of low double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<double, lowp>\t\tlowp_dvec4;\r\n\t\r\n\t/// 4 components vector of high precision signed integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<int, highp>\t\thighp_ivec4;\r\n\t\r\n\t/// 4 components vector of medium precision signed integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<int, mediump>\t\tmediump_ivec4;\r\n\t\r\n\t/// 4 components vector of low precision signed integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<int, lowp>\t\tlowp_ivec4;\r\n\t\r\n\t/// 4 components vector of high precision unsigned integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<uint, highp>\t\thighp_uvec4;\r\n\t\r\n\t/// 4 components vector of medium precision unsigned integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<uint, mediump>\tmediump_uvec4;\r\n\t\r\n\t/// 4 components vector of low precision unsigned integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<uint, lowp>\t\tlowp_uvec4;\r\n\r\n\t/// 4 components vector of high precision bool numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<bool, highp>\t\thighp_bvec4;\r\n\t\r\n\t/// 4 components vector of medium precision bool numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<bool, mediump>\tmediump_bvec4;\r\n\t\r\n\t/// 4 components vector of low precision bool numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tvec4<bool, lowp>\t\tlowp_bvec4;\r\n\t\r\n\t/// @}\r\n\t\r\n\t/// @addtogroup core_types\r\n\t/// @{\r\n\t\r\n\t//////////////////////////\r\n\t// Default float definition\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef lowp_vec2\t\t\tvec2;\r\n\ttypedef lowp_vec3\t\t\tvec3;\r\n\ttypedef lowp_vec4\t\t\tvec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))\r\n\ttypedef mediump_vec2\t\tvec2;\r\n\ttypedef mediump_vec3\t\tvec3;\r\n\ttypedef mediump_vec4\t\tvec4;\r\n#else //defined(GLM_PRECISION_HIGHP_FLOAT)\r\n\t/// 2 components vector of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_vec2\t\t\tvec2;\r\n\t\r\n\t//! 3 components vector of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_vec3\t\t\tvec3;\r\n\t\r\n\t//! 4 components vector of floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_vec4\t\t\tvec4;\r\n#endif//GLM_PRECISION\r\n\r\n\t//////////////////////////\r\n\t// Default double definition\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_DOUBLE))\r\n\ttypedef lowp_dvec2\t\t\tdvec2;\r\n\ttypedef lowp_dvec3\t\t\tdvec3;\r\n\ttypedef lowp_dvec4\t\t\tdvec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))\r\n\ttypedef mediump_dvec2\t\tdvec2;\r\n\ttypedef mediump_dvec3\t\tdvec3;\r\n\ttypedef mediump_dvec4\t\tdvec4;\r\n#else //defined(GLM_PRECISION_HIGHP_DOUBLE)\r\n\t/// 2 components vector of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_dvec2\t\t\tdvec2;\r\n\t\r\n\t//! 3 components vector of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_dvec3\t\t\tdvec3;\r\n\t\r\n\t//! 4 components vector of double-precision floating-point numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_dvec4\t\t\tdvec4;\r\n#endif//GLM_PRECISION\r\n\t\r\n\t//////////////////////////\r\n\t// Signed integer definition\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_ivec2\t\t\tivec2;\r\n\ttypedef lowp_ivec3\t\t\tivec3;\r\n\ttypedef lowp_ivec4\t\t\tivec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\ttypedef mediump_ivec2\t\tivec2;\r\n\ttypedef mediump_ivec3\t\tivec3;\r\n\ttypedef mediump_ivec4\t\tivec4;\r\n#else //defined(GLM_PRECISION_HIGHP_INT)\r\n\t//! 2 components vector of signed integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_ivec2\t\t\tivec2;\r\n\t\r\n\t//! 3 components vector of signed integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_ivec3\t\t\tivec3;\r\n\t\r\n\t//! 4 components vector of signed integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_ivec4\t\t\tivec4;\r\n#endif//GLM_PRECISION\r\n\t\r\n\t//////////////////////////\r\n\t// Unsigned integer definition\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_UINT))\r\n\ttypedef lowp_uvec2\t\t\tuvec2;\r\n\ttypedef lowp_uvec3\t\t\tuvec3;\r\n\ttypedef lowp_uvec4\t\t\tuvec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_UINT))\r\n\ttypedef mediump_uvec2\t\tuvec2;\r\n\ttypedef mediump_uvec3\t\tuvec3;\r\n\ttypedef mediump_uvec4\t\tuvec4;\r\n#else //defined(GLM_PRECISION_HIGHP_UINT)\r\n\t/// 2 components vector of unsigned integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_uvec2\t\t\tuvec2;\r\n\t\r\n\t/// 3 components vector of unsigned integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_uvec3\t\t\tuvec3;\r\n\t\r\n\t/// 4 components vector of unsigned integer numbers.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_uvec4\t\t\tuvec4;\r\n#endif//GLM_PRECISION\r\n\t\r\n\t//////////////////////////\r\n\t// Boolean definition\r\n\r\n#if(defined(GLM_PRECISION_LOWP_BOOL))\r\n\ttypedef lowp_bvec2\t\t\tbvec2;\r\n\ttypedef lowp_bvec3\t\t\tbvec3;\r\n\ttypedef lowp_bvec4\t\t\tbvec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_BOOL))\r\n\ttypedef mediump_bvec2\t\tbvec2;\r\n\ttypedef mediump_bvec3\t\tbvec3;\r\n\ttypedef mediump_bvec4\t\tbvec4;\r\n#else //defined(GLM_PRECISION_HIGHP_BOOL)\r\n\t//! 2 components vector of boolean.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_bvec2\t\t\tbvec2;\r\n\t\r\n\t//! 3 components vector of boolean.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_bvec3\t\t\tbvec3;\r\n\t\r\n\t//! 4 components vector of boolean.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.5 Vectors</a>\r\n\ttypedef highp_bvec4\t\t\tbvec4;\r\n#endif//GLM_PRECISION\r\n\t\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#endif//glm_core_type_vec\r\n"
  },
  {
    "path": "gpu/glm/detail/type_vec.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_vec.inl\r\n/// @date 2011-06-15 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n"
  },
  {
    "path": "gpu/glm/detail/type_vec1.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_vec1.hpp\r\n/// @date 2008-08-25 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_gentype1\r\n#define glm_core_type_gentype1\r\n\r\n#include \"../fwd.hpp\"\r\n#include \"type_vec.hpp\"\r\n#ifdef GLM_SWIZZLE\r\n#\tif GLM_HAS_ANONYMOUS_UNION\r\n#\t\tinclude \"_swizzle.hpp\"\r\n#\telse\r\n#\t\tinclude \"_swizzle_func.hpp\"\r\n#\tendif\r\n#endif //GLM_SWIZZLE\r\n#include <cstddef>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tvec1\r\n\t{\r\n\t\t//////////////////////////////////////\r\n\t\t// Implementation detail\r\n\r\n\t\tenum ctor{_null};\r\n\r\n\t\ttypedef tvec1<T, P> type;\r\n\t\ttypedef tvec1<bool, P> bool_type;\r\n\t\ttypedef T value_type;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Helper\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Data\r\n\r\n\t\tunion {T x, r, s;};\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Accesses\r\n\r\n\t\tGLM_FUNC_DECL T & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL T const & operator[](length_t i) const;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Implicit basic constructors\r\n\r\n\t\tGLM_FUNC_DECL tvec1();\r\n\t\tGLM_FUNC_DECL tvec1(tvec1<T, P> const & v);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tvec1(tvec1<T, Q> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Explicit basic constructors\r\n\r\n\t\tGLM_FUNC_DECL explicit tvec1(\r\n\t\t\tctor);\r\n\t\tGLM_FUNC_DECL tvec1(\r\n\t\t\tT const & s);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversion vector constructors\r\n\t\t\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec1(tvec1<U, Q> const & v);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec1(tvec2<U, Q> const & v);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec1(tvec3<U, Q> const & v);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec1(tvec4<U, Q> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Unary arithmetic operators\r\n\r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator= (tvec1<T, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator= (tvec1<U, P> const & v);\r\n\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator+=(U const & s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator+=(tvec1<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator-=(U const & s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator-=(tvec1<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator*=(U const & s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator*=(tvec1<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator/=(U const & s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator/=(tvec1<U, P> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator++();\r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator--();\r\n\t\tGLM_FUNC_DECL tvec1<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tvec1<T, P> operator--(int);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Unary bit operators\r\n\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator%=(U const & s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator%=(tvec1<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator&=(U const & s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator&=(tvec1<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator|=(U const & s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator|=(tvec1<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator^=(U const & s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator^=(tvec1<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator<<=(U const & s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator<<=(tvec1<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator>>=(U const & s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec1<T, P> & operator>>=(tvec1<U, P> const & v);\r\n\t};\r\n\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator+(tvec1<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator+(T const & s, tvec1<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator+(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator-(tvec1<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator-(T const & s, tvec1<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator-\t(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator*(tvec1<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator*(T const & s, tvec1<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator*(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator/(tvec1<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator/(T const & s, tvec1<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator/(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator-(tvec1<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL bool operator==(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL bool operator!=(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator%(tvec1<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator%(T const & s, tvec1<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator%(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator&(tvec1<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator&(T const & s, tvec1<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator&(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator|(tvec1<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator|(T const & s, tvec1<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator|(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator^(tvec1<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator^(T const & s, tvec1<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator^(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator<<(tvec1<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator<<(T const & s, tvec1<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator<<(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator>>(tvec1<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator>>(T const & s, tvec1<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec1<T, P> operator>>(tvec1<T, P> const & v1, tvec1<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_DECL tvec1<T, P> operator~(tvec1<T, P> const & v);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_vec1.inl\"\r\n#endif//GLM_EXTERNAL_TEMPLATE\r\n\r\n#endif//glm_core_type_gentype1\r\n"
  },
  {
    "path": "gpu/glm/detail/type_vec1.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_vec1.inl\r\n/// @date 2008-08-25 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tvec1<T, P>::length() const\r\n\t{\r\n\t\treturn 1;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T & tvec1<T, P>::operator[](length_t i)\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&x)[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const & tvec1<T, P>::operator[](length_t i) const\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&x)[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Implicit basic constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P>::tvec1() :\r\n\t\tx(static_cast<T>(0))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(tvec1<T, P> const & v) :\r\n\t\tx(v.x)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(tvec1<T, Q> const & v) :\r\n\t\tx(v.x)\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Explicit basic constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(ctor)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P>::tvec1(T const & s) :\r\n\t\tx(s)\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion vector constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P>::tvec1\r\n\t(\r\n\t\ttvec1<U, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(v.x))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P>::tvec1\r\n\t(\r\n\t\ttvec2<U, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(v.x))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P>::tvec1\r\n\t(\r\n\t\ttvec3<U, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(v.x))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P>::tvec1\r\n\t(\r\n\t\ttvec4<U, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(v.x))\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Unary arithmetic operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator=\r\n\t(\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x = v.x;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator=\r\n\t(\r\n\t\ttvec1<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x = static_cast<T>(v.x);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator+=\r\n\t(\r\n\t\tU const & s\r\n\t)\r\n\t{\r\n\t\tthis->x += static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator+=\r\n\t(\r\n\t\ttvec1<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x += static_cast<T>(v.x);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator-=\r\n\t(\r\n\t\tU const & s\r\n\t)\r\n\t{\r\n\t\tthis->x -= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator-=\r\n\t(\r\n\t\ttvec1<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x -= static_cast<T>(v.x);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator*=\r\n\t(\r\n\t\tU const & s\r\n\t)\r\n\t{\r\n\t\tthis->x *= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator*=\r\n\t(\t\r\n\t\ttvec1<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x *= static_cast<T>(v.x);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator/=\r\n\t(\r\n\t\tU const & s\r\n\t)\r\n\t{\r\n\t\tthis->x /= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator/=\r\n\t(\r\n\t\ttvec1<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x /= static_cast<T>(v.x);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Increment and decrement operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator++()\r\n\t{\r\n\t\t++this->x;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator--()\r\n\t{\r\n\t\t--this->x;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> tvec1<T, P>::operator++(int)\r\n\t{\r\n\t\ttvec1<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> tvec1<T, P>::operator--(int)\r\n\t{\r\n\t\ttvec1<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn (v1.x == v2.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn (v1.x != v2.x);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Unary bit operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator%=\r\n\t(\r\n\t\tU const & s\r\n\t)\r\n\t{\r\n\t\tthis->x %= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator%=\r\n\t(\r\n\t\ttvec1<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x %= static_cast<T>(v.x);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator&=\r\n\t(\r\n\t\tU const & s\r\n\t)\r\n\t{\r\n\t\tthis->x &= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator&=\r\n\t(\r\n\t\ttvec1<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x &= static_cast<T>(v.x);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator|=\r\n\t(\r\n\t\tU const & s\r\n\t)\r\n\t{\r\n\t\tthis->x |= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator|=\r\n\t(\r\n\t\ttvec1<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x |= U(v.x);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator^=\r\n\t(\r\n\t\tU const & s\r\n\t)\r\n\t{\r\n\t\tthis->x ^= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator^=\r\n\t(\r\n\t\ttvec1<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x ^= static_cast<T>(v.x);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator<<=\r\n\t(\r\n\t\tU const & s\r\n\t)\r\n\t{\r\n\t\tthis->x <<= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator<<=\r\n\t(\r\n\t\ttvec1<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x <<= static_cast<T>(v.x);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator>>=\r\n\t(\r\n\t\tU const & s\r\n\t)\r\n\t{\r\n\t\tthis->x >>= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> & tvec1<T, P>::operator>>=\r\n\t(\r\n\t\ttvec1<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x >>= static_cast<T>(v.x);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Binary arithmetic operators\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator+\r\n\t(\r\n\t\ttvec1<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator+ \r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\ts + v.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator+\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv1.x + v2.x);\r\n\t}\r\n\r\n\t//operator-\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator-\r\n\t(\r\n\t\ttvec1<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator-\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\ts - v.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator-\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv1.x - v2.x);\r\n\t}\r\n\r\n\t//operator*\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator*\r\n\t(\r\n\t\ttvec1<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator*\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\ts * v.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator*\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv1.x * v2.x);\r\n\t}\r\n\r\n\t//operator/\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator/\r\n\t(\r\n\t\ttvec1<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator/\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\ts / v.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator/\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv1.x / v2.x);\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator-\r\n\t(\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\t-v.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator++\r\n\t(\r\n\t\ttvec1<T, P> const & v,\r\n\t\tint\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x + T(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator--\r\n\t(\r\n\t\ttvec1<T, P> const & v,\r\n\t\tint\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x - T(1));\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Binary bit operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator%\r\n\t(\r\n\t\ttvec1<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x % s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator%\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\ts % v.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator%\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv1.x % v2.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator&\r\n\t(\r\n\t\ttvec1<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x & s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator&\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\ts & v.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator&\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv1.x & v2.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator|\r\n\t(\r\n\t\ttvec1<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x | s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator|\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\ts | v.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator|\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv1.x | v2.x);\r\n\t}\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator^\r\n\t(\r\n\t\ttvec1<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x ^ s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator^\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\ts ^ v.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator^\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv1.x ^ v2.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator<<\r\n\t(\r\n\t\ttvec1<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x << s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator<<\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\ts << v.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator<<\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv1.x << v2.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator>>\r\n\t(\r\n\t\ttvec1<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv.x >> s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator>>\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\ts >> v.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator>>\r\n\t(\r\n\t\ttvec1<T, P> const & v1,\r\n\t\ttvec1<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\tv1.x >> v2.x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec1<T, P> operator~\r\n\t(\r\n\t\ttvec1<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec1<T, P>(\r\n\t\t\t~v.x);\r\n\t}\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/detail/type_vec2.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_vec2.hpp\r\n/// @date 2008-08-18 / 2013-08-27\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_gentype2\r\n#define glm_core_type_gentype2\r\n\r\n//#include \"../fwd.hpp\"\r\n#include \"type_vec.hpp\"\r\n#ifdef GLM_SWIZZLE\r\n#\tif GLM_HAS_ANONYMOUS_UNION\r\n#\t\tinclude \"_swizzle.hpp\"\r\n#\telse\r\n#\t\tinclude \"_swizzle_func.hpp\"\r\n#\tendif\r\n#endif //GLM_SWIZZLE\r\n#include <cstddef>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tvec2\r\n\t{\r\n\t\t//////////////////////////////////////\r\n\t\t// Implementation detail\r\n\r\n\t\tenum ctor{_null};\r\n\r\n\t\ttypedef tvec2<T, P> type;\r\n\t\ttypedef tvec2<bool, P> bool_type;\r\n\t\ttypedef T value_type;\r\n\t\ttypedef int size_type;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Helper\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Data\r\n\r\n#\t\tif(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))\r\n\t\t\tunion\r\n\t\t\t{\r\n\t\t\t\tstruct{ T x, y; };\r\n\t\t\t\tstruct{ T r, g; };\r\n\t\t\t\tstruct{ T s, t; };\r\n\r\n\t\t\t\t_GLM_SWIZZLE2_2_MEMBERS(T, P, tvec2, x, y)\r\n\t\t\t\t_GLM_SWIZZLE2_2_MEMBERS(T, P, tvec2, r, g)\r\n\t\t\t\t_GLM_SWIZZLE2_2_MEMBERS(T, P, tvec2, s, t)\r\n\t\t\t\t_GLM_SWIZZLE2_3_MEMBERS(T, P, tvec3, x, y)\r\n\t\t\t\t_GLM_SWIZZLE2_3_MEMBERS(T, P, tvec3, r, g)\r\n\t\t\t\t_GLM_SWIZZLE2_3_MEMBERS(T, P, tvec3, s, t)\r\n\t\t\t\t_GLM_SWIZZLE2_4_MEMBERS(T, P, tvec4, x, y)\r\n\t\t\t\t_GLM_SWIZZLE2_4_MEMBERS(T, P, tvec4, r, g)\r\n\t\t\t\t_GLM_SWIZZLE2_4_MEMBERS(T, P, tvec4, s, t)\r\n\t\t\t};\r\n#\t\telse\r\n\t\t\tunion {T x, r, s;};\r\n\t\t\tunion {T y, g, t;};\r\n\r\n#\t\t\tifdef GLM_SWIZZLE\r\n\t\t\t\tGLM_SWIZZLE_GEN_VEC_FROM_VEC2(T, P, detail::tvec2, detail::tvec2, detail::tvec3, detail::tvec4)\r\n#\t\t\tendif \r\n#\t\tendif\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Accesses\r\n\r\n\t\tGLM_FUNC_DECL T & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL T const & operator[](length_t i) const;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Implicit basic constructors\r\n\r\n\t\tGLM_FUNC_DECL tvec2();\r\n\t\tGLM_FUNC_DECL tvec2(tvec2<T, P> const & v);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tvec2(tvec2<T, Q> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Explicit basic constructors\r\n\r\n\t\tGLM_FUNC_DECL explicit tvec2(\r\n\t\t\tctor);\r\n\t\tGLM_FUNC_DECL explicit tvec2(\r\n\t\t\tT const & s);\r\n\t\tGLM_FUNC_DECL tvec2(\r\n\t\t\tT const & s1,\r\n\t\t\tT const & s2);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Swizzle constructors\r\n\r\n#\t\tif(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))\r\n\t\ttemplate <int E0, int E1>\r\n\t\tGLM_FUNC_DECL tvec2(_swizzle<2,T, P, tvec2<T, P>, E0, E1,-1,-2> const & that)\r\n\t\t{\r\n\t\t\t*this = that();\r\n\t\t}\r\n#\t\tendif//(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversion constructors\r\n\r\n\t\t//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, typename V>\r\n\t\tGLM_FUNC_DECL tvec2(\r\n\t\t\tU const & x,\r\n\t\t\tV const & y);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversion vector constructors\r\n\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL tvec2(tvec2<U, Q> const & v);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec2(tvec3<U, Q> const & v);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec2(tvec4<U, Q> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Unary arithmetic operators\r\n\r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator= (tvec2<T, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator= (tvec2<U, P> const & v);\r\n\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator+=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator+=(tvec2<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator-=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator-=(tvec2<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator*=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator*=(tvec2<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator/=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator/=(tvec2<U, P> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator++();\r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator--();\r\n\t\tGLM_FUNC_DECL tvec2<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tvec2<T, P> operator--(int);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Unary bit operators\r\n\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator%= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator%= (tvec2<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator&= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator&= (tvec2<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator|= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator|= (tvec2<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator^= (U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator^= (tvec2<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator<<=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator<<=(tvec2<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator>>=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec2<T, P> & operator>>=(tvec2<U, P> const & v);\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator+(tvec2<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator+(T const & s, tvec2<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator+(tvec2<T, P> const & v1, tvec2<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator-(tvec2<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator-(T const & s, tvec2<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator-\t(tvec2<T, P> const & v1, tvec2<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator*(tvec2<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator*(T const & s, tvec2<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator*(tvec2<T, P> const & v1, tvec2<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator/(tvec2<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator/(T const & s, tvec2<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator/(tvec2<T, P> const & v1, tvec2<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator-(tvec2<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator%(tvec2<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator%(T const & s, tvec2<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator%(tvec2<T, P> const & v1, tvec2<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator&(tvec2<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator&(T const & s, tvec2<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator&(tvec2<T, P> const & v1, tvec2<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator|(tvec2<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator|(T const & s, tvec2<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator|(tvec2<T, P> const & v1, tvec2<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator^(tvec2<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator^(T const & s, tvec2<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator^(tvec2<T, P> const & v1, tvec2<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator<<(tvec2<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator<<(T const & s, tvec2<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator<<(tvec2<T, P> const & v1, tvec2<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator>>(tvec2<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator>>(T const & s, tvec2<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator>>(tvec2<T, P> const & v1, tvec2<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec2<T, P> operator~(tvec2<T, P> const & v);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_vec2.inl\"\r\n#endif//GLM_EXTERNAL_TEMPLATE\r\n\r\n#endif//glm_core_type_gentype2\r\n"
  },
  {
    "path": "gpu/glm/detail/type_vec2.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_tvec2.inl\r\n/// @date 2008-08-18 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tvec2<T, P>::length() const\r\n\t{\r\n\t\treturn 2;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T & tvec2<T, P>::operator[](length_t i)\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&x)[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const & tvec2<T, P>::operator[](length_t i) const\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&x)[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Implicit basic constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P>::tvec2() :\r\n\t\tx(0),\r\n\t\ty(0)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(tvec2<T, P> const & v) :\r\n\t\tx(v.x),\r\n\t\ty(v.y)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(tvec2<T, Q> const & v) :\r\n\t\tx(v.x),\r\n\t\ty(v.y)\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Explicit basic constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(ctor)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P>::tvec2(T const & s) :\r\n\t\tx(s),\r\n\t\ty(s)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P>::tvec2\r\n\t(\r\n\t\tT const & s1,\r\n\t\tT const & s2\r\n\t) :\r\n\t\tx(s1),\r\n\t\ty(s2)\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion scalar constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, typename V>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P>::tvec2\r\n\t(\r\n\t\tU const & a,\r\n\t\tV const & b\r\n\t) :\r\n\t\tx(static_cast<T>(a)),\r\n\t\ty(static_cast<T>(b))\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion vector constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P>::tvec2\r\n\t(\r\n\t\ttvec2<U, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(v.x)),\r\n\t\ty(static_cast<T>(v.y))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P>::tvec2\r\n\t(\r\n\t\ttvec3<U, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(v.x)),\r\n\t\ty(static_cast<T>(v.y))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P>::tvec2\r\n\t(\r\n\t\ttvec4<U, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(v.x)),\r\n\t\ty(static_cast<T>(v.y))\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Unary arithmetic operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator=\r\n\t(\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x = v.x;\r\n\t\tthis->y = v.y;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator=\r\n\t(\r\n\t\ttvec2<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x = static_cast<T>(v.x);\r\n\t\tthis->y = static_cast<T>(v.y);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator+=\r\n\t(\r\n\t\tU s\r\n\t)\r\n\t{\r\n\t\tthis->x += static_cast<T>(s);\r\n\t\tthis->y += static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator+=\r\n\t(\r\n\t\ttvec2<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x += static_cast<T>(v.x);\r\n\t\tthis->y += static_cast<T>(v.y);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator-=\r\n\t(\r\n\t\tU s\r\n\t)\r\n\t{\r\n\t\tthis->x -= static_cast<T>(s);\r\n\t\tthis->y -= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator-=\r\n\t(\r\n\t\ttvec2<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x -= static_cast<T>(v.x);\r\n\t\tthis->y -= static_cast<T>(v.y);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator*=\r\n\t(\r\n\t\tU s\r\n\t)\r\n\t{\r\n\t\tthis->x *= static_cast<T>(s);\r\n\t\tthis->y *= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator*=\r\n\t(\r\n\t\ttvec2<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x *= static_cast<T>(v.x);\r\n\t\tthis->y *= static_cast<T>(v.y);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator/=\r\n\t(\r\n\t\tU s\r\n\t)\r\n\t{\r\n\t\tthis->x /= static_cast<T>(s);\r\n\t\tthis->y /= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator/=\r\n\t(\r\n\t\ttvec2<U, P> const & v\r\n\t)\r\n\t{\r\n\t\tthis->x /= static_cast<T>(v.x);\r\n\t\tthis->y /= static_cast<T>(v.y);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Increment and decrement operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator++()\r\n\t{\r\n\t\t++this->x;\r\n\t\t++this->y;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator--()\r\n\t{\r\n\t\t--this->x;\r\n\t\t--this->y;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> tvec2<T, P>::operator++(int)\r\n\t{\r\n\t\ttvec2<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> tvec2<T, P>::operator--(int)\r\n\t{\r\n\t\ttvec2<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn (v1.x == v2.x) && (v1.y == v2.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn (v1.x != v2.x) || (v1.y != v2.y);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Unary bit operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator%= (U s)\r\n\t{\r\n\t\tthis->x %= static_cast<T>(s);\r\n\t\tthis->y %= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator%= (tvec2<U, P> const & v)\r\n\t{\r\n\t\tthis->x %= static_cast<T>(v.x);\r\n\t\tthis->y %= static_cast<T>(v.y);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator&= (U s)\r\n\t{\r\n\t\tthis->x &= static_cast<T>(s);\r\n\t\tthis->y &= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator&= (tvec2<U, P> const & v)\r\n\t{\r\n\t\tthis->x &= static_cast<T>(v.x);\r\n\t\tthis->y &= static_cast<T>(v.y);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator|= (U s)\r\n\t{\r\n\t\tthis->x |= static_cast<T>(s);\r\n\t\tthis->y |= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator|= (tvec2<U, P> const & v)\r\n\t{\r\n\t\tthis->x |= static_cast<T>(v.x);\r\n\t\tthis->y |= static_cast<T>(v.y);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator^= (U s)\r\n\t{\r\n\t\tthis->x ^= static_cast<T>(s);\r\n\t\tthis->y ^= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator^= (tvec2<U, P> const & v)\r\n\t{\r\n\t\tthis->x ^= static_cast<T>(v.x);\r\n\t\tthis->y ^= static_cast<T>(v.y);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator<<= (U s)\r\n\t{\r\n\t\tthis->x <<= static_cast<T>(s);\r\n\t\tthis->y <<= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator<<= (tvec2<U, P> const & v)\r\n\t{\r\n\t\tthis->x <<= static_cast<T>(v.x);\r\n\t\tthis->y <<= static_cast<T>(v.y);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator>>= (U s)\r\n\t{\r\n\t\tthis->x >>= static_cast<T>(s);\r\n\t\tthis->y >>= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> & tvec2<T, P>::operator>>= (tvec2<U, P> const & v)\r\n\t{\r\n\t\tthis->x >>= static_cast<T>(v.x);\r\n\t\tthis->y >>= static_cast<T>(v.y);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Binary arithmetic operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator+\r\n\t(\r\n\t\ttvec2<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv.x + s,\r\n\t\t\tv.y + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator+\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\ts + v.x,\r\n\t\t\ts + v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator+\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv1.x + v2.x,\r\n\t\t\tv1.y + v2.y);\r\n\t}\r\n\r\n\t//operator-\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator-\r\n\t(\r\n\t\ttvec2<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv.x - s,\r\n\t\t\tv.y - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator- \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\ts - v.x,\r\n\t\t\ts - v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator-\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv1.x - v2.x,\r\n\t\t\tv1.y - v2.y);\r\n\t}\r\n\r\n\t//operator*\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator*\r\n\t(\r\n\t\ttvec2<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv.x * s,\r\n\t\t\tv.y * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator*\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\ts * v.x,\r\n\t\t\ts * v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator*\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv1.x * v2.x,\r\n\t\t\tv1.y * v2.y);\r\n\t}\r\n\r\n\t//operator/\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator/\r\n\t(\r\n\t\ttvec2<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv.x / s,\r\n\t\t\tv.y / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator/\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\ts / v.x,\r\n\t\t\ts / v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator/\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv1.x / v2.x,\r\n\t\t\tv1.y / v2.y);\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator-\r\n\t(\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\t-v.x, \r\n\t\t\t-v.y);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Binary bit operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator%\r\n\t(\r\n\t\ttvec2<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv.x % s,\r\n\t\t\tv.y % s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator%\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\ts % v.x,\r\n\t\t\ts % v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator%\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv1.x % v2.x,\r\n\t\t\tv1.y % v2.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator&\r\n\t(\r\n\t\ttvec2<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv.x & s,\r\n\t\t\tv.y & s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator&\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\ts & v.x,\r\n\t\t\ts & v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator&\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv1.x & v2.x,\r\n\t\t\tv1.y & v2.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator|\r\n\t(\r\n\t\ttvec2<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv.x | s,\r\n\t\t\tv.y | s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator|\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\ts | v.x,\r\n\t\t\ts | v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator|\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv1.x | v2.x,\r\n\t\t\tv1.y | v2.y);\r\n\t}\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator^\r\n\t(\r\n\t\ttvec2<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv.x ^ s,\r\n\t\t\tv.y ^ s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator^\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\ts ^ v.x,\r\n\t\t\ts ^ v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator^\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv1.x ^ v2.x,\r\n\t\t\tv1.y ^ v2.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator<<\r\n\t(\r\n\t\ttvec2<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv.x << s,\r\n\t\t\tv.y << s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator<<\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\ts << v.x,\r\n\t\t\ts << v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator<<\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv1.x << v2.x,\r\n\t\t\tv1.y << v2.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator>>\r\n\t(\r\n\t\ttvec2<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv.x >> s,\r\n\t\t\tv.y >> s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator>>\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\ts >> v.x,\r\n\t\t\ts >> v.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator>>\r\n\t(\r\n\t\ttvec2<T, P> const & v1,\r\n\t\ttvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\tv1.x >> v2.x,\r\n\t\t\tv1.y >> v2.y);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec2<T, P> operator~\r\n\t(\r\n\t\ttvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec2<T, P>(\r\n\t\t\t~v.x,\r\n\t\t\t~v.y);\r\n\t}\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/detail/type_vec3.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_vec3.hpp\r\n/// @date 2008-08-22 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_gentype3\r\n#define glm_core_type_gentype3\r\n\r\n//#include \"../fwd.hpp\"\r\n#include \"type_vec.hpp\"\r\n#ifdef GLM_SWIZZLE\r\n#\tif GLM_HAS_ANONYMOUS_UNION\r\n#\t\tinclude \"_swizzle.hpp\"\r\n#\telse\r\n#\t\tinclude \"_swizzle_func.hpp\"\r\n#\tendif\r\n#endif //GLM_SWIZZLE\r\n#include <cstddef>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tvec3\r\n\t{\t\r\n\t\t//////////////////////////////////////\r\n\t\t// Implementation detail\r\n\r\n\t\tenum ctor{_null};\r\n\r\n\t\ttypedef tvec3<T, P> type;\r\n\t\ttypedef tvec3<bool, P> bool_type;\r\n\t\ttypedef T value_type;\r\n\t\ttypedef int size_type;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Helper\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Data\r\n\r\n#\t\tif(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))\r\n\t\t\tunion\r\n\t\t\t{\r\n\t\t\t\tstruct{ T x, y, z; };\r\n\t\t\t\tstruct{ T r, g, b; };\r\n\t\t\t\tstruct{ T s, t, p; };\r\n\r\n\t\t\t\t_GLM_SWIZZLE3_2_MEMBERS(T, P, tvec2, x, y, z)\r\n\t\t\t\t_GLM_SWIZZLE3_2_MEMBERS(T, P, tvec2, r, g, b)\r\n\t\t\t\t_GLM_SWIZZLE3_2_MEMBERS(T, P, tvec2, s, t, p)\r\n\t\t\t\t_GLM_SWIZZLE3_3_MEMBERS(T, P, tvec3, x, y, z)\r\n\t\t\t\t_GLM_SWIZZLE3_3_MEMBERS(T, P, tvec3, r, g, b)\r\n\t\t\t\t_GLM_SWIZZLE3_3_MEMBERS(T, P, tvec3, s, t, p)\r\n\t\t\t\t_GLM_SWIZZLE3_4_MEMBERS(T, P, tvec4, x, y, z)\r\n\t\t\t\t_GLM_SWIZZLE3_4_MEMBERS(T, P, tvec4, r, g, b)\r\n\t\t\t\t_GLM_SWIZZLE3_4_MEMBERS(T, P, tvec4, s, t, p)\r\n\t\t\t};\r\n#\t\telse\r\n\t\t\tunion { T x, r, s; };\r\n\t\t\tunion { T y, g, t; };\r\n\t\t\tunion { T z, b, p; };\r\n\r\n#\t\t\tifdef GLM_SWIZZLE\r\n\t\t\t\tGLM_SWIZZLE_GEN_VEC_FROM_VEC3(T, P, detail::tvec3, detail::tvec2, detail::tvec3, detail::tvec4)\r\n#\t\t\tendif\r\n#\t\tendif//GLM_LANG\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Accesses\r\n\r\n\t\tGLM_FUNC_DECL T & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL T const & operator[](length_t i) const;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Implicit basic constructors\r\n\r\n\t\tGLM_FUNC_DECL tvec3();\r\n\t\tGLM_FUNC_DECL tvec3(tvec3<T, P> const & v);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tvec3(tvec3<T, Q> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Explicit basic constructors\r\n\r\n\t\tGLM_FUNC_DECL explicit tvec3(\r\n\t\t\tctor);\r\n\t\tGLM_FUNC_DECL explicit tvec3(\r\n\t\t\tT const & s);\r\n\t\tGLM_FUNC_DECL tvec3(\r\n\t\t\tT const & s1,\r\n\t\t\tT const & s2,\r\n\t\t\tT const & s3);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversion scalar constructors\r\n\r\n\t\t//! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, typename V, typename W>\r\n\t\tGLM_FUNC_DECL tvec3(\r\n\t\t\tU const & x,\r\n\t\t\tV const & y,\r\n\t\t\tW const & z);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversion vector constructors\r\n\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename A, typename B, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec3(tvec2<A, Q> const & v, B const & s);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename A, typename B, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec3(A const & s, tvec2<B, Q> const & v);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec3(tvec3<U, Q> const & v);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec3(tvec4<U, Q> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Swizzle constructors\r\n\r\n#\t\tif(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))\r\n\t\ttemplate <int E0, int E1, int E2>\r\n\t\tGLM_FUNC_DECL tvec3(_swizzle<3, T, P, tvec3<T, P>, E0, E1, E2, -1> const & that)\r\n\t\t{\r\n\t\t\t*this = that();\r\n\t\t}\r\n\r\n\t\ttemplate <int E0, int E1>\r\n\t\tGLM_FUNC_DECL tvec3(_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, T const & s)\r\n\t\t{\r\n\t\t\t*this = tvec3<T, P>(v(), s);\r\n\t\t}\r\n\r\n\t\ttemplate <int E0, int E1>\r\n\t\tGLM_FUNC_DECL tvec3(T const & s, _swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v)\r\n\t\t{\r\n\t\t\t*this = tvec3<T, P>(s, v());\r\n\t\t}\r\n#\t\tendif//(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Unary arithmetic operators\r\n\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator= (tvec3<T, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator= (tvec3<U, P> const & v);\r\n\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator+=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator+=(tvec3<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator-=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator-=(tvec3<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator*=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator*=(tvec3<U, P> const & v);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator/=(U s);\r\n\t\ttemplate <typename U> \r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator/=(tvec3<U, P> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator++();\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator--();\r\n\t\tGLM_FUNC_DECL tvec3<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tvec3<T, P> operator--(int);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Unary bit operators\r\n\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator%= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator%= (tvec3<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator&= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator&= (tvec3<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator|= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator|= (tvec3<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator^= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator^= (tvec3<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator<<=(U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator<<=(tvec3<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator>>=(U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec3<T, P> & operator>>=(tvec3<U, P> const & v);\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator+(tvec3<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator+(T const & s, tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator+(tvec3<T, P> const & v1, tvec3<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator-(tvec3<T, P> const & v, \tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator-(T const & s, tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator-\t(tvec3<T, P> const & v1, tvec3<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator*(T const & s, tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator*(tvec3<T, P> const & v1, tvec3<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator/(tvec3<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator/(T const & s, tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator/(tvec3<T, P> const & v1, tvec3<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator-(tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator%(tvec3<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator%(T const & s, tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator%(tvec3<T, P> const & v1, tvec3<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator&(tvec3<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator&(T const & s, tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator&(tvec3<T, P> const & v1, tvec3<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator|(tvec3<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator|(T const & s, tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator|(tvec3<T, P> const & v1, tvec3<T, P> const & v2);\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator^(tvec3<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator^(T const & s, tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator^(tvec3<T, P> const & v1, tvec3<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator<<(tvec3<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator<<(T const & s, tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator<<(tvec3<T, P> const & v1, tvec3<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator>>(tvec3<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator>>(T const & s, tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec3<T, P> operator>>(tvec3<T, P> const & v1, tvec3<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_DECL tvec3<T, P> operator~(tvec3<T, P> const & v);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_vec3.inl\"\r\n#endif//GLM_EXTERNAL_TEMPLATE\r\n\r\n#endif//glm_core_type_gentype3\r\n"
  },
  {
    "path": "gpu/glm/detail/type_vec3.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_tvec3.inl\r\n/// @date 2008-08-22 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tvec3<T, P>::length() const\r\n\t{\r\n\t\treturn 3;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T & tvec3<T, P>::operator[](length_t i)\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&x)[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const & tvec3<T, P>::operator[](length_t i) const\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&x)[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Implicit basic constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>::tvec3() :\r\n\t\tx(0),\r\n\t\ty(0),\r\n\t\tz(0)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec3<T, P> const & v) :\r\n\t\tx(v.x),\r\n\t\ty(v.y),\r\n\t\tz(v.z)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(tvec3<T, Q> const & v) :\r\n\t\tx(v.x),\r\n\t\ty(v.y),\r\n\t\tz(v.z)\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Explicit basic constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(ctor)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>::tvec3(T const & s) :\r\n\t\tx(s),\r\n\t\ty(s),\r\n\t\tz(s)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>::tvec3\r\n\t(\r\n\t\tT const & s0,\r\n\t\tT const & s1,\r\n\t\tT const & s2\r\n\t) :\r\n\t\tx(s0),\r\n\t\ty(s1),\r\n\t\tz(s2)\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion scalar constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename A, typename B, typename C>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>::tvec3\r\n\t(\r\n\t\tA const & x,\r\n\t\tB const & y,\r\n\t\tC const & z\r\n\t) :\r\n\t\tx(static_cast<T>(x)),\r\n\t\ty(static_cast<T>(y)),\r\n\t\tz(static_cast<T>(z))\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion vector constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename A, typename B, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>::tvec3\r\n\t(\r\n\t\ttvec2<A, Q> const & v,\r\n\t\tB const & s\r\n\t) :\r\n\t\tx(static_cast<T>(v.x)),\r\n\t\ty(static_cast<T>(v.y)),\r\n\t\tz(static_cast<T>(s))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename A, typename B, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>::tvec3\r\n\t(\t\r\n\t\tA const & s,\r\n\t\ttvec2<B, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(s)),\r\n\t\ty(static_cast<T>(v.x)),\r\n\t\tz(static_cast<T>(v.y))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>::tvec3\r\n\t(\r\n\t\ttvec3<U, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(v.x)),\r\n\t\ty(static_cast<T>(v.y)),\r\n\t\tz(static_cast<T>(v.z))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>::tvec3\r\n\t(\r\n\t\ttvec4<U, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(v.x)),\r\n\t\ty(static_cast<T>(v.y)),\r\n\t\tz(static_cast<T>(v.z))\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Unary arithmetic operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>& tvec3<T, P>::operator= (tvec3<T, P> const & v)\r\n\t{\r\n\t\tthis->x = v.x;\r\n\t\tthis->y = v.y;\r\n\t\tthis->z = v.z;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P>& tvec3<T, P>::operator= (tvec3<U, P> const & v)\r\n\t{\r\n\t\tthis->x = static_cast<T>(v.x);\r\n\t\tthis->y = static_cast<T>(v.y);\r\n\t\tthis->z = static_cast<T>(v.z);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator+= (U s)\r\n\t{\r\n\t\tthis->x += static_cast<T>(s);\r\n\t\tthis->y += static_cast<T>(s);\r\n\t\tthis->z += static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator+= (tvec3<U, P> const & v)\r\n\t{\r\n\t\tthis->x += static_cast<T>(v.x);\r\n\t\tthis->y += static_cast<T>(v.y);\r\n\t\tthis->z += static_cast<T>(v.z);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator-= (U s)\r\n\t{\r\n\t\tthis->x -= static_cast<T>(s);\r\n\t\tthis->y -= static_cast<T>(s);\r\n\t\tthis->z -= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator-= (tvec3<U, P> const & v)\r\n\t{\r\n\t\tthis->x -= static_cast<T>(v.x);\r\n\t\tthis->y -= static_cast<T>(v.y);\r\n\t\tthis->z -= static_cast<T>(v.z);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator*= (U s)\r\n\t{\r\n\t\tthis->x *= static_cast<T>(s);\r\n\t\tthis->y *= static_cast<T>(s);\r\n\t\tthis->z *= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator*= (tvec3<U, P> const & v)\r\n\t{\r\n\t\tthis->x *= static_cast<T>(v.x);\r\n\t\tthis->y *= static_cast<T>(v.y);\r\n\t\tthis->z *= static_cast<T>(v.z);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator/= (U s)\r\n\t{\r\n\t\tthis->x /= static_cast<T>(s);\r\n\t\tthis->y /= static_cast<T>(s);\r\n\t\tthis->z /= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator/= (tvec3<U, P> const & v)\r\n\t{\r\n\t\tthis->x /= static_cast<T>(v.x);\r\n\t\tthis->y /= static_cast<T>(v.y);\r\n\t\tthis->z /= static_cast<T>(v.z);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Increment and decrement operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator++()\r\n\t{\r\n\t\t++this->x;\r\n\t\t++this->y;\r\n\t\t++this->z;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator--()\r\n\t{\r\n\t\t--this->x;\r\n\t\t--this->y;\r\n\t\t--this->z;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> tvec3<T, P>::operator++(int)\r\n\t{\r\n\t\ttvec3<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> tvec3<T, P>::operator--(int)\r\n\t{\r\n\t\ttvec3<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttvec3<T, P> const & v1,\r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn (v1.x == v2.x) && (v1.y == v2.y) && (v1.z == v2.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttvec3<T, P> const & v1,\r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn (v1.x != v2.x) || (v1.y != v2.y) || (v1.z != v2.z);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Unary bit operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator%= (U s)\r\n\t{\r\n\t\tthis->x %= s;\r\n\t\tthis->y %= s;\r\n\t\tthis->z %= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator%= (tvec3<U, P> const & v)\r\n\t{\r\n\t\tthis->x %= v.x;\r\n\t\tthis->y %= v.y;\r\n\t\tthis->z %= v.z;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator&= (U s)\r\n\t{\r\n\t\tthis->x &= s;\r\n\t\tthis->y &= s;\r\n\t\tthis->z &= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator&= (tvec3<U, P> const & v)\r\n\t{\r\n\t\tthis->x &= v.x;\r\n\t\tthis->y &= v.y;\r\n\t\tthis->z &= v.z;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator|= (U s)\r\n\t{\r\n\t\tthis->x |= s;\r\n\t\tthis->y |= s;\r\n\t\tthis->z |= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator|= (tvec3<U, P> const & v)\r\n\t{\r\n\t\tthis->x |= v.x;\r\n\t\tthis->y |= v.y;\r\n\t\tthis->z |= v.z;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator^= (U s)\r\n\t{\r\n\t\tthis->x ^= s;\r\n\t\tthis->y ^= s;\r\n\t\tthis->z ^= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator^= (tvec3<U, P> const & v)\r\n\t{\r\n\t\tthis->x ^= v.x;\r\n\t\tthis->y ^= v.y;\r\n\t\tthis->z ^= v.z;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator<<= (U s)\r\n\t{\r\n\t\tthis->x <<= s;\r\n\t\tthis->y <<= s;\r\n\t\tthis->z <<= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator<<= (tvec3<U, P> const & v)\r\n\t{\r\n\t\tthis->x <<= static_cast<T>(v.x);\r\n\t\tthis->y <<= static_cast<T>(v.y);\r\n\t\tthis->z <<= static_cast<T>(v.z);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator>>= (U s)\r\n\t{\r\n\t\tthis->x >>= static_cast<T>(s);\r\n\t\tthis->y >>= static_cast<T>(s);\r\n\t\tthis->z >>= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> & tvec3<T, P>::operator>>= (tvec3<U, P> const & v)\r\n\t{\r\n\t\tthis->x >>= static_cast<T>(v.x);\r\n\t\tthis->y >>= static_cast<T>(v.y);\r\n\t\tthis->z >>= static_cast<T>(v.z);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Binary arithmetic operators\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator+\r\n\t(\r\n\t\ttvec3<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv.x + s,\r\n\t\t\tv.y + s,\r\n\t\t\tv.z + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator+ \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\ts + v.x,\r\n\t\t\ts + v.y,\r\n\t\t\ts + v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator+ \r\n\t(\r\n\t\ttvec3<T, P> const & v1, \r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv1.x + v2.x,\r\n\t\t\tv1.y + v2.y,\r\n\t\t\tv1.z + v2.z);\r\n\t}\r\n\r\n\t//operator-\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator- \r\n\t(\r\n\t\ttvec3<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv.x - s,\r\n\t\t\tv.y - s,\r\n\t\t\tv.z - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator- \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\ts - v.x,\r\n\t\t\ts - v.y,\r\n\t\t\ts - v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator- \r\n\t(\r\n\t\ttvec3<T, P> const & v1, \r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv1.x - v2.x,\r\n\t\t\tv1.y - v2.y,\r\n\t\t\tv1.z - v2.z);\r\n\t}\r\n\r\n\t//operator*\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator*\r\n\t(\r\n\t\ttvec3<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv.x * s,\r\n\t\t\tv.y * s,\r\n\t\t\tv.z * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator* \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\ts * v.x,\r\n\t\t\ts * v.y,\r\n\t\t\ts * v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator* \r\n\t(\r\n\t\ttvec3<T, P> const & v1, \r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv1.x * v2.x,\r\n\t\t\tv1.y * v2.y,\r\n\t\t\tv1.z * v2.z);\r\n\t}\r\n\r\n\t//operator/\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator/\r\n\t(\r\n\t\ttvec3<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv.x / s,\r\n\t\t\tv.y / s,\r\n\t\t\tv.z / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator/ \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\ts / v.x,\r\n\t\t\ts / v.y,\r\n\t\t\ts / v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator/ \r\n\t(\r\n\t\ttvec3<T, P> const & v1, \r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv1.x / v2.x,\r\n\t\t\tv1.y / v2.y,\r\n\t\t\tv1.z / v2.z);\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator- \r\n\t(\r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\t-v.x, \r\n\t\t\t-v.y, \r\n\t\t\t-v.z);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Binary bit operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator% \r\n\t(\r\n\t\ttvec3<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv.x % s,\r\n\t\t\tv.y % s,\r\n\t\t\tv.z % s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator%\r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\ts % v.x,\r\n\t\t\ts % v.y,\r\n\t\t\ts % v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator% \r\n\t(\r\n\t\ttvec3<T, P> const & v1, \r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv1.x % v2.x,\r\n\t\t\tv1.y % v2.y,\r\n\t\t\tv1.z % v2.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator& \r\n\t(\r\n\t\ttvec3<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv.x & s,\r\n\t\t\tv.y & s,\r\n\t\t\tv.z & s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator& \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\ts & v.x,\r\n\t\t\ts & v.y,\r\n\t\t\ts & v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator& \r\n\t(\r\n\t\ttvec3<T, P> const & v1, \r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv1.x & v2.x,\r\n\t\t\tv1.y & v2.y,\r\n\t\t\tv1.z & v2.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator| \r\n\t(\r\n\t\ttvec3<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv.x | s,\r\n\t\t\tv.y | s,\r\n\t\t\tv.z | s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator| \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\ts | v.x,\r\n\t\t\ts | v.y,\r\n\t\t\ts | v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator| \r\n\t(\r\n\t\ttvec3<T, P> const & v1, \r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv1.x | v2.x,\r\n\t\t\tv1.y | v2.y,\r\n\t\t\tv1.z | v2.z);\r\n\t}\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator^ \r\n\t(\r\n\t\ttvec3<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv.x ^ s,\r\n\t\t\tv.y ^ s,\r\n\t\t\tv.z ^ s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator^ \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tT(s) ^ v.x,\r\n\t\t\tT(s) ^ v.y,\r\n\t\t\tT(s) ^ v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator^ \r\n\t(\r\n\t\ttvec3<T, P> const & v1, \r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv1.x ^ T(v2.x),\r\n\t\t\tv1.y ^ T(v2.y),\r\n\t\t\tv1.z ^ T(v2.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator<< \r\n\t(\r\n\t\ttvec3<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv.x << T(s),\r\n\t\t\tv.y << T(s),\r\n\t\t\tv.z << T(s));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator<< \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tT(s) << v.x,\r\n\t\t\tT(s) << v.y,\r\n\t\t\tT(s) << v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator<< \r\n\t(\r\n\t\ttvec3<T, P> const & v1, \r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv1.x << T(v2.x),\r\n\t\t\tv1.y << T(v2.y),\r\n\t\t\tv1.z << T(v2.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator>> \r\n\t(\r\n\t\ttvec3<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv.x >> T(s),\r\n\t\t\tv.y >> T(s),\r\n\t\t\tv.z >> T(s));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator>> \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\ts >> T(v.x),\r\n\t\t\ts >> T(v.y),\r\n\t\t\ts >> T(v.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator>> \r\n\t(\r\n\t\ttvec3<T, P> const & v1, \r\n\t\ttvec3<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\tv1.x >> T(v2.x),\r\n\t\t\tv1.y >> T(v2.y),\r\n\t\t\tv1.z >> T(v2.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec3<T, P> operator~ \r\n\t(\r\n\t\ttvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec3<T, P>(\r\n\t\t\t~v.x,\r\n\t\t\t~v.y,\r\n\t\t\t~v.z);\r\n\t}\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/detail/type_vec4.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_vec4.hpp\r\n/// @date 2008-08-22 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_core_type_gentype4\r\n#define glm_core_type_gentype4\r\n\r\n//#include \"../fwd.hpp\"\r\n#include \"setup.hpp\"\r\n#include \"type_vec.hpp\"\r\n#ifdef GLM_SWIZZLE\r\n#\tif GLM_HAS_ANONYMOUS_UNION\r\n#\t\tinclude \"_swizzle.hpp\"\r\n#\telse\r\n#\t\tinclude \"_swizzle_func.hpp\"\r\n#\tendif\r\n#endif //GLM_SWIZZLE\r\n#include <cstddef>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tvec4\r\n\t{\r\n\t\t//////////////////////////////////////\r\n\t\t// Implementation detail\r\n\r\n\t\tenum ctor{_null};\r\n\r\n\t\ttypedef tvec4<T, P> type;\r\n\t\ttypedef tvec4<bool, P> bool_type;\r\n\t\ttypedef T value_type;\r\n\t\ttypedef int size_type;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Helper\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Data\r\n\r\n#\t\tif(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))\r\n\t\t\tunion\r\n\t\t\t{\r\n\t\t\t\tstruct { T r, g, b, a; };\r\n\t\t\t\tstruct { T s, t, p, q; };\r\n\t\t\t\tstruct { T x, y, z, w;};\r\n\r\n\t\t\t\t_GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, x, y, z, w)\r\n\t\t\t\t_GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, r, g, b, a)\r\n\t\t\t\t_GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, s, t, p, q)\r\n\t\t\t\t_GLM_SWIZZLE4_3_MEMBERS(T, P, tvec3, x, y, z, w)\r\n\t\t\t\t_GLM_SWIZZLE4_3_MEMBERS(T, P, tvec3, r, g, b, a)\r\n\t\t\t\t_GLM_SWIZZLE4_3_MEMBERS(T, P, tvec3, s, t, p, q)\r\n\t\t\t\t_GLM_SWIZZLE4_4_MEMBERS(T, P, tvec4, x, y, z, w)\r\n\t\t\t\t_GLM_SWIZZLE4_4_MEMBERS(T, P, tvec4, r, g, b, a)\r\n\t\t\t\t_GLM_SWIZZLE4_4_MEMBERS(T, P, tvec4, s, t, p, q)\r\n\t\t\t};\r\n#\t\telse\r\n\t\t\tunion { T x, r, s; };\r\n\t\t\tunion { T y, g, t; };\r\n\t\t\tunion { T z, b, p; };\r\n\t\t\tunion { T w, a, q; };\r\n\r\n#\t\t\tifdef GLM_SWIZZLE\r\n\t\t\t\tGLM_SWIZZLE_GEN_VEC_FROM_VEC4(T, P, detail::tvec4, detail::tvec2, detail::tvec3, detail::tvec4)\r\n#\t\t\tendif\r\n#\t\tendif//GLM_LANG\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Accesses\r\n\r\n\t\tGLM_FUNC_DECL T & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL T const & operator[](length_t i) const;\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Implicit basic constructors\r\n\r\n\t\tGLM_FUNC_DECL tvec4();\r\n\t\tGLM_FUNC_DECL tvec4(type const & v);\r\n\t\ttemplate <precision Q>\r\n\t\tGLM_FUNC_DECL tvec4(tvec4<T, Q> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Explicit basic constructors\r\n\r\n\t\tGLM_FUNC_DECL explicit tvec4(\r\n\t\t\tctor);\r\n\t\tGLM_FUNC_DECL explicit tvec4(\r\n\t\t\tT const & s);\r\n\t\tGLM_FUNC_DECL tvec4(\r\n\t\t\tT const & s0,\r\n\t\t\tT const & s1,\r\n\t\t\tT const & s2,\r\n\t\t\tT const & s3);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversion scalar constructors\r\n\r\n\t\t/// Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename A, typename B, typename C, typename D>\r\n\t\tGLM_FUNC_DECL tvec4(\r\n\t\t\tA const & x,\r\n\t\t\tB const & y,\r\n\t\t\tC const & z,\r\n\t\t\tD const & w);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Conversion vector constructors\r\n\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename A, typename B, typename C, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec4(tvec2<A, Q> const & v, B const & s1, C const & s2);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename A, typename B, typename C, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec4(A const & s1, tvec2<B, Q> const & v, C const & s2);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename A, typename B, typename C, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec4(A const & s1, B const & s2, tvec2<C, Q> const & v);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename A, typename B, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec4(tvec3<A, Q> const & v, B const & s);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename A, typename B, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec4(A const & s, tvec3<B, Q> const & v);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename A, typename B, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec4(tvec2<A, Q> const & v1, tvec2<B, Q> const & v2);\r\n\t\t//! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification)\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tvec4(tvec4<U, Q> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Swizzle constructors\r\n\r\n#\t\tif(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))\r\n\t\ttemplate <int E0, int E1, int E2, int E3>\r\n\t\tGLM_FUNC_DECL tvec4(_swizzle<4, T, P, tvec4<T, P>, E0, E1, E2, E3> const & that)\r\n\t\t{\r\n\t\t\t*this = that();\r\n\t\t}\r\n\r\n\t\ttemplate <int E0, int E1, int F0, int F1>\r\n\t\tGLM_FUNC_DECL tvec4(_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, _swizzle<2, T, P, tvec2<T, P>, F0, F1, -1, -2> const & u)\r\n\t\t{\r\n\t\t\t*this = tvec4<T, P>(v(), u());\r\n\t\t}\r\n\r\n\t\ttemplate <int E0, int E1>\r\n\t\tGLM_FUNC_DECL tvec4(T const & x, T const & y, _swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v)\r\n\t\t{\r\n\t\t\t*this = tvec4<T, P>(x, y, v());\r\n\t\t}\r\n\r\n\t\ttemplate <int E0, int E1>\r\n\t\tGLM_FUNC_DECL tvec4(T const & x, _swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, T const & w)\r\n\t\t{\r\n\t\t\t*this = tvec4<T, P>(x, v(), w);\r\n\t\t}\r\n\r\n\t\ttemplate <int E0, int E1>\r\n\t\tGLM_FUNC_DECL tvec4(_swizzle<2, T, P, tvec2<T, P>, E0, E1, -1, -2> const & v, T const & z, T const & w)\r\n\t\t{\r\n\t\t\t*this = tvec4<T, P>(v(), z, w);\r\n\t\t}\r\n\r\n\t\ttemplate <int E0, int E1, int E2>\r\n\t\tGLM_FUNC_DECL tvec4(_swizzle<3, T, P, tvec3<T, P>, E0, E1, E2, -1> const & v, T const & w)\r\n\t\t{\r\n\t\t\t*this = tvec4<T, P>(v(), w);\r\n\t\t}\r\n\r\n\t\ttemplate <int E0, int E1, int E2>\r\n\t\tGLM_FUNC_DECL tvec4(T const & x, _swizzle<3, T, P, tvec3<T, P>, E0, E1, E2, -1> const & v)\r\n\t\t{\r\n\t\t\t*this = tvec4<T, P>(x, v());\r\n\t\t}\r\n#\t\tendif//(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Unary arithmetic operators\r\n\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator= (tvec4<T, P> const & v);\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator= (tvec4<U, Q> const & v);\r\n\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator+=(U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator+=(tvec4<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator-=(U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator-=(tvec4<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator*=(U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator*=(tvec4<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator/=(U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator/=(tvec4<U, P> const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Increment and decrement operators\r\n\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator++();\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator--();\r\n\t\tGLM_FUNC_DECL tvec4<T, P> operator++(int);\r\n\t\tGLM_FUNC_DECL tvec4<T, P> operator--(int);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Unary bit operators\r\n\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator%= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator%= (tvec4<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator&= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator&= (tvec4<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator|= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator|= (tvec4<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator^= (U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator^= (tvec4<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator<<=(U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator<<=(tvec4<U, P> const & v);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator>>=(U s);\r\n\t\ttemplate <typename U>\r\n\t\tGLM_FUNC_DECL tvec4<T, P> & operator>>=(tvec4<U, P> const & v);\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator+(T const & s, tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator+(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator-(tvec4<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator-(T const & s, tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator-\t(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator*(T const & s, tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator*(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator/(tvec4<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator/(T const & s, tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator/(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator-(tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL bool operator==(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL bool operator!=(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator%(tvec4<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator%(T const & s, tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator%(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator&(tvec4<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator&(T const & s, tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator&(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator|(tvec4<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator|(T const & s, tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator|(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator^(tvec4<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator^(T const & s, tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator^(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator<<(tvec4<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator<<(T const & s, tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator<<(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator>>(tvec4<T, P> const & v, T const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator>>(T const & s, tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL tvec4<T, P> operator>>(tvec4<T, P> const & v1, tvec4<T, P> const & v2);\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_DECL tvec4<T, P> operator~(tvec4<T, P> const & v);\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#ifndef GLM_EXTERNAL_TEMPLATE\r\n#include \"type_vec4.inl\"\r\n#endif//GLM_EXTERNAL_TEMPLATE\r\n\r\n#endif//glm_core_type_gentype4\r\n"
  },
  {
    "path": "gpu/glm/detail/type_vec4.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/core/type_tvec4.inl\r\n/// @date 2008-08-23 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tvec4<T, P>::length() const\r\n\t{\r\n\t\treturn 4;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T & tvec4<T, P>::operator[](length_t i)\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&x)[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const & tvec4<T, P>::operator[](length_t i) const\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&x)[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Implicit basic constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4() :\r\n\t\tx(0),\r\n\t\ty(0),\r\n\t\tz(0),\r\n\t\tw(0)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec4<T, P> const & v) :\r\n\t\tx(v.x),\r\n\t\ty(v.y),\r\n\t\tz(v.z),\r\n\t\tw(v.w)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(tvec4<T, Q> const & v) :\r\n\t\tx(v.x),\r\n\t\ty(v.y),\r\n\t\tz(v.z),\r\n\t\tw(v.w)\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Explicit basic constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(ctor)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4(T const & s) :\r\n\t\tx(s),\r\n\t\ty(s),\r\n\t\tz(s),\r\n\t\tw(s)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4\r\n\t(\r\n\t\tT const & s1,\r\n\t\tT const & s2,\r\n\t\tT const & s3,\r\n\t\tT const & s4\r\n\t) :\r\n\t\tx(s1),\r\n\t\ty(s2),\r\n\t\tz(s3),\r\n\t\tw(s4)\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion scalar constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename A, typename B, typename C, typename D>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4\r\n\t(\r\n\t\tA const & x,\r\n\t\tB const & y,\r\n\t\tC const & z,\r\n\t\tD const & w\r\n\t) :\r\n\t\tx(static_cast<T>(x)),\r\n\t\ty(static_cast<T>(y)),\r\n\t\tz(static_cast<T>(z)),\r\n\t\tw(static_cast<T>(w))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4\r\n\t(\r\n\t\ttvec4<U, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(v.x)),\r\n\t\ty(static_cast<T>(v.y)),\r\n\t\tz(static_cast<T>(v.z)),\r\n\t\tw(static_cast<T>(v.w))\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Conversion vector constructors\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename A, typename B, typename C, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4\r\n\t(\r\n\t\ttvec2<A, Q> const & v,\r\n\t\tB const & s1,\r\n\t\tC const & s2\r\n\t) :\r\n\t\tx(static_cast<T>(v.x)),\r\n\t\ty(static_cast<T>(v.y)),\r\n\t\tz(static_cast<T>(s1)),\r\n\t\tw(static_cast<T>(s2))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename A, typename B, typename C, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4\r\n\t(\r\n\t\tA const & s1,\r\n\t\ttvec2<B, Q> const & v,\r\n\t\tC const & s2\r\n\t) :\r\n\t\tx(static_cast<T>(s1)),\r\n\t\ty(static_cast<T>(v.x)),\r\n\t\tz(static_cast<T>(v.y)),\r\n\t\tw(static_cast<T>(s2))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename A, typename B, typename C, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4\r\n\t(\r\n\t\tA const & s1,\r\n\t\tB const & s2,\r\n\t\ttvec2<C, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(s1)),\r\n\t\ty(static_cast<T>(s2)),\r\n\t\tz(static_cast<T>(v.x)),\r\n\t\tw(static_cast<T>(v.y))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename A, typename B, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4\r\n\t(\r\n\t\ttvec3<A, Q> const & v,\r\n\t\tB const & s\r\n\t) :\r\n\t\tx(static_cast<T>(v.x)),\r\n\t\ty(static_cast<T>(v.y)),\r\n\t\tz(static_cast<T>(v.z)),\r\n\t\tw(static_cast<T>(s))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename A, typename B, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4\r\n\t(\r\n\t\tA const & s,\r\n\t\ttvec3<B, Q> const & v\r\n\t) :\r\n\t\tx(static_cast<T>(s)),\r\n\t\ty(static_cast<T>(v.x)),\r\n\t\tz(static_cast<T>(v.y)),\r\n\t\tw(static_cast<T>(v.z))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename A, typename B, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P>::tvec4\r\n\t(\r\n\t\ttvec2<A, Q> const & v1,\r\n\t\ttvec2<B, Q> const & v2\r\n\t) :\r\n\t\tx(static_cast<T>(v1.x)),\r\n\t\ty(static_cast<T>(v1.y)),\r\n\t\tz(static_cast<T>(v2.x)),\r\n\t\tw(static_cast<T>(v2.y))\r\n\t{}\r\n\r\n\t//////////////////////////////////////\r\n\t// Unary arithmetic operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator= (tvec4<T, P> const & v)\r\n\t{\r\n\t\tthis->x = v.x;\r\n\t\tthis->y = v.y;\r\n\t\tthis->z = v.z;\r\n\t\tthis->w = v.w;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator= (tvec4<U, Q> const & v)\r\n\t{\r\n\t\tthis->x = static_cast<T>(v.x);\r\n\t\tthis->y = static_cast<T>(v.y);\r\n\t\tthis->z = static_cast<T>(v.z);\r\n\t\tthis->w = static_cast<T>(v.w);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator+= (U s)\r\n\t{\r\n\t\tthis->x += static_cast<T>(s);\r\n\t\tthis->y += static_cast<T>(s);\r\n\t\tthis->z += static_cast<T>(s);\r\n\t\tthis->w += static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator+= (tvec4<U, P> const & v)\r\n\t{\r\n\t\tthis->x += static_cast<T>(v.x);\r\n\t\tthis->y += static_cast<T>(v.y);\r\n\t\tthis->z += static_cast<T>(v.z);\r\n\t\tthis->w += static_cast<T>(v.w);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator-= (U s)\r\n\t{\r\n\t\tthis->x -= static_cast<T>(s);\r\n\t\tthis->y -= static_cast<T>(s);\r\n\t\tthis->z -= static_cast<T>(s);\r\n\t\tthis->w -= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator-= (tvec4<U, P> const & v)\r\n\t{\r\n\t\tthis->x -= static_cast<T>(v.x);\r\n\t\tthis->y -= static_cast<T>(v.y);\r\n\t\tthis->z -= static_cast<T>(v.z);\r\n\t\tthis->w -= static_cast<T>(v.w);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator*= (U s)\r\n\t{\r\n\t\tthis->x *= static_cast<T>(s);\r\n\t\tthis->y *= static_cast<T>(s);\r\n\t\tthis->z *= static_cast<T>(s);\r\n\t\tthis->w *= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator*= (tvec4<U, P> const & v)\r\n\t{\r\n\t\tthis->x *= static_cast<T>(v.x);\r\n\t\tthis->y *= static_cast<T>(v.y);\r\n\t\tthis->z *= static_cast<T>(v.z);\r\n\t\tthis->w *= static_cast<T>(v.w);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator/= (U s)\r\n\t{\r\n\t\tthis->x /= static_cast<T>(s);\r\n\t\tthis->y /= static_cast<T>(s);\r\n\t\tthis->z /= static_cast<T>(s);\r\n\t\tthis->w /= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator/= (tvec4<U, P> const & v)\r\n\t{\r\n\t\tthis->x /= static_cast<T>(v.x);\r\n\t\tthis->y /= static_cast<T>(v.y);\r\n\t\tthis->z /= static_cast<T>(v.z);\r\n\t\tthis->w /= static_cast<T>(v.w);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Increment and decrement operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator++()\r\n\t{\r\n\t\t++this->x;\r\n\t\t++this->y;\r\n\t\t++this->z;\r\n\t\t++this->w;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator--()\r\n\t{\r\n\t\t--this->x;\r\n\t\t--this->y;\r\n\t\t--this->z;\r\n\t\t--this->w;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> tvec4<T, P>::operator++(int)\r\n\t{\r\n\t\ttvec4<T, P> Result(*this);\r\n\t\t++*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> tvec4<T, P>::operator--(int)\r\n\t{\r\n\t\ttvec4<T, P> Result(*this);\r\n\t\t--*this;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Unary bit operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator%= (U s)\r\n\t{\r\n\t\tthis->x %= static_cast<T>(s);\r\n\t\tthis->y %= static_cast<T>(s);\r\n\t\tthis->z %= static_cast<T>(s);\r\n\t\tthis->w %= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator%= (tvec4<U, P> const & v)\r\n\t{\r\n\t\tthis->x %= static_cast<T>(v.x);\r\n\t\tthis->y %= static_cast<T>(v.y);\r\n\t\tthis->z %= static_cast<T>(v.z);\r\n\t\tthis->w %= static_cast<T>(v.w);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator&= (U s)\r\n\t{\r\n\t\tthis->x &= static_cast<T>(s);\r\n\t\tthis->y &= static_cast<T>(s);\r\n\t\tthis->z &= static_cast<T>(s);\r\n\t\tthis->w &= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator&= (tvec4<U, P> const & v)\r\n\t{\r\n\t\tthis->x &= static_cast<T>(v.x);\r\n\t\tthis->y &= static_cast<T>(v.y);\r\n\t\tthis->z &= static_cast<T>(v.z);\r\n\t\tthis->w &= static_cast<T>(v.w);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator|= (U s)\r\n\t{\r\n\t\tthis->x |= static_cast<T>(s);\r\n\t\tthis->y |= static_cast<T>(s);\r\n\t\tthis->z |= static_cast<T>(s);\r\n\t\tthis->w |= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator|= (tvec4<U, P> const & v)\r\n\t{\r\n\t\tthis->x |= static_cast<T>(v.x);\r\n\t\tthis->y |= static_cast<T>(v.y);\r\n\t\tthis->z |= static_cast<T>(v.z);\r\n\t\tthis->w |= static_cast<T>(v.w);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator^= (U s)\r\n\t{\r\n\t\tthis->x ^= static_cast<T>(s);\r\n\t\tthis->y ^= static_cast<T>(s);\r\n\t\tthis->z ^= static_cast<T>(s);\r\n\t\tthis->w ^= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator^= (tvec4<U, P> const & v)\r\n\t{\r\n\t\tthis->x ^= static_cast<T>(v.x);\r\n\t\tthis->y ^= static_cast<T>(v.y);\r\n\t\tthis->z ^= static_cast<T>(v.z);\r\n\t\tthis->w ^= static_cast<T>(v.w);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator<<= (U s)\r\n\t{\r\n\t\tthis->x <<= static_cast<T>(s);\r\n\t\tthis->y <<= static_cast<T>(s);\r\n\t\tthis->z <<= static_cast<T>(s);\r\n\t\tthis->w <<= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator<<= (tvec4<U, P> const & v)\r\n\t{\r\n\t\tthis->x <<= static_cast<T>(v.x);\r\n\t\tthis->y <<= static_cast<T>(v.y);\r\n\t\tthis->z <<= static_cast<T>(v.z);\r\n\t\tthis->w <<= static_cast<T>(v.w);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator>>= (U s)\r\n\t{\r\n\t\tthis->x >>= static_cast<T>(s);\r\n\t\tthis->y >>= static_cast<T>(s);\r\n\t\tthis->z >>= static_cast<T>(s);\r\n\t\tthis->w >>= static_cast<T>(s);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> & tvec4<T, P>::operator>>= (tvec4<U, P> const & v)\r\n\t{\r\n\t\tthis->x >>= static_cast<T>(v.x);\r\n\t\tthis->y >>= static_cast<T>(v.y);\r\n\t\tthis->z >>= static_cast<T>(v.z);\r\n\t\tthis->w >>= static_cast<T>(v.w);\r\n\t\treturn *this;\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Binary arithmetic operators\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator+ \r\n\t(\r\n\t\ttvec4<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv.x + s,\r\n\t\t\tv.y + s,\r\n\t\t\tv.z + s,\r\n\t\t\tv.w + s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator+ \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\ts + v.x,\r\n\t\t\ts + v.y,\r\n\t\t\ts + v.z,\r\n\t\t\ts + v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator+ \r\n\t(\r\n\t\ttvec4<T, P> const & v1, \r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv1.x + v2.x,\r\n\t\t\tv1.y + v2.y,\r\n\t\t\tv1.z + v2.z,\r\n\t\t\tv1.w + v2.w);\r\n\t}\r\n\r\n\t//operator-\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator- \r\n\t(\r\n\t\ttvec4<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv.x - s,\r\n\t\t\tv.y - s,\r\n\t\t\tv.z - s,\r\n\t\t\tv.w - s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator- \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\ts - v.x,\r\n\t\t\ts - v.y,\r\n\t\t\ts - v.z,\r\n\t\t\ts - v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator- \r\n\t(\r\n\t\ttvec4<T, P> const & v1, \r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv1.x - v2.x,\r\n\t\t\tv1.y - v2.y,\r\n\t\t\tv1.z - v2.z,\r\n\t\t\tv1.w - v2.w);\r\n\t}\r\n\r\n\t//operator*\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator* \r\n\t(\r\n\t\ttvec4<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv.x * s,\r\n\t\t\tv.y * s,\r\n\t\t\tv.z * s,\r\n\t\t\tv.w * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator* \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\ts * v.x,\r\n\t\t\ts * v.y,\r\n\t\t\ts * v.z,\r\n\t\t\ts * v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator*\r\n\t(\r\n\t\ttvec4<T, P> const & v1, \r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv1.x * v2.x,\r\n\t\t\tv1.y * v2.y,\r\n\t\t\tv1.z * v2.z,\r\n\t\t\tv1.w * v2.w);\r\n\t}\r\n\r\n\t//operator/\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator/ \r\n\t(\r\n\t\ttvec4<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv.x / s,\r\n\t\t\tv.y / s,\r\n\t\t\tv.z / s,\r\n\t\t\tv.w / s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator/ \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\ts / v.x,\r\n\t\t\ts / v.y,\r\n\t\t\ts / v.z,\r\n\t\t\ts / v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator/ \r\n\t(\r\n\t\ttvec4<T, P> const & v1, \r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv1.x / v2.x,\r\n\t\t\tv1.y / v2.y,\r\n\t\t\tv1.z / v2.z,\r\n\t\t\tv1.w / v2.w);\r\n\t}\r\n\r\n\t// Unary constant operators\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator- \r\n\t(\r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\t-v.x, \r\n\t\t\t-v.y, \r\n\t\t\t-v.z, \r\n\t\t\t-v.w);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\ttvec4<T, P> const & v1, \r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn (v1.x == v2.x) && (v1.y == v2.y) && (v1.z == v2.z) && (v1.w == v2.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\ttvec4<T, P> const & v1, \r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn (v1.x != v2.x) || (v1.y != v2.y) || (v1.z != v2.z) || (v1.w != v2.w);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Binary bit operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator% \r\n\t(\r\n\t\ttvec4<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv.x % s,\r\n\t\t\tv.y % s,\r\n\t\t\tv.z % s,\r\n\t\t\tv.w % s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator% \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\ts % v.x,\r\n\t\t\ts % v.y,\r\n\t\t\ts % v.z,\r\n\t\t\ts % v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator%\r\n\t(\r\n\t\ttvec4<T, P> const & v1, \r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv1.x % v2.x,\r\n\t\t\tv1.y % v2.y,\r\n\t\t\tv1.z % v2.z,\r\n\t\t\tv1.w % v2.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator& \r\n\t(\r\n\t\ttvec4<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv.x & s,\r\n\t\t\tv.y & s,\r\n\t\t\tv.z & s,\r\n\t\t\tv.w & s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator& \r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\ts & v.x,\r\n\t\t\ts & v.y,\r\n\t\t\ts & v.z,\r\n\t\t\ts & v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator&\r\n\t(\r\n\t\ttvec4<T, P> const & v1,\r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv1.x & v2.x,\r\n\t\t\tv1.y & v2.y,\r\n\t\t\tv1.z & v2.z,\r\n\t\t\tv1.w & v2.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator|\r\n\t(\r\n\t\ttvec4<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv.x | s,\r\n\t\t\tv.y | s,\r\n\t\t\tv.z | s,\r\n\t\t\tv.w | s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator|\r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\ts | v.x,\r\n\t\t\ts | v.y,\r\n\t\t\ts | v.z,\r\n\t\t\ts | v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator|\r\n\t(\r\n\t\ttvec4<T, P> const & v1,\r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv1.x | v2.x,\r\n\t\t\tv1.y | v2.y,\r\n\t\t\tv1.z | v2.z,\r\n\t\t\tv1.w | v2.w);\r\n\t}\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator^\r\n\t(\r\n\t\ttvec4<T, P> const & v, \r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv.x ^ s,\r\n\t\t\tv.y ^ s,\r\n\t\t\tv.z ^ s,\r\n\t\t\tv.w ^ s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator^\r\n\t(\r\n\t\tT const & s, \r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\ts ^ v.x,\r\n\t\t\ts ^ v.y,\r\n\t\t\ts ^ v.z,\r\n\t\t\ts ^ v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator^\r\n\t(\r\n\t\ttvec4<T, P> const & v1,\r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv1.x ^ v2.x,\r\n\t\t\tv1.y ^ v2.y,\r\n\t\t\tv1.z ^ v2.z,\r\n\t\t\tv1.w ^ v2.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator<<\r\n\t(\r\n\t\ttvec4<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv.x << s,\r\n\t\t\tv.y << s,\r\n\t\t\tv.z << s,\r\n\t\t\tv.w << s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator<<\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\ts << v.x,\r\n\t\t\ts << v.y,\r\n\t\t\ts << v.z,\r\n\t\t\ts << v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator<<\r\n\t(\r\n\t\ttvec4<T, P> const & v1,\r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv1.x << v2.x,\r\n\t\t\tv1.y << v2.y,\r\n\t\t\tv1.z << v2.z,\r\n\t\t\tv1.w << v2.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator>>\r\n\t(\r\n\t\ttvec4<T, P> const & v,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv.x >> s,\r\n\t\t\tv.y >> s,\r\n\t\t\tv.z >> s,\r\n\t\t\tv.w >> s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator>>\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\ts >> v.x,\r\n\t\t\ts >> v.y,\r\n\t\t\ts >> v.z,\r\n\t\t\ts >> v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator>>\r\n\t(\r\n\t\ttvec4<T, P> const & v1,\r\n\t\ttvec4<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\tv1.x >> v2.x,\r\n\t\t\tv1.y >> v2.y,\r\n\t\t\tv1.z >> v2.z,\r\n\t\t\tv1.w >> v2.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tvec4<T, P> operator~\r\n\t(\r\n\t\ttvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn tvec4<T, P>(\r\n\t\t\t~v.x,\r\n\t\t\t~v.y,\r\n\t\t\t~v.z,\r\n\t\t\t~v.w);\r\n\t}\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/exponential.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/exponential.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_EXPONENTIAL_INCLUDED\r\n#define GLM_EXPONENTIAL_INCLUDED\r\n\r\n#include \"detail/func_exponential.hpp\"\r\n\r\n#endif//GLM_EXPONENTIAL_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/ext.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @file glm/glm.hpp\r\n/// @date 2009-05-01 / 2011-05-16\r\n/// @author Christophe Riccio\r\n///\r\n/// @ref core (Dependence)\r\n/// \r\n/// @defgroup gtc GTC Extensions (Stable)\r\n///\r\n/// @brief Functions and types that the GLSL specification doesn't define, but useful to have for a C++ program.\r\n/// \r\n/// GTC extensions aim to be stable. \r\n/// \r\n/// Even if it's highly unrecommended, it's possible to include all the extensions at once by\r\n/// including <glm/ext.hpp>. Otherwise, each extension needs to be included  a specific file.\r\n/// \r\n/// @defgroup gtx GTX Extensions (Experimental)\r\n/// \r\n/// @brief Functions and types that the GLSL specification doesn't define, but \r\n/// useful to have for a C++ program.\r\n/// \r\n/// Experimental extensions are useful functions and types, but the development of\r\n/// their API and functionality is not necessarily stable. They can change \r\n/// substantially between versions. Backwards compatibility is not much of an issue\r\n/// for them.\r\n/// \r\n/// Even if it's highly unrecommended, it's possible to include all the extensions \r\n/// at once by including <glm/ext.hpp>. Otherwise, each extension needs to be \r\n/// included  a specific file.\r\n/// \r\n/// @defgroup virtrev VIRTREV Extensions\r\n/// \r\n/// @brief Extensions develop and maintain by Mathieu [matrem] Roumillac\r\n/// (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showprofile&User=22660).\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_EXT_INCLUDED\r\n#define GLM_EXT_INCLUDED\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_EXT_INCLUDED_DISPLAYED))\r\n#\tdefine GLM_MESSAGE_EXT_INCLUDED_DISPLAYED\r\n#\tpragma message(\"GLM: All extensions included (not recommanded)\")\r\n#endif//GLM_MESSAGES\r\n\r\n#include \"./gtc/constants.hpp\"\r\n#include \"./gtc/epsilon.hpp\"\r\n#include \"./gtc/matrix_access.hpp\"\r\n#include \"./gtc/matrix_integer.hpp\"\r\n#include \"./gtc/matrix_inverse.hpp\"\r\n#include \"./gtc/matrix_transform.hpp\"\r\n#include \"./gtc/noise.hpp\"\r\n#include \"./gtc/packing.hpp\"\r\n#include \"./gtc/quaternion.hpp\"\r\n#include \"./gtc/random.hpp\"\r\n#include \"./gtc/reciprocal.hpp\"\r\n#include \"./gtc/type_precision.hpp\"\r\n#include \"./gtc/type_ptr.hpp\"\r\n#include \"./gtc/ulp.hpp\"\r\n\r\n#include \"./gtx/associated_min_max.hpp\"\r\n#include \"./gtx/bit.hpp\"\r\n#include \"./gtx/closest_point.hpp\"\r\n#include \"./gtx/color_space.hpp\"\r\n#include \"./gtx/color_space_YCoCg.hpp\"\r\n#include \"./gtx/compatibility.hpp\"\r\n#include \"./gtx/component_wise.hpp\"\r\n#include \"./gtx/dual_quaternion.hpp\"\r\n#include \"./gtx/euler_angles.hpp\"\r\n#include \"./gtx/extend.hpp\"\r\n#include \"./gtx/extented_min_max.hpp\"\r\n#include \"./gtx/fast_exponential.hpp\"\r\n#include \"./gtx/fast_square_root.hpp\"\r\n#include \"./gtx/fast_trigonometry.hpp\"\r\n#include \"./gtx/gradient_paint.hpp\"\r\n#include \"./gtx/handed_coordinate_space.hpp\"\r\n#include \"./gtx/inertia.hpp\"\r\n#include \"./gtx/int_10_10_10_2.hpp\"\r\n#include \"./gtx/integer.hpp\"\r\n#include \"./gtx/intersect.hpp\"\r\n#include \"./gtx/log_base.hpp\"\r\n#include \"./gtx/matrix_cross_product.hpp\"\r\n#include \"./gtx/matrix_interpolation.hpp\"\r\n#include \"./gtx/matrix_major_storage.hpp\"\r\n#include \"./gtx/matrix_operation.hpp\"\r\n#include \"./gtx/matrix_query.hpp\"\r\n#include \"./gtx/mixed_product.hpp\"\r\n#include \"./gtx/multiple.hpp\"\r\n#include \"./gtx/norm.hpp\"\r\n#include \"./gtx/normal.hpp\"\r\n#include \"./gtx/normalize_dot.hpp\"\r\n#include \"./gtx/number_precision.hpp\"\r\n#include \"./gtx/optimum_pow.hpp\"\r\n#include \"./gtx/orthonormalize.hpp\"\r\n#include \"./gtx/perpendicular.hpp\"\r\n#include \"./gtx/polar_coordinates.hpp\"\r\n#include \"./gtx/projection.hpp\"\r\n#include \"./gtx/quaternion.hpp\"\r\n#include \"./gtx/raw_data.hpp\"\r\n#include \"./gtx/rotate_vector.hpp\"\r\n#include \"./gtx/spline.hpp\"\r\n#include \"./gtx/std_based_type.hpp\"\r\n#include \"./gtx/string_cast.hpp\"\r\n#include \"./gtx/transform.hpp\"\r\n#include \"./gtx/transform2.hpp\"\r\n#include \"./gtx/vec1.hpp\"\r\n#include \"./gtx/vector_angle.hpp\"\r\n#include \"./gtx/vector_query.hpp\"\r\n#include \"./gtx/wrap.hpp\"\r\n\r\n#if(GLM_ARCH & GLM_ARCH_SSE2)\r\n#\tinclude \"./gtx/simd_vec4.hpp\"\r\n#\tinclude \"./gtx/simd_mat4.hpp\"\r\n#endif\r\n\r\n#endif //GLM_EXT_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/fwd.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n///\r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n///\r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/fwd.hpp\r\n/// @date 2013-03-30 / 2013-03-31\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_FWD_INCLUDED\r\n#define GLM_FWD_INCLUDED\r\n\r\n#include \"detail/type_int.hpp\"\r\n#include \"detail/type_float.hpp\"\r\n#include \"detail/type_vec.hpp\"\r\n#include \"detail/type_mat.hpp\"\r\n\r\n//////////////////////\r\n// GLM_GTC_quaternion\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P> struct tquat;\r\n}//namespace detail\r\n\r\n\t\r\n\t/// Quaternion of low single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttypedef detail::tquat<float, lowp>\t\tlowp_quat;\r\n\t\r\n\t/// Quaternion of medium single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttypedef detail::tquat<float, mediump>\tmediump_quat;\r\n\t\r\n\t/// Quaternion of high single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttypedef detail::tquat<float, highp>\t\thighp_quat;\r\n\t\r\n#if(defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef highp_quat\t\t\tquat;\r\n#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef mediump_quat\t\tquat;\r\n#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef lowp_quat\t\t\tquat;\r\n#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))\r\n\t/// Quaternion of default single-precision floating-point numbers.\r\n\ttypedef highp_quat\t\t\tquat;\r\n#endif\r\n\t\r\n\t/// Quaternion of low single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttypedef lowp_quat\t\t\tlowp_fquat;\r\n\t\r\n\t/// Quaternion of medium single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttypedef mediump_quat\t\tmediump_fquat;\r\n\t\r\n\t/// Quaternion of high single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttypedef highp_quat\t\t\thighp_fquat;\r\n\t\r\n\t/// Quaternion of default single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttypedef quat\t\t\t\tfquat;\r\n\t\r\n\r\n\t/// Quaternion of low double-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttypedef detail::tquat<double, lowp>\t\tlowp_dquat;\r\n\t\r\n\t/// Quaternion of medium double-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttypedef detail::tquat<double, mediump>\tmediump_dquat;\r\n\t\r\n\t/// Quaternion of high double-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttypedef detail::tquat<double, highp>\thighp_dquat;\r\n\t\r\n#if(defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))\r\n\ttypedef highp_dquat\t\t\tdquat;\r\n#elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))\r\n\ttypedef mediump_dquat\t\tdquat;\r\n#elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && defined(GLM_PRECISION_LOWP_DOUBLE))\r\n\ttypedef lowp_dquat\t\t\tdquat;\r\n#elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))\r\n\t/// Quaternion of default double-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttypedef highp_dquat\t\t\tdquat;\r\n#endif\r\n\r\n}//namespace glm\r\n\r\n//////////////////////\r\n// GLM_GTC_precision\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_type_precision\r\n\t/// @{\r\n\r\n\t/// Low precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 lowp_int8;\r\n\t\r\n\t/// Low precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 lowp_int16;\r\n\r\n\t/// Low precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 lowp_int32;\r\n\r\n\t/// Low precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 lowp_int64;\r\n\r\n\t/// Low precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 lowp_int8_t;\r\n\t\r\n\t/// Low precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 lowp_int16_t;\r\n\r\n\t/// Low precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 lowp_int32_t;\r\n\r\n\t/// Low precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 lowp_int64_t;\r\n\r\n\t/// Low precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 lowp_i8;\r\n\t\r\n\t/// Low precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 lowp_i16;\r\n\r\n\t/// Low precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 lowp_i32;\r\n\r\n\t/// Low precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 lowp_i64;\r\n\r\n\t/// Medium precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 mediump_int8;\r\n\t\r\n\t/// Medium precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 mediump_int16;\r\n\r\n\t/// Medium precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 mediump_int32;\r\n\r\n\t/// Medium precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 mediump_int64;\r\n\r\n\t/// Medium precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 mediump_int8_t;\r\n\t\r\n\t/// Medium precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 mediump_int16_t;\r\n\r\n\t/// Medium precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 mediump_int32_t;\r\n\r\n\t/// Medium precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 mediump_int64_t;\r\n\r\n\t/// Medium precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 mediump_i8;\r\n\t\r\n\t/// Medium precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 mediump_i16;\r\n\r\n\t/// Medium precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 mediump_i32;\r\n\r\n\t/// Medium precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 mediump_i64;\r\n\r\n\t/// High precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 highp_int8;\r\n\t\r\n\t/// High precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 highp_int16;\r\n\r\n\t/// High precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 highp_int32;\r\n\r\n\t/// High precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 highp_int64;\r\n\r\n\t/// High precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 highp_int8_t;\r\n\t\r\n\t/// High precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 highp_int16_t;\r\n\r\n\t/// 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 highp_int32_t;\r\n\r\n\t/// High precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 highp_int64_t;\r\n\r\n\t/// High precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 highp_i8;\r\n\t\r\n\t/// High precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 highp_i16;\r\n\r\n\t/// High precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 highp_i32;\r\n\r\n\t/// High precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 highp_i64;\r\n\t\r\n\r\n\t/// 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 int8;\r\n\t\r\n\t/// 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 int16;\r\n\r\n\t/// 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 int32;\r\n\r\n\t/// 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 int64;\r\n\r\n\t/// 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 int8_t;\r\n\t\r\n\t/// 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 int16_t;\r\n\r\n\t/// 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 int32_t;\r\n\r\n\t/// 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 int64_t;\r\n\r\n\t/// 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 i8;\r\n\t\r\n\t/// 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 i16;\r\n\r\n\t/// 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 i32;\r\n\r\n\t/// 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 i64;\r\n\t\r\n\t\r\n\t\r\n\t/// Low precision 8 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i8, lowp> lowp_i8vec1;\r\n\t\r\n\t/// Low precision 8 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i8, lowp> lowp_i8vec2;\r\n\t\r\n\t/// Low precision 8 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i8, lowp> lowp_i8vec3;\r\n\t\r\n\t/// Low precision 8 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i8, lowp> lowp_i8vec4;\r\n\t\r\n\r\n\t/// Medium precision 8 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i8, mediump> mediump_i8vec1;\r\n\t\r\n\t/// Medium precision 8 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i8, mediump> mediump_i8vec2;\r\n\t\r\n\t/// Medium precision 8 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i8, mediump> mediump_i8vec3;\r\n\t\r\n\t/// Medium precision 8 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i8, mediump> mediump_i8vec4;\r\n\t\r\n\t\r\n\t/// High precision 8 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i8, highp> highp_i8vec1;\r\n\t\r\n\t/// High precision 8 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i8, highp> highp_i8vec2;\r\n\t\r\n\t/// High precision 8 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i8, highp> highp_i8vec3;\r\n\t\r\n\t/// High precision 8 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i8, highp> highp_i8vec4;\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_i8vec1\t\t\t\ti8vec1;\r\n\ttypedef lowp_i8vec2\t\t\t\ti8vec2;\r\n\ttypedef lowp_i8vec3\t\t\t\ti8vec3;\r\n\ttypedef lowp_i8vec4\t\t\t\ti8vec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\ttypedef mediump_i8vec1\t\t\ti8vec1;\r\n\ttypedef mediump_i8vec2\t\t\ti8vec2;\r\n\ttypedef mediump_i8vec3\t\t\ti8vec3;\r\n\ttypedef mediump_i8vec4\t\t\ti8vec4;\t\r\n#else\r\n\t/// Default precision 8 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i8vec1\t\t\ti8vec1;\r\n\t\r\n\t/// Default precision 8 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i8vec2\t\t\ti8vec2;\r\n\t\r\n\t/// Default precision 8 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i8vec3\t\t\ti8vec3;\r\n\t\r\n\t/// Default precision 8 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i8vec4\t\t\ti8vec4;\r\n#endif\r\n\t\r\n\t\r\n\t/// Low precision 16 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i16, lowp>\t\tlowp_i16vec1;\r\n\t\r\n\t/// Low precision 16 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i16, lowp>\t\tlowp_i16vec2;\r\n\t\r\n\t/// Low precision 16 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i16, lowp>\t\tlowp_i16vec3;\r\n\t\r\n\t/// Low precision 16 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i16, lowp>\t\tlowp_i16vec4;\r\n\t\r\n\t\r\n\t/// Medium precision 16 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i16, mediump>\t\tmediump_i16vec1;\r\n\t\r\n\t/// Medium precision 16 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i16, mediump>\t\tmediump_i16vec2;\r\n\t\r\n\t/// Medium precision 16 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i16, mediump>\t\tmediump_i16vec3;\r\n\t\r\n\t/// Medium precision 16 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i16, mediump>\t\tmediump_i16vec4;\r\n\t\r\n\t\r\n\t/// High precision 16 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i16, highp>\t\thighp_i16vec1;\r\n\t\r\n\t/// High precision 16 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i16, highp>\t\thighp_i16vec2;\r\n\t\r\n\t/// High precision 16 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i16, highp>\t\thighp_i16vec3;\r\n\t\r\n\t/// High precision 16 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i16, highp>\t\thighp_i16vec4;\r\n\t\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_i16vec1\t\t\ti16vec1;\r\n\ttypedef lowp_i16vec2\t\t\ti16vec2;\r\n\ttypedef lowp_i16vec3\t\t\ti16vec3;\r\n\ttypedef lowp_i16vec4\t\t\ti16vec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\ttypedef mediump_i16vec1\t\t\ti16vec1;\r\n\ttypedef mediump_i16vec2\t\t\ti16vec2;\r\n\ttypedef mediump_i16vec3\t\t\ti16vec3;\r\n\ttypedef mediump_i16vec4\t\t\ti16vec4;\r\n#else\r\n\t/// Default precision 16 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i16vec1\t\t\ti16vec1;\r\n\t\r\n\t/// Default precision 16 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i16vec2\t\t\ti16vec2;\r\n\t\r\n\t/// Default precision 16 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i16vec3\t\t\ti16vec3;\r\n\t\r\n\t/// Default precision 16 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i16vec4\t\t\ti16vec4;\r\n#endif\r\n\r\n\r\n\t/// Low precision 32 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i32, lowp>\t\tlowp_i32vec1;\r\n\t\r\n\t/// Low precision 32 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i32, lowp>\t\tlowp_i32vec2;\r\n\t\r\n\t/// Low precision 32 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i32, lowp>\t\tlowp_i32vec3;\r\n\t\r\n\t/// Low precision 32 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i32, lowp>\t\tlowp_i32vec4;\r\n\t\r\n\t\r\n\t/// Medium precision 32 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i32, mediump>\t\tmediump_i32vec1;\r\n\t\r\n\t/// Medium precision 32 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i32, mediump>\t\tmediump_i32vec2;\r\n\t\r\n\t/// Medium precision 32 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i32, mediump>\t\tmediump_i32vec3;\r\n\t\r\n\t/// Medium precision 32 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i32, mediump>\t\tmediump_i32vec4;\r\n\t\r\n\t\r\n\t/// High precision 32 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i32, highp>\t\thighp_i32vec1;\r\n\t\r\n\t/// High precision 32 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i32, highp>\t\thighp_i32vec2;\r\n\t\r\n\t/// High precision 32 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i32, highp>\t\thighp_i32vec3;\r\n\t\r\n\t/// High precision 32 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i32, highp>\t\thighp_i32vec4;\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_i32vec1\t\t\ti32vec1;\r\n\ttypedef lowp_i32vec2\t\t\ti32vec2;\r\n\ttypedef lowp_i32vec3\t\t\ti32vec3;\r\n\ttypedef lowp_i32vec4\t\t\ti32vec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\ttypedef mediump_i32vec1\t\t\ti32vec1;\r\n\ttypedef mediump_i32vec2\t\t\ti32vec2;\r\n\ttypedef mediump_i32vec3\t\t\ti32vec3;\r\n\ttypedef mediump_i32vec4\t\t\ti32vec4;\r\n#else\r\n\t/// Default precision 32 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i32vec1\t\t\ti32vec1;\r\n\t\r\n\t/// Default precision 32 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i32vec2\t\t\ti32vec2;\r\n\t\r\n\t/// Default precision 32 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i32vec3\t\t\ti32vec3;\r\n\t\r\n\t/// Default precision 32 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i32vec4\t\t\ti32vec4;\r\n#endif\r\n\r\n\r\n\t/// Low precision 32 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i32, lowp>\t\tlowp_i32vec1;\r\n\t\r\n\t/// Low precision 32 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i32, lowp>\t\tlowp_i32vec2;\r\n\t\r\n\t/// Low precision 32 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i32, lowp>\t\tlowp_i32vec3;\r\n\t\r\n\t/// Low precision 32 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i32, lowp>\t\tlowp_i32vec4;\r\n\t\r\n\t\r\n\t/// Medium precision 32 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i32, mediump>\t\tmediump_i32vec1;\r\n\t\r\n\t/// Medium precision 32 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i32, mediump>\t\tmediump_i32vec2;\r\n\t\r\n\t/// Medium precision 32 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i32, mediump>\t\tmediump_i32vec3;\r\n\t\r\n\t/// Medium precision 32 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i32, mediump>\t\tmediump_i32vec4;\r\n\t\r\n\t\r\n\t/// High precision 32 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i32, highp>\t\thighp_i32vec1;\r\n\t\r\n\t/// High precision 32 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i32, highp>\t\thighp_i32vec2;\r\n\t\r\n\t/// High precision 32 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i32, highp>\t\thighp_i32vec3;\r\n\t\r\n\t/// High precision 32 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i32, highp>\t\thighp_i32vec4;\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_i32vec1\t\t\ti32vec1;\r\n\ttypedef lowp_i32vec2\t\t\ti32vec2;\r\n\ttypedef lowp_i32vec3\t\t\ti32vec3;\r\n\ttypedef lowp_i32vec4\t\t\ti32vec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\ttypedef mediump_i32vec1\t\t\ti32vec1;\r\n\ttypedef mediump_i32vec2\t\t\ti32vec2;\r\n\ttypedef mediump_i32vec3\t\t\ti32vec3;\r\n\ttypedef mediump_i32vec4\t\t\ti32vec4;\r\n#else\r\n\t/// Default precision 32 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i32vec1\t\t\ti32vec1;\r\n\r\n\t/// Default precision 32 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i32vec2\t\t\ti32vec2;\r\n\t\r\n\t/// Default precision 32 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i32vec3\t\t\ti32vec3;\r\n\t\r\n\t/// Default precision 32 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i32vec4\t\t\ti32vec4;\r\n#endif\r\n\r\n\r\n\t\r\n\t/// Low precision 64 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i64, lowp>\t\tlowp_i64vec1;\r\n\t\r\n\t/// Low precision 64 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i64, lowp>\t\tlowp_i64vec2;\r\n\t\r\n\t/// Low precision 64 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i64, lowp>\t\tlowp_i64vec3;\r\n\t\r\n\t/// Low precision 64 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i64, lowp>\t\tlowp_i64vec4;\r\n\t\r\n\t\r\n\t/// Medium precision 64 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i64, mediump>\t\tmediump_i64vec1;\r\n\t\r\n\t/// Medium precision 64 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i64, mediump>\t\tmediump_i64vec2;\r\n\t\r\n\t/// Medium precision 64 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i64, mediump>\t\tmediump_i64vec3;\r\n\t\r\n\t/// Medium precision 64 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i64, mediump>\t\tmediump_i64vec4;\r\n\t\r\n\t\r\n\t/// High precision 64 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i64, highp>\t\thighp_i64vec1;\r\n\t\r\n\t/// High precision 64 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i64, highp>\t\thighp_i64vec2;\r\n\t\r\n\t/// High precision 64 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i64, highp>\t\thighp_i64vec3;\r\n\t\r\n\t/// High precision 64 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i64, highp>\t\thighp_i64vec4;\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_i64vec1\t\t\ti64vec1;\r\n\ttypedef lowp_i64vec2\t\t\ti64vec2;\r\n\ttypedef lowp_i64vec3\t\t\ti64vec3;\r\n\ttypedef lowp_i64vec4\t\t\ti64vec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\ttypedef mediump_i64vec1\t\t\ti64vec1;\r\n\ttypedef mediump_i64vec2\t\t\ti64vec2;\r\n\ttypedef mediump_i64vec3\t\t\ti64vec3;\r\n\ttypedef mediump_i64vec4\t\t\ti64vec4;\r\n#else\r\n\t/// Default precision 64 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i64vec1\t\t\ti64vec1;\r\n\r\n\t/// Default precision 64 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i64vec2\t\t\ti64vec2;\r\n\t\r\n\t/// Default precision 64 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i64vec3\t\t\ti64vec3;\r\n\t\r\n\t/// Default precision 64 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_i64vec4\t\t\ti64vec4;\r\n#endif\r\n\t\r\n\t\r\n\t/////////////////////////////\r\n\t// Unsigned int vector types\r\n\t\r\n\t/// Low precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 lowp_uint8;\r\n\t\r\n\t/// Low precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 lowp_uint16;\r\n\t\r\n\t/// Low precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 lowp_uint32;\r\n\t\r\n\t/// Low precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 lowp_uint64;\r\n\t\r\n\t\r\n\t/// Low precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 lowp_uint8_t;\r\n\t\r\n\t/// Low precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 lowp_uint16_t;\r\n\t\r\n\t/// Low precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 lowp_uint32_t;\r\n\t\r\n\t/// Low precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 lowp_uint64_t;\r\n\t\r\n\t\r\n\t/// Low precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 lowp_u8;\r\n\t\r\n\t/// Low precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 lowp_u16;\r\n\t\r\n\t/// Low precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 lowp_u32;\r\n\t\r\n\t/// Low precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 lowp_u64;\r\n\t\r\n\t\r\n\t\r\n\t/// Medium precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 mediump_uint8;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 mediump_uint16;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 mediump_uint32;\r\n\t\r\n\t/// Medium precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 mediump_uint64;\r\n\t\r\n\t/// Medium precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 mediump_uint8_t;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 mediump_uint16_t;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 mediump_uint32_t;\r\n\t\r\n\t/// Medium precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 mediump_uint64_t;\r\n\t\r\n\t/// Medium precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 mediump_u8;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 mediump_u16;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 mediump_u32;\r\n\t\r\n\t/// Medium precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 mediump_u64;\r\n\t\t\r\n\t\r\n\t\r\n\t/// Medium precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 highp_uint8;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 highp_uint16;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 highp_uint32;\r\n\t\r\n\t/// Medium precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 highp_uint64;\r\n\t\r\n\t/// Medium precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 highp_uint8_t;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 highp_uint16_t;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 highp_uint32_t;\r\n\t\r\n\t/// Medium precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 highp_uint64_t;\r\n\t\r\n\t/// Medium precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 highp_u8;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 highp_u16;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 highp_u32;\r\n\t\r\n\t/// Medium precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 highp_u64;\r\n\t\r\n\t\r\n\t\r\n\t/// 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 uint8;\r\n\t\r\n\t/// 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 uint16;\r\n\t\r\n\t/// 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 uint32;\r\n\t\r\n\t/// 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 uint64;\r\n\t\r\n\t/// 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 uint8_t;\r\n\t\r\n\t/// 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 uint16_t;\r\n\t\r\n\t/// 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 uint32_t;\r\n\t\r\n\t/// 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 uint64_t;\r\n\t\r\n\t/// 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 u8;\r\n\t\r\n\t/// 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 u16;\r\n\t\r\n\t/// 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 u32;\r\n\t\r\n\t/// 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 u64;\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t/// Low precision 8 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u8, lowp> lowp_u8vec1;\r\n\t\r\n\t/// Low precision 8 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u8, lowp> lowp_u8vec2;\r\n\t\r\n\t/// Low precision 8 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u8, lowp> lowp_u8vec3;\r\n\t\r\n\t/// Low precision 8 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u8, lowp> lowp_u8vec4;\r\n\t\r\n\r\n\t/// Medium precision 8 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u8, mediump> mediump_u8vec1;\r\n\t\r\n\t/// Medium precision 8 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u8, mediump> mediump_u8vec2;\r\n\t\r\n\t/// Medium precision 8 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u8, mediump> mediump_u8vec3;\r\n\t\r\n\t/// Medium precision 8 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u8, mediump> mediump_u8vec4;\r\n\t\r\n\t\r\n\t/// High precision 8 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u8, highp> highp_u8vec1;\r\n\t\r\n\t/// High precision 8 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u8, highp> highp_u8vec2;\r\n\t\r\n\t/// High precision 8 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u8, highp> highp_u8vec3;\r\n\t\r\n\t/// High precision 8 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u8, highp> highp_u8vec4;\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_u8vec1\t\t\t\tu8vec1;\r\n\ttypedef lowp_u8vec2\t\t\t\tu8vec2;\r\n\ttypedef lowp_u8vec3\t\t\t\tu8vec3;\r\n\ttypedef lowp_u8vec4\t\t\t\tu8vec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\ttypedef mediump_u8vec1\t\t\tu8vec1;\r\n\ttypedef mediump_u8vec2\t\t\tu8vec2;\r\n\ttypedef mediump_u8vec3\t\t\tu8vec3;\r\n\ttypedef mediump_u8vec4\t\t\tu8vec4;\t\r\n#else\r\n\t/// Default precision 8 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u8vec1\t\t\tu8vec1;\r\n\t\r\n\t/// Default precision 8 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u8vec2\t\t\tu8vec2;\r\n\t\r\n\t/// Default precision 8 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u8vec3\t\t\tu8vec3;\r\n\t\r\n\t/// Default precision 8 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u8vec4\t\t\tu8vec4;\r\n#endif\r\n\t\r\n\t\r\n\t/// Low precision 16 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u16, lowp>\t\tlowp_u16vec1;\r\n\t\r\n\t/// Low precision 16 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u16, lowp>\t\tlowp_u16vec2;\r\n\t\r\n\t/// Low precision 16 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u16, lowp>\t\tlowp_u16vec3;\r\n\t\r\n\t/// Low precision 16 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u16, lowp>\t\tlowp_u16vec4;\r\n\t\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u16, mediump>\t\tmediump_u16vec1;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u16, mediump>\t\tmediump_u16vec2;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u16, mediump>\t\tmediump_u16vec3;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u16, mediump>\t\tmediump_u16vec4;\r\n\t\r\n\t\r\n\t/// High precision 16 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u16, highp>\t\thighp_u16vec1;\r\n\t\r\n\t/// High precision 16 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u16, highp>\t\thighp_u16vec2;\r\n\t\r\n\t/// High precision 16 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u16, highp>\t\thighp_u16vec3;\r\n\t\r\n\t/// High precision 16 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u16, highp>\t\thighp_u16vec4;\r\n\t\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_u16vec1\t\t\tu16vec1;\r\n\ttypedef lowp_u16vec2\t\t\tu16vec2;\r\n\ttypedef lowp_u16vec3\t\t\tu16vec3;\r\n\ttypedef lowp_u16vec4\t\t\tu16vec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\ttypedef mediump_u16vec1\t\t\tu16vec1;\r\n\ttypedef mediump_u16vec2\t\t\tu16vec2;\r\n\ttypedef mediump_u16vec3\t\t\tu16vec3;\r\n\ttypedef mediump_u16vec4\t\t\tu16vec4;\r\n#else\r\n\t/// Default precision 16 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u16vec1\t\t\tu16vec1;\r\n\t\r\n\t/// Default precision 16 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u16vec2\t\t\tu16vec2;\r\n\t\r\n\t/// Default precision 16 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u16vec3\t\t\tu16vec3;\r\n\t\r\n\t/// Default precision 16 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u16vec4\t\t\tu16vec4;\r\n#endif\r\n\r\n\r\n\t/// Low precision 32 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u32, lowp>\t\tlowp_u32vec1;\r\n\t\r\n\t/// Low precision 32 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u32, lowp>\t\tlowp_u32vec2;\r\n\t\r\n\t/// Low precision 32 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u32, lowp>\t\tlowp_u32vec3;\r\n\t\r\n\t/// Low precision 32 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u32, lowp>\t\tlowp_u32vec4;\r\n\t\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u32, mediump>\t\tmediump_u32vec1;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u32, mediump>\t\tmediump_u32vec2;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u32, mediump>\t\tmediump_u32vec3;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u32, mediump>\t\tmediump_u32vec4;\r\n\t\r\n\t\r\n\t/// High precision 32 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u32, highp>\t\thighp_u32vec1;\r\n\t\r\n\t/// High precision 32 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u32, highp>\t\thighp_u32vec2;\r\n\t\r\n\t/// High precision 32 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u32, highp>\t\thighp_u32vec3;\r\n\t\r\n\t/// High precision 32 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u32, highp>\t\thighp_u32vec4;\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_u32vec1\t\t\tu32vec1;\r\n\ttypedef lowp_u32vec2\t\t\tu32vec2;\r\n\ttypedef lowp_u32vec3\t\t\tu32vec3;\r\n\ttypedef lowp_u32vec4\t\t\tu32vec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\ttypedef mediump_u32vec1\t\t\tu32vec1;\r\n\ttypedef mediump_u32vec2\t\t\tu32vec2;\r\n\ttypedef mediump_u32vec3\t\t\tu32vec3;\r\n\ttypedef mediump_u32vec4\t\t\tu32vec4;\r\n#else\r\n\t/// Default precision 32 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u32vec1\t\t\tu32vec1;\r\n\t\r\n\t/// Default precision 32 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u32vec2\t\t\tu32vec2;\r\n\t\r\n\t/// Default precision 32 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u32vec3\t\t\tu32vec3;\r\n\t\r\n\t/// Default precision 32 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u32vec4\t\t\tu32vec4;\r\n#endif\r\n\r\n\r\n\t/// Low precision 32 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u32, lowp>\t\tlowp_u32vec1;\r\n\t\r\n\t/// Low precision 32 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u32, lowp>\t\tlowp_u32vec2;\r\n\t\r\n\t/// Low precision 32 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u32, lowp>\t\tlowp_u32vec3;\r\n\t\r\n\t/// Low precision 32 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u32, lowp>\t\tlowp_u32vec4;\r\n\t\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u32, mediump>\t\tmediump_u32vec1;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u32, mediump>\t\tmediump_u32vec2;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u32, mediump>\t\tmediump_u32vec3;\r\n\t\r\n\t/// Medium precision 32 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u32, mediump>\t\tmediump_u32vec4;\r\n\t\r\n\t\r\n\t/// High precision 32 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u32, highp>\t\thighp_u32vec1;\r\n\t\r\n\t/// High precision 32 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u32, highp>\t\thighp_u32vec2;\r\n\t\r\n\t/// High precision 32 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u32, highp>\t\thighp_u32vec3;\r\n\t\r\n\t/// High precision 32 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u32, highp>\t\thighp_u32vec4;\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_u32vec1\t\t\tu32vec1;\r\n\ttypedef lowp_u32vec2\t\t\tu32vec2;\r\n\ttypedef lowp_u32vec3\t\t\tu32vec3;\r\n\ttypedef lowp_u32vec4\t\t\tu32vec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\ttypedef mediump_u32vec1\t\t\tu32vec1;\r\n\ttypedef mediump_u32vec2\t\t\tu32vec2;\r\n\ttypedef mediump_u32vec3\t\t\tu32vec3;\r\n\ttypedef mediump_u32vec4\t\t\tu32vec4;\r\n#else\r\n\t/// Default precision 32 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u32vec1\t\t\tu32vec1;\r\n\r\n\t/// Default precision 32 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u32vec2\t\t\tu32vec2;\r\n\t\r\n\t/// Default precision 32 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u32vec3\t\t\tu32vec3;\r\n\t\r\n\t/// Default precision 32 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u32vec4\t\t\tu32vec4;\r\n#endif\r\n\r\n\r\n\t\r\n\t/// Low precision 64 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u64, lowp>\t\tlowp_u64vec1;\r\n\t\r\n\t/// Low precision 64 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u64, lowp>\t\tlowp_u64vec2;\r\n\t\r\n\t/// Low precision 64 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u64, lowp>\t\tlowp_u64vec3;\r\n\t\r\n\t/// Low precision 64 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u64, lowp>\t\tlowp_u64vec4;\r\n\t\r\n\t\r\n\t/// Medium precision 64 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u64, mediump>\t\tmediump_u64vec1;\r\n\t\r\n\t/// Medium precision 64 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u64, mediump>\t\tmediump_u64vec2;\r\n\t\r\n\t/// Medium precision 64 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u64, mediump>\t\tmediump_u64vec3;\r\n\t\r\n\t/// Medium precision 64 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u64, mediump>\t\tmediump_u64vec4;\r\n\t\r\n\t\r\n\t/// High precision 64 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u64, highp>\t\thighp_u64vec1;\r\n\t\r\n\t/// High precision 64 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u64, highp>\t\thighp_u64vec2;\r\n\t\r\n\t/// High precision 64 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u64, highp>\t\thighp_u64vec3;\r\n\t\r\n\t/// High precision 64 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u64, highp>\t\thighp_u64vec4;\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_UINT))\r\n\ttypedef lowp_u64vec1\t\t\tu64vec1;\r\n\ttypedef lowp_u64vec2\t\t\tu64vec2;\r\n\ttypedef lowp_u64vec3\t\t\tu64vec3;\r\n\ttypedef lowp_u64vec4\t\t\tu64vec4;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_UINT))\r\n\ttypedef mediump_u64vec1\t\t\tu64vec1;\r\n\ttypedef mediump_u64vec2\t\t\tu64vec2;\r\n\ttypedef mediump_u64vec3\t\t\tu64vec3;\r\n\ttypedef mediump_u64vec4\t\t\tu64vec4;\r\n#else\r\n\t/// Default precision 64 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u64vec1\t\t\tu64vec1;\r\n\r\n\t/// Default precision 64 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u64vec2\t\t\tu64vec2;\r\n\t\r\n\t/// Default precision 64 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u64vec3\t\t\tu64vec3;\r\n\t\r\n\t/// Default precision 64 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_u64vec4\t\t\tu64vec4;\r\n#endif\r\n\t\r\n\t\r\n\t//////////////////////\r\n\t// Float vector types\r\n\t\r\n\t/// Low 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 lowp_float32;\r\n\t\r\n\t/// Low 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 lowp_float64;\r\n\t\r\n\t/// Low 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 lowp_float32_t;\r\n\t\r\n\t/// Low 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 lowp_float64_t;\r\n\t\r\n\t/// Low 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float32 lowp_f32;\r\n\t\r\n\t/// Low 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float64 lowp_f64;\r\n\t\r\n\t/// Low 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 lowp_float32;\r\n\t\r\n\t/// Low 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 lowp_float64;\r\n\t\t\r\n\t/// Low 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 lowp_float32_t;\r\n\t\r\n\t/// Low 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 lowp_float64_t;\r\n\t\r\n\t/// Low 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float32 lowp_f32;\r\n\t\r\n\t/// Low 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float64 lowp_f64;\r\n\r\n\r\n\t/// Low 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 lowp_float32;\r\n\t\r\n\t/// Low 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 lowp_float64;\r\n\t\t\r\n\t/// Low 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 lowp_float32_t;\r\n\t\r\n\t/// Low 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 lowp_float64_t;\r\n\t\t\r\n\t/// Low 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float32 lowp_f32;\r\n\t\r\n\t/// Low 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float64 lowp_f64;\r\n\r\n\t\r\n\t/// Medium 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 mediump_float32;\r\n\t\r\n\t/// Medium 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 mediump_float64;\r\n\t\t\r\n\t/// Medium 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 mediump_float32_t;\r\n\t\r\n\t/// Medium 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 mediump_float64_t;\r\n\t\r\n\t/// Medium 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float32 mediump_f32;\r\n\t\r\n\t/// Medium 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float64 mediump_f64;\r\n\r\n\t\r\n\t/// High 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 highp_float32;\r\n\t\r\n\t/// High 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 highp_float64;\r\n\t\r\n\t/// High 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 highp_float32_t;\r\n\t\r\n\t/// High 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 highp_float64_t;\r\n\t\r\n\t/// High 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float32 highp_f32;\r\n\t\r\n\t/// High 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float64 highp_f64;\r\n\r\n\r\n#if(defined(GLM_PRECISION_LOWP_FLOAT))\r\n\t/// Default 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_float32 float32;\r\n\t\r\n\t/// Default 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_float64 float64;\r\n\t\r\n\t/// Default 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_float32_t float32_t;\r\n\t\r\n\t/// Default 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_float64_t float64_t;\r\n\t\r\n\t/// Default 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_f32 f32;\r\n\t\r\n\t/// Default 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_f64 f64;\r\n\r\n#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))\r\n\t\r\n\t/// Default 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_float32 float32;\r\n\t\r\n\t/// Default 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_float64 float64;\r\n\t\r\n\t/// Default 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_float32 float32_t;\r\n\t\r\n\t/// Default 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_float64 float64_t;\r\n\t\r\n\t/// Default 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_float32 f32;\r\n\t\r\n\t/// Default 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_float64 f64;\r\n\r\n#else//(defined(GLM_PRECISION_HIGHP_FLOAT))\r\n\t\r\n\t/// Default 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_float32 float32;\r\n\t\r\n\t/// Default 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_float64 float64;\r\n\t\r\n\t/// Default 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_float32_t float32_t;\r\n\t\r\n\t/// Default 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_float64_t float64_t;\r\n\t\r\n\t/// Default 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_float32_t f32;\r\n\t\r\n\t/// Default 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_float64_t f64;\r\n#endif\r\n\r\n\r\n\t/// Low single-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<float, lowp> lowp_vec1;\r\n\t\r\n\t/// Low single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<float, lowp> lowp_vec2;\r\n\t\r\n\t/// Low single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<float, lowp> lowp_vec3;\r\n\t\r\n\t/// Low single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<float, lowp> lowp_vec4;\r\n\t\r\n\t/// Low single-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<float, lowp> lowp_fvec1;\r\n\t\r\n\t/// Low single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<float, lowp> lowp_fvec2;\r\n\t\r\n\t/// Low single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<float, lowp> lowp_fvec3;\r\n\t\r\n\t/// Low single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<float, lowp> lowp_fvec4;\r\n\t\r\n\t\r\n\t\r\n\t/// Medium single-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<float, mediump> mediump_vec1;\r\n\t\r\n\t/// Medium Single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<float, mediump> mediump_vec2;\r\n\t\r\n\t/// Medium Single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<float, mediump> mediump_vec3;\r\n\t\r\n\t/// Medium Single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<float, mediump> mediump_vec4;\r\n\t\r\n\t/// Medium single-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<float, mediump> mediump_fvec1;\r\n\t\r\n\t/// Medium Single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<float, mediump> mediump_fvec2;\r\n\t\r\n\t/// Medium Single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<float, mediump> mediump_fvec3;\r\n\t\r\n\t/// Medium Single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<float, mediump> mediump_fvec4;\r\n\t\r\n\r\n\r\n\t/// High single-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<float, highp> highp_vec1;\r\n\t\r\n\t/// High Single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<float, highp> highp_vec2;\r\n\t\r\n\t/// High Single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<float, highp> highp_vec3;\r\n\t\r\n\t/// High Single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<float, highp> highp_vec4;\r\n\t\r\n\t/// High single-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<float, highp> highp_fvec1;\r\n\t\r\n\t/// High Single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<float, highp> highp_fvec2;\r\n\t\r\n\t/// High Single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<float, highp> highp_fvec3;\r\n\t\r\n\t/// High Single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<float, highp> highp_fvec4;\r\n\t\r\n\t\r\n\t/// Low single-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<f32, lowp> lowp_f32vec1;\r\n\t\r\n\t/// Low single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<f32, lowp> lowp_f32vec2;\r\n\t\r\n\t/// Low single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<f32, lowp> lowp_f32vec3;\r\n\t\r\n\t/// Low single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<f32, lowp> lowp_f32vec4;\r\n\t\t\r\n\t/// Medium single-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<f32, mediump> mediump_f32vec1;\r\n\t\r\n\t/// Medium single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<f32, mediump> mediump_f32vec2;\r\n\t\r\n\t/// Medium single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<f32, mediump> mediump_f32vec3;\r\n\t\r\n\t/// Medium single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<f32, mediump> mediump_f32vec4;\r\n\r\n\t/// High single-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<f32, highp> highp_f32vec1;\r\n\t\r\n\t/// High single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<f32, highp> highp_f32vec2;\r\n\t\r\n\t/// High single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<f32, highp> highp_f32vec3;\r\n\t\r\n\t/// High single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<f32, highp> highp_f32vec4;\r\n\r\n\t\r\n\t/// Low double-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<f64, lowp> lowp_f64vec1;\r\n\t\r\n\t/// Low double-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<f64, lowp> lowp_f64vec2;\r\n\t\r\n\t/// Low double-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<f64, lowp> lowp_f64vec3;\r\n\t\r\n\t/// Low double-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<f64, lowp> lowp_f64vec4;\r\n\t\r\n\t/// Medium double-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<f64, mediump> mediump_f64vec1;\r\n\t\r\n\t/// Medium double-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<f64, mediump> mediump_f64vec2;\r\n\t\r\n\t/// Medium double-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<f64, mediump> mediump_f64vec3;\r\n\t\r\n\t/// Medium double-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<f64, mediump> mediump_f64vec4;\r\n\t\r\n\t/// High double-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<f64, highp> highp_f64vec1;\r\n\t\r\n\t/// High double-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<f64, highp> highp_f64vec2;\r\n\t\r\n\t/// High double-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<f64, highp> highp_f64vec3;\r\n\t\r\n\t/// High double-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<f64, highp> highp_f64vec4;\r\n\t\r\n\t\r\n\t//////////////////////\r\n\t// Float matrix types\r\n\t\r\n\t/// Low single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef lowp_f32 lowp_fmat1x1;\r\n\t\r\n\t/// Low single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f32, lowp> lowp_fmat2x2;\r\n\t\r\n\t/// Low single-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f32, lowp> lowp_fmat2x3;\r\n\t\r\n\t/// Low single-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f32, lowp> lowp_fmat2x4;\r\n\t\r\n\t/// Low single-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f32, lowp> lowp_fmat3x2;\r\n\t\r\n\t/// Low single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f32, lowp> lowp_fmat3x3;\r\n\t\r\n\t/// Low single-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f32, lowp> lowp_fmat3x4;\r\n\t\r\n\t/// Low single-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f32, lowp> lowp_fmat4x2;\r\n\t\r\n\t/// Low single-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f32, lowp> lowp_fmat4x3;\r\n\t\r\n\t/// Low single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f32, lowp> lowp_fmat4x4;\r\n\t\r\n\t/// Low single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef lowp_fmat1x1 lowp_fmat1;\r\n\t\r\n\t/// Low single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_fmat2x2 lowp_fmat2;\r\n\t\r\n\t/// Low single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_fmat3x3 lowp_fmat3;\r\n\t\r\n\t/// Low single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_fmat4x4 lowp_fmat4;\r\n\t\r\n\t\r\n\t/// Medium single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef mediump_f32 mediump_fmat1x1;\r\n\t\r\n\t/// Medium single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f32, mediump> mediump_fmat2x2;\r\n\t\r\n\t/// Medium single-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f32, mediump> mediump_fmat2x3;\r\n\t\r\n\t/// Medium single-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f32, mediump> mediump_fmat2x4;\r\n\t\r\n\t/// Medium single-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f32, mediump> mediump_fmat3x2;\r\n\t\r\n\t/// Medium single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f32, mediump> mediump_fmat3x3;\r\n\t\r\n\t/// Medium single-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f32, mediump> mediump_fmat3x4;\r\n\t\r\n\t/// Medium single-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f32, mediump> mediump_fmat4x2;\r\n\t\r\n\t/// Medium single-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f32, mediump> mediump_fmat4x3;\r\n\t\r\n\t/// Medium single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f32, mediump> mediump_fmat4x4;\r\n\t\r\n\t/// Medium single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef mediump_fmat1x1 mediump_fmat1;\r\n\t\r\n\t/// Medium single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_fmat2x2 mediump_fmat2;\r\n\t\r\n\t/// Medium single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_fmat3x3 mediump_fmat3;\r\n\t\r\n\t/// Medium single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_fmat4x4 mediump_fmat4;\r\n\t\r\n\r\n\t\r\n\t/// High single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef highp_f32 highp_fmat1x1;\r\n\t\r\n\t/// High single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f32, highp> highp_fmat2x2;\r\n\t\r\n\t/// High single-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f32, highp> highp_fmat2x3;\r\n\t\r\n\t/// High single-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f32, highp> highp_fmat2x4;\r\n\t\r\n\t/// High single-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f32, highp> highp_fmat3x2;\r\n\t\r\n\t/// High single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f32, highp> highp_fmat3x3;\r\n\t\r\n\t/// High single-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f32, highp> highp_fmat3x4;\r\n\t\r\n\t/// High single-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f32, highp> highp_fmat4x2;\r\n\t\r\n\t/// High single-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f32, highp> highp_fmat4x3;\r\n\t\r\n\t/// High single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f32, highp> highp_fmat4x4;\r\n\t\r\n\t/// High single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef highp_fmat1x1 highp_fmat1;\r\n\t\r\n\t/// High single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_fmat2x2 highp_fmat2;\r\n\t\r\n\t/// High single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_fmat3x3 highp_fmat3;\r\n\t\r\n\t/// High single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_fmat4x4 highp_fmat4;\r\n\r\n\r\n\t/// Low single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef f32 lowp_f32mat1x1;\r\n\t\r\n\t/// Low single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f32, lowp> lowp_f32mat2x2;\r\n\t\r\n\t/// Low single-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f32, lowp> lowp_f32mat2x3;\r\n\t\r\n\t/// Low single-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f32, lowp> lowp_f32mat2x4;\r\n\t\r\n\t/// Low single-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f32, lowp> lowp_f32mat3x2;\r\n\t\r\n\t/// Low single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f32, lowp> lowp_f32mat3x3;\r\n\t\r\n\t/// Low single-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f32, lowp> lowp_f32mat3x4;\r\n\t\r\n\t/// Low single-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f32, lowp> lowp_f32mat4x2;\r\n\t\r\n\t/// Low single-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f32, lowp> lowp_f32mat4x3;\r\n\t\r\n\t/// Low single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f32, lowp> lowp_f32mat4x4;\r\n\t\r\n\t/// Low single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef detail::tmat1x1<f32, lowp> lowp_f32mat1;\r\n\t\r\n\t/// Low single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_f32mat2x2 lowp_f32mat2;\r\n\t\r\n\t/// Low single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_f32mat3x3 lowp_f32mat3;\r\n\t\r\n\t/// Low single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_f32mat4x4 lowp_f32mat4;\r\n\r\n\r\n\r\n\t/// High single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef f32 mediump_f32mat1x1;\r\n\t\r\n\t/// Low single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f32, mediump> mediump_f32mat2x2;\r\n\t\r\n\t/// Medium single-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f32, mediump> mediump_f32mat2x3;\r\n\t\r\n\t/// Medium single-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f32, mediump> mediump_f32mat2x4;\r\n\t\r\n\t/// Medium single-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f32, mediump> mediump_f32mat3x2;\r\n\t\r\n\t/// Medium single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f32, mediump> mediump_f32mat3x3;\r\n\t\r\n\t/// Medium single-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f32, mediump> mediump_f32mat3x4;\r\n\t\r\n\t/// Medium single-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f32, mediump> mediump_f32mat4x2;\r\n\t\r\n\t/// Medium single-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f32, mediump> mediump_f32mat4x3;\r\n\t\r\n\t/// Medium single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f32, mediump> mediump_f32mat4x4;\r\n\t\r\n\t/// Medium single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef detail::tmat1x1<f32, mediump> f32mat1;\r\n\t\r\n\t/// Medium single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_f32mat2x2 mediump_f32mat2;\r\n\t\r\n\t/// Medium single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_f32mat3x3 mediump_f32mat3;\r\n\t\r\n\t/// Medium single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_f32mat4x4 mediump_f32mat4;\r\n\r\n\r\n\r\n\t\r\n\t/// High single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef f32 highp_f32mat1x1;\r\n\t\r\n\t/// High single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f32, highp> highp_f32mat2x2;\r\n\t\r\n\t/// High single-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f32, highp> highp_f32mat2x3;\r\n\t\r\n\t/// High single-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f32, highp> highp_f32mat2x4;\r\n\t\r\n\t/// High single-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f32, highp> highp_f32mat3x2;\r\n\t\r\n\t/// High single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f32, highp> highp_f32mat3x3;\r\n\t\r\n\t/// High single-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f32, highp> highp_f32mat3x4;\r\n\t\r\n\t/// High single-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f32, highp> highp_f32mat4x2;\r\n\t\r\n\t/// High single-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f32, highp> highp_f32mat4x3;\r\n\t\r\n\t/// High single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f32, highp> highp_f32mat4x4;\r\n\t\r\n\t/// High single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef detail::tmat1x1<f32, highp> f32mat1;\r\n\t\r\n\t/// High single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat2x2 highp_f32mat2;\r\n\t\r\n\t/// High single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat3x3 highp_f32mat3;\r\n\t\r\n\t/// High single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat4x4 highp_f32mat4;\r\n\t\r\n\r\n\r\n\t/// Low double-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef f64 lowp_f64mat1x1;\r\n\t\r\n\t/// Low double-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f64, lowp> lowp_f64mat2x2;\r\n\t\r\n\t/// Low double-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f64, lowp> lowp_f64mat2x3;\r\n\t\r\n\t/// Low double-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f64, lowp> lowp_f64mat2x4;\r\n\t\r\n\t/// Low double-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f64, lowp> lowp_f64mat3x2;\r\n\t\r\n\t/// Low double-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f64, lowp> lowp_f64mat3x3;\r\n\t\r\n\t/// Low double-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f64, lowp> lowp_f64mat3x4;\r\n\t\r\n\t/// Low double-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f64, lowp> lowp_f64mat4x2;\r\n\t\r\n\t/// Low double-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f64, lowp> lowp_f64mat4x3;\r\n\t\r\n\t/// Low double-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f64, lowp> lowp_f64mat4x4;\r\n\r\n\t/// Low double-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef lowp_f64mat1x1 lowp_f64mat1;\r\n\t\r\n\t/// Low double-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_f64mat2x2 lowp_f64mat2;\r\n\t\r\n\t/// Low double-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_f64mat3x3 lowp_f64mat3;\r\n\t\r\n\t/// Low double-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef lowp_f64mat4x4 lowp_f64mat4;\r\n\r\n\t\r\n\t\r\n\t/// Medium double-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef f64 Highp_f64mat1x1;\r\n\t\r\n\t/// Medium double-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f64, mediump> mediump_f64mat2x2;\r\n\t\r\n\t/// Medium double-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f64, mediump> mediump_f64mat2x3;\r\n\t\r\n\t/// Medium double-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f64, mediump> mediump_f64mat2x4;\r\n\t\r\n\t/// Medium double-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f64, mediump> mediump_f64mat3x2;\r\n\t\r\n\t/// Medium double-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f64, mediump> mediump_f64mat3x3;\r\n\t\r\n\t/// Medium double-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f64, mediump> mediump_f64mat3x4;\r\n\t\r\n\t/// Medium double-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f64, mediump> mediump_f64mat4x2;\r\n\t\r\n\t/// Medium double-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f64, mediump> mediump_f64mat4x3;\r\n\t\r\n\t/// Medium double-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f64, mediump> mediump_f64mat4x4;\r\n\r\n\t/// Medium double-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef mediump_f64mat1x1 mediump_f64mat1;\r\n\t\r\n\t/// Medium double-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_f64mat2x2 mediump_f64mat2;\r\n\t\r\n\t/// Medium double-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_f64mat3x3 mediump_f64mat3;\r\n\t\r\n\t/// Medium double-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef mediump_f64mat4x4 mediump_f64mat4;\r\n\t\r\n\t/// High double-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef f64 highp_f64mat1x1;\r\n\t\r\n\t/// High double-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f64, highp> highp_f64mat2x2;\r\n\t\r\n\t/// High double-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f64, highp> highp_f64mat2x3;\r\n\t\r\n\t/// High double-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f64, highp> highp_f64mat2x4;\r\n\t\r\n\t/// High double-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f64, highp> highp_f64mat3x2;\r\n\t\r\n\t/// High double-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f64, highp> highp_f64mat3x3;\r\n\t\r\n\t/// High double-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f64, highp> highp_f64mat3x4;\r\n\t\r\n\t/// High double-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f64, highp> highp_f64mat4x2;\r\n\t\r\n\t/// High double-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f64, highp> highp_f64mat4x3;\r\n\t\r\n\t/// High double-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f64, highp> highp_f64mat4x4;\r\n\r\n\t/// High double-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef highp_f64mat1x1 highp_f64mat1;\r\n\t\r\n\t/// High double-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat2x2 highp_f64mat2;\r\n\t\r\n\t/// High double-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat3x3 highp_f64mat3;\r\n\t\r\n\t/// High double-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat4x4 highp_f64mat4;\r\n\t\r\n\t//////////////////////////\r\n\t// Quaternion types\r\n\r\n\t/// Low single-precision floating-point quaternion.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tquat<f32, lowp> lowp_f32quat;\r\n\t\r\n\t/// Low double-precision floating-point quaternion.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tquat<f64, lowp> lowp_f64quat;\r\n\t\r\n\t/// Medium single-precision floating-point quaternion.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tquat<f32, mediump> mediump_f32quat;\r\n\t\r\n\t/// Medium double-precision floating-point quaternion.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tquat<f64, mediump> mediump_f64quat;\r\n\t\r\n\t/// High single-precision floating-point quaternion.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tquat<f32, highp> highp_f32quat;\r\n\t\r\n\t/// High double-precision floating-point quaternion.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tquat<f64, highp> highp_f64quat;\r\n\t\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef lowp_f32vec1\t\t\tfvec1;\r\n\ttypedef lowp_f32vec2\t\t\tfvec2;\r\n\ttypedef lowp_f32vec3\t\t\tfvec3;\r\n\ttypedef lowp_f32vec4\t\t\tfvec4;\r\n\ttypedef lowp_f32mat2\t\t\tfmat2;\r\n\ttypedef lowp_f32mat3\t\t\tfmat3;\r\n\ttypedef lowp_f32mat4\t\t\tfmat4;\r\n\ttypedef lowp_f32mat2x2\t\t\tfmat2x2;\r\n\ttypedef lowp_f32mat3x2\t\t\tfmat3x2;\r\n\ttypedef lowp_f32mat4x2\t\t\tfmat4x2;\r\n\ttypedef lowp_f32mat2x3\t\t\tfmat2x3;\r\n\ttypedef lowp_f32mat3x3\t\t\tfmat3x3;\r\n\ttypedef lowp_f32mat4x3\t\t\tfmat4x3;\r\n\ttypedef lowp_f32mat2x4\t\t\tfmat2x4;\r\n\ttypedef lowp_f32mat3x4\t\t\tfmat3x4;\r\n\ttypedef lowp_f32mat4x4\t\t\tfmat4x4;\r\n\ttypedef lowp_f32quat\t\t\tfquat;\r\n\r\n\ttypedef lowp_f32vec1\t\t\tf32vec1;\r\n\ttypedef lowp_f32vec2\t\t\tf32vec2;\r\n\ttypedef lowp_f32vec3\t\t\tf32vec3;\r\n\ttypedef lowp_f32vec4\t\t\tf32vec4;\r\n\ttypedef lowp_f32mat2\t\t\tf32mat2;\r\n\ttypedef lowp_f32mat3\t\t\tf32mat3;\r\n\ttypedef lowp_f32mat4\t\t\tf32mat4;\r\n\ttypedef lowp_f32mat2x2\t\t\tf32mat2x2;\r\n\ttypedef lowp_f32mat3x2\t\t\tf32mat3x2;\r\n\ttypedef lowp_f32mat4x2\t\t\tf32mat4x2;\r\n\ttypedef lowp_f32mat2x3\t\t\tf32mat2x3;\r\n\ttypedef lowp_f32mat3x3\t\t\tf32mat3x3;\r\n\ttypedef lowp_f32mat4x3\t\t\tf32mat4x3;\r\n\ttypedef lowp_f32mat2x4\t\t\tf32mat2x4;\r\n\ttypedef lowp_f32mat3x4\t\t\tf32mat3x4;\r\n\ttypedef lowp_f32mat4x4\t\t\tf32mat4x4;\r\n\ttypedef lowp_f32quat\t\t\tf32quat;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))\r\n\ttypedef mediump_f32vec1\t\t\tfvec1;\r\n\ttypedef mediump_f32vec2\t\t\tfvec2;\r\n\ttypedef mediump_f32vec3\t\t\tfvec3;\r\n\ttypedef mediump_f32vec4\t\t\tfvec4;\r\n\ttypedef mediump_f32mat2\t\t\tfmat2;\r\n\ttypedef mediump_f32mat3\t\t\tfmat3;\r\n\ttypedef mediump_f32mat4\t\t\tfmat4;\r\n\ttypedef mediump_f32mat2x2\t\tfmat2x2;\r\n\ttypedef mediump_f32mat3x2\t\tfmat3x2;\r\n\ttypedef mediump_f32mat4x2\t\tfmat4x2;\r\n\ttypedef mediump_f32mat2x3\t\tfmat2x3;\r\n\ttypedef mediump_f32mat3x3\t\tfmat3x3;\r\n\ttypedef mediump_f32mat4x3\t\tfmat4x3;\r\n\ttypedef mediump_f32mat2x4\t\tfmat2x4;\r\n\ttypedef mediump_f32mat3x4\t\tfmat3x4;\r\n\ttypedef mediump_f32mat4x4\t\tfmat4x4;\r\n\ttypedef mediump_f32quat\t\t\tfquat;\r\n\r\n\ttypedef mediump_f32vec1\t\t\tf32vec1;\r\n\ttypedef mediump_f32vec2\t\t\tf32vec2;\r\n\ttypedef mediump_f32vec3\t\t\tf32vec3;\r\n\ttypedef mediump_f32vec4\t\t\tf32vec4;\r\n\ttypedef mediump_f32mat2\t\t\tf32mat2;\r\n\ttypedef mediump_f32mat3\t\t\tf32mat3;\r\n\ttypedef mediump_f32mat4\t\t\tf32mat4;\r\n\ttypedef mediump_f32mat2x2\t\tf32mat2x2;\r\n\ttypedef mediump_f32mat3x2\t\tf32mat3x2;\r\n\ttypedef mediump_f32mat4x2\t\tf32mat4x2;\r\n\ttypedef mediump_f32mat2x3\t\tf32mat2x3;\r\n\ttypedef mediump_f32mat3x3\t\tf32mat3x3;\r\n\ttypedef mediump_f32mat4x3\t\tf32mat4x3;\r\n\ttypedef mediump_f32mat2x4\t\tf32mat2x4;\r\n\ttypedef mediump_f32mat3x4\t\tf32mat3x4;\r\n\ttypedef mediump_f32mat4x4\t\tf32mat4x4;\r\n\ttypedef mediump_f32quat\t\t\tf32quat;\r\n#else//if(defined(GLM_PRECISION_HIGHP_FLOAT))\r\n\t/// Default single-precision floating-point vector of 1 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32vec1\t\t\tfvec1;\r\n\r\n\t/// Default single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32vec2\t\t\tfvec2;\r\n\t\r\n\t/// Default single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32vec3\t\t\tfvec3;\r\n\t\r\n\t/// Default single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32vec4\t\t\tfvec4;\r\n\r\n\t/// Default single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat2x2\t\t\tfmat2x2;\r\n\r\n\t/// Default single-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat2x3\t\t\tfmat2x3;\r\n\t\t\r\n\t/// Default single-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat2x4\t\t\tfmat2x4;\r\n\r\n\t/// Default single-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat3x2\t\t\tfmat3x2;\r\n\r\n\t/// Default single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat3x3\t\t\tfmat3x3;\r\n\t\t\r\n\t/// Default single-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat3x4\t\t\tfmat3x4;\r\n\r\n\t/// Default single-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat4x2\t\t\tfmat4x2;\r\n\r\n\t/// Default single-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat4x3\t\t\tfmat4x3;\r\n\t\t\r\n\t/// Default single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat4x4\t\t\tfmat4x4;\r\n\t\r\n\t/// Default single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef fmat2x2\t\t\t\t\tfmat2;\r\n\r\n\t/// Default single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef fmat3x3\t\t\t\t\tfmat3;\r\n\r\n\t/// Default single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef fmat4x4\t\t\t\t\tfmat4;\r\n\t\r\n\t/// Default single-precision floating-point quaternion.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_fquat\t\t\t\tfquat;\r\n\t\r\n\r\n\r\n\t/// Default single-precision floating-point vector of 1 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32vec1\t\t\tf32vec1;\r\n\r\n\t/// Default single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32vec2\t\t\tf32vec2;\r\n\t\r\n\t/// Default single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32vec3\t\t\tf32vec3;\r\n\t\r\n\t/// Default single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32vec4\t\t\tf32vec4;\r\n\r\n\t/// Default single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat2x2\t\t\tf32mat2x2;\r\n\r\n\t/// Default single-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat2x3\t\t\tf32mat2x3;\r\n\t\t\r\n\t/// Default single-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat2x4\t\t\tf32mat2x4;\r\n\r\n\t/// Default single-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat3x2\t\t\tf32mat3x2;\r\n\r\n\t/// Default single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat3x3\t\t\tf32mat3x3;\r\n\t\t\r\n\t/// Default single-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat3x4\t\t\tf32mat3x4;\r\n\r\n\t/// Default single-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat4x2\t\t\tf32mat4x2;\r\n\r\n\t/// Default single-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat4x3\t\t\tf32mat4x3;\r\n\t\t\r\n\t/// Default single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32mat4x4\t\t\tf32mat4x4;\r\n\t\r\n\t/// Default single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef f32mat2x2\t\t\t\tf32mat2;\r\n\r\n\t/// Default single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef f32mat3x3\t\t\t\tf32mat3;\r\n\r\n\t/// Default single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef f32mat4x4\t\t\t\tf32mat4;\r\n\t\r\n\t/// Default single-precision floating-point quaternion.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f32quat\t\t\tf32quat;\r\n#endif\r\n\r\n\t\r\n#if(defined(GLM_PRECISION_LOWP_DOUBLE))\r\n\ttypedef lowp_f64vec1\t\t\tf64vec1;\r\n\ttypedef lowp_f64vec2\t\t\tf64vec2;\r\n\ttypedef lowp_f64vec3\t\t\tf64vec3;\r\n\ttypedef lowp_f64vec4\t\t\tf64vec4;\r\n\ttypedef lowp_f64mat2\t\t\tf64mat2;\r\n\ttypedef lowp_f64mat3\t\t\tf64mat3;\r\n\ttypedef lowp_f64mat4\t\t\tf64mat4;\r\n\ttypedef lowp_f64mat2x2\t\t\tf64mat2x2;\r\n\ttypedef lowp_f64mat3x2\t\t\tf64mat3x2;\r\n\ttypedef lowp_f64mat4x2\t\t\tf64mat4x2;\r\n\ttypedef lowp_f64mat2x3\t\t\tf64mat2x3;\r\n\ttypedef lowp_f64mat3x3\t\t\tf64mat3x3;\r\n\ttypedef lowp_f64mat4x3\t\t\tf64mat4x3;\r\n\ttypedef lowp_f64mat2x4\t\t\tf64mat2x4;\r\n\ttypedef lowp_f64mat3x4\t\t\tf64mat3x4;\r\n\ttypedef lowp_f64mat4x4\t\t\tf64mat4x4;\r\n\ttypedef lowp_f64quat\t\t\tf64quat;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_DOUBLE))\r\n\ttypedef mediump_f64vec1\t\t\tf64vec1;\r\n\ttypedef mediump_f64vec2\t\t\tf64vec2;\r\n\ttypedef mediump_f64vec3\t\t\tf64vec3;\r\n\ttypedef mediump_f64vec4\t\t\tf64vec4;\r\n\ttypedef mediump_f64mat2\t\t\tf64mat2;\r\n\ttypedef mediump_f64mat3\t\t\tf64mat3;\r\n\ttypedef mediump_f64mat4\t\t\tf64mat4;\r\n\ttypedef mediump_f64mat2x2\t\tf64mat2x2;\r\n\ttypedef mediump_f64mat3x2\t\tf64mat3x2;\r\n\ttypedef mediump_f64mat4x2\t\tf64mat4x2;\r\n\ttypedef mediump_f64mat2x3\t\tf64mat2x3;\r\n\ttypedef mediump_f64mat3x3\t\tf64mat3x3;\r\n\ttypedef mediump_f64mat4x3\t\tf64mat4x3;\r\n\ttypedef mediump_f64mat2x4\t\tf64mat2x4;\r\n\ttypedef mediump_f64mat3x4\t\tf64mat3x4;\r\n\ttypedef mediump_f64mat4x4\t\tf64mat4x4;\r\n\ttypedef mediump_f64quat\t\t\tf64quat;\r\n#else\r\n\t/// Default double-precision floating-point vector of 1 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64vec1\t\t\tf64vec1;\r\n\r\n\t/// Default double-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64vec2\t\t\tf64vec2;\r\n\t\r\n\t/// Default double-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64vec3\t\t\tf64vec3;\r\n\t\r\n\t/// Default double-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64vec4\t\t\tf64vec4;\r\n\r\n\t/// Default double-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat2x2\t\t\tf64mat2x2;\r\n\r\n\t/// Default double-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat2x3\t\t\tf64mat2x3;\r\n\t\t\r\n\t/// Default double-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat2x4\t\t\tf64mat2x4;\r\n\r\n\t/// Default double-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat3x2\t\t\tf64mat3x2;\r\n\r\n\t/// Default double-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat3x3\t\t\tf64mat3x3;\r\n\r\n\t/// Default double-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat3x4\t\t\tf64mat3x4;\r\n\r\n\t/// Default double-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat4x2\t\t\tf64mat4x2;\r\n\r\n\t/// Default double-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat4x3\t\t\tf64mat4x3;\r\n\r\n\t/// Default double-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64mat4x4\t\t\tf64mat4x4;\r\n\r\n\t/// Default double-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef f64mat2x2\t\t\t\tf64mat2;\r\n\r\n\t/// Default double-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef f64mat3x3\t\t\t\tf64mat3;\r\n\r\n\t/// Default double-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef f64mat4x4\t\t\t\tf64mat4;\r\n\r\n\t/// Default double-precision floating-point quaternion.\r\n\t/// @see gtc_type_precision\r\n\ttypedef highp_f64quat\t\t\tf64quat;\r\n#endif\r\n}//namespace glm\r\n\r\n#endif//GLM_FWD_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/geometric.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/geometric.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GEOMETRIC_INCLUDED\r\n#define GLM_GEOMETRIC_INCLUDED\r\n\r\n#include \"detail/func_geometric.hpp\"\r\n\r\n#endif//GLM_GEOMETRIC_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/glm.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/glm.hpp\r\n/// @date 2005-01-14 / 2011-10-24\r\n/// @author Christophe Riccio\r\n///\r\n///\t@defgroup core GLM Core\r\n///\t\r\n///\t@brief The core of GLM, which implements exactly and only the GLSL specification to the degree possible.\r\n///\r\n/// The GLM core consists of @ref core_types \"C++ types that mirror GLSL types\" and\r\n/// C++ functions that mirror the GLSL functions. It also includes \r\n/// @ref core_precision \"a set of precision-based types\" that can be used in the appropriate\r\n/// functions. The C++ types are all based on a basic set of @ref core_template \"template types\".\r\n/// \r\n/// The best documentation for GLM Core is the current GLSL specification,\r\n/// <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.clean.pdf\">version 4.2\r\n/// (pdf file)</a>.\r\n/// There are a few @ref pg_differences \"differences\" between GLM core and GLSL.\r\n/// \r\n/// GLM core functionnalities require <glm/glm.hpp> to be included to be used.\r\n/// \r\n/// @defgroup core_types Types\r\n/// \r\n/// @brief The standard types defined by the specification.\r\n/// \r\n/// These types are all typedefs of more generalized, template types. To see the definiton\r\n/// of these template types, go to @ref core_template.\r\n/// \r\n/// @ingroup core\r\n/// \r\n/// @defgroup core_precision Precision types\r\n/// \r\n/// @brief Non-GLSL types that are used to define precision-based types.\r\n/// \r\n/// The GLSL language allows the user to define the precision of a particular variable.\r\n/// In OpenGL's GLSL, these precision qualifiers have no effect; they are there for compatibility\r\n/// with OpenGL ES's precision qualifiers, where they @em do have an effect.\r\n/// \r\n/// C++ has no language equivalent to precision qualifiers. So GLM provides the next-best thing:\r\n/// a number of typedefs of the @ref core_template that use a particular precision.\r\n/// \r\n/// None of these types make any guarantees about the actual precision used.\r\n/// \r\n/// @ingroup core\r\n/// \r\n/// @defgroup core_template Template types\r\n/// \r\n/// @brief The generic template types used as the basis for the core types. \r\n/// \r\n/// These types are all templates used to define the actual @ref core_types.\r\n/// These templetes are implementation details of GLM types and should not be used explicitly.\r\n/// \r\n/// @ingroup core\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"detail/_fixes.hpp\"\r\n\r\n#ifndef GLM_INCLUDED\r\n#define GLM_INCLUDED\r\n\r\n#include <cmath>\r\n#include <climits>\r\n#include <cfloat>\r\n#include <limits>\r\n#include <cassert>\r\n#include \"fwd.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_CORE_INCLUDED_DISPLAYED))\r\n#\tdefine GLM_MESSAGE_CORE_INCLUDED_DISPLAYED\r\n#\tpragma message(\"GLM: Core library included\")\r\n#endif//GLM_MESSAGE\r\n\r\n#include \"vec2.hpp\"\r\n#include \"vec3.hpp\"\r\n#include \"vec4.hpp\"\r\n#include \"mat2x2.hpp\"\r\n#include \"mat2x3.hpp\"\r\n#include \"mat2x4.hpp\"\r\n#include \"mat3x2.hpp\"\r\n#include \"mat3x3.hpp\"\r\n#include \"mat3x4.hpp\"\r\n#include \"mat4x2.hpp\"\r\n#include \"mat4x3.hpp\"\r\n#include \"mat4x4.hpp\"\r\n\r\n#include \"trigonometric.hpp\"\r\n#include \"exponential.hpp\"\r\n#include \"common.hpp\"\r\n#include \"packing.hpp\"\r\n#include \"geometric.hpp\"\r\n#include \"matrix.hpp\"\r\n#include \"vector_relational.hpp\"\r\n#include \"integer.hpp\"\r\n\r\n#endif//GLM_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/gtc/constants.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_constants\r\n/// @file glm/gtc/constants.hpp\r\n/// @date 2011-09-30 / 2012-01-25\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_half_float (dependence)\r\n///\r\n/// @defgroup gtc_constants GLM_GTC_constants\r\n/// @ingroup gtc\r\n/// \r\n/// @brief Provide a list of constants and precomputed useful values.\r\n/// \r\n/// <glm/gtc/constants.hpp> need to be included to use these features.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_constants\r\n#define GLM_GTC_constants\r\n\r\n// Dependencies\r\n#include \"../detail/setup.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_constants extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_constants\r\n\t/// @{\r\n\r\n\t/// Return the epsilon constant for floating point types.\r\n\t/// @todo Implement epsilon for half-precision floating point type.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType epsilon();\r\n\r\n\t/// Return 0.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType zero();\r\n\r\n\t/// Return 1.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType one();\r\n\r\n\t/// Return the pi constant.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType pi();\r\n\r\n\t/// Return square root of pi.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType root_pi();\r\n\r\n\t/// Return pi / 2.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType half_pi();\r\n\r\n\t/// Return pi / 4.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType quarter_pi();\r\n\r\n\t/// Return 1 / pi.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType one_over_pi();\r\n\r\n\t/// Return 2 / pi.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType two_over_pi();\r\n\r\n\t/// Return 2 / sqrt(pi).\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType two_over_root_pi();\r\n\r\n\t/// Return 1 / sqrt(2).\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType one_over_root_two();\r\n\r\n\t/// Return sqrt(pi / 2).\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType root_half_pi();\r\n\r\n\t/// Return sqrt(2 * pi).\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType root_two_pi();\r\n\r\n\t/// Return sqrt(ln(4)).\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType root_ln_four();\r\n\r\n\t/// Return e constant.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType e();\r\n\r\n\t/// Return Euler's constant.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType euler();\r\n\r\n\t/// Return sqrt(2).\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType root_two();\r\n\r\n\t/// Return sqrt(3).\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType root_three();\r\n\r\n\t/// Return sqrt(5).\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType root_five();\r\n\r\n\t/// Return ln(2).\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType ln_two();\r\n\r\n\t/// Return ln(10).\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType ln_ten();\r\n\r\n\t/// Return ln(ln(2)).\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType ln_ln_two();\r\n\r\n\t/// Return 1 / 3.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType third();\r\n\r\n\t/// Return 2 / 3.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType two_thirds();\r\n\r\n\t/// Return the golden ratio constant.\r\n\t/// @see gtc_constants\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType golden_ratio();\r\n\r\n\t/// @}\r\n} //namespace glm\r\n\r\n#include \"constants.inl\"\r\n\r\n#endif//GLM_GTC_constants\r\n"
  },
  {
    "path": "gpu/glm/gtc/constants.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_constants\r\n/// @file glm/gtx/constants.inl\r\n/// @date 2011-10-14 / 2012-01-25\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include <limits>\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType epsilon()\r\n\t{\r\n\t\treturn std::numeric_limits<genType>::epsilon();\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType zero()\r\n\t{\r\n\t\treturn genType(0);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType one()\r\n\t{\r\n\t\treturn genType(1);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType pi()\r\n\t{\r\n\t\treturn genType(3.14159265358979323846264338327950288);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType root_pi()\r\n\t{\r\n\t\treturn genType(1.772453850905516027);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType half_pi()\r\n\t{\r\n\t\treturn genType(1.57079632679489661923132169163975144);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType quarter_pi()\r\n\t{\r\n\t\treturn genType(0.785398163397448309615660845819875721);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType one_over_pi()\r\n\t{\r\n\t\treturn genType(0.318309886183790671537767526745028724);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType two_over_pi()\r\n\t{\r\n\t\treturn genType(0.636619772367581343075535053490057448);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType two_over_root_pi()\r\n\t{\r\n\t\treturn genType(1.12837916709551257389615890312154517);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType one_over_root_two()\r\n\t{\r\n\t\treturn genType(0.707106781186547524400844362104849039);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType root_half_pi()\r\n\t{\r\n\t\treturn genType(1.253314137315500251);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType root_two_pi()\r\n\t{\r\n\t\treturn genType(2.506628274631000502);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType root_ln_four()\r\n\t{\r\n\t\treturn genType(1.17741002251547469);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType e()\r\n\t{\r\n\t\treturn genType(2.71828182845904523536);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType euler()\r\n\t{\r\n\t\treturn genType(0.577215664901532860606);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType root_two()\r\n\t{\r\n\t\treturn genType(1.41421356237309504880168872420969808);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType root_three()\r\n\t{\r\n\t\treturn genType(1.73205080756887729352744634150587236);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType root_five()\r\n\t{\r\n\t\treturn genType(2.23606797749978969640917366873127623);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType ln_two()\r\n\t{\r\n\t\treturn genType(0.693147180559945309417232121458176568);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType ln_ten()\r\n\t{\r\n\t\treturn genType(2.30258509299404568401799145468436421);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType ln_ln_two()\r\n\t{\r\n\t\treturn genType(-0.3665129205816643);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType third()\r\n\t{\r\n\t\treturn genType(0.3333333333333333333333333333333333333333);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType two_thirds()\r\n\t{\r\n\t\treturn genType(0.666666666666666666666666666666666666667);\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType golden_ratio()\r\n\t{\r\n\t\treturn genType(1.61803398874989484820458683436563811);\r\n\t}\r\n} //namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtc/epsilon.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_epsilon\r\n/// @file glm/gtc/epsilon.hpp\r\n/// @date 2012-04-07 / 2012-04-07\r\n/// @author Christophe Riccio\r\n/// \r\n/// @see core (dependence)\r\n/// @see gtc_half_float (dependence)\r\n/// @see gtc_quaternion (dependence)\r\n///\r\n/// @defgroup gtc_epsilon GLM_GTC_epsilon\r\n/// @ingroup gtc\r\n/// \r\n/// @brief Comparison functions for a user defined epsilon values.\r\n/// \r\n/// <glm/gtc/epsilon.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_epsilon\r\n#define GLM_GTC_epsilon\r\n\r\n// Dependencies\r\n#include \"../detail/setup.hpp\"\r\n#include \"../detail/precision.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_epsilon extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_epsilon\r\n\t/// @{\r\n\r\n\t/// Returns the component-wise comparison of |x - y| < epsilon.\r\n\t/// True if this expression is satisfied.\r\n\t///\r\n\t/// @see gtc_epsilon\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL vecType<bool, P> epsilonEqual(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y,\r\n\t\tT const & epsilon);\r\n\r\n\t/// Returns the component-wise comparison of |x - y| < epsilon.\r\n\t/// True if this expression is satisfied.\r\n\t///\r\n\t/// @see gtc_epsilon\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL bool epsilonEqual(\r\n\t\tgenType const & x,\r\n\t\tgenType const & y,\r\n\t\tgenType const & epsilon);\r\n\r\n\t/// Returns the component-wise comparison of |x - y| < epsilon.\r\n\t/// True if this expression is not satisfied.\r\n\t///\r\n\t/// @see gtc_epsilon\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL typename genType::boolType epsilonNotEqual(\r\n\t\tgenType const & x,\r\n\t\tgenType const & y,\r\n\t\ttypename genType::value_type const & epsilon);\r\n\r\n\t/// Returns the component-wise comparison of |x - y| >= epsilon.\r\n\t/// True if this expression is not satisfied.\r\n\t///\r\n\t/// @see gtc_epsilon\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL bool epsilonNotEqual(\r\n\t\tgenType const & x,\r\n\t\tgenType const & y,\r\n\t\tgenType const & epsilon);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"epsilon.inl\"\r\n\r\n#endif//GLM_GTC_epsilon\r\n"
  },
  {
    "path": "gpu/glm/gtc/epsilon.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_epsilon\r\n/// @file glm/gtc/epsilon.inl\r\n/// @date 2012-04-07 / 2012-04-07\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n// Dependency:\r\n#include \"quaternion.hpp\"\r\n#include \"../vector_relational.hpp\"\r\n#include \"../common.hpp\"\r\n#include \"../vec2.hpp\"\r\n#include \"../vec3.hpp\"\r\n#include \"../vec4.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER bool epsilonEqual\r\n\t(\r\n\t\tfloat const & x,\r\n\t\tfloat const & y,\r\n\t\tfloat const & epsilon\r\n\t)\r\n\t{\r\n\t\treturn abs(x - y) < epsilon;\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER bool epsilonEqual\r\n\t(\r\n\t\tdouble const & x,\r\n\t\tdouble const & y,\r\n\t\tdouble const & epsilon\r\n\t)\r\n\t{\r\n\t\treturn abs(x - y) < epsilon;\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER bool epsilonNotEqual\r\n\t(\r\n\t\tfloat const & x,\r\n\t\tfloat const & y,\r\n\t\tfloat const & epsilon\r\n\t)\r\n\t{\r\n\t\treturn abs(x - y) >= epsilon;\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER bool epsilonNotEqual\r\n\t(\r\n\t\tdouble const & x,\r\n\t\tdouble const & y,\r\n\t\tdouble const & epsilon\r\n\t)\r\n\t{\r\n\t\treturn abs(x - y) >= epsilon;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<bool, P> epsilonEqual\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\treturn lessThan(abs(x - y), vecType<T, P>(epsilon));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<bool, P> epsilonEqual\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y,\r\n\t\tvecType<T, P> const & epsilon\r\n\t)\r\n\t{\r\n\t\treturn lessThan(abs(x - y), vecType<T, P>(epsilon));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<bool, P> epsilonNotEqual\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\treturn greaterThanEqual(abs(x - y), vecType<T, P>(epsilon));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<bool, P> epsilonNotEqual\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y,\r\n\t\tvecType<T, P> const & epsilon\r\n\t)\r\n\t{\r\n\t\treturn greaterThanEqual(abs(x - y), vecType<T, P>(epsilon));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P> epsilonEqual\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<T, P> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w);\r\n\t\treturn lessThan(abs(v), detail::tvec4<T, P>(epsilon));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P> epsilonNotEqual\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<T, P> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w);\r\n\t\treturn greaterThanEqual(abs(v), detail::tvec4<T, P>(epsilon));\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtc/matrix_access.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n/// \r\n/// @ref gtc_matrix_access\r\n/// @file glm/gtc/matrix_access.hpp\r\n/// @date 2005-12-27 / 2011-05-16\r\n/// @author Christophe Riccio\r\n/// \r\n/// @see core (dependence)\r\n/// \r\n/// @defgroup gtc_matrix_access GLM_GTC_matrix_access\r\n/// @ingroup gtc\r\n/// \r\n/// Defines functions to access rows or columns of a matrix easily.\r\n/// <glm/gtc/matrix_access.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_matrix_access\r\n#define GLM_GTC_matrix_access\r\n\r\n// Dependency:\r\n#include \"../detail/setup.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_matrix_access extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_matrix_access\r\n\t/// @{\r\n\r\n\t/// Get a specific row of a matrix.\r\n\t/// @see gtc_matrix_access\r\n\ttemplate <typename genType>\r\n\ttypename genType::row_type row(\r\n\t\tgenType const & m, \r\n\t\tlength_t const & index);\r\n\r\n\t/// Set a specific row to a matrix.\r\n\t/// @see gtc_matrix_access\r\n\ttemplate <typename genType>\r\n\tgenType row(\r\n\t\tgenType const & m,\r\n\t\tlength_t const & index,\r\n\t\ttypename genType::row_type const & x);\r\n\r\n\t/// Get a specific column of a matrix.\r\n\t/// @see gtc_matrix_access\r\n\ttemplate <typename genType>\r\n\ttypename genType::col_type column(\r\n\t\tgenType const & m,\r\n\t\tlength_t const & index);\r\n\r\n\t/// Set a specific column to a matrix.\r\n\t/// @see gtc_matrix_access\r\n\ttemplate <typename genType>\r\n\tgenType column(\r\n\t\tgenType const & m,\r\n\t\tlength_t const & index,\r\n\t\ttypename genType::col_type const & x);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"matrix_access.inl\"\r\n\r\n#endif//GLM_GTC_matrix_access\r\n"
  },
  {
    "path": "gpu/glm/gtc/matrix_access.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_matrix_access\r\n/// @file glm/gtc/matrix_access.inl\r\n/// @date 2005-12-27 / 2011-06-05\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType row\r\n\t(\r\n\t\tgenType const & m,\r\n\t\tlength_t const & index,\r\n\t\ttypename genType::row_type const & x\r\n\t)\r\n\t{\r\n\t\tassert(index >= 0 && index < m[0].length());\r\n\r\n\t\tgenType Result = m;\r\n\t\tfor(length_t i = 0; i < m.length(); ++i)\r\n\t\t\tResult[i][index] = x[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER typename genType::row_type row\r\n\t(\r\n\t\tgenType const & m,\r\n\t\tlength_t const & index\r\n\t)\r\n\t{\r\n\t\tassert(index >= 0 && index < m[0].length());\r\n\r\n\t\ttypename genType::row_type Result;\r\n\t\tfor(length_t i = 0; i < m.length(); ++i)\r\n\t\t\tResult[i] = m[i][index];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType column\r\n\t(\r\n\t\tgenType const & m,\r\n\t\tlength_t const & index,\r\n\t\ttypename genType::col_type const & x\r\n\t)\r\n\t{\r\n\t\tassert(index >= 0 && index < m.length());\r\n\r\n\t\tgenType Result = m;\r\n\t\tResult[index] = x;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER typename genType::col_type column\r\n\t(\r\n\t\tgenType const & m,\r\n\t\tlength_t const & index\r\n\t)\r\n\t{\r\n\t\tassert(index >= 0 && index < m.length());\r\n\r\n\t\treturn m[index];\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtc/matrix_integer.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_matrix_integer\r\n/// @file glm/gtc/matrix_integer.hpp\r\n/// @date 2011-01-20 / 2011-06-05\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtc_matrix_integer GLM_GTC_matrix_integer\r\n/// @ingroup gtc\r\n/// \r\n/// Defines a number of matrices with integer types.\r\n/// <glm/gtc/matrix_integer.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_matrix_integer\r\n#define GLM_GTC_matrix_integer\r\n\r\n// Dependency:\r\n#include \"../mat2x2.hpp\"\r\n#include \"../mat2x3.hpp\"\r\n#include \"../mat2x4.hpp\"\r\n#include \"../mat3x2.hpp\"\r\n#include \"../mat3x3.hpp\"\r\n#include \"../mat3x4.hpp\"\r\n#include \"../mat4x2.hpp\"\r\n#include \"../mat4x3.hpp\"\r\n#include \"../mat4x4.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_matrix_integer extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_matrix_integer\r\n\t/// @{\r\n\r\n\t/// High-precision signed integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<int, highp>\t\t\t\thighp_imat2;\r\n\r\n\t/// High-precision signed integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<int, highp>\t\t\t\thighp_imat3;\r\n\r\n\t/// High-precision signed integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<int, highp>\t\t\t\thighp_imat4;\r\n\r\n\t/// High-precision signed integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<int, highp>\t\t\t\thighp_imat2x2;\r\n\r\n\t/// High-precision signed integer 2x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x3<int, highp>\t\t\t\thighp_imat2x3;\r\n\r\n\t/// High-precision signed integer 2x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x4<int, highp>\t\t\t\thighp_imat2x4;\r\n\r\n\t/// High-precision signed integer 3x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x2<int, highp>\t\t\t\thighp_imat3x2;\r\n\r\n\t/// High-precision signed integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<int, highp>\t\t\t\thighp_imat3x3;\r\n\r\n\t/// High-precision signed integer 3x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x4<int, highp>\t\t\t\thighp_imat3x4;\r\n\r\n\t/// High-precision signed integer 4x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x2<int, highp>\t\t\t\thighp_imat4x2;\r\n\r\n\t/// High-precision signed integer 4x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x3<int, highp>\t\t\t\thighp_imat4x3;\r\n\r\n\t/// High-precision signed integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<int, highp>\t\t\t\thighp_imat4x4;\r\n\r\n\r\n\t/// Medium-precision signed integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<int, mediump>\t\t\tmediump_imat2;\r\n\r\n\t/// Medium-precision signed integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<int, mediump>\t\t\tmediump_imat3;\r\n\r\n\t/// Medium-precision signed integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<int, mediump>\t\t\tmediump_imat4;\r\n\r\n\r\n\t/// Medium-precision signed integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<int, mediump>\t\t\tmediump_imat2x2;\r\n\r\n\t/// Medium-precision signed integer 2x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x3<int, mediump>\t\t\tmediump_imat2x3;\r\n\r\n\t/// Medium-precision signed integer 2x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x4<int, mediump>\t\t\tmediump_imat2x4;\r\n\r\n\t/// Medium-precision signed integer 3x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x2<int, mediump>\t\t\tmediump_imat3x2;\r\n\r\n\t/// Medium-precision signed integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<int, mediump>\t\t\tmediump_imat3x3;\r\n\r\n\t/// Medium-precision signed integer 3x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x4<int, mediump>\t\t\tmediump_imat3x4;\r\n\r\n\t/// Medium-precision signed integer 4x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x2<int, mediump>\t\t\tmediump_imat4x2;\r\n\r\n\t/// Medium-precision signed integer 4x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x3<int, mediump>\t\t\tmediump_imat4x3;\r\n\r\n\t/// Medium-precision signed integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<int, mediump>\t\t\tmediump_imat4x4;\r\n\r\n\r\n\t/// Low-precision signed integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<int, lowp>\t\t\t\tlowp_imat2;\r\n\t\r\n\t/// Low-precision signed integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<int, lowp>\t\t\t\tlowp_imat3;\r\n\r\n\t/// Low-precision signed integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<int, lowp>\t\t\t\tlowp_imat4;\r\n\r\n\r\n\t/// Low-precision signed integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<int, lowp>\t\t\t\tlowp_imat2x2;\r\n\r\n\t/// Low-precision signed integer 2x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x3<int, lowp>\t\t\t\tlowp_imat2x3;\r\n\r\n\t/// Low-precision signed integer 2x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x4<int, lowp>\t\t\t\tlowp_imat2x4;\r\n\r\n\t/// Low-precision signed integer 3x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x2<int, lowp>\t\t\t\tlowp_imat3x2;\r\n\r\n\t/// Low-precision signed integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<int, lowp>\t\t\t\tlowp_imat3x3;\r\n\r\n\t/// Low-precision signed integer 3x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x4<int, lowp>\t\t\t\tlowp_imat3x4;\r\n\r\n\t/// Low-precision signed integer 4x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x2<int, lowp>\t\t\t\tlowp_imat4x2;\r\n\r\n\t/// Low-precision signed integer 4x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x3<int, lowp>\t\t\t\tlowp_imat4x3;\r\n\r\n\t/// Low-precision signed integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<int, lowp>\t\t\t\tlowp_imat4x4;\r\n\r\n\r\n\t/// High-precision unsigned integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<uint, highp>\t\t\t\thighp_umat2;\t\r\n\r\n\t/// High-precision unsigned integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<uint, highp>\t\t\t\thighp_umat3;\r\n\r\n\t/// High-precision unsigned integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<uint, highp>\t\t\t\thighp_umat4;\r\n\r\n\t/// High-precision unsigned integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<uint, highp>\t\t\t\thighp_umat2x2;\r\n\r\n\t/// High-precision unsigned integer 2x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x3<uint, highp>\t\t\t\thighp_umat2x3;\r\n\r\n\t/// High-precision unsigned integer 2x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x4<uint, highp>\t\t\t\thighp_umat2x4;\r\n\r\n\t/// High-precision unsigned integer 3x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x2<uint, highp>\t\t\t\thighp_umat3x2;\r\n\r\n\t/// High-precision unsigned integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<uint, highp>\t\t\t\thighp_umat3x3;\r\n\r\n\t/// High-precision unsigned integer 3x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x4<uint, highp>\t\t\t\thighp_umat3x4;\r\n\r\n\t/// High-precision unsigned integer 4x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x2<uint, highp>\t\t\t\thighp_umat4x2;\r\n\r\n\t/// High-precision unsigned integer 4x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x3<uint, highp>\t\t\t\thighp_umat4x3;\r\n\r\n\t/// High-precision unsigned integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<uint, highp>\t\t\t\thighp_umat4x4;\r\n\r\n\r\n\t/// Medium-precision unsigned integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<uint, mediump>\t\t\tmediump_umat2;\r\n\r\n\t/// Medium-precision unsigned integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<uint, mediump>\t\t\tmediump_umat3;\r\n\r\n\t/// Medium-precision unsigned integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<uint, mediump>\t\t\tmediump_umat4;\r\n\r\n\r\n\t/// Medium-precision unsigned integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<uint, mediump>\t\t\tmediump_umat2x2;\r\n\r\n\t/// Medium-precision unsigned integer 2x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x3<uint, mediump>\t\t\tmediump_umat2x3;\r\n\r\n\t/// Medium-precision unsigned integer 2x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x4<uint, mediump>\t\t\tmediump_umat2x4;\r\n\r\n\t/// Medium-precision unsigned integer 3x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x2<uint, mediump>\t\t\tmediump_umat3x2;\r\n\r\n\t/// Medium-precision unsigned integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<uint, mediump>\t\t\tmediump_umat3x3;\r\n\r\n\t/// Medium-precision unsigned integer 3x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x4<uint, mediump>\t\t\tmediump_umat3x4;\r\n\r\n\t/// Medium-precision unsigned integer 4x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x2<uint, mediump>\t\t\tmediump_umat4x2;\r\n\r\n\t/// Medium-precision unsigned integer 4x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x3<uint, mediump>\t\t\tmediump_umat4x3;\r\n\r\n\t/// Medium-precision unsigned integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<uint, mediump>\t\t\tmediump_umat4x4;\r\n\r\n\r\n\t/// Low-precision unsigned integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<uint, lowp>\t\t\t\tlowp_umat2;\r\n\t\r\n\t/// Low-precision unsigned integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<uint, lowp>\t\t\t\tlowp_umat3;\r\n\r\n\t/// Low-precision unsigned integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<uint, lowp>\t\t\t\tlowp_umat4;\r\n\r\n\r\n\t/// Low-precision unsigned integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x2<uint, lowp>\t\t\t\tlowp_umat2x2;\r\n\r\n\t/// Low-precision unsigned integer 2x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x3<uint, lowp>\t\t\t\tlowp_umat2x3;\r\n\r\n\t/// Low-precision unsigned integer 2x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat2x4<uint, lowp>\t\t\t\tlowp_umat2x4;\r\n\r\n\t/// Low-precision unsigned integer 3x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x2<uint, lowp>\t\t\t\tlowp_umat3x2;\r\n\r\n\t/// Low-precision unsigned integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x3<uint, lowp>\t\t\t\tlowp_umat3x3;\r\n\r\n\t/// Low-precision unsigned integer 3x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat3x4<uint, lowp>\t\t\t\tlowp_umat3x4;\r\n\r\n\t/// Low-precision unsigned integer 4x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x2<uint, lowp>\t\t\t\tlowp_umat4x2;\r\n\r\n\t/// Low-precision unsigned integer 4x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x3<uint, lowp>\t\t\t\tlowp_umat4x3;\r\n\r\n\t/// Low-precision unsigned integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef detail::tmat4x4<uint, lowp>\t\t\t\tlowp_umat4x4;\r\n\r\n#if(defined(GLM_PRECISION_HIGHP_INT))\r\n\ttypedef highp_imat2\t\t\t\t\t\t\t\timat2;\r\n\ttypedef highp_imat3\t\t\t\t\t\t\t\timat3;\r\n\ttypedef highp_imat4\t\t\t\t\t\t\t\timat4;\r\n\ttypedef highp_imat2x2\t\t\t\t\t\t\timat2x2;\r\n\ttypedef highp_imat2x3\t\t\t\t\t\t\timat2x3;\r\n\ttypedef highp_imat2x4\t\t\t\t\t\t\timat2x4;\r\n\ttypedef highp_imat3x2\t\t\t\t\t\t\timat3x2;\r\n\ttypedef highp_imat3x3\t\t\t\t\t\t\timat3x3;\r\n\ttypedef highp_imat3x4\t\t\t\t\t\t\timat3x4;\r\n\ttypedef highp_imat4x2\t\t\t\t\t\t\timat4x2;\r\n\ttypedef highp_imat4x3\t\t\t\t\t\t\timat4x3;\r\n\ttypedef highp_imat4x4\t\t\t\t\t\t\timat4x4;\r\n#elif(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_imat2\t\t\t\t\t\t\t\timat2;\r\n\ttypedef lowp_imat3\t\t\t\t\t\t\t\timat3;\r\n\ttypedef lowp_imat4\t\t\t\t\t\t\t\timat4;\r\n\ttypedef lowp_imat2x2\t\t\t\t\t\t\timat2x2;\r\n\ttypedef lowp_imat2x3\t\t\t\t\t\t\timat2x3;\r\n\ttypedef lowp_imat2x4\t\t\t\t\t\t\timat2x4;\r\n\ttypedef lowp_imat3x2\t\t\t\t\t\t\timat3x2;\r\n\ttypedef lowp_imat3x3\t\t\t\t\t\t\timat3x3;\r\n\ttypedef lowp_imat3x4\t\t\t\t\t\t\timat3x4;\r\n\ttypedef lowp_imat4x2\t\t\t\t\t\t\timat4x2;\r\n\ttypedef lowp_imat4x3\t\t\t\t\t\t\timat4x3;\r\n\ttypedef lowp_imat4x4\t\t\t\t\t\t\timat4x4;\r\n#else //if(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\r\n\t/// Signed integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat2\t\t\t\t\t\t\timat2;\r\n\r\n\t/// Signed integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat3\t\t\t\t\t\t\timat3;\r\n\r\n\t/// Signed integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat4\t\t\t\t\t\t\timat4;\r\n\r\n\t/// Signed integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat2x2\t\t\t\t\t\t\timat2x2;\r\n\r\n\t/// Signed integer 2x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat2x3\t\t\t\t\t\t\timat2x3;\r\n\r\n\t/// Signed integer 2x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat2x4\t\t\t\t\t\t\timat2x4;\r\n\r\n\t/// Signed integer 3x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat3x2\t\t\t\t\t\t\timat3x2;\r\n\r\n\t/// Signed integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat3x3\t\t\t\t\t\t\timat3x3;\r\n\r\n\t/// Signed integer 3x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat3x4\t\t\t\t\t\t\timat3x4;\r\n\r\n\t/// Signed integer 4x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat4x2\t\t\t\t\t\t\timat4x2;\r\n\r\n\t/// Signed integer 4x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat4x3\t\t\t\t\t\t\timat4x3;\r\n\r\n\t/// Signed integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_imat4x4\t\t\t\t\t\t\timat4x4;\r\n#endif//GLM_PRECISION\r\n\r\n#if(defined(GLM_PRECISION_HIGHP_UINT))\r\n\ttypedef highp_umat2\t\t\t\t\t\t\t\tumat2;\r\n\ttypedef highp_umat3\t\t\t\t\t\t\t\tumat3;\r\n\ttypedef highp_umat4\t\t\t\t\t\t\t\tumat4;\r\n\ttypedef highp_umat2x2\t\t\t\t\t\t\tumat2x2;\r\n\ttypedef highp_umat2x3\t\t\t\t\t\t\tumat2x3;\r\n\ttypedef highp_umat2x4\t\t\t\t\t\t\tumat2x4;\r\n\ttypedef highp_umat3x2\t\t\t\t\t\t\tumat3x2;\r\n\ttypedef highp_umat3x3\t\t\t\t\t\t\tumat3x3;\r\n\ttypedef highp_umat3x4\t\t\t\t\t\t\tumat3x4;\r\n\ttypedef highp_umat4x2\t\t\t\t\t\t\tumat4x2;\r\n\ttypedef highp_umat4x3\t\t\t\t\t\t\tumat4x3;\r\n\ttypedef highp_umat4x4\t\t\t\t\t\t\tumat4x4;\r\n#elif(defined(GLM_PRECISION_LOWP_UINT))\r\n\ttypedef lowp_umat2\t\t\t\t\t\t\t\tumat2;\r\n\ttypedef lowp_umat3\t\t\t\t\t\t\t\tumat3;\r\n\ttypedef lowp_umat4\t\t\t\t\t\t\t\tumat4;\r\n\ttypedef lowp_umat2x2\t\t\t\t\t\t\tumat2x2;\r\n\ttypedef lowp_umat2x3\t\t\t\t\t\t\tumat2x3;\r\n\ttypedef lowp_umat2x4\t\t\t\t\t\t\tumat2x4;\r\n\ttypedef lowp_umat3x2\t\t\t\t\t\t\tumat3x2;\r\n\ttypedef lowp_umat3x3\t\t\t\t\t\t\tumat3x3;\r\n\ttypedef lowp_umat3x4\t\t\t\t\t\t\tumat3x4;\r\n\ttypedef lowp_umat4x2\t\t\t\t\t\t\tumat4x2;\r\n\ttypedef lowp_umat4x3\t\t\t\t\t\t\tumat4x3;\r\n\ttypedef lowp_umat4x4\t\t\t\t\t\t\tumat4x4;\r\n#else //if(defined(GLM_PRECISION_MEDIUMP_UINT))\r\n\t\r\n\t/// Unsigned integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat2\t\t\t\t\t\t\tumat2;\r\n\r\n\t/// Unsigned integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat3\t\t\t\t\t\t\tumat3;\r\n\r\n\t/// Unsigned integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat4\t\t\t\t\t\t\tumat4;\r\n\r\n\t/// Unsigned integer 2x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat2x2\t\t\t\t\t\t\tumat2x2;\r\n\r\n\t/// Unsigned integer 2x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat2x3\t\t\t\t\t\t\tumat2x3;\r\n\r\n\t/// Unsigned integer 2x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat2x4\t\t\t\t\t\t\tumat2x4;\r\n\r\n\t/// Unsigned integer 3x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat3x2\t\t\t\t\t\t\tumat3x2;\r\n\r\n\t/// Unsigned integer 3x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat3x3\t\t\t\t\t\t\tumat3x3;\r\n\r\n\t/// Unsigned integer 3x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat3x4\t\t\t\t\t\t\tumat3x4;\r\n\r\n\t/// Unsigned integer 4x2 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat4x2\t\t\t\t\t\t\tumat4x2;\r\n\r\n\t/// Unsigned integer 4x3 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat4x3\t\t\t\t\t\t\tumat4x3;\r\n\r\n\t/// Unsigned integer 4x4 matrix.\r\n\t/// @see gtc_matrix_integer\r\n\ttypedef mediump_umat4x4\t\t\t\t\t\t\tumat4x4;\r\n#endif//GLM_PRECISION\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#endif//GLM_GTC_matrix_integer\r\n"
  },
  {
    "path": "gpu/glm/gtc/matrix_inverse.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_matrix_inverse\r\n/// @file glm/gtc/matrix_inverse.hpp\r\n/// @date 2005-12-21 / 2011-06-05\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// \r\n/// @defgroup gtc_matrix_inverse GLM_GTC_matrix_inverse\r\n/// @ingroup gtc\r\n/// \r\n/// Defines additional matrix inverting functions.\r\n/// <glm/gtc/matrix_inverse.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_matrix_inverse\r\n#define GLM_GTC_matrix_inverse\r\n\r\n// Dependencies\r\n#include \"../detail/setup.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_matrix_inverse extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_matrix_inverse\r\n\t/// @{\r\n\r\n\t/// Fast matrix inverse for affine matrix.\r\n\t/// \r\n\t/// @param m Input matrix to invert.\r\n\t/// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-precision floating point value is highly innacurate.\r\n\t/// @see gtc_matrix_inverse\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType affineInverse(genType const & m);\r\n\r\n\t/// Compute the inverse transpose of a matrix.\r\n\t/// \r\n\t/// @param m Input matrix to invert transpose.\r\n\t/// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-precision floating point value is highly innacurate.\r\n\t/// @see gtc_matrix_inverse\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER typename genType::value_type inverseTranspose(\r\n\t\tgenType const & m);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"matrix_inverse.inl\"\r\n\r\n#endif//GLM_GTC_matrix_inverse\r\n"
  },
  {
    "path": "gpu/glm/gtc/matrix_inverse.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_matrix_inverse\r\n/// @file glm/gtc/matrix_inverse.inl\r\n/// @date 2005-12-21 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../mat2x2.hpp\"\r\n#include \"../mat3x3.hpp\"\r\n#include \"../mat4x4.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> affineInverse\r\n\t(\r\n\t\tdetail::tmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> Result(m);\r\n\t\tResult[2] = detail::tvec3<T, P>(0, 0, 1);\r\n\t\tResult = transpose(Result);\r\n\t\tdetail::tvec3<T, P> Translation = Result * detail::tvec3<T, P>(-detail::tvec2<T, P>(m[2]), m[2][2]);\r\n\t\tResult[2] = Translation;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> affineInverse\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> Result(m);\r\n\t\tResult[3] = detail::tvec4<T, P>(0, 0, 0, 1);\r\n\t\tResult = transpose(Result);\r\n\t\tdetail::tvec4<T, P> Translation = Result * detail::tvec4<T, P>(-detail::tvec3<T, P>(m[3]), m[3][3]);\r\n\t\tResult[3] = Translation;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat2x2<T, P> inverseTranspose\r\n\t(\r\n\t\tdetail::tmat2x2<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tT Determinant = m[0][0] * m[1][1] - m[1][0] * m[0][1];\r\n\r\n\t\tdetail::tmat2x2<T, P> Inverse(\r\n\t\t\t+ m[1][1] / Determinant,\r\n\t\t\t- m[0][1] / Determinant,\r\n\t\t\t- m[1][0] / Determinant,\r\n\t\t\t+ m[0][0] / Determinant);\r\n\r\n\t\treturn Inverse;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> inverseTranspose\r\n\t(\r\n\t\tdetail::tmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tT Determinant =\r\n\t\t\t+ m[0][0] * (m[1][1] * m[2][2] - m[1][2] * m[2][1])\r\n\t\t\t- m[0][1] * (m[1][0] * m[2][2] - m[1][2] * m[2][0])\r\n\t\t\t+ m[0][2] * (m[1][0] * m[2][1] - m[1][1] * m[2][0]);\r\n\r\n\t\tdetail::tmat3x3<T, P> Inverse;\r\n\t\tInverse[0][0] = + (m[1][1] * m[2][2] - m[2][1] * m[1][2]);\r\n\t\tInverse[0][1] = - (m[1][0] * m[2][2] - m[2][0] * m[1][2]);\r\n\t\tInverse[0][2] = + (m[1][0] * m[2][1] - m[2][0] * m[1][1]);\r\n\t\tInverse[1][0] = - (m[0][1] * m[2][2] - m[2][1] * m[0][2]);\r\n\t\tInverse[1][1] = + (m[0][0] * m[2][2] - m[2][0] * m[0][2]);\r\n\t\tInverse[1][2] = - (m[0][0] * m[2][1] - m[2][0] * m[0][1]);\r\n\t\tInverse[2][0] = + (m[0][1] * m[1][2] - m[1][1] * m[0][2]);\r\n\t\tInverse[2][1] = - (m[0][0] * m[1][2] - m[1][0] * m[0][2]);\r\n\t\tInverse[2][2] = + (m[0][0] * m[1][1] - m[1][0] * m[0][1]);\r\n\t\tInverse /= Determinant;\r\n\r\n\t\treturn Inverse;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> inverseTranspose\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tT SubFactor00 = m[2][2] * m[3][3] - m[3][2] * m[2][3];\r\n\t\tT SubFactor01 = m[2][1] * m[3][3] - m[3][1] * m[2][3];\r\n\t\tT SubFactor02 = m[2][1] * m[3][2] - m[3][1] * m[2][2];\r\n\t\tT SubFactor03 = m[2][0] * m[3][3] - m[3][0] * m[2][3];\r\n\t\tT SubFactor04 = m[2][0] * m[3][2] - m[3][0] * m[2][2];\r\n\t\tT SubFactor05 = m[2][0] * m[3][1] - m[3][0] * m[2][1];\r\n\t\tT SubFactor06 = m[1][2] * m[3][3] - m[3][2] * m[1][3];\r\n\t\tT SubFactor07 = m[1][1] * m[3][3] - m[3][1] * m[1][3];\r\n\t\tT SubFactor08 = m[1][1] * m[3][2] - m[3][1] * m[1][2];\r\n\t\tT SubFactor09 = m[1][0] * m[3][3] - m[3][0] * m[1][3];\r\n\t\tT SubFactor10 = m[1][0] * m[3][2] - m[3][0] * m[1][2];\r\n\t\tT SubFactor11 = m[1][1] * m[3][3] - m[3][1] * m[1][3];\r\n\t\tT SubFactor12 = m[1][0] * m[3][1] - m[3][0] * m[1][1];\r\n\t\tT SubFactor13 = m[1][2] * m[2][3] - m[2][2] * m[1][3];\r\n\t\tT SubFactor14 = m[1][1] * m[2][3] - m[2][1] * m[1][3];\r\n\t\tT SubFactor15 = m[1][1] * m[2][2] - m[2][1] * m[1][2];\r\n\t\tT SubFactor16 = m[1][0] * m[2][3] - m[2][0] * m[1][3];\r\n\t\tT SubFactor17 = m[1][0] * m[2][2] - m[2][0] * m[1][2];\r\n\t\tT SubFactor18 = m[1][0] * m[2][1] - m[2][0] * m[1][1];\r\n\r\n\t\tdetail::tmat4x4<T, P> Inverse;\r\n\t\tInverse[0][0] = + (m[1][1] * SubFactor00 - m[1][2] * SubFactor01 + m[1][3] * SubFactor02);\r\n\t\tInverse[0][1] = - (m[1][0] * SubFactor00 - m[1][2] * SubFactor03 + m[1][3] * SubFactor04);\r\n\t\tInverse[0][2] = + (m[1][0] * SubFactor01 - m[1][1] * SubFactor03 + m[1][3] * SubFactor05);\r\n\t\tInverse[0][3] = - (m[1][0] * SubFactor02 - m[1][1] * SubFactor04 + m[1][2] * SubFactor05);\r\n\r\n\t\tInverse[1][0] = - (m[0][1] * SubFactor00 - m[0][2] * SubFactor01 + m[0][3] * SubFactor02);\r\n\t\tInverse[1][1] = + (m[0][0] * SubFactor00 - m[0][2] * SubFactor03 + m[0][3] * SubFactor04);\r\n\t\tInverse[1][2] = - (m[0][0] * SubFactor01 - m[0][1] * SubFactor03 + m[0][3] * SubFactor05);\r\n\t\tInverse[1][3] = + (m[0][0] * SubFactor02 - m[0][1] * SubFactor04 + m[0][2] * SubFactor05);\r\n\r\n\t\tInverse[2][0] = + (m[0][1] * SubFactor06 - m[0][2] * SubFactor07 + m[0][3] * SubFactor08);\r\n\t\tInverse[2][1] = - (m[0][0] * SubFactor06 - m[0][2] * SubFactor09 + m[0][3] * SubFactor10);\r\n\t\tInverse[2][2] = + (m[0][0] * SubFactor11 - m[0][1] * SubFactor09 + m[0][3] * SubFactor12);\r\n\t\tInverse[2][3] = - (m[0][0] * SubFactor08 - m[0][1] * SubFactor10 + m[0][2] * SubFactor12);\r\n\r\n\t\tInverse[3][0] = - (m[0][1] * SubFactor13 - m[0][2] * SubFactor14 + m[0][3] * SubFactor15);\r\n\t\tInverse[3][1] = + (m[0][0] * SubFactor13 - m[0][2] * SubFactor16 + m[0][3] * SubFactor17);\r\n\t\tInverse[3][2] = - (m[0][0] * SubFactor14 - m[0][1] * SubFactor16 + m[0][3] * SubFactor18);\r\n\t\tInverse[3][3] = + (m[0][0] * SubFactor15 - m[0][1] * SubFactor17 + m[0][2] * SubFactor18);\r\n\r\n\t\tT Determinant =\r\n\t\t\t+ m[0][0] * Inverse[0][0]\r\n\t\t\t+ m[0][1] * Inverse[0][1]\r\n\t\t\t+ m[0][2] * Inverse[0][2]\r\n\t\t\t+ m[0][3] * Inverse[0][3];\r\n\r\n\t\tInverse /= Determinant;\r\n\r\n\t\treturn Inverse;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtc/matrix_transform.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_matrix_transform\r\n/// @file glm/gtc/matrix_transform.hpp\r\n/// @date 2009-04-29 / 2011-05-16\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_transform\r\n/// @see gtx_transform2\r\n/// \r\n/// @defgroup gtc_matrix_transform GLM_GTC_matrix_transform\r\n/// @ingroup gtc\r\n/// \r\n/// @brief Defines functions that generate common transformation matrices.\r\n/// \r\n/// The matrices generated by this extension use standard OpenGL fixed-function\r\n/// conventions. For example, the lookAt function generates a transform from world\r\n/// space into the specific eye space that the projective matrix functions \r\n/// (perspective, ortho, etc) are designed to expect. The OpenGL compatibility\r\n/// specifications defines the particular layout of this eye space.\r\n/// \r\n/// <glm/gtc/matrix_transform.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_matrix_transform\r\n#define GLM_GTC_matrix_transform\r\n\r\n// Dependency:\r\n#include \"../mat4x4.hpp\"\r\n#include \"../vec2.hpp\"\r\n#include \"../vec3.hpp\"\r\n#include \"../vec4.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_matrix_transform extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_matrix_transform\r\n\t/// @{\r\n\r\n\t/// Builds a translation 4 * 4 matrix created from a vector of 3 components.\r\n\t/// \r\n\t/// @param m Input matrix multiplied by this translation matrix.\r\n\t/// @param v Coordinates of a translation vector.\r\n\t/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.\r\n\t/// @code\r\n\t/// #include <glm/glm.hpp>\r\n\t/// #include <glm/gtc/matrix_transform.hpp>\r\n\t/// ...\r\n\t/// glm::mat4 m = glm::translate(glm::mat4(1.0f), glm::vec3(1.0f));\r\n\t/// // m[0][0] == 1.0f, m[0][1] == 0.0f, m[0][2] == 0.0f, m[0][3] == 0.0f\r\n\t/// // m[1][0] == 0.0f, m[1][1] == 1.0f, m[1][2] == 0.0f, m[1][3] == 0.0f\r\n\t/// // m[2][0] == 0.0f, m[2][1] == 0.0f, m[2][2] == 1.0f, m[2][3] == 0.0f\r\n\t/// // m[3][0] == 1.0f, m[3][1] == 1.0f, m[3][2] == 1.0f, m[3][3] == 1.0f\r\n\t/// @endcode\r\n\t/// @see gtc_matrix_transform\r\n\t/// @see gtx_transform\r\n\t/// @see - translate(T x, T y, T z)\r\n\t/// @see - translate(detail::tmat4x4<T, P> const & m, T x, T y, T z)\r\n\t/// @see - translate(detail::tvec3<T, P> const & v)\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, P> translate(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\t\t\r\n\t/// Builds a rotation 4 * 4 matrix created from an axis vector and an angle. \r\n\t/// \r\n\t/// @param m Input matrix multiplied by this rotation matrix.\r\n\t/// @param angle Rotation angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.\r\n\t/// @param axis Rotation axis, recommanded to be normalized.\r\n\t/// @tparam T Value type used to build the matrix. Supported: half, float or double.\r\n\t/// @see gtc_matrix_transform\r\n\t/// @see gtx_transform\r\n\t/// @see - rotate(T angle, T x, T y, T z) \r\n\t/// @see - rotate(detail::tmat4x4<T, P> const & m, T angle, T x, T y, T z) \r\n\t/// @see - rotate(T angle, detail::tvec3<T, P> const & v) \r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, P> rotate(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & axis);\r\n\r\n\t/// Builds a scale 4 * 4 matrix created from 3 scalars. \r\n\t/// \r\n\t/// @param m Input matrix multiplied by this scale matrix.\r\n\t/// @param v Ratio of scaling for each axis.\r\n\t/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.\r\n\t/// @see gtc_matrix_transform\r\n\t/// @see gtx_transform\r\n\t/// @see - scale(T x, T y, T z) scale(T const & x, T const & y, T const & z)\r\n\t/// @see - scale(detail::tmat4x4<T, P> const & m, T x, T y, T z)\r\n\t/// @see - scale(detail::tvec3<T, P> const & v)\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, P> scale(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\r\n\t/// Creates a matrix for an orthographic parallel viewing volume.\r\n\t/// \r\n\t/// @param left \r\n\t/// @param right \r\n\t/// @param bottom \r\n\t/// @param top \r\n\t/// @param zNear \r\n\t/// @param zFar \r\n\t/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.\r\n\t/// @see gtc_matrix_transform\r\n\t/// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top)\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, defaultp> ortho(\r\n\t\tT const & left,\r\n\t\tT const & right,\r\n\t\tT const & bottom,\r\n\t\tT const & top,\r\n\t\tT const & zNear,\r\n\t\tT const & zFar);\r\n\r\n\t/// Creates a matrix for projecting two-dimensional coordinates onto the screen.\r\n\t/// \r\n\t/// @param left \r\n\t/// @param right \r\n\t/// @param bottom \r\n\t/// @param top \r\n\t/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.\r\n\t/// @see gtc_matrix_transform\r\n\t/// @see - glm::ortho(T const & left, T const & right, T const & bottom, T const & top, T const & zNear, T const & zFar)\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, defaultp> ortho(\r\n\t\tT const & left,\r\n\t\tT const & right,\r\n\t\tT const & bottom,\r\n\t\tT const & top);\r\n\r\n\t/// Creates a frustum matrix.\r\n\t/// \r\n\t/// @param left \r\n\t/// @param right \r\n\t/// @param bottom \r\n\t/// @param top \r\n\t/// @param near \r\n\t/// @param far \r\n\t/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.\r\n\t/// @see gtc_matrix_transform\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, P> frustum(\r\n\t\tT const & left,\r\n\t\tT const & right,\r\n\t\tT const & bottom,\r\n\t\tT const & top,\r\n\t\tT const & near,\r\n\t\tT const & far);\r\n\r\n\t/// Creates a matrix for a symetric perspective-view frustum.\r\n\t/// \r\n\t/// @param fovy Expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.\r\n\t/// @param aspect \r\n\t/// @param near \r\n\t/// @param far \r\n\t/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.\r\n\t/// @see gtc_matrix_transform\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, P> perspective(\r\n\t\tT const & fovy,\r\n\t\tT const & aspect,\r\n\t\tT const & near,\r\n\t\tT const & far);\r\n\r\n\t/// Builds a perspective projection matrix based on a field of view.\r\n\t/// \r\n\t/// @param fov Expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.\r\n\t/// @param width \r\n\t/// @param height \r\n\t/// @param near \r\n\t/// @param far \r\n\t/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.\r\n\t/// @see gtc_matrix_transform\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, P> perspectiveFov(\r\n\t\tT const & fov,\r\n\t\tT const & width,\r\n\t\tT const & height,\r\n\t\tT const & near,\r\n\t\tT const & far);\r\n\r\n\t/// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite.\r\n\t/// \r\n\t/// @param fovy Expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.\r\n\t/// @param aspect \r\n\t/// @param near \r\n\t/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.\r\n\t/// @see gtc_matrix_transform\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, P> infinitePerspective(\r\n\t\tT fovy, T aspect, T near);\r\n\r\n\t/// Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping.\r\n\t/// \r\n\t/// @param fovy Expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.\r\n\t/// @param aspect \r\n\t/// @param near \r\n\t/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.\r\n\t/// @see gtc_matrix_transform\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, P> tweakedInfinitePerspective(\r\n\t\tT fovy, T aspect, T near);\r\n\r\n\t/// Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates.\r\n\t/// \r\n\t/// @param obj \r\n\t/// @param model \r\n\t/// @param proj\r\n\t/// @param viewport \r\n\t/// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double.\r\n\t/// @tparam U Currently supported: Floating-point types and integer types.\r\n\t/// @see gtc_matrix_transform\r\n\ttemplate <typename T, typename U, precision P>\r\n\tGLM_FUNC_DECL detail::tvec3<T, P> project(\r\n\t\tdetail::tvec3<T, P> const & obj,\r\n\t\tdetail::tmat4x4<T, P> const & model,\r\n\t\tdetail::tmat4x4<T, P> const & proj,\r\n\t\tdetail::tvec4<U, P> const & viewport);\r\n\r\n\t/// Map the specified window coordinates (win.x, win.y, win.z) into object coordinates.\r\n\t///\r\n\t/// @param win\r\n\t/// @param model\r\n\t/// @param proj\r\n\t/// @param viewport\r\n\t/// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double.\r\n\t/// @tparam U Currently supported: Floating-point types and integer types.\r\n\t/// @see gtc_matrix_transform\r\n\ttemplate <typename T, typename U, precision P>\r\n\tGLM_FUNC_DECL detail::tvec3<T, P> unProject(\r\n\t\tdetail::tvec3<T, P> const & win,\r\n\t\tdetail::tmat4x4<T, P> const & model,\r\n\t\tdetail::tmat4x4<T, P> const & proj,\r\n\t\tdetail::tvec4<U, P> const & viewport);\r\n\r\n\t/// Define a picking region\r\n\t///\r\n\t/// @param center\r\n\t/// @param delta\r\n\t/// @param viewport\r\n\t/// @tparam T Native type used for the computation. Currently supported: half (not recommanded), float or double.\r\n\t/// @tparam U Currently supported: Floating-point types and integer types.\r\n\t/// @see gtc_matrix_transform\r\n\ttemplate <typename T, precision P, typename U>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, P> pickMatrix(\r\n\t\tdetail::tvec2<T, P> const & center,\r\n\t\tdetail::tvec2<T, P> const & delta,\r\n\t\tdetail::tvec4<U, P> const & viewport);\r\n\r\n\t/// Build a look at view matrix.\r\n\t///\r\n\t/// @param eye Position of the camera\r\n\t/// @param center Position where the camera is looking at\r\n\t/// @param up Normalized up vector, how the camera is oriented. Typically (0, 0, 1)\r\n\t/// @see gtc_matrix_transform\r\n\t/// @see - frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal) frustum(T const & left, T const & right, T const & bottom, T const & top, T const & nearVal, T const & farVal)\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, P> lookAt(\r\n\t\tdetail::tvec3<T, P> const & eye,\r\n\t\tdetail::tvec3<T, P> const & center,\r\n\t\tdetail::tvec3<T, P> const & up);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"matrix_transform.inl\"\r\n\r\n#endif//GLM_GTC_matrix_transform\r\n"
  },
  {
    "path": "gpu/glm/gtc/matrix_transform.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_matrix_transform\r\n/// @file glm/gtc/matrix_transform.inl\r\n/// @date 2009-04-29 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../geometric.hpp\"\r\n#include \"../trigonometric.hpp\"\r\n#include \"../matrix.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> translate\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> Result(m);\r\n\t\tResult[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3];\r\n\t\treturn Result;\r\n\t}\r\n\t\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> translate_slow\r\n\t\t(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> Result(T(1));\r\n\t\tResult[3] = detail::tvec4<T, P>(v, T(1));\r\n\t\treturn m * Result;\r\n\r\n\t\t//detail::tmat4x4<valType> Result(m);\r\n\t\tResult[3] = m[0] * v[0] + m[1] * v[1] + m[2] * v[2] + m[3];\r\n\t\t//Result[3][0] = m[0][0] * v[0] + m[1][0] * v[1] + m[2][0] * v[2] + m[3][0];\r\n\t\t//Result[3][1] = m[0][1] * v[0] + m[1][1] * v[1] + m[2][1] * v[2] + m[3][1];\r\n\t\t//Result[3][2] = m[0][2] * v[0] + m[1][2] * v[1] + m[2][2] * v[2] + m[3][2];\r\n\t\t//Result[3][3] = m[0][3] * v[0] + m[1][3] * v[1] + m[2][3] * v[2] + m[3][3];\r\n\t\t//return Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> rotate\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT a = angle;\r\n#else\r\n#\t\tpragma message(\"GLM: rotate function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT a = radians(angle);\r\n#endif\r\n\t\tT c = cos(a);\r\n\t\tT s = sin(a);\r\n\r\n\t\tdetail::tvec3<T, P> axis(normalize(v));\r\n\t\tdetail::tvec3<T, P> temp((T(1) - c) * axis);\r\n\r\n\t\tdetail::tmat4x4<T, P> Rotate(detail::tmat4x4<T, P>::_null);\r\n\t\tRotate[0][0] = c + temp[0] * axis[0];\r\n\t\tRotate[0][1] = 0 + temp[0] * axis[1] + s * axis[2];\r\n\t\tRotate[0][2] = 0 + temp[0] * axis[2] - s * axis[1];\r\n\r\n\t\tRotate[1][0] = 0 + temp[1] * axis[0] - s * axis[2];\r\n\t\tRotate[1][1] = c + temp[1] * axis[1];\r\n\t\tRotate[1][2] = 0 + temp[1] * axis[2] + s * axis[0];\r\n\r\n\t\tRotate[2][0] = 0 + temp[2] * axis[0] + s * axis[1];\r\n\t\tRotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0];\r\n\t\tRotate[2][2] = c + temp[2] * axis[2];\r\n\r\n\t\tdetail::tmat4x4<T, P> Result(detail::tmat4x4<T, P>::_null);\r\n\t\tResult[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2];\r\n\t\tResult[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2];\r\n\t\tResult[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2];\r\n\t\tResult[3] = m[3];\r\n\t\treturn Result;\r\n\t}\r\n\t\t\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> rotate_slow\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tT const & angle, \r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const a = angle;\r\n#else\r\n#\t\tpragma message(\"GLM: rotate_slow function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const a = radians(angle);\r\n#endif\r\n\t\tT c = cos(a);\r\n\t\tT s = sin(a);\r\n\t\tdetail::tmat4x4<T, P> Result;\r\n\r\n\t\tdetail::tvec3<T, P> axis = normalize(v);\r\n\r\n\t\tResult[0][0] = c + (1 - c)      * axis.x     * axis.x;\r\n\t\tResult[0][1] = (1 - c) * axis.x * axis.y + s * axis.z;\r\n\t\tResult[0][2] = (1 - c) * axis.x * axis.z - s * axis.y;\r\n\t\tResult[0][3] = 0;\r\n\r\n\t\tResult[1][0] = (1 - c) * axis.y * axis.x - s * axis.z;\r\n\t\tResult[1][1] = c + (1 - c) * axis.y * axis.y;\r\n\t\tResult[1][2] = (1 - c) * axis.y * axis.z + s * axis.x;\r\n\t\tResult[1][3] = 0;\r\n\r\n\t\tResult[2][0] = (1 - c) * axis.z * axis.x + s * axis.y;\r\n\t\tResult[2][1] = (1 - c) * axis.z * axis.y - s * axis.x;\r\n\t\tResult[2][2] = c + (1 - c) * axis.z * axis.z;\r\n\t\tResult[2][3] = 0;\r\n\r\n\t\tResult[3] = detail::tvec4<T, P>(0, 0, 0, 1);\r\n\t\treturn m * Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> scale\r\n\t\t(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> Result(detail::tmat4x4<T, P>::_null);\r\n\t\tResult[0] = m[0] * v[0];\r\n\t\tResult[1] = m[1] * v[1];\r\n\t\tResult[2] = m[2] * v[2];\r\n\t\tResult[3] = m[3];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> scale_slow\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> Result(T(1));\r\n\t\tResult[0][0] = v.x;\r\n\t\tResult[1][1] = v.y;\r\n\t\tResult[2][2] = v.z;\r\n\t\treturn m * Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> ortho\r\n\t(\r\n\t\tT const & left,\r\n\t\tT const & right,\r\n\t\tT const & bottom,\r\n\t\tT const & top,\r\n\t\tT const & zNear,\r\n\t\tT const & zFar\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, defaultp> Result(1);\r\n\t\tResult[0][0] = static_cast<T>(2) / (right - left);\r\n\t\tResult[1][1] = static_cast<T>(2) / (top - bottom);\r\n\t\tResult[2][2] = - T(2) / (zFar - zNear);\r\n\t\tResult[3][0] = - (right + left) / (right - left);\r\n\t\tResult[3][1] = - (top + bottom) / (top - bottom);\r\n\t\tResult[3][2] = - (zFar + zNear) / (zFar - zNear);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> ortho\r\n\t(\r\n\t\tT const & left,\r\n\t\tT const & right,\r\n\t\tT const & bottom,\r\n\t\tT const & top\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, defaultp> Result(1);\r\n\t\tResult[0][0] = static_cast<T>(2) / (right - left);\r\n\t\tResult[1][1] = static_cast<T>(2) / (top - bottom);\r\n\t\tResult[2][2] = - T(1);\r\n\t\tResult[3][0] = - (right + left) / (right - left);\r\n\t\tResult[3][1] = - (top + bottom) / (top - bottom);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename valType>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<valType, defaultp> frustum\r\n\t(\r\n\t\tvalType const & left,\r\n\t\tvalType const & right,\r\n\t\tvalType const & bottom,\r\n\t\tvalType const & top,\r\n\t\tvalType const & nearVal,\r\n\t\tvalType const & farVal\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x4<valType, defaultp> Result(0);\r\n\t\tResult[0][0] = (valType(2) * nearVal) / (right - left);\r\n\t\tResult[1][1] = (valType(2) * nearVal) / (top - bottom);\r\n\t\tResult[2][0] = (right + left) / (right - left);\r\n\t\tResult[2][1] = (top + bottom) / (top - bottom);\r\n\t\tResult[2][2] = -(farVal + nearVal) / (farVal - nearVal);\r\n\t\tResult[2][3] = valType(-1);\r\n\t\tResult[3][2] = -(valType(2) * farVal * nearVal) / (farVal - nearVal);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename valType>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<valType, defaultp> perspective\r\n\t(\r\n\t\tvalType const & fovy,\r\n\t\tvalType const & aspect,\r\n\t\tvalType const & zNear,\r\n\t\tvalType const & zFar\r\n\t)\r\n\t{\r\n\t\tassert(aspect != valType(0));\r\n\t\tassert(zFar != zNear);\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tvalType const rad = fovy;\r\n#else\r\n#\t\tpragma message(\"GLM: perspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tvalType const rad = glm::radians(fovy);\r\n#endif\r\n\r\n\t\tvalType tanHalfFovy = tan(rad / valType(2));\r\n\r\n\t\tdetail::tmat4x4<valType, defaultp> Result(valType(0));\r\n\t\tResult[0][0] = valType(1) / (aspect * tanHalfFovy);\r\n\t\tResult[1][1] = valType(1) / (tanHalfFovy);\r\n\t\tResult[2][2] = - (zFar + zNear) / (zFar - zNear);\r\n\t\tResult[2][3] = - valType(1);\r\n\t\tResult[3][2] = - (valType(2) * zFar * zNear) / (zFar - zNear);\r\n\t\treturn Result;\r\n\t}\r\n\t\r\n\ttemplate <typename valType>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<valType, defaultp> perspectiveFov\r\n\t(\r\n\t\tvalType const & fov,\r\n\t\tvalType const & width,\r\n\t\tvalType const & height,\r\n\t\tvalType const & zNear,\r\n\t\tvalType const & zFar\r\n\t)\r\n\t{\r\n\t\tassert(width > valType(0));\r\n\t\tassert(height > valType(0));\r\n\t\tassert(fov > valType(0));\r\n\t\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tvalType rad = fov;\r\n#else\r\n#\t\tpragma message(\"GLM: perspectiveFov function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tvalType rad = glm::radians(fov);\r\n#endif\r\n\t\tvalType h = glm::cos(valType(0.5) * rad) / glm::sin(valType(0.5) * rad);\r\n\t\tvalType w = h * height / width; ///todo max(width , Height) / min(width , Height)?\r\n\r\n\t\tdetail::tmat4x4<valType, defaultp> Result(valType(0));\r\n\t\tResult[0][0] = w;\r\n\t\tResult[1][1] = h;\r\n\t\tResult[2][2] = - (zFar + zNear) / (zFar - zNear);\r\n\t\tResult[2][3] = - valType(1);\r\n\t\tResult[3][2] = - (valType(2) * zFar * zNear) / (zFar - zNear);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> infinitePerspective\r\n\t(\r\n\t\tT fovy,\r\n\t\tT aspect,\r\n\t\tT zNear\r\n\t)\r\n\t{\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const range = tan(fovy / T(2)) * zNear;\t\r\n#else\r\n#\t\tpragma message(\"GLM: infinitePerspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const range = tan(radians(fovy / T(2))) * zNear;\t\r\n#endif\r\n\t\tT left = -range * aspect;\r\n\t\tT right = range * aspect;\r\n\t\tT bottom = -range;\r\n\t\tT top = range;\r\n\r\n\t\tdetail::tmat4x4<T, defaultp> Result(T(0));\r\n\t\tResult[0][0] = (T(2) * zNear) / (right - left);\r\n\t\tResult[1][1] = (T(2) * zNear) / (top - bottom);\r\n\t\tResult[2][2] = - T(1);\r\n\t\tResult[2][3] = - T(1);\r\n\t\tResult[3][2] = - T(2) * zNear;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> tweakedInfinitePerspective\r\n\t(\r\n\t\tT fovy,\r\n\t\tT aspect,\r\n\t\tT zNear\r\n\t)\r\n\t{\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT range = tan(fovy / T(2)) * zNear;\t\r\n#else\r\n#\t\tpragma message(\"GLM: tweakedInfinitePerspective function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT range = tan(radians(fovy / T(2))) * zNear;\t\r\n#endif\r\n\t\tT left = -range * aspect;\r\n\t\tT right = range * aspect;\r\n\t\tT bottom = -range;\r\n\t\tT top = range;\r\n\r\n\t\tdetail::tmat4x4<T, defaultp> Result(T(0));\r\n\t\tResult[0][0] = (T(2) * zNear) / (right - left);\r\n\t\tResult[1][1] = (T(2) * zNear) / (top - bottom);\r\n\t\tResult[2][2] = static_cast<T>(0.0001) - T(1);\r\n\t\tResult[2][3] = static_cast<T>(-1);\r\n\t\tResult[3][2] = - (T(0.0001) - T(2)) * zNear;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, typename U, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> project\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & obj,\r\n\t\tdetail::tmat4x4<T, P> const & model,\r\n\t\tdetail::tmat4x4<T, P> const & proj,\r\n\t\tdetail::tvec4<U, P> const & viewport\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<T, P> tmp = detail::tvec4<T, P>(obj, T(1));\r\n\t\ttmp = model * tmp;\r\n\t\ttmp = proj * tmp;\r\n\r\n\t\ttmp /= tmp.w;\r\n\t\ttmp = tmp * T(0.5) + T(0.5);\r\n\t\ttmp[0] = tmp[0] * T(viewport[2]) + T(viewport[0]);\r\n\t\ttmp[1] = tmp[1] * T(viewport[3]) + T(viewport[1]);\r\n\r\n\t\treturn detail::tvec3<T, P>(tmp);\r\n\t}\r\n\r\n\ttemplate <typename T, typename U, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> unProject\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & win,\r\n\t\tdetail::tmat4x4<T, P> const & model,\r\n\t\tdetail::tmat4x4<T, P> const & proj,\r\n\t\tdetail::tvec4<U, P> const & viewport\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> Inverse = inverse(proj * model);\r\n\r\n\t\tdetail::tvec4<T, P> tmp = detail::tvec4<T, P>(win, T(1));\r\n\t\ttmp.x = (tmp.x - T(viewport[0])) / T(viewport[2]);\r\n\t\ttmp.y = (tmp.y - T(viewport[1])) / T(viewport[3]);\r\n\t\ttmp = tmp * T(2) - T(1);\r\n\r\n\t\tdetail::tvec4<T, P> obj = Inverse * tmp;\r\n\t\tobj /= obj.w;\r\n\r\n\t\treturn detail::tvec3<T, P>(obj);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, typename U>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> pickMatrix\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & center,\r\n\t\tdetail::tvec2<T, P> const & delta,\r\n\t\tdetail::tvec4<U, P> const & viewport\r\n\t)\r\n\t{\r\n\t\tassert(delta.x > T(0) && delta.y > T(0));\r\n\t\tdetail::tmat4x4<T, P> Result(1.0f);\r\n\r\n\t\tif(!(delta.x > T(0) && delta.y > T(0)))\r\n\t\t\treturn Result; // Error\r\n\r\n\t\tdetail::tvec3<T, P> Temp(\r\n\t\t\t(T(viewport[2]) - T(2) * (center.x - T(viewport[0]))) / delta.x,\r\n\t\t\t(T(viewport[3]) - T(2) * (center.y - T(viewport[1]))) / delta.y,\r\n\t\t\tT(0));\r\n\r\n\t\t// Translate and scale the picked region to the entire window\r\n\t\tResult = translate(Result, Temp);\r\n\t\treturn scale(Result, detail::tvec3<T, P>(T(viewport[2]) / delta.x, T(viewport[3]) / delta.y, T(1)));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> lookAt\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & eye,\r\n\t\tdetail::tvec3<T, P> const & center,\r\n\t\tdetail::tvec3<T, P> const & up\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> f(normalize(center - eye));\r\n\t\tdetail::tvec3<T, P> s(normalize(cross(f, up)));\r\n\t\tdetail::tvec3<T, P> u(cross(s, f));\r\n\r\n\t\tdetail::tmat4x4<T, P> Result(1);\r\n\t\tResult[0][0] = s.x;\r\n\t\tResult[1][0] = s.y;\r\n\t\tResult[2][0] = s.z;\r\n\t\tResult[0][1] = u.x;\r\n\t\tResult[1][1] = u.y;\r\n\t\tResult[2][1] = u.z;\r\n\t\tResult[0][2] =-f.x;\r\n\t\tResult[1][2] =-f.y;\r\n\t\tResult[2][2] =-f.z;\r\n\t\tResult[3][0] =-dot(s, eye);\r\n\t\tResult[3][1] =-dot(u, eye);\r\n\t\tResult[3][2] = dot(f, eye);\r\n\t\treturn Result;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtc/noise.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_noise\r\n/// @file glm/gtc/noise.hpp\r\n/// @date 2011-04-21 / 2011-09-27\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtc_noise GLM_GTC_noise\r\n/// @ingroup gtc\r\n/// \r\n/// Defines 2D, 3D and 4D procedural noise functions \r\n/// Based on the work of Stefan Gustavson and Ashima Arts on \"webgl-noise\": \r\n/// https://github.com/ashima/webgl-noise \r\n/// Following Stefan Gustavson's paper \"Simplex noise demystified\": \r\n/// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf\r\n/// <glm/gtc/noise.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_noise\r\n#define GLM_GTC_noise\r\n\r\n// Dependencies\r\n#include \"../detail/setup.hpp\"\r\n#include \"../detail/precision.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_noise extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_noise\r\n\t/// @{\r\n\r\n\t/// Classic perlin noise.\r\n\t/// @see gtc_noise\r\n\ttemplate <typename T, precision P, template<typename, precision> class vecType>\r\n\tT perlin(\r\n\t\tvecType<T, P> const & p);\r\n\t\t\r\n\t/// Periodic perlin noise.\r\n\t/// @see gtc_noise\r\n\ttemplate <typename T, precision P, template<typename, precision> class vecType>\r\n\tT perlin(\r\n\t\tvecType<T, P> const & p,\r\n\t\tvecType<T, P> const & rep);\r\n\r\n\t/// Simplex noise.\r\n\t/// @see gtc_noise\r\n\ttemplate <typename T, precision P, template<typename, precision> class vecType>\r\n\tT simplex(\r\n\t\tvecType<T, P> const & p);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"noise.inl\"\r\n\r\n#endif//GLM_GTC_noise\r\n"
  },
  {
    "path": "gpu/glm/gtc/noise.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_noise\r\n/// @file glm/gtc/noise.inl\r\n/// @date 2011-04-21 / 2012-04-07\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n// Based on the work of Stefan Gustavson and Ashima Arts on \"webgl-noise\": \r\n// https://github.com/ashima/webgl-noise \r\n// Following Stefan Gustavson's paper \"Simplex noise demystified\": \r\n// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../geometric.hpp\"\r\n#include \"../common.hpp\"\r\n#include \"../vector_relational.hpp\"\r\n#include \"../detail/_noise.hpp\"\r\n\r\nnamespace glm{\r\nnamespace gtc\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> grad4(T const & j, detail::tvec4<T, P> const & ip)\r\n\t{\r\n\t\tdetail::tvec3<T, P> pXYZ = floor(fract(detail::tvec3<T, P>(j) * detail::tvec3<T, P>(ip)) * T(7)) * ip[2] - T(1);\r\n\t\tT pW = static_cast<T>(1.5) - dot(abs(pXYZ), detail::tvec3<T, P>(1));\r\n\t\tdetail::tvec4<T, P> s = detail::tvec4<T, P>(lessThan(detail::tvec4<T, P>(pXYZ, pW), detail::tvec4<T, P>(0.0)));\r\n\t\tpXYZ = pXYZ + (detail::tvec3<T, P>(s) * T(2) - T(1)) * s.w; \r\n\t\treturn detail::tvec4<T, P>(pXYZ, pW);\r\n\t}\r\n}//namespace gtc\r\n\r\n\t// Classic Perlin noise\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T perlin(detail::tvec2<T, P> const & Position)\r\n\t{\r\n\t\tdetail::tvec4<T, P> Pi = glm::floor(detail::tvec4<T, P>(Position.x, Position.y, Position.x, Position.y)) + detail::tvec4<T, P>(0.0, 0.0, 1.0, 1.0);\r\n\t\tdetail::tvec4<T, P> Pf = glm::fract(detail::tvec4<T, P>(Position.x, Position.y, Position.x, Position.y)) - detail::tvec4<T, P>(0.0, 0.0, 1.0, 1.0);\r\n\t\tPi = mod(Pi, detail::tvec4<T, P>(289)); // To avoid truncation effects in permutation\r\n\t\tdetail::tvec4<T, P> ix(Pi.x, Pi.z, Pi.x, Pi.z);\r\n\t\tdetail::tvec4<T, P> iy(Pi.y, Pi.y, Pi.w, Pi.w);\r\n\t\tdetail::tvec4<T, P> fx(Pf.x, Pf.z, Pf.x, Pf.z);\r\n\t\tdetail::tvec4<T, P> fy(Pf.y, Pf.y, Pf.w, Pf.w);\r\n\r\n\t\tdetail::tvec4<T, P> i = detail::permute(detail::permute(ix) + iy);\r\n\r\n\t\tdetail::tvec4<T, P> gx = static_cast<T>(2) * glm::fract(i / T(41)) - T(1);\r\n\t\tdetail::tvec4<T, P> gy = glm::abs(gx) - T(0.5);\r\n\t\tdetail::tvec4<T, P> tx = glm::floor(gx + T(0.5));\r\n\t\tgx = gx - tx;\r\n\r\n\t\tdetail::tvec2<T, P> g00(gx.x, gy.x);\r\n\t\tdetail::tvec2<T, P> g10(gx.y, gy.y);\r\n\t\tdetail::tvec2<T, P> g01(gx.z, gy.z);\r\n\t\tdetail::tvec2<T, P> g11(gx.w, gy.w);\r\n\r\n\t\tdetail::tvec4<T, P> norm = taylorInvSqrt(detail::tvec4<T, P>(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11)));\r\n\t\tg00 *= norm.x;  \r\n\t\tg01 *= norm.y;  \r\n\t\tg10 *= norm.z;  \r\n\t\tg11 *= norm.w;  \r\n\r\n\t\tT n00 = dot(g00, detail::tvec2<T, P>(fx.x, fy.x));\r\n\t\tT n10 = dot(g10, detail::tvec2<T, P>(fx.y, fy.y));\r\n\t\tT n01 = dot(g01, detail::tvec2<T, P>(fx.z, fy.z));\r\n\t\tT n11 = dot(g11, detail::tvec2<T, P>(fx.w, fy.w));\r\n\r\n\t\tdetail::tvec2<T, P> fade_xy = fade(detail::tvec2<T, P>(Pf.x, Pf.y));\r\n\t\tdetail::tvec2<T, P> n_x = mix(detail::tvec2<T, P>(n00, n01), detail::tvec2<T, P>(n10, n11), fade_xy.x);\r\n\t\tT n_xy = mix(n_x.x, n_x.y, fade_xy.y);\r\n\t\treturn T(2.3) * n_xy;\r\n\t}\r\n\r\n\t// Classic Perlin noise\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T perlin(detail::tvec3<T, P> const & Position)\r\n\t{\r\n\t\tdetail::tvec3<T, P> Pi0 = floor(Position); // Integer part for indexing\r\n\t\tdetail::tvec3<T, P> Pi1 = Pi0 + T(1); // Integer part + 1\r\n\t\tPi0 = mod289(Pi0);\r\n\t\tPi1 = mod289(Pi1);\r\n\t\tdetail::tvec3<T, P> Pf0 = fract(Position); // Fractional part for interpolation\r\n\t\tdetail::tvec3<T, P> Pf1 = Pf0 - T(1); // Fractional part - 1.0\r\n\t\tdetail::tvec4<T, P> ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\r\n\t\tdetail::tvec4<T, P> iy = detail::tvec4<T, P>(detail::tvec2<T, P>(Pi0.y), detail::tvec2<T, P>(Pi1.y));\r\n\t\tdetail::tvec4<T, P> iz0(Pi0.z);\r\n\t\tdetail::tvec4<T, P> iz1(Pi1.z);\r\n\r\n\t\tdetail::tvec4<T, P> ixy = detail::permute(detail::permute(ix) + iy);\r\n\t\tdetail::tvec4<T, P> ixy0 = detail::permute(ixy + iz0);\r\n\t\tdetail::tvec4<T, P> ixy1 = detail::permute(ixy + iz1);\r\n\r\n\t\tdetail::tvec4<T, P> gx0 = ixy0 * T(1.0 / 7.0);\r\n\t\tdetail::tvec4<T, P> gy0 = fract(floor(gx0) * T(1.0 / 7.0)) - T(0.5);\r\n\t\tgx0 = fract(gx0);\r\n\t\tdetail::tvec4<T, P> gz0 = detail::tvec4<T, P>(0.5) - abs(gx0) - abs(gy0);\r\n\t\tdetail::tvec4<T, P> sz0 = step(gz0, detail::tvec4<T, P>(0.0));\r\n\t\tgx0 -= sz0 * (step(T(0), gx0) - T(0.5));\r\n\t\tgy0 -= sz0 * (step(T(0), gy0) - T(0.5));\r\n\r\n\t\tdetail::tvec4<T, P> gx1 = ixy1 * T(1.0 / 7.0);\r\n\t\tdetail::tvec4<T, P> gy1 = fract(floor(gx1) * T(1.0 / 7.0)) - T(0.5);\r\n\t\tgx1 = fract(gx1);\r\n\t\tdetail::tvec4<T, P> gz1 = detail::tvec4<T, P>(0.5) - abs(gx1) - abs(gy1);\r\n\t\tdetail::tvec4<T, P> sz1 = step(gz1, detail::tvec4<T, P>(0.0));\r\n\t\tgx1 -= sz1 * (step(T(0), gx1) - T(0.5));\r\n\t\tgy1 -= sz1 * (step(T(0), gy1) - T(0.5));\r\n\r\n\t\tdetail::tvec3<T, P> g000(gx0.x, gy0.x, gz0.x);\r\n\t\tdetail::tvec3<T, P> g100(gx0.y, gy0.y, gz0.y);\r\n\t\tdetail::tvec3<T, P> g010(gx0.z, gy0.z, gz0.z);\r\n\t\tdetail::tvec3<T, P> g110(gx0.w, gy0.w, gz0.w);\r\n\t\tdetail::tvec3<T, P> g001(gx1.x, gy1.x, gz1.x);\r\n\t\tdetail::tvec3<T, P> g101(gx1.y, gy1.y, gz1.y);\r\n\t\tdetail::tvec3<T, P> g011(gx1.z, gy1.z, gz1.z);\r\n\t\tdetail::tvec3<T, P> g111(gx1.w, gy1.w, gz1.w);\r\n\r\n\t\tdetail::tvec4<T, P> norm0 = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\r\n\t\tg000 *= norm0.x;\r\n\t\tg010 *= norm0.y;\r\n\t\tg100 *= norm0.z;\r\n\t\tg110 *= norm0.w;\r\n\t\tdetail::tvec4<T, P> norm1 = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\r\n\t\tg001 *= norm1.x;\r\n\t\tg011 *= norm1.y;\r\n\t\tg101 *= norm1.z;\r\n\t\tg111 *= norm1.w;\r\n\r\n\t\tT n000 = dot(g000, Pf0);\r\n\t\tT n100 = dot(g100, detail::tvec3<T, P>(Pf1.x, Pf0.y, Pf0.z));\r\n\t\tT n010 = dot(g010, detail::tvec3<T, P>(Pf0.x, Pf1.y, Pf0.z));\r\n\t\tT n110 = dot(g110, detail::tvec3<T, P>(Pf1.x, Pf1.y, Pf0.z));\r\n\t\tT n001 = dot(g001, detail::tvec3<T, P>(Pf0.x, Pf0.y, Pf1.z));\r\n\t\tT n101 = dot(g101, detail::tvec3<T, P>(Pf1.x, Pf0.y, Pf1.z));\r\n\t\tT n011 = dot(g011, detail::tvec3<T, P>(Pf0.x, Pf1.y, Pf1.z));\r\n\t\tT n111 = dot(g111, Pf1);\r\n\r\n\t\tdetail::tvec3<T, P> fade_xyz = fade(Pf0);\r\n\t\tdetail::tvec4<T, P> n_z = mix(detail::tvec4<T, P>(n000, n100, n010, n110), detail::tvec4<T, P>(n001, n101, n011, n111), fade_xyz.z);\r\n\t\tdetail::tvec2<T, P> n_yz = mix(detail::tvec2<T, P>(n_z.x, n_z.y), detail::tvec2<T, P>(n_z.z, n_z.w), fade_xyz.y);\r\n\t\tT n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); \r\n\t\treturn T(2.2) * n_xyz;\r\n\t}\r\n\t/*\r\n\t// Classic Perlin noise\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T perlin(detail::tvec3<T, P> const & P)\r\n\t{\r\n\t\tdetail::tvec3<T, P> Pi0 = floor(P); // Integer part for indexing\r\n\t\tdetail::tvec3<T, P> Pi1 = Pi0 + T(1); // Integer part + 1\r\n\t\tPi0 = mod(Pi0, T(289));\r\n\t\tPi1 = mod(Pi1, T(289));\r\n\t\tdetail::tvec3<T, P> Pf0 = fract(P); // Fractional part for interpolation\r\n\t\tdetail::tvec3<T, P> Pf1 = Pf0 - T(1); // Fractional part - 1.0\r\n\t\tdetail::tvec4<T, P> ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\r\n\t\tdetail::tvec4<T, P> iy(Pi0.y, Pi0.y, Pi1.y, Pi1.y);\r\n\t\tdetail::tvec4<T, P> iz0(Pi0.z);\r\n\t\tdetail::tvec4<T, P> iz1(Pi1.z);\r\n\r\n\t\tdetail::tvec4<T, P> ixy = permute(permute(ix) + iy);\r\n\t\tdetail::tvec4<T, P> ixy0 = permute(ixy + iz0);\r\n\t\tdetail::tvec4<T, P> ixy1 = permute(ixy + iz1);\r\n\r\n\t\tdetail::tvec4<T, P> gx0 = ixy0 / T(7);\r\n\t\tdetail::tvec4<T, P> gy0 = fract(floor(gx0) / T(7)) - T(0.5);\r\n\t\tgx0 = fract(gx0);\r\n\t\tdetail::tvec4<T, P> gz0 = detail::tvec4<T, P>(0.5) - abs(gx0) - abs(gy0);\r\n\t\tdetail::tvec4<T, P> sz0 = step(gz0, detail::tvec4<T, P>(0.0));\r\n\t\tgx0 -= sz0 * (step(0.0, gx0) - T(0.5));\r\n\t\tgy0 -= sz0 * (step(0.0, gy0) - T(0.5));\r\n\r\n\t\tdetail::tvec4<T, P> gx1 = ixy1 / T(7);\r\n\t\tdetail::tvec4<T, P> gy1 = fract(floor(gx1) / T(7)) - T(0.5);\r\n\t\tgx1 = fract(gx1);\r\n\t\tdetail::tvec4<T, P> gz1 = detail::tvec4<T, P>(0.5) - abs(gx1) - abs(gy1);\r\n\t\tdetail::tvec4<T, P> sz1 = step(gz1, detail::tvec4<T, P>(0.0));\r\n\t\tgx1 -= sz1 * (step(T(0), gx1) - T(0.5));\r\n\t\tgy1 -= sz1 * (step(T(0), gy1) - T(0.5));\r\n\r\n\t\tdetail::tvec3<T, P> g000(gx0.x, gy0.x, gz0.x);\r\n\t\tdetail::tvec3<T, P> g100(gx0.y, gy0.y, gz0.y);\r\n\t\tdetail::tvec3<T, P> g010(gx0.z, gy0.z, gz0.z);\r\n\t\tdetail::tvec3<T, P> g110(gx0.w, gy0.w, gz0.w);\r\n\t\tdetail::tvec3<T, P> g001(gx1.x, gy1.x, gz1.x);\r\n\t\tdetail::tvec3<T, P> g101(gx1.y, gy1.y, gz1.y);\r\n\t\tdetail::tvec3<T, P> g011(gx1.z, gy1.z, gz1.z);\r\n\t\tdetail::tvec3<T, P> g111(gx1.w, gy1.w, gz1.w);\r\n\r\n\t\tdetail::tvec4<T, P> norm0 = taylorInvSqrt(detail::tvec4<T, P>(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\r\n\t\tg000 *= norm0.x;\r\n\t\tg010 *= norm0.y;\r\n\t\tg100 *= norm0.z;\r\n\t\tg110 *= norm0.w;\r\n\t\tdetail::tvec4<T, P> norm1 = taylorInvSqrt(detail::tvec4<T, P>(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\r\n\t\tg001 *= norm1.x;\r\n\t\tg011 *= norm1.y;\r\n\t\tg101 *= norm1.z;\r\n\t\tg111 *= norm1.w;\r\n\r\n\t\tT n000 = dot(g000, Pf0);\r\n\t\tT n100 = dot(g100, detail::tvec3<T, P>(Pf1.x, Pf0.y, Pf0.z));\r\n\t\tT n010 = dot(g010, detail::tvec3<T, P>(Pf0.x, Pf1.y, Pf0.z));\r\n\t\tT n110 = dot(g110, detail::tvec3<T, P>(Pf1.x, Pf1.y, Pf0.z));\r\n\t\tT n001 = dot(g001, detail::tvec3<T, P>(Pf0.x, Pf0.y, Pf1.z));\r\n\t\tT n101 = dot(g101, detail::tvec3<T, P>(Pf1.x, Pf0.y, Pf1.z));\r\n\t\tT n011 = dot(g011, detail::tvec3<T, P>(Pf0.x, Pf1.y, Pf1.z));\r\n\t\tT n111 = dot(g111, Pf1);\r\n\r\n\t\tdetail::tvec3<T, P> fade_xyz = fade(Pf0);\r\n\t\tdetail::tvec4<T, P> n_z = mix(detail::tvec4<T, P>(n000, n100, n010, n110), detail::tvec4<T, P>(n001, n101, n011, n111), fade_xyz.z);\r\n\t\tdetail::tvec2<T, P> n_yz = mix(\r\n\t\t\tdetail::tvec2<T, P>(n_z.x, n_z.y), \r\n\t\t\tdetail::tvec2<T, P>(n_z.z, n_z.w), fade_xyz.y);\r\n\t\tT n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); \r\n\t\treturn T(2.2) * n_xyz;\r\n\t}\r\n\t*/\r\n\t// Classic Perlin noise\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T perlin(detail::tvec4<T, P> const & Position)\r\n\t{\r\n\t\tdetail::tvec4<T, P> Pi0 = floor(Position);\t// Integer part for indexing\r\n\t\tdetail::tvec4<T, P> Pi1 = Pi0 + T(1);\t\t// Integer part + 1\r\n\t\tPi0 = mod(Pi0, detail::tvec4<T, P>(289));\r\n\t\tPi1 = mod(Pi1, detail::tvec4<T, P>(289));\r\n\t\tdetail::tvec4<T, P> Pf0 = fract(Position);\t// Fractional part for interpolation\r\n\t\tdetail::tvec4<T, P> Pf1 = Pf0 - T(1);\t\t// Fractional part - 1.0\r\n\t\tdetail::tvec4<T, P> ix(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\r\n\t\tdetail::tvec4<T, P> iy(Pi0.y, Pi0.y, Pi1.y, Pi1.y);\r\n\t\tdetail::tvec4<T, P> iz0(Pi0.z);\r\n\t\tdetail::tvec4<T, P> iz1(Pi1.z);\r\n\t\tdetail::tvec4<T, P> iw0(Pi0.w);\r\n\t\tdetail::tvec4<T, P> iw1(Pi1.w);\r\n\r\n\t\tdetail::tvec4<T, P> ixy = detail::permute(detail::permute(ix) + iy);\r\n\t\tdetail::tvec4<T, P> ixy0 = detail::permute(ixy + iz0);\r\n\t\tdetail::tvec4<T, P> ixy1 = detail::permute(ixy + iz1);\r\n\t\tdetail::tvec4<T, P> ixy00 = detail::permute(ixy0 + iw0);\r\n\t\tdetail::tvec4<T, P> ixy01 = detail::permute(ixy0 + iw1);\r\n\t\tdetail::tvec4<T, P> ixy10 = detail::permute(ixy1 + iw0);\r\n\t\tdetail::tvec4<T, P> ixy11 = detail::permute(ixy1 + iw1);\r\n\r\n\t\tdetail::tvec4<T, P> gx00 = ixy00 / T(7);\r\n\t\tdetail::tvec4<T, P> gy00 = floor(gx00) / T(7);\r\n\t\tdetail::tvec4<T, P> gz00 = floor(gy00) / T(6);\r\n\t\tgx00 = fract(gx00) - T(0.5);\r\n\t\tgy00 = fract(gy00) - T(0.5);\r\n\t\tgz00 = fract(gz00) - T(0.5);\r\n\t\tdetail::tvec4<T, P> gw00 = detail::tvec4<T, P>(0.75) - abs(gx00) - abs(gy00) - abs(gz00);\r\n\t\tdetail::tvec4<T, P> sw00 = step(gw00, detail::tvec4<T, P>(0.0));\r\n\t\tgx00 -= sw00 * (step(T(0), gx00) - T(0.5));\r\n\t\tgy00 -= sw00 * (step(T(0), gy00) - T(0.5));\r\n\r\n\t\tdetail::tvec4<T, P> gx01 = ixy01 / T(7);\r\n\t\tdetail::tvec4<T, P> gy01 = floor(gx01) / T(7);\r\n\t\tdetail::tvec4<T, P> gz01 = floor(gy01) / T(6);\r\n\t\tgx01 = fract(gx01) - T(0.5);\r\n\t\tgy01 = fract(gy01) - T(0.5);\r\n\t\tgz01 = fract(gz01) - T(0.5);\r\n\t\tdetail::tvec4<T, P> gw01 = detail::tvec4<T, P>(0.75) - abs(gx01) - abs(gy01) - abs(gz01);\r\n\t\tdetail::tvec4<T, P> sw01 = step(gw01, detail::tvec4<T, P>(0.0));\r\n\t\tgx01 -= sw01 * (step(T(0), gx01) - T(0.5));\r\n\t\tgy01 -= sw01 * (step(T(0), gy01) - T(0.5));\r\n\r\n\t\tdetail::tvec4<T, P> gx10 = ixy10 / T(7);\r\n\t\tdetail::tvec4<T, P> gy10 = floor(gx10) / T(7);\r\n\t\tdetail::tvec4<T, P> gz10 = floor(gy10) / T(6);\r\n\t\tgx10 = fract(gx10) - T(0.5);\r\n\t\tgy10 = fract(gy10) - T(0.5);\r\n\t\tgz10 = fract(gz10) - T(0.5);\r\n\t\tdetail::tvec4<T, P> gw10 = detail::tvec4<T, P>(0.75) - abs(gx10) - abs(gy10) - abs(gz10);\r\n\t\tdetail::tvec4<T, P> sw10 = step(gw10, detail::tvec4<T, P>(0));\r\n\t\tgx10 -= sw10 * (step(T(0), gx10) - T(0.5));\r\n\t\tgy10 -= sw10 * (step(T(0), gy10) - T(0.5));\r\n\r\n\t\tdetail::tvec4<T, P> gx11 = ixy11 / T(7);\r\n\t\tdetail::tvec4<T, P> gy11 = floor(gx11) / T(7);\r\n\t\tdetail::tvec4<T, P> gz11 = floor(gy11) / T(6);\r\n\t\tgx11 = fract(gx11) - T(0.5);\r\n\t\tgy11 = fract(gy11) - T(0.5);\r\n\t\tgz11 = fract(gz11) - T(0.5);\r\n\t\tdetail::tvec4<T, P> gw11 = detail::tvec4<T, P>(0.75) - abs(gx11) - abs(gy11) - abs(gz11);\r\n\t\tdetail::tvec4<T, P> sw11 = step(gw11, detail::tvec4<T, P>(0.0));\r\n\t\tgx11 -= sw11 * (step(T(0), gx11) - T(0.5));\r\n\t\tgy11 -= sw11 * (step(T(0), gy11) - T(0.5));\r\n\r\n\t\tdetail::tvec4<T, P> g0000(gx00.x, gy00.x, gz00.x, gw00.x);\r\n\t\tdetail::tvec4<T, P> g1000(gx00.y, gy00.y, gz00.y, gw00.y);\r\n\t\tdetail::tvec4<T, P> g0100(gx00.z, gy00.z, gz00.z, gw00.z);\r\n\t\tdetail::tvec4<T, P> g1100(gx00.w, gy00.w, gz00.w, gw00.w);\r\n\t\tdetail::tvec4<T, P> g0010(gx10.x, gy10.x, gz10.x, gw10.x);\r\n\t\tdetail::tvec4<T, P> g1010(gx10.y, gy10.y, gz10.y, gw10.y);\r\n\t\tdetail::tvec4<T, P> g0110(gx10.z, gy10.z, gz10.z, gw10.z);\r\n\t\tdetail::tvec4<T, P> g1110(gx10.w, gy10.w, gz10.w, gw10.w);\r\n\t\tdetail::tvec4<T, P> g0001(gx01.x, gy01.x, gz01.x, gw01.x);\r\n\t\tdetail::tvec4<T, P> g1001(gx01.y, gy01.y, gz01.y, gw01.y);\r\n\t\tdetail::tvec4<T, P> g0101(gx01.z, gy01.z, gz01.z, gw01.z);\r\n\t\tdetail::tvec4<T, P> g1101(gx01.w, gy01.w, gz01.w, gw01.w);\r\n\t\tdetail::tvec4<T, P> g0011(gx11.x, gy11.x, gz11.x, gw11.x);\r\n\t\tdetail::tvec4<T, P> g1011(gx11.y, gy11.y, gz11.y, gw11.y);\r\n\t\tdetail::tvec4<T, P> g0111(gx11.z, gy11.z, gz11.z, gw11.z);\r\n\t\tdetail::tvec4<T, P> g1111(gx11.w, gy11.w, gz11.w, gw11.w);\r\n\r\n\t\tdetail::tvec4<T, P> norm00 = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100)));\r\n\t\tg0000 *= norm00.x;\r\n\t\tg0100 *= norm00.y;\r\n\t\tg1000 *= norm00.z;\r\n\t\tg1100 *= norm00.w;\r\n\r\n\t\tdetail::tvec4<T, P> norm01 = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101)));\r\n\t\tg0001 *= norm01.x;\r\n\t\tg0101 *= norm01.y;\r\n\t\tg1001 *= norm01.z;\r\n\t\tg1101 *= norm01.w;\r\n\r\n\t\tdetail::tvec4<T, P> norm10 = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110)));\r\n\t\tg0010 *= norm10.x;\r\n\t\tg0110 *= norm10.y;\r\n\t\tg1010 *= norm10.z;\r\n\t\tg1110 *= norm10.w;\r\n\r\n\t\tdetail::tvec4<T, P> norm11 = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111)));\r\n\t\tg0011 *= norm11.x;\r\n\t\tg0111 *= norm11.y;\r\n\t\tg1011 *= norm11.z;\r\n\t\tg1111 *= norm11.w;\r\n\r\n\t\tT n0000 = dot(g0000, Pf0);\r\n\t\tT n1000 = dot(g1000, detail::tvec4<T, P>(Pf1.x, Pf0.y, Pf0.z, Pf0.w));\r\n\t\tT n0100 = dot(g0100, detail::tvec4<T, P>(Pf0.x, Pf1.y, Pf0.z, Pf0.w));\r\n\t\tT n1100 = dot(g1100, detail::tvec4<T, P>(Pf1.x, Pf1.y, Pf0.z, Pf0.w));\r\n\t\tT n0010 = dot(g0010, detail::tvec4<T, P>(Pf0.x, Pf0.y, Pf1.z, Pf0.w));\r\n\t\tT n1010 = dot(g1010, detail::tvec4<T, P>(Pf1.x, Pf0.y, Pf1.z, Pf0.w));\r\n\t\tT n0110 = dot(g0110, detail::tvec4<T, P>(Pf0.x, Pf1.y, Pf1.z, Pf0.w));\r\n\t\tT n1110 = dot(g1110, detail::tvec4<T, P>(Pf1.x, Pf1.y, Pf1.z, Pf0.w));\r\n\t\tT n0001 = dot(g0001, detail::tvec4<T, P>(Pf0.x, Pf0.y, Pf0.z, Pf1.w));\r\n\t\tT n1001 = dot(g1001, detail::tvec4<T, P>(Pf1.x, Pf0.y, Pf0.z, Pf1.w));\r\n\t\tT n0101 = dot(g0101, detail::tvec4<T, P>(Pf0.x, Pf1.y, Pf0.z, Pf1.w));\r\n\t\tT n1101 = dot(g1101, detail::tvec4<T, P>(Pf1.x, Pf1.y, Pf0.z, Pf1.w));\r\n\t\tT n0011 = dot(g0011, detail::tvec4<T, P>(Pf0.x, Pf0.y, Pf1.z, Pf1.w));\r\n\t\tT n1011 = dot(g1011, detail::tvec4<T, P>(Pf1.x, Pf0.y, Pf1.z, Pf1.w));\r\n\t\tT n0111 = dot(g0111, detail::tvec4<T, P>(Pf0.x, Pf1.y, Pf1.z, Pf1.w));\r\n\t\tT n1111 = dot(g1111, Pf1);\r\n\r\n\t\tdetail::tvec4<T, P> fade_xyzw = fade(Pf0);\r\n\t\tdetail::tvec4<T, P> n_0w = mix(detail::tvec4<T, P>(n0000, n1000, n0100, n1100), detail::tvec4<T, P>(n0001, n1001, n0101, n1101), fade_xyzw.w);\r\n\t\tdetail::tvec4<T, P> n_1w = mix(detail::tvec4<T, P>(n0010, n1010, n0110, n1110), detail::tvec4<T, P>(n0011, n1011, n0111, n1111), fade_xyzw.w);\r\n\t\tdetail::tvec4<T, P> n_zw = mix(n_0w, n_1w, fade_xyzw.z);\r\n\t\tdetail::tvec2<T, P> n_yzw = mix(detail::tvec2<T, P>(n_zw.x, n_zw.y), detail::tvec2<T, P>(n_zw.z, n_zw.w), fade_xyzw.y);\r\n\t\tT n_xyzw = mix(n_yzw.x, n_yzw.y, fade_xyzw.x);\r\n\t\treturn T(2.2) * n_xyzw;\r\n\t}\r\n\r\n\t// Classic Perlin noise, periodic variant\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T perlin(detail::tvec2<T, P> const & Position, detail::tvec2<T, P> const & rep)\r\n\t{\r\n\t\tdetail::tvec4<T, P> Pi = floor(detail::tvec4<T, P>(Position.x, Position.y, Position.x, Position.y)) + detail::tvec4<T, P>(0.0, 0.0, 1.0, 1.0);\r\n\t\tdetail::tvec4<T, P> Pf = fract(detail::tvec4<T, P>(Position.x, Position.y, Position.x, Position.y)) - detail::tvec4<T, P>(0.0, 0.0, 1.0, 1.0);\r\n\t\tPi = mod(Pi, detail::tvec4<T, P>(rep.x, rep.y, rep.x, rep.y)); // To create noise with explicit period\r\n\t\tPi = mod(Pi, detail::tvec4<T, P>(289)); // To avoid truncation effects in permutation\r\n\t\tdetail::tvec4<T, P> ix(Pi.x, Pi.z, Pi.x, Pi.z);\r\n\t\tdetail::tvec4<T, P> iy(Pi.y, Pi.y, Pi.w, Pi.w);\r\n\t\tdetail::tvec4<T, P> fx(Pf.x, Pf.z, Pf.x, Pf.z);\r\n\t\tdetail::tvec4<T, P> fy(Pf.y, Pf.y, Pf.w, Pf.w);\r\n\r\n\t\tdetail::tvec4<T, P> i = detail::permute(detail::permute(ix) + iy);\r\n\r\n\t\tdetail::tvec4<T, P> gx = static_cast<T>(2) * fract(i / T(41)) - T(1);\r\n\t\tdetail::tvec4<T, P> gy = abs(gx) - T(0.5);\r\n\t\tdetail::tvec4<T, P> tx = floor(gx + T(0.5));\r\n\t\tgx = gx - tx;\r\n\r\n\t\tdetail::tvec2<T, P> g00(gx.x, gy.x);\r\n\t\tdetail::tvec2<T, P> g10(gx.y, gy.y);\r\n\t\tdetail::tvec2<T, P> g01(gx.z, gy.z);\r\n\t\tdetail::tvec2<T, P> g11(gx.w, gy.w);\r\n\r\n\t\tdetail::tvec4<T, P> norm = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(g00, g00), dot(g01, g01), dot(g10, g10), dot(g11, g11)));\r\n\t\tg00 *= norm.x;\r\n\t\tg01 *= norm.y;\r\n\t\tg10 *= norm.z;\r\n\t\tg11 *= norm.w;\r\n\r\n\t\tT n00 = dot(g00, detail::tvec2<T, P>(fx.x, fy.x));\r\n\t\tT n10 = dot(g10, detail::tvec2<T, P>(fx.y, fy.y));\r\n\t\tT n01 = dot(g01, detail::tvec2<T, P>(fx.z, fy.z));\r\n\t\tT n11 = dot(g11, detail::tvec2<T, P>(fx.w, fy.w));\r\n\r\n\t\tdetail::tvec2<T, P> fade_xy = fade(detail::tvec2<T, P>(Pf.x, Pf.y));\r\n\t\tdetail::tvec2<T, P> n_x = mix(detail::tvec2<T, P>(n00, n01), detail::tvec2<T, P>(n10, n11), fade_xy.x);\r\n\t\tT n_xy = mix(n_x.x, n_x.y, fade_xy.y);\r\n\t\treturn T(2.3) * n_xy;\r\n\t}\r\n\r\n\t// Classic Perlin noise, periodic variant\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T perlin(detail::tvec3<T, P> const & Position, detail::tvec3<T, P> const & rep)\r\n\t{\r\n\t\tdetail::tvec3<T, P> Pi0 = mod(floor(Position), rep); // Integer part, modulo period\r\n\t\tdetail::tvec3<T, P> Pi1 = mod(Pi0 + detail::tvec3<T, P>(T(1)), rep); // Integer part + 1, mod period\r\n\t\tPi0 = mod(Pi0, detail::tvec3<T, P>(289));\r\n\t\tPi1 = mod(Pi1, detail::tvec3<T, P>(289));\r\n\t\tdetail::tvec3<T, P> Pf0 = fract(Position); // Fractional part for interpolation\r\n\t\tdetail::tvec3<T, P> Pf1 = Pf0 - detail::tvec3<T, P>(T(1)); // Fractional part - 1.0\r\n\t\tdetail::tvec4<T, P> ix = detail::tvec4<T, P>(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\r\n\t\tdetail::tvec4<T, P> iy = detail::tvec4<T, P>(Pi0.y, Pi0.y, Pi1.y, Pi1.y);\r\n\t\tdetail::tvec4<T, P> iz0(Pi0.z);\r\n\t\tdetail::tvec4<T, P> iz1(Pi1.z);\r\n\r\n\t\tdetail::tvec4<T, P> ixy = detail::permute(detail::permute(ix) + iy);\r\n\t\tdetail::tvec4<T, P> ixy0 = detail::permute(ixy + iz0);\r\n\t\tdetail::tvec4<T, P> ixy1 = detail::permute(ixy + iz1);\r\n\r\n\t\tdetail::tvec4<T, P> gx0 = ixy0 / T(7);\r\n\t\tdetail::tvec4<T, P> gy0 = fract(floor(gx0) / T(7)) - T(0.5);\r\n\t\tgx0 = fract(gx0);\r\n\t\tdetail::tvec4<T, P> gz0 = detail::tvec4<T, P>(0.5) - abs(gx0) - abs(gy0);\r\n\t\tdetail::tvec4<T, P> sz0 = step(gz0, detail::tvec4<T, P>(0));\r\n\t\tgx0 -= sz0 * (step(T(0), gx0) - T(0.5));\r\n\t\tgy0 -= sz0 * (step(T(0), gy0) - T(0.5));\r\n\r\n\t\tdetail::tvec4<T, P> gx1 = ixy1 / T(7);\r\n\t\tdetail::tvec4<T, P> gy1 = fract(floor(gx1) / T(7)) - T(0.5);\r\n\t\tgx1 = fract(gx1);\r\n\t\tdetail::tvec4<T, P> gz1 = detail::tvec4<T, P>(0.5) - abs(gx1) - abs(gy1);\r\n\t\tdetail::tvec4<T, P> sz1 = step(gz1, detail::tvec4<T, P>(T(0)));\r\n\t\tgx1 -= sz1 * (step(T(0), gx1) - T(0.5));\r\n\t\tgy1 -= sz1 * (step(T(0), gy1) - T(0.5));\r\n\r\n\t\tdetail::tvec3<T, P> g000 = detail::tvec3<T, P>(gx0.x, gy0.x, gz0.x);\r\n\t\tdetail::tvec3<T, P> g100 = detail::tvec3<T, P>(gx0.y, gy0.y, gz0.y);\r\n\t\tdetail::tvec3<T, P> g010 = detail::tvec3<T, P>(gx0.z, gy0.z, gz0.z);\r\n\t\tdetail::tvec3<T, P> g110 = detail::tvec3<T, P>(gx0.w, gy0.w, gz0.w);\r\n\t\tdetail::tvec3<T, P> g001 = detail::tvec3<T, P>(gx1.x, gy1.x, gz1.x);\r\n\t\tdetail::tvec3<T, P> g101 = detail::tvec3<T, P>(gx1.y, gy1.y, gz1.y);\r\n\t\tdetail::tvec3<T, P> g011 = detail::tvec3<T, P>(gx1.z, gy1.z, gz1.z);\r\n\t\tdetail::tvec3<T, P> g111 = detail::tvec3<T, P>(gx1.w, gy1.w, gz1.w);\r\n\r\n\t\tdetail::tvec4<T, P> norm0 = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\r\n\t\tg000 *= norm0.x;\r\n\t\tg010 *= norm0.y;\r\n\t\tg100 *= norm0.z;\r\n\t\tg110 *= norm0.w;\r\n\t\tdetail::tvec4<T, P> norm1 = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\r\n\t\tg001 *= norm1.x;\r\n\t\tg011 *= norm1.y;\r\n\t\tg101 *= norm1.z;\r\n\t\tg111 *= norm1.w;\r\n\r\n\t\tT n000 = dot(g000, Pf0);\r\n\t\tT n100 = dot(g100, detail::tvec3<T, P>(Pf1.x, Pf0.y, Pf0.z));\r\n\t\tT n010 = dot(g010, detail::tvec3<T, P>(Pf0.x, Pf1.y, Pf0.z));\r\n\t\tT n110 = dot(g110, detail::tvec3<T, P>(Pf1.x, Pf1.y, Pf0.z));\r\n\t\tT n001 = dot(g001, detail::tvec3<T, P>(Pf0.x, Pf0.y, Pf1.z));\r\n\t\tT n101 = dot(g101, detail::tvec3<T, P>(Pf1.x, Pf0.y, Pf1.z));\r\n\t\tT n011 = dot(g011, detail::tvec3<T, P>(Pf0.x, Pf1.y, Pf1.z));\r\n\t\tT n111 = dot(g111, Pf1);\r\n\r\n\t\tdetail::tvec3<T, P> fade_xyz = fade(Pf0);\r\n\t\tdetail::tvec4<T, P> n_z = mix(detail::tvec4<T, P>(n000, n100, n010, n110), detail::tvec4<T, P>(n001, n101, n011, n111), fade_xyz.z);\r\n\t\tdetail::tvec2<T, P> n_yz = mix(detail::tvec2<T, P>(n_z.x, n_z.y), detail::tvec2<T, P>(n_z.z, n_z.w), fade_xyz.y);\r\n\t\tT n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x);\r\n\t\treturn T(2.2) * n_xyz;\r\n\t}\r\n\r\n\t// Classic Perlin noise, periodic version\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T perlin(detail::tvec4<T, P> const & Position, detail::tvec4<T, P> const & rep)\r\n\t{\r\n\t\tdetail::tvec4<T, P> Pi0 = mod(floor(Position), rep); // Integer part modulo rep\r\n\t\tdetail::tvec4<T, P> Pi1 = mod(Pi0 + T(1), rep); // Integer part + 1 mod rep\r\n\t\tdetail::tvec4<T, P> Pf0 = fract(Position); // Fractional part for interpolation\r\n\t\tdetail::tvec4<T, P> Pf1 = Pf0 - T(1); // Fractional part - 1.0\r\n\t\tdetail::tvec4<T, P> ix = detail::tvec4<T, P>(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\r\n\t\tdetail::tvec4<T, P> iy = detail::tvec4<T, P>(Pi0.y, Pi0.y, Pi1.y, Pi1.y);\r\n\t\tdetail::tvec4<T, P> iz0(Pi0.z);\r\n\t\tdetail::tvec4<T, P> iz1(Pi1.z);\r\n\t\tdetail::tvec4<T, P> iw0(Pi0.w);\r\n\t\tdetail::tvec4<T, P> iw1(Pi1.w);\r\n\r\n\t\tdetail::tvec4<T, P> ixy = detail::permute(detail::permute(ix) + iy);\r\n\t\tdetail::tvec4<T, P> ixy0 = detail::permute(ixy + iz0);\r\n\t\tdetail::tvec4<T, P> ixy1 = detail::permute(ixy + iz1);\r\n\t\tdetail::tvec4<T, P> ixy00 = detail::permute(ixy0 + iw0);\r\n\t\tdetail::tvec4<T, P> ixy01 = detail::permute(ixy0 + iw1);\r\n\t\tdetail::tvec4<T, P> ixy10 = detail::permute(ixy1 + iw0);\r\n\t\tdetail::tvec4<T, P> ixy11 = detail::permute(ixy1 + iw1);\r\n\r\n\t\tdetail::tvec4<T, P> gx00 = ixy00 / T(7);\r\n\t\tdetail::tvec4<T, P> gy00 = floor(gx00) / T(7);\r\n\t\tdetail::tvec4<T, P> gz00 = floor(gy00) / T(6);\r\n\t\tgx00 = fract(gx00) - T(0.5);\r\n\t\tgy00 = fract(gy00) - T(0.5);\r\n\t\tgz00 = fract(gz00) - T(0.5);\r\n\t\tdetail::tvec4<T, P> gw00 = detail::tvec4<T, P>(0.75) - abs(gx00) - abs(gy00) - abs(gz00);\r\n\t\tdetail::tvec4<T, P> sw00 = step(gw00, detail::tvec4<T, P>(0));\r\n\t\tgx00 -= sw00 * (step(T(0), gx00) - T(0.5));\r\n\t\tgy00 -= sw00 * (step(T(0), gy00) - T(0.5));\r\n\r\n\t\tdetail::tvec4<T, P> gx01 = ixy01 / T(7);\r\n\t\tdetail::tvec4<T, P> gy01 = floor(gx01) / T(7);\r\n\t\tdetail::tvec4<T, P> gz01 = floor(gy01) / T(6);\r\n\t\tgx01 = fract(gx01) - T(0.5);\r\n\t\tgy01 = fract(gy01) - T(0.5);\r\n\t\tgz01 = fract(gz01) - T(0.5);\r\n\t\tdetail::tvec4<T, P> gw01 = detail::tvec4<T, P>(0.75) - abs(gx01) - abs(gy01) - abs(gz01);\r\n\t\tdetail::tvec4<T, P> sw01 = step(gw01, detail::tvec4<T, P>(0.0));\r\n\t\tgx01 -= sw01 * (step(T(0), gx01) - T(0.5));\r\n\t\tgy01 -= sw01 * (step(T(0), gy01) - T(0.5));\r\n\r\n\t\tdetail::tvec4<T, P> gx10 = ixy10 / T(7);\r\n\t\tdetail::tvec4<T, P> gy10 = floor(gx10) / T(7);\r\n\t\tdetail::tvec4<T, P> gz10 = floor(gy10) / T(6);\r\n\t\tgx10 = fract(gx10) - T(0.5);\r\n\t\tgy10 = fract(gy10) - T(0.5);\r\n\t\tgz10 = fract(gz10) - T(0.5);\r\n\t\tdetail::tvec4<T, P> gw10 = detail::tvec4<T, P>(0.75) - abs(gx10) - abs(gy10) - abs(gz10);\r\n\t\tdetail::tvec4<T, P> sw10 = step(gw10, detail::tvec4<T, P>(0.0));\r\n\t\tgx10 -= sw10 * (step(T(0), gx10) - T(0.5));\r\n\t\tgy10 -= sw10 * (step(T(0), gy10) - T(0.5));\r\n\r\n\t\tdetail::tvec4<T, P> gx11 = ixy11 / T(7);\r\n\t\tdetail::tvec4<T, P> gy11 = floor(gx11) / T(7);\r\n\t\tdetail::tvec4<T, P> gz11 = floor(gy11) / T(6);\r\n\t\tgx11 = fract(gx11) - T(0.5);\r\n\t\tgy11 = fract(gy11) - T(0.5);\r\n\t\tgz11 = fract(gz11) - T(0.5);\r\n\t\tdetail::tvec4<T, P> gw11 = detail::tvec4<T, P>(0.75) - abs(gx11) - abs(gy11) - abs(gz11);\r\n\t\tdetail::tvec4<T, P> sw11 = step(gw11, detail::tvec4<T, P>(T(0)));\r\n\t\tgx11 -= sw11 * (step(T(0), gx11) - T(0.5));\r\n\t\tgy11 -= sw11 * (step(T(0), gy11) - T(0.5));\r\n\r\n\t\tdetail::tvec4<T, P> g0000(gx00.x, gy00.x, gz00.x, gw00.x);\r\n\t\tdetail::tvec4<T, P> g1000(gx00.y, gy00.y, gz00.y, gw00.y);\r\n\t\tdetail::tvec4<T, P> g0100(gx00.z, gy00.z, gz00.z, gw00.z);\r\n\t\tdetail::tvec4<T, P> g1100(gx00.w, gy00.w, gz00.w, gw00.w);\r\n\t\tdetail::tvec4<T, P> g0010(gx10.x, gy10.x, gz10.x, gw10.x);\r\n\t\tdetail::tvec4<T, P> g1010(gx10.y, gy10.y, gz10.y, gw10.y);\r\n\t\tdetail::tvec4<T, P> g0110(gx10.z, gy10.z, gz10.z, gw10.z);\r\n\t\tdetail::tvec4<T, P> g1110(gx10.w, gy10.w, gz10.w, gw10.w);\r\n\t\tdetail::tvec4<T, P> g0001(gx01.x, gy01.x, gz01.x, gw01.x);\r\n\t\tdetail::tvec4<T, P> g1001(gx01.y, gy01.y, gz01.y, gw01.y);\r\n\t\tdetail::tvec4<T, P> g0101(gx01.z, gy01.z, gz01.z, gw01.z);\r\n\t\tdetail::tvec4<T, P> g1101(gx01.w, gy01.w, gz01.w, gw01.w);\r\n\t\tdetail::tvec4<T, P> g0011(gx11.x, gy11.x, gz11.x, gw11.x);\r\n\t\tdetail::tvec4<T, P> g1011(gx11.y, gy11.y, gz11.y, gw11.y);\r\n\t\tdetail::tvec4<T, P> g0111(gx11.z, gy11.z, gz11.z, gw11.z);\r\n\t\tdetail::tvec4<T, P> g1111(gx11.w, gy11.w, gz11.w, gw11.w);\r\n\r\n\t\tdetail::tvec4<T, P> norm00 = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(g0000, g0000), dot(g0100, g0100), dot(g1000, g1000), dot(g1100, g1100)));\r\n\t\tg0000 *= norm00.x;\r\n\t\tg0100 *= norm00.y;\r\n\t\tg1000 *= norm00.z;\r\n\t\tg1100 *= norm00.w;\r\n\r\n\t\tdetail::tvec4<T, P> norm01 = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(g0001, g0001), dot(g0101, g0101), dot(g1001, g1001), dot(g1101, g1101)));\r\n\t\tg0001 *= norm01.x;\r\n\t\tg0101 *= norm01.y;\r\n\t\tg1001 *= norm01.z;\r\n\t\tg1101 *= norm01.w;\r\n\r\n\t\tdetail::tvec4<T, P> norm10 = taylorInvSqrt(detail::tvec4<T, P>(dot(g0010, g0010), dot(g0110, g0110), dot(g1010, g1010), dot(g1110, g1110)));\r\n\t\tg0010 *= norm10.x;\r\n\t\tg0110 *= norm10.y;\r\n\t\tg1010 *= norm10.z;\r\n\t\tg1110 *= norm10.w;\r\n\r\n\t\tdetail::tvec4<T, P> norm11 = taylorInvSqrt(detail::tvec4<T, P>(dot(g0011, g0011), dot(g0111, g0111), dot(g1011, g1011), dot(g1111, g1111)));\r\n\t\tg0011 *= norm11.x;\r\n\t\tg0111 *= norm11.y;\r\n\t\tg1011 *= norm11.z;\r\n\t\tg1111 *= norm11.w;\r\n\r\n\t\tT n0000 = dot(g0000, Pf0);\r\n\t\tT n1000 = dot(g1000, detail::tvec4<T, P>(Pf1.x, Pf0.y, Pf0.z, Pf0.w));\r\n\t\tT n0100 = dot(g0100, detail::tvec4<T, P>(Pf0.x, Pf1.y, Pf0.z, Pf0.w));\r\n\t\tT n1100 = dot(g1100, detail::tvec4<T, P>(Pf1.x, Pf1.y, Pf0.z, Pf0.w));\r\n\t\tT n0010 = dot(g0010, detail::tvec4<T, P>(Pf0.x, Pf0.y, Pf1.z, Pf0.w));\r\n\t\tT n1010 = dot(g1010, detail::tvec4<T, P>(Pf1.x, Pf0.y, Pf1.z, Pf0.w));\r\n\t\tT n0110 = dot(g0110, detail::tvec4<T, P>(Pf0.x, Pf1.y, Pf1.z, Pf0.w));\r\n\t\tT n1110 = dot(g1110, detail::tvec4<T, P>(Pf1.x, Pf1.y, Pf1.z, Pf0.w));\r\n\t\tT n0001 = dot(g0001, detail::tvec4<T, P>(Pf0.x, Pf0.y, Pf0.z, Pf1.w));\r\n\t\tT n1001 = dot(g1001, detail::tvec4<T, P>(Pf1.x, Pf0.y, Pf0.z, Pf1.w));\r\n\t\tT n0101 = dot(g0101, detail::tvec4<T, P>(Pf0.x, Pf1.y, Pf0.z, Pf1.w));\r\n\t\tT n1101 = dot(g1101, detail::tvec4<T, P>(Pf1.x, Pf1.y, Pf0.z, Pf1.w));\r\n\t\tT n0011 = dot(g0011, detail::tvec4<T, P>(Pf0.x, Pf0.y, Pf1.z, Pf1.w));\r\n\t\tT n1011 = dot(g1011, detail::tvec4<T, P>(Pf1.x, Pf0.y, Pf1.z, Pf1.w));\r\n\t\tT n0111 = dot(g0111, detail::tvec4<T, P>(Pf0.x, Pf1.y, Pf1.z, Pf1.w));\r\n\t\tT n1111 = dot(g1111, Pf1);\r\n\r\n\t\tdetail::tvec4<T, P> fade_xyzw = fade(Pf0);\r\n\t\tdetail::tvec4<T, P> n_0w = mix(detail::tvec4<T, P>(n0000, n1000, n0100, n1100), detail::tvec4<T, P>(n0001, n1001, n0101, n1101), fade_xyzw.w);\r\n\t\tdetail::tvec4<T, P> n_1w = mix(detail::tvec4<T, P>(n0010, n1010, n0110, n1110), detail::tvec4<T, P>(n0011, n1011, n0111, n1111), fade_xyzw.w);\r\n\t\tdetail::tvec4<T, P> n_zw = mix(n_0w, n_1w, fade_xyzw.z);\r\n\t\tdetail::tvec2<T, P> n_yzw = mix(detail::tvec2<T, P>(n_zw.x, n_zw.y), detail::tvec2<T, P>(n_zw.z, n_zw.w), fade_xyzw.y);\r\n\t\tT n_xyzw = mix(n_yzw.x, n_yzw.y, fade_xyzw.x);\r\n\t\treturn T(2.2) * n_xyzw;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T simplex(glm::detail::tvec2<T, P> const & v)\r\n\t{\r\n\t\tdetail::tvec4<T, P> const C = detail::tvec4<T, P>(\r\n\t\t\tT( 0.211324865405187),  // (3.0 -  sqrt(3.0)) / 6.0\r\n\t\t\tT( 0.366025403784439),  //  0.5 * (sqrt(3.0)  - 1.0)\r\n\t\t\tT(-0.577350269189626),\t// -1.0 + 2.0 * C.x\r\n\t\t\tT( 0.024390243902439)); //  1.0 / 41.0\r\n\r\n\t\t// First corner\r\n\t\tdetail::tvec2<T, P> i  = floor(v + dot(v, detail::tvec2<T, P>(C[1])));\r\n\t\tdetail::tvec2<T, P> x0 = v -   i + dot(i, detail::tvec2<T, P>(C[0]));\r\n\r\n\t\t// Other corners\r\n\t\t//i1.x = step( x0.y, x0.x ); // x0.x > x0.y ? 1.0 : 0.0\r\n\t\t//i1.y = 1.0 - i1.x;\r\n\t\tdetail::tvec2<T, P> i1 = (x0.x > x0.y) ? detail::tvec2<T, P>(1, 0) : detail::tvec2<T, P>(0, 1);\r\n\t\t// x0 = x0 - 0.0 + 0.0 * C.xx ;\r\n\t\t// x1 = x0 - i1 + 1.0 * C.xx ;\r\n\t\t// x2 = x0 - 1.0 + 2.0 * C.xx ;\r\n\t\tdetail::tvec4<T, P> x12 = detail::tvec4<T, P>(x0.x, x0.y, x0.x, x0.y) + detail::tvec4<T, P>(C.x, C.x, C.z, C.z);\r\n\t\tx12 = detail::tvec4<T, P>(detail::tvec2<T, P>(x12) - i1, x12.z, x12.w);\r\n\r\n\t\t// Permutations\r\n\t\ti = mod(i, detail::tvec2<T, P>(289)); // Avoid truncation effects in permutation\r\n\t\tdetail::tvec3<T, P> p = detail::permute(\r\n\t\t\tdetail::permute(i.y + detail::tvec3<T, P>(T(0), i1.y, T(1)))\r\n\t\t\t+ i.x + detail::tvec3<T, P>(T(0), i1.x, T(1)));\r\n\r\n\t\tdetail::tvec3<T, P> m = max(detail::tvec3<T, P>(0.5) - detail::tvec3<T, P>(\r\n\t\t\tdot(x0, x0),\r\n\t\t\tdot(detail::tvec2<T, P>(x12.x, x12.y), detail::tvec2<T, P>(x12.x, x12.y)), \r\n\t\t\tdot(detail::tvec2<T, P>(x12.z, x12.w), detail::tvec2<T, P>(x12.z, x12.w))), detail::tvec3<T, P>(0));\r\n\t\tm = m * m ;\r\n\t\tm = m * m ;\r\n\r\n\t\t// Gradients: 41 points uniformly over a line, mapped onto a diamond.\r\n\t\t// The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287)\r\n\r\n\t\tdetail::tvec3<T, P> x = static_cast<T>(2) * fract(p * C.w) - T(1);\r\n\t\tdetail::tvec3<T, P> h = abs(x) - T(0.5);\r\n\t\tdetail::tvec3<T, P> ox = floor(x + T(0.5));\r\n\t\tdetail::tvec3<T, P> a0 = x - ox;\r\n\r\n\t\t// Normalise gradients implicitly by scaling m\r\n\t\t// Inlined for speed: m *= taylorInvSqrt( a0*a0 + h*h );\r\n\t\tm *= static_cast<T>(1.79284291400159) - T(0.85373472095314) * (a0 * a0 + h * h);\r\n\r\n\t\t// Compute final noise value at P\r\n\t\tdetail::tvec3<T, P> g;\r\n\t\tg.x  = a0.x  * x0.x  + h.x  * x0.y;\r\n\t\t//g.yz = a0.yz * x12.xz + h.yz * x12.yw;\r\n\t\tg.y = a0.y * x12.x + h.y * x12.y;\r\n\t\tg.z = a0.z * x12.z + h.z * x12.w;\r\n\t\treturn T(130) * dot(m, g);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T simplex(detail::tvec3<T, P> const & v)\r\n\t{\r\n\t\tdetail::tvec2<T, P> const C(1.0 / 6.0, 1.0 / 3.0);\r\n\t\tdetail::tvec4<T, P> const D(0.0, 0.5, 1.0, 2.0);\r\n\r\n\t\t// First corner\r\n\t\tdetail::tvec3<T, P> i(floor(v + dot(v, detail::tvec3<T, P>(C.y))));\r\n\t\tdetail::tvec3<T, P> x0(v - i + dot(i, detail::tvec3<T, P>(C.x)));\r\n\r\n\t\t// Other corners\r\n\t\tdetail::tvec3<T, P> g(step(detail::tvec3<T, P>(x0.y, x0.z, x0.x), x0));\r\n\t\tdetail::tvec3<T, P> l(T(1) - g);\r\n\t\tdetail::tvec3<T, P> i1(min(g, detail::tvec3<T, P>(l.z, l.x, l.y)));\r\n\t\tdetail::tvec3<T, P> i2(max(g, detail::tvec3<T, P>(l.z, l.x, l.y)));\r\n\r\n\t\t//   x0 = x0 - 0.0 + 0.0 * C.xxx;\r\n\t\t//   x1 = x0 - i1  + 1.0 * C.xxx;\r\n\t\t//   x2 = x0 - i2  + 2.0 * C.xxx;\r\n\t\t//   x3 = x0 - 1.0 + 3.0 * C.xxx;\r\n\t\tdetail::tvec3<T, P> x1(x0 - i1 + C.x);\r\n\t\tdetail::tvec3<T, P> x2(x0 - i2 + C.y); // 2.0*C.x = 1/3 = C.y\r\n\t\tdetail::tvec3<T, P> x3(x0 - D.y);      // -1.0+3.0*C.x = -0.5 = -D.y\r\n\r\n\t\t// Permutations\r\n\t\ti = mod289(i); \r\n\t\tdetail::tvec4<T, P> p(detail::permute(detail::permute(detail::permute(\r\n\t\t\ti.z + detail::tvec4<T, P>(T(0), i1.z, i2.z, T(1))) +\r\n\t\t\ti.y + detail::tvec4<T, P>(T(0), i1.y, i2.y, T(1))) +\r\n\t\t\ti.x + detail::tvec4<T, P>(T(0), i1.x, i2.x, T(1))));\r\n\r\n\t\t// Gradients: 7x7 points over a square, mapped onto an octahedron.\r\n\t\t// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\r\n\t\tT n_ = static_cast<T>(0.142857142857); // 1.0/7.0\r\n\t\tdetail::tvec3<T, P> ns(n_ * detail::tvec3<T, P>(D.w, D.y, D.z) - detail::tvec3<T, P>(D.x, D.z, D.x));\r\n\r\n\t\tdetail::tvec4<T, P> j(p - T(49) * floor(p * ns.z * ns.z));  //  mod(p,7*7)\r\n\r\n\t\tdetail::tvec4<T, P> x_(floor(j * ns.z));\r\n\t\tdetail::tvec4<T, P> y_(floor(j - T(7) * x_));    // mod(j,N)\r\n\r\n\t\tdetail::tvec4<T, P> x(x_ * ns.x + ns.y);\r\n\t\tdetail::tvec4<T, P> y(y_ * ns.x + ns.y);\r\n\t\tdetail::tvec4<T, P> h(T(1) - abs(x) - abs(y));\r\n\r\n\t\tdetail::tvec4<T, P> b0(x.x, x.y, y.x, y.y);\r\n\t\tdetail::tvec4<T, P> b1(x.z, x.w, y.z, y.w);\r\n\r\n\t\t// vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\r\n\t\t// vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\r\n\t\tdetail::tvec4<T, P> s0(floor(b0) * T(2) + T(1));\r\n\t\tdetail::tvec4<T, P> s1(floor(b1) * T(2) + T(1));\r\n\t\tdetail::tvec4<T, P> sh(-step(h, detail::tvec4<T, P>(0.0)));\r\n\r\n\t\tdetail::tvec4<T, P> a0 = detail::tvec4<T, P>(b0.x, b0.z, b0.y, b0.w) + detail::tvec4<T, P>(s0.x, s0.z, s0.y, s0.w) * detail::tvec4<T, P>(sh.x, sh.x, sh.y, sh.y);\r\n\t\tdetail::tvec4<T, P> a1 = detail::tvec4<T, P>(b1.x, b1.z, b1.y, b1.w) + detail::tvec4<T, P>(s1.x, s1.z, s1.y, s1.w) * detail::tvec4<T, P>(sh.z, sh.z, sh.w, sh.w);\r\n\r\n\t\tdetail::tvec3<T, P> p0(a0.x, a0.y, h.x);\r\n\t\tdetail::tvec3<T, P> p1(a0.z, a0.w, h.y);\r\n\t\tdetail::tvec3<T, P> p2(a1.x, a1.y, h.z);\r\n\t\tdetail::tvec3<T, P> p3(a1.z, a1.w, h.w);\r\n\r\n\t\t// Normalise gradients\r\n\t\tdetail::tvec4<T, P> norm = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3)));\r\n\t\tp0 *= norm.x;\r\n\t\tp1 *= norm.y;\r\n\t\tp2 *= norm.z;\r\n\t\tp3 *= norm.w;\r\n\r\n\t\t// Mix final noise value\r\n\t\tdetail::tvec4<T, P> m = max(T(0.6) - detail::tvec4<T, P>(dot(x0, x0), dot(x1, x1), dot(x2, x2), dot(x3, x3)), detail::tvec4<T, P>(0));\r\n\t\tm = m * m;\r\n\t\treturn T(42) * dot(m * m, detail::tvec4<T, P>(dot(p0, x0), dot(p1, x1), dot(p2, x2), dot(p3, x3)));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T simplex(detail::tvec4<T, P> const & v)\r\n\t{\r\n\t\tdetail::tvec4<T, P> const C(\r\n\t\t\t0.138196601125011,  // (5 - sqrt(5))/20  G4\r\n\t\t\t0.276393202250021,  // 2 * G4\r\n\t\t\t0.414589803375032,  // 3 * G4\r\n\t\t\t-0.447213595499958); // -1 + 4 * G4\r\n\r\n\t\t// (sqrt(5) - 1)/4 = F4, used once below\r\n\t\tT const F4 = static_cast<T>(0.309016994374947451);\r\n\r\n\t\t// First corner\r\n\t\tdetail::tvec4<T, P> i  = floor(v + dot(v, vec4(F4)));\r\n\t\tdetail::tvec4<T, P> x0 = v -   i + dot(i, vec4(C.x));\r\n\r\n\t\t// Other corners\r\n\r\n\t\t// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)\r\n\t\tdetail::tvec4<T, P> i0;\r\n\t\tdetail::tvec3<T, P> isX = step(detail::tvec3<T, P>(x0.y, x0.z, x0.w), detail::tvec3<T, P>(x0.x));\r\n\t\tdetail::tvec3<T, P> isYZ = step(detail::tvec3<T, P>(x0.z, x0.w, x0.w), detail::tvec3<T, P>(x0.y, x0.y, x0.z));\r\n\t\t//  i0.x = dot(isX, vec3(1.0));\r\n\t\t//i0.x = isX.x + isX.y + isX.z;\r\n\t\t//i0.yzw = static_cast<T>(1) - isX;\r\n\t\ti0 = detail::tvec4<T, P>(isX.x + isX.y + isX.z, T(1) - isX);\r\n\t\t//  i0.y += dot(isYZ.xy, vec2(1.0));\r\n\t\ti0.y += isYZ.x + isYZ.y;\r\n\t\t//i0.zw += 1.0 - detail::tvec2<T, P>(isYZ.x, isYZ.y);\r\n\t\ti0.z += static_cast<T>(1) - isYZ.x;\r\n\t\ti0.w += static_cast<T>(1) - isYZ.y;\r\n\t\ti0.z += isYZ.z;\r\n\t\ti0.w += static_cast<T>(1) - isYZ.z;\r\n\r\n\t\t// i0 now contains the unique values 0,1,2,3 in each channel\r\n\t\tdetail::tvec4<T, P> i3 = clamp(i0, T(0), T(1));\r\n\t\tdetail::tvec4<T, P> i2 = clamp(i0 - T(1), T(0), T(1));\r\n\t\tdetail::tvec4<T, P> i1 = clamp(i0 - T(2), T(0), T(1));\r\n\r\n\t\t//  x0 = x0 - 0.0 + 0.0 * C.xxxx\r\n\t\t//  x1 = x0 - i1  + 0.0 * C.xxxx\r\n\t\t//  x2 = x0 - i2  + 0.0 * C.xxxx\r\n\t\t//  x3 = x0 - i3  + 0.0 * C.xxxx\r\n\t\t//  x4 = x0 - 1.0 + 4.0 * C.xxxx\r\n\t\tdetail::tvec4<T, P> x1 = x0 - i1 + C.x;\r\n\t\tdetail::tvec4<T, P> x2 = x0 - i2 + C.y;\r\n\t\tdetail::tvec4<T, P> x3 = x0 - i3 + C.z;\r\n\t\tdetail::tvec4<T, P> x4 = x0 + C.w;\r\n\r\n\t\t// Permutations\r\n\t\ti = mod(i, detail::tvec4<T, P>(289)); \r\n\t\tT j0 = detail::permute(detail::permute(detail::permute(detail::permute(i.w) + i.z) + i.y) + i.x);\r\n\t\tdetail::tvec4<T, P> j1 = detail::permute(detail::permute(detail::permute(detail::permute(\r\n\t\t\ti.w + detail::tvec4<T, P>(i1.w, i2.w, i3.w, T(1))) +\r\n\t\t\ti.z + detail::tvec4<T, P>(i1.z, i2.z, i3.z, T(1))) +\r\n\t\t\ti.y + detail::tvec4<T, P>(i1.y, i2.y, i3.y, T(1))) +\r\n\t\t\ti.x + detail::tvec4<T, P>(i1.x, i2.x, i3.x, T(1)));\r\n\r\n\t\t// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope\r\n\t\t// 7*7*6 = 294, which is close to the ring size 17*17 = 289.\r\n\t\tdetail::tvec4<T, P> ip = detail::tvec4<T, P>(T(1) / T(294), T(1) / T(49), T(1) / T(7), T(0));\r\n\r\n\t\tdetail::tvec4<T, P> p0 = gtc::grad4(j0,   ip);\r\n\t\tdetail::tvec4<T, P> p1 = gtc::grad4(j1.x, ip);\r\n\t\tdetail::tvec4<T, P> p2 = gtc::grad4(j1.y, ip);\r\n\t\tdetail::tvec4<T, P> p3 = gtc::grad4(j1.z, ip);\r\n\t\tdetail::tvec4<T, P> p4 = gtc::grad4(j1.w, ip);\r\n\r\n\t\t// Normalise gradients\r\n\t\tdetail::tvec4<T, P> norm = detail::taylorInvSqrt(detail::tvec4<T, P>(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3)));\r\n\t\tp0 *= norm.x;\r\n\t\tp1 *= norm.y;\r\n\t\tp2 *= norm.z;\r\n\t\tp3 *= norm.w;\r\n\t\tp4 *= detail::taylorInvSqrt(dot(p4, p4));\r\n\r\n\t\t// Mix contributions from the five corners\r\n\t\tdetail::tvec3<T, P> m0 = max(T(0.6) - detail::tvec3<T, P>(dot(x0, x0), dot(x1, x1), dot(x2, x2)), detail::tvec3<T, P>(0));\r\n\t\tdetail::tvec2<T, P> m1 = max(T(0.6) - detail::tvec2<T, P>(dot(x3, x3), dot(x4, x4)             ), detail::tvec2<T, P>(0));\r\n\t\tm0 = m0 * m0;\r\n\t\tm1 = m1 * m1;\r\n\t\treturn T(49) * \r\n\t\t\t(dot(m0 * m0, detail::tvec3<T, P>(dot(p0, x0), dot(p1, x1), dot(p2, x2))) + \r\n\t\t\tdot(m1 * m1, detail::tvec2<T, P>(dot(p3, x3), dot(p4, x4))));\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtc/packing.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_packing\r\n/// @file glm/gtc/packing.hpp\r\n/// @date 2013-08-08 / 2013-08-08\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtc_packing GLM_GTC_packing\r\n/// @ingroup gtc\r\n/// \r\n/// @brief This extension provides a set of function to convert vertors to packed\r\n/// formats.\r\n/// \r\n/// <glm/gtc/packing.hpp> need to be included to use these features.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_packing\r\n#define GLM_GTC_packing\r\n\r\n// Dependency:\r\n#include \"type_precision.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_packing extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_packing\r\n\t/// @{\r\n\r\n\t/// First, converts the normalized floating-point value v into a 8-bit integer value.\r\n\t/// Then, the results are packed into the returned 8-bit unsigned integer.\r\n\t///\r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packUnorm1x8:\tround(clamp(c, 0, +1) * 255.0)\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see uint16 packUnorm2x8(vec2 const & v)\r\n\t/// @see uint32 packUnorm4x8(vec4 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml\">GLSL packUnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint8 packUnorm1x8(float const & v);\r\n\r\n\t/// Convert a single 8-bit integer to a normalized floating-point value.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackUnorm4x8: f / 255.0\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see vec2 unpackUnorm2x8(uint16 p)\r\n\t/// @see vec4 unpackUnorm4x8(uint32 p)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml\">GLSL unpackUnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL float unpackUnorm1x8(uint8 const & p);\r\n\r\n\t/// First, converts each component of the normalized floating-point value v into 8-bit integer values.\r\n\t/// Then, the results are packed into the returned 16-bit unsigned integer.\r\n\t///\r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packUnorm2x8:\tround(clamp(c, 0, +1) * 255.0)\r\n\t///\r\n\t/// The first component of the vector will be written to the least significant bits of the output;\r\n\t/// the last component will be written to the most significant bits.\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see uint8 packUnorm1x8(float const & v)\r\n\t/// @see uint32 packUnorm4x8(vec4 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml\">GLSL packUnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint16 packUnorm2x8(vec2 const & v);\r\n\r\n\t/// First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit unsigned integers. \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned two-component vector.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackUnorm4x8: f / 255.0\r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see float unpackUnorm1x8(uint8 v)\r\n\t/// @see vec4 unpackUnorm4x8(uint32 p)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm4x8.xml\">GLSL unpackUnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL vec2 unpackUnorm2x8(uint16 const & p);\r\n\t\r\n\t/// First, converts the normalized floating-point value v into 8-bit integer value.\r\n\t/// Then, the results are packed into the returned 8-bit unsigned integer.\r\n\t///\r\n\t/// The conversion to fixed point is done as follows:\r\n\t/// packSnorm1x8:\tround(clamp(s, -1, +1) * 127.0)\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see uint16 packSnorm2x8(vec2 const & v)\r\n\t/// @see uint32 packSnorm4x8(vec4 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml\">GLSL packSnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint8 packSnorm1x8(float const & s);\r\n\r\n\t/// First, unpacks a single 8-bit unsigned integer p into a single 8-bit signed integers. \r\n\t/// Then, the value is converted to a normalized floating-point value to generate the returned scalar.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackSnorm1x8: clamp(f / 127.0, -1, +1)\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see vec2 unpackSnorm2x8(uint16 p)\r\n\t/// @see vec4 unpackSnorm4x8(uint32 p)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml\">GLSL unpackSnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL float unpackSnorm1x8(uint8 const & p);\r\n\t\r\n\t/// First, converts each component of the normalized floating-point value v into 8-bit integer values.\r\n\t/// Then, the results are packed into the returned 16-bit unsigned integer.\r\n\t///\r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packSnorm2x8:\tround(clamp(c, -1, +1) * 127.0)\r\n\t///\r\n\t/// The first component of the vector will be written to the least significant bits of the output;\r\n\t/// the last component will be written to the most significant bits.\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see uint8 packSnorm1x8(float const & v)\r\n\t/// @see uint32 packSnorm4x8(vec4 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml\">GLSL packSnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint16 packSnorm2x8(vec2 const & v);\r\n\r\n\t/// First, unpacks a single 16-bit unsigned integer p into a pair of 8-bit signed integers. \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned two-component vector.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackSnorm2x8: clamp(f / 127.0, -1, +1)\r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see float unpackSnorm1x8(uint8 p)\r\n\t/// @see vec4 unpackSnorm4x8(uint32 p)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm4x8.xml\">GLSL unpackSnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL vec2 unpackSnorm2x8(uint16 const & p);\r\n\t\r\n\t/// First, converts the normalized floating-point value v into a 16-bit integer value.\r\n\t/// Then, the results are packed into the returned 16-bit unsigned integer.\r\n\t///\r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packUnorm1x16:\tround(clamp(c, 0, +1) * 65535.0)\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see uint16 packSnorm1x16(float const & v)\r\n\t/// @see uint64 packSnorm4x16(vec4 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml\">GLSL packUnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint16 packUnorm1x16(float const & v);\r\n\r\n\t/// First, unpacks a single 16-bit unsigned integer p into a of 16-bit unsigned integers. \r\n\t/// Then, the value is converted to a normalized floating-point value to generate the returned scalar.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackUnorm1x16: f / 65535.0 \r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see vec2 unpackUnorm2x16(uint32 p)\r\n\t/// @see vec4 unpackUnorm4x16(uint64 p)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml\">GLSL unpackUnorm2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL float unpackUnorm1x16(uint16 const & p);\r\n\r\n\t/// First, converts each component of the normalized floating-point value v into 16-bit integer values.\r\n\t/// Then, the results are packed into the returned 64-bit unsigned integer.\r\n\t///\r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packUnorm4x16:\tround(clamp(c, 0, +1) * 65535.0)\r\n\t///\r\n\t/// The first component of the vector will be written to the least significant bits of the output;\r\n\t/// the last component will be written to the most significant bits.\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see uint16 packUnorm1x16(float const & v)\r\n\t/// @see uint32 packUnorm2x16(vec2 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packUnorm4x8.xml\">GLSL packUnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint64 packUnorm4x16(vec4 const & v);\r\n\r\n\t/// First, unpacks a single 64-bit unsigned integer p into four 16-bit unsigned integers. \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackUnormx4x16: f / 65535.0 \r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see float unpackUnorm1x16(uint16 p)\r\n\t/// @see vec2 unpackUnorm2x16(uint32 p)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackUnorm2x16.xml\">GLSL unpackUnorm2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL vec4 unpackUnorm4x16(uint64 const & p);\r\n\r\n\t/// First, converts the normalized floating-point value v into 16-bit integer value.\r\n\t/// Then, the results are packed into the returned 16-bit unsigned integer.\r\n\t///\r\n\t/// The conversion to fixed point is done as follows:\r\n\t/// packSnorm1x8:\tround(clamp(s, -1, +1) * 32767.0)\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see uint32 packSnorm2x16(vec2 const & v)\r\n\t/// @see uint64 packSnorm4x16(vec4 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml\">GLSL packSnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint16 packSnorm1x16(float const & v);\r\n\r\n\t/// First, unpacks a single 16-bit unsigned integer p into a single 16-bit signed integers. \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned scalar.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackSnorm1x16: clamp(f / 32767.0, -1, +1)\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see vec2 unpackSnorm2x16(uint32 p)\r\n\t/// @see vec4 unpackSnorm4x16(uint64 p)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm1x16.xml\">GLSL unpackSnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL float unpackSnorm1x16(uint16 const & p);\r\n\r\n\t/// First, converts each component of the normalized floating-point value v into 16-bit integer values.\r\n\t/// Then, the results are packed into the returned 64-bit unsigned integer.\r\n\t///\r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packSnorm2x8:\tround(clamp(c, -1, +1) * 32767.0)\r\n\t///\r\n\t/// The first component of the vector will be written to the least significant bits of the output;\r\n\t/// the last component will be written to the most significant bits.\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see uint16 packSnorm1x16(float const & v)\r\n\t/// @see uint32 packSnorm2x16(vec2 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packSnorm4x8.xml\">GLSL packSnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint64 packSnorm4x16(vec4 const & v);\r\n\r\n\t/// First, unpacks a single 64-bit unsigned integer p into four 16-bit signed integers. \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackSnorm4x16: clamp(f / 32767.0, -1, +1)\r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see float unpackSnorm1x16(uint16 p)\r\n\t/// @see vec2 unpackSnorm2x16(uint32 p)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackSnorm2x16.xml\">GLSL unpackSnorm4x8 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL vec4 unpackSnorm4x16(uint64 const & p);\r\n\t\r\n\t/// Returns an unsigned integer obtained by converting the components of a floating-point scalar\r\n\t/// to the 16-bit floating-point representation found in the OpenGL Specification,\r\n\t/// and then packing this 16-bit value into a 16-bit unsigned integer.\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see uint32 packHalf2x16(vec2 const & v)\r\n\t/// @see uint64 packHalf4x16(vec4 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml\">GLSL packHalf2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint16 packHalf1x16(float const & v);\r\n\t\r\n\t/// Returns a floating-point scalar with components obtained by unpacking a 16-bit unsigned integer into a 16-bit value,\r\n\t/// interpreted as a 16-bit floating-point number according to the OpenGL Specification,\r\n\t/// and converting it to 32-bit floating-point values.\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see vec2 unpackHalf2x16(uint32 const & v)\r\n\t/// @see vec4 unpackHalf4x16(uint64 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml\">GLSL unpackHalf2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL float unpackHalf1x16(uint16 const & v);\r\n\r\n\t/// Returns an unsigned integer obtained by converting the components of a four-component floating-point vector \r\n\t/// to the 16-bit floating-point representation found in the OpenGL Specification, \r\n\t/// and then packing these four 16-bit values into a 64-bit unsigned integer.\r\n\t/// The first vector component specifies the 16 least-significant bits of the result; \r\n\t/// the forth component specifies the 16 most-significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see uint16 packHalf1x16(float const & v)\r\n\t/// @see uint32 packHalf2x16(vec2 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/packHalf2x16.xml\">GLSL packHalf2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL uint64 packHalf4x16(vec4 const & v);\r\n\t\r\n\t/// Returns a four-component floating-point vector with components obtained by unpacking a 64-bit unsigned integer into four 16-bit values,\r\n\t/// interpreting those values as 16-bit floating-point numbers according to the OpenGL Specification, \r\n\t/// and converting them to 32-bit floating-point values.\r\n\t/// The first component of the vector is obtained from the 16 least-significant bits of v; \r\n\t/// the forth component is obtained from the 16 most-significant bits of v.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see float unpackHalf1x16(uint16 const & v)\r\n\t/// @see vec2 unpackHalf2x16(uint32 const & v)\r\n\t/// @see <a href=\"http://www.opengl.org/sdk/docs/manglsl/xhtml/unpackHalf2x16.xml\">GLSL unpackHalf2x16 man page</a>\r\n\t/// @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>\r\n\tGLM_FUNC_DECL vec4 unpackHalf4x16(uint64 const & p);\r\n\r\n\t/// Returns an unsigned integer obtained by converting the components of a four-component signed integer vector \r\n\t/// to the 10-10-10-2-bit signed integer representation found in the OpenGL Specification, \r\n\t/// and then packing these four values into a 32-bit unsigned integer.\r\n\t/// The first vector component specifies the 10 least-significant bits of the result; \r\n\t/// the forth component specifies the 2 most-significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see uint32 packI3x10_1x2(uvec4 const & v)\r\n\t/// @see uint32 packSnorm3x10_1x2(vec4 const & v)\r\n\t/// @see uint32 packUnorm3x10_1x2(vec4 const & v)\r\n\t/// @see ivec4 unpackI3x10_1x2(uint32 const & p)\r\n\tGLM_FUNC_DECL uint32 packI3x10_1x2(ivec4 const & v);\r\n\r\n\t/// Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit signed integers. \r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see uint32 packU3x10_1x2(uvec4 const & v)\r\n\t/// @see vec4 unpackSnorm3x10_1x2(uint32 const & p);\r\n\t/// @see uvec4 unpackI3x10_1x2(uint32 const & p);\r\n\tGLM_FUNC_DECL ivec4 unpackI3x10_1x2(uint32 const & p);\r\n\r\n\t/// Returns an unsigned integer obtained by converting the components of a four-component unsigned integer vector \r\n\t/// to the 10-10-10-2-bit unsigned integer representation found in the OpenGL Specification, \r\n\t/// and then packing these four values into a 32-bit unsigned integer.\r\n\t/// The first vector component specifies the 10 least-significant bits of the result; \r\n\t/// the forth component specifies the 2 most-significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see uint32 packI3x10_1x2(ivec4 const & v)\r\n\t/// @see uint32 packSnorm3x10_1x2(vec4 const & v)\r\n\t/// @see uint32 packUnorm3x10_1x2(vec4 const & v)\r\n\t/// @see ivec4 unpackU3x10_1x2(uint32 const & p)\r\n\tGLM_FUNC_DECL uint32 packU3x10_1x2(uvec4 const & v);\r\n\r\n\t/// Unpacks a single 32-bit unsigned integer p into three 10-bit and one 2-bit unsigned integers. \r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see uint32 packU3x10_1x2(uvec4 const & v)\r\n\t/// @see vec4 unpackSnorm3x10_1x2(uint32 const & p);\r\n\t/// @see uvec4 unpackI3x10_1x2(uint32 const & p);\r\n\tGLM_FUNC_DECL uvec4 unpackU3x10_1x2(uint32 const & p);\r\n\r\n\t/// First, converts the first three components of the normalized floating-point value v into 10-bit signed integer values.\r\n\t/// Then, converts the forth component of the normalized floating-point value v into 2-bit signed integer values.\r\n\t/// Then, the results are packed into the returned 32-bit unsigned integer.\r\n\t///\r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packSnorm3x10_1x2(xyz):\tround(clamp(c, -1, +1) * 511.0)\r\n\t/// packSnorm3x10_1x2(w):\tround(clamp(c, -1, +1) * 1.0)\r\n\t///\r\n\t/// The first vector component specifies the 10 least-significant bits of the result; \r\n\t/// the forth component specifies the 2 most-significant bits.\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see vec4 unpackSnorm3x10_1x2(uint32 const & p)\r\n\t/// @see uint32 packUnorm3x10_1x2(vec4 const & v)\r\n\t/// @see uint32 packU3x10_1x2(uvec4 const & v)\r\n\t/// @see uint32 packI3x10_1x2(ivec4 const & v)\r\n\tGLM_FUNC_DECL uint32 packSnorm3x10_1x2(vec4 const & v);\r\n\r\n\t/// First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers. \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackSnorm3x10_1x2(xyz): clamp(f / 511.0, -1, +1)\r\n\t/// unpackSnorm3x10_1x2(w): clamp(f / 511.0, -1, +1)\r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see uint32 packSnorm3x10_1x2(vec4 const & v)\r\n\t/// @see vec4 unpackUnorm3x10_1x2(uint32 const & p))\r\n\t/// @see uvec4 unpackI3x10_1x2(uint32 const & p)\r\n\t/// @see uvec4 unpackU3x10_1x2(uint32 const & p)\r\n\tGLM_FUNC_DECL vec4 unpackSnorm3x10_1x2(uint32 const & p);\r\n\r\n\t/// First, converts the first three components of the normalized floating-point value v into 10-bit unsigned integer values.\r\n\t/// Then, converts the forth component of the normalized floating-point value v into 2-bit signed uninteger values.\r\n\t/// Then, the results are packed into the returned 32-bit unsigned integer.\r\n\t///\r\n\t/// The conversion for component c of v to fixed point is done as follows:\r\n\t/// packUnorm3x10_1x2(xyz):\tround(clamp(c, 0, +1) * 1023.0)\r\n\t/// packUnorm3x10_1x2(w):\tround(clamp(c, 0, +1) * 3.0)\r\n\t///\r\n\t/// The first vector component specifies the 10 least-significant bits of the result; \r\n\t/// the forth component specifies the 2 most-significant bits.\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see vec4 unpackUnorm3x10_1x2(uint32 const & p)\r\n\t/// @see uint32 packUnorm3x10_1x2(vec4 const & v)\r\n\t/// @see uint32 packU3x10_1x2(uvec4 const & v)\r\n\t/// @see uint32 packI3x10_1x2(ivec4 const & v)\r\n\tGLM_FUNC_DECL uint32 packUnorm3x10_1x2(vec4 const & v);\r\n\r\n\t/// First, unpacks a single 32-bit unsigned integer p into four 16-bit signed integers. \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned four-component vector.\r\n\t/// \r\n\t/// The conversion for unpacked fixed-point value f to floating point is done as follows:\r\n\t/// unpackSnorm3x10_1x2(xyz): clamp(f / 1023.0, 0, +1)\r\n\t/// unpackSnorm3x10_1x2(w): clamp(f / 3.0, 0, +1)\r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see uint32 packSnorm3x10_1x2(vec4 const & v)\r\n\t/// @see vec4 unpackInorm3x10_1x2(uint32 const & p))\r\n\t/// @see uvec4 unpackI3x10_1x2(uint32 const & p)\r\n\t/// @see uvec4 unpackU3x10_1x2(uint32 const & p)\r\n\tGLM_FUNC_DECL vec4 unpackUnorm3x10_1x2(uint32 const & p);\r\n\r\n\t/// First, converts the first two components of the normalized floating-point value v into 11-bit signless floating-point values.\r\n\t/// Then, converts the third component of the normalized floating-point value v into a 10-bit signless floating-point value.\r\n\t/// Then, the results are packed into the returned 32-bit unsigned integer.\r\n\t///\r\n\t/// The first vector component specifies the 11 least-significant bits of the result; \r\n\t/// the last component specifies the 10 most-significant bits.\r\n\t///\r\n\t/// @see gtc_packing\r\n\t/// @see vec3 unpackF2x11_1x10(uint32 const & p)\r\n\tGLM_FUNC_DECL uint32 packF2x11_1x10(vec3 const & v);\r\n\r\n\t/// First, unpacks a single 32-bit unsigned integer p into two 11-bit signless floating-point values and one 10-bit signless floating-point value . \r\n\t/// Then, each component is converted to a normalized floating-point value to generate the returned three-component vector.\r\n\t/// \r\n\t/// The first component of the returned vector will be extracted from the least significant bits of the input; \r\n\t/// the last component will be extracted from the most significant bits.\r\n\t/// \r\n\t/// @see gtc_packing\r\n\t/// @see uint32 packF2x11_1x10(vec3 const & v)\r\n\tGLM_FUNC_DECL vec3 unpackF2x11_1x10(uint32 const & p);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"packing.inl\"\r\n\r\n#endif//GLM_GTC_packing\r\n\r\n"
  },
  {
    "path": "gpu/glm/gtc/packing.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_packing\r\n/// @file glm/gtc/packing.inl\r\n/// @date 2013-08-08 / 2013-08-08\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../common.hpp\"\r\n#include \"../vec2.hpp\"\r\n#include \"../vec3.hpp\"\r\n#include \"../vec4.hpp\"\r\n#include \"../detail/type_half.hpp\"\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\tGLM_FUNC_QUALIFIER glm::uint16 float2half(glm::uint32 const & f)\r\n\t{\r\n\t\t// 10 bits    =>                         EE EEEFFFFF\r\n\t\t// 11 bits    =>                        EEE EEFFFFFF\r\n\t\t// Half bits  =>                   SEEEEEFF FFFFFFFF\r\n\t\t// Float bits => SEEEEEEE EFFFFFFF FFFFFFFF FFFFFFFF\r\n\r\n\t\t// 0x00007c00 => 00000000 00000000 01111100 00000000\r\n\t\t// 0x000003ff => 00000000 00000000 00000011 11111111\r\n\t\t// 0x38000000 => 00111000 00000000 00000000 00000000\r\n\t\t// 0x7f800000 => 01111111 10000000 00000000 00000000\r\n\t\t// 0x00008000 => 00000000 00000000 10000000 00000000\r\n\t\treturn\r\n\t\t\t((f >> 16) & 0x8000) | // sign\r\n\t\t\t((((f & 0x7f800000) - 0x38000000) >> 13) & 0x7c00) | // exponential\r\n\t\t\t((f >> 13) & 0x03ff); // Mantissa\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER glm::uint32 float2packed11(glm::uint32 const & f)\r\n\t{\r\n\t\t// 10 bits    =>                         EE EEEFFFFF\r\n\t\t// 11 bits    =>                        EEE EEFFFFFF\r\n\t\t// Half bits  =>                   SEEEEEFF FFFFFFFF\r\n\t\t// Float bits => SEEEEEEE EFFFFFFF FFFFFFFF FFFFFFFF\r\n\r\n\t\t// 0x000007c0 => 00000000 00000000 00000111 11000000\r\n\t\t// 0x00007c00 => 00000000 00000000 01111100 00000000\r\n\t\t// 0x000003ff => 00000000 00000000 00000011 11111111\r\n\t\t// 0x38000000 => 00111000 00000000 00000000 00000000\r\n\t\t// 0x7f800000 => 01111111 10000000 00000000 00000000\r\n\t\t// 0x00008000 => 00000000 00000000 10000000 00000000\r\n\t\treturn\r\n\t\t\t((((f & 0x7f800000) - 0x38000000) >> 17) & 0x07c0) | // exponential\r\n\t\t\t((f >> 17) & 0x003f); // Mantissa\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER glm::uint32 packed11ToFloat(glm::uint32 const & p)\r\n\t{\r\n\t\t// 10 bits    =>                         EE EEEFFFFF\r\n\t\t// 11 bits    =>                        EEE EEFFFFFF\r\n\t\t// Half bits  =>                   SEEEEEFF FFFFFFFF\r\n\t\t// Float bits => SEEEEEEE EFFFFFFF FFFFFFFF FFFFFFFF\r\n\r\n\t\t// 0x000007c0 => 00000000 00000000 00000111 11000000\r\n\t\t// 0x00007c00 => 00000000 00000000 01111100 00000000\r\n\t\t// 0x000003ff => 00000000 00000000 00000011 11111111\r\n\t\t// 0x38000000 => 00111000 00000000 00000000 00000000\r\n\t\t// 0x7f800000 => 01111111 10000000 00000000 00000000\r\n\t\t// 0x00008000 => 00000000 00000000 10000000 00000000\r\n\t\treturn\r\n\t\t\t((((p & 0x07c0) << 17) + 0x38000000) & 0x7f800000) | // exponential\r\n\t\t\t((p & 0x003f) << 17); // Mantissa\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER glm::uint32 float2packed10(glm::uint32 const & f)\r\n\t{\r\n\t\t// 10 bits    =>                         EE EEEFFFFF\r\n\t\t// 11 bits    =>                        EEE EEFFFFFF\r\n\t\t// Half bits  =>                   SEEEEEFF FFFFFFFF\r\n\t\t// Float bits => SEEEEEEE EFFFFFFF FFFFFFFF FFFFFFFF\r\n\r\n\t\t// 0x0000001F => 00000000 00000000 00000000 00011111\r\n\t\t// 0x0000003F => 00000000 00000000 00000000 00111111\r\n\t\t// 0x000003E0 => 00000000 00000000 00000011 11100000\r\n\t\t// 0x000007C0 => 00000000 00000000 00000111 11000000\r\n\t\t// 0x00007C00 => 00000000 00000000 01111100 00000000\r\n\t\t// 0x000003FF => 00000000 00000000 00000011 11111111\r\n\t\t// 0x38000000 => 00111000 00000000 00000000 00000000\r\n\t\t// 0x7f800000 => 01111111 10000000 00000000 00000000\r\n\t\t// 0x00008000 => 00000000 00000000 10000000 00000000\r\n\t\treturn\r\n\t\t\t((((f & 0x7f800000) - 0x38000000) >> 18) & 0x03E0) | // exponential\r\n\t\t\t((f >> 18) & 0x001f); // Mantissa\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER glm::uint32 packed10ToFloat(glm::uint32 const & p)\r\n\t{\r\n\t\t// 10 bits    =>                         EE EEEFFFFF\r\n\t\t// 11 bits    =>                        EEE EEFFFFFF\r\n\t\t// Half bits  =>                   SEEEEEFF FFFFFFFF\r\n\t\t// Float bits => SEEEEEEE EFFFFFFF FFFFFFFF FFFFFFFF\r\n\r\n\t\t// 0x0000001F => 00000000 00000000 00000000 00011111\r\n\t\t// 0x0000003F => 00000000 00000000 00000000 00111111\r\n\t\t// 0x000003E0 => 00000000 00000000 00000011 11100000\r\n\t\t// 0x000007C0 => 00000000 00000000 00000111 11000000\r\n\t\t// 0x00007C00 => 00000000 00000000 01111100 00000000\r\n\t\t// 0x000003FF => 00000000 00000000 00000011 11111111\r\n\t\t// 0x38000000 => 00111000 00000000 00000000 00000000\r\n\t\t// 0x7f800000 => 01111111 10000000 00000000 00000000\r\n\t\t// 0x00008000 => 00000000 00000000 10000000 00000000\r\n\t\treturn\r\n\t\t\t((((p & 0x03E0) << 18) + 0x38000000) & 0x7f800000) | // exponential\r\n\t\t\t((p & 0x001f) << 18); // Mantissa\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER glm::uint half2float(glm::uint const & h)\r\n\t{\r\n\t\treturn ((h & 0x8000) << 16) | ((( h & 0x7c00) + 0x1C000) << 13) | ((h & 0x03FF) << 13);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER glm::uint floatTo11bit(float x)\r\n\t{\r\n\t\tif(x == 0.0f)\r\n\t\t\treturn 0;\r\n\t\telse if(glm::isnan(x))\r\n\t\t\treturn ~0;\r\n\t\telse if(glm::isinf(x))\r\n\t\t\treturn 0x1f << 6;\r\n\r\n\t\treturn float2packed11(reinterpret_cast<uint&>(x));\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER float packed11bitToFloat(glm::uint x)\r\n\t{\r\n\t\tif(x == 0)\r\n\t\t\treturn 0.0f;\r\n\t\telse if(x == ((1 << 11) - 1))\r\n\t\t\treturn ~0;//NaN\r\n\t\telse if(x == (0x1f << 6))\r\n\t\t\treturn ~0;//Inf\r\n\r\n\t\tuint result = packed11ToFloat(x);\r\n\t\treturn reinterpret_cast<float&>(result);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER glm::uint floatTo10bit(float x)\r\n\t{\r\n\t\tif(x == 0.0f)\r\n\t\t\treturn 0;\r\n\t\telse if(glm::isnan(x))\r\n\t\t\treturn ~0;\r\n\t\telse if(glm::isinf(x))\r\n\t\t\treturn 0x1f << 5;\r\n\r\n\t\treturn float2packed10(reinterpret_cast<uint&>(x));\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER float packed10bitToFloat(glm::uint x)\r\n\t{\r\n\t\tif(x == 0)\r\n\t\t\treturn 0.0f;\r\n\t\telse if(x == ((1 << 10) - 1))\r\n\t\t\treturn ~0;//NaN\r\n\t\telse if(x == (0x1f << 5))\r\n\t\t\treturn ~0;//Inf\r\n\r\n\t\tuint result = packed10ToFloat(x);\r\n\t\treturn reinterpret_cast<float&>(result);\r\n\t}\r\n\r\n//\tGLM_FUNC_QUALIFIER glm::uint f11_f11_f10(float x, float y, float z)\r\n//\t{\r\n//\t\treturn ((floatTo11bit(x) & ((1 << 11) - 1)) << 0) |  ((floatTo11bit(y) & ((1 << 11) - 1)) << 11) | ((floatTo10bit(z) & ((1 << 10) - 1)) << 22);\r\n//\t}\r\n\r\n\tunion u10u10u10u2\r\n\t{\r\n\t\tstruct\r\n\t\t{\r\n\t\t\tuint x : 10;\r\n\t\t\tuint y : 10;\r\n\t\t\tuint z : 10;\r\n\t\t\tuint w : 2;\r\n\t\t} data;\r\n\t\tuint32 pack;\r\n\t};\r\n\r\n\tunion i10i10i10i2\r\n\t{\r\n\t\tstruct\r\n\t\t{\r\n\t\t\tint x : 10;\r\n\t\t\tint y : 10;\r\n\t\t\tint z : 10;\r\n\t\t\tint w : 2;\r\n\t\t} data;\r\n\t\tuint32 pack;\r\n\t};\r\n\r\n}//namespace detail\r\n\r\n\tGLM_FUNC_QUALIFIER uint8 packUnorm1x8(float const & v)\r\n\t{\r\n\t\treturn static_cast<uint8>(round(clamp(v, 0.0f, 1.0f) * 255.0f));\r\n\t}\r\n\t\r\n\tGLM_FUNC_QUALIFIER float unpackUnorm1x8(uint8 const & p)\r\n\t{\r\n\t\tfloat Unpack(static_cast<float>(p));\r\n\t\treturn Unpack * static_cast<float>(0.0039215686274509803921568627451); // 1 / 255\r\n\t}\r\n\t\r\n\tGLM_FUNC_QUALIFIER uint16 packUnorm2x8(vec2 const & v)\r\n\t{\r\n\t\tu8vec2 Topack(round(clamp(v, 0.0f, 1.0f) * 255.0f));\r\n\t\tuint16* Packed = reinterpret_cast<uint16*>(&Topack);\r\n\t\treturn *Packed;\r\n\t}\r\n\t\r\n\tGLM_FUNC_QUALIFIER vec2 unpackUnorm2x8(uint16 const & p)\r\n\t{\r\n\t\tu8vec2* Unpacked = reinterpret_cast<u8vec2*>(const_cast<uint16*>(&p));\r\n\t\treturn vec2(*Unpacked) * float(0.0039215686274509803921568627451); // 1 / 255\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint8 packSnorm1x8(float const & v)\r\n\t{\r\n\t\tint8 Topack(static_cast<int8>(round(clamp(v ,-1.0f, 1.0f) * 127.0f)));\r\n\t\tuint8* Packed = reinterpret_cast<uint8*>(&Topack);\r\n\t\treturn *Packed;\r\n\t}\r\n\t\r\n\tGLM_FUNC_QUALIFIER float unpackSnorm1x8(uint8 const & p)\r\n\t{\r\n\t\tfloat Unpack(static_cast<float>(*const_cast<uint8*>(&p)));\r\n\t\treturn clamp(\r\n\t\t\tUnpack * 0.00787401574803149606299212598425f, // 1.0f / 127.0f\r\n\t\t\t-1.0f, 1.0f);\r\n\t}\r\n\t\r\n\tGLM_FUNC_QUALIFIER uint16 packSnorm2x8(vec2 const & v)\r\n\t{\r\n\t\ti8vec2 Topack(round(clamp(v ,-1.0f, 1.0f) * 127.0f));\r\n\t\tuint16* Packed = reinterpret_cast<uint16*>(&Topack);\r\n\t\treturn *Packed;\r\n\t}\r\n\t\r\n\tGLM_FUNC_QUALIFIER vec2 unpackSnorm2x8(uint16 const & p)\r\n\t{\r\n\t\ti8vec2* Unpack = reinterpret_cast<i8vec2*>(const_cast<uint16*>(&p));\r\n\t\treturn clamp(\r\n\t\t\tvec2(*Unpack) * 0.00787401574803149606299212598425f, // 1.0f / 127.0f\r\n\t\t\t-1.0f, 1.0f);\r\n\t}\r\n\t\r\n\tGLM_FUNC_QUALIFIER uint16 packUnorm1x16(float const & s)\r\n\t{\r\n\t\treturn static_cast<uint16>(round(clamp(s, 0.0f, 1.0f) * 65535.0f));\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER float unpackUnorm1x16(uint16 const & p)\r\n\t{\r\n\t\tfloat Unpack = static_cast<float>(*const_cast<uint16*>(&p));\r\n\t\treturn Unpack * 1.5259021896696421759365224689097e-5f; // 1.0 / 65535.0\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint64 packUnorm4x16(vec4 const & v)\r\n\t{\r\n\t\tu16vec4 Topack(round(clamp(v , 0.0f, 1.0f) * 65535.0f));\r\n\t\tuint64* Packed = reinterpret_cast<uint64*>(&Topack);\r\n\t\treturn *Packed;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER vec4 unpackUnorm4x16(uint64 const & p)\r\n\t{\r\n\t\tu16vec4* Unpack = reinterpret_cast<u16vec4*>(const_cast<uint64*>(&p));\r\n\t\treturn vec4(*Unpack) * 1.5259021896696421759365224689097e-5f; // 1.0 / 65535.0\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint16 packSnorm1x16(float const & v)\r\n\t{\r\n\t\tint16 Topack = static_cast<int16>(round(clamp(v ,-1.0f, 1.0f) * 32767.0f));\r\n\t\tuint16* Packed = reinterpret_cast<uint16*>(&Topack);\r\n\t\treturn *Packed;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER float unpackSnorm1x16(uint16 const & p)\r\n\t{\r\n\t\tfloat Unpack = static_cast<float>(*const_cast<uint16*>(&p));\r\n\t\treturn clamp(\r\n\t\t\tUnpack * 3.0518509475997192297128208258309e-5f, //1.0f / 32767.0f, \r\n\t\t\t-1.0f, 1.0f);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint64 packSnorm4x16(vec4 const & v)\r\n\t{\r\n\t\ti16vec4 Topack = static_cast<i16vec4>(round(clamp(v ,-1.0f, 1.0f) * 32767.0f));\r\n\t\tuint64* Packed = reinterpret_cast<uint64*>(&Topack);\r\n\t\treturn *Packed;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER vec4 unpackSnorm4x16(uint64 const & p)\r\n\t{\r\n\t\ti16vec4* Unpack(reinterpret_cast<i16vec4*>(const_cast<uint64*>(&p)));\r\n\t\treturn clamp(\r\n\t\t\tvec4(*Unpack) * 3.0518509475997192297128208258309e-5f, //1.0f / 32767.0f,\r\n\t\t\t-1.0f, 1.0f);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint16 packHalf1x16(float const & v)\r\n\t{\r\n\t\tint16 Topack = detail::toFloat16(v);\r\n\t\tuint16* Packed = reinterpret_cast<uint16*>(&Topack);\r\n\t\treturn *Packed;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER float unpackHalf1x16(uint16 const & v)\r\n\t{\r\n\t\tint16* Unpack = reinterpret_cast<int16*>(const_cast<uint16*>(&v));\r\n\t\treturn detail::toFloat32(*Unpack);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint64 packHalf4x16(glm::vec4 const & v)\r\n\t{\r\n\t\ti16vec4 Unpack(\r\n\t\t\tdetail::toFloat16(v.x),\r\n\t\t\tdetail::toFloat16(v.y),\r\n\t\t\tdetail::toFloat16(v.z),\r\n\t\t\tdetail::toFloat16(v.w));\r\n\r\n\t\tuint64* Packed = reinterpret_cast<uint64*>(&Unpack);\r\n\t\treturn *Packed;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER glm::vec4 unpackHalf4x16(uint64 const & v)\r\n\t{\r\n\t\ti16vec4* p = reinterpret_cast<i16vec4*>(const_cast<uint64*>(&v));\r\n\t\ti16vec4 Unpack(*p);\r\n\t\r\n\t\treturn vec4(\r\n\t\t\tdetail::toFloat32(Unpack.x), \r\n\t\t\tdetail::toFloat32(Unpack.y), \r\n\t\t\tdetail::toFloat32(Unpack.z), \r\n\t\t\tdetail::toFloat32(Unpack.w));\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint32 packI3x10_1x2(ivec4 const & v)\r\n\t{\r\n\t\tdetail::i10i10i10i2 Result;\r\n\t\tResult.data.x = v.x;\r\n\t\tResult.data.y = v.y;\r\n\t\tResult.data.z = v.z;\r\n\t\tResult.data.w = v.w;\r\n\t\treturn Result.pack; \r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER ivec4 unpackI3x10_1x2(uint32 const & v)\r\n\t{\r\n\t\tdetail::i10i10i10i2 Unpack;\r\n\t\tUnpack.pack = v;\r\n\t\treturn ivec4(\r\n\t\t\tUnpack.data.x,\r\n\t\t\tUnpack.data.y,\r\n\t\t\tUnpack.data.z,\r\n\t\t\tUnpack.data.w);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint32 packU3x10_1x2(uvec4 const & v)\r\n\t{\r\n\t\tdetail::u10u10u10u2 Result;\r\n\t\tResult.data.x = v.x;\r\n\t\tResult.data.y = v.y;\r\n\t\tResult.data.z = v.z;\r\n\t\tResult.data.w = v.w;\r\n\t\treturn Result.pack; \r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uvec4 unpackU3x10_1x2(uint32 const & v)\r\n\t{\r\n\t\tdetail::u10u10u10u2 Unpack;\r\n\t\tUnpack.pack = v;\r\n\t\treturn uvec4(\r\n\t\t\tUnpack.data.x,\r\n\t\t\tUnpack.data.y,\r\n\t\t\tUnpack.data.z,\r\n\t\t\tUnpack.data.w);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint32 packSnorm3x10_1x2(vec4 const & v)\r\n\t{\r\n\t\tdetail::i10i10i10i2 Result;\r\n\t\tResult.data.x = int(round(clamp(v.x,-1.0f, 1.0f) * 511.f));\r\n\t\tResult.data.y = int(round(clamp(v.y,-1.0f, 1.0f) * 511.f));\r\n\t\tResult.data.z = int(round(clamp(v.z,-1.0f, 1.0f) * 511.f));\r\n\t\tResult.data.w = int(round(clamp(v.w,-1.0f, 1.0f) *   1.f));\r\n\t\treturn Result.pack;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER vec4 unpackSnorm3x10_1x2(uint32 const & v)\r\n\t{\r\n\t\tdetail::i10i10i10i2 Unpack;\r\n\t\tUnpack.pack = v;\r\n\t\tvec4 Result;\r\n\t\tResult.x = clamp(float(Unpack.data.x) / 511.f, -1.0f, 1.0f);\r\n\t\tResult.y = clamp(float(Unpack.data.y) / 511.f, -1.0f, 1.0f);\r\n\t\tResult.z = clamp(float(Unpack.data.z) / 511.f, -1.0f, 1.0f);\r\n\t\tResult.w = clamp(float(Unpack.data.w) /   1.f, -1.0f, 1.0f);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint32 packUnorm3x10_1x2(vec4 const & v)\r\n\t{\r\n\t\tdetail::i10i10i10i2 Result;\r\n\t\tResult.data.x = int(round(clamp(v.x, 0.0f, 1.0f) * 1023.f));\r\n\t\tResult.data.y = int(round(clamp(v.y, 0.0f, 1.0f) * 1023.f));\r\n\t\tResult.data.z = int(round(clamp(v.z, 0.0f, 1.0f) * 1023.f));\r\n\t\tResult.data.w = int(round(clamp(v.w, 0.0f, 1.0f) *    3.f));\r\n\t\treturn Result.pack;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER vec4 unpackUnorm3x10_1x2(uint32 const & v)\r\n\t{\r\n\t\tdetail::i10i10i10i2 Unpack;\r\n\t\tUnpack.pack = v;\r\n\t\tvec4 Result;\r\n\t\tResult.x = float(Unpack.data.x) / 1023.f;\r\n\t\tResult.y = float(Unpack.data.y) / 1023.f;\r\n\t\tResult.z = float(Unpack.data.z) / 1023.f;\r\n\t\tResult.w = float(Unpack.data.w) /   3.f;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint32 packF2x11_1x10(vec3 const & v)\r\n\t{\r\n\t\treturn \r\n\t\t\t((detail::floatTo11bit(v.x) & ((1 << 11) - 1)) <<  0) |\r\n\t\t\t((detail::floatTo11bit(v.y) & ((1 << 11) - 1)) << 11) |\r\n\t\t\t((detail::floatTo10bit(v.z) & ((1 << 10) - 1)) << 22);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER vec3 unpackF2x11_1x10(uint32 const & v)\r\n\t{\r\n\t\treturn vec3(\r\n\t\t\tdetail::packed11bitToFloat(v >> 0), \r\n\t\t\tdetail::packed11bitToFloat(v >> 11), \r\n\t\t\tdetail::packed10bitToFloat(v >> 22));\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtc/quaternion.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_quaternion\r\n/// @file glm/gtc/quaternion.hpp\r\n/// @date 2009-05-21 / 2012-12-20\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_half_float (dependence)\r\n/// @see gtc_constants (dependence)\r\n///\r\n/// @defgroup gtc_quaternion GLM_GTC_quaternion\r\n/// @ingroup gtc\r\n/// \r\n/// @brief Defines a templated quaternion type and several quaternion operations.\r\n/// \r\n/// <glm/gtc/quaternion.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_quaternion\r\n#define GLM_GTC_quaternion\r\n\r\n// Dependency:\r\n#include \"../mat3x3.hpp\"\r\n#include \"../mat4x4.hpp\"\r\n#include \"../vec3.hpp\"\r\n#include \"../vec4.hpp\"\r\n#include \"../gtc/constants.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_quaternion extension included\")\r\n#endif\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tquat\r\n\t{\r\n\t\tenum ctor{null};\r\n\r\n\t\ttypedef tvec4<bool, P> bool_type;\r\n\r\n\tpublic:\r\n\t\tT x, y, z, w;\r\n\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR length_t length() const;\r\n\r\n\t\t// Constructors\r\n\t\tGLM_FUNC_DECL tquat();\r\n\t\ttemplate <typename U, precision Q>\r\n\t\tGLM_FUNC_DECL explicit tquat(\r\n\t\t\ttquat<U, Q> const & q);\r\n\t\tGLM_FUNC_DECL tquat(\r\n\t\t\tT const & s,\r\n\t\t\ttvec3<T, P> const & v);\r\n\t\tGLM_FUNC_DECL tquat(\r\n\t\t\tT const & w,\r\n\t\t\tT const & x,\r\n\t\t\tT const & y,\r\n\t\t\tT const & z);\r\n\r\n\t\t// Convertions\r\n\r\n\t\t/// Create a quaternion from two normalized axis\r\n\t\t/// \r\n\t\t/// @param u A first normalized axis\r\n\t\t/// @param v A second normalized axis\r\n\t\t/// @see gtc_quaternion\r\n\t\t/// @see http://lolengine.net/blog/2013/09/18/beautiful-maths-quaternion-from-vectors\r\n\t\tGLM_FUNC_DECL explicit tquat(\r\n\t\t\tdetail::tvec3<T, P> const & u,\r\n\t\t\tdetail::tvec3<T, P> const & v);\r\n\t\t/// Build a quaternion from euler angles (pitch, yaw, roll), in radians.\r\n\t\tGLM_FUNC_DECL explicit tquat(\r\n\t\t\ttvec3<T, P> const & eulerAngles);\r\n\t\tGLM_FUNC_DECL explicit tquat(\r\n\t\t\ttmat3x3<T, P> const & m);\r\n\t\tGLM_FUNC_DECL explicit tquat(\r\n\t\t\ttmat4x4<T, P> const & m);\r\n\r\n\t\t// Accesses\r\n\t\tGLM_FUNC_DECL T & operator[](length_t i);\r\n\t\tGLM_FUNC_DECL T const & operator[](length_t i) const;\r\n\r\n\t\t// Operators\r\n\t\tGLM_FUNC_DECL tquat<T, P> & operator+=(tquat<T, P> const & q);\r\n\t\tGLM_FUNC_DECL tquat<T, P> & operator*=(tquat<T, P> const & q);\r\n\t\tGLM_FUNC_DECL tquat<T, P> & operator*=(T const & s);\r\n\t\tGLM_FUNC_DECL tquat<T, P> & operator/=(T const & s);\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> operator- (\r\n\t\tdetail::tquat<T, P> const & q);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> operator+ (\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tquat<T, P> const & p);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> operator* (\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tquat<T, P> const & p);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec3<T, P> operator* (\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec3<T, P> operator* (\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tdetail::tquat<T, P> const & q);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec4<T, P> operator* (\r\n\t\tdetail::tquat<T, P> const & q, \r\n\t\tdetail::tvec4<T, P> const & v);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec4<T, P> operator* (\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tdetail::tquat<T, P> const & q);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> operator* (\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tT const & s);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> operator* (\r\n\t\tT const & s,\r\n\t\tdetail::tquat<T, P> const & q);\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> operator/ (\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tT const & s);\r\n\r\n} //namespace detail\r\n\r\n\t/// @addtogroup gtc_quaternion\r\n\t/// @{\r\n\r\n\t/// Returns the length of the quaternion.\r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL T length(\r\n\t\tdetail::tquat<T, P> const & q);\r\n\r\n\t/// Returns the normalized quaternion.\r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> normalize(\r\n\t\tdetail::tquat<T, P> const & q);\r\n\t\t\r\n\t/// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ...\r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P, template <typename, precision> class quatType>\r\n\tGLM_FUNC_DECL T dot(\r\n\t\tquatType<T, P> const & x,\r\n\t\tquatType<T, P> const & y);\r\n\r\n\t/// Spherical linear interpolation of two quaternions.\r\n\t/// The interpolation is oriented and the rotation is performed at constant speed.\r\n\t/// For short path spherical linear interpolation, use the slerp function.\r\n\t/// \r\n\t/// @param x A quaternion\r\n\t/// @param y A quaternion\r\n\t/// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1].\r\n\t/// @tparam T Value type used to build the quaternion. Supported: half, float or double.\r\n\t/// @see gtc_quaternion\r\n\t/// @see - slerp(detail::tquat<T, P> const & x, detail::tquat<T, P> const & y, T const & a)\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> mix(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y,\r\n\t\tT const & a);\r\n\r\n\t/// Linear interpolation of two quaternions.\r\n\t/// The interpolation is oriented.\r\n\t/// \r\n\t/// @param x A quaternion\r\n\t/// @param y A quaternion\r\n\t/// @param a Interpolation factor. The interpolation is defined in the range [0, 1].\r\n\t/// @tparam T Value type used to build the quaternion. Supported: half, float or double.\r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> lerp(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y,\r\n\t\tT const & a);\r\n\r\n\t/// Spherical linear interpolation of two quaternions.\r\n\t/// The interpolation always take the short path and the rotation is performed at constant speed.\r\n\t/// \r\n\t/// @param x A quaternion\r\n\t/// @param y A quaternion\r\n\t/// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1].\r\n\t/// @tparam T Value type used to build the quaternion. Supported: half, float or double.\r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> slerp(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y,\r\n\t\tT const & a);\r\n\r\n\t/// Returns the q conjugate.\r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> conjugate(\r\n\t\tdetail::tquat<T, P> const & q);\r\n\r\n\t/// Returns the q inverse.\r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> inverse(\r\n\t\tdetail::tquat<T, P> const & q);\r\n\r\n\t/// Rotates a quaternion from a vector of 3 components axis and an angle.\r\n\t/// \r\n\t/// @param q Source orientation\r\n\t/// @param angle Angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.\r\n\t/// @param axis Axis of the rotation\r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> rotate(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & axis);\r\n\r\n\t/// Returns euler angles, yitch as x, yaw as y, roll as z.\r\n\t/// The result is expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise.\r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec3<T, P> eulerAngles(\r\n\t\tdetail::tquat<T, P> const & x);\r\n\r\n\t/// Returns roll value of euler angles expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL T roll(detail::tquat<T, P> const & x);\r\n\r\n\t/// Returns pitch value of euler angles expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL T pitch(detail::tquat<T, P> const & x);\r\n\r\n\t/// Returns yaw value of euler angles expressed in radians if GLM_FORCE_RADIANS is defined or degrees otherwise.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL T yaw(detail::tquat<T, P> const & x);\r\n\r\n\t/// Converts a quaternion to a 3 * 3 matrix.\r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tmat3x3<T, P> mat3_cast(\r\n\t\tdetail::tquat<T, P> const & x);\r\n\r\n\t/// Converts a quaternion to a 4 * 4 matrix.\r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, P> mat4_cast(\r\n\t\tdetail::tquat<T, P> const & x);\r\n\r\n\t/// Converts a 3 * 3 matrix to a quaternion.\r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> quat_cast(\r\n\t\tdetail::tmat3x3<T, P> const & x);\r\n\r\n\t/// Converts a 4 * 4 matrix to a quaternion.\r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> quat_cast(\r\n\t\tdetail::tmat4x4<T, P> const & x);\r\n\r\n\t/// Returns the quaternion rotation angle.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL T angle(detail::tquat<T, P> const & x);\r\n\r\n\t/// Returns the q rotation axis.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec3<T, P> axis(\r\n\t\tdetail::tquat<T, P> const & x);\r\n\r\n\t/// Build a quaternion from an angle and a normalized axis.\r\n\t///\r\n\t/// @param angle Angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.\r\n\t/// @param axis Axis of the quaternion, must be normalized.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tquat<T, P> angleAxis(\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & axis);\r\n\r\n\t/// Returns the component-wise comparison result of x < y.\r\n\t/// \r\n\t/// @tparam quatType Floating-point quaternion types.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec4<bool, P> lessThan(\r\n\t\tdetail::tquat<T, P> const & x, \r\n\t\tdetail::tquat<T, P> const & y);\r\n\r\n\t/// Returns the component-wise comparison of result x <= y.\r\n\t///\r\n\t/// @tparam quatType Floating-point quaternion types.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec4<bool, P> lessThanEqual(\r\n\t\tdetail::tquat<T, P> const & x, \r\n\t\tdetail::tquat<T, P> const & y);\r\n\r\n\t/// Returns the component-wise comparison of result x > y.\r\n\t///\r\n\t/// @tparam quatType Floating-point quaternion types.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec4<bool, P> greaterThan(\r\n\t\tdetail::tquat<T, P> const & x, \r\n\t\tdetail::tquat<T, P> const & y);\r\n\r\n\t/// Returns the component-wise comparison of result x >= y.\r\n\t///\r\n\t/// @tparam quatType Floating-point quaternion types.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec4<bool, P> greaterThanEqual(\r\n\t\tdetail::tquat<T, P> const & x, \r\n\t\tdetail::tquat<T, P> const & y);\r\n\r\n\t/// Returns the component-wise comparison of result x == y.\r\n\t///\r\n\t/// @tparam quatType Floating-point quaternion types.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec4<bool, P> equal(\r\n\t\tdetail::tquat<T, P> const & x, \r\n\t\tdetail::tquat<T, P> const & y);\r\n\r\n\t/// Returns the component-wise comparison of result x != y.\r\n\t/// \r\n\t/// @tparam quatType Floating-point quaternion types.\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_DECL detail::tvec4<bool, P> notEqual(\r\n\t\tdetail::tquat<T, P> const & x, \r\n\t\tdetail::tquat<T, P> const & y);\r\n\r\n\t/// @}\r\n} //namespace glm\r\n\r\n#include \"quaternion.inl\"\r\n\r\n#endif//GLM_GTC_quaternion\r\n"
  },
  {
    "path": "gpu/glm/gtc/quaternion.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_quaternion\r\n/// @file glm/gtc/quaternion.inl\r\n/// @date 2009-05-21 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../trigonometric.hpp\"\r\n#include \"../geometric.hpp\"\r\n#include \"../exponential.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR length_t tquat<T, P>::length() const\r\n\t{\r\n\t\treturn 4;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tquat<T, P>::tquat() :\r\n\t\tx(0),\r\n\t\ty(0),\r\n\t\tz(0),\r\n\t\tw(1)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\ttemplate <typename U, precision Q>\r\n\tGLM_FUNC_QUALIFIER tquat<T, P>::tquat\r\n\t(\r\n\t\ttquat<U, Q> const & q\r\n\t) :\r\n\t\tx(q.x),\r\n\t\ty(q.y),\r\n\t\tz(q.z),\r\n\t\tw(q.w)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tquat<T, P>::tquat\r\n\t(\r\n\t\tT const & s,\r\n\t\ttvec3<T, P> const & v\r\n\t) :\r\n\t\tx(v.x),\r\n\t\ty(v.y),\r\n\t\tz(v.z),\r\n\t\tw(s)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tquat<T, P>::tquat\r\n\t(\r\n\t\tT const & w,\r\n\t\tT const & x,\r\n\t\tT const & y,\r\n\t\tT const & z\r\n\t) :\r\n\t\tx(x),\r\n\t\ty(y),\r\n\t\tz(z),\r\n\t\tw(w)\r\n\t{}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// tquat conversions\r\n\r\n\t//template <typename valType> \r\n\t//GLM_FUNC_QUALIFIER tquat<valType>::tquat\r\n\t//(\r\n\t//\tvalType const & pitch,\r\n\t//\tvalType const & yaw,\r\n\t//\tvalType const & roll\r\n\t//)\r\n\t//{\r\n\t//\ttvec3<valType> eulerAngle(pitch * valType(0.5), yaw * valType(0.5), roll * valType(0.5));\r\n\t//\ttvec3<valType> c = glm::cos(eulerAngle * valType(0.5));\r\n\t//\ttvec3<valType> s = glm::sin(eulerAngle * valType(0.5));\r\n\t//\t\r\n\t//\tthis->w = c.x * c.y * c.z + s.x * s.y * s.z;\r\n\t//\tthis->x = s.x * c.y * c.z - c.x * s.y * s.z;\r\n\t//\tthis->y = c.x * s.y * c.z + s.x * c.y * s.z;\r\n\t//\tthis->z = c.x * c.y * s.z - s.x * s.y * c.z;\r\n\t//}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tquat<T, P>::tquat\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & u,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> w = cross(u, v);\r\n\t\tT Dot = detail::compute_dot<detail::tvec3, T, P>::call(u, v);\r\n\t\tdetail::tquat<T, P> q(T(1) + Dot, w.x, w.y, w.z);\r\n\r\n\t\t*this = normalize(q);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tquat<T, P>::tquat\r\n\t(\r\n\t\ttvec3<T, P> const & eulerAngle\r\n\t)\r\n\t{\r\n\t\ttvec3<T, P> c = glm::cos(eulerAngle * T(0.5));\r\n\t\ttvec3<T, P> s = glm::sin(eulerAngle * T(0.5));\r\n\t\t\r\n\t\tthis->w = c.x * c.y * c.z + s.x * s.y * s.z;\r\n\t\tthis->x = s.x * c.y * c.z - c.x * s.y * s.z;\r\n\t\tthis->y = c.x * s.y * c.z + s.x * c.y * s.z;\r\n\t\tthis->z = c.x * c.y * s.z - s.x * s.y * c.z;\t\t\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tquat<T, P>::tquat\r\n\t(\r\n\t\ttmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\t*this = quat_cast(m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tquat<T, P>::tquat\r\n\t(\r\n\t\ttmat4x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\t*this = quat_cast(m);\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// tquat<T, P> accesses\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER T & tquat<T, P>::operator[] (length_t i)\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&x)[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const & tquat<T, P>::operator[] (length_t i) const\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&x)[i];\r\n\t}\r\n}//namespace detail\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> conjugate\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn detail::tquat<T, P>(q.w, -q.x, -q.y, -q.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> inverse\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn conjugate(q) / dot(q, q);\r\n\t}\r\n\r\nnamespace detail\r\n{\r\n\t//////////////////////////////////////////////////////////////\r\n\t// tquat<valType> operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator +=\r\n\t(\r\n\t\ttquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\tthis->w += q.w;\r\n\t\tthis->x += q.x;\r\n\t\tthis->y += q.y;\r\n\t\tthis->z += q.z;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator *=\r\n\t(\r\n\t\ttquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\ttquat<T, P> const p(*this);\r\n\r\n\t\tthis->w = p.w * q.w - p.x * q.x - p.y * q.y - p.z * q.z;\r\n\t\tthis->x = p.w * q.x + p.x * q.w + p.y * q.z - p.z * q.y;\r\n\t\tthis->y = p.w * q.y + p.y * q.w + p.z * q.x - p.x * q.z;\r\n\t\tthis->z = p.w * q.z + p.z * q.w + p.x * q.y - p.y * q.x;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator *=\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tthis->w *= s;\r\n\t\tthis->x *= s;\r\n\t\tthis->y *= s;\r\n\t\tthis->z *= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER tquat<T, P> & tquat<T, P>::operator /=\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tthis->w /= s;\r\n\t\tthis->x /= s;\r\n\t\tthis->y /= s;\r\n\t\tthis->z /= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// tquat<T, P> external functions\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_dot<tquat, T, P>\r\n\t{\r\n\t\tstatic T call(tquat<T, P> const & x, tquat<T, P> const & y)\r\n\t\t{\r\n\t\t\ttvec4<T, P> tmp(x.x * y.x, x.y * y.y, x.z * y.z, x.w * y.w);\r\n\t\t\treturn (tmp.x + tmp.y) + (tmp.z + tmp.w);\r\n\t\t}\r\n\t};\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// tquat<T, P> external operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> operator-\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn detail::tquat<T, P>(-q.w, -q.x, -q.y, -q.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> operator+\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tquat<T, P> const & p\r\n\t)\r\n\t{\r\n\t\treturn detail::tquat<T, P>(q) += p;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> operator*\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tquat<T, P> const & p\r\n\t)\r\n\t{\r\n\t\treturn detail::tquat<T, P>(q) *= p;\r\n\t}\r\n\r\n\t// Transformation\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> operator*\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tT Two(2);\r\n\r\n\t\tdetail::tvec3<T, P> uv, uuv;\r\n\t\tdetail::tvec3<T, P> QuatVector(q.x, q.y, q.z);\r\n\t\tuv = glm::cross(QuatVector, v);\r\n\t\tuuv = glm::cross(QuatVector, uv);\r\n\t\tuv *= (Two * q.w);\r\n\t\tuuv *= Two;\r\n\r\n\t\treturn v + uv + uuv;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> operator*\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn glm::inverse(q) * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> operator*\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(q * detail::tvec3<T, P>(v), v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> operator*\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn glm::inverse(q) * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> operator*\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn detail::tquat<T, P>(\r\n\t\t\tq.w * s, q.x * s, q.y * s, q.z * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> operator*\r\n\t(\r\n\t\tT const & s,\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn q * s;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> operator/\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn detail::tquat<T, P>(\r\n\t\t\tq.w / s, q.x / s, q.y / s, q.z / s);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q1,\r\n\t\tdetail::tquat<T, P> const & q2\r\n\t)\r\n\t{\r\n\t\treturn (q1.x == q2.x) && (q1.y == q2.y) && (q1.z == q2.z) && (q1.w == q2.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q1,\r\n\t\tdetail::tquat<T, P> const & q2\r\n\t)\r\n\t{\r\n\t\treturn (q1.x != q2.x) || (q1.y != q2.y) || (q1.z != q2.z) || (q1.w != q2.w);\r\n\t}\r\n\r\n}//namespace detail\r\n\r\n\t////////////////////////////////////////////////////////\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T length\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn glm::sqrt(dot(q, q));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> normalize\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\tT len = length(q);\r\n\t\tif(len <= T(0)) // Problem\r\n\t\t\treturn detail::tquat<T, P>(1, 0, 0, 0);\r\n\t\tT oneOverLen = T(1) / len;\r\n\t\treturn detail::tquat<T, P>(q.w * oneOverLen, q.x * oneOverLen, q.y * oneOverLen, q.z * oneOverLen);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> cross\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q1,\r\n\t\tdetail::tquat<T, P> const & q2\r\n\t)\r\n\t{\r\n\t\treturn detail::tquat<T, P>(\r\n\t\t\tq1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z,\r\n\t\t\tq1.w * q2.x + q1.x * q2.w + q1.y * q2.z - q1.z * q2.y,\r\n\t\t\tq1.w * q2.y + q1.y * q2.w + q1.z * q2.x - q1.x * q2.z,\r\n\t\t\tq1.w * q2.z + q1.z * q2.w + q1.x * q2.y - q1.y * q2.x);\r\n\t}\r\n/*\r\n\t// (x * sin(1 - a) * angle / sin(angle)) + (y * sin(a) * angle / sin(angle))\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> mix\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x, \r\n\t\tdetail::tquat<T, P> const & y, \r\n\t\tT const & a\r\n\t)\r\n\t{\r\n\t\tif(a <= T(0)) return x;\r\n\t\tif(a >= T(1)) return y;\r\n\r\n\t\tfloat fCos = dot(x, y);\r\n\t\tdetail::tquat<T, P> y2(y); //BUG!!! tquat<T, P> y2;\r\n\t\tif(fCos < T(0))\r\n\t\t{\r\n\t\t\ty2 = -y;\r\n\t\t\tfCos = -fCos;\r\n\t\t}\r\n\r\n\t\t//if(fCos > 1.0f) // problem\r\n\t\tfloat k0, k1;\r\n\t\tif(fCos > T(0.9999))\r\n\t\t{\r\n\t\t\tk0 = T(1) - a;\r\n\t\t\tk1 = T(0) + a; //BUG!!! 1.0f + a;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tT fSin = sqrt(T(1) - fCos * fCos);\r\n\t\t\tT fAngle = atan(fSin, fCos);\r\n\t\t\tT fOneOverSin = static_cast<T>(1) / fSin;\r\n\t\t\tk0 = sin((T(1) - a) * fAngle) * fOneOverSin;\r\n\t\t\tk1 = sin((T(0) + a) * fAngle) * fOneOverSin;\r\n\t\t}\r\n\r\n\t\treturn detail::tquat<T, P>(\r\n\t\t\tk0 * x.w + k1 * y2.w,\r\n\t\t\tk0 * x.x + k1 * y2.x,\r\n\t\t\tk0 * x.y + k1 * y2.y,\r\n\t\t\tk0 * x.z + k1 * y2.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> mix2\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x, \r\n\t\tdetail::tquat<T, P> const & y, \r\n\t\tT const & a\r\n\t)\r\n\t{\r\n\t\tbool flip = false;\r\n\t\tif(a <= static_cast<T>(0)) return x;\r\n\t\tif(a >= static_cast<T>(1)) return y;\r\n\r\n\t\tT cos_t = dot(x, y);\r\n\t\tif(cos_t < T(0))\r\n\t\t{\r\n\t\t\tcos_t = -cos_t;\r\n\t\t\tflip = true;\r\n\t\t}\r\n\r\n\t\tT alpha(0), beta(0);\r\n\r\n\t\tif(T(1) - cos_t < 1e-7)\r\n\t\t\tbeta = static_cast<T>(1) - alpha;\r\n\t\telse\r\n\t\t{\r\n\t\t\tT theta = acos(cos_t);\r\n\t\t\tT sin_t = sin(theta);\r\n\t\t\tbeta = sin(theta * (T(1) - alpha)) / sin_t;\r\n\t\t\talpha = sin(alpha * theta) / sin_t;\r\n\t\t}\r\n\r\n\t\tif(flip)\r\n\t\t\talpha = -alpha;\r\n\t\t\r\n\t\treturn normalize(beta * x + alpha * y);\r\n\t}\r\n*/\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> mix\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y,\r\n\t\tT const & a\r\n\t)\r\n\t{\r\n\t\tT cosTheta = dot(x, y);\r\n\r\n\t\t// Perform a linear interpolation when cosTheta is close to 1 to avoid side effect of sin(angle) becoming a zero denominator\r\n\t\tif(cosTheta > T(1) - epsilon<T>())\r\n\t\t{\r\n\t\t\t// Linear interpolation\r\n\t\t\treturn detail::tquat<T, P>(\r\n\t\t\t\tmix(x.w, y.w, a),\r\n\t\t\t\tmix(x.x, y.x, a),\r\n\t\t\t\tmix(x.y, y.y, a),\r\n\t\t\t\tmix(x.z, y.z, a));\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Essential Mathematics, page 467\r\n\t\t\tT angle = acos(cosTheta);\r\n\t\t\treturn (sin((T(1) - a) * angle) * x + sin(a * angle) * y) / sin(angle);\r\n\t\t}\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> lerp\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x, \r\n\t\tdetail::tquat<T, P> const & y, \r\n\t\tT const & a\r\n\t)\r\n\t{\r\n\t\t// Lerp is only defined in [0, 1]\r\n\t\tassert(a >= static_cast<T>(0));\r\n\t\tassert(a <= static_cast<T>(1));\r\n\r\n\t\treturn x * (T(1) - a) + (y * a);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> slerp\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y,\r\n\t\tT const & a\r\n\t)\r\n\t{\r\n\t\tdetail::tquat<T, P> z = y;\r\n\r\n\t\tT cosTheta = dot(x, y);\r\n\r\n\t\t// If cosTheta < 0, the interpolation will take the long way around the sphere. \r\n\t\t// To fix this, one quat must be negated.\r\n\t\tif (cosTheta < T(0))\r\n\t\t{\r\n\t\t\tz        = -y;\r\n\t\t\tcosTheta = -cosTheta;\r\n\t\t}\r\n\r\n\t\t// Perform a linear interpolation when cosTheta is close to 1 to avoid side effect of sin(angle) becoming a zero denominator\r\n\t\tif(cosTheta > T(1) - epsilon<T>())\r\n\t\t{\r\n\t\t\t// Linear interpolation\r\n\t\t\treturn detail::tquat<T, P>(\r\n\t\t\t\tmix(x.w, y.w, a),\r\n\t\t\t\tmix(x.x, y.x, a),\r\n\t\t\t\tmix(x.y, y.y, a),\r\n\t\t\t\tmix(x.z, y.z, a));\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Essential Mathematics, page 467\r\n\t\t\tT angle = acos(cosTheta);\r\n\t\t\treturn (sin((T(1) - a) * angle) * x + sin(a * angle) * z) / sin(angle);\r\n\t\t}\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> rotate\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> Tmp = v;\r\n\r\n\t\t// Axis of rotation must be normalised\r\n\t\tT len = glm::length(Tmp);\r\n\t\tif(abs(len - T(1)) > T(0.001))\r\n\t\t{\r\n\t\t\tT oneOverLen = static_cast<T>(1) / len;\r\n\t\t\tTmp.x *= oneOverLen;\r\n\t\t\tTmp.y *= oneOverLen;\r\n\t\t\tTmp.z *= oneOverLen;\r\n\t\t}\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const AngleRad(angle);\r\n#else\r\n#\t\tpragma message(\"GLM: rotate function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const AngleRad = radians(angle);\r\n#endif\r\n\t\tT const Sin = sin(AngleRad * T(0.5));\r\n\r\n\t\treturn q * detail::tquat<T, P>(cos(AngleRad * T(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin);\r\n\t\t//return gtc::quaternion::cross(q, detail::tquat<T, P>(cos(AngleRad * T(0.5)), Tmp.x * fSin, Tmp.y * fSin, Tmp.z * fSin));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> eulerAngles\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(pitch(x), yaw(x), roll(x));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T roll\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\treturn T(atan(T(2) * (q.x * q.y + q.w * q.z), q.w * q.w + q.x * q.x - q.y * q.y - q.z * q.z));\r\n#else\r\n#\t\tpragma message(\"GLM: roll function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\treturn glm::degrees(atan(T(2) * (q.x * q.y + q.w * q.z), q.w * q.w + q.x * q.x - q.y * q.y - q.z * q.z));\r\n#endif\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T pitch\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\treturn T(atan(T(2) * (q.y * q.z + q.w * q.x), q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z));\r\n#else\r\n#\t\tpragma message(\"GLM: pitch function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\treturn glm::degrees(atan(T(2) * (q.y * q.z + q.w * q.x), q.w * q.w - q.x * q.x - q.y * q.y + q.z * q.z));\r\n#endif\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T yaw\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\treturn asin(T(-2) * (q.x * q.z - q.w * q.y));\r\n#else\r\n#\t\tpragma message(\"GLM: yaw function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\treturn glm::degrees(asin(T(-2) * (q.x * q.z - q.w * q.y)));\r\n#endif\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> mat3_cast\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> Result(T(1));\r\n\t\tT qxx(q.x * q.x);\r\n\t\tT qyy(q.y * q.y);\r\n\t\tT qzz(q.z * q.z);\r\n\t\tT qxz(q.x * q.z);\r\n\t\tT qxy(q.x * q.y);\r\n\t\tT qyz(q.y * q.z);\r\n\t\tT qwx(q.w * q.x);\r\n\t\tT qwy(q.w * q.y);\r\n\t\tT qwz(q.w * q.z);\r\n\r\n\t\tResult[0][0] = 1 - 2 * (qyy +  qzz);\r\n\t\tResult[0][1] = 2 * (qxy + qwz);\r\n\t\tResult[0][2] = 2 * (qxz - qwy);\r\n\r\n\t\tResult[1][0] = 2 * (qxy - qwz);\r\n\t\tResult[1][1] = 1 - 2 * (qxx +  qzz);\r\n\t\tResult[1][2] = 2 * (qyz + qwx);\r\n\r\n\t\tResult[2][0] = 2 * (qxz + qwy);\r\n\t\tResult[2][1] = 2 * (qyz - qwx);\r\n\t\tResult[2][2] = 1 - 2 * (qxx +  qyy);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> mat4_cast\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn detail::tmat4x4<T, P>(mat3_cast(q));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> quat_cast\r\n\t(\r\n\t\tdetail::tmat3x3<T, P> const & m\r\n\t)\r\n\t{\r\n\t\tT fourXSquaredMinus1 = m[0][0] - m[1][1] - m[2][2];\r\n\t\tT fourYSquaredMinus1 = m[1][1] - m[0][0] - m[2][2];\r\n\t\tT fourZSquaredMinus1 = m[2][2] - m[0][0] - m[1][1];\r\n\t\tT fourWSquaredMinus1 = m[0][0] + m[1][1] + m[2][2];\r\n\r\n\t\tint biggestIndex = 0;\r\n\t\tT fourBiggestSquaredMinus1 = fourWSquaredMinus1;\r\n\t\tif(fourXSquaredMinus1 > fourBiggestSquaredMinus1)\r\n\t\t{\r\n\t\t\tfourBiggestSquaredMinus1 = fourXSquaredMinus1;\r\n\t\t\tbiggestIndex = 1;\r\n\t\t}\r\n\t\tif(fourYSquaredMinus1 > fourBiggestSquaredMinus1)\r\n\t\t{\r\n\t\t\tfourBiggestSquaredMinus1 = fourYSquaredMinus1;\r\n\t\t\tbiggestIndex = 2;\r\n\t\t}\r\n\t\tif(fourZSquaredMinus1 > fourBiggestSquaredMinus1)\r\n\t\t{\r\n\t\t\tfourBiggestSquaredMinus1 = fourZSquaredMinus1;\r\n\t\t\tbiggestIndex = 3;\r\n\t\t}\r\n\r\n\t\tT biggestVal = sqrt(fourBiggestSquaredMinus1 + T(1)) * T(0.5);\r\n\t\tT mult = static_cast<T>(0.25) / biggestVal;\r\n\r\n\t\tdetail::tquat<T, P> Result;\r\n\t\tswitch(biggestIndex)\r\n\t\t{\r\n\t\tcase 0:\r\n\t\t\tResult.w = biggestVal;\r\n\t\t\tResult.x = (m[1][2] - m[2][1]) * mult;\r\n\t\t\tResult.y = (m[2][0] - m[0][2]) * mult;\r\n\t\t\tResult.z = (m[0][1] - m[1][0]) * mult;\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tResult.w = (m[1][2] - m[2][1]) * mult;\r\n\t\t\tResult.x = biggestVal;\r\n\t\t\tResult.y = (m[0][1] + m[1][0]) * mult;\r\n\t\t\tResult.z = (m[2][0] + m[0][2]) * mult;\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tResult.w = (m[2][0] - m[0][2]) * mult;\r\n\t\t\tResult.x = (m[0][1] + m[1][0]) * mult;\r\n\t\t\tResult.y = biggestVal;\r\n\t\t\tResult.z = (m[1][2] + m[2][1]) * mult;\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tResult.w = (m[0][1] - m[1][0]) * mult;\r\n\t\t\tResult.x = (m[2][0] + m[0][2]) * mult;\r\n\t\t\tResult.y = (m[1][2] + m[2][1]) * mult;\r\n\t\t\tResult.z = biggestVal;\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\tdefault:\t\t\t\t\t// Silence a -Wswitch-default warning in GCC. Should never actually get here. Assert is just for sanity.\r\n\t\t\tassert(false);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> quat_cast\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & m4\r\n\t)\r\n\t{\r\n\t\treturn quat_cast(detail::tmat3x3<T, P>(m4));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T angle\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x\r\n\t)\r\n\t{\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\treturn acos(x.w) * T(2);\r\n#else\r\n#\t\tpragma message(\"GLM: angle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\treturn glm::degrees(acos(x.w) * T(2));\r\n#endif\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> axis\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tT tmp1 = static_cast<T>(1) - x.w * x.w;\r\n\t\tif(tmp1 <= static_cast<T>(0))\r\n\t\t\treturn detail::tvec3<T, P>(0, 0, 1);\r\n\t\tT tmp2 = static_cast<T>(1) / sqrt(tmp1);\r\n\t\treturn detail::tvec3<T, P>(x.x * tmp2, x.y * tmp2, x.z * tmp2);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> angleAxis\r\n\t(\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tquat<T, P> result;\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const a(angle);\r\n#else\r\n#\t\tpragma message(\"GLM: angleAxis function taking degrees as a parameter is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const a(glm::radians(angle));\r\n#endif\r\n\t\tT s = glm::sin(a * T(0.5));\r\n\r\n\t\tresult.w = glm::cos(a * T(0.5));\r\n\t\tresult.x = v.x * s;\r\n\t\tresult.y = v.y * s;\r\n\t\tresult.z = v.z * s;\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P> lessThan\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<bool, P> Result;\r\n\t\tfor(length_t i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] < y[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P> lessThanEqual\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<bool, P> Result;\r\n\t\tfor(length_t i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] <= y[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P> greaterThan\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<bool, P> Result;\r\n\t\tfor(length_t i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] > y[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P> greaterThanEqual\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<bool, P> Result;\r\n\t\tfor(length_t i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] >= y[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P> equal\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<bool, P> Result;\r\n\t\tfor(length_t i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] == y[i];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P>  notEqual\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<bool, P> Result;\r\n\t\tfor(length_t i = 0; i < x.length(); ++i)\r\n\t\t\tResult[i] = x[i] != y[i];\r\n\t\treturn Result;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtc/random.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_random\r\n/// @file glm/gtc/random.hpp\r\n/// @date 2011-09-18 / 2011-09-18\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_half_float (dependence)\r\n/// @see gtx_random (extended)\r\n///\r\n/// @defgroup gtc_random GLM_GTC_random\r\n/// @ingroup gtc\r\n/// \r\n/// @brief Generate random number from various distribution methods.\r\n/// \r\n/// <glm/gtc/random.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_random\r\n#define GLM_GTC_random\r\n\r\n// Dependency:\r\n#include \"../vec2.hpp\"\r\n#include \"../vec3.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_random extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_random\r\n\t/// @{\r\n\t\r\n\t/// Generate random numbers in the interval [Min, Max], according a linear distribution \r\n\t/// \r\n\t/// @param Min \r\n\t/// @param Max \r\n\t/// @tparam genType Value type. Currently supported: half (not recommanded), float or double scalars and vectors.\r\n\t/// @see gtc_random\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType linearRand(\r\n\t\tgenType const & Min,\r\n\t\tgenType const & Max);\r\n\r\n\t/// Generate random numbers in the interval [Min, Max], according a gaussian distribution \r\n\t/// \r\n\t/// @param Mean\r\n\t/// @param Deviation\r\n\t/// @see gtc_random\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType gaussRand(\r\n\t\tgenType const & Mean,\r\n\t\tgenType const & Deviation);\r\n\t\r\n\t/// Generate a random 2D vector which coordinates are regulary distributed on a circle of a given radius\r\n\t/// \r\n\t/// @param Radius \r\n\t/// @see gtc_random\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_DECL detail::tvec2<T, defaultp> circularRand(\r\n\t\tT const & Radius);\r\n\t\r\n\t/// Generate a random 3D vector which coordinates are regulary distributed on a sphere of a given radius\r\n\t/// \r\n\t/// @param Radius\r\n\t/// @see gtc_random\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_DECL detail::tvec3<T, defaultp> sphericalRand(\r\n\t\tT const & Radius);\r\n\t\r\n\t/// Generate a random 2D vector which coordinates are regulary distributed within the area of a disk of a given radius\r\n\t/// \r\n\t/// @param Radius\r\n\t/// @see gtc_random\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_DECL detail::tvec2<T, defaultp> diskRand(\r\n\t\tT const & Radius);\r\n\t\r\n\t/// Generate a random 3D vector which coordinates are regulary distributed within the volume of a ball of a given radius\r\n\t/// \r\n\t/// @param Radius\r\n\t/// @see gtc_random\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_DECL detail::tvec3<T, defaultp> ballRand(\r\n\t\tT const & Radius);\r\n\t\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"random.inl\"\r\n\r\n#endif//GLM_GTC_random\r\n"
  },
  {
    "path": "gpu/glm/gtc/random.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_random\r\n/// @file glm/gtc/random.inl\r\n/// @date 2011-09-19 / 2012-04-07\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../geometric.hpp\"\r\n#include \"../exponential.hpp\"\r\n#include <cstdlib>\r\n#include <ctime>\r\n#include <cassert>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\tstruct compute_linearRand\r\n\t{\r\n\t\ttemplate <typename T>\r\n\t\tGLM_FUNC_QUALIFIER T operator() (T const & Min, T const & Max) const;\r\n/*\r\n\t\t{\r\n\t\t\tGLM_STATIC_ASSERT(0, \"'linearRand' invalid template parameter type. GLM_GTC_random only supports floating-point template types.\");\r\n\t\t\treturn Min;\r\n\t\t}\r\n*/\r\n\t};\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER float compute_linearRand::operator()<float> (float const & Min, float const & Max) const\r\n\t{\r\n\t\treturn float(std::rand()) / float(RAND_MAX) * (Max - Min) + Min;\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER double compute_linearRand::operator()<double> (double const & Min, double const & Max) const\r\n\t{\r\n\t\treturn double(std::rand()) / double(RAND_MAX) * (Max - Min) + Min;\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER long double compute_linearRand::operator()<long double> (long double const & Min, long double const & Max) const\r\n\t{\r\n\t\treturn (long double)(std::rand()) / (long double)(RAND_MAX) * (Max - Min) + Min;\r\n\t}\r\n}//namespace detail\r\n\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType linearRand\r\n\t(\r\n\t\tgenType const & Min,\r\n\t\tgenType const & Max\r\n\t)\r\n\t{\r\n\t\treturn detail::compute_linearRand()(Min, Max);\r\n\t}\r\n\r\n\tVECTORIZE_VEC_VEC(linearRand)\r\n\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType gaussRand\r\n\t(\r\n\t\tgenType const & Mean,\t\r\n\t\tgenType const & Deviation\r\n\t)\r\n\t{\r\n\t\tgenType w, x1, x2;\r\n\t\r\n\t\tdo\r\n\t\t{\r\n\t\t\tx1 = linearRand(genType(-1), genType(1));\r\n\t\t\tx2 = linearRand(genType(-1), genType(1));\r\n\t\t\r\n\t\t\tw = x1 * x1 + x2 * x2;\r\n\t\t} while(w > genType(1));\r\n\t\r\n\t\treturn x2 * Deviation * Deviation * sqrt((genType(-2) * log(w)) / w) + Mean;\r\n\t}\r\n\r\n\tVECTORIZE_VEC_VEC(gaussRand)\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, defaultp> diskRand\r\n\t(\r\n\t\tT const & Radius\r\n\t)\r\n\t{\t\t\r\n\t\tdetail::tvec2<T, defaultp> Result(T(0));\r\n\t\tT LenRadius(T(0));\r\n\t\t\r\n\t\tdo\r\n\t\t{\r\n\t\t\tResult = linearRand(\r\n\t\t\t\tdetail::tvec2<T, defaultp>(-Radius),\r\n\t\t\t\tdetail::tvec2<T, defaultp>(Radius));\r\n\t\t\tLenRadius = length(Result);\r\n\t\t}\r\n\t\twhile(LenRadius > Radius);\r\n\t\t\r\n\t\treturn Result;\r\n\t}\r\n\t\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, defaultp> ballRand\r\n\t(\r\n\t\tT const & Radius\r\n\t)\r\n\t{\t\t\r\n\t\tdetail::tvec3<T, defaultp> Result(T(0));\r\n\t\tT LenRadius(T(0));\r\n\t\t\r\n\t\tdo\r\n\t\t{\r\n\t\t\tResult = linearRand(\r\n\t\t\t\tdetail::tvec3<T, defaultp>(-Radius),\r\n\t\t\t\tdetail::tvec3<T, defaultp>(Radius));\r\n\t\t\tLenRadius = length(Result);\r\n\t\t}\r\n\t\twhile(LenRadius > Radius);\r\n\t\t\r\n\t\treturn Result;\r\n\t}\r\n\t\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, defaultp> circularRand\r\n\t(\r\n\t\tT const & Radius\r\n\t)\r\n\t{\r\n\t\tT a = linearRand(T(0), T(6.283185307179586476925286766559f));\r\n\t\treturn detail::tvec2<T, defaultp>(cos(a), sin(a)) * Radius;\t\t\r\n\t}\r\n\t\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, defaultp> sphericalRand\r\n\t(\r\n\t\tT const & Radius\r\n\t)\r\n\t{\r\n\t\tT z = linearRand(T(-1), T(1));\r\n\t\tT a = linearRand(T(0), T(6.283185307179586476925286766559f));\r\n\t\r\n\t\tT r = sqrt(T(1) - z * z);\r\n\t\r\n\t\tT x = r * cos(a);\r\n\t\tT y = r * sin(a);\r\n\t\r\n\t\treturn detail::tvec3<T, defaultp>(x, y, z) * Radius;\t\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtc/reciprocal.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_reciprocal\r\n/// @file glm/gtc/reciprocal.hpp\r\n/// @date 2008-10-09 / 2012-01-25\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtc_reciprocal GLM_GTC_reciprocal\r\n/// @ingroup gtc\r\n/// \r\n/// @brief Define secant, cosecant and cotangent functions.\r\n/// \r\n/// <glm/gtc/reciprocal.hpp> need to be included to use these features.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_reciprocal\r\n#define GLM_GTC_reciprocal\r\n\r\n// Dependencies\r\n#include \"../detail/setup.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_reciprocal extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_reciprocal\r\n\t/// @{\r\n\r\n\t/// Secant function. \r\n\t/// hypotenuse / adjacent or 1 / cos(x)\r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType sec(genType const & angle);\r\n\r\n\t/// Cosecant function. \r\n\t/// hypotenuse / opposite or 1 / sin(x)\r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType csc(genType const & angle);\r\n\t\t\r\n\t/// Cotangent function. \r\n\t/// adjacent / opposite or 1 / tan(x)\r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType cot(genType const & angle);\r\n\r\n\t/// Inverse secant function. \r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType asec(genType const & x);\r\n\r\n\t/// Inverse cosecant function. \r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType acsc(genType const & x);\r\n\t\t\r\n\t/// Inverse cotangent function. \r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType acot(genType const & x);\r\n\r\n\t/// Secant hyperbolic function. \r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType sech(genType const & angle);\r\n\r\n\t/// Cosecant hyperbolic function. \r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType csch(genType const & angle);\r\n\t\t\r\n\t/// Cotangent hyperbolic function. \r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType coth(genType const & angle);\r\n\r\n\t/// Inverse secant hyperbolic function. \r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType asech(genType const & x);\r\n\r\n\t/// Inverse cosecant hyperbolic function. \r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType acsch(genType const & x);\r\n\t\t\r\n\t/// Inverse cotangent hyperbolic function. \r\n\t/// \r\n\t/// @see gtc_reciprocal\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType acoth(genType const & x);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"reciprocal.inl\"\r\n\r\n#endif//GLM_GTC_reciprocal\r\n"
  },
  {
    "path": "gpu/glm/gtc/reciprocal.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_reciprocal\r\n/// @file glm/gtc/reciprocal.inl\r\n/// @date 2008-10-09 / 2012-04-07\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../trigonometric.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm\r\n{\r\n\t// sec\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType sec\r\n\t(\r\n\t\tgenType const & angle\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'sec' only accept floating-point values\");\r\n\r\n\t\treturn genType(1) / glm::cos(angle);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(sec)\r\n\r\n\t// csc\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType csc\r\n\t(\r\n\t\tgenType const & angle\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'csc' only accept floating-point values\");\r\n\r\n\t\treturn genType(1) / glm::sin(angle);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(csc)\r\n\r\n\t// cot\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType cot\r\n\t(\r\n\t\tgenType const & angle\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'cot' only accept floating-point values\");\r\n\r\n\t\treturn genType(1) / glm::tan(angle);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(cot)\r\n\r\n\t// asec\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType asec\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'asec' only accept floating-point values\");\r\n\t\r\n\t\treturn acos(genType(1) / x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(asec)\r\n\r\n\t// acsc\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType acsc\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'acsc' only accept floating-point values\");\r\n\r\n\t\treturn asin(genType(1) / x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(acsc)\r\n\r\n\t// acot\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType acot\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'acot' only accept floating-point values\");\r\n\r\n\t\tgenType const pi_over_2 = genType(3.1415926535897932384626433832795 / 2.0);\r\n\t\treturn pi_over_2 - atan(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(acot)\r\n\r\n\t// sech\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType sech\r\n\t(\r\n\t\tgenType const & angle\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'sech' only accept floating-point values\");\r\n\r\n\t\treturn genType(1) / glm::cosh(angle);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(sech)\r\n\r\n\t// csch\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType csch\r\n\t(\r\n\t\tgenType const & angle\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'csch' only accept floating-point values\");\r\n\r\n\t\treturn genType(1) / glm::sinh(angle);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(csch)\r\n\r\n\t// coth\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType coth\r\n\t(\r\n\t\tgenType const & angle\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'coth' only accept floating-point values\");\r\n\r\n\t\treturn glm::cosh(angle) / glm::sinh(angle);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(coth)\r\n\r\n\t// asech\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType asech\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'asech' only accept floating-point values\");\r\n\r\n\t\treturn acosh(genType(1) / x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(asech)\r\n\r\n\t// acsch\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType acsch\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'acsch' only accept floating-point values\");\r\n\r\n\t\treturn asinh(genType(1) / x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(acsch)\r\n\r\n\t// acoth\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType acoth\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'acoth' only accept floating-point values\");\r\n\r\n\t\treturn atanh(genType(1) / x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(acoth)\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtc/type_precision.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n/// \r\n/// @ref gtc_type_precision\r\n/// @file glm/gtc/type_precision.hpp\r\n/// @date 2009-06-04 / 2011-12-07\r\n/// @author Christophe Riccio\r\n/// \r\n/// @see core (dependence)\r\n/// @see gtc_half_float (dependence)\r\n/// @see gtc_quaternion (dependence)\r\n/// \r\n/// @defgroup gtc_type_precision GLM_GTC_type_precision\r\n/// @ingroup gtc\r\n/// \r\n/// @brief Defines specific C++-based precision types.\r\n/// \r\n/// @ref core_precision defines types based on GLSL's precision qualifiers. This\r\n/// extension defines types based on explicitly-sized C++ data types.\r\n/// \r\n/// <glm/gtc/type_precision.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_type_precision\r\n#define GLM_GTC_type_precision\r\n\r\n// Dependency:\r\n#include \"../gtc/quaternion.hpp\"\r\n#include \"../vec2.hpp\"\r\n#include \"../vec3.hpp\"\r\n#include \"../vec4.hpp\"\r\n#include \"../mat2x2.hpp\"\r\n#include \"../mat2x3.hpp\"\r\n#include \"../mat2x4.hpp\"\r\n#include \"../mat3x2.hpp\"\r\n#include \"../mat3x3.hpp\"\r\n#include \"../mat3x4.hpp\"\r\n#include \"../mat4x2.hpp\"\r\n#include \"../mat4x3.hpp\"\r\n#include \"../mat4x4.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_type_precision extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t///////////////////////////\r\n\t// Signed int vector types \r\n\r\n\t/// @addtogroup gtc_type_precision\r\n\t/// @{\r\n\r\n\t/// Low precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 lowp_int8;\r\n\t\r\n\t/// Low precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 lowp_int16;\r\n\r\n\t/// Low precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 lowp_int32;\r\n\r\n\t/// Low precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 lowp_int64;\r\n\r\n\t/// Low precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 lowp_int8_t;\r\n\t\r\n\t/// Low precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 lowp_int16_t;\r\n\r\n\t/// Low precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 lowp_int32_t;\r\n\r\n\t/// Low precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 lowp_int64_t;\r\n\r\n\t/// Low precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 lowp_i8;\r\n\t\r\n\t/// Low precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 lowp_i16;\r\n\r\n\t/// Low precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 lowp_i32;\r\n\r\n\t/// Low precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 lowp_i64;\r\n\r\n\t/// Medium precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 mediump_int8;\r\n\t\r\n\t/// Medium precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 mediump_int16;\r\n\r\n\t/// Medium precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 mediump_int32;\r\n\r\n\t/// Medium precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 mediump_int64;\r\n\r\n\t/// Medium precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 mediump_int8_t;\r\n\t\r\n\t/// Medium precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 mediump_int16_t;\r\n\r\n\t/// Medium precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 mediump_int32_t;\r\n\r\n\t/// Medium precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 mediump_int64_t;\r\n\r\n\t/// Medium precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 mediump_i8;\r\n\t\r\n\t/// Medium precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 mediump_i16;\r\n\r\n\t/// Medium precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 mediump_i32;\r\n\r\n\t/// Medium precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 mediump_i64;\r\n\r\n\t/// High precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 highp_int8;\r\n\t\r\n\t/// High precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 highp_int16;\r\n\r\n\t/// High precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 highp_int32;\r\n\r\n\t/// High precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 highp_int64;\r\n\r\n\t/// High precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 highp_int8_t;\r\n\t\r\n\t/// High precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 highp_int16_t;\r\n\r\n\t/// 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 highp_int32_t;\r\n\r\n\t/// High precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 highp_int64_t;\r\n\r\n\t/// High precision 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 highp_i8;\r\n\t\r\n\t/// High precision 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 highp_i16;\r\n\r\n\t/// High precision 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 highp_i32;\r\n\r\n\t/// High precision 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 highp_i64;\r\n\t\r\n\r\n\t/// 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 int8;\r\n\t\r\n\t/// 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 int16;\r\n\r\n\t/// 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 int32;\r\n\r\n\t/// 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 int64;\r\n\r\n\t/// 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 int8_t;\r\n\t\r\n\t/// 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 int16_t;\r\n\r\n\t/// 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 int32_t;\r\n\r\n\t/// 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 int64_t;\r\n\r\n\t/// 8 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int8 i8;\r\n\t\r\n\t/// 16 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int16 i16;\r\n\r\n\t/// 32 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int32 i32;\r\n\r\n\t/// 64 bit signed integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::int64 i64;\r\n\r\n\r\n\t/// 8 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i8, defaultp> i8vec1;\r\n\t\r\n\t/// 8 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i8, defaultp> i8vec2;\r\n\r\n\t/// 8 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i8, defaultp> i8vec3;\r\n\r\n\t/// 8 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i8, defaultp> i8vec4;\r\n\r\n\r\n\t/// 16 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i16, defaultp> i16vec1;\r\n\t\r\n\t/// 16 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i16, defaultp> i16vec2;\r\n\r\n\t/// 16 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i16, defaultp> i16vec3;\r\n\r\n\t/// 16 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i16, defaultp> i16vec4;\r\n\r\n\r\n\t/// 32 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i32, defaultp> i32vec1;\r\n\t\r\n\t/// 32 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i32, defaultp> i32vec2;\r\n\r\n\t/// 32 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i32, defaultp> i32vec3;\r\n\r\n\t/// 32 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i32, defaultp> i32vec4;\r\n\r\n\r\n\t/// 64 bit signed integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<i64, defaultp> i64vec1;\r\n\t\r\n\t/// 64 bit signed integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<i64, defaultp> i64vec2;\r\n\r\n\t/// 64 bit signed integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<i64, defaultp> i64vec3;\r\n\r\n\t/// 64 bit signed integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<i64, defaultp> i64vec4;\r\n\r\n\r\n\t/////////////////////////////\r\n\t// Unsigned int vector types\r\n\r\n\t/// Low precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 lowp_uint8;\r\n\t\r\n\t/// Low precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 lowp_uint16;\r\n\r\n\t/// Low precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 lowp_uint32;\r\n\r\n\t/// Low precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 lowp_uint64;\r\n\r\n\t/// Low precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 lowp_uint8_t;\r\n\t\r\n\t/// Low precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 lowp_uint16_t;\r\n\r\n\t/// Low precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 lowp_uint32_t;\r\n\r\n\t/// Low precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 lowp_uint64_t;\r\n\r\n\t/// Low precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 lowp_u8;\r\n\t\r\n\t/// Low precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 lowp_u16;\r\n\r\n\t/// Low precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 lowp_u32;\r\n\r\n\t/// Low precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 lowp_u64;\r\n\t\r\n\t/// Medium precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 mediump_uint8;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 mediump_uint16;\r\n\r\n\t/// Medium precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 mediump_uint32;\r\n\r\n\t/// Medium precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 mediump_uint64;\r\n\r\n\t/// Medium precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 mediump_uint8_t;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 mediump_uint16_t;\r\n\r\n\t/// Medium precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 mediump_uint32_t;\r\n\r\n\t/// Medium precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 mediump_uint64_t;\r\n\r\n\t/// Medium precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 mediump_u8;\r\n\t\r\n\t/// Medium precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 mediump_u16;\r\n\r\n\t/// Medium precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 mediump_u32;\r\n\r\n\t/// Medium precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 mediump_u64;\r\n\t\r\n\t/// High precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 highp_uint8;\r\n\t\r\n\t/// High precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 highp_uint16;\r\n\r\n\t/// High precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 highp_uint32;\r\n\r\n\t/// High precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 highp_uint64;\r\n\r\n\t/// High precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 highp_uint8_t;\r\n\t\r\n\t/// High precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 highp_uint16_t;\r\n\r\n\t/// High precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 highp_uint32_t;\r\n\r\n\t/// High precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 highp_uint64_t;\r\n\r\n\t/// High precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 highp_u8;\r\n\t\r\n\t/// High precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 highp_u16;\r\n\r\n\t/// High precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 highp_u32;\r\n\r\n\t/// High precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 highp_u64;\r\n\r\n\t/// Default precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 uint8;\r\n\t\r\n\t/// Default precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 uint16;\r\n\r\n\t/// Default precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 uint32;\r\n\r\n\t/// Default precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 uint64;\r\n\r\n\t/// Default precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 uint8_t;\r\n\t\r\n\t/// Default precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 uint16_t;\r\n\r\n\t/// Default precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 uint32_t;\r\n\r\n\t/// Default precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 uint64_t;\r\n\r\n\t/// Default precision 8 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint8 u8;\r\n\t\r\n\t/// Default precision 16 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint16 u16;\r\n\r\n\t/// Default precision 32 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint32 u32;\r\n\r\n\t/// Default precision 64 bit unsigned integer type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::uint64 u64;\r\n\r\n\r\n\r\n\t/// Default precision 8 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u8, defaultp> u8vec1;\r\n\t\r\n\t/// Default precision 8 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u8, defaultp> u8vec2;\r\n\r\n\t/// Default precision 8 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u8, defaultp> u8vec3;\r\n\r\n\t/// Default precision 8 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u8, defaultp> u8vec4;\r\n\r\n\r\n\t/// Default precision 16 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u16, defaultp> u16vec1;\r\n\t\r\n\t/// Default precision 16 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u16, defaultp> u16vec2;\r\n\r\n\t/// Default precision 16 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u16, defaultp> u16vec3;\r\n\r\n\t/// Default precision 16 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u16, defaultp> u16vec4;\r\n\r\n\r\n\t/// Default precision 32 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u32, defaultp> u32vec1;\r\n\t\r\n\t/// Default precision 32 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u32, defaultp> u32vec2;\r\n\r\n\t/// Default precision 32 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u32, defaultp> u32vec3;\r\n\r\n\t/// Default precision 32 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u32, defaultp> u32vec4;\r\n\r\n\r\n\t/// Default precision 64 bit unsigned integer scalar type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<u64, defaultp> u64vec1;\r\n\t\r\n\t/// Default precision 64 bit unsigned integer vector of 2 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<u64, defaultp> u64vec2;\r\n\r\n\t/// Default precision 64 bit unsigned integer vector of 3 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<u64, defaultp> u64vec3;\r\n\r\n\t/// Default precision 64 bit unsigned integer vector of 4 components type.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<u64, defaultp> u64vec4;\r\n\r\n\r\n\t//////////////////////\r\n\t// Float vector types\r\n\r\n\t/// 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 float32;\r\n\r\n\t/// 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 float64;\r\n\r\n\r\n\t/// 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float32 float32_t;\r\n\r\n\t/// 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::float64 float64_t;\r\n\r\n\r\n\t/// 32 bit single-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float32 f32;\r\n\r\n\t/// 64 bit double-precision floating-point scalar.\r\n\t/// @see gtc_type_precision\r\n\ttypedef float64 f64;\r\n\r\n\r\n\t/// Single-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<float, defaultp> fvec1;\r\n\r\n\t/// Single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<float, defaultp> fvec2;\r\n\r\n\t/// Single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<float, defaultp> fvec3;\r\n\r\n\t/// Single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<float, defaultp> fvec4;\r\n\r\n\t\r\n\t/// Single-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<f32, defaultp> f32vec1;\r\n\r\n\t/// Single-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<f32, defaultp> f32vec2;\r\n\r\n\t/// Single-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<f32, defaultp> f32vec3;\r\n\r\n\t/// Single-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<f32, defaultp> f32vec4;\r\n\r\n\r\n\t/// Double-precision floating-point vector of 1 component.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec1<f64, defaultp> f64vec1;\r\n\r\n\t/// Double-precision floating-point vector of 2 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec2<f64, defaultp> f64vec2;\r\n\r\n\t/// Double-precision floating-point vector of 3 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec3<f64, defaultp> f64vec3;\r\n\r\n\t/// Double-precision floating-point vector of 4 components.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tvec4<f64, defaultp> f64vec4;\r\n\r\n\r\n\t//////////////////////\r\n\t// Float matrix types \r\n\r\n\t/// Single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef detail::tmat1x1<f32> fmat1;\r\n\r\n\t/// Single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f32, defaultp> fmat2;\r\n\r\n\t/// Single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f32, defaultp> fmat3;\r\n\r\n\t/// Single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f32, defaultp> fmat4;\r\n\r\n\r\n\t/// Single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef f32 fmat1x1;\r\n\r\n\t/// Single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f32, defaultp> fmat2x2;\r\n\r\n\t/// Single-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f32, defaultp> fmat2x3;\r\n\r\n\t/// Single-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f32, defaultp> fmat2x4;\r\n\r\n\t/// Single-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f32, defaultp> fmat3x2;\r\n\r\n\t/// Single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f32, defaultp> fmat3x3;\r\n\r\n\t/// Single-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f32, defaultp> fmat3x4;\r\n\r\n\t/// Single-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f32, defaultp> fmat4x2;\r\n\r\n\t/// Single-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f32, defaultp> fmat4x3;\r\n\r\n\t/// Single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f32, defaultp> fmat4x4;\r\n\r\n\r\n\t/// Single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef detail::tmat1x1<f32, defaultp> f32mat1;\r\n\r\n\t/// Single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f32, defaultp> f32mat2;\r\n\r\n\t/// Single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f32, defaultp> f32mat3;\r\n\r\n\t/// Single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f32, defaultp> f32mat4;\r\n\r\n\r\n\t/// Single-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef f32 f32mat1x1;\r\n\r\n\t/// Single-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f32, defaultp> f32mat2x2;\r\n\r\n\t/// Single-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f32, defaultp> f32mat2x3;\r\n\r\n\t/// Single-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f32, defaultp> f32mat2x4;\r\n\r\n\t/// Single-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f32, defaultp> f32mat3x2;\r\n\r\n\t/// Single-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f32, defaultp> f32mat3x3;\r\n\r\n\t/// Single-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f32, defaultp> f32mat3x4;\r\n\r\n\t/// Single-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f32, defaultp> f32mat4x2;\r\n\r\n\t/// Single-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f32, defaultp> f32mat4x3;\r\n\r\n\t/// Single-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f32, defaultp> f32mat4x4;\r\n\r\n\r\n\t/// Double-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef detail::tmat1x1<f64, defaultp> f64mat1;\r\n\r\n\t/// Double-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f64, defaultp> f64mat2;\r\n\r\n\t/// Double-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f64, defaultp> f64mat3;\r\n\r\n\t/// Double-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f64, defaultp> f64mat4;\r\n\r\n\r\n\t/// Double-precision floating-point 1x1 matrix.\r\n\t/// @see gtc_type_precision\r\n\t//typedef f64 f64mat1x1;\r\n\r\n\t/// Double-precision floating-point 2x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x2<f64, defaultp> f64mat2x2;\r\n\r\n\t/// Double-precision floating-point 2x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x3<f64, defaultp> f64mat2x3;\r\n\r\n\t/// Double-precision floating-point 2x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat2x4<f64, defaultp> f64mat2x4;\r\n\r\n\t/// Double-precision floating-point 3x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x2<f64, defaultp> f64mat3x2;\r\n\r\n\t/// Double-precision floating-point 3x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x3<f64, defaultp> f64mat3x3;\r\n\r\n\t/// Double-precision floating-point 3x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat3x4<f64, defaultp> f64mat3x4;\r\n\r\n\t/// Double-precision floating-point 4x2 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x2<f64, defaultp> f64mat4x2;\r\n\r\n\t/// Double-precision floating-point 4x3 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x3<f64, defaultp> f64mat4x3;\r\n\r\n\t/// Double-precision floating-point 4x4 matrix.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tmat4x4<f64, defaultp> f64mat4x4;\r\n\r\n\r\n\t//////////////////////////\r\n\t// Quaternion types\r\n\r\n\t/// Single-precision floating-point quaternion.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tquat<f32, defaultp> f32quat;\r\n\r\n\t/// Double-precision floating-point quaternion.\r\n\t/// @see gtc_type_precision\r\n\ttypedef detail::tquat<f64, defaultp> f64quat;\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"type_precision.inl\"\r\n\r\n#endif//GLM_GTC_type_precision\r\n"
  },
  {
    "path": "gpu/glm/gtc/type_precision.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_swizzle\r\n/// @file glm/gtc/swizzle.inl\r\n/// @date 2009-06-14 / 2011-06-15\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\r\n}\r\n"
  },
  {
    "path": "gpu/glm/gtc/type_ptr.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_type_ptr\r\n/// @file glm/gtc/type_ptr.hpp\r\n/// @date 2009-05-06 / 2011-06-05\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_half_float (dependence)\r\n/// @see gtc_quaternion (dependence)\r\n///\r\n/// @defgroup gtc_type_ptr GLM_GTC_type_ptr\r\n/// @ingroup gtc\r\n///\r\n/// @brief Handles the interaction between pointers and vector, matrix types.\r\n/// \r\n/// This extension defines an overloaded function, glm::value_ptr, which\r\n/// takes any of the \\ref core_template \"core template types\". It returns\r\n/// a pointer to the memory layout of the object. Matrix types store their values\r\n/// in column-major order.\r\n/// \r\n/// This is useful for uploading data to matrices or copying data to buffer objects.\r\n///\r\n/// Example:\r\n/// @code\r\n/// #include <glm/glm.hpp>\r\n/// #include <glm/gtc/type_ptr.hpp>\r\n/// \r\n/// glm::vec3 aVector(3);\r\n/// glm::mat4 someMatrix(1.0);\r\n/// \r\n/// glUniform3fv(uniformLoc, 1, glm::value_ptr(aVector));\r\n/// glUniformMatrix4fv(uniformMatrixLoc, 1, GL_FALSE, glm::value_ptr(someMatrix));\r\n/// @endcode\r\n/// \r\n/// <glm/gtc/type_ptr.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_type_ptr\r\n#define GLM_GTC_type_ptr\r\n\r\n// Dependency:\r\n#include \"../gtc/quaternion.hpp\"\r\n#include \"../vec2.hpp\"\r\n#include \"../vec3.hpp\"\r\n#include \"../vec4.hpp\"\r\n#include \"../mat2x2.hpp\"\r\n#include \"../mat2x3.hpp\"\r\n#include \"../mat2x4.hpp\"\r\n#include \"../mat3x2.hpp\"\r\n#include \"../mat3x3.hpp\"\r\n#include \"../mat3x4.hpp\"\r\n#include \"../mat4x2.hpp\"\r\n#include \"../mat4x3.hpp\"\r\n#include \"../mat4x4.hpp\"\r\n#include <cstring>\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_type_ptr extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_type_ptr\r\n\t/// @{\r\n\r\n\t/// Return the constant address to the data of the input parameter.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename genType>\r\n\tGLM_FUNC_DECL typename genType::value_type const * value_ptr(genType const & vec);\r\n\r\n\t/// Build a vector from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tvec2<T, defaultp> make_vec2(T const * const ptr);\r\n\r\n\t/// Build a vector from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tvec3<T, defaultp> make_vec3(T const * const ptr);\r\n\r\n\t/// Build a vector from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tvec4<T, defaultp> make_vec4(T const * const ptr);\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat2x2<T, defaultp> make_mat2x2(T const * const ptr);\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat2x3<T, defaultp> make_mat2x3(T const * const ptr);\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat2x4<T, defaultp> make_mat2x4(T const * const ptr);\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat3x2<T, defaultp> make_mat3x2(T const * const ptr);\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat3x3<T, defaultp> make_mat3x3(T const * const ptr);\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat3x4<T, defaultp> make_mat3x4(T const * const ptr);\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat4x2<T, defaultp> make_mat4x2(\r\n\t\tT const * const ptr);\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat4x3<T, defaultp> make_mat4x3(T const * const ptr);\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, defaultp> make_mat4x4(T const * const ptr);\r\n\t\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat2x2<T, defaultp> make_mat2(T const * const ptr);\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat3x3<T, defaultp> make_mat3(T const * const ptr);\r\n\t\t\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tmat4x4<T, defaultp> make_mat4(T const * const ptr);\r\n\r\n\t/// Build a quaternion from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T>\r\n\tGLM_FUNC_DECL detail::tquat<T, defaultp> make_quat(T const * const ptr);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"type_ptr.inl\"\r\n\r\n#endif//GLM_GTC_type_ptr\r\n\r\n"
  },
  {
    "path": "gpu/glm/gtc/type_ptr.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_type_ptr\r\n/// @file glm/gtc/type_ptr.inl\r\n/// @date 2011-06-15 / 2011-12-07\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include <cstring>\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_type_ptr\r\n\t/// @{\r\n\r\n\t/// Return the constant address to the data of the vector input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & vec\r\n\t)\r\n\t{\r\n\t\treturn &(vec.x);\r\n\t}\r\n\r\n\t//! Return the address to the data of the vector input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\r\n\t\tdetail::tvec2<T, P> & vec\r\n\t)\r\n\t{\r\n\t\treturn &(vec.x);\r\n\t}\r\n\r\n\t/// Return the constant address to the data of the vector input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & vec\r\n\t)\r\n\t{\r\n\t\treturn &(vec.x);\r\n\t}\r\n\r\n\t//! Return the address to the data of the vector input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\r\n\t\tdetail::tvec3<T, P> & vec\r\n\t)\r\n\t{\r\n\t\treturn &(vec.x);\r\n\t}\r\n\t\t\r\n\t/// Return the constant address to the data of the vector input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\t\r\n\t\tdetail::tvec4<T, P> const & vec\r\n\t)\r\n\t{\r\n\t\treturn &(vec.x);\r\n\t}\r\n\r\n\t//! Return the address to the data of the vector input.\r\n\t//! From GLM_GTC_type_ptr extension.\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\t\r\n\t\tdetail::tvec4<T, P> & vec\r\n\t)\r\n\t{\r\n\t\treturn &(vec.x);\r\n\t}\r\n\r\n\t/// Return the constant address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tmat2x2<T, P> const & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\r\n\t//! Return the address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\r\n\t\tdetail::tmat2x2<T, P> & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\t\t\r\n\t/// Return the constant address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tmat3x3<T, P> const & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\r\n\t//! Return the address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\r\n\t\tdetail::tmat3x3<T, P> & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\t\t\r\n\t/// Return the constant address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\r\n\t//! Return the address to the data of the matrix input.\r\n\t//! From GLM_GTC_type_ptr extension.\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\r\n\t/// Return the constant address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tmat2x3<T, P> const & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\r\n\t//! Return the address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\r\n\t\tdetail::tmat2x3<T, P> & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\t\t\r\n\t/// Return the constant address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tmat3x2<T, P> const & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\r\n\t//! Return the address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\r\n\t\tdetail::tmat3x2<T, P> & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\t\t\r\n\t/// Return the constant address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tmat2x4<T, P> const & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\r\n\t//! Return the address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\r\n\t\tdetail::tmat2x4<T, P> & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\t\t\r\n\t/// Return the constant address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tmat4x2<T, P> const & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\r\n\t//! Return the address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\t\r\n\t\tdetail::tmat4x2<T, P> & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\t\t\r\n\t/// Return the constant address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tmat3x4<T, P> const & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\r\n\t//! Return the address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\r\n\t\tdetail::tmat3x4<T, P> & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\t\t\r\n\t/// Return the constant address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tmat4x3<T, P> const & mat\r\n\t)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\r\n\t/// Return the address to the data of the matrix input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr(detail::tmat4x3<T, P> & mat)\r\n\t{\r\n\t\treturn &(mat[0].x);\r\n\t}\r\n\r\n\t/// Return the constant address to the data of the input parameter.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T const * value_ptr\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn &(q[0]);\r\n\t}\r\n\r\n\t/// Return the address to the data of the quaternion input.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T * value_ptr\r\n\t(\r\n\t\tdetail::tquat<T, P> & q\r\n\t)\r\n\t{\r\n\t\treturn &(q[0]);\r\n\t}\r\n\r\n\t/// Build a vector from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, defaultp> make_vec2(T const * const ptr)\r\n\t{\r\n\t\tdetail::tvec2<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tvec2<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t/// Build a vector from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, defaultp> make_vec3(T const * const ptr)\r\n\t{\r\n\t\tdetail::tvec3<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tvec3<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t/// Build a vector from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, defaultp> make_vec4(T const * const ptr)\r\n\t{\r\n\t\tdetail::tvec4<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tvec4<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat2x2<T, defaultp> make_mat2x2(T const * const ptr)\r\n\t{\r\n\t\tdetail::tmat2x2<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x2<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat2x3<T, defaultp> make_mat2x3(T const * const ptr)\r\n\t{\r\n\t\tdetail::tmat2x3<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x3<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat2x4<T, defaultp> make_mat2x4(T const * const ptr)\r\n\t{\r\n\t\tdetail::tmat2x4<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x4<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t/// Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x2<T, defaultp> make_mat3x2(T const * const ptr)\r\n\t{\r\n\t\tdetail::tmat3x2<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x2<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//! Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, defaultp> make_mat3x3(T const * const ptr)\r\n\t{\r\n\t\tdetail::tmat3x3<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x3<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//! Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x4<T, defaultp> make_mat3x4(T const * const ptr)\r\n\t{\r\n\t\tdetail::tmat3x4<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x4<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//! Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x2<T, defaultp> make_mat4x2(T const * const ptr)\r\n\t{\r\n\t\tdetail::tmat4x2<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x2<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//! Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x3<T, defaultp> make_mat4x3(T const * const ptr)\r\n\t{\r\n\t\tdetail::tmat4x3<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x3<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//! Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> make_mat4x4(T const * const ptr)\r\n\t{\r\n\t\tdetail::tmat4x4<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x4<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t//! Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat2x2<T, defaultp> make_mat2(T const * const ptr)\r\n\t{\r\n\t\treturn make_mat2x2(ptr);\r\n\t}\r\n\r\n\t//! Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, defaultp> make_mat3(T const * const ptr)\r\n\t{\r\n\t\treturn make_mat3x3(ptr);\r\n\t}\r\n\t\t\r\n\t//! Build a matrix from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> make_mat4(T const * const ptr)\r\n\t{\r\n\t\treturn make_mat4x4(ptr);\r\n\t}\r\n\r\n\t//! Build a quaternion from a pointer.\r\n\t/// @see gtc_type_ptr\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, defaultp> make_quat(T const * const ptr)\r\n\t{\r\n\t\tdetail::tquat<T, defaultp> Result;\r\n\t\tmemcpy(value_ptr(Result), ptr, sizeof(detail::tquat<T, defaultp>));\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n"
  },
  {
    "path": "gpu/glm/gtc/ulp.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_ulp\r\n/// @file glm/gtc/ulp.hpp\r\n/// @date 2011-02-21 / 2011-12-12\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtc_ulp GLM_GTC_ulp\r\n/// @ingroup gtc\r\n/// \r\n/// @brief Allow the measurement of the accuracy of a function against a reference \r\n/// implementation. This extension works on floating-point data and provide results \r\n/// in ULP.\r\n/// <glm/gtc/ulp.hpp> need to be included to use these features.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTC_ulp\r\n#define GLM_GTC_ulp\r\n\r\n// Dependencies\r\n#include \"../detail/setup.hpp\"\r\n#include \"../detail/precision.hpp\"\r\n#include \"../detail/type_int.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTC_ulp extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtc_ulp\r\n\t/// @{\r\n\r\n\t/// Return the next ULP value(s) after the input value(s).\r\n\t/// @see gtc_ulp\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType next_float(genType const & x);\r\n\r\n\t/// Return the previous ULP value(s) before the input value(s).\r\n\t/// @see gtc_ulp\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType prev_float(genType const & x);\r\n\r\n\t/// Return the value(s) ULP distance after the input value(s).\r\n\t/// @see gtc_ulp\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType next_float(genType const & x, uint const & Distance);\r\n\r\n\t/// Return the value(s) ULP distance before the input value(s).\r\n\t/// @see gtc_ulp\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType prev_float(genType const & x, uint const & Distance);\r\n\t\r\n\t/// Return the distance in the number of ULP between 2 scalars.\r\n\t/// @see gtc_ulp\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_DECL uint float_distance(T const & x, T const & y);\r\n\r\n\t/// Return the distance in the number of ULP between 2 vectors.\r\n\t/// @see gtc_ulp\r\n\ttemplate<typename T, template<typename> class vecType>\r\n\tGLM_FUNC_DECL vecType<uint> float_distance(vecType<T> const & x, vecType<T> const & y);\r\n\t\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"ulp.inl\"\r\n\r\n#endif//GLM_GTC_ulp\r\n\r\n"
  },
  {
    "path": "gpu/glm/gtc/ulp.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtc_ulp\r\n/// @file glm/gtc/ulp.inl\r\n/// @date 2011-03-07 / 2012-04-07\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n/// Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.\r\n///\r\n/// Developed at SunPro, a Sun Microsystems, Inc. business.\r\n/// Permission to use, copy, modify, and distribute this\r\n/// software is freely granted, provided that this notice\r\n/// is preserved.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../detail/type_int.hpp\"\r\n#include <cmath>\r\n#include <cfloat>\r\n#include <limits>\r\n\r\n#if(GLM_COMPILER & GLM_COMPILER_VC)\r\n#\tpragma warning(push)\r\n#\tpragma warning(disable : 4127)\r\n#endif\r\n\r\ntypedef union\r\n{\r\n\tfloat value;\r\n\t/* FIXME: Assumes 32 bit int.  */\r\n\tunsigned int word;\r\n} ieee_float_shape_type;\r\n\r\ntypedef union\r\n{\r\n\tdouble value;\r\n\tstruct\r\n\t{\r\n\t\tglm::detail::int32 lsw;\r\n\t\tglm::detail::int32 msw;\r\n\t} parts;\r\n} ieee_double_shape_type;\r\n\r\n#define GLM_EXTRACT_WORDS(ix0,ix1,d)\t\t\\\r\n\tdo {\t\t\t\t\t\t\t\t\t\\\r\n\t\tieee_double_shape_type ew_u;\t\t\\\r\n\t\tew_u.value = (d);\t\t\t\t\t\\\r\n\t\t(ix0) = ew_u.parts.msw;\t\t\t\t\\\r\n\t\t(ix1) = ew_u.parts.lsw;\t\t\t\t\\\r\n\t} while (0)\r\n\r\n#define GLM_GET_FLOAT_WORD(i,d)\t\t\t\t\\\r\n\tdo {\t\t\t\t\t\t\t\t\t\\\r\n\t\tieee_float_shape_type gf_u;\t\t\t\\\r\n\t\tgf_u.value = (d);\t\t\t\t\t\\\r\n\t\t(i) = gf_u.word;\t\t\t\t\t\\\r\n\t} while (0)\r\n\r\n#define GLM_SET_FLOAT_WORD(d,i)\t\t\t\t\\\r\n\tdo {\t\t\t\t\t\t\t\t\t\\\r\n\t\tieee_float_shape_type sf_u;\t\t\t\\\r\n\t\tsf_u.word = (i);\t\t\t\t\t\\\r\n\t\t(d) = sf_u.value;\t\t\t\t\t\\\r\n\t} while (0)\r\n\r\n#define GLM_INSERT_WORDS(d,ix0,ix1)\t\t\t\\\r\n\tdo {\t\t\t\t\t\t\t\t\t\\\r\n\t\tieee_double_shape_type iw_u;\t\t\\\r\n\t\tiw_u.parts.msw = (ix0);\t\t\t\t\\\r\n\t\tiw_u.parts.lsw = (ix1);\t\t\t\t\\\r\n\t\t(d) = iw_u.value;\t\t\t\t\t\\\r\n\t} while (0)\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\tGLM_FUNC_QUALIFIER float nextafterf(float x, float y)\r\n\t{\r\n\t\tvolatile float t;\r\n\t\tglm::detail::int32 hx, hy, ix, iy;\r\n\r\n\t\tGLM_GET_FLOAT_WORD(hx, x);\r\n\t\tGLM_GET_FLOAT_WORD(hy, y);\r\n\t\tix = hx&0x7fffffff;\t\t// |x|\r\n\t\tiy = hy&0x7fffffff;\t\t// |y|\r\n\r\n\t\tif((ix>0x7f800000) ||\t// x is nan \r\n\t\t\t(iy>0x7f800000))\t// y is nan \r\n\t\t\treturn x+y;\r\n\t\tif(x==y) return y;\t\t// x=y, return y\r\n\t\tif(ix==0) {\t\t\t\t// x == 0\r\n\t\t\tGLM_SET_FLOAT_WORD(x,(hy&0x80000000)|1);// return +-minsubnormal\r\n\t\t\tt = x*x;\r\n\t\t\tif(t==x) return t; else return x;\t// raise underflow flag\r\n\t\t}\r\n\t\tif(hx>=0) {\t\t\t\t// x > 0 \r\n\t\t\tif(hx>hy) {\t\t\t// x > y, x -= ulp\r\n\t\t\t\thx -= 1;\r\n\t\t\t} else {\t\t\t// x < y, x += ulp\r\n\t\t\t\thx += 1;\r\n\t\t\t}\r\n\t\t} else {\t\t\t\t// x < 0\r\n\t\t\tif(hy>=0||hx>hy){\t// x < y, x -= ulp\r\n\t\t\t\thx -= 1;\r\n\t\t\t} else {\t\t\t// x > y, x += ulp\r\n\t\t\t\thx += 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\thy = hx&0x7f800000;\r\n\t\tif(hy>=0x7f800000) return x+x;  // overflow\r\n\t\tif(hy<0x00800000) {             // underflow\r\n\t\t\tt = x*x;\r\n\t\t\tif(t!=x) {          // raise underflow flag\r\n\t\t\t\tGLM_SET_FLOAT_WORD(y,hx);\r\n\t\t\t\treturn y;\r\n\t\t\t}\r\n\t\t}\r\n\t\tGLM_SET_FLOAT_WORD(x,hx);\r\n\t\treturn x;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER double nextafter(double x, double y)\r\n\t{\r\n\t\tvolatile double t;\r\n\t\tglm::detail::int32 hx, hy, ix, iy;\r\n\t\tglm::detail::uint32 lx, ly;\r\n\r\n\t\tGLM_EXTRACT_WORDS(hx, lx, x);\r\n\t\tGLM_EXTRACT_WORDS(hy, ly, y);\r\n\t\tix = hx & 0x7fffffff;             // |x| \r\n\t\tiy = hy & 0x7fffffff;             // |y| \r\n\r\n\t\tif(((ix>=0x7ff00000)&&((ix-0x7ff00000)|lx)!=0) ||   // x is nan\r\n\t\t\t((iy>=0x7ff00000)&&((iy-0x7ff00000)|ly)!=0))     // y is nan\r\n\t\t\treturn x+y;\r\n\t\tif(x==y) return y;              // x=y, return y\r\n\t\tif((ix|lx)==0) {                        // x == 0 \r\n\t\t\tGLM_INSERT_WORDS(x, hy & 0x80000000, 1);    // return +-minsubnormal\r\n\t\t\tt = x*x;\r\n\t\t\tif(t==x) return t; else return x;   // raise underflow flag \r\n\t\t}\r\n\t\tif(hx>=0) {                             // x > 0 \r\n\t\t\tif(hx>hy||((hx==hy)&&(lx>ly))) {    // x > y, x -= ulp \r\n\t\t\t\tif(lx==0) hx -= 1;\r\n\t\t\t\tlx -= 1;\r\n\t\t\t} else {                            // x < y, x += ulp\r\n\t\t\t\tlx += 1;\r\n\t\t\t\tif(lx==0) hx += 1;\r\n\t\t\t}\r\n\t\t} else {                                // x < 0 \r\n\t\t\tif(hy>=0||hx>hy||((hx==hy)&&(lx>ly))){// x < y, x -= ulp\r\n\t\t\t\tif(lx==0) hx -= 1;\r\n\t\t\t\tlx -= 1;\r\n\t\t\t} else {                            // x > y, x += ulp\r\n\t\t\t\tlx += 1;\r\n\t\t\t\tif(lx==0) hx += 1;\r\n\t\t\t}\r\n\t\t}\r\n\t\thy = hx&0x7ff00000;\r\n\t\tif(hy>=0x7ff00000) return x+x;  // overflow\r\n\t\tif(hy<0x00100000) {             // underflow\r\n\t\t\tt = x*x;\r\n\t\t\tif(t!=x) {          // raise underflow flag\r\n\t\t\t\tGLM_INSERT_WORDS(y,hx,lx);\r\n\t\t\t\treturn y;\r\n\t\t\t}\r\n\t\t}\r\n\t\tGLM_INSERT_WORDS(x,hx,lx);\r\n\t\treturn x;\r\n\t}\r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#if(GLM_COMPILER & GLM_COMPILER_VC)\r\n#\tpragma warning(pop)\r\n#endif\r\n\r\n#if((GLM_COMPILER & GLM_COMPILER_VC) || ((GLM_COMPILER & GLM_COMPILER_INTEL) && (GLM_PLATFORM & GLM_PLATFORM_WINDOWS)))\r\n#\tdefine GLM_NEXT_AFTER_FLT(x, toward) glm::detail::nextafterf((x), (toward))\r\n#\tdefine GLM_NEXT_AFTER_DBL(x, toward) _nextafter((x), (toward))\r\n#else\r\n#\tdefine GLM_NEXT_AFTER_FLT(x, toward) nextafterf((x), (toward))\r\n#\tdefine GLM_NEXT_AFTER_DBL(x, toward) nextafter((x), (toward))\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\tGLM_FUNC_QUALIFIER float next_float(float const & x)\r\n\t{\r\n\t\treturn GLM_NEXT_AFTER_FLT(x, std::numeric_limits<float>::max());\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER double next_float(double const & x)\r\n\t{\r\n\t\treturn GLM_NEXT_AFTER_DBL(x, std::numeric_limits<double>::max());\r\n\t}\r\n\r\n\ttemplate<typename T, precision P, template<typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> next_float(vecType<T, P> const & x)\r\n\t{\r\n\t\tvecType<T, P> Result;\r\n\t\tfor(length_t i = 0; i < Result.length(); ++i)\r\n\t\t\tResult[i] = next_float(x[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER float prev_float(float const & x)\r\n\t{\r\n\t\treturn GLM_NEXT_AFTER_FLT(x, std::numeric_limits<float>::min());\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER double prev_float(double const & x)\r\n\t{\r\n\t\treturn GLM_NEXT_AFTER_DBL(x, std::numeric_limits<double>::min());\r\n\t}\r\n\r\n\ttemplate<typename T, precision P, template<typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> prev_float(vecType<T, P> const & x)\r\n\t{\r\n\t\tvecType<T, P> Result;\r\n\t\tfor(length_t i = 0; i < Result.length(); ++i)\r\n\t\t\tResult[i] = prev_float(x[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T next_float(T const & x, uint const & ulps)\r\n\t{\r\n\t\tT temp = x;\r\n\t\tfor(uint i = 0; i < ulps; ++i)\r\n\t\t\ttemp = next_float(temp);\r\n\t\treturn temp;\r\n\t}\r\n\r\n\ttemplate<typename T, precision P, template<typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> next_float(vecType<T, P> const & x, vecType<uint, P> const & ulps)\r\n\t{\r\n\t\tvecType<T, P> Result;\r\n\t\tfor(uint i = 0; i < Result.length(); ++i)\r\n\t\t\tResult[i] = next_float(x[i], ulps[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T prev_float(T const & x, uint const & ulps)\r\n\t{\r\n\t\tT temp = x;\r\n\t\tfor(uint i = 0; i < ulps; ++i)\r\n\t\t\ttemp = prev_float(temp);\r\n\t\treturn temp;\r\n\t}\r\n\r\n\ttemplate<typename T, precision P, template<typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> prev_float(vecType<T, P> const & x, vecType<uint, P> const & ulps)\r\n\t{\r\n\t\tvecType<T, P> Result;\r\n\t\tfor(length_t i = 0; i < Result.length(); ++i)\r\n\t\t\tResult[i] = prev_float(x[i], ulps[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER uint float_distance(T const & x, T const & y)\r\n\t{\r\n\t\tuint ulp = 0;\r\n\r\n\t\tif(x < y)\r\n\t\t{\r\n\t\t\tT temp = x;\r\n\t\t\twhile(temp != y)// && ulp < std::numeric_limits<std::size_t>::max())\r\n\t\t\t{\r\n\t\t\t\t++ulp;\r\n\t\t\t\ttemp = next_float(temp);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(y < x)\r\n\t\t{\r\n\t\t\tT temp = y;\r\n\t\t\twhile(temp != x)// && ulp < std::numeric_limits<std::size_t>::max())\r\n\t\t\t{\r\n\t\t\t\t++ulp;\r\n\t\t\t\ttemp = next_float(temp);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse // ==\r\n\t\t{\r\n\r\n\t\t}\r\n\r\n\t\treturn ulp;\r\n\t}\r\n\r\n\ttemplate<typename T, precision P, template<typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<uint, P> float_distance(vecType<T, P> const & x, vecType<T, P> const & y)\r\n\t{\r\n\t\tvecType<uint, P> Result;\r\n\t\tfor(length_t i = 0; i < Result.length(); ++i)\r\n\t\t\tResult[i] = float_distance(x[i], y[i]);\r\n\t\treturn Result;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/associated_min_max.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_associated_min_max\r\n/// @file glm/gtx/associated_min_max.hpp\r\n/// @date 2008-03-10 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_extented_min_max (dependence)\r\n///\r\n/// @defgroup gtx_associated_min_max GLM_GTX_associated_min_max\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Min and max functions that return associated values not the compared onces.\r\n/// <glm/gtx/associated_min_max.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_associated_min_max\r\n#define GLM_GTX_associated_min_max\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_associated_min_max extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_associated_min_max\r\n\t/// @{\r\n\r\n\t/// Min comparison between 2 variables\r\n\t/// @see gtx_associated_min_max\r\n\ttemplate<typename genTypeT, typename genTypeU>\r\n\tgenTypeU associatedMin(\r\n\t\tconst genTypeT& x, const genTypeU& a, \r\n\t\tconst genTypeT& y, const genTypeU& b);\r\n\r\n\t/// Min comparison between 3 variables\r\n\t/// @see gtx_associated_min_max\r\n\ttemplate<typename genTypeT, typename genTypeU>\r\n\tgenTypeU associatedMin(\r\n\t\tconst genTypeT& x, const genTypeU& a, \r\n\t\tconst genTypeT& y, const genTypeU& b, \r\n\t\tconst genTypeT& z, const genTypeU& c);\r\n\r\n\t/// Min comparison between 4 variables\r\n\t/// @see gtx_associated_min_max\r\n\ttemplate<typename genTypeT, typename genTypeU>\r\n\tgenTypeU associatedMin(\r\n\t\tconst genTypeT& x, const genTypeU& a, \r\n\t\tconst genTypeT& y, const genTypeU& b, \r\n\t\tconst genTypeT& z, const genTypeU& c, \r\n\t\tconst genTypeT& w, const genTypeU& d);\r\n\r\n\t/// Max comparison between 2 variables\r\n\t/// @see gtx_associated_min_max\r\n\ttemplate<typename genTypeT, typename genTypeU>\r\n\tgenTypeU associatedMax(\r\n\t\tconst genTypeT& x, const genTypeU& a, \r\n\t\tconst genTypeT& y, const genTypeU& b);\r\n\r\n\t/// Max comparison between 3 variables\r\n\t/// @see gtx_associated_min_max\r\n\ttemplate<typename genTypeT, typename genTypeU>\r\n\tgenTypeU associatedMax(\r\n\t\tconst genTypeT& x, const genTypeU& a, \r\n\t\tconst genTypeT& y, const genTypeU& b, \r\n\t\tconst genTypeT& z, const genTypeU& c);\r\n\r\n\t/// Max comparison between 4 variables\r\n\t/// @see gtx_associated_min_max\r\n\ttemplate<typename genTypeT, typename genTypeU>\r\n\tgenTypeU associatedMax(\r\n\t\tconst genTypeT& x, const genTypeU& a, \r\n\t\tconst genTypeT& y, const genTypeU& b, \r\n\t\tconst genTypeT& z, const genTypeU& c, \r\n\t\tconst genTypeT& w, const genTypeU& d);\r\n\r\n\t/// @}\r\n} //namespace glm\r\n\r\n#include \"associated_min_max.inl\"\r\n\r\n#endif//GLM_GTX_associated_min_max\r\n"
  },
  {
    "path": "gpu/glm/gtx/associated_min_max.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2008-03-10\r\n// Updated : 2008-03-15\r\n// Licence : This source is under MIT License\r\n// File    : gtx_associated_min_max.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\n\r\n// Min comparison between 2 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER U associatedMin(T x, U a, T y, U b)\r\n{\r\n\treturn x < y ? a : b;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMin\r\n(\r\n\tconst detail::tvec2<T, P>& x, const detail::tvec2<U, P>& a,\r\n\tconst detail::tvec2<T, P>& y, const detail::tvec2<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\t//Result.x = x[0] < y[0] ? a[0] : b[0];\r\n\t//Result.y = x[1] < y[1] ? a[1] : b[1];\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] < y[i] ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMin\r\n(\r\n\tconst detail::tvec3<T, P>& x, const detail::tvec3<U, P>& a,\r\n\tconst detail::tvec3<T, P>& y, const detail::tvec3<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] < y[i] ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMin\r\n(\r\n\tconst detail::tvec4<T, P>& x, const detail::tvec4<U, P>& a,\r\n\tconst detail::tvec4<T, P>& y, const detail::tvec4<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] < y[i] ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMin\r\n(\r\n\tT x, const detail::tvec2<U, P>& a,\r\n\tT y, const detail::tvec2<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x < y ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMin\r\n(\r\n\tT x, const detail::tvec3<U, P>& a,\r\n\tT y, const detail::tvec3<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x < y ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMin\r\n(\r\n\tT x, const detail::tvec4<U, P>& a,\r\n\tT y, const detail::tvec4<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x < y ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMin\r\n(\r\n\tdetail::tvec2<T, P> const & x, U a,\r\n\tdetail::tvec2<T, P> const & y, U b\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] < y[i] ? a : b;\r\n\treturn Result;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMin\r\n(\r\n\tconst detail::tvec3<T, P>& x, U a,\r\n\tconst detail::tvec3<T, P>& y, U b\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] < y[i] ? a : b;\r\n\treturn Result;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMin\r\n(\r\n\tconst detail::tvec4<T, P>& x, U a,\r\n\tconst detail::tvec4<T, P>& y, U b\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] < y[i] ? a : b;\r\n\treturn Result;\r\n}\r\n\r\n// Min comparison between 3 variables\r\ntemplate<typename T, typename U>\r\nGLM_FUNC_QUALIFIER U associatedMin\r\n(\r\n\tT x, U a,\r\n\tT y, U b,\r\n\tT z, U c\r\n)\r\n{\r\n\tU Result = x < y ? (x < z ? a : c) : (y < z ? b : c);\r\n\treturn Result;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMin\r\n(\r\n\tconst detail::tvec2<T, P>& x, const detail::tvec2<U, P>& a,\r\n\tconst detail::tvec2<T, P>& y, const detail::tvec2<U, P>& b,\r\n\tconst detail::tvec2<T, P>& z, const detail::tvec2<U, P>& c\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]);\r\n\treturn Result;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMin\r\n(\r\n\tconst detail::tvec3<T, P>& x, const detail::tvec3<U, P>& a,\r\n\tconst detail::tvec3<T, P>& y, const detail::tvec3<U, P>& b,\r\n\tconst detail::tvec3<T, P>& z, const detail::tvec3<U, P>& c\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]);\r\n\treturn Result;\r\n}\r\n\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMin\r\n(\r\n\tconst detail::tvec4<T, P>& x, const detail::tvec4<U, P>& a,\r\n\tconst detail::tvec4<T, P>& y, const detail::tvec4<U, P>& b,\r\n\tconst detail::tvec4<T, P>& z, const detail::tvec4<U, P>& c\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] < y[i] ? (x[i] < z[i] ? a[i] : c[i]) : (y[i] < z[i] ? b[i] : c[i]);\r\n\treturn Result;\r\n}\r\n\r\n// Min comparison between 4 variables\r\ntemplate<typename T, typename U>\r\nGLM_FUNC_QUALIFIER U associatedMin\r\n(\r\n\tT x, U a,\r\n\tT y, U b,\r\n\tT z, U c,\r\n\tT w, U d\r\n)\r\n{\r\n\tT Test1 = min(x, y);\r\n\tT Test2 = min(z, w);;\r\n\tU Result1 = x < y ? a : b;\r\n\tU Result2 = z < w ? c : d;\r\n\tU Result = Test1 < Test2 ? Result1 : Result2;\r\n\treturn Result;\r\n}\r\n\r\n// Min comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMin\r\n(\r\n\tconst detail::tvec2<T, P>& x, const detail::tvec2<U, P>& a,\r\n\tconst detail::tvec2<T, P>& y, const detail::tvec2<U, P>& b,\r\n\tconst detail::tvec2<T, P>& z, const detail::tvec2<U, P>& c,\r\n\tconst detail::tvec2<T, P>& w, const detail::tvec2<U, P>& d\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tT Test1 = min(x[i], y[i]);\r\n\t\tT Test2 = min(z[i], w[i]);\r\n\t\tU Result1 = x[i] < y[i] ? a[i] : b[i];\r\n\t\tU Result2 = z[i] < w[i] ? c[i] : d[i];\r\n\t\tResult[i] = Test1 < Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Min comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMin\r\n(\r\n\tconst detail::tvec3<T, P>& x, const detail::tvec3<U, P>& a,\r\n\tconst detail::tvec3<T, P>& y, const detail::tvec3<U, P>& b,\r\n\tconst detail::tvec3<T, P>& z, const detail::tvec3<U, P>& c,\r\n\tconst detail::tvec3<T, P>& w, const detail::tvec3<U, P>& d\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tT Test1 = min(x[i], y[i]);\r\n\t\tT Test2 = min(z[i], w[i]);\r\n\t\tU Result1 = x[i] < y[i] ? a[i] : b[i];\r\n\t\tU Result2 = z[i] < w[i] ? c[i] : d[i];\r\n\t\tResult[i] = Test1 < Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Min comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMin\r\n(\r\n\tconst detail::tvec4<T, P>& x, const detail::tvec4<U, P>& a,\r\n\tconst detail::tvec4<T, P>& y, const detail::tvec4<U, P>& b,\r\n\tconst detail::tvec4<T, P>& z, const detail::tvec4<U, P>& c,\r\n\tconst detail::tvec4<T, P>& w, const detail::tvec4<U, P>& d\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tT Test1 = min(x[i], y[i]);\r\n\t\tT Test2 = min(z[i], w[i]);\r\n\t\tU Result1 = x[i] < y[i] ? a[i] : b[i];\r\n\t\tU Result2 = z[i] < w[i] ? c[i] : d[i];\r\n\t\tResult[i] = Test1 < Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Min comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMin\r\n(\r\n\tT x, const detail::tvec2<U, P>& a,\r\n\tT y, const detail::tvec2<U, P>& b,\r\n\tT z, const detail::tvec2<U, P>& c,\r\n\tT w, const detail::tvec2<U, P>& d\r\n)\r\n{\r\n\tT Test1 = min(x, y);\r\n\tT Test2 = min(z, w);\r\n\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tU Result1 = x < y ? a[i] : b[i];\r\n\t\tU Result2 = z < w ? c[i] : d[i];\r\n\t\tResult[i] = Test1 < Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Min comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMin\r\n(\r\n\tT x, const detail::tvec3<U, P>& a,\r\n\tT y, const detail::tvec3<U, P>& b,\r\n\tT z, const detail::tvec3<U, P>& c,\r\n\tT w, const detail::tvec3<U, P>& d\r\n)\r\n{\r\n\tT Test1 = min(x, y);\r\n\tT Test2 = min(z, w);\r\n\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < detail::tvec3<U, P>::value_size; ++i)\r\n\t{\r\n\t\tU Result1 = x < y ? a[i] : b[i];\r\n\t\tU Result2 = z < w ? c[i] : d[i];\r\n\t\tResult[i] = Test1 < Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Min comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMin\r\n(\r\n\tT x, const detail::tvec4<U, P>& a,\r\n\tT y, const detail::tvec4<U, P>& b,\r\n\tT z, const detail::tvec4<U, P>& c,\r\n\tT w, const detail::tvec4<U, P>& d\r\n)\r\n{\r\n\tT Test1 = min(x, y);\r\n\tT Test2 = min(z, w);\r\n\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < detail::tvec4<U, P>::value_size; ++i)\r\n\t{\r\n\t\tU Result1 = x < y ? a[i] : b[i];\r\n\t\tU Result2 = z < w ? c[i] : d[i];\r\n\t\tResult[i] = Test1 < Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Min comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMin\r\n(\r\n\tconst detail::tvec2<T, P>& x, U a,\r\n\tconst detail::tvec2<T, P>& y, U b,\r\n\tconst detail::tvec2<T, P>& z, U c,\r\n\tconst detail::tvec2<T, P>& w, U d\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<T, P>::size_type i = 0; i < detail::tvec2<T, P>::value_size(); ++i)\r\n\t{\r\n\t\tT Test1 = min(x[i], y[i]);\r\n\t\tT Test2 = min(z[i], w[i]);;\r\n\t\tU Result1 = x[i] < y[i] ? a : b;\r\n\t\tU Result2 = z[i] < w[i] ? c : d;\r\n\t\tResult[i] = Test1 < Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Min comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMin\r\n(\r\n\tconst detail::tvec3<T, P>& x, U a,\r\n\tconst detail::tvec3<T, P>& y, U b,\r\n\tconst detail::tvec3<T, P>& z, U c,\r\n\tconst detail::tvec3<T, P>& w, U d\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<T, P>::size_type i = 0; i < detail::tvec3<T, P>::value_size(); ++i)\r\n\t{\r\n\t\tT Test1 = min(x[i], y[i]);\r\n\t\tT Test2 = min(z[i], w[i]);;\r\n\t\tU Result1 = x[i] < y[i] ? a : b;\r\n\t\tU Result2 = z[i] < w[i] ? c : d;\r\n\t\tResult[i] = Test1 < Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Min comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMin\r\n(\r\n\tconst detail::tvec4<T, P>& x, U a,\r\n\tconst detail::tvec4<T, P>& y, U b,\r\n\tconst detail::tvec4<T, P>& z, U c,\r\n\tconst detail::tvec4<T, P>& w, U d\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<T, P>::size_type i = 0; i < detail::tvec4<T, P>::value_size(); ++i)\r\n\t{\r\n\t\tT Test1 = min(x[i], y[i]);\r\n\t\tT Test2 = min(z[i], w[i]);;\r\n\t\tU Result1 = x[i] < y[i] ? a : b;\r\n\t\tU Result2 = z[i] < w[i] ? c : d;\r\n\t\tResult[i] = Test1 < Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 2 variables\r\ntemplate<typename T, typename U>\r\nGLM_FUNC_QUALIFIER U associatedMax(T x, U a, T y, U b)\r\n{\r\n\treturn x > y ? a : b;\r\n}\r\n\r\n// Max comparison between 2 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMax\r\n(\r\n\tconst detail::tvec2<T, P>& x, const detail::tvec2<U, P>& a,\r\n\tconst detail::tvec2<T, P>& y, const detail::tvec2<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 2 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMax\r\n(\r\n\tconst detail::tvec3<T, P>& x, const detail::tvec3<U, P>& a,\r\n\tconst detail::tvec3<T, P>& y, const detail::tvec3<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 2 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMax\r\n(\r\n\tconst detail::tvec4<T, P>& x, const detail::tvec4<U, P>& a,\r\n\tconst detail::tvec4<T, P>& y, const detail::tvec4<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 2 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMax\r\n(\r\n\tT x, const detail::tvec2<U, P>& a,\r\n\tT y, const detail::tvec2<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x > y ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 2 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMax\r\n(\r\n\tT x, const detail::tvec3<U, P>& a,\r\n\tT y, const detail::tvec3<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x > y ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 2 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMax\r\n(\r\n\tT x, const detail::tvec4<U, P>& a,\r\n\tT y, const detail::tvec4<U, P>& b\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x > y ? a[i] : b[i];\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 2 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMax\r\n(\r\n\tconst detail::tvec2<T, P>& x, U a,\r\n\tconst detail::tvec2<T, P>& y, U b\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<T, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? a : b;\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 2 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMax\r\n(\r\n\tconst detail::tvec3<T, P>& x, U a,\r\n\tconst detail::tvec3<T, P>& y, U b\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<T, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? a : b;\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 2 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMax\r\n(\r\n\tconst detail::tvec4<T, P>& x, U a,\r\n\tconst detail::tvec4<T, P>& y, U b\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<T, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? a : b;\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 3 variables\r\ntemplate<typename T, typename U>\r\nGLM_FUNC_QUALIFIER U associatedMax\r\n(\r\n\tT x, U a,\r\n\tT y, U b,\r\n\tT z, U c\r\n)\r\n{\r\n\tU Result = x > y ? (x > z ? a : c) : (y > z ? b : c);\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 3 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMax\r\n(\r\n\tconst detail::tvec2<T, P>& x, const detail::tvec2<U, P>& a,\r\n\tconst detail::tvec2<T, P>& y, const detail::tvec2<U, P>& b,\r\n\tconst detail::tvec2<T, P>& z, const detail::tvec2<U, P>& c\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]);\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 3 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMax\r\n(\r\n\tconst detail::tvec3<T, P>& x, const detail::tvec3<U, P>& a,\r\n\tconst detail::tvec3<T, P>& y, const detail::tvec3<U, P>& b,\r\n\tconst detail::tvec3<T, P>& z, const detail::tvec3<U, P>& c\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]);\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 3 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMax\r\n(\r\n\tconst detail::tvec4<T, P>& x, const detail::tvec4<U, P>& a,\r\n\tconst detail::tvec4<T, P>& y, const detail::tvec4<U, P>& b,\r\n\tconst detail::tvec4<T, P>& z, const detail::tvec4<U, P>& c\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? (x[i] > z[i] ? a[i] : c[i]) : (y[i] > z[i] ? b[i] : c[i]);\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 3 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMax\r\n(\r\n\tT x, const detail::tvec2<U, P>& a,\r\n\tT y, const detail::tvec2<U, P>& b,\r\n\tT z, const detail::tvec2<U, P>& c\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]);\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 3 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMax\r\n(\r\n\tT x, const detail::tvec3<U, P>& a,\r\n\tT y, const detail::tvec3<U, P>& b,\r\n\tT z, const detail::tvec3<U, P>& c\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]);\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 3 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMax\r\n(\r\n\tT x, const detail::tvec4<U, P>& a,\r\n\tT y, const detail::tvec4<U, P>& b,\r\n\tT z, const detail::tvec4<U, P>& c\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x > y ? (x > z ? a[i] : c[i]) : (y > z ? b[i] : c[i]);\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 3 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMax\r\n(\r\n\tconst detail::tvec2<T, P>& x, U a,\r\n\tconst detail::tvec2<T, P>& y, U b,\r\n\tconst detail::tvec2<T, P>& z, U c\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<T, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c);\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 3 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMax\r\n(\r\n\tconst detail::tvec3<T, P>& x, U a,\r\n\tconst detail::tvec3<T, P>& y, U b,\r\n\tconst detail::tvec3<T, P>& z, U c\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<T, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c);\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 3 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMax\r\n(\r\n\tconst detail::tvec4<T, P>& x, U a,\r\n\tconst detail::tvec4<T, P>& y, U b,\r\n\tconst detail::tvec4<T, P>& z, U c\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<T, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t\tResult[i] = x[i] > y[i] ? (x[i] > z[i] ? a : c) : (y[i] > z[i] ? b : c);\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 4 variables\r\ntemplate<typename T, typename U>\r\nGLM_FUNC_QUALIFIER U associatedMax\r\n(\r\n\tT x, U a,\r\n\tT y, U b,\r\n\tT z, U c,\r\n\tT w, U d\r\n)\r\n{\r\n\tT Test1 = max(x, y);\r\n\tT Test2 = max(z, w);;\r\n\tU Result1 = x > y ? a : b;\r\n\tU Result2 = z > w ? c : d;\r\n\tU Result = Test1 > Test2 ? Result1 : Result2;\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMax\r\n(\r\n\tconst detail::tvec2<T, P>& x, const detail::tvec2<U, P>& a,\r\n\tconst detail::tvec2<T, P>& y, const detail::tvec2<U, P>& b,\r\n\tconst detail::tvec2<T, P>& z, const detail::tvec2<U, P>& c,\r\n\tconst detail::tvec2<T, P>& w, const detail::tvec2<U, P>& d\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tT Test1 = max(x[i], y[i]);\r\n\t\tT Test2 = max(z[i], w[i]);\r\n\t\tU Result1 = x[i] > y[i] ? a[i] : b[i];\r\n\t\tU Result2 = z[i] > w[i] ? c[i] : d[i];\r\n\t\tResult[i] = Test1 > Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMax\r\n(\r\n\tconst detail::tvec3<T, P>& x, const detail::tvec3<U, P>& a,\r\n\tconst detail::tvec3<T, P>& y, const detail::tvec3<U, P>& b,\r\n\tconst detail::tvec3<T, P>& z, const detail::tvec3<U, P>& c,\r\n\tconst detail::tvec3<T, P>& w, const detail::tvec3<U, P>& d\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tT Test1 = max(x[i], y[i]);\r\n\t\tT Test2 = max(z[i], w[i]);\r\n\t\tU Result1 = x[i] > y[i] ? a[i] : b[i];\r\n\t\tU Result2 = z[i] > w[i] ? c[i] : d[i];\r\n\t\tResult[i] = Test1 > Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMax\r\n(\r\n\tconst detail::tvec4<T, P>& x, const detail::tvec4<U, P>& a,\r\n\tconst detail::tvec4<T, P>& y, const detail::tvec4<U, P>& b,\r\n\tconst detail::tvec4<T, P>& z, const detail::tvec4<U, P>& c,\r\n\tconst detail::tvec4<T, P>& w, const detail::tvec4<U, P>& d\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tT Test1 = max(x[i], y[i]);\r\n\t\tT Test2 = max(z[i], w[i]);\r\n\t\tU Result1 = x[i] > y[i] ? a[i] : b[i];\r\n\t\tU Result2 = z[i] > w[i] ? c[i] : d[i];\r\n\t\tResult[i] = Test1 > Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMax\r\n(\r\n\tT x, const detail::tvec2<U, P>& a,\r\n\tT y, const detail::tvec2<U, P>& b,\r\n\tT z, const detail::tvec2<U, P>& c,\r\n\tT w, const detail::tvec2<U, P>& d\r\n)\r\n{\r\n\tT Test1 = max(x, y);\r\n\tT Test2 = max(z, w);\r\n\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tU Result1 = x > y ? a[i] : b[i];\r\n\t\tU Result2 = z > w ? c[i] : d[i];\r\n\t\tResult[i] = Test1 > Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMax\r\n(\r\n\tT x, const detail::tvec3<U, P>& a,\r\n\tT y, const detail::tvec3<U, P>& b,\r\n\tT z, const detail::tvec3<U, P>& c,\r\n\tT w, const detail::tvec3<U, P>& d\r\n)\r\n{\r\n\tT Test1 = max(x, y);\r\n\tT Test2 = max(z, w);\r\n\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tU Result1 = x > y ? a[i] : b[i];\r\n\t\tU Result2 = z > w ? c[i] : d[i];\r\n\t\tResult[i] = Test1 > Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMax\r\n(\r\n\tT x, const detail::tvec4<U, P>& a,\r\n\tT y, const detail::tvec4<U, P>& b,\r\n\tT z, const detail::tvec4<U, P>& c,\r\n\tT w, const detail::tvec4<U, P>& d\r\n)\r\n{\r\n\tT Test1 = max(x, y);\r\n\tT Test2 = max(z, w);\r\n\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<U, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tU Result1 = x > y ? a[i] : b[i];\r\n\t\tU Result2 = z > w ? c[i] : d[i];\r\n\t\tResult[i] = Test1 > Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec2<U, P> associatedMax\r\n(\r\n\tconst detail::tvec2<T, P>& x, U a,\r\n\tconst detail::tvec2<T, P>& y, U b,\r\n\tconst detail::tvec2<T, P>& z, U c,\r\n\tconst detail::tvec2<T, P>& w, U d\r\n)\r\n{\r\n\tdetail::tvec2<U, P> Result;\r\n\tfor(typename detail::tvec2<T, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tT Test1 = max(x[i], y[i]);\r\n\t\tT Test2 = max(z[i], w[i]);;\r\n\t\tU Result1 = x[i] > y[i] ? a : b;\r\n\t\tU Result2 = z[i] > w[i] ? c : d;\r\n\t\tResult[i] = Test1 > Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec3<U, P> associatedMax\r\n(\r\n\tconst detail::tvec3<T, P>& x, U a,\r\n\tconst detail::tvec3<T, P>& y, U b,\r\n\tconst detail::tvec3<T, P>& z, U c,\r\n\tconst detail::tvec3<T, P>& w, U d\r\n)\r\n{\r\n\tdetail::tvec3<U, P> Result;\r\n\tfor(typename detail::tvec3<T, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tT Test1 = max(x[i], y[i]);\r\n\t\tT Test2 = max(z[i], w[i]);;\r\n\t\tU Result1 = x[i] > y[i] ? a : b;\r\n\t\tU Result2 = z[i] > w[i] ? c : d;\r\n\t\tResult[i] = Test1 > Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n// Max comparison between 4 variables\r\ntemplate<typename T, typename U, precision P>\r\nGLM_FUNC_QUALIFIER detail::tvec4<U, P> associatedMax\r\n(\r\n\tconst detail::tvec4<T, P>& x, U a,\r\n\tconst detail::tvec4<T, P>& y, U b,\r\n\tconst detail::tvec4<T, P>& z, U c,\r\n\tconst detail::tvec4<T, P>& w, U d\r\n)\r\n{\r\n\tdetail::tvec4<U, P> Result;\r\n\tfor(typename detail::tvec4<T, P>::size_type i = 0; i < Result.length(); ++i)\r\n\t{\r\n\t\tT Test1 = max(x[i], y[i]);\r\n\t\tT Test2 = max(z[i], w[i]);;\r\n\t\tU Result1 = x[i] > y[i] ? a : b;\r\n\t\tU Result2 = z[i] > w[i] ? c : d;\r\n\t\tResult[i] = Test1 > Test2 ? Result1 : Result2;\r\n\t}\r\n\treturn Result;\r\n}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/bit.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_bit\r\n/// @file glm/gtx/bit.hpp\r\n/// @date 2007-03-14 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_half_float (dependence)\r\n///\r\n/// @defgroup gtx_bit GLM_GTX_bit\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Allow to perform bit operations on integer values\r\n/// \r\n/// <glm/gtx/bit.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_bit\r\n#define GLM_GTX_bit\r\n\r\n// Dependencies\r\n#include \"../detail/type_int.hpp\"\r\n#include \"../detail/setup.hpp\"\r\n#include <cstddef>\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_bit extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_bit\r\n\t/// @{\r\n\r\n\t/// Build a mask of 'count' bits\r\n\t/// @see gtx_bit\r\n\ttemplate <typename genIType>\r\n\tGLM_FUNC_DECL genIType mask(genIType const & count);\r\n\r\n\t//! Find the highest bit set to 1 in a integer variable and return its value. \r\n\t/// @see gtx_bit\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType highestBitValue(genType const & value);\r\n\r\n\t//! Return true if the value is a power of two number. \r\n\t/// @see gtx_bit\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL bool isPowerOfTwo(genType const & value);\r\n\r\n\t//! Return the power of two number which value is just higher the input value.\r\n\t/// @see gtx_bit\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType powerOfTwoAbove(genType const & value);\r\n\r\n\t//! Return the power of two number which value is just lower the input value. \r\n\t/// @see gtx_bit\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType powerOfTwoBelow(genType const & value);\r\n\r\n\t//! Return the power of two number which value is the closet to the input value. \r\n\t/// @see gtx_bit\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType powerOfTwoNearest(genType const & value);\r\n\r\n\t//! Revert all bits of any integer based type. \r\n\t/// @see gtx_bit\r\n\ttemplate <typename genType> \r\n\tGLM_DEPRECATED GLM_FUNC_DECL genType bitRevert(genType const & value);\r\n\r\n\t//! Rotate all bits to the right.\r\n\t/// @see gtx_bit\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType bitRotateRight(genType const & In, std::size_t Shift);\r\n\r\n\t//! Rotate all bits to the left.\r\n\t/// @see gtx_bit\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_DECL genType bitRotateLeft(genType const & In, std::size_t Shift);\r\n\r\n\t//! Set to 1 a range of bits.\r\n\t/// @see gtx_bit\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_DECL genIUType fillBitfieldWithOne(\r\n\t\tgenIUType const & Value,\r\n\t\tint const & FromBit, \r\n\t\tint const & ToBit);\r\n\r\n\t//! Set to 0 a range of bits.\r\n\t/// @see gtx_bit\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_DECL genIUType fillBitfieldWithZero(\r\n\t\tgenIUType const & Value,\r\n\t\tint const & FromBit, \r\n\t\tint const & ToBit);\r\n\r\n\t/// Interleaves the bits of x and y. \r\n\t/// The first bit is the first bit of x followed by the first bit of y.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL int16 bitfieldInterleave(int8 x, int8 y);\r\n\r\n\t/// Interleaves the bits of x and y. \r\n\t/// The first bit is the first bit of x followed by the first bit of y.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL uint16 bitfieldInterleave(uint8 x, uint8 y);\r\n\r\n\t/// Interleaves the bits of x and y. \r\n\t/// The first bit is the first bit of x followed by the first bit of y.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL int32 bitfieldInterleave(int16 x, int16 y);\r\n\r\n\t/// Interleaves the bits of x and y. \r\n\t/// The first bit is the first bit of x followed by the first bit of y.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL uint32 bitfieldInterleave(uint16 x, uint16 y);\r\n\r\n\t/// Interleaves the bits of x and y. \r\n\t/// The first bit is the first bit of x followed by the first bit of y.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL int64 bitfieldInterleave(int32 x, int32 y);\r\n\r\n\t/// Interleaves the bits of x and y. \r\n\t/// The first bit is the first bit of x followed by the first bit of y.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL uint64 bitfieldInterleave(uint32 x, uint32 y);\r\n\r\n\t/// Interleaves the bits of x, y and z. \r\n\t/// The first bit is the first bit of x followed by the first bit of y and the first bit of z.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL int32 bitfieldInterleave(int8 x, int8 y, int8 z);\r\n\r\n\t/// Interleaves the bits of x, y and z. \r\n\t/// The first bit is the first bit of x followed by the first bit of y and the first bit of z.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z);\r\n\r\n\t/// Interleaves the bits of x, y and z. \r\n\t/// The first bit is the first bit of x followed by the first bit of y and the first bit of z.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL int64 bitfieldInterleave(int16 x, int16 y, int16 z);\r\n\r\n\t/// Interleaves the bits of x, y and z. \r\n\t/// The first bit is the first bit of x followed by the first bit of y and the first bit of z.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z);\r\n\r\n\t/// Interleaves the bits of x, y and z. \r\n\t/// The first bit is the first bit of x followed by the first bit of y and the first bit of z.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL int64 bitfieldInterleave(int32 x, int32 y, int32 z);\r\n\r\n\t/// Interleaves the bits of x, y and z. \r\n\t/// The first bit is the first bit of x followed by the first bit of y and the first bit of z.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL uint64 bitfieldInterleave(uint32 x, uint32 y, uint32 z);\r\n\r\n\t/// Interleaves the bits of x, y, z and w. \r\n\t/// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL int32 bitfieldInterleave(int8 x, int8 y, int8 z, int8 w);\r\n\r\n\t/// Interleaves the bits of x, y, z and w. \r\n\t/// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z, uint8 w);\r\n\r\n\t/// Interleaves the bits of x, y, z and w. \r\n\t/// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL int64 bitfieldInterleave(int16 x, int16 y, int16 z, int16 w);\r\n\r\n\t/// Interleaves the bits of x, y, z and w. \r\n\t/// The first bit is the first bit of x followed by the first bit of y, the first bit of z and finally the first bit of w.\r\n\t/// The other bits are interleaved following the previous sequence.\r\n\t/// \r\n\t/// @see gtx_bit\r\n\tGLM_FUNC_DECL uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w);\r\n\r\n\t/// @}\r\n} //namespace glm\r\n\r\n#include \"bit.inl\"\r\n\r\n#endif//GLM_GTX_bit\r\n"
  },
  {
    "path": "gpu/glm/gtx/bit.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-03-14\r\n// Updated : 2013-12-25\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/bit.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../detail/_vectorize.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename genIType>\r\n\tGLM_FUNC_QUALIFIER genIType mask\r\n\t(\r\n\t\tgenIType const & count\r\n\t)\r\n\t{\r\n\t\treturn ((genIType(1) << (count)) - genIType(1));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(mask)\r\n\r\n\t// highestBitValue\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType highestBitValue\r\n\t(\r\n\t\tgenType const & value\r\n\t)\r\n\t{\r\n\t\tgenType tmp = value;\r\n\t\tgenType result = genType(0);\r\n\t\twhile(tmp)\r\n\t\t{\r\n\t\t\tresult = (tmp & (~tmp + 1)); // grab lowest bit\r\n\t\t\ttmp &= ~result; // clear lowest bit\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<int, P> highestBitValue\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<int, P>(\r\n\t\t\thighestBitValue(value[0]),\r\n\t\t\thighestBitValue(value[1]));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<int, P> highestBitValue\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<int, P>(\r\n\t\t\thighestBitValue(value[0]),\r\n\t\t\thighestBitValue(value[1]),\r\n\t\t\thighestBitValue(value[2]));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<int, P> highestBitValue\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<int, P>(\r\n\t\t\thighestBitValue(value[0]),\r\n\t\t\thighestBitValue(value[1]),\r\n\t\t\thighestBitValue(value[2]),\r\n\t\t\thighestBitValue(value[3]));\r\n\t}\r\n\r\n\t// isPowerOfTwo\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER bool isPowerOfTwo(genType const & Value)\r\n\t{\r\n\t\t//detail::If<std::numeric_limits<genType>::is_signed>::apply(abs, Value);\r\n\t\t//return !(Value & (Value - 1));\r\n\r\n\t\t// For old complier?\r\n\t\tgenType Result = Value;\r\n\t\tif(std::numeric_limits<genType>::is_signed)\r\n\t\t\tResult = abs(Result);\r\n\t\treturn !(Result & (Result - 1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<bool, P> isPowerOfTwo\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<bool, P>(\r\n\t\t\tisPowerOfTwo(value[0]),\r\n\t\t\tisPowerOfTwo(value[1]));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<bool, P> isPowerOfTwo\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<bool, P>(\r\n\t\t\tisPowerOfTwo(value[0]),\r\n\t\t\tisPowerOfTwo(value[1]),\r\n\t\t\tisPowerOfTwo(value[2]));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P> isPowerOfTwo\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & value\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<bool, P>(\r\n\t\t\tisPowerOfTwo(value[0]),\r\n\t\t\tisPowerOfTwo(value[1]),\r\n\t\t\tisPowerOfTwo(value[2]),\r\n\t\t\tisPowerOfTwo(value[3]));\r\n\t}\r\n\r\n\t// powerOfTwoAbove\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType powerOfTwoAbove(genType const & value)\r\n\t{\r\n\t\treturn isPowerOfTwo(value) ? value : highestBitValue(value) << 1;\r\n\t}\r\n\r\n\tVECTORIZE_VEC(powerOfTwoAbove)\r\n\r\n\t// powerOfTwoBelow\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType powerOfTwoBelow\r\n\t(\r\n\t\tgenType const & value\r\n\t)\r\n\t{\r\n\t\treturn isPowerOfTwo(value) ? value : highestBitValue(value);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(powerOfTwoBelow)\r\n\r\n\t// powerOfTwoNearest\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType powerOfTwoNearest\r\n\t(\r\n\t\tgenType const & value\r\n\t)\r\n\t{\r\n\t\tif(isPowerOfTwo(value))\r\n\t\t\treturn value;\r\n\r\n\t\tgenType prev = highestBitValue(value);\r\n\t\tgenType next = prev << 1;\r\n\t\treturn (next - value) < (value - prev) ? next : prev;\r\n\t}\r\n\r\n\tVECTORIZE_VEC(powerOfTwoNearest)\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType bitRevert(genType const & In)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_integer, \"'bitRevert' only accept integer values\");\r\n\r\n\t\tgenType Out = 0;\r\n\t\tstd::size_t BitSize = sizeof(genType) * 8;\r\n\t\tfor(std::size_t i = 0; i < BitSize; ++i)\r\n\t\t\tif(In & (genType(1) << i))\r\n\t\t\t\tOut |= genType(1) << (BitSize - 1 - i);\r\n\t\treturn Out;\r\n\t}\r\n\r\n\tVECTORIZE_VEC(bitRevert)\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType bitRotateRight(genType const & In, std::size_t Shift)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_integer, \"'bitRotateRight' only accept integer values\");\r\n\r\n\t\tstd::size_t BitSize = sizeof(genType) * 8;\r\n\t\treturn (In << Shift) | (In >> (BitSize - Shift));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> bitRotateRight\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & Value, \r\n\t\tstd::size_t Shift\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tbitRotateRight(Value[0], Shift),\r\n\t\t\tbitRotateRight(Value[1], Shift));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> bitRotateRight\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & Value, \r\n\t\tstd::size_t Shift\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tbitRotateRight(Value[0], Shift),\r\n\t\t\tbitRotateRight(Value[1], Shift),\r\n\t\t\tbitRotateRight(Value[2], Shift));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> bitRotateRight\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & Value, \r\n\t\tstd::size_t Shift\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tbitRotateRight(Value[0], Shift),\r\n\t\t\tbitRotateRight(Value[1], Shift),\r\n\t\t\tbitRotateRight(Value[2], Shift),\r\n\t\t\tbitRotateRight(Value[3], Shift));\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType bitRotateLeft(genType const & In, std::size_t Shift)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_integer, \"'bitRotateLeft' only accept integer values\");\r\n\r\n\t\tstd::size_t BitSize = sizeof(genType) * 8;\r\n\t\treturn (In >> Shift) | (In << (BitSize - Shift));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> bitRotateLeft\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & Value, \r\n\t\tstd::size_t Shift\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tbitRotateLeft(Value[0], Shift),\r\n\t\t\tbitRotateLeft(Value[1], Shift));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> bitRotateLeft\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & Value, \r\n\t\tstd::size_t Shift\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tbitRotateLeft(Value[0], Shift),\r\n\t\t\tbitRotateLeft(Value[1], Shift),\r\n\t\t\tbitRotateLeft(Value[2], Shift));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> bitRotateLeft\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & Value, \r\n\t\tstd::size_t Shift\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tbitRotateLeft(Value[0], Shift),\r\n\t\t\tbitRotateLeft(Value[1], Shift),\r\n\t\t\tbitRotateLeft(Value[2], Shift),\r\n\t\t\tbitRotateLeft(Value[3], Shift));\r\n\t}\r\n\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_QUALIFIER genIUType fillBitfieldWithOne\r\n\t(\r\n\t\tgenIUType const & Value,\r\n\t\tint const & FromBit, \r\n\t\tint const & ToBit\r\n\t)\r\n\t{\r\n\t\tassert(FromBit <= ToBit);\r\n\t\tassert(ToBit <= sizeof(genIUType) * std::size_t(8));\r\n\r\n\t\tgenIUType Result = Value;\r\n\t\tfor(std::size_t i = 0; i <= ToBit; ++i)\r\n\t\t\tResult |= (1 << i);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename genIUType>\r\n\tGLM_FUNC_QUALIFIER genIUType fillBitfieldWithZero\r\n\t(\r\n\t\tgenIUType const & Value,\r\n\t\tint const & FromBit, \r\n\t\tint const & ToBit\r\n\t)\r\n\t{\r\n\t\tassert(FromBit <= ToBit);\r\n\t\tassert(ToBit <= sizeof(genIUType) * std::size_t(8));\r\n\r\n\t\tgenIUType Result = Value;\r\n\t\tfor(std::size_t i = 0; i <= ToBit; ++i)\r\n\t\t\tResult &= ~(1 << i);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\tnamespace detail\r\n\t{\r\n\t\ttemplate <typename PARAM, typename RET>\r\n\t\tRET bitfieldInterleave(PARAM x, PARAM y);\r\n\r\n\t\ttemplate <typename PARAM, typename RET>\r\n\t\tRET bitfieldInterleave(PARAM x, PARAM y, PARAM z);\r\n\r\n\t\ttemplate <typename PARAM, typename RET>\r\n\t\tRET bitfieldInterleave(PARAM x, PARAM y, PARAM z, PARAM w);\r\n\r\n/*\r\n\t\ttemplate <typename PARAM, typename RET>\r\n\t\tinline RET bitfieldInterleave(PARAM x, PARAM y)\r\n\t\t{\r\n\t\t\tRET Result = 0; \r\n\t\t\tfor (int i = 0; i < sizeof(PARAM) * 8; i++)\r\n\t\t\t\tResult |= (x & 1U << i) << i | (y & 1U << i) << (i + 1);\r\n\t\t\treturn Result;\r\n\t\t}\r\n\r\n\t\ttemplate <typename PARAM, typename RET>\r\n\t\tinline RET bitfieldInterleave(PARAM x, PARAM y, PARAM z)\r\n\t\t{\r\n\t\t\tRET Result = 0; \r\n\t\t\tfor (RET i = 0; i < sizeof(PARAM) * 8; i++)\r\n\t\t\t{\r\n\t\t\t\tResult |= ((RET(x) & (RET(1) << i)) << ((i << 1) + 0));\r\n\t\t\t\tResult |= ((RET(y) & (RET(1) << i)) << ((i << 1) + 1));\r\n\t\t\t\tResult |= ((RET(z) & (RET(1) << i)) << ((i << 1) + 2));\r\n\t\t\t}\r\n\t\t\treturn Result;\r\n\t\t}\r\n\r\n\t\ttemplate <typename PARAM, typename RET>\r\n\t\tinline RET bitfieldInterleave(PARAM x, PARAM y, PARAM z, PARAM w)\r\n\t\t{\r\n\t\t\tRET Result = 0; \r\n\t\t\tfor (int i = 0; i < sizeof(PARAM) * 8; i++)\r\n\t\t\t{\r\n\t\t\t\tResult |= ((((RET(x) >> i) & RET(1))) << RET((i << 2) + 0));\r\n\t\t\t\tResult |= ((((RET(y) >> i) & RET(1))) << RET((i << 2) + 1));\r\n\t\t\t\tResult |= ((((RET(z) >> i) & RET(1))) << RET((i << 2) + 2));\r\n\t\t\t\tResult |= ((((RET(w) >> i) & RET(1))) << RET((i << 2) + 3));\r\n\t\t\t}\r\n\t\t\treturn Result;\r\n\t\t}\r\n*/\r\n\t\ttemplate <>\r\n\t\tinline glm::uint16 bitfieldInterleave(glm::uint8 x, glm::uint8 y)\r\n\t\t{\r\n\t\t\tglm::uint16 REG1(x);\r\n\t\t\tglm::uint16 REG2(y);\r\n\r\n\t\t\tREG1 = ((REG1 <<  4) | REG1) & glm::uint16(0x0F0F);\r\n\t\t\tREG2 = ((REG2 <<  4) | REG2) & glm::uint16(0x0F0F);\r\n\r\n\t\t\tREG1 = ((REG1 <<  2) | REG1) & glm::uint16(0x3333);\r\n\t\t\tREG2 = ((REG2 <<  2) | REG2) & glm::uint16(0x3333);\r\n\r\n\t\t\tREG1 = ((REG1 <<  1) | REG1) & glm::uint16(0x5555);\r\n\t\t\tREG2 = ((REG2 <<  1) | REG2) & glm::uint16(0x5555);\r\n\r\n\t\t\treturn REG1 | (REG2 << 1);\r\n\t\t}\r\n\r\n\t\ttemplate <>\r\n\t\tinline glm::uint32 bitfieldInterleave(glm::uint16 x, glm::uint16 y)\r\n\t\t{\r\n\t\t\tglm::uint32 REG1(x);\r\n\t\t\tglm::uint32 REG2(y);\r\n\r\n\t\t\tREG1 = ((REG1 <<  8) | REG1) & glm::uint32(0x00FF00FF);\r\n\t\t\tREG2 = ((REG2 <<  8) | REG2) & glm::uint32(0x00FF00FF);\r\n\r\n\t\t\tREG1 = ((REG1 <<  4) | REG1) & glm::uint32(0x0F0F0F0F);\r\n\t\t\tREG2 = ((REG2 <<  4) | REG2) & glm::uint32(0x0F0F0F0F);\r\n\r\n\t\t\tREG1 = ((REG1 <<  2) | REG1) & glm::uint32(0x33333333);\r\n\t\t\tREG2 = ((REG2 <<  2) | REG2) & glm::uint32(0x33333333);\r\n\r\n\t\t\tREG1 = ((REG1 <<  1) | REG1) & glm::uint32(0x55555555);\r\n\t\t\tREG2 = ((REG2 <<  1) | REG2) & glm::uint32(0x55555555);\r\n\r\n\t\t\treturn REG1 | (REG2 << 1);\r\n\t\t}\r\n\r\n\t\ttemplate <>\r\n\t\tinline glm::uint64 bitfieldInterleave(glm::uint32 x, glm::uint32 y)\r\n\t\t{\r\n\t\t\tglm::uint64 REG1(x);\r\n\t\t\tglm::uint64 REG2(y);\r\n\r\n\t\t\tREG1 = ((REG1 << 16) | REG1) & glm::uint64(0x0000FFFF0000FFFF);\r\n\t\t\tREG2 = ((REG2 << 16) | REG2) & glm::uint64(0x0000FFFF0000FFFF);\r\n\r\n\t\t\tREG1 = ((REG1 <<  8) | REG1) & glm::uint64(0x00FF00FF00FF00FF);\r\n\t\t\tREG2 = ((REG2 <<  8) | REG2) & glm::uint64(0x00FF00FF00FF00FF);\r\n\r\n\t\t\tREG1 = ((REG1 <<  4) | REG1) & glm::uint64(0x0F0F0F0F0F0F0F0F);\r\n\t\t\tREG2 = ((REG2 <<  4) | REG2) & glm::uint64(0x0F0F0F0F0F0F0F0F);\r\n\r\n\t\t\tREG1 = ((REG1 <<  2) | REG1) & glm::uint64(0x3333333333333333);\r\n\t\t\tREG2 = ((REG2 <<  2) | REG2) & glm::uint64(0x3333333333333333);\r\n\r\n\t\t\tREG1 = ((REG1 <<  1) | REG1) & glm::uint64(0x5555555555555555);\r\n\t\t\tREG2 = ((REG2 <<  1) | REG2) & glm::uint64(0x5555555555555555);\r\n\r\n\t\t\treturn REG1 | (REG2 << 1);\r\n\t\t}\r\n\r\n\t\ttemplate <>\r\n\t\tinline glm::uint64 bitfieldInterleave(glm::uint32 x, glm::uint32 y, glm::uint32 z)\r\n\t\t{\r\n\t\t\tglm::uint64 REG1(x);\r\n\t\t\tglm::uint64 REG2(y);\r\n\t\t\tglm::uint64 REG3(z);\r\n\r\n\t\t\tREG1 = ((REG1 << 32) | REG1) & glm::uint64(0xFFFF00000000FFFF);\r\n\t\t\tREG2 = ((REG2 << 32) | REG2) & glm::uint64(0xFFFF00000000FFFF);\r\n\t\t\tREG3 = ((REG3 << 32) | REG3) & glm::uint64(0xFFFF00000000FFFF);\r\n\r\n\t\t\tREG1 = ((REG1 << 16) | REG1) & glm::uint64(0x00FF0000FF0000FF);\r\n\t\t\tREG2 = ((REG2 << 16) | REG2) & glm::uint64(0x00FF0000FF0000FF);\r\n\t\t\tREG3 = ((REG3 << 16) | REG3) & glm::uint64(0x00FF0000FF0000FF);\r\n\r\n\t\t\tREG1 = ((REG1 <<  8) | REG1) & glm::uint64(0xF00F00F00F00F00F);\r\n\t\t\tREG2 = ((REG2 <<  8) | REG2) & glm::uint64(0xF00F00F00F00F00F);\r\n\t\t\tREG3 = ((REG3 <<  8) | REG3) & glm::uint64(0xF00F00F00F00F00F);\r\n\r\n\t\t\tREG1 = ((REG1 <<  4) | REG1) & glm::uint64(0x30C30C30C30C30C3);\r\n\t\t\tREG2 = ((REG2 <<  4) | REG2) & glm::uint64(0x30C30C30C30C30C3);\r\n\t\t\tREG3 = ((REG3 <<  4) | REG3) & glm::uint64(0x30C30C30C30C30C3);\r\n\r\n\t\t\tREG1 = ((REG1 <<  2) | REG1) & glm::uint64(0x9249249249249249);\r\n\t\t\tREG2 = ((REG2 <<  2) | REG2) & glm::uint64(0x9249249249249249);\r\n\t\t\tREG3 = ((REG3 <<  2) | REG3) & glm::uint64(0x9249249249249249);\r\n\r\n\t\t\treturn REG1 | (REG2 << 1) | (REG3 << 2);\r\n\t\t}\r\n\r\n\t\ttemplate <>\r\n\t\tinline glm::uint64 bitfieldInterleave(glm::uint16 x, glm::uint16 y, glm::uint16 z, glm::uint16 w)\r\n\t\t{\r\n\t\t\tglm::uint64 REG1(x);\r\n\t\t\tglm::uint64 REG2(y);\r\n\t\t\tglm::uint64 REG3(z);\r\n\t\t\tglm::uint64 REG4(w);\r\n\r\n\t\t\tREG1 = ((REG1 << 24) | REG1) & glm::uint64(0x000000FF000000FF);\r\n\t\t\tREG2 = ((REG2 << 24) | REG2) & glm::uint64(0x000000FF000000FF);\r\n\t\t\tREG3 = ((REG3 << 24) | REG3) & glm::uint64(0x000000FF000000FF);\r\n\t\t\tREG4 = ((REG4 << 24) | REG4) & glm::uint64(0x000000FF000000FF);\r\n\r\n\t\t\tREG1 = ((REG1 << 12) | REG1) & glm::uint64(0x000F000F000F000F);\r\n\t\t\tREG2 = ((REG2 << 12) | REG2) & glm::uint64(0x000F000F000F000F);\r\n\t\t\tREG3 = ((REG3 << 12) | REG3) & glm::uint64(0x000F000F000F000F);\r\n\t\t\tREG4 = ((REG4 << 12) | REG4) & glm::uint64(0x000F000F000F000F);\r\n\r\n\t\t\tREG1 = ((REG1 <<  6) | REG1) & glm::uint64(0x0303030303030303);\r\n\t\t\tREG2 = ((REG2 <<  6) | REG2) & glm::uint64(0x0303030303030303);\r\n\t\t\tREG3 = ((REG3 <<  6) | REG3) & glm::uint64(0x0303030303030303);\r\n\t\t\tREG4 = ((REG4 <<  6) | REG4) & glm::uint64(0x0303030303030303);\r\n\r\n\t\t\tREG1 = ((REG1 <<  3) | REG1) & glm::uint64(0x1111111111111111);\r\n\t\t\tREG2 = ((REG2 <<  3) | REG2) & glm::uint64(0x1111111111111111);\r\n\t\t\tREG3 = ((REG3 <<  3) | REG3) & glm::uint64(0x1111111111111111);\r\n\t\t\tREG4 = ((REG4 <<  3) | REG4) & glm::uint64(0x1111111111111111);\r\n\r\n\t\t\treturn REG1 | (REG2 << 1) | (REG3 << 2) | (REG4 << 3);\r\n\t\t}\r\n\t}//namespace detail\r\n\r\n\tinline int16 bitfieldInterleave(int8 x, int8 y)\r\n\t{\r\n\t\tunion sign8\r\n\t\t{\r\n\t\t\tint8 i;\r\n\t\t\tuint8 u;\r\n\t\t} sign_x, sign_y;\r\n\r\n\t\tunion sign16\r\n\t\t{\r\n\t\t\tint16 i;\r\n\t\t\tuint16 u;\r\n\t\t} result;\r\n\r\n\t\tsign_x.i = x;\r\n\t\tsign_y.i = y;\r\n\t\tresult.u = bitfieldInterleave(sign_x.u, sign_y.u);\r\n\r\n\t\treturn result.i;\r\n\t}\r\n\r\n\tinline uint16 bitfieldInterleave(uint8 x, uint8 y)\r\n\t{\r\n\t\treturn detail::bitfieldInterleave<uint8, uint16>(x, y);\r\n\t}\r\n\r\n\tinline int32 bitfieldInterleave(int16 x, int16 y)\r\n\t{\r\n\t\tunion sign16\r\n\t\t{\r\n\t\t\tint16 i;\r\n\t\t\tuint16 u;\r\n\t\t} sign_x, sign_y;\r\n\r\n\t\tunion sign32\r\n\t\t{\r\n\t\t\tint32 i;\r\n\t\t\tuint32 u;\r\n\t\t} result;\r\n\r\n\t\tsign_x.i = x;\r\n\t\tsign_y.i = y;\r\n\t\tresult.u = bitfieldInterleave(sign_x.u, sign_y.u);\r\n\r\n\t\treturn result.i;\r\n\t}\r\n\r\n\tinline uint32 bitfieldInterleave(uint16 x, uint16 y)\r\n\t{\r\n\t\treturn detail::bitfieldInterleave<uint16, uint32>(x, y);\r\n\t}\r\n\r\n\tinline int64 bitfieldInterleave(int32 x, int32 y)\r\n\t{\r\n\t\tunion sign32\r\n\t\t{\r\n\t\t\tint32 i;\r\n\t\t\tuint32 u;\r\n\t\t} sign_x, sign_y;\r\n\r\n\t\tunion sign64\r\n\t\t{\r\n\t\t\tint64 i;\r\n\t\t\tuint64 u;\r\n\t\t} result;\r\n\r\n\t\tsign_x.i = x;\r\n\t\tsign_y.i = y;\r\n\t\tresult.u = bitfieldInterleave(sign_x.u, sign_y.u);\r\n\r\n\t\treturn result.i;\r\n\t}\r\n\r\n\tinline uint64 bitfieldInterleave(uint32 x, uint32 y)\r\n\t{\r\n\t\treturn detail::bitfieldInterleave<uint32, uint64>(x, y);\r\n\t}\r\n\r\n\tinline int32 bitfieldInterleave(int8 x, int8 y, int8 z)\r\n\t{\r\n\t\tunion sign8\r\n\t\t{\r\n\t\t\tint8 i;\r\n\t\t\tuint8 u;\r\n\t\t} sign_x, sign_y, sign_z;\r\n\r\n\t\tunion sign32\r\n\t\t{\r\n\t\t\tint32 i;\r\n\t\t\tuint32 u;\r\n\t\t} result;\r\n\r\n\t\tsign_x.i = x;\r\n\t\tsign_y.i = y;\r\n\t\tsign_z.i = z;\r\n\t\tresult.u = bitfieldInterleave(sign_x.u, sign_y.u, sign_z.u);\r\n\r\n\t\treturn result.i;\r\n\t}\r\n\r\n\tinline uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z)\r\n\t{\r\n\t\treturn detail::bitfieldInterleave<uint8, uint32>(x, y, z);\r\n\t}\r\n\r\n\tinline int64 bitfieldInterleave(int16 x, int16 y, int16 z)\r\n\t{\r\n\t\tunion sign16\r\n\t\t{\r\n\t\t\tint16 i;\r\n\t\t\tuint16 u;\r\n\t\t} sign_x, sign_y, sign_z;\r\n\r\n\t\tunion sign64\r\n\t\t{\r\n\t\t\tint64 i;\r\n\t\t\tuint64 u;\r\n\t\t} result;\r\n\r\n\t\tsign_x.i = x;\r\n\t\tsign_y.i = y;\r\n\t\tsign_z.i = z;\r\n\t\tresult.u = bitfieldInterleave(sign_x.u, sign_y.u, sign_z.u);\r\n\r\n\t\treturn result.i;\r\n\t}\r\n\r\n\tinline uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z)\r\n\t{\r\n\t\treturn detail::bitfieldInterleave<uint32, uint64>(x, y, z);\r\n\t}\r\n\r\n\tinline int64 bitfieldInterleave(int32 x, int32 y, int32 z)\r\n\t{\r\n\t\tunion sign16\r\n\t\t{\r\n\t\t\tint32 i;\r\n\t\t\tuint32 u;\r\n\t\t} sign_x, sign_y, sign_z;\r\n\r\n\t\tunion sign64\r\n\t\t{\r\n\t\t\tint64 i;\r\n\t\t\tuint64 u;\r\n\t\t} result;\r\n\r\n\t\tsign_x.i = x;\r\n\t\tsign_y.i = y;\r\n\t\tsign_z.i = z;\r\n\t\tresult.u = bitfieldInterleave(sign_x.u, sign_y.u, sign_z.u);\r\n\r\n\t\treturn result.i;\r\n\t}\r\n\r\n\tinline uint64 bitfieldInterleave(uint32 x, uint32 y, uint32 z)\r\n\t{\r\n\t\treturn detail::bitfieldInterleave<uint32, uint64>(x, y, z);\r\n\t}\r\n\r\n\tinline int32 bitfieldInterleave(int8 x, int8 y, int8 z, int8 w)\r\n\t{\r\n\t\tunion sign8\r\n\t\t{\r\n\t\t\tint8 i;\r\n\t\t\tuint8 u;\r\n\t\t} sign_x, sign_y, sign_z, sign_w;\r\n\r\n\t\tunion sign32\r\n\t\t{\r\n\t\t\tint32 i;\r\n\t\t\tuint32 u;\r\n\t\t} result;\r\n\r\n\t\tsign_x.i = x;\r\n\t\tsign_y.i = y;\r\n\t\tsign_z.i = z;\r\n\t\tsign_w.i = w;\r\n\t\tresult.u = bitfieldInterleave(sign_x.u, sign_y.u, sign_z.u);\r\n\r\n\t\treturn result.i;\r\n\t}\r\n\r\n\tinline uint32 bitfieldInterleave(uint8 x, uint8 y, uint8 z, uint8 w)\r\n\t{\r\n\t\treturn detail::bitfieldInterleave<uint8, uint32>(x, y, z);\r\n\t}\r\n\r\n\tinline int64 bitfieldInterleave(int16 x, int16 y, int16 z, int16 w)\r\n\t{\r\n\t\tunion sign16\r\n\t\t{\r\n\t\t\tint16 i;\r\n\t\t\tuint16 u;\r\n\t\t} sign_x, sign_y, sign_z, sign_w;\r\n\r\n\t\tunion sign64\r\n\t\t{\r\n\t\t\tint64 i;\r\n\t\t\tuint64 u;\r\n\t\t} result;\r\n\r\n\t\tsign_x.i = x;\r\n\t\tsign_y.i = y;\r\n\t\tsign_z.i = z;\r\n\t\tsign_w.i = w;\r\n\t\tresult.u = bitfieldInterleave(sign_x.u, sign_y.u, sign_z.u);\r\n\r\n\t\treturn result.i;\r\n\t}\r\n\r\n\tinline uint64 bitfieldInterleave(uint16 x, uint16 y, uint16 z, uint16 w)\r\n\t{\r\n\t\treturn detail::bitfieldInterleave<uint16, uint64>(x, y, z, w);\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/closest_point.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_bit\r\n/// @file glm/gtx/bit.hpp\r\n/// @date 2005-12-30 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_closest_point GLM_GTX_closest_point\r\n/// @ingroup gtx\r\n///\r\n/// @brief Find the point on a straight line which is the closet of a point.\r\n/// \r\n/// <glm/gtx/closest_point.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_closest_point\r\n#define GLM_GTX_closest_point\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_closest_point extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_closest_point\r\n\t/// @{\r\n\r\n\t/// Find the point on a straight line which is the closet of a point. \r\n\t/// @see gtx_closest_point\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> closestPointOnLine(\r\n\t\tdetail::tvec3<T, P> const & point,\r\n\t\tdetail::tvec3<T, P> const & a, \r\n\t\tdetail::tvec3<T, P> const & b);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"closest_point.inl\"\r\n\r\n#endif//GLM_GTX_closest_point\r\n"
  },
  {
    "path": "gpu/glm/gtx/closest_point.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-30\r\n// Updated : 2008-10-05\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/closest_point.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_gtx_closest_point\r\n#define glm_gtx_closest_point\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> closestPointOnLine\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & point,\r\n\t\tdetail::tvec3<T, P> const & a,\r\n\t\tdetail::tvec3<T, P> const & b\r\n\t)\r\n\t{\r\n\t\tT LineLength = distance(a, b);\r\n\t\tdetail::tvec3<T, P> Vector = point - a;\r\n\t\tdetail::tvec3<T, P> LineDirection = (b - a) / LineLength;\r\n\r\n\t\t// Project Vector to LineDirection to get the distance of point from a\r\n\t\tT Distance = dot(Vector, LineDirection);\r\n\r\n\t\tif(Distance <= T(0)) return a;\r\n\t\tif(Distance >= LineLength) return b;\r\n\t\treturn a + LineDirection * Distance;\r\n\t}\r\n}//namespace glm\r\n\r\n#endif//glm_gtx_closest_point\r\n"
  },
  {
    "path": "gpu/glm/gtx/color_space.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_color_space\r\n/// @file glm/gtx/color_space.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_color_space GLM_GTX_color_space\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Related to RGB to HSV conversions and operations.\r\n/// \r\n/// <glm/gtx/color_space.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_color_space\r\n#define GLM_GTX_color_space\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_color_space extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_color_space\r\n\t/// @{\r\n\r\n\t/// Converts a color from HSV color space to its color in RGB color space.\r\n\t/// @see gtx_color_space\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> rgbColor(\r\n\t\tdetail::tvec3<T, P> const & hsvValue);\r\n\r\n\t/// Converts a color from RGB color space to its color in HSV color space.\r\n\t/// @see gtx_color_space\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> hsvColor(\r\n\t\tdetail::tvec3<T, P> const & rgbValue);\r\n\t\t\r\n\t/// Build a saturation matrix.\r\n\t/// @see gtx_color_space\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> saturation(\r\n\t\tT const s);\r\n\r\n\t/// Modify the saturation of a color.\r\n\t/// @see gtx_color_space\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> saturation(\r\n\t\tT const s,\r\n\t\tdetail::tvec3<T, P> const & color);\r\n\t\t\r\n\t/// Modify the saturation of a color.\r\n\t/// @see gtx_color_space\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec4<T, P> saturation(\r\n\t\tT const s,\r\n\t\tdetail::tvec4<T, P> const & color);\r\n\t\t\r\n\t/// Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals.\r\n\t/// @see gtx_color_space\r\n\ttemplate <typename T, precision P>\r\n\tT luminosity(\r\n\t\tdetail::tvec3<T, P> const & color);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"color_space.inl\"\r\n\r\n#endif//GLM_GTX_color_space\r\n"
  },
  {
    "path": "gpu/glm/gtx/color_space.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2007-02-22\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/color_space.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> rgbColor(const detail::tvec3<T, P>& hsvColor)\r\n\t{\r\n\t\tdetail::tvec3<T, P> hsv = hsvColor;\r\n\t\tdetail::tvec3<T, P> rgbColor;\r\n\r\n\t\tif(hsv.y == static_cast<T>(0))\r\n\t\t\t// achromatic (grey)\r\n\t\t\trgbColor = detail::tvec3<T, P>(hsv.z);\r\n\t\telse\r\n\t\t{\r\n\t\t\tT sector = floor(hsv.x / T(60));\r\n\t\t\tT frac = (hsv.x / T(60)) - sector;\r\n\t\t\t// factorial part of h\r\n\t\t\tT o = hsv.z * (T(1) - hsv.y);\r\n\t\t\tT p = hsv.z * (T(1) - hsv.y * frac);\r\n\t\t\tT q = hsv.z * (T(1) - hsv.y * (T(1) - frac));\r\n\r\n\t\t\tswitch(int(sector))\r\n\t\t\t{\r\n\t\t\tdefault:\r\n\t\t\tcase 0:\r\n\t\t\t\trgbColor.r = hsv.z;\r\n\t\t\t\trgbColor.g = q;\r\n\t\t\t\trgbColor.b = o;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\trgbColor.r = p;\r\n\t\t\t\trgbColor.g = hsv.z;\r\n\t\t\t\trgbColor.b = o;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\trgbColor.r = o;\r\n\t\t\t\trgbColor.g = hsv.z;\r\n\t\t\t\trgbColor.b = q;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\trgbColor.r = o;\r\n\t\t\t\trgbColor.g = p;\r\n\t\t\t\trgbColor.b = hsv.z;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\trgbColor.r = q; \r\n\t\t\t\trgbColor.g = o; \r\n\t\t\t\trgbColor.b = hsv.z;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 5:\r\n\t\t\t\trgbColor.r = hsv.z; \r\n\t\t\t\trgbColor.g = o; \r\n\t\t\t\trgbColor.b = p;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn rgbColor;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> hsvColor(const detail::tvec3<T, P>& rgbColor)\r\n\t{\r\n\t\tdetail::tvec3<T, P> hsv = rgbColor;\r\n\t\tfloat Min   = min(min(rgbColor.r, rgbColor.g), rgbColor.b);\r\n\t\tfloat Max   = max(max(rgbColor.r, rgbColor.g), rgbColor.b);\r\n\t\tfloat Delta = Max - Min;\r\n\r\n\t\thsv.z = Max;                               \r\n\r\n\t\tif(Max != static_cast<T>(0))\r\n\t\t{\r\n\t\t\thsv.y = Delta / hsv.z;    \r\n\t\t\tT h = static_cast<T>(0);\r\n\r\n\t\t\tif(rgbColor.r == Max)\r\n\t\t\t\t// between yellow & magenta\r\n\t\t\t\th = static_cast<T>(0) + T(60) * (rgbColor.g - rgbColor.b) / Delta;\r\n\t\t\telse if(rgbColor.g == Max)\r\n\t\t\t\t// between cyan & yellow\r\n\t\t\t\th = static_cast<T>(120) + T(60) * (rgbColor.b - rgbColor.r) / Delta;\r\n\t\t\telse\r\n\t\t\t\t// between magenta & cyan\r\n\t\t\t\th = static_cast<T>(240) + T(60) * (rgbColor.r - rgbColor.g) / Delta;\r\n\r\n\t\t\tif(h < T(0)) \r\n\t\t\t\thsv.x = h + T(360);\r\n\t\t\telse\r\n\t\t\t\thsv.x = h;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// If r = g = b = 0 then s = 0, h is undefined\r\n\t\t\thsv.y = static_cast<T>(0);\r\n\t\t\thsv.x = static_cast<T>(0);\r\n\t\t}\r\n\r\n\t\treturn hsv;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> saturation(const T s)\r\n\t{\r\n\t\tdetail::tvec3<T, P> rgbw = detail::tvec3<T, P>(T(0.2126), T(0.7152), T(0.0722));\r\n\r\n\t\tT col0 = (T(1) - s) * rgbw.r;\r\n\t\tT col1 = (T(1) - s) * rgbw.g;\r\n\t\tT col2 = (T(1) - s) * rgbw.b;\r\n\r\n\t\tdetail::tmat4x4<T, P> result(T(1));\r\n\t\tresult[0][0] = col0 + s;\r\n\t\tresult[0][1] = col0;\r\n\t\tresult[0][2] = col0;\r\n\t\tresult[1][0] = col1;\r\n\t\tresult[1][1] = col1 + s;\r\n\t\tresult[1][2] = col1;\r\n\t\tresult[2][0] = col2;\r\n\t\tresult[2][1] = col2;\r\n\t\tresult[2][2] = col2 + s;\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> saturation(const T s, const detail::tvec3<T, P>& color)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(saturation(s) * detail::tvec4<T, P>(color, T(0)));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> saturation(const T s, const detail::tvec4<T, P>& color)\r\n\t{\r\n\t\treturn saturation(s) * color;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER T luminosity(const detail::tvec3<T, P>& color)\r\n\t{\r\n\t\tconst detail::tvec3<T, P> tmp = detail::tvec3<T, P>(0.33, 0.59, 0.11);\r\n\t\treturn dot(color, tmp);\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/color_space_YCoCg.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_color_space_YCoCg\r\n/// @file glm/gtx/color_space_YCoCg.hpp\r\n/// @date 2008-10-28 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_color_space_YCoCg GLM_GTX_color_space_YCoCg\r\n/// @ingroup gtx\r\n///\r\n/// @brief RGB to YCoCg conversions and operations\r\n/// \r\n/// <glm/gtx/color_space_YCoCg.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef glm_gtx_color_space_YCoCg\r\n#define glm_gtx_color_space_YCoCg\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_color_space_YCoCg extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_color_space_YCoCg\r\n\t/// @{\r\n\r\n\t/// Convert a color from RGB color space to YCoCg color space.\r\n\t/// @see gtx_color_space_YCoCg\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> rgb2YCoCg(\r\n\t\tdetail::tvec3<T, P> const & rgbColor);\r\n\r\n\t/// Convert a color from YCoCg color space to RGB color space.\r\n\t/// @see gtx_color_space_YCoCg\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> YCoCg2rgb(\r\n\t\tdetail::tvec3<T, P> const & YCoCgColor);\r\n\r\n\t/// Convert a color from RGB color space to YCoCgR color space.\r\n\t/// @see \"YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range\"\r\n\t/// @see gtx_color_space_YCoCg\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> rgb2YCoCgR(\r\n\t\tdetail::tvec3<T, P> const & rgbColor);\r\n\r\n\t/// Convert a color from YCoCgR color space to RGB color space.\r\n\t/// @see \"YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range\"\r\n\t/// @see gtx_color_space_YCoCg\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> YCoCgR2rgb(\r\n\t\tdetail::tvec3<T, P> const & YCoCgColor);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"color_space_YCoCg.inl\"\r\n\r\n#endif//glm_gtx_color_space_YCoCg\r\n"
  },
  {
    "path": "gpu/glm/gtx/color_space_YCoCg.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2008-10-28\r\n// Updated : 2008-10-28\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/color_space_YCoCg.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> rgb2YCoCg\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & rgbColor\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> result;\r\n\t\tresult.x/*Y */ =   rgbColor.r / T(4) + rgbColor.g / T(2) + rgbColor.b / T(4);\r\n\t\tresult.y/*Co*/ =   rgbColor.r / T(2) + rgbColor.g * T(0) - rgbColor.b / T(2);\r\n\t\tresult.z/*Cg*/ = - rgbColor.r / T(4) + rgbColor.g / T(2) - rgbColor.b / T(4);\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> rgb2YCoCgR\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & rgbColor\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> result;\r\n\t\tresult.x/*Y */ = rgbColor.g / T(2) + (rgbColor.r + rgbColor.b) / T(4);\r\n\t\tresult.y/*Co*/ = rgbColor.r - rgbColor.b;\r\n\t\tresult.z/*Cg*/ = rgbColor.g - (rgbColor.r + rgbColor.b) / T(2);\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> YCoCg2rgb\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & YCoCgColor\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> result;\r\n\t\tresult.r = YCoCgColor.x + YCoCgColor.y - YCoCgColor.z;\r\n\t\tresult.g = YCoCgColor.x                + YCoCgColor.z;\r\n\t\tresult.b = YCoCgColor.x - YCoCgColor.y - YCoCgColor.z;\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> YCoCgR2rgb\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & YCoCgRColor\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> result;\r\n\t\tT tmp = YCoCgRColor.x - (YCoCgRColor.z / T(2));\r\n\t\tresult.g = YCoCgRColor.z + tmp;\r\n\t\tresult.b = tmp - (YCoCgRColor.y / T(2));\r\n\t\tresult.r = result.b + YCoCgRColor.y;\r\n\t\treturn result;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/compatibility.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_compatibility\r\n/// @file glm/gtx/compatibility.hpp\r\n/// @date 2007-01-24 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_half_float (dependence)\r\n///\r\n/// @defgroup gtx_compatibility GLM_GTX_compatibility\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Provide functions to increase the compatibility with Cg and HLSL languages\r\n/// \r\n/// <glm/gtx/compatibility.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_compatibility\r\n#define GLM_GTX_compatibility\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"  \r\n#include \"../gtc/quaternion.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_compatibility extension included\")\r\n#endif\r\n\r\n#if(GLM_COMPILER & GLM_COMPILER_VC)\r\n#\tinclude <cfloat>\r\n#elif(GLM_COMPILER & GLM_COMPILER_GCC)\r\n#\tinclude <cmath>\r\n#\tif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)\r\n#\t\tundef isfinite\r\n#\tendif\r\n#endif//GLM_COMPILER\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_compatibility\r\n\t/// @{\r\n\r\n\ttemplate <typename T> GLM_FUNC_QUALIFIER T lerp(T x, T y, T a){return mix(x, y, a);}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//!< \\brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec2<T, P> lerp(const detail::tvec2<T, P>& x, const detail::tvec2<T, P>& y, T a){return mix(x, y, a);}\t\t\t\t\t\t\t//!< \\brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)\r\n\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec3<T, P> lerp(const detail::tvec3<T, P>& x, const detail::tvec3<T, P>& y, T a){return mix(x, y, a);}\t\t\t\t\t\t\t//!< \\brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec4<T, P> lerp(const detail::tvec4<T, P>& x, const detail::tvec4<T, P>& y, T a){return mix(x, y, a);}\t\t\t\t\t\t\t//!< \\brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec2<T, P> lerp(const detail::tvec2<T, P>& x, const detail::tvec2<T, P>& y, const detail::tvec2<T, P>& a){return mix(x, y, a);}\t//!< \\brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec3<T, P> lerp(const detail::tvec3<T, P>& x, const detail::tvec3<T, P>& y, const detail::tvec3<T, P>& a){return mix(x, y, a);}\t//!< \\brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec4<T, P> lerp(const detail::tvec4<T, P>& x, const detail::tvec4<T, P>& y, const detail::tvec4<T, P>& a){return mix(x, y, a);}\t//!< \\brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility)\r\n\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER T slerp(detail::tquat<T, P> const & x, detail::tquat<T, P> const & y, T const & a){return mix(x, y, a);} //!< \\brief Returns the slurp interpolation between two quaternions.\r\n\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER T saturate(T x){return clamp(x, T(0), T(1));}\t\t\t\t\t\t\t\t\t\t\t\t\t\t//!< \\brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec2<T, P> saturate(const detail::tvec2<T, P>& x){return clamp(x, T(0), T(1));}\t\t\t\t\t//!< \\brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec3<T, P> saturate(const detail::tvec3<T, P>& x){return clamp(x, T(0), T(1));}\t\t\t\t\t//!< \\brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec4<T, P> saturate(const detail::tvec4<T, P>& x){return clamp(x, T(0), T(1));}\t\t\t\t\t//!< \\brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility)\r\n\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER T atan2(T x, T y){return atan(x, y);}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//!< \\brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec2<T, P> atan2(const detail::tvec2<T, P>& x, const detail::tvec2<T, P>& y){return atan(x, y);}\t//!< \\brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec3<T, P> atan2(const detail::tvec3<T, P>& x, const detail::tvec3<T, P>& y){return atan(x, y);}\t//!< \\brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> GLM_FUNC_QUALIFIER detail::tvec4<T, P> atan2(const detail::tvec4<T, P>& x, const detail::tvec4<T, P>& y){return atan(x, y);}\t//!< \\brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility)\r\n\r\n\ttemplate <typename genType> bool isfinite(genType const & x);\t\t\t\t\t\t\t\t\t\t\t//!< \\brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> detail::tvec2<bool, P> isfinite(const detail::tvec2<T, P>& x);\t\t\t\t//!< \\brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> detail::tvec3<bool, P> isfinite(const detail::tvec3<T, P>& x);\t\t\t\t//!< \\brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)\r\n\ttemplate <typename T, precision P> detail::tvec4<bool, P> isfinite(const detail::tvec4<T, P>& x);\t\t\t\t//!< \\brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility)\r\n\r\n\ttypedef bool\t\t\t\t\t\tbool1;\t\t\t//!< \\brief boolean type with 1 component. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec2<bool, highp>\t\t\tbool2;\t\t\t//!< \\brief boolean type with 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec3<bool, highp>\t\t\tbool3;\t\t\t//!< \\brief boolean type with 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec4<bool, highp>\t\t\tbool4;\t\t\t//!< \\brief boolean type with 4 components. (From GLM_GTX_compatibility extension)\r\n\r\n\ttypedef bool\t\t\t\t\t\tbool1x1;\t\t//!< \\brief boolean matrix with 1 x 1 component. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x2<bool, highp>\t\tbool2x2;\t\t//!< \\brief boolean matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x3<bool, highp>\t\tbool2x3;\t\t//!< \\brief boolean matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x4<bool, highp>\t\tbool2x4;\t\t//!< \\brief boolean matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x2<bool, highp>\t\tbool3x2;\t\t//!< \\brief boolean matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x3<bool, highp>\t\tbool3x3;\t\t//!< \\brief boolean matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x4<bool, highp>\t\tbool3x4;\t\t//!< \\brief boolean matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x2<bool, highp>\t\tbool4x2;\t\t//!< \\brief boolean matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x3<bool, highp>\t\tbool4x3;\t\t//!< \\brief boolean matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x4<bool, highp>\t\tbool4x4;\t\t//!< \\brief boolean matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)\r\n\r\n\ttypedef int\t\t\t\t\t\t\tint1;\t\t\t//!< \\brief integer vector with 1 component. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec2<int, highp>\t\t\tint2;\t\t\t//!< \\brief integer vector with 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec3<int, highp>\t\t\tint3;\t\t\t//!< \\brief integer vector with 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec4<int, highp>\t\t\tint4;\t\t\t//!< \\brief integer vector with 4 components. (From GLM_GTX_compatibility extension)\r\n\r\n\ttypedef int\t\t\t\t\t\t\tint1x1;\t\t\t//!< \\brief integer matrix with 1 component. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x2<int, highp>\t\tint2x2;\t\t\t//!< \\brief integer matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x3<int, highp>\t\tint2x3;\t\t\t//!< \\brief integer matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x4<int, highp>\t\tint2x4;\t\t\t//!< \\brief integer matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x2<int, highp>\t\tint3x2;\t\t\t//!< \\brief integer matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x3<int, highp>\t\tint3x3;\t\t\t//!< \\brief integer matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x4<int, highp>\t\tint3x4;\t\t\t//!< \\brief integer matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x2<int, highp>\t\tint4x2;\t\t\t//!< \\brief integer matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x3<int, highp>\t\tint4x3;\t\t\t//!< \\brief integer matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x4<int, highp>\t\tint4x4;\t\t\t//!< \\brief integer matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)\r\n\r\n\ttypedef float\t\t\t\t\t\tfloat1;\t\t\t//!< \\brief single-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec2<float, highp>\t\tfloat2;\t\t\t//!< \\brief single-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec3<float, highp>\t\tfloat3;\t\t\t//!< \\brief single-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec4<float, highp>\t\tfloat4;\t\t\t//!< \\brief single-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension)\r\n\r\n\ttypedef float\t\t\t\t\t\tfloat1x1;\t\t//!< \\brief single-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x2<float, highp>\t\tfloat2x2;\t\t//!< \\brief single-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x3<float, highp>\t\tfloat2x3;\t\t//!< \\brief single-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x4<float, highp>\t\tfloat2x4;\t\t//!< \\brief single-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x2<float, highp>\t\tfloat3x2;\t\t//!< \\brief single-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x3<float, highp>\t\tfloat3x3;\t\t//!< \\brief single-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x4<float, highp>\t\tfloat3x4;\t\t//!< \\brief single-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x2<float, highp>\t\tfloat4x2;\t\t//!< \\brief single-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x3<float, highp>\t\tfloat4x3;\t\t//!< \\brief single-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x4<float, highp>\t\tfloat4x4;\t\t//!< \\brief single-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)\r\n\r\n\ttypedef double\t\t\t\t\t\tdouble1;\t\t//!< \\brief double-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec2<double, highp>\t\tdouble2;\t\t//!< \\brief double-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec3<double, highp>\t\tdouble3;\t\t//!< \\brief double-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tvec4<double, highp>\t\tdouble4;\t\t//!< \\brief double-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension)\r\n\r\n\ttypedef double\t\t\t\t\t\tdouble1x1;\t\t//!< \\brief double-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x2<double, highp>\t\tdouble2x2;\t\t//!< \\brief double-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x3<double, highp>\t\tdouble2x3;\t\t//!< \\brief double-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat2x4<double, highp>\t\tdouble2x4;\t\t//!< \\brief double-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x2<double, highp>\t\tdouble3x2;\t\t//!< \\brief double-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x3<double, highp>\t\tdouble3x3;\t\t//!< \\brief double-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat3x4<double, highp>\t\tdouble3x4;\t\t//!< \\brief double-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x2<double, highp>\t\tdouble4x2;\t\t//!< \\brief double-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x3<double, highp>\t\tdouble4x3;\t\t//!< \\brief double-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension)\r\n\ttypedef detail::tmat4x4<double, highp>\t\tdouble4x4;\t\t//!< \\brief double-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension)\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"compatibility.inl\"\r\n\r\n#endif//GLM_GTX_compatibility\r\n\r\n"
  },
  {
    "path": "gpu/glm/gtx/compatibility.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-03-16\r\n// Updated : 2008-10-24\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/compatibility.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\t// isfinite\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER bool isfinite(\r\n\t\tgenType const & x)\r\n\t{\r\n#\t\tif(GLM_COMPILER & GLM_COMPILER_VC)\r\n\t\t\treturn _finite(x);\r\n#\t\telif(GLM_COMPILER & GLM_COMPILER_GCC)\r\n#\t\t\tif(GLM_PLATFORM & GLM_PLATFORM_ANDROID)\r\n\t\t\t\treturn _isfinite(x) != 0;\r\n#\t\t\telse\r\n\t\t\t\treturn std::isfinite(x) != 0;\r\n#\t\t\tendif\r\n#\t\telse\r\n\t\t\treturn std::isfinite(x) != 0;\r\n#\t\tendif\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<bool, P> isfinite(\r\n\t\tdetail::tvec2<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec2<bool, P>(\r\n\t\t\tisfinite(x.x),\r\n\t\t\tisfinite(x.y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<bool, P> isfinite(\r\n\t\tdetail::tvec3<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec3<bool, P>(\r\n\t\t\tisfinite(x.x),\r\n\t\t\tisfinite(x.y),\r\n\t\t\tisfinite(x.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P> isfinite(\r\n\t\tdetail::tvec4<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec4<bool, P>(\r\n\t\t\tisfinite(x.x),\r\n\t\t\tisfinite(x.y),\r\n\t\t\tisfinite(x.z),\r\n\t\t\tisfinite(x.w));\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/component_wise.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_component_wise\r\n/// @file glm/gtx/component_wise.hpp\r\n/// @date 2007-05-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n/// \r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_component_wise GLM_GTX_component_wise\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Operations between components of a type\r\n/// \r\n/// <glm/gtx/component_wise.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_component_wise\r\n#define GLM_GTX_component_wise\r\n\r\n// Dependencies\r\n#include \"../detail/setup.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_component_wise extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_component_wise\r\n\t/// @{\r\n\r\n\t/// Add all vector components together. \r\n\t/// @see gtx_component_wise\r\n\ttemplate <typename genType> \r\n\ttypename genType::value_type compAdd(\r\n\t\tgenType const & v);\r\n\r\n\t/// Multiply all vector components together. \r\n\t/// @see gtx_component_wise\r\n\ttemplate <typename genType> \r\n\ttypename genType::value_type compMul(\r\n\t\tgenType const & v);\r\n\r\n\t/// Find the minimum value between single vector components.\r\n\t/// @see gtx_component_wise\r\n\ttemplate <typename genType> \r\n\ttypename genType::value_type compMin(\r\n\t\tgenType const & v);\r\n\r\n\t/// Find the maximum value between single vector components.\r\n\t/// @see gtx_component_wise\r\n\ttemplate <typename genType> \r\n\ttypename genType::value_type compMax(\r\n\t\tgenType const & v);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"component_wise.inl\"\r\n\r\n#endif//GLM_GTX_component_wise\r\n"
  },
  {
    "path": "gpu/glm/gtx/component_wise.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-05-21\r\n// Updated : 2010-02-12\r\n// Licence : This source is under MIT License\r\n// File    : gtx_component_wise.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER T compAdd(vecType<T, P> const & v)\r\n\t{\r\n\t\tT result(0);\r\n\t\tfor(length_t i = 0; i < v.length(); ++i)\r\n\t\t\tresult += v[i];\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER T compMul(vecType<T, P> const & v)\r\n\t{\r\n\t\tT result(1);\r\n\t\tfor(length_t i = 0; i < v.length(); ++i)\r\n\t\t\tresult *= v[i];\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER T compMin(vecType<T, P> const & v)\r\n\t{\r\n\t\tT result(v[0]);\r\n\t\tfor(length_t i = 1; i < v.length(); ++i)\r\n\t\t\tresult = min(result, v[i]);\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER T compMax(vecType<T, P> const & v)\r\n\t{\r\n\t\tT result(v[0]);\r\n\t\tfor(length_t i = 1; i < v.length(); ++i)\r\n\t\t\tresult = max(result, v[i]);\r\n\t\treturn result;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/constants.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_constants\r\n#define GLM_GTX_constants\r\n\r\n#include \"../gtc/constants.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES))\r\n#\tpragma message(\"GLM: GLM_GTX_constants extension is deprecated, include GLM_GTC_constants (glm/gtc/constants.hpp) instead\")\r\n#endif\r\n\r\n#endif//GLM_GTX_constants\r\n"
  },
  {
    "path": "gpu/glm/gtx/dual_quaternion.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n///\r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n///\r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_dual_quaternion\r\n/// @file glm/gtx/dual_quaternion.hpp\r\n/// @date 2013-02-10 / 2013-02-20\r\n/// @author Maksim Vorobiev (msomeone@gmail.com)\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_half_float (dependence)\r\n/// @see gtc_constants (dependence)\r\n/// @see gtc_quaternion (dependence)\r\n///\r\n/// @defgroup gtc_dual_quaternion GLM_GTX_dual_quaternion\r\n/// @ingroup gtc\r\n///\r\n/// @brief Defines a templated dual-quaternion type and several dual-quaternion operations.\r\n///\r\n/// <glm/gtx/dual_quaternion.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_dual_quaternion\r\n#define GLM_GTX_dual_quaternion\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtc/constants.hpp\"\r\n#include \"../gtc/quaternion.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_dual_quaternion extension included\")\r\n#endif\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tstruct tdualquat\r\n\t{\r\n\t\tenum ctor{null};\r\n\t\t\r\n\t\ttypedef glm::detail::tquat<T, P> part_type;\r\n\t\t\r\n\tpublic:\r\n\t\tglm::detail::tquat<T, P> real, dual;\r\n\t\t\r\n\t\tGLM_FUNC_DECL GLM_CONSTEXPR int length() const;\r\n\t\t\r\n\t\t// Constructors\r\n\t\ttdualquat();\r\n\t\texplicit tdualquat(tquat<T, P> const & real);\r\n\t\ttdualquat(tquat<T, P> const & real,tquat<T, P> const & dual);\r\n\t\ttdualquat(tquat<T, P> const & orientation,tvec3<T, P> const& translation);\r\n\t\t\r\n\t\t//////////////////////////////////////////////////////////////\r\n\t\t// tdualquat conversions\r\n\t\texplicit tdualquat(tmat2x4<T, P> const & holder_mat);\r\n\t\texplicit tdualquat(tmat3x4<T, P> const & aug_mat);\r\n\t\t\r\n\t\t// Accesses\r\n\t\tpart_type & operator[](int i);\r\n\t\tpart_type const & operator[](int i) const;\r\n\t\t\r\n\t\t// Operators\r\n\t\ttdualquat<T, P> & operator*=(T const & s);\r\n\t\ttdualquat<T, P> & operator/=(T const & s);\r\n\t};\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tquat<T, P> operator- (\r\n\t\tdetail::tquat<T, P> const & q);\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tdualquat<T, P> operator+ (\r\n\t\tdetail::tdualquat<T, P> const & q,\r\n\t\tdetail::tdualquat<T, P> const & p);\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tdualquat<T, P> operator* (\r\n\t\tdetail::tdualquat<T, P> const & q,\r\n\t\tdetail::tdualquat<T, P> const & p);\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> operator* (\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> operator* (\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tdetail::tquat<T, P> const & q);\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec4<T, P> operator* (\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tvec4<T, P> const & v);\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec4<T, P> operator* (\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tdetail::tquat<T, P> const & q);\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tdualquat<T, P> operator* (\r\n\t\tdetail::tdualquat<T, P> const & q,\r\n\t\tT const & s);\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tdualquat<T, P> operator* (\r\n\t\tT const & s,\r\n\t\tdetail::tdualquat<T, P> const & q);\r\n\t\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tdualquat<T, P> operator/ (\r\n\t\tdetail::tdualquat<T, P> const & q,\r\n\t\tT const & s);\r\n} //namespace detail\r\n\t\r\n\t/// @addtogroup gtc_dual_quaternion\r\n\t/// @{\r\n\r\n\t/// Returns the normalized quaternion.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tdualquat<T, P> normalize(\r\n\t\tdetail::tdualquat<T, P> const & q);\r\n\r\n\t/// Returns the linear interpolation of two dual quaternion.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tdualquat<T, P> lerp(\r\n\t\tdetail::tdualquat<T, P> const & x,\r\n\t\tdetail::tdualquat<T, P> const & y,\r\n\t\tT const & a);\r\n\r\n\t/// Returns the q inverse.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tdualquat<T, P> inverse(\r\n\t\tdetail::tdualquat<T, P> const & q);\r\n\r\n\t/*\r\n\t/// Extracts a rotation part from dual-quaternion to a 3 * 3 matrix.\r\n\t/// TODO\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> mat3_cast(\r\n\t\tdetail::tdualquat<T, P> const & x);\r\n\t*/\r\n\t\r\n\t/// Converts a quaternion to a 2 * 4 matrix.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat2x4<T, P> mat2x4_cast(\r\n\t\tdetail::tdualquat<T, P> const & x);\r\n\r\n\t/// Converts a quaternion to a 3 * 4 matrix.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x4<T, P> mat3x4_cast(\r\n\t\tdetail::tdualquat<T, P> const & x);\r\n\r\n\t/// Converts a 2 * 4 matrix (matrix which holds real and dual parts) to a quaternion.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tdualquat<T, P> dualquat_cast(\r\n\t\tdetail::tmat2x4<T, P> const & x);\r\n\r\n\t/// Converts a 3 * 4 matrix (augmented matrix rotation + translation) to a quaternion.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tdualquat<T, P> dualquat_cast(\r\n\t\tdetail::tmat3x4<T, P> const & x);\r\n\r\n\t\r\n\t/// Dual-quaternion of low single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef detail::tdualquat<float, lowp>\t\tlowp_dualquat;\r\n\t\r\n\t/// Dual-quaternion of medium single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef detail::tdualquat<float, mediump>\tmediump_dualquat;\r\n\t\r\n\t/// Dual-quaternion of high single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef detail::tdualquat<float, highp>\t\thighp_dualquat;\r\n\r\n\r\n\t/// Dual-quaternion of low single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef detail::tdualquat<float, lowp>\t\tlowp_fdualquat;\r\n\t\r\n\t/// Dual-quaternion of medium single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef detail::tdualquat<float, mediump>\tmediump_fdualquat;\r\n\t\r\n\t/// Dual-quaternion of high single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef detail::tdualquat<float, highp>\t\thighp_fdualquat;\r\n\t\r\n\t\r\n\t/// Dual-quaternion of low double-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef detail::tdualquat<double, lowp>\t\tlowp_ddualquat;\r\n\t\r\n\t/// Dual-quaternion of medium double-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef detail::tdualquat<double, mediump>\tmediump_ddualquat;\r\n\t\r\n\t/// Dual-quaternion of high double-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef detail::tdualquat<double, highp>\thighp_ddualquat;\r\n\r\n\t\r\n#if(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))\r\n\t/// Dual-quaternion of floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef highp_fdualquat\t\t\tdualquat;\r\n\t\r\n\t/// Dual-quaternion of single-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef highp_fdualquat\t\t\tfdualquat;\r\n#elif(defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef highp_fdualquat\t\t\tdualquat;\r\n\ttypedef highp_fdualquat\t\t\tfdualquat;\r\n#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && defined(GLM_PRECISION_MEDIUMP_FLOAT) && !defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef mediump_fdualquat\t\tdualquat;\r\n\ttypedef mediump_fdualquat\t\tfdualquat;\r\n#elif(!defined(GLM_PRECISION_HIGHP_FLOAT) && !defined(GLM_PRECISION_MEDIUMP_FLOAT) && defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef lowp_fdualquat\t\t\tdualquat;\r\n\ttypedef lowp_fdualquat\t\t\tfdualquat;\r\n#else\r\n#\terror \"GLM error: multiple default precision requested for single-precision floating-point types\"\r\n#endif\r\n\t\r\n\r\n#if(!defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))\r\n\t/// Dual-quaternion of default double-precision floating-point numbers.\r\n\t///\r\n\t/// @see gtc_dual_quaternion\r\n\ttypedef highp_ddualquat\t\t\tddualquat;\r\n#elif(defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))\r\n\ttypedef highp_ddualquat\t\t\tddualquat;\r\n#elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && defined(GLM_PRECISION_MEDIUMP_DOUBLE) && !defined(GLM_PRECISION_LOWP_DOUBLE))\r\n\ttypedef mediump_ddualquat\t\tddualquat;\r\n#elif(!defined(GLM_PRECISION_HIGHP_DOUBLE) && !defined(GLM_PRECISION_MEDIUMP_DOUBLE) && defined(GLM_PRECISION_LOWP_DOUBLE))\r\n\ttypedef lowp_ddualquat\t\t\tddualquat;\r\n#else\r\n#\terror \"GLM error: Multiple default precision requested for double-precision floating-point types\"\r\n#endif\r\n\r\n\t/// @}\r\n} //namespace glm\r\n\r\n#include \"dual_quaternion.inl\"\r\n\r\n#endif//GLM_GTX_dual_quaternion\r\n"
  },
  {
    "path": "gpu/glm/gtx/dual_quaternion.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_dual_quaternion\r\n/// @file glm/gtx/dual_quaternion.inl\r\n/// @date 2013-02-10 / 2013-02-13\r\n/// @author Maksim Vorobiev (msomeone@gmail.com)\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../geometric.hpp\"\r\n#include <limits>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER GLM_CONSTEXPR int tdualquat<T, P>::length() const\r\n\t{\r\n\t\treturn 8;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat() :\r\n\t\treal(tquat<T, P>()),\r\n\t\tdual(tquat<T, P>(T(0), T(0), T(0), T(0)))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat\r\n\t(\r\n\t\ttquat<T, P> const & r\r\n\t) :\r\n\t\treal(r),\r\n\t\tdual(tquat<T, P>(T(0), T(0), T(0), T(0)))\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat\r\n\t(\r\n\t\ttquat<T, P> const & r,\r\n\t\ttquat<T, P> const & d\r\n\t) :\r\n\t\treal(r),\r\n\t\tdual(d)\r\n\t{}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat\r\n\t(\r\n\t\ttquat<T, P> const & q,\r\n\t\ttvec3<T, P> const& p\r\n\t) :\r\n\t\treal(q),\r\n\t\tdual(\r\n\t\t\tT(-0.5) * ( p.x*q.x + p.y*q.y + p.z*q.z),\r\n\t\t\tT(+0.5) * ( p.x*q.w + p.y*q.z - p.z*q.y),\r\n\t\t\tT(+0.5) * (-p.x*q.z + p.y*q.w + p.z*q.x),\r\n\t\t\tT(+0.5) * ( p.x*q.y - p.y*q.x + p.z*q.w))\r\n\t{}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// tdualquat conversions\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat\r\n\t(\r\n\t\ttmat2x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\t*this = dualquat_cast(m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tdualquat<T, P>::tdualquat\r\n\t(\r\n\t\ttmat3x4<T, P> const & m\r\n\t)\r\n\t{\r\n\t\t*this = dualquat_cast(m);\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// tdualquat<T, P> accesses\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tdualquat<T, P>::part_type & tdualquat<T, P>::operator [] (int i)\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&real)[i];\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER typename tdualquat<T, P>::part_type const & tdualquat<T, P>::operator [] (int i) const\r\n\t{\r\n\t\tassert(i >= 0 && i < this->length());\r\n\t\treturn (&real)[i];\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// tdualquat<valType> operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tdualquat<T, P> & tdualquat<T, P>::operator *=\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tthis->real *= s;\r\n\t\tthis->dual *= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER tdualquat<T, P> & tdualquat<T, P>::operator /=\r\n\t(\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\tthis->real /= s;\r\n\t\tthis->dual /= s;\r\n\t\treturn *this;\r\n\t}\r\n\r\n\t//////////////////////////////////////////////////////////////\r\n\t// tquat<valType> external operators\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tdualquat<T, P> operator-\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn detail::tdualquat<T, P>(-q.real,-q.dual);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tdualquat<T, P> operator+\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & q,\r\n\t\tdetail::tdualquat<T, P> const & p\r\n\t)\r\n\t{\r\n\t\treturn detail::tdualquat<T, P>(q.real + p.real,q.dual + p.dual);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tdualquat<T, P> operator*\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & p,\r\n\t\tdetail::tdualquat<T, P> const & o\r\n\t)\r\n\t{\r\n\t\treturn detail::tdualquat<T, P>(p.real * o.real,p.real * o.dual + p.dual * o.real);\r\n\t}\r\n\r\n\t// Transformation\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> operator*\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & q,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> const real_v3(q.real.x,q.real.y,q.real.z);\r\n\t\tdetail::tvec3<T, P> const dual_v3(q.dual.x,q.dual.y,q.dual.z);\r\n\t\treturn (cross(real_v3, cross(real_v3,v) + v * q.real.w + dual_v3) + dual_v3 * q.real.w - real_v3 * q.dual.w) * T(2) + v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> operator*\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tdetail::tdualquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn glm::inverse(q) * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> operator*\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & q,\r\n\t\tdetail::tvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(q * detail::tvec3<T, P>(v), v.w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> operator*\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tdetail::tdualquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn glm::inverse(q) * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tdualquat<T, P> operator*\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & q,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn detail::tdualquat<T, P>(q.real * s, q.dual * s);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tdualquat<T, P> operator*\r\n\t(\r\n\t\tT const & s,\r\n\t\tdetail::tdualquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn q * s;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tdualquat<T, P> operator/\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & q,\r\n\t\tT const & s\r\n\t)\r\n\t{\r\n\t\treturn detail::tdualquat<T, P>(q.real / s, q.dual / s);\r\n\t}\r\n\r\n\t//////////////////////////////////////\r\n\t// Boolean operators\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator==\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & q1,\r\n\t\tdetail::tdualquat<T, P> const & q2\r\n\t)\r\n\t{\r\n\t\treturn (q1.real == q2.real) && (q1.dual == q2.dual);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool operator!=\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & q1,\r\n\t\tdetail::tdualquat<T, P> const & q2\r\n\t)\r\n\t{\r\n\t\treturn (q1.real != q2.dual) || (q1.real != q2.dual);\r\n\t}\r\n\t}//namespace detail\r\n\r\n\t////////////////////////////////////////////////////////\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tdualquat<T, P> normalize\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn q / length(q.real);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tdualquat<T, P> lerp\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & x,\r\n\t\tdetail::tdualquat<T, P> const & y,\r\n\t\tT const & a\r\n\t)\r\n\t{\r\n\t\t// Dual Quaternion Linear blend aka DLB:\r\n\t\t// Lerp is only defined in [0, 1]\r\n\t\tassert(a >= static_cast<T>(0));\r\n\t\tassert(a <= static_cast<T>(1));\r\n\t\tT const k = dot(x.real,y.real) < static_cast<T>(0) ? -a : a;\r\n\t\tT const one(1);\r\n\t\treturn detail::tdualquat<T, P>(x * (one - a) + y * k);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tdualquat<T, P> inverse\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\tconst glm::detail::tquat<T, P> real = conjugate(q.real);\r\n\t\tconst glm::detail::tquat<T, P> dual = conjugate(q.dual);\r\n\t\treturn detail::tdualquat<T, P>(real, dual + (real * (-2.0f * dot(real,dual))));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat2x4<T, P> mat2x4_cast\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::tmat2x4<T, P>( x[0].x, x[0].y, x[0].z, x[0].w, x[1].x, x[1].y, x[1].z, x[1].w );\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x4<T, P> mat3x4_cast\r\n\t(\r\n\t\tdetail::tdualquat<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tdetail::tquat<T, P> r = x.real / length2(x.real);\r\n\t\t\r\n\t\tdetail::tquat<T, P> const rr(r.w * x.real.w, r.x * x.real.x, r.y * x.real.y, r.z * x.real.z);\r\n\t\tr *= static_cast<T>(2);\r\n\t\t\r\n\t\tT const xy = r.x * x.real.y;\r\n\t\tT const xz = r.x * x.real.z;\r\n\t\tT const yz = r.y * x.real.z;\r\n\t\tT const wx = r.w * x.real.x;\r\n\t\tT const wy = r.w * x.real.y;\r\n\t\tT const wz = r.w * x.real.z;\r\n\t\t\r\n\t\tdetail::tvec4<T, P> const a(\r\n\t\t\trr.w + rr.x - rr.y - rr.z,\r\n\t\t\txy - wz,\r\n\t\t\txz + wy,\r\n\t\t\t-(x.dual.w * r.x - x.dual.x * r.w + x.dual.y * r.z - x.dual.z * r.y));\r\n\t\t\r\n\t\tdetail::tvec4<T, P> const b(\r\n\t\t\txy + wz,\r\n\t\t\trr.w + rr.y - rr.x - rr.z,\r\n\t\t\tyz - wx,\r\n\t\t\t-(x.dual.w * r.y - x.dual.x * r.z - x.dual.y * r.w + x.dual.z * r.x));\r\n\t\t\r\n\t\tdetail::tvec4<T, P> const c(\r\n\t\t\txz - wy,\r\n\t\t\tyz + wx,\r\n\t\t\trr.w + rr.z - rr.x - rr.y,\r\n\t\t\t-(x.dual.w * r.z + x.dual.x * r.y - x.dual.y * r.x - x.dual.z * r.w));\r\n\t\t\r\n\t\treturn detail::tmat3x4<T, P>(a, b, c);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tdualquat<T, P> dualquat_cast\r\n\t(\r\n\t\tdetail::tmat2x4<T, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::tdualquat<T, P>(\r\n\t\t\tdetail::tquat<T, P>( x[0].w, x[0].x, x[0].y, x[0].z ),\r\n\t\t\tdetail::tquat<T, P>( x[1].w, x[1].x, x[1].y, x[1].z ));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tdualquat<T, P> dualquat_cast\r\n\t(\r\n\t\tdetail::tmat3x4<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tdetail::tquat<T, P> real;\r\n\t\t\r\n\t\tT const trace = x[0].x + x[1].y + x[2].z;\r\n\t\tif(trace > T(0))\r\n\t\t{\r\n\t\t\tT const r = sqrt(T(1) + trace);\r\n\t\t\tT const invr = static_cast<T>(0.5) / r;\r\n\t\t\treal.w = static_cast<T>(0.5) * r;\r\n\t\t\treal.x = (x[2].y - x[1].z) * invr;\r\n\t\t\treal.y = (x[0].z - x[2].x) * invr;\r\n\t\t\treal.z = (x[1].x - x[0].y) * invr;\r\n\t\t}\r\n\t\telse if(x[0].x > x[1].y && x[0].x > x[2].z)\r\n\t\t{\r\n\t\t\tT const r = sqrt(T(1) + x[0].x - x[1].y - x[2].z);\r\n\t\t\tT const invr = static_cast<T>(0.5) / r;\r\n\t\t\treal.x = static_cast<T>(0.5)*r;\r\n\t\t\treal.y = (x[1].x + x[0].y) * invr;\r\n\t\t\treal.z = (x[0].z + x[2].x) * invr;\r\n\t\t\treal.w = (x[2].y - x[1].z) * invr;\r\n\t\t}\r\n\t\telse if(x[1].y > x[2].z)\r\n\t\t{\r\n\t\t\tT const r = sqrt(T(1) + x[1].y - x[0].x - x[2].z);\r\n\t\t\tT const invr = static_cast<T>(0.5) / r;\r\n\t\t\treal.x = (x[1].x + x[0].y) * invr;\r\n\t\t\treal.y = static_cast<T>(0.5) * r;\r\n\t\t\treal.z = (x[2].y + x[1].z) * invr;\r\n\t\t\treal.w = (x[0].z - x[2].x) * invr;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tT const r = sqrt(T(1) + x[2].z - x[0].x - x[1].y);\r\n\t\t\tT const invr = static_cast<T>(0.5) / r;\r\n\t\t\treal.x = (x[0].z + x[2].x) * invr;\r\n\t\t\treal.y = (x[2].y + x[1].z) * invr;\r\n\t\t\treal.z = static_cast<T>(0.5) * r;\r\n\t\t\treal.w = (x[1].x - x[0].y) * invr;\r\n\t\t}\r\n\t\t\r\n\t\tdetail::tquat<T, P> dual;\r\n\t\tdual.x =  T(0.5) * ( x[0].w * real.w + x[1].w * real.z - x[2].w * real.y);\r\n\t\tdual.y =  T(0.5) * (-x[0].w * real.z + x[1].w * real.w + x[2].w * real.x);\r\n\t\tdual.z =  T(0.5) * ( x[0].w * real.y - x[1].w * real.x + x[2].w * real.w);\r\n\t\tdual.w = -T(0.5) * ( x[0].w * real.x + x[1].w * real.y + x[2].w * real.z);\r\n\t\treturn detail::tdualquat<T, P>(real, dual);\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/epsilon.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#if(defined(GLM_MESSAGES))\r\n#\tpragma message(\"GLM: GLM_GTX_epsilon extension is deprecated, include GLM_GTC_epsilon (glm/gtc/epsilon) instead\")\r\n#endif\r\n\r\n// Promoted:\r\n#include \"../gtc/epsilon.hpp\"\r\n"
  },
  {
    "path": "gpu/glm/gtx/euler_angles.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_euler_angles\r\n/// @file glm/gtx/euler_angles.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_half_float (dependence)\r\n///\r\n/// @defgroup gtx_euler_angles GLM_GTX_euler_angles\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Build matrices from Euler angles.\r\n/// \r\n/// <glm/gtx/euler_angles.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_euler_angles\r\n#define GLM_GTX_euler_angles\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_euler_angles extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_euler_angles\r\n\t/// @{\r\n\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X.\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat4x4<T, defaultp> eulerAngleX(\r\n\t\tT const & angleX);\r\n\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y.\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat4x4<T, defaultp> eulerAngleY(\r\n\t\tT const & angleY);\r\n\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z.\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat4x4<T, defaultp> eulerAngleZ(\r\n\t\tT const & angleZ);\r\n\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y).\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat4x4<T, defaultp> eulerAngleXY(\r\n\t\tT const & angleX,\r\n\t\tT const & angleY);\r\n\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X).\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat4x4<T, defaultp> eulerAngleYX(\r\n\t\tT const & angleY,\r\n\t\tT const & angleX);\r\n\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z).\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat4x4<T, defaultp> eulerAngleXZ(\r\n\t\tT const & angleX,\r\n\t\tT const & angleZ);\r\n\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X).\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat4x4<T, defaultp> eulerAngleZX(\r\n\t\tT const & angle,\r\n\t\tT const & angleX);\r\n\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z).\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat4x4<T, defaultp> eulerAngleYZ(\r\n\t\tT const & angleY,\r\n\t\tT const & angleZ);\r\n\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y).\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat4x4<T, defaultp> eulerAngleZY(\r\n\t\tT const & angleZ,\r\n\t\tT const & angleY);\r\n\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat4x4<T, defaultp> eulerAngleYXZ(\r\n\t\tT const & yaw,\r\n\t\tT const & pitch,\r\n\t\tT const & roll);\r\n\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat4x4<T, defaultp> yawPitchRoll(\r\n\t\tT const & yaw,\r\n\t\tT const & pitch,\r\n\t\tT const & roll);\r\n\r\n\t/// Creates a 2D 2 * 2 rotation matrix from an euler angle.\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat2x2<T, defaultp> orientate2(T const & angle);\r\n\r\n\t/// Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle.\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T>\r\n\tdetail::tmat3x3<T, defaultp> orientate3(T const & angle);\r\n\r\n\t/// Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z). \r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> orientate3(detail::tvec3<T, P> const & angles);\r\n\t\t\r\n\t/// Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z).\r\n\t/// @see gtx_euler_angles\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> orientate4(detail::tvec3<T, P> const & angles);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"euler_angles.inl\"\r\n\r\n#endif//GLM_GTX_euler_angles\r\n"
  },
  {
    "path": "gpu/glm/gtx/euler_angles.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2007-08-14\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/euler_angles.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> eulerAngleX\r\n\t(\r\n\t\tT const & angleX\r\n\t)\r\n\t{\r\n\t\tT cosX = glm::cos(angleX);\r\n\t\tT sinX = glm::sin(angleX);\r\n\t\r\n\t\treturn detail::tmat4x4<T, defaultp>(\r\n\t\t\tT(1), T(0), T(0), T(0),\r\n\t\t\tT(0), cosX, sinX, T(0),\r\n\t\t\tT(0),-sinX, cosX, T(0),\r\n\t\t\tT(0), T(0), T(0), T(1));\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> eulerAngleY\r\n\t(\r\n\t\tT const & angleY\r\n\t)\r\n\t{\r\n\t\tT cosY = glm::cos(angleY);\r\n\t\tT sinY = glm::sin(angleY);\r\n\r\n\t\treturn detail::tmat4x4<T, defaultp>(\r\n\t\t\tcosY,\tT(0),\t-sinY,\tT(0),\r\n\t\t\tT(0),\tT(1),\tT(0),\tT(0),\r\n\t\t\tsinY,\tT(0),\tcosY,\tT(0),\r\n\t\t\tT(0),\tT(0),\tT(0),\tT(1));\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> eulerAngleZ\r\n\t(\r\n\t\tT const & angleZ\r\n\t)\r\n\t{\r\n\t\tT cosZ = glm::cos(angleZ);\r\n\t\tT sinZ = glm::sin(angleZ);\r\n\r\n\t\treturn detail::tmat4x4<T, defaultp>(\r\n\t\t\tcosZ,\tsinZ,\tT(0), T(0),\r\n\t\t\t-sinZ,\tcosZ,\tT(0), T(0),\r\n\t\t\tT(0),\tT(0),\tT(1), T(0),\r\n\t\t\tT(0),\tT(0),\tT(0), T(1));\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> eulerAngleXY\r\n\t(\r\n\t\tT const & angleX,\r\n\t\tT const & angleY\r\n\t)\r\n\t{\r\n\t\tT cosX = glm::cos(angleX);\r\n\t\tT sinX = glm::sin(angleX);\r\n\t\tT cosY = glm::cos(angleY);\r\n\t\tT sinY = glm::sin(angleY);\r\n\r\n\t\treturn detail::tmat4x4<T, defaultp>(\r\n\t\t\tcosY,\t-sinX * sinY,\tcosX * sinY,\tT(0),\r\n\t\t\tT(0),\tcosX,\t\t\tsinX,\t\t\tT(0),\r\n\t\t\t-sinY,\t-sinX * cosY,\tcosX * cosY,\tT(0),\r\n\t\t\tT(0),\tT(0),\t\t\tT(0),\t\t\tT(1));\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> eulerAngleYX\r\n\t(\r\n\t\tT const & angleY,\r\n\t\tT const & angleX\r\n\t)\r\n\t{\r\n\t\tT cosX = glm::cos(angleX);\r\n\t\tT sinX = glm::sin(angleX);\r\n\t\tT cosY = glm::cos(angleY);\r\n\t\tT sinY = glm::sin(angleY);\r\n\r\n\t\treturn detail::tmat4x4<T, defaultp>(\r\n\t\t\tcosY,\t\t\tT(0),\t\tsinY,\t\t\tT(0),\r\n\t\t\t-sinX * sinY,\tcosX,\t\tsinX * cosY,\tT(0),\r\n\t\t\t-cosX * sinY,\t-sinX,\t\tcosX * cosY,\tT(0),\r\n\t\t\tT(0),\t\t\tT(0),\t\tT(0),\t\t\tT(1));\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> eulerAngleXZ\r\n\t(\r\n\t\tT const & angleX,\r\n\t\tT const & angleZ\r\n\t)\r\n\t{\r\n\t\treturn eulerAngleX(angleX) * eulerAngleZ(angleZ);\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> eulerAngleZX\r\n\t(\r\n\t\tT const & angleZ,\r\n\t\tT const & angleX\r\n\t)\r\n\t{\r\n\t\treturn eulerAngleZ(angleZ) * eulerAngleX(angleX);\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> eulerAngleYXZ\r\n\t(\r\n\t\tT const & yaw,\r\n\t\tT const & pitch,\r\n\t\tT const & roll\r\n\t)\r\n\t{\r\n\t\tT tmp_ch = glm::cos(yaw);\r\n\t\tT tmp_sh = glm::sin(yaw);\r\n\t\tT tmp_cp = glm::cos(pitch);\r\n\t\tT tmp_sp = glm::sin(pitch);\r\n\t\tT tmp_cb = glm::cos(roll);\r\n\t\tT tmp_sb = glm::sin(roll);\r\n\r\n\t\tdetail::tmat4x4<T, defaultp> Result;\r\n\t\tResult[0][0] = tmp_ch * tmp_cb + tmp_sh * tmp_sp * tmp_sb;\r\n\t\tResult[0][1] = tmp_sb * tmp_cp;\r\n\t\tResult[0][2] = -tmp_sh * tmp_cb + tmp_ch * tmp_sp * tmp_sb;\r\n\t\tResult[0][3] = static_cast<T>(0);\r\n\t\tResult[1][0] = -tmp_ch * tmp_sb + tmp_sh * tmp_sp * tmp_cb;\r\n\t\tResult[1][1] = tmp_cb * tmp_cp;\r\n\t\tResult[1][2] = tmp_sb * tmp_sh + tmp_ch * tmp_sp * tmp_cb;\r\n\t\tResult[1][3] = static_cast<T>(0);\r\n\t\tResult[2][0] = tmp_sh * tmp_cp;\r\n\t\tResult[2][1] = -tmp_sp;\r\n\t\tResult[2][2] = tmp_ch * tmp_cp;\r\n\t\tResult[2][3] = static_cast<T>(0);\r\n\t\tResult[3][0] = static_cast<T>(0);\r\n\t\tResult[3][1] = static_cast<T>(0);\r\n\t\tResult[3][2] = static_cast<T>(0);\r\n\t\tResult[3][3] = static_cast<T>(1);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> yawPitchRoll\r\n\t(\r\n\t\tT const & yaw,\r\n\t\tT const & pitch,\r\n\t\tT const & roll\r\n\t)\r\n\t{\r\n\t\tT tmp_ch = glm::cos(yaw);\r\n\t\tT tmp_sh = glm::sin(yaw);\r\n\t\tT tmp_cp = glm::cos(pitch);\r\n\t\tT tmp_sp = glm::sin(pitch);\r\n\t\tT tmp_cb = glm::cos(roll);\r\n\t\tT tmp_sb = glm::sin(roll);\r\n\r\n\t\tdetail::tmat4x4<T, defaultp> Result;\r\n\t\tResult[0][0] = tmp_ch * tmp_cb + tmp_sh * tmp_sp * tmp_sb;\r\n\t\tResult[0][1] = tmp_sb * tmp_cp;\r\n\t\tResult[0][2] = -tmp_sh * tmp_cb + tmp_ch * tmp_sp * tmp_sb;\r\n\t\tResult[0][3] = static_cast<T>(0);\r\n\t\tResult[1][0] = -tmp_ch * tmp_sb + tmp_sh * tmp_sp * tmp_cb;\r\n\t\tResult[1][1] = tmp_cb * tmp_cp;\r\n\t\tResult[1][2] = tmp_sb * tmp_sh + tmp_ch * tmp_sp * tmp_cb;\r\n\t\tResult[1][3] = static_cast<T>(0);\r\n\t\tResult[2][0] = tmp_sh * tmp_cp;\r\n\t\tResult[2][1] = -tmp_sp;\r\n\t\tResult[2][2] = tmp_ch * tmp_cp;\r\n\t\tResult[2][3] = static_cast<T>(0);\r\n\t\tResult[3][0] = static_cast<T>(0);\r\n\t\tResult[3][1] = static_cast<T>(0);\r\n\t\tResult[3][2] = static_cast<T>(0);\r\n\t\tResult[3][3] = static_cast<T>(1);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat2x2<T, defaultp> orientate2\r\n\t(\r\n\t\tT const & angle\r\n\t)\r\n\t{\r\n\t\tT c = glm::cos(angle);\r\n\t\tT s = glm::sin(angle);\r\n\r\n\t\tdetail::tmat2x2<T, defaultp> Result;\r\n\t\tResult[0][0] = c;\r\n\t\tResult[0][1] = s;\r\n\t\tResult[1][0] = -s;\r\n\t\tResult[1][1] = c;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, defaultp> orientate3\r\n\t(\r\n\t\tT const & angle\r\n\t)\r\n\t{\r\n\t\tT c = glm::cos(angle);\r\n\t\tT s = glm::sin(angle);\r\n\r\n\t\tdetail::tmat3x3<T, defaultp> Result;\r\n\t\tResult[0][0] = c;\r\n\t\tResult[0][1] = s;\r\n\t\tResult[0][2] = 0.0f;\r\n\t\tResult[1][0] = -s;\r\n\t\tResult[1][1] = c;\r\n\t\tResult[1][2] = 0.0f;\r\n\t\tResult[2][0] = 0.0f;\r\n\t\tResult[2][1] = 0.0f;\r\n\t\tResult[2][2] = 1.0f;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> orientate3\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & angles\r\n\t)\r\n\t{\r\n\t\treturn detail::tmat3x3<T, P>(yawPitchRoll(angles.x, angles.y, angles.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> orientate4\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & angles\r\n\t)\r\n\t{\r\n\t\treturn yawPitchRoll(angles.z, angles.x, angles.y);\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/extend.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_extend\r\n/// @file glm/gtx/extend.hpp\r\n/// @date 2006-01-07 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_extend GLM_GTX_extend\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Extend a position from a source to a position at a defined length.\r\n/// \r\n/// <glm/gtx/extend.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_extend\r\n#define GLM_GTX_extend\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_extend extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_extend\r\n\t/// @{\r\n\r\n\t/// Extends of Length the Origin position using the (Source - Origin) direction.\r\n\t/// @see gtx_extend\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType extend(\r\n\t\tgenType const & Origin, \r\n\t\tgenType const & Source, \r\n\t\ttypename genType::value_type const Length);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"extend.inl\"\r\n\r\n#endif//GLM_GTX_extend\r\n"
  },
  {
    "path": "gpu/glm/gtx/extend.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2006-01-07\r\n// Updated : 2008-10-05\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/extend.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType extend\r\n\t(\r\n\t\tgenType const & Origin, \r\n\t\tgenType const & Source, \r\n\t\tgenType const & Distance\r\n\t)\r\n\t{\r\n\t\treturn Origin + (Source - Origin) * Distance;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> extend\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & Origin,\r\n\t\tdetail::tvec2<T, P> const & Source,\r\n\t\tT const & Distance\r\n\t)\r\n\t{\r\n\t\treturn Origin + (Source - Origin) * Distance;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> extend\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & Origin,\r\n\t\tdetail::tvec3<T, P> const & Source,\r\n\t\tT const & Distance\r\n\t)\r\n\t{\r\n\t\treturn Origin + (Source - Origin) * Distance;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> extend\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & Origin,\r\n\t\tdetail::tvec4<T, P> const & Source,\r\n\t\tT const & Distance\r\n\t)\r\n\t{\r\n\t\treturn Origin + (Source - Origin) * Distance;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/extented_min_max.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_extented_min_max\r\n/// @file glm/gtx/extented_min_max.hpp\r\n/// @date 2007-03-14 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_half_float (dependence)\r\n///\r\n/// @defgroup gtx_extented_min_max GLM_GTX_extented_min_max\r\n/// @ingroup gtx\r\n/// \r\n/// Min and max functions for 3 to 4 parameters.\r\n/// \r\n/// <glm/gtx/extented_min_max.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_extented_min_max\r\n#define GLM_GTX_extented_min_max\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_extented_min_max extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_extented_min_max\r\n\t/// @{\r\n\r\n\t/// Return the minimum component-wise values of 3 inputs \r\n\t/// @see gtx_extented_min_max\r\n\ttemplate <typename T>\r\n\tT min(\r\n\t\tT const & x, \r\n\t\tT const & y, \r\n\t\tT const & z);\r\n\r\n\t/// Return the minimum component-wise values of 3 inputs\r\n\t/// @see gtx_extented_min_max\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tC<T> min(\r\n\t\tC<T> const & x, \r\n\t\ttypename C<T>::T const & y, \r\n\t\ttypename C<T>::T const & z);\r\n\r\n\t/// Return the minimum component-wise values of 3 inputs \r\n\t/// @see gtx_extented_min_max\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tC<T> min(\r\n\t\tC<T> const & x, \r\n\t\tC<T> const & y, \r\n\t\tC<T> const & z);\r\n\r\n\t/// Return the minimum component-wise values of 4 inputs \r\n\t/// @see gtx_extented_min_max\r\n\ttemplate <typename T>\r\n\tT min(\r\n\t\tT const & x, \r\n\t\tT const & y, \r\n\t\tT const & z, \r\n\t\tT const & w);\r\n\r\n\t/// Return the minimum component-wise values of 4 inputs \r\n\t/// @see gtx_extented_min_max\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tC<T> min(\r\n\t\tC<T> const & x, \r\n\t\ttypename C<T>::T const & y, \r\n\t\ttypename C<T>::T const & z, \r\n\t\ttypename C<T>::T const & w);\r\n\r\n\t/// Return the minimum component-wise values of 4 inputs\r\n\t/// @see gtx_extented_min_max\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tC<T> min(\r\n\t\tC<T> const & x, \r\n\t\tC<T> const & y, \r\n\t\tC<T> const & z,\r\n\t\tC<T> const & w);\r\n\r\n\t/// Return the maximum component-wise values of 3 inputs \r\n\t/// @see gtx_extented_min_max\r\n\ttemplate <typename T>\r\n\tT max(\r\n\t\tT const & x, \r\n\t\tT const & y, \r\n\t\tT const & z);\r\n\r\n\t/// Return the maximum component-wise values of 3 inputs\r\n\t/// @see gtx_extented_min_max\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tC<T> max(\r\n\t\tC<T> const & x, \r\n\t\ttypename C<T>::T const & y, \r\n\t\ttypename C<T>::T const & z);\r\n\r\n\t/// Return the maximum component-wise values of 3 inputs \r\n\t/// @see gtx_extented_min_max\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tC<T> max(\r\n\t\tC<T> const & x, \r\n\t\tC<T> const & y, \r\n\t\tC<T> const & z);\r\n\r\n\t/// Return the maximum component-wise values of 4 inputs\r\n\t/// @see gtx_extented_min_max\r\n\ttemplate <typename T>\r\n\tT max(\r\n\t\tT const & x, \r\n\t\tT const & y, \r\n\t\tT const & z, \r\n\t\tT const & w);\r\n\r\n\t/// Return the maximum component-wise values of 4 inputs \r\n\t/// @see gtx_extented_min_max\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tC<T> max(\r\n\t\tC<T> const & x, \r\n\t\ttypename C<T>::T const & y, \r\n\t\ttypename C<T>::T const & z, \r\n\t\ttypename C<T>::T const & w);\r\n\r\n\t/// Return the maximum component-wise values of 4 inputs \r\n\t/// @see gtx_extented_min_max\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tC<T> max(\r\n\t\tC<T> const & x, \r\n\t\tC<T> const & y, \r\n\t\tC<T> const & z, \r\n\t\tC<T> const & w);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"extented_min_max.inl\"\r\n\r\n#endif//GLM_GTX_extented_min_max\r\n"
  },
  {
    "path": "gpu/glm/gtx/extented_min_max.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-03-14\r\n// Updated : 2010-02-19\r\n// Licence : This source is under MIT License\r\n// File    : gtx_extented_min_max.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T min(\r\n\t\tT const & x, \r\n\t\tT const & y, \r\n\t\tT const & z)\r\n\t{\r\n\t\treturn glm::min(glm::min(x, y), z);\r\n\t}\r\n\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tGLM_FUNC_QUALIFIER C<T> min\r\n\t(\r\n\t\tC<T> const & x, \r\n\t\ttypename C<T>::T const & y, \r\n\t\ttypename C<T>::T const & z\r\n\t)\r\n\t{\r\n\t\treturn glm::min(glm::min(x, y), z);\r\n\t}\r\n\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tGLM_FUNC_QUALIFIER C<T> min\r\n\t(\r\n\t\tC<T> const & x, \r\n\t\tC<T> const & y, \r\n\t\tC<T> const & z\r\n\t)\r\n\t{\r\n\t\treturn glm::min(glm::min(x, y), z);\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T min\r\n\t(\r\n\t\tT const & x, \r\n\t\tT const & y, \r\n\t\tT const & z, \r\n\t\tT const & w\r\n\t)\r\n\t{\r\n\t\treturn glm::min(glm::min(x, y), glm::min(z, w));\r\n\t}\r\n\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tGLM_FUNC_QUALIFIER C<T> min\r\n\t(\r\n\t\tC<T> const & x, \r\n\t\ttypename C<T>::T const & y, \r\n\t\ttypename C<T>::T const & z, \r\n\t\ttypename C<T>::T const & w\r\n\t)\r\n\t{\r\n\t\treturn glm::min(glm::min(x, y), glm::min(z, w));\r\n\t}\r\n\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tGLM_FUNC_QUALIFIER C<T> min\r\n\t(\r\n\t\tC<T> const & x, \r\n\t\tC<T> const & y, \r\n\t\tC<T> const & z, \r\n\t\tC<T> const & w\r\n\t)\r\n\t{\r\n\t\treturn glm::min(glm::min(x, y), glm::min(z, w));\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T max(\r\n\t\tT const & x, \r\n\t\tT const & y, \r\n\t\tT const & z)\r\n\t{\r\n\t\treturn glm::max(glm::max(x, y), z);\r\n\t}\r\n\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tGLM_FUNC_QUALIFIER C<T> max\r\n\t(\r\n\t\tC<T> const & x, \r\n\t\ttypename C<T>::T const & y, \r\n\t\ttypename C<T>::T const & z\r\n\t)\r\n\t{\r\n\t\treturn glm::max(glm::max(x, y), z);\r\n\t}\r\n\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tGLM_FUNC_QUALIFIER C<T> max\r\n\t(\r\n\t\tC<T> const & x, \r\n\t\tC<T> const & y, \r\n\t\tC<T> const & z\r\n\t)\r\n\t{\r\n\t\treturn glm::max(glm::max(x, y), z);\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T max\r\n\t(\r\n\t\tT const & x, \r\n\t\tT const & y, \r\n\t\tT const & z, \r\n\t\tT const & w\r\n\t)\r\n\t{\r\n\t\treturn glm::max(glm::max(x, y), glm::max(z, w));\r\n\t}\r\n\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tGLM_FUNC_QUALIFIER C<T> max\r\n\t(\r\n\t\tC<T> const & x, \r\n\t\ttypename C<T>::T const & y, \r\n\t\ttypename C<T>::T const & z, \r\n\t\ttypename C<T>::T const & w\r\n\t)\r\n\t{\r\n\t\treturn glm::max(glm::max(x, y), glm::max(z, w));\r\n\t}\r\n\r\n\ttemplate \r\n\t<\r\n\t\ttypename T, \r\n\t\ttemplate <typename> class C\r\n\t>\r\n\tGLM_FUNC_QUALIFIER C<T> max\r\n\t(\r\n\t\tC<T> const & x, \r\n\t\tC<T> const & y, \r\n\t\tC<T> const & z, \r\n\t\tC<T> const & w\r\n\t)\r\n\t{\r\n\t\treturn glm::max(glm::max(x, y), glm::max(z, w));\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/fast_exponential.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_fast_exponential\r\n/// @file glm/gtx/fast_exponential.hpp\r\n/// @date 2006-01-09 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_half_float (dependence)\r\n///\r\n/// @defgroup gtx_fast_exponential GLM_GTX_fast_exponential\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Fast but less accurate implementations of exponential based functions.\r\n/// \r\n/// <glm/gtx/fast_exponential.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_fast_exponential\r\n#define GLM_GTX_fast_exponential\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_fast_exponential extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_fast_exponential\r\n\t/// @{\r\n\r\n\t/// Faster than the common pow function but less accurate.\r\n\t/// @see gtx_fast_exponential\r\n\ttemplate <typename genType> \r\n\tgenType fastPow(\r\n\t\tgenType const & x, \r\n\t\tgenType const & y);\r\n\r\n\t/// Faster than the common pow function but less accurate.\r\n\t/// @see gtx_fast_exponential\r\n\ttemplate <typename genTypeT, typename genTypeU> \r\n\tgenTypeT fastPow(\r\n\t\tgenTypeT const & x, \r\n\t\tgenTypeU const & y);\r\n\t\t\r\n\t/// Faster than the common exp function but less accurate.\r\n\t/// @see gtx_fast_exponential\r\n\ttemplate <typename T> \r\n\tT fastExp(const T& x);\r\n\t\t\r\n\t/// Faster than the common log function but less accurate.\r\n\t/// @see gtx_fast_exponential\r\n\ttemplate <typename T> \r\n\tT fastLog(const T& x);\r\n\r\n\t/// Faster than the common exp2 function but less accurate.\r\n\t/// @see gtx_fast_exponential\r\n\ttemplate <typename T> \r\n\tT fastExp2(const T& x);\r\n\t\t\r\n\t/// Faster than the common log2 function but less accurate.\r\n\t/// @see gtx_fast_exponential\r\n\ttemplate <typename T> \r\n\tT fastLog2(const T& x);\r\n\r\n\t/// Faster than the common ln function but less accurate.\r\n\t/// @see gtx_fast_exponential\r\n\ttemplate <typename T> \r\n\tT fastLn(const T& x);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"fast_exponential.inl\"\r\n\r\n#endif//GLM_GTX_fast_exponential\r\n"
  },
  {
    "path": "gpu/glm/gtx/fast_exponential.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2006-01-09\r\n// Updated : 2006-01-09\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/fast_exponential.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\t// fastPow:\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType fastPow(genType const & x, genType const & y)\r\n\t{\r\n\t\treturn exp(y * log(x));\r\n\t}\r\n\r\n\tVECTORIZE_VEC_VEC(fastPow)\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T fastPow(const T x, int y)\r\n\t{\r\n\t\tT f = static_cast<T>(1);\r\n\t\tfor(int i = 0; i < y; ++i)\r\n\t\t\tf *= x;\r\n\t\treturn f;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> fastPow(\r\n\t\tconst detail::tvec2<T, P>& x, \r\n\t\tconst detail::tvec2<int, P>& y)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tfastPow(x.x, y.x),\r\n\t\t\tfastPow(x.y, y.y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> fastPow(\r\n\t\tconst detail::tvec3<T, P>& x, \r\n\t\tconst detail::tvec3<int, P>& y)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tfastPow(x.x, y.x),\r\n\t\t\tfastPow(x.y, y.y),\r\n\t\t\tfastPow(x.z, y.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> fastPow(\r\n\t\tconst detail::tvec4<T, P>& x, \r\n\t\tconst detail::tvec4<int, P>& y)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tfastPow(x.x, y.x),\r\n\t\t\tfastPow(x.y, y.y),\r\n\t\t\tfastPow(x.z, y.z),\r\n\t\t\tfastPow(x.w, y.w));\r\n\t}\r\n\r\n\t// fastExp\r\n\t// Note: This function provides accurate results only for value between -1 and 1, else avoid it.\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T fastExp(const T x)\r\n\t{\r\n\t\t// This has a better looking and same performance in release mode than the following code. However, in debug mode it's slower.\r\n\t\t// return 1.0f + x * (1.0f + x * 0.5f * (1.0f + x * 0.3333333333f * (1.0f + x * 0.25 * (1.0f + x * 0.2f))));\r\n\t\tT x2 = x * x;\r\n\t\tT x3 = x2 * x;\r\n\t\tT x4 = x3 * x;\r\n\t\tT x5 = x4 * x;\r\n\t\treturn T(1) + x + (x2 * T(0.5)) + (x3 * T(0.1666666667)) + (x4 * T(0.041666667)) + (x5 * T(0.008333333333));\r\n\t}\r\n\t/*  // Try to handle all values of float... but often shower than std::exp, glm::floor and the loop kill the performance\r\n\tGLM_FUNC_QUALIFIER float fastExp(float x)\r\n\t{\r\n\t\tconst float e = 2.718281828f;\r\n\t\tconst float IntegerPart = floor(x);\r\n\t\tconst float FloatPart = x - IntegerPart;\r\n\t\tfloat z = 1.f;\r\n\r\n\t\tfor(int i = 0; i < int(IntegerPart); ++i)\r\n\t\t\tz *= e;\r\n\r\n\t\tconst float x2 = FloatPart * FloatPart;\r\n\t\tconst float x3 = x2 * FloatPart;\r\n\t\tconst float x4 = x3 * FloatPart;\r\n\t\tconst float x5 = x4 * FloatPart;\r\n\t\treturn z * (1.0f + FloatPart + (x2 * 0.5f) + (x3 * 0.1666666667f) + (x4 * 0.041666667f) + (x5 * 0.008333333333f));\r\n\t}\r\n\r\n\t// Increase accuracy on number bigger that 1 and smaller than -1 but it's not enough for high and negative numbers\r\n\tGLM_FUNC_QUALIFIER float fastExp(float x)\r\n\t{\r\n\t\t// This has a better looking and same performance in release mode than the following code. However, in debug mode it's slower.\r\n\t\t// return 1.0f + x * (1.0f + x * 0.5f * (1.0f + x * 0.3333333333f * (1.0f + x * 0.25 * (1.0f + x * 0.2f))));\r\n\t\tfloat x2 = x * x;\r\n\t\tfloat x3 = x2 * x;\r\n\t\tfloat x4 = x3 * x;\r\n\t\tfloat x5 = x4 * x;\r\n\t\tfloat x6 = x5 * x;\r\n\t\tfloat x7 = x6 * x;\r\n\t\tfloat x8 = x7 * x;\r\n\t\treturn 1.0f + x + (x2 * 0.5f) + (x3 * 0.1666666667f) + (x4 * 0.041666667f) + (x5 * 0.008333333333f)+ (x6 * 0.00138888888888f) + (x7 * 0.000198412698f) + (x8 * 0.0000248015873f);;\r\n\t}\r\n\t*/\r\n\r\n\tVECTORIZE_VEC(fastExp)\r\n\r\n\t// fastLog\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType fastLog(genType const & x)\r\n\t{\r\n\t\treturn std::log(x);\r\n\t}\r\n\r\n\t/* Slower than the VC7.1 function...\r\n\tGLM_FUNC_QUALIFIER float fastLog(float x)\r\n\t{\r\n\t\tfloat y1 = (x - 1.0f) / (x + 1.0f);\r\n\t\tfloat y2 = y1 * y1;\r\n\t\treturn 2.0f * y1 * (1.0f + y2 * (0.3333333333f + y2 * (0.2f + y2 * 0.1428571429f)));\r\n\t}\r\n\t*/\r\n\r\n\tVECTORIZE_VEC(fastLog)\r\n\r\n\t//fastExp2, ln2 = 0.69314718055994530941723212145818f\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType fastExp2(genType const & x)\r\n\t{\r\n\t\treturn fastExp(0.69314718055994530941723212145818f * x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(fastExp2)\r\n\r\n\t// fastLog2, ln2 = 0.69314718055994530941723212145818f\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType fastLog2(genType const & x)\r\n\t{\r\n\t\treturn fastLog(x) / 0.69314718055994530941723212145818f;\r\n\t}\r\n\r\n\tVECTORIZE_VEC(fastLog2)\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/fast_square_root.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_fast_square_root\r\n/// @file glm/gtx/fast_square_root.hpp\r\n/// @date 2006-01-04 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_fast_square_root GLM_GTX_fast_square_root\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Fast but less accurate implementations of square root based functions.\r\n/// - Sqrt optimisation based on Newton's method, \r\n/// www.gamedev.net/community/forums/topic.asp?topic id=139956\r\n/// \r\n/// <glm/gtx/fast_square_root.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_fast_square_root\r\n#define GLM_GTX_fast_square_root\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_fast_square_root extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_fast_square_root\r\n\t/// @{\r\n\r\n\t//! Faster than the common sqrt function but less accurate.\r\n\t//! From GLM_GTX_fast_square_root extension.\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType fastSqrt(genType const & x);\r\n\r\n\t//! Faster than the common inversesqrt function but less accurate.\r\n\t//! From GLM_GTX_fast_square_root extension.\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType fastInverseSqrt(genType const & x);\r\n\r\n\t//! Faster than the common inversesqrt function but less accurate.\r\n\t//! From GLM_GTX_fast_square_root extension.\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_DECL vecType<T, P> fastInverseSqrt(vecType<T, P> const & x);\r\n\r\n\t//! Faster than the common length function but less accurate.\r\n\t//! From GLM_GTX_fast_square_root extension.\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL typename genType::value_type fastLength(genType const & x);\r\n\r\n\t//! Faster than the common distance function but less accurate.\r\n\t//! From GLM_GTX_fast_square_root extension.\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL typename genType::value_type fastDistance(genType const & x, genType const & y);\r\n\r\n\t//! Faster than the common normalize function but less accurate.\r\n\t//! From GLM_GTX_fast_square_root extension.\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType fastNormalize(genType const & x);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"fast_square_root.inl\"\r\n\r\n#endif//GLM_GTX_fast_square_root\r\n"
  },
  {
    "path": "gpu/glm/gtx/fast_square_root.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2006-01-04\r\n// Updated : 2011-10-14\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/fast_square_root.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\t// fastSqrt\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType fastSqrt\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'fastSqrt' only accept floating-point input\");\r\n\r\n\t\treturn genType(1) / fastInverseSqrt(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(fastSqrt)\r\n\r\n\t// fastInversesqrt\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER float fastInverseSqrt<float>(float const & x)\r\n\t{\r\n\t\treturn detail::compute_inversesqrt<detail::tvec1, float, lowp>::call(detail::tvec1<float, lowp>(x)).x;\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER double fastInverseSqrt<double>(double const & x)\r\n\t{\r\n\t\treturn detail::compute_inversesqrt<detail::tvec1, double, lowp>::call(detail::tvec1<double, lowp>(x)).x;\r\n\t}\r\n\r\n\ttemplate <template <class, precision> class vecType, typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER vecType<T, P> fastInverseSqrt\r\n\t(\r\n\t\tvecType<T, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::compute_inversesqrt<vecType, T, P>::call(x);\r\n\t}\r\n\r\n\tVECTORIZE_VEC(fastInverseSqrt)\r\n\r\n\t// fastLength\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType fastLength\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\treturn abs(x);\r\n\t}\r\n\r\n\ttemplate <typename valType, precision P>\r\n\tGLM_FUNC_QUALIFIER valType fastLength\r\n\t(\r\n\t\tdetail::tvec2<valType, P> const & x\r\n\t)\r\n\t{\r\n\t\tvalType sqr = x.x * x.x + x.y * x.y;\r\n\t\treturn fastSqrt(sqr);\r\n\t}\r\n\r\n\ttemplate <typename valType, precision P>\r\n\tGLM_FUNC_QUALIFIER valType fastLength\r\n\t(\r\n\t\tdetail::tvec3<valType, P> const & x\r\n\t)\r\n\t{\r\n\t\tvalType sqr = x.x * x.x + x.y * x.y + x.z * x.z;\r\n\t\treturn fastSqrt(sqr);\r\n\t}\r\n\r\n\ttemplate <typename valType, precision P>\r\n\tGLM_FUNC_QUALIFIER valType fastLength\r\n\t(\r\n\t\tdetail::tvec4<valType, P> const & x\r\n\t)\r\n\t{\r\n\t\tvalType sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w;\r\n\t\treturn fastSqrt(sqr);\r\n\t}\r\n\r\n\t// fastDistance\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType fastDistance\r\n\t(\r\n\t\tgenType const & x, \r\n\t\tgenType const & y\r\n\t)\r\n\t{\r\n\t\treturn fastLength(y - x);\r\n\t}\r\n\r\n\t// fastNormalize\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType fastNormalize\r\n\t(\r\n\t\tgenType const & x\r\n\t)\r\n\t{\r\n\t\treturn x > genType(0) ? genType(1) : -genType(1);\r\n\t}\r\n\r\n\ttemplate <typename valType, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<valType, P> fastNormalize\r\n\t(\r\n\t\tdetail::tvec2<valType, P> const & x\r\n\t)\r\n\t{\r\n\t\tvalType sqr = x.x * x.x + x.y * x.y;\r\n\t\treturn x * fastInverseSqrt(sqr);\r\n\t}\r\n\r\n\ttemplate <typename valType, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<valType, P> fastNormalize\r\n\t(\r\n\t\tdetail::tvec3<valType, P> const & x\r\n\t)\r\n\t{\r\n\t\tvalType sqr = x.x * x.x + x.y * x.y + x.z * x.z;\r\n\t\treturn x * fastInverseSqrt(sqr);\r\n\t}\r\n\r\n\ttemplate <typename valType, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<valType, P> fastNormalize\r\n\t(\r\n\t\tdetail::tvec4<valType, P> const & x\r\n\t)\r\n\t{\r\n\t\tvalType sqr = x.x * x.x + x.y * x.y + x.z * x.z + x.w * x.w;\r\n\t\treturn x * fastInverseSqrt(sqr);\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/fast_trigonometry.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_fast_trigonometry\r\n/// @file glm/gtx/fast_trigonometry.hpp\r\n/// @date 2006-01-08 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_fast_trigonometry GLM_GTX_fast_trigonometry\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Fast but less accurate implementations of trigonometric functions.\r\n/// \r\n/// <glm/gtx/fast_trigonometry.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_fast_trigonometry\r\n#define GLM_GTX_fast_trigonometry\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_fast_trigonometry extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_fast_trigonometry\r\n\t/// @{\r\n\r\n\t//! Faster than the common sin function but less accurate. \r\n\t//! Defined between -2pi and 2pi. \r\n\t//! From GLM_GTX_fast_trigonometry extension.\r\n    template <typename T> \r\n\tT fastSin(const T& angle);\r\n\r\n    //! Faster than the common cos function but less accurate.\r\n\t//! Defined between -2pi and 2pi.\r\n\t//! From GLM_GTX_fast_trigonometry extension.\r\n\ttemplate <typename T> \r\n\tT fastCos(const T& angle);\r\n\r\n    //! Faster than the common tan function but less accurate. \r\n\t//! Defined between -2pi and 2pi. \r\n\t//! From GLM_GTX_fast_trigonometry extension.\r\n\ttemplate <typename T> \r\n\tT fastTan(const T& angle);\r\n\r\n    //! Faster than the common asin function but less accurate. \r\n\t//! Defined between -2pi and 2pi.\r\n\t//! From GLM_GTX_fast_trigonometry extension.\r\n\ttemplate <typename T> \r\n\tT fastAsin(const T& angle);\r\n\r\n\t//! Faster than the common acos function but less accurate. \r\n\t//! Defined between -2pi and 2pi. \r\n\t//! From GLM_GTX_fast_trigonometry extension.\r\n    template <typename T> \r\n\tT fastAcos(const T& angle);\r\n\r\n\t//! Faster than the common atan function but less accurate.\r\n\t//! Defined between -2pi and 2pi. \r\n\t//! From GLM_GTX_fast_trigonometry extension.\r\n\ttemplate <typename T> \r\n\tT fastAtan(const T& y, const T& x);\r\n\r\n\t//! Faster than the common atan function but less accurate. \r\n\t//! Defined between -2pi and 2pi.\r\n\t//! From GLM_GTX_fast_trigonometry extension.\r\n    template <typename T> \r\n\tT fastAtan(const T& angle);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"fast_trigonometry.inl\"\r\n\r\n#endif//GLM_GTX_fast_trigonometry\r\n"
  },
  {
    "path": "gpu/glm/gtx/fast_trigonometry.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2006-01-08\r\n// Updated : 2011-10-14\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/fast_trigonometry.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\t// sin\r\n\ttemplate <typename T> \r\n\tGLM_FUNC_QUALIFIER T fastSin(T const & x)\r\n\t{\r\n\t\treturn x - ((x * x * x) / T(6)) + ((x * x * x * x * x) / T(120)) - ((x * x * x * x * x * x * x) / T(5040));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(fastSin)\r\n\r\n\t// cos\r\n\ttemplate <typename T> \r\n\tGLM_FUNC_QUALIFIER T fastCos(T const & x)\r\n\t{\r\n\t\treturn T(1) - (x * x * T(0.5)) + (x * x * x * x * T(0.041666666666)) - (x * x * x * x * x * x * T(0.00138888888888));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(fastCos)\r\n\r\n\t// tan\r\n\ttemplate <typename T> \r\n\tGLM_FUNC_QUALIFIER T fastTan(T const & x)\r\n\t{\r\n\t\treturn x + (x * x * x * T(0.3333333333)) + (x * x * x * x * x * T(0.1333333333333)) + (x * x * x * x * x * x * x * T(0.0539682539));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(fastTan)\r\n\r\n\t// asin\r\n\ttemplate <typename T> \r\n\tGLM_FUNC_QUALIFIER T fastAsin(T const & x)\r\n\t{\r\n\t\treturn x + (x * x * x * T(0.166666667)) + (x * x * x * x * x * T(0.075)) + (x * x * x * x * x * x * x * T(0.0446428571)) + (x * x * x * x * x * x * x * x * x * T(0.0303819444));// + (x * x * x * x * x * x * x * x * x * x * x * T(0.022372159));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(fastAsin)\r\n\r\n\t// acos\r\n\ttemplate <typename T> \r\n\tGLM_FUNC_QUALIFIER T fastAcos(T const & x)\r\n\t{\r\n\t\treturn T(1.5707963267948966192313216916398) - fastAsin(x); //(PI / 2)\r\n\t}\r\n\r\n\tVECTORIZE_VEC(fastAcos)\r\n\r\n\t// atan\r\n\ttemplate <typename T> \r\n\tGLM_FUNC_QUALIFIER T fastAtan(T const & y, T const & x)\r\n\t{\r\n\t\tT sgn = sign(y) * sign(x);\r\n\t\treturn abs(fastAtan(y / x)) * sgn;\r\n\t}\r\n\r\n\tVECTORIZE_VEC_VEC(fastAtan)\r\n\r\n\ttemplate <typename T> \r\n\tGLM_FUNC_QUALIFIER T fastAtan(T const & x)\r\n\t{\r\n\t\treturn x - (x * x * x * T(0.333333333333)) + (x * x * x * x * x * T(0.2)) - (x * x * x * x * x * x * x * T(0.1428571429)) + (x * x * x * x * x * x * x * x * x * T(0.111111111111)) - (x * x * x * x * x * x * x * x * x * x * x * T(0.0909090909));\r\n\t}\r\n\r\n\tVECTORIZE_VEC(fastAtan)\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/gradient_paint.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_gradient_paint\r\n/// @file glm/gtx/gradient_paint.hpp\r\n/// @date 2009-03-06 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_optimum_pow (dependence)\r\n///\r\n/// @defgroup gtx_gradient_paint GLM_GTX_gradient_paint\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Functions that return the color of procedural gradient for specific coordinates.\r\n/// <glm/gtx/gradient_paint.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_gradient_paint\r\n#define GLM_GTX_gradient_paint\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtx/optimum_pow.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_gradient_paint extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_gradient_paint\r\n\t/// @{\r\n\r\n\t/// Return a color from a radial gradient.\r\n\t/// @see - gtx_gradient_paint\r\n\ttemplate <typename T, precision P>\r\n\tT radialGradient(\r\n\t\tdetail::tvec2<T, P> const & Center,\r\n\t\tT const & Radius,\r\n\t\tdetail::tvec2<T, P> const & Focal,\r\n\t\tdetail::tvec2<T, P> const & Position);\r\n\r\n\t/// Return a color from a linear gradient.\r\n\t/// @see - gtx_gradient_paint\r\n\ttemplate <typename T, precision P>\r\n\tT linearGradient(\r\n\t\tdetail::tvec2<T, P> const & Point0,\r\n\t\tdetail::tvec2<T, P> const & Point1,\r\n\t\tdetail::tvec2<T, P> const & Position);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"gradient_paint.inl\"\r\n\r\n#endif//GLM_GTX_gradient_paint\r\n"
  },
  {
    "path": "gpu/glm/gtx/gradient_paint.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2009-03-06\r\n// Updated : 2013-04-09\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/gradient_paint.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tT radialGradient\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & Center,\r\n\t\tT const & Radius,\r\n\t\tdetail::tvec2<T, P> const & Focal,\r\n\t\tdetail::tvec2<T, P> const & Position\r\n\t)\r\n\t{\r\n\t\tdetail::tvec2<T, P> F = Focal - Center;\r\n\t\tdetail::tvec2<T, P> D = Position - Focal;\r\n\t\tT Radius2 = pow2(Radius);\r\n\t\tT Fx2 = pow2(F.x);\r\n\t\tT Fy2 = pow2(F.y);\r\n\r\n\t\tT Numerator = (D.x * F.x + D.y * F.y) + sqrt(Radius2 * (pow2(D.x) + pow2(D.y)) - pow2(D.x * F.y - D.y * F.x));\r\n\t\tT Denominator = Radius2 - (Fx2 + Fy2);\r\n\t\treturn Numerator / Denominator;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tT linearGradient\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & Point0,\r\n\t\tdetail::tvec2<T, P> const & Point1,\r\n\t\tdetail::tvec2<T, P> const & Position\r\n\t)\r\n\t{\r\n\t\tdetail::tvec2<T, P> Dist = Point1 - Point0;\r\n\t\treturn (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist);\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/handed_coordinate_space.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_handed_coordinate_space\r\n/// @file glm/gtx/handed_coordinate_space.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_handed_coordinate_space GLM_GTX_handed_coordinate_space\r\n/// @ingroup gtx\r\n/// \r\n/// @brief To know if a set of three basis vectors defines a right or left-handed coordinate system.\r\n/// \r\n/// <glm/gtx/handed_coordinate_system.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_handed_coordinate_space\r\n#define GLM_GTX_handed_coordinate_space\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_handed_coordinate_space extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_handed_coordinate_space\r\n\t/// @{\r\n\r\n\t//! Return if a trihedron right handed or not.\r\n\t//! From GLM_GTX_handed_coordinate_space extension.\r\n\ttemplate <typename T, precision P>\r\n\tbool rightHanded(\r\n\t\tdetail::tvec3<T, P> const & tangent,\r\n\t\tdetail::tvec3<T, P> const & binormal,\r\n\t\tdetail::tvec3<T, P> const & normal);\r\n\r\n\t//! Return if a trihedron left handed or not.\r\n\t//! From GLM_GTX_handed_coordinate_space extension.\r\n\ttemplate <typename T, precision P>\r\n\tbool leftHanded(\r\n\t\tdetail::tvec3<T, P> const & tangent,\r\n\t\tdetail::tvec3<T, P> const & binormal,\r\n\t\tdetail::tvec3<T, P> const & normal);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"handed_coordinate_space.inl\"\r\n\r\n#endif//GLM_GTX_handed_coordinate_space\r\n"
  },
  {
    "path": "gpu/glm/gtx/handed_coordinate_space.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2009-02-19\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/handed_coordinate_space.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool rightHanded\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & tangent,\r\n\t\tdetail::tvec3<T, P> const & binormal,\r\n\t\tdetail::tvec3<T, P> const & normal\r\n\t)\r\n\t{\r\n\t\treturn dot(cross(normal, tangent), binormal) > T(0);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool leftHanded\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & tangent,\r\n\t\tdetail::tvec3<T, P> const & binormal,\r\n\t\tdetail::tvec3<T, P> const & normal\r\n\t)\r\n\t{\r\n\t\treturn dot(cross(normal, tangent), binormal) < T(0);\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/inertia.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_inertia\r\n/// @file glm/gtx/inertia.hpp\r\n/// @date 2006-04-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_extented_min_max (dependence)\r\n///\r\n/// @defgroup gtx_inertia GLM_GTX_inertia\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Create inertia matrices\r\n/// \r\n/// <glm/gtx/inertia.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_inertia\r\n#define GLM_GTX_inertia\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_inertia extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/*\r\n\t/// @addtogroup gtx_inertia\r\n\t/// @{\r\n\r\n\t//! Build an inertia matrix for a box.\r\n\t//! From GLM_GTX_inertia extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> boxInertia3(\r\n\t\tT const & Mass, \r\n\t\tdetail::tvec3<T, P> const & Scale);\r\n\t\t\r\n\t//! Build an inertia matrix for a box.\r\n\t//! From GLM_GTX_inertia extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> boxInertia4(\r\n\t\tT const & Mass, \r\n\t\tdetail::tvec3<T, P> const & Scale);\r\n\t\t\r\n\t//! Build an inertia matrix for a disk.\r\n\t//! From GLM_GTX_inertia extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> diskInertia3(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius);\r\n\r\n\t//! Build an inertia matrix for a disk.\r\n\t//! From GLM_GTX_inertia extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> diskInertia4(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius);\r\n\r\n\t//! Build an inertia matrix for a ball.\r\n\t//! From GLM_GTX_inertia extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> ballInertia3(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius);\r\n\t\t\r\n\t//! Build an inertia matrix for a ball.\r\n\t//! From GLM_GTX_inertia extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> ballInertia4(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius);\r\n\r\n\t//! Build an inertia matrix for a sphere.\r\n\t//! From GLM_GTX_inertia extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> sphereInertia3(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius);\r\n\r\n\t//! Build an inertia matrix for a sphere.\r\n\t//! From GLM_GTX_inertia extension.\r\n\ttemplate <typename T, precision P> \r\n\tdetail::tmat4x4<T, P> sphereInertia4(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius);\r\n\t*/\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"inertia.inl\"\r\n\r\n#endif//GLM_GTX_inertia\r\n"
  },
  {
    "path": "gpu/glm/gtx/inertia.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2006-04-21\r\n// Updated : 2006-12-06\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/inertia.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n/*\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> boxInertia3\r\n\t(\r\n\t\tT const & Mass, \r\n\t\tdetail::tvec3<T, P> const & Scale\r\n\t)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> Result(T(1));\r\n\t\tResult[0][0] = (Scale.y * Scale.y + Scale.z * Scale.z) * Mass / T(12);\r\n\t\tResult[1][1] = (Scale.x * Scale.x + Scale.z * Scale.z) * Mass / T(12);\r\n\t\tResult[2][2] = (Scale.x * Scale.x + Scale.y * Scale.y) * Mass / T(12);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> boxInertia4\r\n\t(\r\n\t\tT const & Mass, \r\n\t\tdetail::tvec3<T, P> const & Scale\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> Result(T(1));\r\n\t\tResult[0][0] = (Scale.y * Scale.y + Scale.z * Scale.z) * Mass / T(12);\r\n\t\tResult[1][1] = (Scale.x * Scale.x + Scale.z * Scale.z) * Mass / T(12);\r\n\t\tResult[2][2] = (Scale.x * Scale.x + Scale.y * Scale.y) * Mass / T(12);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> diskInertia3\r\n\t(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius\r\n\t)\r\n\t{\r\n\t\tT a = Mass * Radius * Radius / T(2);\r\n\t\tdetail::tmat3x3<T, P> Result(a);\r\n\t\tResult[2][2] *= static_cast<T>(2);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> diskInertia4\r\n\t(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius\r\n\t)\r\n\t{\r\n\t\tT a = Mass * Radius * Radius / T(2);\r\n\t\tdetail::tmat4x4<T, P> Result(a);\r\n\t\tResult[2][2] *= static_cast<T>(2);\r\n\t\tResult[3][3] = static_cast<T>(1);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> ballInertia3\r\n\t(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius\r\n\t)\r\n\t{\r\n\t\tT a = static_cast<T>(2) * Mass * Radius * Radius / T(5);\r\n\t\treturn detail::tmat3x3<T, P>(a);\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> ballInertia4\r\n\t(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius\r\n\t)\r\n\t{\r\n\t\tT a = static_cast<T>(2) * Mass * Radius * Radius / T(5);\r\n\t\tdetail::tmat4x4<T, P> Result(a);\r\n\t\tResult[3][3] = static_cast<T>(1);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> sphereInertia3\r\n\t(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius\r\n\t)\r\n\t{\r\n\t\tT a = static_cast<T>(2) * Mass * Radius * Radius / T(3);\r\n\t\treturn detail::tmat3x3<T, P>(a);\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> sphereInertia4\r\n\t(\r\n\t\tT const & Mass, \r\n\t\tT const & Radius\r\n\t)\r\n\t{\r\n\t\tT a = static_cast<T>(2) * Mass * Radius * Radius / T(3);\r\n\t\tdetail::tmat4x4<T, P> Result(a);\r\n\t\tResult[3][3] = static_cast<T>(1);\r\n\t\treturn Result;\r\n\t}\r\n */\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/int_10_10_10_2.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_int_10_10_10_2\r\n#define GLM_GTX_int_10_10_10_2\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtx/raw_data.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES))\r\n#\tpragma message(\"GLM: GLM_GTX_int_10_10_10_2 extension is deprecated, include GLM_GTC_packing (glm/gtc/packing.hpp) instead\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t//! Deprecated, use packUnorm3x10_1x2 instead.\r\n\tGLM_DEPRECATED dword uint10_10_10_2_cast(glm::vec4 const & v);\r\n\r\n}//namespace glm\r\n\r\n#include \"int_10_10_10_2.inl\"\r\n\r\n#endif//GLM_GTX_int_10_10_10_2\r\n"
  },
  {
    "path": "gpu/glm/gtx/int_10_10_10_2.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\tGLM_FUNC_QUALIFIER dword uint10_10_10_2_cast\r\n\t(\r\n\t\tglm::vec4 const & v\r\n\t)\r\n\t{\r\n\t\treturn dword(uint(v.x * 2047.f) << 0 | uint(v.y * 2047.f) << 10 | uint(v.z * 2047.f) << 20 | uint(v.w * 3.f) << 30);\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/integer.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_integer\r\n/// @file glm/gtx/integer.hpp\r\n/// @date 2005-12-24 / 2011-10-13\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_integer GLM_GTX_integer\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Add support for integer for core functions\r\n/// \r\n/// <glm/gtx/integer.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_integer\r\n#define GLM_GTX_integer\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_integer extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_integer\r\n\t/// @{\r\n\r\n\t//! Returns x raised to the y power. \r\n\t//! From GLM_GTX_integer extension.\r\n\tint pow(int x, int y);\r\n\r\n\t//! Returns the positive square root of x.\r\n\t//! From GLM_GTX_integer extension.\r\n\tint sqrt(int x);\r\n\r\n\t//! Returns the log2 of x. Can be reliably using to compute mipmap count from the texture size.\r\n\t//! From GLM_GTX_integer extension.\r\n\ttemplate <typename genIUType>\r\n\tgenIUType log2(genIUType x);\r\n\r\n\t//! Returns the floor log2 of x.\r\n\t//! From GLM_GTX_integer extension.\r\n\tunsigned int floor_log2(unsigned int x);\r\n\r\n\t//! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y.\r\n\t//! From GLM_GTX_integer extension.\r\n\tint mod(int x, int y);\r\n\r\n\t//! Return the factorial value of a number (!12 max, integer only)\r\n\t//! From GLM_GTX_integer extension.\r\n\ttemplate <typename genType> \r\n\tgenType factorial(genType const & x);\r\n\r\n\t//! 32bit signed integer. \r\n\t//! From GLM_GTX_integer extension.\r\n\ttypedef signed int\t\t\t\t\tsint;\r\n\r\n\t//! Returns x raised to the y power.\r\n\t//! From GLM_GTX_integer extension.\r\n\tuint pow(uint x, uint y);\r\n\r\n\t//! Returns the positive square root of x. \r\n\t//! From GLM_GTX_integer extension.\r\n\tuint sqrt(uint x);\r\n\r\n\t//! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y.\r\n\t//! From GLM_GTX_integer extension.\r\n\tuint mod(uint x, uint y);\r\n\r\n\t//! Returns the number of leading zeros.\r\n\t//! From GLM_GTX_integer extension.\r\n\tuint nlz(uint x);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"integer.inl\"\r\n\r\n#endif//GLM_GTX_integer\r\n"
  },
  {
    "path": "gpu/glm/gtx/integer.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-24\r\n// Updated : 2011-10-13\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/integer.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\t// pow\r\n\tGLM_FUNC_QUALIFIER int pow(int x, int y)\r\n\t{\r\n\t\tif(y == 0)\r\n\t\t\treturn 1;\r\n\t\tint result = x;\r\n\t\tfor(int i = 1; i < y; ++i)\r\n\t\t\tresult *= x;\r\n\t\treturn result;\r\n\t}\r\n\r\n\t// sqrt: From Christopher J. Musial, An integer square root, Graphics Gems, 1990, page 387\r\n\tGLM_FUNC_QUALIFIER int sqrt(int x)\r\n\t{\r\n\t\tif(x <= 1) return x;\r\n\r\n\t\tint NextTrial = x >> 1;\r\n\t\tint CurrentAnswer;\r\n\r\n\t\tdo\r\n\t\t{\r\n\t\t\tCurrentAnswer = NextTrial;\r\n\t\t\tNextTrial = (NextTrial + x / NextTrial) >> 1;\r\n\t\t} while(NextTrial < CurrentAnswer);\r\n\r\n\t\treturn CurrentAnswer;\r\n\t}\r\n\r\n// Henry Gordon Dietz: http://aggregate.org/MAGIC/\r\nnamespace detail\r\n{\r\n\tGLM_FUNC_QUALIFIER unsigned int ones32(unsigned int x)\r\n\t{\r\n\t\t/* 32-bit recursive reduction using SWAR...\r\n\t\tbut first step is mapping 2-bit values\r\n\t\tinto sum of 2 1-bit values in sneaky way\r\n\t\t*/\r\n\t\tx -= ((x >> 1) & 0x55555555);\r\n\t\tx = (((x >> 2) & 0x33333333) + (x & 0x33333333));\r\n\t\tx = (((x >> 4) + x) & 0x0f0f0f0f);\r\n\t\tx += (x >> 8);\r\n\t\tx += (x >> 16);\r\n\t\treturn(x & 0x0000003f);\r\n\t}\r\n\r\n\ttemplate <>\r\n\tstruct compute_log2<false>\r\n\t{\r\n\t\ttemplate <typename T>\r\n\t\tGLM_FUNC_QUALIFIER T operator() (T const & Value) const\r\n\t\t{\r\n#if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_GCC))\r\n\t\t\treturn Value <= static_cast<T>(1) ? T(0) : T(32) - nlz(Value - T(1));\r\n#else\r\n\t\t\treturn T(32) - nlz(Value - T(1));\r\n#endif\r\n\t\t}\r\n\t};\r\n}//namespace _detail\r\n\r\n\t// Henry Gordon Dietz: http://aggregate.org/MAGIC/\r\n/*\r\n\tGLM_FUNC_QUALIFIER unsigned int floor_log2(unsigned int x)\r\n\t{\r\n\t\tx |= (x >> 1);\r\n\t\tx |= (x >> 2);\r\n\t\tx |= (x >> 4);\r\n\t\tx |= (x >> 8);\r\n\t\tx |= (x >> 16);\r\n\r\n\t\treturn _detail::ones32(x) >> 1;\r\n\t}\r\n*/\r\n\t// mod\r\n\tGLM_FUNC_QUALIFIER int mod(int x, int y)\r\n\t{\r\n\t\treturn x - y * (x / y);\r\n\t}\r\n\r\n\t// factorial (!12 max, integer only)\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType factorial(genType const & x)\r\n\t{\r\n\t\tgenType Temp = x;\r\n\t\tgenType Result;\r\n\t\tfor(Result = 1; Temp > 1; --Temp)\r\n\t\t\tResult *= Temp;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> factorial(\r\n\t\tdetail::tvec2<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec2<T, P>(\r\n\t\t\tfactorial(x.x),\r\n\t\t\tfactorial(x.y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> factorial(\r\n\t\tdetail::tvec3<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tfactorial(x.x),\r\n\t\t\tfactorial(x.y),\r\n\t\t\tfactorial(x.z));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> factorial(\r\n\t\tdetail::tvec4<T, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec4<T, P>(\r\n\t\t\tfactorial(x.x),\r\n\t\t\tfactorial(x.y),\r\n\t\t\tfactorial(x.z),\r\n\t\t\tfactorial(x.w));\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint pow(uint x, uint y)\r\n\t{\r\n\t\tuint result = x;\r\n\t\tfor(uint i = 1; i < y; ++i)\r\n\t\t\tresult *= x;\r\n\t\treturn result;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint sqrt(uint x)\r\n\t{\r\n\t\tif(x <= 1) return x;\r\n\r\n\t\tuint NextTrial = x >> 1;\r\n\t\tuint CurrentAnswer;\r\n\r\n\t\tdo\r\n\t\t{\r\n\t\t\tCurrentAnswer = NextTrial;\r\n\t\t\tNextTrial = (NextTrial + x / NextTrial) >> 1;\r\n\t\t} while(NextTrial < CurrentAnswer);\r\n\r\n\t\treturn CurrentAnswer;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER uint mod(uint x, uint y)\r\n\t{\r\n\t\treturn x - y * (x / y);\r\n\t}\r\n\r\n#if(GLM_COMPILER & (GLM_COMPILER_VC | GLM_COMPILER_GCC))\r\n\r\n\tGLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x) \r\n\t{\r\n\t\treturn 31u - findMSB(x);\r\n\t}\r\n\r\n#else\r\n\r\n\t// Hackers Delight: http://www.hackersdelight.org/HDcode/nlz.c.txt\r\n\tGLM_FUNC_QUALIFIER unsigned int nlz(unsigned int x) \r\n\t{\r\n\t\tint y, m, n;\r\n\r\n\t\ty = -int(x >> 16);      // If left half of x is 0,\r\n\t\tm = (y >> 16) & 16;  // set n = 16.  If left half\r\n\t\tn = 16 - m;          // is nonzero, set n = 0 and\r\n\t\tx = x >> m;          // shift x right 16.\r\n\t\t\t\t\t\t\t// Now x is of the form 0000xxxx.\r\n\t\ty = x - 0x100;       // If positions 8-15 are 0,\r\n\t\tm = (y >> 16) & 8;   // add 8 to n and shift x left 8.\r\n\t\tn = n + m;\r\n\t\tx = x << m;\r\n\r\n\t\ty = x - 0x1000;      // If positions 12-15 are 0,\r\n\t\tm = (y >> 16) & 4;   // add 4 to n and shift x left 4.\r\n\t\tn = n + m;\r\n\t\tx = x << m;\r\n\r\n\t\ty = x - 0x4000;      // If positions 14-15 are 0,\r\n\t\tm = (y >> 16) & 2;   // add 2 to n and shift x left 2.\r\n\t\tn = n + m;\r\n\t\tx = x << m;\r\n\r\n\t\ty = x >> 14;         // Set y = 0, 1, 2, or 3.\r\n\t\tm = y & ~(y >> 1);   // Set m = 0, 1, 2, or 2 resp.\r\n\t\treturn unsigned(n + 2 - m);\r\n\t}\r\n\r\n#endif//(GLM_COMPILER)\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/intersect.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_intersect\r\n/// @file glm/gtx/intersect.hpp\r\n/// @date 2007-04-03 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_closest_point (dependence)\r\n///\r\n/// @defgroup gtx_intersect GLM_GTX_intersect\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Add intersection functions\r\n/// \r\n/// <glm/gtx/intersect.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_intersect\r\n#define GLM_GTX_intersect\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtx/closest_point.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_closest_point extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_intersect\r\n\t/// @{\r\n\r\n\t//! Compute the intersection of a ray and a triangle.\r\n\t//! Ray direction and plane normal must be unit length.\r\n\t//! From GLM_GTX_intersect extension.\r\n\ttemplate <typename genType>\r\n\tbool intersectRayPlane(\r\n\t\tgenType const & orig, genType const & dir,\r\n\t\tgenType const & planeOrig, genType const & planeNormal,\r\n\t\ttypename genType::value_type & intersectionDistance);\r\n\r\n\t//! Compute the intersection of a ray and a triangle.\r\n\t//! From GLM_GTX_intersect extension.\r\n\ttemplate <typename genType>\r\n\tbool intersectRayTriangle(\r\n\t\tgenType const & orig, genType const & dir,\r\n\t\tgenType const & vert0, genType const & vert1, genType const & vert2,\r\n\t\tgenType & baryPosition);\r\n\r\n\t//! Compute the intersection of a line and a triangle.\r\n\t//! From GLM_GTX_intersect extension.\r\n\ttemplate <typename genType>\r\n\tbool intersectLineTriangle(\r\n\t\tgenType const & orig, genType const & dir,\r\n\t\tgenType const & vert0, genType const & vert1, genType const & vert2,\r\n\t\tgenType & position);\r\n\r\n\t//! Compute the intersection distance of a ray and a sphere. \r\n\t//! The ray direction vector is unit length.\r\n\t//! From GLM_GTX_intersect extension.\r\n\ttemplate <typename genType>\r\n\tbool intersectRaySphere(\r\n\t\tgenType const & rayStarting, genType const & rayNormalizedDirection,\r\n\t\tgenType const & sphereCenter, typename genType::value_type const sphereRadiusSquered,\r\n\t\ttypename genType::value_type & intersectionDistance);\r\n\r\n\t//! Compute the intersection of a ray and a sphere.\r\n\t//! From GLM_GTX_intersect extension.\r\n\ttemplate <typename genType>\r\n\tbool intersectRaySphere(\r\n\t\tgenType const & rayStarting, genType const & rayNormalizedDirection,\r\n\t\tgenType const & sphereCenter, const typename genType::value_type sphereRadius,\r\n\t\tgenType & intersectionPosition, genType & intersectionNormal);\r\n\r\n\t//! Compute the intersection of a line and a sphere.\r\n\t//! From GLM_GTX_intersect extension\r\n\ttemplate <typename genType>\r\n\tbool intersectLineSphere(\r\n\t\tgenType const & point0, genType const & point1,\r\n\t\tgenType const & sphereCenter, typename genType::value_type sphereRadius,\r\n\t\tgenType & intersectionPosition1, genType & intersectionNormal1, \r\n\t\tgenType & intersectionPosition2 = genType(), genType & intersectionNormal2 = genType());\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"intersect.inl\"\r\n\r\n#endif//GLM_GTX_intersect\r\n"
  },
  {
    "path": "gpu/glm/gtx/intersect.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-04-03\r\n// Updated : 2009-01-20\r\n// Licence : This source is under MIT licence\r\n// File    : glm/gtx/intersect.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../geometric.hpp\"\r\n#include <cfloat>\r\n#include <limits>\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER bool intersectRayPlane\r\n\t(\r\n\t\tgenType const & orig, genType const & dir,\r\n\t\tgenType const & planeOrig, genType const & planeNormal,\r\n\t\ttypename genType::value_type & intersectionDistance\r\n\t)\r\n\t{\r\n\t\ttypename genType::value_type d = glm::dot(dir, planeNormal);\r\n\t\ttypename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();\r\n\r\n\t\tif(d < Epsilon)\r\n\t\t{\r\n\t\t\tintersectionDistance = glm::dot(planeOrig - orig, planeNormal) / d;\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER bool intersectRayTriangle\r\n\t(\r\n\t\tgenType const & orig, genType const & dir,\r\n\t\tgenType const & v0, genType const & v1, genType const & v2,\r\n\t\tgenType & baryPosition\r\n\t)\r\n\t{\r\n\t\tgenType e1 = v1 - v0;\r\n\t\tgenType e2 = v2 - v0;\r\n\r\n\t\tgenType p = glm::cross(dir, e2);\r\n\r\n\t\ttypename genType::value_type a = glm::dot(e1, p);\r\n\r\n\t\ttypename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();\r\n\t\tif(a < Epsilon)\r\n\t\t\treturn false;\r\n\r\n\t\ttypename genType::value_type f = typename genType::value_type(1.0f) / a;\r\n\r\n\t\tgenType s = orig - v0;\r\n\t\tbaryPosition.x = f * glm::dot(s, p);\r\n\t\tif(baryPosition.x < typename genType::value_type(0.0f))\r\n\t\t\treturn false;\r\n\t\tif(baryPosition.x > typename genType::value_type(1.0f))\r\n\t\t\treturn false;\r\n\r\n\t\tgenType q = glm::cross(s, e1);\r\n\t\tbaryPosition.y = f * glm::dot(dir, q);\r\n\t\tif(baryPosition.y < typename genType::value_type(0.0f))\r\n\t\t\treturn false;\r\n\t\tif(baryPosition.y + baryPosition.x > typename genType::value_type(1.0f))\r\n\t\t\treturn false;\r\n\r\n\t\tbaryPosition.z = f * glm::dot(e2, q);\r\n\r\n\t\treturn baryPosition.z >= typename genType::value_type(0.0f);\r\n\t}\r\n\r\n\t//template <typename genType>\r\n\t//GLM_FUNC_QUALIFIER bool intersectRayTriangle\r\n\t//(\r\n\t//\tgenType const & orig, genType const & dir,\r\n\t//\tgenType const & vert0, genType const & vert1, genType const & vert2,\r\n\t//\tgenType & position\r\n\t//)\r\n\t//{\r\n\t//\ttypename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();\r\n\t//\r\n\t//\tgenType edge1 = vert1 - vert0;\r\n\t//\tgenType edge2 = vert2 - vert0;\r\n\t//\r\n\t//\tgenType pvec = cross(dir, edge2);\r\n\t//\r\n\t//\tfloat det = dot(edge1, pvec);\r\n\t//\tif(det < Epsilon)\r\n\t//\t\treturn false;\r\n\t//\r\n\t//\tgenType tvec = orig - vert0;\r\n\t//\r\n\t//\tposition.y = dot(tvec, pvec);\r\n\t//\tif (position.y < typename genType::value_type(0) || position.y > det)\r\n\t//\t\treturn typename genType::value_type(0);\r\n\t//\r\n\t//\tgenType qvec = cross(tvec, edge1);\r\n\t//\r\n\t//\tposition.z = dot(dir, qvec);\r\n\t//\tif (position.z < typename genType::value_type(0) || position.y + position.z > det)\r\n\t//\t\treturn typename genType::value_type(0);\r\n\t//\r\n\t//\tposition.x = dot(edge2, qvec);\r\n\t//\tposition *= typename genType::value_type(1) / det;\r\n\t//\r\n\t//\treturn typename genType::value_type(1);\r\n\t//}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER bool intersectLineTriangle\r\n\t(\r\n\t\tgenType const & orig, genType const & dir,\r\n\t\tgenType const & vert0, genType const & vert1, genType const & vert2,\r\n\t\tgenType & position\r\n\t)\r\n\t{\r\n\t\ttypename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();\r\n\r\n\t\tgenType edge1 = vert1 - vert0;\r\n\t\tgenType edge2 = vert2 - vert0;\r\n\r\n\t\tgenType pvec = cross(dir, edge2);\r\n\r\n\t\tfloat det = dot(edge1, pvec);\r\n\r\n\t\tif (det > -Epsilon && det < Epsilon)\r\n\t\t\treturn false;\r\n\t\tfloat inv_det = typename genType::value_type(1) / det;\r\n\r\n\t\tgenType tvec = orig - vert0;\r\n\r\n\t\tposition.y = dot(tvec, pvec) * inv_det;\r\n\t\tif (position.y < typename genType::value_type(0) || position.y > typename genType::value_type(1))\r\n\t\t\treturn false;\r\n\r\n\t\tgenType qvec = cross(tvec, edge1);\r\n\r\n\t\tposition.z = dot(dir, qvec) * inv_det;\r\n\t\tif (position.z < typename genType::value_type(0) || position.y + position.z > typename genType::value_type(1))\r\n\t\t\treturn false;\r\n\r\n\t\tposition.x = dot(edge2, qvec) * inv_det;\r\n\r\n\t\treturn true;\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER bool intersectRaySphere\r\n\t(\r\n\t\tgenType const & rayStarting, genType const & rayNormalizedDirection,\r\n\t\tgenType const & sphereCenter, const typename genType::value_type sphereRadiusSquered,\r\n\t\ttypename genType::value_type & intersectionDistance\r\n\t)\r\n\t{\r\n\t\ttypename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();\r\n\t\tgenType diff = sphereCenter - rayStarting;\r\n\t\ttypename genType::value_type t0 = dot(diff, rayNormalizedDirection);\r\n\t\ttypename genType::value_type dSquared = dot(diff, diff) - t0 * t0;\r\n\t\tif( dSquared > sphereRadiusSquered )\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\ttypename genType::value_type t1 = sqrt( sphereRadiusSquered - dSquared );\r\n\t\tintersectionDistance = t0 > t1 + Epsilon ? t0 - t1 : t0 + t1;\r\n\t\treturn intersectionDistance > Epsilon;\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER bool intersectRaySphere\r\n\t(\r\n\t\tgenType const & rayStarting, genType const & rayNormalizedDirection,\r\n\t\tgenType const & sphereCenter, const typename genType::value_type sphereRadius,\r\n\t\tgenType & intersectionPosition, genType & intersectionNormal\r\n\t)\r\n\t{\r\n\t\ttypename genType::value_type distance;\r\n\t\tif( intersectRaySphere( rayStarting, rayNormalizedDirection, sphereCenter, sphereRadius * sphereRadius, distance ) )\r\n\t\t{\r\n\t\t\tintersectionPosition = rayStarting + rayNormalizedDirection * distance;\r\n\t\t\tintersectionNormal = (intersectionPosition - sphereCenter) / sphereRadius;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER bool intersectLineSphere\r\n\t(\r\n\t\tgenType const & point0, genType const & point1,\r\n\t\tgenType const & sphereCenter, typename genType::value_type sphereRadius,\r\n\t\tgenType & intersectionPoint1, genType & intersectionNormal1, \r\n\t\tgenType & intersectionPoint2, genType & intersectionNormal2\r\n\t)\r\n\t{\r\n\t\ttypename genType::value_type Epsilon = std::numeric_limits<typename genType::value_type>::epsilon();\r\n\t\tgenType dir = normalize(point1 - point0);\r\n\t\tgenType diff = sphereCenter - point0;\r\n\t\ttypename genType::value_type t0 = dot(diff, dir);\r\n\t\ttypename genType::value_type dSquared = dot(diff, diff) - t0 * t0;\r\n\t\tif( dSquared > sphereRadius * sphereRadius )\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\ttypename genType::value_type t1 = sqrt( sphereRadius * sphereRadius - dSquared );\r\n\t\tif( t0 < t1 + Epsilon )\r\n\t\t\tt1 = -t1;\r\n\t\tintersectionPoint1 = point0 + dir * (t0 - t1);\r\n\t\tintersectionNormal1 = (intersectionPoint1 - sphereCenter) / sphereRadius;\r\n\t\tintersectionPoint2 = point0 + dir * (t0 + t1);\r\n\t\tintersectionNormal2 = (intersectionPoint2 - sphereCenter) / sphereRadius;\r\n\t\treturn true;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/io.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_io\r\n/// @file glm/gtx/io.hpp\r\n/// @date 2013-11-22\r\n/// @author Jan P Springer (regnirpsj@gmail.com)\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_quaternion (dependence)\r\n///\r\n/// @defgroup gtx_io GLM_GTX_io\r\n/// @ingroup gtx\r\n/// \r\n/// @brief std::[w]ostream support for glm types\r\n///\r\n/// <glm/gtx/io.hpp> needs to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_io\r\n#define GLM_GTX_io\r\n\r\n// Dependency:\r\n#include \"../detail/setup.hpp\"\r\n#include \"../gtc/quaternion.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_io extension included\")\r\n#endif\r\n\r\n#include <iosfwd>  // std::basic_ostream<> (fwd)\r\n#include <utility> // std::pair<>\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_io\r\n\t/// @{\r\n  \r\n  namespace io\r\n  {\r\n    \r\n    class precision_guard {\r\n\r\n    public:\r\n      \r\n      GLM_FUNC_DECL explicit precision_guard();\r\n      GLM_FUNC_DECL         ~precision_guard();\r\n                \r\n    private:\r\n\r\n      unsigned precision_;\r\n      unsigned value_width_;\r\n      \r\n    };\r\n\r\n    class format_guard\r\n\t{\r\n\tpublic:\r\n\t\tenum order_t { column_major, row_major, };\r\n\r\n\t\tGLM_FUNC_DECL explicit format_guard();\r\n\t\tGLM_FUNC_DECL         ~format_guard();\r\n\r\n\tprivate:\r\n\r\n\t\torder_t order_;\r\n\t\tchar    cr_;\r\n\t};\r\n\r\n    // decimal places (dflt: 3)\r\n    GLM_FUNC_DECL unsigned& precision();\r\n\r\n    // sign + value + '.' + decimals (dflt: 1 + 4 + 1 + precision())\r\n    GLM_FUNC_DECL unsigned& value_width();\r\n\r\n    // matrix output order (dflt: row_major)\r\n    GLM_FUNC_DECL format_guard::order_t& order();\r\n\r\n    // carriage/return char (dflt: '\\n')\r\n    GLM_FUNC_DECL char& cr();\r\n\r\n    // matrix output order -> column_major\r\n    GLM_FUNC_DECL std::ios_base& column_major(std::ios_base&);\r\n\r\n    // matrix output order -> row_major\r\n    GLM_FUNC_DECL std::ios_base& row_major   (std::ios_base&);\r\n\r\n    // carriage/return char -> '\\n'\r\n    GLM_FUNC_DECL std::ios_base& formatted   (std::ios_base&);\r\n\r\n    // carriage/return char -> ' '\r\n    GLM_FUNC_DECL std::ios_base& unformatted (std::ios_base&);\r\n\r\n  }//namespace io\r\n\r\n  namespace detail\r\n  {\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tquat<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tvec2<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tvec3<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tvec4<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x2<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x3<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat2x4<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat3x2<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat3x3<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat3x4<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat4x2<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat4x3<T,P> const&);\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_DECL std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>&, tmat4x4<T,P> const&);\r\n\r\n\t/// @}  \r\n}//namespace detail\r\n}//namespace glm\r\n\r\n#include \"io.inl\"\r\n\r\n#endif//GLM_GTX_io\r\n"
  },
  {
    "path": "gpu/glm/gtx/io.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2013-11-22\r\n// Updated : 2013-11-22\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/inl.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include \"../matrix.hpp\"\r\n// #include <boost/io/ios_state.hpp> // boost::io::ios_all_saver\r\n#include <iomanip>                // std::setfill<>, std::fixed, std::setprecision, std::right,\r\n                                  // std::setw\r\n#include <ostream>                // std::basic_ostream<>\r\n\r\nnamespace glm{\r\nnamespace io\r\n{\r\n  \r\n    /* explicit */ GLM_FUNC_QUALIFIER\r\n    precision_guard::precision_guard()\r\n      : precision_  (precision()),\r\n        value_width_(value_width())\r\n    {}\r\n\r\n    GLM_FUNC_QUALIFIER\r\n    precision_guard::~precision_guard()\r\n    {\r\n      value_width() = value_width_;\r\n      precision()   = precision_;\r\n    }\r\n\r\n    /* explicit */ GLM_FUNC_QUALIFIER\r\n    format_guard::format_guard()\r\n      : order_(order()),\r\n        cr_   (cr())\r\n    {}\r\n\r\n    GLM_FUNC_QUALIFIER\r\n    format_guard::~format_guard()\r\n    {\r\n      cr()    = cr_;\r\n      order() = order_;\r\n    }\r\n\r\n    GLM_FUNC_QUALIFIER unsigned& precision()\r\n    {\r\n      static unsigned p(3);\r\n\r\n      return p;\r\n    }\r\n    \r\n    GLM_FUNC_QUALIFIER unsigned& value_width()\r\n    {\r\n      static unsigned p(9);\r\n\r\n      return p;\r\n    }\r\n    \r\n    GLM_FUNC_QUALIFIER format_guard::order_t& order()\r\n    {\r\n      static format_guard::order_t p(format_guard::row_major);\r\n\r\n      return p;\r\n    }\r\n    \r\n    GLM_FUNC_QUALIFIER char&\r\n    cr()\r\n    {\r\n      static char p('\\n'); return p;\r\n    }\r\n    \r\n    GLM_FUNC_QUALIFIER std::ios_base& column_major(std::ios_base& os)\r\n    {\r\n      order() = format_guard::column_major;\r\n      \r\n      return os;\r\n    }\r\n    \r\n    GLM_FUNC_QUALIFIER std::ios_base& row_major(std::ios_base& os)\r\n    {\r\n      order() = format_guard::row_major;\r\n      \r\n      return os;\r\n    }\r\n\r\n    GLM_FUNC_QUALIFIER std::ios_base& formatted(std::ios_base& os)\r\n    {\r\n      cr() = '\\n';\r\n      \r\n      return os;\r\n    }\r\n    \r\n    GLM_FUNC_QUALIFIER std::ios_base& unformatted(std::ios_base& os)\r\n    {\r\n      cr() = ' ';\r\n      \r\n      return os;\r\n    }\r\n    \r\n} // namespace io\r\nnamespace detail\r\n{\r\n    // functions, inlined (inline)\r\n\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tquat<T,P> const& a)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n        // boost::io::ios_all_saver const ias(os);\r\n      \r\n        os << std::fixed << std::setprecision(io::precision())\r\n           << '['\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.w << ','\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.x << ','\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.y << ','\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.z\r\n           << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n    \r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tvec2<T,P> const& a)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n        // boost::io::ios_all_saver const ias(os);\r\n      \r\n        os << std::fixed << std::setprecision(io::precision())\r\n           << '['\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.x << ','\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.y\r\n           << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n  \r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tvec3<T,P> const& a)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n        // boost::io::ios_all_saver const ias(os);\r\n      \r\n        os << std::fixed << std::setprecision(io::precision())\r\n           << '['\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.x << ','\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.y << ','\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.z\r\n           << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tvec4<T,P> const& a)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n        // boost::io::ios_all_saver const ias(os);\r\n      \r\n        os << std::fixed << std::setprecision(io::precision())\r\n           << '['\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.x << ','\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.y << ','\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.z << ','\r\n           << std::right << std::setfill<CTy>(' ') << std::setw(io::value_width()) << a.w\r\n           << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x2<T,P> const& m)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n        \r\n        os << io::cr()\r\n           << '[' << m[0] << io::cr()\r\n           << ' ' << m[1] << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x3<T,P> const& m)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n\r\n        os << io::cr()\r\n           << '[' << m[0] << io::cr()\r\n           << ' ' << m[1] << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x4<T,P> const& m)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n\r\n        os << io::cr()\r\n           << '[' << m[0] << io::cr()\r\n           << ' ' << m[1] << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x2<T,P> const& m)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n\r\n        os << io::cr()\r\n           << '[' << m[0] << io::cr()\r\n           << ' ' << m[1] << io::cr()\r\n           << ' ' << m[2] << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x3<T,P> const& m)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n\r\n        os << io::cr()\r\n           << '[' << m[0] << io::cr()\r\n           << ' ' << m[1] << io::cr()\r\n           << ' ' << m[2] << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x4<T,P> const& m)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n\r\n        os << io::cr()\r\n           << '[' << m[0] << io::cr()\r\n           << ' ' << m[1] << io::cr()\r\n           << ' ' << m[2] << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x2<T,P> const& m)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n\r\n        os << io::cr()\r\n           << '[' << m[0] << io::cr()\r\n           << ' ' << m[1] << io::cr()\r\n           << ' ' << m[2] << io::cr()\r\n           << ' ' << m[3] << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x3<T,P> const& m)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n\r\n        os << io::cr()\r\n           << '[' << m[0] << io::cr()\r\n           << ' ' << m[1] << io::cr()\r\n           << ' ' << m[2] << io::cr()\r\n           << ' ' << m[3] << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n\r\n    template <typename CTy, typename CTr, typename T, precision P>\r\n    GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x4<T,P> const& m)\r\n    {\r\n      typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os);\r\n\r\n      if (cerberus) {\r\n\r\n        os << io::cr()\r\n           << '[' << m[0] << io::cr()\r\n           << ' ' << m[1] << io::cr()\r\n           << ' ' << m[2] << io::cr()\r\n           << ' ' << m[3] << ']';\r\n      }\r\n\r\n      return os;\r\n    }\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/log_base.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_log_base\r\n/// @file glm/gtx/log_base.hpp\r\n/// @date 2008-10-24 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_log_base GLM_GTX_log_base\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Logarithm for any base. base can be a vector or a scalar.\r\n/// \r\n/// <glm/gtx/log_base.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_log_base\r\n#define GLM_GTX_log_base\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_log_base extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_log_base\r\n\t/// @{\r\n\r\n\t//! Logarithm for any base.\r\n\t//! From GLM_GTX_log_base.\r\n\ttemplate <typename genType> \r\n\tgenType log(\r\n\t\tgenType const & x, \r\n\t\tgenType const & base);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"log_base.inl\"\r\n\r\n#endif//GLM_GTX_log_base\r\n"
  },
  {
    "path": "gpu/glm/gtx/log_base.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2008-10-24\r\n// Updated : 2008-10-24\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/log_base.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType log(\r\n\t\tgenType const & x, \r\n\t\tgenType const & base)\r\n\t{\r\n\t\tassert(x != genType(0));\r\n\r\n\t\treturn glm::log(x) / glm::log(base);\r\n\t}\r\n\r\n\tVECTORIZE_VEC_SCA(log)\r\n\tVECTORIZE_VEC_VEC(log)\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/matrix_cross_product.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_matrix_cross_product\r\n/// @file glm/gtx/matrix_cross_product.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_extented_min_max (dependence)\r\n///\r\n/// @defgroup gtx_matrix_cross_product GLM_GTX_matrix_cross_product\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Build cross product matrices\r\n/// \r\n/// <glm/gtx/matrix_cross_product.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_matrix_cross_product\r\n#define GLM_GTX_matrix_cross_product\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_matrix_cross_product extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_matrix_cross_product\r\n\t/// @{\r\n\r\n\t//! Build a cross product matrix.\r\n\t//! From GLM_GTX_matrix_cross_product extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> matrixCross3(\r\n\t\tdetail::tvec3<T, P> const & x);\r\n\t\t\r\n\t//! Build a cross product matrix.\r\n\t//! From GLM_GTX_matrix_cross_product extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> matrixCross4(\r\n\t\tdetail::tvec3<T, P> const & x);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"matrix_cross_product.inl\"\r\n\r\n#endif//GLM_GTX_matrix_cross_product\r\n"
  },
  {
    "path": "gpu/glm/gtx/matrix_cross_product.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2005-12-21\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/matrix_cross_product.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> matrixCross3\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> Result(T(0));\r\n\t\tResult[0][1] = x.z;\r\n\t\tResult[1][0] = -x.z;\r\n\t\tResult[0][2] = -x.y;\r\n\t\tResult[2][0] = x.y;\r\n\t\tResult[1][2] = x.x;\r\n\t\tResult[2][1] = -x.x;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> matrixCross4\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> Result(T(0));\r\n\t\tResult[0][1] = x.z;\r\n\t\tResult[1][0] = -x.z;\r\n\t\tResult[0][2] = -x.y;\r\n\t\tResult[2][0] = x.y;\r\n\t\tResult[1][2] = x.x;\r\n\t\tResult[2][1] = -x.x;\r\n\t\treturn Result;\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/matrix_interpolation.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_matrix_interpolation\r\n/// @file glm/gtx/matrix_interpolation.hpp\r\n/// @date 2011-03-05 / 2011-06-07\r\n/// @author Ghenadii Ursachi (the.asteroth@gmail.com)\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_matrix_interpolation GLM_GTX_matrix_interpolation\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Allows to directly interpolate two exiciting matrices.\r\n/// \r\n/// <glm/gtx/matrix_interpolation.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_matrix_interpolation\r\n#define GLM_GTX_matrix_interpolation\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_matrix_interpolation extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_matrix_interpolation\r\n\t/// @{\r\n\r\n\t/// Get the axis and angle of the rotation from a matrix.\r\n\t/// From GLM_GTX_matrix_interpolation extension.\r\n\ttemplate <typename T, precision P>\r\n\tvoid axisAngle(\r\n\t\tdetail::tmat4x4<T, P> const & mat,\r\n\t\tdetail::tvec3<T, P> & axis,\r\n\t\tT & angle);\r\n\r\n\t/// Build a matrix from axis and angle.\r\n\t/// From GLM_GTX_matrix_interpolation extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> axisAngleMatrix(\r\n\t\tdetail::tvec3<T, P> const & axis,\r\n\t\tT const angle);\r\n\r\n\t/// Extracts the rotation part of a matrix.\r\n\t/// From GLM_GTX_matrix_interpolation extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> extractMatrixRotation(\r\n\t\tdetail::tmat4x4<T, P> const & mat);\r\n\r\n\t/// Build a interpolation of 4 * 4 matrixes.\r\n\t/// From GLM_GTX_matrix_interpolation extension.\r\n\t/// Warning! works only with rotation and/or translation matrixes, scale will generate unexpected results.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> interpolate(\r\n\t\tdetail::tmat4x4<T, P> const & m1,\r\n\t\tdetail::tmat4x4<T, P> const & m2,\r\n\t\tT const delta);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"matrix_interpolation.inl\"\r\n\r\n#endif//GLM_GTX_matrix_interpolation\r\n"
  },
  {
    "path": "gpu/glm/gtx/matrix_interpolation.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2011-03-05\r\n// Updated : 2011-03-05\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/matrix_interpolation.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER void axisAngle\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & mat,\r\n\t\tdetail::tvec3<T, P> & axis,\r\n\t\tT & angle\r\n\t)\r\n\t{\r\n\t\tT epsilon = (T)0.01;\r\n\t\tT epsilon2 = (T)0.1;\r\n\r\n\t\tif((abs(mat[1][0] - mat[0][1]) < epsilon) && (abs(mat[2][0] - mat[0][2]) < epsilon) && (abs(mat[2][1] - mat[1][2]) < epsilon))\r\n\t\t{\r\n\t\t\tif ((abs(mat[1][0] + mat[0][1]) < epsilon2) && (abs(mat[2][0] + mat[0][2]) < epsilon2) && (abs(mat[2][1] + mat[1][2]) < epsilon2) && (abs(mat[0][0] + mat[1][1] + mat[2][2] - (T)3.0) < epsilon2))\r\n\t\t\t{\r\n\t\t\t\tangle = (T)0.0;\r\n\t\t\t\taxis.x = (T)1.0;\r\n\t\t\t\taxis.y = (T)0.0;\r\n\t\t\t\taxis.z = (T)0.0;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tangle = static_cast<T>(3.1415926535897932384626433832795);\r\n\t\t\tT xx = (mat[0][0] + (T)1.0) / (T)2.0;\r\n\t\t\tT yy = (mat[1][1] + (T)1.0) / (T)2.0;\r\n\t\t\tT zz = (mat[2][2] + (T)1.0) / (T)2.0;\r\n\t\t\tT xy = (mat[1][0] + mat[0][1]) / (T)4.0;\r\n\t\t\tT xz = (mat[2][0] + mat[0][2]) / (T)4.0;\r\n\t\t\tT yz = (mat[2][1] + mat[1][2]) / (T)4.0;\r\n\t\t\tif((xx > yy) && (xx > zz))\r\n\t\t\t{\r\n\t\t\t\tif (xx < epsilon) {\r\n\t\t\t\t\taxis.x = (T)0.0;\r\n\t\t\t\t\taxis.y = (T)0.7071;\r\n\t\t\t\t\taxis.z = (T)0.7071;\r\n\t\t\t\t} else {\r\n\t\t\t\t\taxis.x = sqrt(xx);\r\n\t\t\t\t\taxis.y = xy / axis.x;\r\n\t\t\t\t\taxis.z = xz / axis.x;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (yy > zz)\r\n\t\t\t{\r\n\t\t\t\tif (yy < epsilon) {\r\n\t\t\t\t\taxis.x = (T)0.7071;\r\n\t\t\t\t\taxis.y = (T)0.0;\r\n\t\t\t\t\taxis.z = (T)0.7071;\r\n\t\t\t\t} else {\r\n\t\t\t\t\taxis.y = sqrt(yy);\r\n\t\t\t\t\taxis.x = xy / axis.y;\r\n\t\t\t\t\taxis.z = yz / axis.y;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif (zz < epsilon) {\r\n\t\t\t\t\taxis.x = (T)0.7071;\r\n\t\t\t\t\taxis.y = (T)0.7071;\r\n\t\t\t\t\taxis.z = (T)0.0;\r\n\t\t\t\t} else {\r\n\t\t\t\t\taxis.z = sqrt(zz);\r\n\t\t\t\t\taxis.x = xz / axis.z;\r\n\t\t\t\t\taxis.y = yz / axis.z;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tT s = sqrt((mat[2][1] - mat[1][2]) * (mat[2][1] - mat[1][2]) + (mat[2][0] - mat[0][2]) * (mat[2][0] - mat[0][2]) + (mat[1][0] - mat[0][1]) * (mat[1][0] - mat[0][1]));\r\n\t\tif (glm::abs(s) < T(0.001))\r\n\t\t\ts = (T)1.0;\r\n\t\tangle = acos((mat[0][0] + mat[1][1] + mat[2][2] - (T)1.0) / (T)2.0);\r\n\t\taxis.x = (mat[1][2] - mat[2][1]) / s;\r\n\t\taxis.y = (mat[2][0] - mat[0][2]) / s;\r\n\t\taxis.z = (mat[0][1] - mat[1][0]) / s;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> axisAngleMatrix\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & axis,\r\n\t\tT const angle\r\n\t)\r\n\t{\r\n\t\tT c = cos(angle);\r\n\t\tT s = sin(angle);\r\n\t\tT t = static_cast<T>(1) - c;\r\n\t\tdetail::tvec3<T, P> n = normalize(axis);\r\n\r\n\t\treturn detail::tmat4x4<T, P>(\r\n\t\t\tt * n.x * n.x + c,          t * n.x * n.y + n.z * s,    t * n.x * n.z - n.y * s,    T(0),\r\n\t\t\tt * n.x * n.y - n.z * s,    t * n.y * n.y + c,          t * n.y * n.z + n.x * s,    T(0),\r\n\t\t\tt * n.x * n.z + n.y * s,    t * n.y * n.z - n.x * s,    t * n.z * n.z + c,          T(0),\r\n\t\t\tT(0),                        T(0),                        T(0),                     T(1)\r\n\t\t);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> extractMatrixRotation\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & mat\r\n\t)\r\n\t{\r\n\t\treturn detail::tmat4x4<T, P>(\r\n\t\t\tmat[0][0], mat[0][1], mat[0][2], 0.0,\r\n\t\t\tmat[1][0], mat[1][1], mat[1][2], 0.0,\r\n\t\t\tmat[2][0], mat[2][1], mat[2][2], 0.0,\r\n\t\t\t0.0,       0.0,       0.0,       1.0\r\n\t\t);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> interpolate\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & m1,\r\n\t\tdetail::tmat4x4<T, P> const & m2,\r\n\t\tT const delta\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> m1rot = extractMatrixRotation(m1);\r\n\t\tdetail::tmat4x4<T, P> dltRotation = m2 * transpose(m1rot);\r\n\t\tdetail::tvec3<T, P> dltAxis;\r\n\t\tT dltAngle;\r\n\t\taxisAngle(dltRotation, dltAxis, dltAngle);\r\n\t\tdetail::tmat4x4<T, P> out = axisAngleMatrix(dltAxis, dltAngle * delta) * m1rot;\r\n\t\tout[3][0] = m1[3][0] + delta * (m2[3][0] - m1[3][0]);\r\n\t\tout[3][1] = m1[3][1] + delta * (m2[3][1] - m1[3][1]);\r\n\t\tout[3][2] = m1[3][2] + delta * (m2[3][2] - m1[3][2]);\r\n\t\treturn out;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/matrix_major_storage.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_matrix_major_storage\r\n/// @file glm/gtx/matrix_major_storage.hpp\r\n/// @date 2006-04-19 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_extented_min_max (dependence)\r\n///\r\n/// @defgroup gtx_matrix_major_storage GLM_GTX_matrix_major_storage\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Build matrices with specific matrix order, row or column\r\n/// \r\n/// <glm/gtx/matrix_major_storage.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_matrix_major_storage\r\n#define GLM_GTX_matrix_major_storage\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_matrix_major_storage extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_matrix_major_storage\r\n\t/// @{\r\n\r\n\t//! Build a row major matrix from row vectors.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat2x2<T, P> rowMajor2(\r\n\t\tdetail::tvec2<T, P> const & v1, \r\n\t\tdetail::tvec2<T, P> const & v2);\r\n\t\t\r\n\t//! Build a row major matrix from other matrix.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat2x2<T, P> rowMajor2(\r\n\t\tdetail::tmat2x2<T, P> const & m);\r\n\r\n\t//! Build a row major matrix from row vectors.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> rowMajor3(\r\n\t\tdetail::tvec3<T, P> const & v1, \r\n\t\tdetail::tvec3<T, P> const & v2, \r\n\t\tdetail::tvec3<T, P> const & v3);\r\n\r\n\t//! Build a row major matrix from other matrix.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> rowMajor3(\r\n\t\tdetail::tmat3x3<T, P> const & m);\r\n\r\n\t//! Build a row major matrix from row vectors.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> rowMajor4(\r\n\t\tdetail::tvec4<T, P> const & v1, \r\n\t\tdetail::tvec4<T, P> const & v2,\r\n\t\tdetail::tvec4<T, P> const & v3, \r\n\t\tdetail::tvec4<T, P> const & v4);\r\n\r\n\t//! Build a row major matrix from other matrix.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> rowMajor4(\r\n\t\tdetail::tmat4x4<T, P> const & m);\r\n\r\n\t//! Build a column major matrix from column vectors.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat2x2<T, P> colMajor2(\r\n\t\tdetail::tvec2<T, P> const & v1, \r\n\t\tdetail::tvec2<T, P> const & v2);\r\n\t\t\r\n\t//! Build a column major matrix from other matrix.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat2x2<T, P> colMajor2(\r\n\t\tdetail::tmat2x2<T, P> const & m);\r\n\r\n\t//! Build a column major matrix from column vectors.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> colMajor3(\r\n\t\tdetail::tvec3<T, P> const & v1, \r\n\t\tdetail::tvec3<T, P> const & v2, \r\n\t\tdetail::tvec3<T, P> const & v3);\r\n\t\t\r\n\t//! Build a column major matrix from other matrix.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> colMajor3(\r\n\t\tdetail::tmat3x3<T, P> const & m);\r\n\t\t\r\n\t//! Build a column major matrix from column vectors.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> colMajor4(\r\n\t\tdetail::tvec4<T, P> const & v1, \r\n\t\tdetail::tvec4<T, P> const & v2, \r\n\t\tdetail::tvec4<T, P> const & v3, \r\n\t\tdetail::tvec4<T, P> const & v4);\r\n\t\t\t\t\r\n\t//! Build a column major matrix from other matrix.\r\n\t//! From GLM_GTX_matrix_major_storage extension.\r\n\ttemplate <typename T, precision P> \r\n\tdetail::tmat4x4<T, P> colMajor4(\r\n\t\tdetail::tmat4x4<T, P> const & m);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"matrix_major_storage.inl\"\r\n\r\n#endif//GLM_GTX_matrix_major_storage\r\n"
  },
  {
    "path": "gpu/glm/gtx/matrix_major_storage.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2006-04-19\r\n// Updated : 2009-02-19\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/matrix_major_storage.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat2x2<T, P> rowMajor2\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & v1, \r\n\t\tdetail::tvec2<T, P> const & v2\r\n\t)\r\n\t{\r\n\t\tdetail::tmat2x2<T, P> Result;\r\n\t\tResult[0][0] = v1.x;\r\n\t\tResult[1][0] = v1.y;\r\n\t\tResult[0][1] = v2.x;\r\n\t\tResult[1][1] = v2.y;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat2x2<T, P> rowMajor2(\r\n\t\tconst detail::tmat2x2<T, P>& m)\r\n\t{\r\n\t\tdetail::tmat2x2<T, P> Result;\r\n\t\tResult[0][0] = m[0][0];\r\n\t\tResult[0][1] = m[1][0];\r\n\t\tResult[1][0] = m[0][1];\r\n\t\tResult[1][1] = m[1][1];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> rowMajor3(\r\n\t\tconst detail::tvec3<T, P>& v1, \r\n\t\tconst detail::tvec3<T, P>& v2, \r\n\t\tconst detail::tvec3<T, P>& v3)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> Result;\r\n\t\tResult[0][0] = v1.x;\r\n\t\tResult[1][0] = v1.y;\r\n\t\tResult[2][0] = v1.z;\r\n\t\tResult[0][1] = v2.x;\r\n\t\tResult[1][1] = v2.y;\r\n\t\tResult[2][1] = v2.z;\r\n\t\tResult[0][2] = v3.x;\r\n\t\tResult[1][2] = v3.y;\r\n\t\tResult[2][2] = v3.z;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> rowMajor3(\r\n\t\tconst detail::tmat3x3<T, P>& m)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> Result;\r\n\t\tResult[0][0] = m[0][0];\r\n\t\tResult[0][1] = m[1][0];\r\n\t\tResult[0][2] = m[2][0];\r\n\t\tResult[1][0] = m[0][1];\r\n\t\tResult[1][1] = m[1][1];\r\n\t\tResult[1][2] = m[2][1];\r\n\t\tResult[2][0] = m[0][2];\r\n\t\tResult[2][1] = m[1][2];\r\n\t\tResult[2][2] = m[2][2];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> rowMajor4(\r\n\t\tconst detail::tvec4<T, P>& v1, \r\n\t\tconst detail::tvec4<T, P>& v2, \r\n\t\tconst detail::tvec4<T, P>& v3, \r\n\t\tconst detail::tvec4<T, P>& v4)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> Result;\r\n\t\tResult[0][0] = v1.x;\r\n\t\tResult[1][0] = v1.y;\r\n\t\tResult[2][0] = v1.z;\r\n\t\tResult[3][0] = v1.w;\r\n\t\tResult[0][1] = v2.x;\r\n\t\tResult[1][1] = v2.y;\r\n\t\tResult[2][1] = v2.z;\r\n\t\tResult[3][1] = v2.w;\r\n\t\tResult[0][2] = v3.x;\r\n\t\tResult[1][2] = v3.y;\r\n\t\tResult[2][2] = v3.z;\r\n\t\tResult[3][2] = v3.w;\r\n\t\tResult[0][3] = v4.x;\r\n\t\tResult[1][3] = v4.y;\r\n\t\tResult[2][3] = v4.z;\r\n\t\tResult[3][3] = v4.w;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> rowMajor4(\r\n\t\tconst detail::tmat4x4<T, P>& m)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> Result;\r\n\t\tResult[0][0] = m[0][0];\r\n\t\tResult[0][1] = m[1][0];\r\n\t\tResult[0][2] = m[2][0];\r\n\t\tResult[0][3] = m[3][0];\r\n\t\tResult[1][0] = m[0][1];\r\n\t\tResult[1][1] = m[1][1];\r\n\t\tResult[1][2] = m[2][1];\r\n\t\tResult[1][3] = m[3][1];\r\n\t\tResult[2][0] = m[0][2];\r\n\t\tResult[2][1] = m[1][2];\r\n\t\tResult[2][2] = m[2][2];\r\n\t\tResult[2][3] = m[3][2];\r\n\t\tResult[3][0] = m[0][3];\r\n\t\tResult[3][1] = m[1][3];\r\n\t\tResult[3][2] = m[2][3];\r\n\t\tResult[3][3] = m[3][3];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat2x2<T, P> colMajor2(\r\n\t\tconst detail::tvec2<T, P>& v1, \r\n\t\tconst detail::tvec2<T, P>& v2)\r\n\t{\r\n\t\treturn detail::tmat2x2<T, P>(v1, v2);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat2x2<T, P> colMajor2(\r\n\t\tconst detail::tmat2x2<T, P>& m)\r\n\t{\r\n\t\treturn detail::tmat2x2<T, P>(m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> colMajor3(\r\n\t\tconst detail::tvec3<T, P>& v1, \r\n\t\tconst detail::tvec3<T, P>& v2, \r\n\t\tconst detail::tvec3<T, P>& v3)\r\n\t{\r\n\t\treturn detail::tmat3x3<T, P>(v1, v2, v3);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> colMajor3(\r\n\t\tconst detail::tmat3x3<T, P>& m)\r\n\t{\r\n\t\treturn detail::tmat3x3<T, P>(m);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> colMajor4(\r\n\t\tconst detail::tvec4<T, P>& v1, \r\n\t\tconst detail::tvec4<T, P>& v2, \r\n\t\tconst detail::tvec4<T, P>& v3, \r\n\t\tconst detail::tvec4<T, P>& v4)\r\n\t{\r\n\t\treturn detail::tmat4x4<T, P>(v1, v2, v3, v4);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> colMajor4(\r\n\t\tconst detail::tmat4x4<T, P>& m)\r\n\t{\r\n\t\treturn detail::tmat4x4<T, P>(m);\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/matrix_operation.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_matrix_operation\r\n/// @file glm/gtx/matrix_operation.hpp\r\n/// @date 2009-08-29 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_matrix_operation GLM_GTX_matrix_operation\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Build diagonal matrices from vectors.\r\n/// \r\n/// <glm/gtx/matrix_operation.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_matrix_operation\r\n#define GLM_GTX_matrix_operation\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_matrix_operation extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_matrix_operation\r\n\t/// @{\r\n\r\n\t//! Build a diagonal matrix.\r\n\t//! From GLM_GTX_matrix_operation extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat2x2<T, P> diagonal2x2(\r\n\t\tdetail::tvec2<T, P> const & v);\r\n\r\n\t//! Build a diagonal matrix.\r\n\t//! From GLM_GTX_matrix_operation extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat2x3<T, P> diagonal2x3(\r\n\t\tdetail::tvec2<T, P> const & v);\r\n\r\n\t//! Build a diagonal matrix.\r\n\t//! From GLM_GTX_matrix_operation extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat2x4<T, P> diagonal2x4(\r\n\t\tdetail::tvec2<T, P> const & v);\r\n\r\n\t//! Build a diagonal matrix.\r\n\t//! From GLM_GTX_matrix_operation extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x2<T, P> diagonal3x2(\r\n\t\tdetail::tvec2<T, P> const & v);\r\n\r\n\t//! Build a diagonal matrix.\r\n\t//! From GLM_GTX_matrix_operation extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> diagonal3x3(\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\r\n\t//! Build a diagonal matrix.\r\n\t//! From GLM_GTX_matrix_operation extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x4<T, P> diagonal3x4(\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\r\n\t//! Build a diagonal matrix.\r\n\t//! From GLM_GTX_matrix_operation extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x2<T, P> diagonal4x2(\r\n\t\tdetail::tvec2<T, P> const & v);\r\n\r\n\t//! Build a diagonal matrix.\r\n\t//! From GLM_GTX_matrix_operation extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x3<T, P> diagonal4x3(\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\r\n\t//! Build a diagonal matrix.\r\n\t//! From GLM_GTX_matrix_operation extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> diagonal4x4(\r\n\t\tdetail::tvec4<T, P> const & v);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"matrix_operation.inl\"\r\n\r\n#endif//GLM_GTX_matrix_operation\r\n"
  },
  {
    "path": "gpu/glm/gtx/matrix_operation.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2009-08-29\r\n// Updated : 2009-08-29\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/matrix_operation.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat2x2<T, P> diagonal2x2\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tmat2x2<T, P> Result(static_cast<T>(1));\r\n\t\tResult[0][0] = v[0];\r\n\t\tResult[1][1] = v[1];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat2x3<T, P> diagonal2x3\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tmat2x3<T, P> Result(static_cast<T>(1));\r\n\t\tResult[0][0] = v[0];\r\n\t\tResult[1][1] = v[1];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat2x4<T, P> diagonal2x4\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tmat2x4<T, P> Result(static_cast<T>(1));\r\n\t\tResult[0][0] = v[0];\r\n\t\tResult[1][1] = v[1];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x2<T, P> diagonal3x2\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tmat3x2<T, P> Result(static_cast<T>(1));\r\n\t\tResult[0][0] = v[0];\r\n\t\tResult[1][1] = v[1];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> diagonal3x3\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> Result(static_cast<T>(1));\r\n\t\tResult[0][0] = v[0];\r\n\t\tResult[1][1] = v[1];\r\n\t\tResult[2][2] = v[2];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x4<T, P> diagonal3x4\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tmat3x4<T, P> Result(static_cast<T>(1));\r\n\t\tResult[0][0] = v[0];\r\n\t\tResult[1][1] = v[1];\r\n\t\tResult[2][2] = v[2];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> diagonal4x4\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> Result(static_cast<T>(1));\r\n\t\tResult[0][0] = v[0];\r\n\t\tResult[1][1] = v[1];\r\n\t\tResult[2][2] = v[2];\r\n\t\tResult[3][3] = v[3];\r\n\t\treturn Result;\t\t\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x3<T, P> diagonal4x3\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x3<T, P> Result(static_cast<T>(1));\r\n\t\tResult[0][0] = v[0];\r\n\t\tResult[1][1] = v[1];\r\n\t\tResult[2][2] = v[2];\r\n\t\treturn Result;\t\t\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x2<T, P> diagonal4x2\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tmat4x2<T, P> Result(static_cast<T>(1));\r\n\t\tResult[0][0] = v[0];\r\n\t\tResult[1][1] = v[1];\r\n\t\treturn Result;\t\t\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/matrix_query.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_matrix_query\r\n/// @file glm/gtx/matrix_query.hpp\r\n/// @date 2007-03-05 / 2011-08-28\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_vector_query (dependence)\r\n///\r\n/// @defgroup gtx_matrix_query GLM_GTX_matrix_query\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Query to evaluate matrix properties\r\n/// \r\n/// <glm/gtx/matrix_query.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_matrix_query\r\n#define GLM_GTX_matrix_query\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtx/vector_query.hpp\"\r\n#include <limits>\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_matrix_query extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_matrix_query\r\n\t/// @{\r\n\r\n\t/// Return whether a matrix a null matrix.\r\n\t/// From GLM_GTX_matrix_query extension.\r\n\ttemplate<typename T, precision P>\r\n\tbool isNull(detail::tmat2x2<T, P> const & m, T const & epsilon);\r\n\t\t\r\n\t/// Return whether a matrix a null matrix.\r\n\t/// From GLM_GTX_matrix_query extension.\r\n\ttemplate<typename T, precision P>\r\n\tbool isNull(detail::tmat3x3<T, P> const & m, T const & epsilon);\r\n\t\t\r\n\t/// Return whether a matrix is a null matrix.\r\n\t/// From GLM_GTX_matrix_query extension.\r\n\ttemplate<typename T, precision P>\r\n\tbool isNull(detail::tmat4x4<T, P> const & m, T const & epsilon);\r\n\t\t\t\r\n\t/// Return whether a matrix is an identity matrix.\r\n\t/// From GLM_GTX_matrix_query extension.\r\n\ttemplate<typename T, precision P, template <typename, precision> class matType>\r\n\tbool isIdentity(matType<T, P> const & m, T const & epsilon);\r\n\r\n\t/// Return whether a matrix is a normalized matrix.\r\n\t/// From GLM_GTX_matrix_query extension.\r\n\ttemplate<typename T, precision P>\r\n\tbool isNormalized(detail::tmat2x2<T, P> const & m, T const & epsilon);\r\n\r\n\t/// Return whether a matrix is a normalized matrix.\r\n\t/// From GLM_GTX_matrix_query extension.\r\n\ttemplate<typename T, precision P>\r\n\tbool isNormalized(detail::tmat3x3<T, P> const & m, T const & epsilon);\r\n\r\n\t/// Return whether a matrix is a normalized matrix.\r\n\t/// From GLM_GTX_matrix_query extension.\r\n\ttemplate<typename T, precision P>\r\n\tbool isNormalized(detail::tmat4x4<T, P> const & m, T const & epsilon);\r\n\r\n\t/// Return whether a matrix is an orthonormalized matrix.\r\n\t/// From GLM_GTX_matrix_query extension.\r\n\ttemplate<typename T, precision P, template <typename, precision> class matType>\r\n\tbool isOrthogonal(matType<T, P> const & m, T const & epsilon);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"matrix_query.inl\"\r\n\r\n#endif//GLM_GTX_matrix_query\r\n"
  },
  {
    "path": "gpu/glm/gtx/matrix_query.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-03-05\r\n// Updated : 2007-03-05\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/matrix_query.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Dependency:\r\n// - GLM core\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool isNull\r\n\t(\r\n\t\tdetail::tmat2x2<T, P> const & m,\r\n\t\tT const & epsilon)\r\n\t{\r\n\t\tbool result = true;\r\n\t\tfor(length_t i = 0; result && i < 2 ; ++i)\r\n\t\t\tresult = isNull(m[i], epsilon);\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool isNull\r\n\t(\r\n\t\tdetail::tmat3x3<T, P> const & m,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tbool result = true;\r\n\t\tfor(length_t i = 0; result && i < 3 ; ++i)\r\n\t\t\tresult = isNull(m[i], epsilon);\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool isNull\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tbool result = true;\r\n\t\tfor(length_t i = 0; result && i < 4 ; ++i)\r\n\t\t\tresult = isNull(m[i], epsilon);\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate<typename T, precision P, template <typename, precision> class matType>\r\n\tGLM_FUNC_QUALIFIER bool isIdentity\r\n\t(\r\n\t\tmatType<T, P> const & m,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tbool result = true;\r\n\t\tfor(length_t i(0); result && i < m[0].length(); ++i)\r\n\t\t{\r\n\t\t\tfor(length_t j(0); result && j < i ; ++j)\r\n\t\t\t\tresult = abs(m[i][j]) <= epsilon;\r\n\t\t\tif(result)\r\n\t\t\t\tresult = abs(m[i][i] - 1) <= epsilon;\r\n\t\t\tfor(length_t j(i + 1); result && j < m.length(); ++j)\r\n\t\t\t\tresult = abs(m[i][j]) <= epsilon;\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool isNormalized\r\n\t(\r\n\t\tdetail::tmat2x2<T, P> const & m,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tbool result(true);\r\n\t\tfor(length_t i(0); result && i < m.length(); ++i)\r\n\t\t\tresult = isNormalized(m[i], epsilon);\r\n\t\tfor(length_t i(0); result && i < m.length(); ++i)\r\n\t\t{\r\n\t\t\ttypename detail::tmat2x2<T, P>::col_type v;\r\n\t\t\tfor(length_t j(0); j < m.length(); ++j)\r\n\t\t\t\tv[j] = m[j][i];\r\n\t\t\tresult = isNormalized(v, epsilon);\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool isNormalized\r\n\t(\r\n\t\tdetail::tmat3x3<T, P> const & m,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tbool result(true);\r\n\t\tfor(length_t i(0); result && i < m.length(); ++i)\r\n\t\t\tresult = isNormalized(m[i], epsilon);\r\n\t\tfor(length_t i(0); result && i < m.length(); ++i)\r\n\t\t{\r\n\t\t\ttypename detail::tmat3x3<T, P>::col_type v;\r\n\t\t\tfor(length_t j(0); j < m.length(); ++j)\r\n\t\t\t\tv[j] = m[j][i];\r\n\t\t\tresult = isNormalized(v, epsilon);\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate<typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER bool isNormalized\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tbool result(true);\r\n\t\tfor(length_t i(0); result && i < m.length(); ++i)\r\n\t\t\tresult = isNormalized(m[i], epsilon);\r\n\t\tfor(length_t i(0); result && i < m.length(); ++i)\r\n\t\t{\r\n\t\t\ttypename detail::tmat4x4<T, P>::col_type v;\r\n\t\t\tfor(length_t j(0); j < m.length(); ++j)\r\n\t\t\t\tv[j] = m[j][i];\r\n\t\t\tresult = isNormalized(v, epsilon);\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate<typename T, precision P, template <typename, precision> class matType>\r\n\tGLM_FUNC_QUALIFIER bool isOrthogonal\r\n\t(\r\n\t\tmatType<T, P> const & m,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tbool result(true);\r\n\t\tfor(length_t i(0); result && i < m.length() - 1; ++i)\r\n\t\tfor(length_t j(i + 1); result && j < m.length(); ++j)\r\n\t\t\tresult = areOrthogonal(m[i], m[j], epsilon);\r\n\r\n\t\tif(result)\r\n\t\t{\r\n\t\t\tmatType<T, P> tmp = transpose(m);\r\n\t\t\tfor(length_t i(0); result && i < m.length() - 1 ; ++i)\r\n\t\t\tfor(length_t j(i + 1); result && j < m.length(); ++j)\r\n\t\t\t\tresult = areOrthogonal(tmp[i], tmp[j], epsilon);\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/mixed_product.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_mixed_product\r\n/// @file glm/gtx/mixed_product.hpp\r\n/// @date 2007-04-03 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_mixed_product GLM_GTX_mixed_producte\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Mixed product of 3 vectors.\r\n/// \r\n/// <glm/gtx/mixed_product.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_mixed_product\r\n#define GLM_GTX_mixed_product\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_mixed_product extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_mixed_product\r\n\t/// @{\r\n\r\n\t/// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension)\r\n\ttemplate <typename T, precision P> \r\n\tT mixedProduct(\r\n\t\tdetail::tvec3<T, P> const & v1, \r\n\t\tdetail::tvec3<T, P> const & v2, \r\n\t\tdetail::tvec3<T, P> const & v3);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"mixed_product.inl\"\r\n\r\n#endif//GLM_GTX_mixed_product\r\n"
  },
  {
    "path": "gpu/glm/gtx/mixed_product.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-04-03\r\n// Updated : 2008-09-17\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/mixed_product.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T mixedProduct\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v1,\r\n\t\tdetail::tvec3<T, P> const & v2,\r\n\t\tdetail::tvec3<T, P> const & v3\r\n\t)\r\n\t{\r\n\t\treturn dot(cross(v1, v2), v3);\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/multiple.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_multiple\r\n/// @file glm/gtx/multiple.hpp\r\n/// @date 2009-10-26 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_extented_min_max (dependence)\r\n///\r\n/// @defgroup gtx_multiple GLM_GTX_multiple\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Find the closest number of a number multiple of other number.\r\n/// \r\n/// <glm/gtx/multiple.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_multiple\r\n#define GLM_GTX_multiple\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_multiple extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_multiple\r\n\t/// @{\r\n\r\n\t/// Higher multiple number of Source.\r\n\t///\r\n\t/// @tparam genType Floating-point or integer scalar or vector types.\r\n\t/// @param Source \r\n\t/// @param Multiple Must be a null or positive value\r\n\t///\r\n\t/// @see gtx_multiple\r\n\ttemplate <typename genType>\r\n\tgenType higherMultiple(\r\n\t\tgenType const & Source,\r\n\t\tgenType const & Multiple);\r\n\r\n\t/// Lower multiple number of Source.\r\n\t///\r\n\t/// @tparam genType Floating-point or integer scalar or vector types.\r\n\t/// @param Source \r\n\t/// @param Multiple Must be a null or positive value\r\n\t///\r\n\t/// @see gtx_multiple\r\n\ttemplate <typename genType>\r\n\tgenType lowerMultiple(\r\n\t\tgenType const & Source,\r\n\t\tgenType const & Multiple);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"multiple.inl\"\r\n\r\n#endif//GLM_GTX_multiple\r\n"
  },
  {
    "path": "gpu/glm/gtx/multiple.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2009-10-26\r\n// Updated : 2011-06-07\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/multiple.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Dependency:\r\n// - GLM core\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <bool Signed>\r\n\tstruct higherMultiple\r\n\t{\r\n\t\ttemplate <typename genType>\r\n\t\tGLM_FUNC_QUALIFIER genType operator()\r\n\t\t(\r\n\t\t\tgenType const & Source,\r\n\t\t\tgenType const & Multiple\r\n\t\t)\r\n\t\t{\r\n\t\t\tif (Source > genType(0))\r\n\t\t\t{\r\n\t\t\t\tgenType Tmp = Source - genType(1);\r\n\t\t\t\treturn Tmp + (Multiple - (Tmp % Multiple));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\treturn Source + (-Source % Multiple);\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <>\r\n\tstruct higherMultiple<false>\r\n\t{\r\n\t\ttemplate <typename genType>\r\n\t\tGLM_FUNC_QUALIFIER genType operator()\r\n\t\t(\r\n\t\t\tgenType const & Source,\r\n\t\t\tgenType const & Multiple\r\n\t\t)\r\n\t\t{\r\n\t\t\tgenType Tmp = Source - genType(1);\r\n\t\t\treturn Tmp + (Multiple - (Tmp % Multiple));\r\n\t\t}\r\n\t};\r\n}//namespace detail\r\n\r\n\t//////////////////////\r\n\t// higherMultiple\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType higherMultiple\r\n\t(\r\n\t\tgenType const & Source,\r\n\t\tgenType const & Multiple\r\n\t)\r\n\t{\r\n\t\tdetail::higherMultiple<std::numeric_limits<genType>::is_signed> Compute;\r\n\t\treturn Compute(Source, Multiple);\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER float higherMultiple\r\n\t(\t\r\n\t\tfloat const & Source,\r\n\t\tfloat const & Multiple\r\n\t)\r\n\t{\r\n\t\tif (Source > float(0))\r\n\t\t{\r\n\t\t\tfloat Tmp = Source - float(1);\r\n\t\t\treturn Tmp + (Multiple - std::fmod(Tmp, Multiple));\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn Source + std::fmod(-Source, Multiple);\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER double higherMultiple\r\n\t(\r\n\t\tdouble const & Source,\r\n\t\tdouble const & Multiple\r\n\t)\r\n\t{\r\n\t\tif (Source > double(0))\r\n\t\t{\r\n\t\t\tdouble Tmp = Source - double(1);\r\n\t\t\treturn Tmp + (Multiple - std::fmod(Tmp, Multiple));\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn Source + std::fmod(-Source, Multiple);\r\n\t}\r\n\r\n\tVECTORIZE_VEC_VEC(higherMultiple)\r\n\r\n\t//////////////////////\r\n\t// lowerMultiple\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType lowerMultiple\r\n\t(\r\n\t\tgenType const & Source,\r\n\t\tgenType const & Multiple\r\n\t)\r\n\t{\r\n\t\tif (Source >= genType(0))\r\n\t\t\treturn Source - Source % Multiple;\r\n\t\telse\r\n\t\t{\r\n\t\t\tgenType Tmp = Source + genType(1);\r\n\t\t\treturn Tmp - Tmp % Multiple - Multiple;\r\n\t\t}\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER float lowerMultiple\r\n\t(\r\n\t\tfloat const & Source,\r\n\t\tfloat const & Multiple\r\n\t)\r\n\t{\r\n\t\tif (Source >= float(0))\r\n\t\t\treturn Source - std::fmod(Source, Multiple);\r\n\t\telse\r\n\t\t{\r\n\t\t\tfloat Tmp = Source + float(1);\r\n\t\t\treturn Tmp - std::fmod(Tmp, Multiple) - Multiple;\r\n\t\t}\r\n\t}\r\n\r\n\ttemplate <>\r\n\tGLM_FUNC_QUALIFIER double lowerMultiple\r\n\t(\r\n\t\tdouble const & Source,\r\n\t\tdouble const & Multiple\r\n\t)\r\n\t{\r\n\t\tif (Source >= double(0))\r\n\t\t\treturn Source - std::fmod(Source, Multiple);\r\n\t\telse\r\n\t\t{\r\n\t\t\tdouble Tmp = Source + double(1);\r\n\t\t\treturn Tmp - std::fmod(Tmp, Multiple) - Multiple;\r\n\t\t}\r\n\t}\r\n\r\n\tVECTORIZE_VEC_VEC(lowerMultiple)\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/noise.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#if(defined(GLM_MESSAGES))\r\n#\tpragma message(\"GLM: GLM_GTX_random extension is deprecated, include GLM_GTC_random (glm/gtc/noise.hpp) instead\")\r\n#endif\r\n\r\n// Promoted:\r\n#include \"../gtc/noise.hpp\"\r\n"
  },
  {
    "path": "gpu/glm/gtx/norm.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_norm\r\n/// @file glm/gtx/norm.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_quaternion (dependence)\r\n///\r\n/// @defgroup gtx_norm GLM_GTX_norm\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Various ways to compute vector norms.\r\n/// \r\n/// <glm/gtx/norm.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_norm\r\n#define GLM_GTX_norm\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtx/quaternion.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_norm extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_norm\r\n\t/// @{\r\n\r\n\t//! Returns the squared length of x.\r\n\t//! From GLM_GTX_norm extension.\r\n\ttemplate <typename T>\r\n\tT length2(\r\n\t\tT const & x);\r\n\r\n\t//! Returns the squared length of x.\r\n\t//! From GLM_GTX_norm extension.\r\n\ttemplate <typename genType>\r\n\ttypename genType::value_type length2(\r\n\t\tgenType const & x);\r\n\t\t\r\n\t//! Returns the squared distance between p0 and p1, i.e., length(p0 - p1).\r\n\t//! From GLM_GTX_norm extension.\r\n\ttemplate <typename T>\r\n\tT distance2(\r\n\t\tT const & p0,\r\n\t\tT const & p1);\r\n\t\t\r\n\t//! Returns the squared distance between p0 and p1, i.e., length(p0 - p1).\r\n\t//! From GLM_GTX_norm extension.\r\n\ttemplate <typename genType>\r\n\ttypename genType::value_type distance2(\r\n\t\tgenType const & p0,\r\n\t\tgenType const & p1);\r\n\r\n\t//! Returns the L1 norm between x and y.\r\n\t//! From GLM_GTX_norm extension.\r\n\ttemplate <typename T, precision P>\r\n\tT l1Norm(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<T, P> const & y);\r\n\t\t\r\n\t//! Returns the L1 norm of v.\r\n\t//! From GLM_GTX_norm extension.\r\n\ttemplate <typename T, precision P>\r\n\tT l1Norm(\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\t\t\r\n\t//! Returns the L2 norm between x and y.\r\n\t//! From GLM_GTX_norm extension.\r\n\ttemplate <typename T, precision P>\r\n\tT l2Norm(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<T, P> const & y);\r\n\t\t\r\n\t//! Returns the L2 norm of v.\r\n\t//! From GLM_GTX_norm extension.\r\n\ttemplate <typename T, precision P>\r\n\tT l2Norm(\r\n\t\tdetail::tvec3<T, P> const & x);\r\n\t\t\r\n\t//! Returns the L norm between x and y.\r\n\t//! From GLM_GTX_norm extension.\r\n\ttemplate <typename T, precision P>\r\n\tT lxNorm(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<T, P> const & y,\r\n\t\tunsigned int Depth);\r\n\r\n\t//! Returns the L norm of v.\r\n\t//! From GLM_GTX_norm extension.\r\n\ttemplate <typename T, precision P>\r\n\tT lxNorm(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tunsigned int Depth);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"norm.inl\"\r\n\r\n#endif//GLM_GTX_norm\r\n"
  },
  {
    "path": "gpu/glm/gtx/norm.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2008-07-24\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/norm.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T length2\r\n\t(\r\n\t\tT const & x\r\n\t)\r\n\t{\r\n\t\treturn x * x;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T length2\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn dot(x, x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T length2\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn dot(x, x);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T length2\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn dot(x, x);\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER T distance2\r\n\t(\r\n\t\tT const & p0,\r\n\t\tT const & p1\r\n\t)\r\n\t{\r\n\t\treturn length2(p1 - p0);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T distance2\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & p0,\r\n\t\tdetail::tvec2<T, P> const & p1\r\n\t)\r\n\t{\r\n\t\treturn length2(p1 - p0);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T distance2\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & p0,\r\n\t\tdetail::tvec3<T, P> const & p1\r\n\t)\r\n\t{\r\n\t\treturn length2(p1 - p0);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T distance2\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & p0,\r\n\t\tdetail::tvec4<T, P> const & p1\r\n\t)\r\n\t{\r\n\t\treturn length2(p1 - p0);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T l1Norm\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & a,\r\n\t\tdetail::tvec3<T, P> const & b\r\n\t)\r\n\t{\r\n\t\treturn abs(b.x - a.x) + abs(b.y - a.y) + abs(b.z - a.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T l1Norm\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn abs(v.x) + abs(v.y) + abs(v.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T l2Norm\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & a,\r\n\t\tdetail::tvec3<T, P> const & b\r\n\t)\r\n\t{\r\n\t\treturn length(b - a);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T l2Norm\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn length(v);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T lxNorm\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<T, P> const & y,\r\n\t\tunsigned int Depth\r\n\t)\r\n\t{\r\n\t\treturn pow(pow(y.x - x.x, T(Depth)) + pow(y.y - x.y, T(Depth)) + pow(y.z - x.z, T(Depth)), T(1) / T(Depth));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T lxNorm\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tunsigned int Depth\r\n\t)\r\n\t{\r\n\t\treturn pow(pow(v.x, T(Depth)) + pow(v.y, T(Depth)) + pow(v.z, T(Depth)), T(1) / T(Depth));\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/normal.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_normal\r\n/// @file glm/gtx/normal.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_extented_min_max (dependence)\r\n///\r\n/// @defgroup gtx_normal GLM_GTX_normal\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Compute the normal of a triangle.\r\n/// \r\n/// <glm/gtx/normal.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_normal\r\n#define GLM_GTX_normal\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_normal extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_normal\r\n\t/// @{\r\n\r\n\t//! Computes triangle normal from triangle points. \r\n\t//! From GLM_GTX_normal extension.\r\n    template <typename T, precision P> \r\n\tdetail::tvec3<T, P> triangleNormal(\r\n\t\tdetail::tvec3<T, P> const & p1, \r\n\t\tdetail::tvec3<T, P> const & p2, \r\n\t\tdetail::tvec3<T, P> const & p3);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"normal.inl\"\r\n\r\n#endif//GLM_GTX_normal\r\n"
  },
  {
    "path": "gpu/glm/gtx/normal.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2011-06-07\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/normal.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> triangleNormal\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & p1, \r\n\t\tdetail::tvec3<T, P> const & p2, \r\n\t\tdetail::tvec3<T, P> const & p3\r\n\t)\r\n\t{\r\n\t\treturn normalize(cross(p1 - p2, p1 - p3));\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/normalize_dot.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_normalize_dot\r\n/// @file glm/gtx/normalize_dot.hpp\r\n/// @date 2007-09-28 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_fast_square_root (dependence)\r\n///\r\n/// @defgroup gtx_normalize_dot GLM_GTX_normalize_dot\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Dot product of vectors that need to be normalize with a single square root.\r\n/// \r\n/// <glm/gtx/normalized_dot.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_normalize_dot\r\n#define GLM_GTX_normalize_dot\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtx/fast_square_root.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_normalize_dot extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_normalize_dot\r\n\t/// @{\r\n\r\n\t//! Normalize parameters and returns the dot product of x and y.\r\n\t//! It's faster that dot(normalize(x), normalize(y)).\r\n\t//! From GLM_GTX_normalize_dot extension.\r\n\ttemplate <typename genType> \r\n\ttypename genType::value_type normalizeDot(\r\n\t\tgenType const & x, \r\n\t\tgenType const & y);\r\n\r\n\t//! Normalize parameters and returns the dot product of x and y.\r\n\t//! Faster that dot(fastNormalize(x), fastNormalize(y)).\r\n\t//! From GLM_GTX_normalize_dot extension.\r\n\ttemplate <typename genType> \r\n\ttypename genType::value_type fastNormalizeDot(\r\n\t\tgenType const & x, \r\n\t\tgenType const & y);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"normalize_dot.inl\"\r\n\r\n#endif//GLM_GTX_normalize_dot\r\n"
  },
  {
    "path": "gpu/glm/gtx/normalize_dot.inl",
    "content": "//////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n//////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-09-28\r\n// Updated : 2008-10-07\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/normalize_dot.inl\r\n//////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType normalizeDot\r\n\t(\r\n\t\tgenType const & x, \r\n\t\tgenType const & y\r\n\t)\r\n\t{\r\n\t\treturn \r\n\t\t\tglm::dot(x, y) * \r\n\t\t\tglm::inversesqrt(glm::dot(x, x) * \r\n\t\t\tglm::dot(y, y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T normalizeDot\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x, \r\n\t\tdetail::tvec2<T, P> const & y\r\n\t)\r\n\t{\r\n\t\treturn \r\n\t\t\tglm::dot(x, y) * \r\n\t\t\tglm::inversesqrt(glm::dot(x, x) * \r\n\t\t\tglm::dot(y, y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T normalizeDot\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x, \r\n\t\tdetail::tvec3<T, P> const & y\r\n\t)\r\n\t{\r\n\t\treturn \r\n\t\t\tglm::dot(x, y) * \r\n\t\t\tglm::inversesqrt(glm::dot(x, x) * \r\n\t\t\tglm::dot(y, y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T normalizeDot\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & x, \r\n\t\tdetail::tvec4<T, P> const & y\r\n\t)\r\n\t{\r\n\t\treturn \r\n\t\t\tglm::dot(x, y) * \r\n\t\t\tglm::inversesqrt(glm::dot(x, x) * \r\n\t\t\tglm::dot(y, y));\r\n\t}\r\n\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType fastNormalizeDot\r\n\t(\r\n\t\tgenType const & x, \r\n\t\tgenType const & y\r\n\t)\r\n\t{\r\n\t\treturn \r\n\t\t\tglm::dot(x, y) * \r\n\t\t\tfastInverseSqrt(glm::dot(x, x) * \r\n\t\t\tglm::dot(y, y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T fastNormalizeDot\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x, \r\n\t\tdetail::tvec2<T, P> const & y\r\n\t)\r\n\t{\r\n\t\treturn \r\n\t\t\tglm::dot(x, y) * \r\n\t\t\tfastInverseSqrt(glm::dot(x, x) * \r\n\t\t\tglm::dot(y, y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T fastNormalizeDot\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x, \r\n\t\tdetail::tvec3<T, P> const & y\r\n\t)\r\n\t{\r\n\t\treturn \r\n\t\t\tglm::dot(x, y) * \r\n\t\t\tfastInverseSqrt(glm::dot(x, x) * \r\n\t\t\tglm::dot(y, y));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T fastNormalizeDot\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & x, \r\n\t\tdetail::tvec4<T, P> const & y\r\n\t)\r\n\t{\r\n\t\treturn \r\n\t\t\tglm::dot(x, y) * \r\n\t\t\tfastInverseSqrt(glm::dot(x, x) * \r\n\t\t\tglm::dot(y, y));\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/number_precision.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_number_precision\r\n/// @file glm/gtx/number_precision.hpp\r\n/// @date 2007-05-10 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_type_precision (dependence)\r\n/// @see gtc_quaternion (dependence)\r\n///\r\n/// @defgroup gtx_number_precision GLM_GTX_number_precision\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Defined size types.\r\n/// \r\n/// <glm/gtx/number_precision.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_number_precision\r\n#define GLM_GTX_number_precision\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtc/type_precision.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_number_precision extension included\")\r\n#endif\r\n\r\nnamespace glm{\r\nnamespace gtx\r\n{\r\n\t/////////////////////////////\r\n\t// Unsigned int vector types \r\n\r\n\t/// @addtogroup gtx_number_precision\r\n\t/// @{\r\n\r\n\ttypedef u8\t\t\tu8vec1;\t\t//!< \\brief 8bit unsigned integer scalar. (from GLM_GTX_number_precision extension)\r\n\ttypedef u16\t\t\tu16vec1;    //!< \\brief 16bit unsigned integer scalar. (from GLM_GTX_number_precision extension)\r\n\ttypedef u32\t\t\tu32vec1;    //!< \\brief 32bit unsigned integer scalar. (from GLM_GTX_number_precision extension)\r\n\ttypedef u64\t\t\tu64vec1;    //!< \\brief 64bit unsigned integer scalar. (from GLM_GTX_number_precision extension)\r\n\r\n\t//////////////////////\r\n\t// Float vector types \r\n\r\n\ttypedef f32\t\t\tf32vec1;    //!< \\brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension)\r\n\ttypedef f64\t\t\tf64vec1;    //!< \\brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension)\r\n\r\n\t//////////////////////\r\n\t// Float matrix types \r\n\r\n\ttypedef f32\t\t\tf32mat1;\t//!< \\brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension)\r\n\ttypedef f32\t\t\tf32mat1x1;\t//!< \\brief Single-precision floating-point scalar. (from GLM_GTX_number_precision extension)\r\n\ttypedef f64\t\t\tf64mat1;\t//!< \\brief Double-precision floating-point scalar. (from GLM_GTX_number_precision extension)\r\n\ttypedef f64\t\t\tf64mat1x1;\t//!< \\brief Double-precision floating-point scalar. (from GLM_GTX_number_precision extension)\r\n\r\n\t/// @}\r\n}//namespace gtx\r\n}//namespace glm\r\n\r\n#include \"number_precision.inl\"\r\n\r\n#endif//GLM_GTX_number_precision\r\n"
  },
  {
    "path": "gpu/glm/gtx/number_precision.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-05-10\r\n// Updated : 2007-05-10\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/number_precision.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\r\n}\r\n"
  },
  {
    "path": "gpu/glm/gtx/optimum_pow.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_optimum_pow\r\n/// @file glm/gtx/optimum_pow.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_optimum_pow GLM_GTX_optimum_pow\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Integer exponentiation of power functions.\r\n/// \r\n/// <glm/gtx/optimum_pow.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_optimum_pow\r\n#define GLM_GTX_optimum_pow\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_optimum_pow extension included\")\r\n#endif\r\n\r\nnamespace glm{\r\nnamespace gtx\r\n{\r\n\t/// @addtogroup gtx_optimum_pow\r\n\t/// @{\r\n\r\n\t//! Returns x raised to the power of 2.\r\n\t//! From GLM_GTX_optimum_pow extension.\r\n\ttemplate <typename genType>\r\n\tgenType pow2(const genType& x);\r\n\r\n\t//! Returns x raised to the power of 3.\r\n\t//! From GLM_GTX_optimum_pow extension.\r\n\ttemplate <typename genType>\r\n\tgenType pow3(const genType& x);\r\n\r\n\t//! Returns x raised to the power of 4.\r\n\t//! From GLM_GTX_optimum_pow extension.\r\n\ttemplate <typename genType>\r\n\tgenType pow4(const genType& x);\r\n\r\n\t//! Checks if the parameter is a power of 2 number.\r\n\t//! From GLM_GTX_optimum_pow extension.\r\n\tbool powOfTwo(int num);\r\n\r\n\t//! Checks to determine if the parameter component are power of 2 numbers.\r\n\t//! From GLM_GTX_optimum_pow extension.\r\n\ttemplate <precision P>\r\n\tdetail::tvec2<bool, P> powOfTwo(detail::tvec2<int, P> const & x);\r\n\r\n\t//! Checks to determine if the parameter component are power of 2 numbers.\r\n\t//! From GLM_GTX_optimum_pow extension.\r\n\ttemplate <precision P>\r\n\tdetail::tvec3<bool, P> powOfTwo(detail::tvec3<int, P> const & x);\r\n\r\n\t//! Checks to determine if the parameter component are power of 2 numbers.\r\n\t//! From GLM_GTX_optimum_pow extension.\r\n\ttemplate <precision P>\r\n\tdetail::tvec4<bool, P> powOfTwo(detail::tvec4<int, P> const & x);\r\n\r\n\t/// @}\r\n}//namespace gtx\r\n}//namespace glm\r\n\r\n#include \"optimum_pow.inl\"\r\n\r\n#endif//GLM_GTX_optimum_pow\r\n"
  },
  {
    "path": "gpu/glm/gtx/optimum_pow.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2005-12-27\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/optimum_pow.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType pow2(genType const & x)\r\n\t{\r\n\t\treturn x * x;\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType pow3(genType const & x)\r\n\t{\r\n\t\treturn x * x * x;\r\n\t}\r\n\r\n\ttemplate <typename genType>\r\n\tGLM_FUNC_QUALIFIER genType pow4(genType const & x)\r\n\t{\r\n\t\treturn (x * x) * (x * x);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER bool powOfTwo(int x)\r\n\t{\r\n\t\treturn !(x & (x - 1));\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<bool, P> powOfTwo(detail::tvec2<int, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec2<bool, P>(\r\n\t\t\tpowOfTwo(x.x),\r\n\t\t\tpowOfTwo(x.y));\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<bool, P> powOfTwo(detail::tvec3<int, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec3<bool, P>(\r\n\t\t\tpowOfTwo(x.x),\r\n\t\t\tpowOfTwo(x.y),\r\n\t\t\tpowOfTwo(x.z));\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P> powOfTwo(detail::tvec4<int, P> const & x)\r\n\t{\r\n\t\treturn detail::tvec4<bool, P>(\r\n\t\t\tpowOfTwo(x.x),\r\n\t\t\tpowOfTwo(x.y),\r\n\t\t\tpowOfTwo(x.z),\r\n\t\t\tpowOfTwo(x.w));\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/orthonormalize.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_orthonormalize\r\n/// @file glm/gtx/orthonormalize.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_extented_min_max (dependence)\r\n///\r\n/// @defgroup gtx_orthonormalize GLM_GTX_orthonormalize\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Orthonormalize matrices.\r\n/// \r\n/// <glm/gtx/orthonormalize.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_orthonormalize\r\n#define GLM_GTX_orthonormalize\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_orthonormalize extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_orthonormalize\r\n\t/// @{\r\n\r\n\t//! Returns the orthonormalized matrix of m.\r\n\t//! From GLM_GTX_orthonormalize extension.\r\n\ttemplate <typename T, precision P> \r\n\tdetail::tmat3x3<T, P> orthonormalize(\r\n\t\tconst detail::tmat3x3<T, P>& m);\r\n\t\t\r\n    //! Orthonormalizes x according y.\r\n\t//! From GLM_GTX_orthonormalize extension.\r\n\ttemplate <typename T, precision P> \r\n\tdetail::tvec3<T, P> orthonormalize(\r\n\t\tconst detail::tvec3<T, P>& x, \r\n\t\tconst detail::tvec3<T, P>& y);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"orthonormalize.inl\"\r\n\r\n#endif//GLM_GTX_orthonormalize\r\n"
  },
  {
    "path": "gpu/glm/gtx/orthonormalize.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2005-12-21\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/orthonormalize.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> orthonormalize\r\n\t(\r\n\t\tconst detail::tmat3x3<T, P>& m\r\n\t)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> r = m;\r\n\r\n\t\tr[0] = normalize(r[0]);\r\n\r\n\t\tfloat d0 = dot(r[0], r[1]);\r\n\t\tr[1] -= r[0] * d0;\r\n\t\tr[1] = normalize(r[1]);\r\n\r\n\t\tfloat d1 = dot(r[1], r[2]);\r\n\t\td0 = dot(r[0], r[2]);\r\n\t\tr[2] -= r[0] * d0 + r[1] * d1;\r\n\t\tr[2] = normalize(r[2]);\r\n\r\n\t\treturn r;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> orthonormalize\r\n\t(\r\n\t\tconst detail::tvec3<T, P>& x, \r\n\t\tconst detail::tvec3<T, P>& y\r\n\t)\r\n\t{\r\n\t\treturn normalize(x - y * dot(y, x));\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/perpendicular.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_perpendicular\r\n/// @file glm/gtx/perpendicular.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_projection (dependence)\r\n///\r\n/// @defgroup gtx_perpendicular GLM_GTX_perpendicular\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Perpendicular of a vector from other one\r\n/// \r\n/// <glm/gtx/perpendicular.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_perpendicular\r\n#define GLM_GTX_perpendicular\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtx/projection.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_perpendicular extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_perpendicular\r\n\t/// @{\r\n\r\n\t//! Projects x a perpendicular axis of Normal.\r\n\t//! From GLM_GTX_perpendicular extension.\r\n\ttemplate <typename vecType> \r\n\tvecType perp(\r\n\t\tvecType const & x, \r\n\t\tvecType const & Normal);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"perpendicular.inl\"\r\n\r\n#endif//GLM_GTX_perpendicular\r\n"
  },
  {
    "path": "gpu/glm/gtx/perpendicular.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2009-03-06\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/perpendicular.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename vecType> \r\n\tGLM_FUNC_QUALIFIER vecType perp\r\n\t(\r\n\t\tvecType const & x, \r\n\t\tvecType const & Normal\r\n\t)\r\n\t{\r\n\t\treturn x - proj(x, Normal);\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/polar_coordinates.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_polar_coordinates\r\n/// @file glm/gtx/polar_coordinates.hpp\r\n/// @date 2007-03-06 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_polar_coordinates GLM_GTX_polar_coordinates\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Conversion from Euclidean space to polar space and revert.\r\n/// \r\n/// <glm/gtx/polar_coordinates.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_polar_coordinates\r\n#define GLM_GTX_polar_coordinates\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_polar_coordinates extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_polar_coordinates\r\n\t/// @{\r\n\r\n\t/// Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude.\r\n\t///\r\n\t/// @see gtx_polar_coordinates\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> polar(\r\n\t\tdetail::tvec3<T, P> const & euclidean);\r\n\r\n\t/// Convert Polar to Euclidean coordinates.\r\n\t///\r\n\t/// @see gtx_polar_coordinates\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> euclidean(\r\n\t\tdetail::tvec2<T, P> const & polar);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"polar_coordinates.inl\"\r\n\r\n#endif//GLM_GTX_polar_coordinates\r\n"
  },
  {
    "path": "gpu/glm/gtx/polar_coordinates.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-03-06\r\n// Updated : 2009-05-01\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/polar_coordinates.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> polar\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & euclidean\r\n\t)\r\n\t{\r\n\t\tT const Length(length(euclidean));\r\n\t\tdetail::tvec3<T, P> const tmp(euclidean / Length);\r\n\t\tT const xz_dist(sqrt(tmp.x * tmp.x + tmp.z * tmp.z));\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tatan(xz_dist, tmp.y),\t// latitude\r\n\t\t\tatan(tmp.x, tmp.z),\t\t// longitude\r\n\t\t\txz_dist);\t\t\t\t// xz distance\r\n#else\r\n#\t\tpragma message(\"GLM: polar function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tdegrees(atan(xz_dist, tmp.y)),\t// latitude\r\n\t\t\tdegrees(atan(tmp.x, tmp.z)),\t// longitude\r\n\t\t\txz_dist);\t\t\t\t\t\t// xz distance\r\n#endif\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> euclidean\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & polar\r\n\t)\r\n\t{\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const latitude(polar.x);\r\n\t\tT const longitude(polar.y);\r\n#else\r\n#\t\tpragma message(\"GLM: euclidean function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const latitude(radians(polar.x));\r\n\t\tT const longitude(radians(polar.y));\r\n#endif\r\n\r\n\t\treturn detail::tvec3<T, P>(\r\n\t\t\tcos(latitude) * sin(longitude),\r\n\t\t\tsin(latitude),\r\n\t\t\tcos(latitude) * cos(longitude));\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/projection.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_projection\r\n/// @file glm/gtx/projection.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_projection GLM_GTX_projection\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Projection of a vector to other one\r\n/// \r\n/// <glm/gtx/projection.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_projection\r\n#define GLM_GTX_projection\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_projection extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_projection\r\n\t/// @{\r\n\r\n\t//! Projects x on Normal.\r\n\t//! From GLM_GTX_projection extension.\r\n\ttemplate <typename vecType> \r\n\tvecType proj(\r\n\t\tvecType const & x, \r\n\t\tvecType const & Normal);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"projection.inl\"\r\n\r\n#endif//GLM_GTX_projection\r\n"
  },
  {
    "path": "gpu/glm/gtx/projection.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2009-03-06\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/projection.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename vecType> \r\n\tGLM_FUNC_QUALIFIER vecType proj\r\n\t(\r\n\t\tvecType const & x, \r\n\t\tvecType const & Normal\r\n\t)\r\n\t{\r\n\t\treturn glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/quaternion.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_quaternion\r\n/// @file glm/gtx/quaternion.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_extented_min_max (dependence)\r\n///\r\n/// @defgroup gtx_quaternion GLM_GTX_quaternion\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Extented quaternion types and functions\r\n/// \r\n/// <glm/gtx/quaternion.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_quaternion\r\n#define GLM_GTX_quaternion\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtc/constants.hpp\"\r\n#include \"../gtc/quaternion.hpp\"\r\n#include \"../gtx/norm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_quaternion extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_quaternion\r\n\t/// @{\r\n\r\n\t//! Compute a cross product between a quaternion and a vector.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tvec3<T, P> cross(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\r\n\t//! Compute a cross product between a vector and a quaternion.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tvec3<T, P> cross(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tdetail::tquat<T, P> const & q);\r\n\r\n\t//! Compute a point on a path according squad equation. \r\n\t//! q1 and q2 are control points; s1 and s2 are intermediate control points.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tquat<T, P> squad(\r\n\t\tdetail::tquat<T, P> const & q1,\r\n\t\tdetail::tquat<T, P> const & q2,\r\n\t\tdetail::tquat<T, P> const & s1,\r\n\t\tdetail::tquat<T, P> const & s2,\r\n\t\tT const & h);\r\n\r\n\t//! Returns an intermediate control point for squad interpolation.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tquat<T, P> intermediate(\r\n\t\tdetail::tquat<T, P> const & prev,\r\n\t\tdetail::tquat<T, P> const & curr,\r\n\t\tdetail::tquat<T, P> const & next);\r\n\r\n\t//! Returns a exp of a quaternion.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tquat<T, P> exp(\r\n\t\tdetail::tquat<T, P> const & q);\r\n\r\n\t//! Returns a log of a quaternion.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tquat<T, P> log(\r\n\t\tdetail::tquat<T, P> const & q);\r\n\r\n\t/// Returns x raised to the y power.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tquat<T, P> pow(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tT const & y);\r\n\r\n\t//! Returns quarternion square root.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\t//template<typename T, precision P>\r\n\t//detail::tquat<T, P> sqrt(\r\n\t//\tdetail::tquat<T, P> const & q);\r\n\r\n\t//! Rotates a 3 components vector by a quaternion.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tvec3<T, P> rotate(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\r\n\t/// Rotates a 4 components vector by a quaternion.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tvec4<T, P> rotate(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tvec4<T, P> const & v);\r\n\r\n\t/// Extract the real component of a quaternion.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tT extractRealComponent(\r\n\t\tdetail::tquat<T, P> const & q);\r\n\r\n\t/// Converts a quaternion to a 3 * 3 matrix.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tmat3x3<T, P> toMat3(\r\n\t\tdetail::tquat<T, P> const & x){return mat3_cast(x);}\r\n\r\n\t/// Converts a quaternion to a 4 * 4 matrix.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tmat4x4<T, P> toMat4(\r\n\t\tdetail::tquat<T, P> const & x){return mat4_cast(x);}\r\n\r\n\t/// Converts a 3 * 3 matrix to a quaternion.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tquat<T, P> toQuat(\r\n\t\tdetail::tmat3x3<T, P> const & x){return quat_cast(x);}\r\n\r\n\t/// Converts a 4 * 4 matrix to a quaternion.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tquat<T, P> toQuat(\r\n\t\tdetail::tmat4x4<T, P> const & x){return quat_cast(x);}\r\n\r\n\t/// Quaternion interpolation using the rotation short path.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tquat<T, P> shortMix(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y,\r\n\t\tT const & a);\r\n\r\n\t/// Quaternion normalized linear interpolation.\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tquat<T, P> fastMix(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y,\r\n\t\tT const & a);\r\n\r\n\t/// Compute the rotation between two vectors.\r\n\t/// param orig vector, needs to be normalized\r\n\t/// param dest vector, needs to be normalized\r\n\t///\r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tdetail::tquat<T, P> rotation(\r\n\t\tdetail::tvec3<T, P> const & orig, \r\n\t\tdetail::tvec3<T, P> const & dest);\r\n\r\n\t/// Returns the squared length of x.\r\n\t/// \r\n\t/// @see gtx_quaternion\r\n\ttemplate<typename T, precision P>\r\n\tT length2(detail::tquat<T, P> const & q);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"quaternion.inl\"\r\n\r\n#endif//GLM_GTX_quaternion\r\n"
  },
  {
    "path": "gpu/glm/gtx/quaternion.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2008-11-27\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/quaternion.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include <limits>\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> cross\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn inverse(q) * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> cross\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn q * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> squad\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q1,\r\n\t\tdetail::tquat<T, P> const & q2,\r\n\t\tdetail::tquat<T, P> const & s1,\r\n\t\tdetail::tquat<T, P> const & s2,\r\n\t\tT const & h)\r\n\t{\r\n\t\treturn mix(mix(q1, q2, h), mix(s1, s2, h), T(2) * (T(1) - h) * h);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> intermediate\r\n\t(\r\n\t\tdetail::tquat<T, P> const & prev,\r\n\t\tdetail::tquat<T, P> const & curr,\r\n\t\tdetail::tquat<T, P> const & next\r\n\t)\r\n\t{\r\n\t\tdetail::tquat<T, P> invQuat = inverse(curr);\r\n\t\treturn exp((log(next + invQuat) + log(prev + invQuat)) / T(-4)) * curr;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> exp\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> u(q.x, q.y, q.z);\r\n\t\tfloat Angle = glm::length(u);\r\n\t\tdetail::tvec3<T, P> v(u / Angle);\r\n\t\treturn detail::tquat<T, P>(cos(Angle), sin(Angle) * v);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> log\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\tif((q.x == static_cast<T>(0)) && (q.y == static_cast<T>(0)) && (q.z == static_cast<T>(0)))\r\n\t\t{\r\n\t\t\tif(q.w > T(0))\r\n\t\t\t\treturn detail::tquat<T, P>(log(q.w), T(0), T(0), T(0));\r\n\t\t\telse if(q.w < T(0))\r\n\t\t\t\treturn detail::tquat<T, P>(log(-q.w), T(3.1415926535897932384626433832795), T(0),T(0));\r\n\t\t\telse\r\n\t\t\t\treturn detail::tquat<T, P>(std::numeric_limits<T>::infinity(), std::numeric_limits<T>::infinity(), std::numeric_limits<T>::infinity(), std::numeric_limits<T>::infinity());\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tT Vec3Len = sqrt(q.x * q.x + q.y * q.y + q.z * q.z);\r\n\t\t\tT QuatLen = sqrt(Vec3Len * Vec3Len + q.w * q.w);\r\n\t\t\tT t = atan(Vec3Len, T(q.w)) / Vec3Len;\r\n\t\t\treturn detail::tquat<T, P>(t * q.x, t * q.y, t * q.z, log(QuatLen));\r\n\t\t}\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> pow\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tT const & y\r\n\t)\r\n\t{\r\n\t\tif(abs(x.w) > T(0.9999))\r\n\t\t\treturn x;\r\n\t\tfloat Angle = acos(y);\r\n\t\tfloat NewAngle = Angle * y;\r\n\t\tfloat Div = sin(NewAngle) / sin(Angle);\r\n\t\treturn detail::tquat<T, P>(\r\n\t\t\tcos(NewAngle),\r\n\t\t\tx.x * Div,\r\n\t\t\tx.y * Div,\r\n\t\t\tx.z * Div);\r\n\t}\r\n\r\n\t//template <typename T, precision P>\r\n\t//GLM_FUNC_QUALIFIER detail::tquat<T, P> sqrt\r\n\t//(\r\n\t//\tdetail::tquat<T, P> const & q\r\n\t//)\r\n\t//{\r\n\t//\tT q0 = static_cast<T>(1) - dot(q, q);\r\n\t//\treturn T(2) * (T(1) + q0) * q;\r\n\t//}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> rotate\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn q * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> rotate\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tdetail::tvec4<T, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn q * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T extractRealComponent\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\tT w = static_cast<T>(1.0) - q.x * q.x - q.y * q.y - q.z * q.z;\r\n\t\tif(w < T(0))\r\n\t\t\treturn T(0);\r\n\t\telse\r\n\t\t\treturn -sqrt(w);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T length2\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q\r\n\t)\r\n\t{\r\n\t\treturn q.x * q.x + q.y * q.y + q.z * q.z + q.w * q.w;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> shortMix\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y,\r\n\t\tT const & a\r\n\t)\r\n\t{\r\n\t\tif(a <= T(0)) return x;\r\n\t\tif(a >= T(1)) return y;\r\n\r\n\t\tT fCos = dot(x, y);\r\n\t\tdetail::tquat<T, P> y2(y); //BUG!!! tquat<T> y2;\r\n\t\tif(fCos < T(0))\r\n\t\t{\r\n\t\t\ty2 = -y;\r\n\t\t\tfCos = -fCos;\r\n\t\t}\r\n\r\n\t\t//if(fCos > 1.0f) // problem\r\n\t\tT k0, k1;\r\n\t\tif(fCos > T(0.9999))\r\n\t\t{\r\n\t\t\tk0 = static_cast<T>(1) - a;\r\n\t\t\tk1 = static_cast<T>(0) + a; //BUG!!! 1.0f + a;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tT fSin = sqrt(T(1) - fCos * fCos);\r\n\t\t\tT fAngle = atan(fSin, fCos);\r\n\t\t\tT fOneOverSin = static_cast<T>(1) / fSin;\r\n\t\t\tk0 = sin((T(1) - a) * fAngle) * fOneOverSin;\r\n\t\t\tk1 = sin((T(0) + a) * fAngle) * fOneOverSin;\r\n\t\t}\r\n\r\n\t\treturn detail::tquat<T, P>(\r\n\t\t\tk0 * x.w + k1 * y2.w,\r\n\t\t\tk0 * x.x + k1 * y2.x,\r\n\t\t\tk0 * x.y + k1 * y2.y,\r\n\t\t\tk0 * x.z + k1 * y2.z);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> fastMix\r\n\t(\r\n\t\tdetail::tquat<T, P> const & x,\r\n\t\tdetail::tquat<T, P> const & y,\r\n\t\tT const & a\r\n\t)\r\n\t{\r\n\t\treturn glm::normalize(x * (T(1) - a) + (y * a));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> rotation\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & orig,\r\n\t\tdetail::tvec3<T, P> const & dest\r\n\t)\r\n\t{\r\n\t\tT cosTheta = dot(orig, dest);\r\n\t\tdetail::tvec3<T, P> rotationAxis;\r\n\r\n\t\tif(cosTheta < T(-1) + epsilon<T>())\r\n\t\t{\r\n\t\t\t// special case when vectors in opposite directions :\r\n\t\t\t// there is no \"ideal\" rotation axis\r\n\t\t\t// So guess one; any will do as long as it's perpendicular to start\r\n\t\t\t// This implementation favors a rotation around the Up axis (Y),\r\n\t\t\t// since it's often what you want to do.\r\n\t\t\trotationAxis = cross(detail::tvec3<T, P>(0, 0, 1), orig);\r\n\t\t\tif(length2(rotationAxis) < epsilon<T>()) // bad luck, they were parallel, try again!\r\n\t\t\t\trotationAxis = cross(detail::tvec3<T, P>(1, 0, 0), orig);\r\n\r\n\t\t\trotationAxis = normalize(rotationAxis);\r\n\t\t\treturn angleAxis(pi<T>(), rotationAxis);\r\n\t\t}\r\n\r\n\t\t// Implementation from Stan Melax's Game Programming Gems 1 article\r\n\t\trotationAxis = cross(orig, dest);\r\n\r\n\t\tT s = sqrt((T(1) + cosTheta) * T(2));\r\n\t\tT invs = static_cast<T>(1) / s;\r\n\r\n\t\treturn detail::tquat<T, P>(\r\n\t\t\ts * T(0.5f), \r\n\t\t\trotationAxis.x * invs,\r\n\t\t\trotationAxis.y * invs,\r\n\t\t\trotationAxis.z * invs);\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/random.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#if(defined(GLM_MESSAGES))\r\n#\tpragma message(\"GLM: GLM_GTX_random extension is deprecated, include GLM_GTC_random instead\")\r\n#endif\r\n\r\n// Promoted:\r\n#include \"../gtc/random.hpp\"\r\n"
  },
  {
    "path": "gpu/glm/gtx/raw_data.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_raw_data\r\n/// @file glm/gtx/raw_data.hpp\r\n/// @date 2008-11-19 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_raw_data GLM_GTX_raw_data\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Projection of a vector to other one\r\n/// \r\n/// <glm/gtx/raw_data.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_raw_data\r\n#define GLM_GTX_raw_data\r\n\r\n// Dependencies\r\n#include \"../detail/setup.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_raw_data extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_raw_data\r\n\t/// @{\r\n\r\n\t//! Type for byte numbers. \r\n\t//! From GLM_GTX_raw_data extension.\r\n\ttypedef detail::uint8\t\tbyte;\r\n\r\n\t//! Type for word numbers. \r\n\t//! From GLM_GTX_raw_data extension.\r\n\ttypedef detail::uint16\t\tword;\r\n\r\n\t//! Type for dword numbers. \r\n\t//! From GLM_GTX_raw_data extension.\r\n\ttypedef detail::uint32\t\tdword;\r\n\r\n\t//! Type for qword numbers. \r\n\t//! From GLM_GTX_raw_data extension.\r\n\ttypedef detail::uint64\t\tqword;\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"raw_data.inl\"\r\n\r\n#endif//GLM_GTX_raw_data\r\n"
  },
  {
    "path": "gpu/glm/gtx/raw_data.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2008-11-19\r\n// Updated : 2008-11-19\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/raw_data.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Dependency:\r\n// - GLM core\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n"
  },
  {
    "path": "gpu/glm/gtx/reciprocal.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#if(defined(GLM_MESSAGES))\r\n#\tpragma message(\"GLM: GLM_GTX_reciprocal extension is deprecated, include GLM_GTC_reciprocal instead\")\r\n#endif\r\n"
  },
  {
    "path": "gpu/glm/gtx/rotate_normalized_axis.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_rotate_normalized_axis\r\n/// @file glm/gtx/rotate_normalized_axis.hpp\r\n/// @date 2012-12-13 / 2012-12-13\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_matrix_transform\r\n/// @see gtc_quaternion\r\n/// \r\n/// @defgroup gtx_rotate_normalized_axis GLM_GTX_rotate_normalized_axis\r\n/// @ingroup gtc\r\n/// \r\n/// @brief Quaternions and matrices rotations around normalized axis.\r\n/// \r\n/// <glm/gtx/rotate_normalized_axis.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_rotate_normalized_axis\r\n#define GLM_GTX_rotate_normalized_axis\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtc/epsilon.hpp\"\r\n#include \"../gtc/quaternion.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_rotate_normalized_axis extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_rotate_normalized_axis\r\n\t/// @{\r\n\r\n\t/// Builds a rotation 4 * 4 matrix created from a normalized axis and an angle. \r\n\t/// \r\n\t/// @param m Input matrix multiplied by this rotation matrix.\r\n\t/// @param angle Rotation angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.\r\n\t/// @param axis Rotation axis, must be normalized.\r\n\t/// @tparam T Value type used to build the matrix. Currently supported: half (not recommanded), float or double.\r\n\t/// \r\n\t/// @see gtx_rotate_normalized_axis\r\n\t/// @see - rotate(T angle, T x, T y, T z) \r\n\t/// @see - rotate(detail::tmat4x4<T, P> const & m, T angle, T x, T y, T z) \r\n\t/// @see - rotate(T angle, detail::tvec3<T, P> const & v) \r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> rotateNormalizedAxis(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & axis);\r\n\r\n\t/// Rotates a quaternion from a vector of 3 components normalized axis and an angle.\r\n\t/// \r\n\t/// @param q Source orientation\r\n\t/// @param angle Angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.\r\n\t/// @param axis Normalized axis of the rotation, must be normalized.\r\n\t/// \r\n\t/// @see gtx_rotate_normalized_axis\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tquat<T, P> rotateNormalizedAxis(\r\n\t\tdetail::tquat<T, P> const & q,\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & axis);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"rotate_normalized_axis.inl\"\r\n\r\n#endif//GLM_GTX_rotate_normalized_axis\r\n"
  },
  {
    "path": "gpu/glm/gtx/rotate_normalized_axis.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_rotate_normalized_axis\r\n/// @file glm/gtx/rotate_normalized_axis.inl\r\n/// @date 2012-12-13 / 2012-12-13\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> rotateNormalizedAxis\r\n\t(\r\n\t\tdetail::tmat4x4<T, P> const & m,\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT a = angle;\r\n#else\r\n#\t\tpragma message(\"GLM: rotateNormalizedAxis function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT a = radians(angle);\r\n#endif\r\n\t\tT c = cos(a);\r\n\t\tT s = sin(a);\r\n\r\n\t\tdetail::tvec3<T, P> axis = v;\r\n\r\n\t\tdetail::tvec3<T, P> temp = (T(1) - c) * axis;\r\n\r\n\t\tdetail::tmat4x4<T, P> Rotate(detail::tmat4x4<T, P>::_null);\r\n\t\tRotate[0][0] = c + temp[0] * axis[0];\r\n\t\tRotate[0][1] = 0 + temp[0] * axis[1] + s * axis[2];\r\n\t\tRotate[0][2] = 0 + temp[0] * axis[2] - s * axis[1];\r\n\r\n\t\tRotate[1][0] = 0 + temp[1] * axis[0] - s * axis[2];\r\n\t\tRotate[1][1] = c + temp[1] * axis[1];\r\n\t\tRotate[1][2] = 0 + temp[1] * axis[2] + s * axis[0];\r\n\r\n\t\tRotate[2][0] = 0 + temp[2] * axis[0] + s * axis[1];\r\n\t\tRotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0];\r\n\t\tRotate[2][2] = c + temp[2] * axis[2];\r\n\r\n\t\tdetail::tmat4x4<T, P> Result(detail::tmat4x4<T, P>::_null);\r\n\t\tResult[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2];\r\n\t\tResult[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2];\r\n\t\tResult[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2];\r\n\t\tResult[3] = m[3];\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tquat<T, P> rotateNormalizedAxis\r\n\t(\r\n\t\tdetail::tquat<T, P> const & q, \r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & v\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> Tmp = v;\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const AngleRad(angle);\r\n#else\r\n#\t\tpragma message(\"GLM: rotateNormalizedAxis function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const AngleRad = radians(angle);\r\n#endif\r\n\t\tT const Sin = sin(AngleRad * T(0.5));\r\n\r\n\t\treturn q * detail::tquat<T, P>(cos(AngleRad * static_cast<T>(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin);\r\n\t\t//return gtc::quaternion::cross(q, detail::tquat<T, P>(cos(AngleRad * T(0.5)), Tmp.x * fSin, Tmp.y * fSin, Tmp.z * fSin));\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/rotate_vector.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_rotate_vector\r\n/// @file glm/gtx/rotate_vector.hpp\r\n/// @date 2006-11-02 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_transform (dependence)\r\n///\r\n/// @defgroup gtx_rotate_vector GLM_GTX_rotate_vector\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Function to directly rotate a vector\r\n/// \r\n/// <glm/gtx/rotate_vector.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_rotate_vector\r\n#define GLM_GTX_rotate_vector\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtx/transform.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_rotate_vector extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_rotate_vector\r\n\t/// @{\r\n\r\n\t//! Rotate a two dimensional vector.\r\n\t//! From GLM_GTX_rotate_vector extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec2<T, P> rotate(\r\n\t\tdetail::tvec2<T, P> const & v,\r\n\t\tT const & angle);\r\n\t\t\r\n\t//! Rotate a three dimensional vector around an axis.\r\n\t//! From GLM_GTX_rotate_vector extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> rotate(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & normal);\r\n\t\t\r\n\t//! Rotate a four dimensional vector around an axis.\r\n\t//! From GLM_GTX_rotate_vector extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec4<T, P> rotate(\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & normal);\r\n\t\t\r\n\t//! Rotate a three dimensional vector around the X axis.\r\n\t//! From GLM_GTX_rotate_vector extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> rotateX(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tT const & angle);\r\n\r\n\t//! Rotate a three dimensional vector around the Y axis.\r\n\t//! From GLM_GTX_rotate_vector extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> rotateY(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tT const & angle);\r\n\t\t\r\n\t//! Rotate a three dimensional vector around the Z axis.\r\n\t//! From GLM_GTX_rotate_vector extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec3<T, P> rotateZ(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tT const & angle);\r\n\t\t\r\n\t//! Rotate a four dimentionnals vector around the X axis.\r\n\t//! From GLM_GTX_rotate_vector extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec4<T, P> rotateX(\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tT const & angle);\r\n\t\t\r\n\t//! Rotate a four dimensional vector around the X axis.\r\n\t//! From GLM_GTX_rotate_vector extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec4<T, P> rotateY(\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tT const & angle);\r\n\t\t\r\n\t//! Rotate a four dimensional vector around the X axis.\r\n\t//! From GLM_GTX_rotate_vector extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tvec4<T, P> rotateZ(\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tT const & angle);\r\n\t\t\r\n\t//! Build a rotation matrix from a normal and a up vector.\r\n\t//! From GLM_GTX_rotate_vector extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> orientation(\r\n\t\tdetail::tvec3<T, P> const & Normal,\r\n\t\tdetail::tvec3<T, P> const & Up);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"rotate_vector.inl\"\r\n\r\n#endif//GLM_GTX_rotate_vector\r\n"
  },
  {
    "path": "gpu/glm/gtx/rotate_vector.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2006-11-02\r\n// Updated : 2009-02-19\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/rotate_vector.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> rotate\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & v,\r\n\t\tT const & angle\r\n\t)\r\n\t{\r\n\t\tdetail::tvec2<T, P> Result;\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const Cos(cos(angle));\r\n\t\tT const Sin(sin(angle));\r\n#else\r\n#\t\tpragma message(\"GLM: rotate function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const Cos = cos(radians(angle));\r\n\t\tT const Sin = sin(radians(angle));\r\n#endif\r\n\t\tResult.x = v.x * Cos - v.y * Sin;\r\n\t\tResult.y = v.x * Sin + v.y * Cos;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> rotate\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & normal\r\n\t)\r\n\t{\r\n\t\treturn detail::tmat3x3<T, P>(glm::rotate(angle, normal)) * v;\r\n\t}\r\n\t/*\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> rotateGTX(\r\n\t\tconst detail::tvec3<T, P>& x,\r\n\t\tT angle,\r\n\t\tconst detail::tvec3<T, P>& normal)\r\n\t{\r\n\t\tconst T Cos = cos(radians(angle));\r\n\t\tconst T Sin = sin(radians(angle));\r\n\t\treturn x * Cos + ((x * normal) * (T(1) - Cos)) * normal + cross(x, normal) * Sin;\r\n\t}\r\n\t*/\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> rotate\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tT const & angle,\r\n\t\tdetail::tvec3<T, P> const & normal\r\n\t)\r\n\t{\r\n\t\treturn rotate(angle, normal) * v;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> rotateX\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tT const & angle\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> Result(v);\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const Cos(cos(angle));\r\n\t\tT const Sin(sin(angle));\r\n#else\r\n#\t\tpragma message(\"GLM: rotateX function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const Cos = cos(radians(angle));\r\n\t\tT const Sin = sin(radians(angle));\r\n#endif\r\n\r\n\t\tResult.y = v.y * Cos - v.z * Sin;\r\n\t\tResult.z = v.y * Sin + v.z * Cos;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> rotateY\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tT const & angle\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> Result = v;\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const Cos(cos(angle));\r\n\t\tT const Sin(sin(angle));\r\n#else\r\n#\t\tpragma message(\"GLM: rotateY function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const Cos(cos(radians(angle)));\r\n\t\tT const Sin(sin(radians(angle)));\r\n#endif\r\n\r\n\t\tResult.x =  v.x * Cos + v.z * Sin;\r\n\t\tResult.z = -v.x * Sin + v.z * Cos;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> rotateZ\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tT const & angle\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> Result = v;\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const Cos(cos(angle));\r\n\t\tT const Sin(sin(angle));\r\n#else\r\n#\t\tpragma message(\"GLM: rotateZ function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const Cos(cos(radians(angle)));\r\n\t\tT const Sin(sin(radians(angle)));\r\n#endif\r\n\r\n\t\tResult.x = v.x * Cos - v.y * Sin;\r\n\t\tResult.y = v.x * Sin + v.y * Cos;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> rotateX\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tT const & angle\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<T, P> Result = v;\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const Cos(cos(angle));\r\n\t\tT const Sin(sin(angle));\r\n#else\r\n#\t\tpragma message(\"GLM: rotateX function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const Cos(cos(radians(angle)));\r\n\t\tT const Sin(sin(radians(angle)));\r\n#endif\r\n\r\n\t\tResult.y = v.y * Cos - v.z * Sin;\r\n\t\tResult.z = v.y * Sin + v.z * Cos;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> rotateY\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tT const & angle\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<T, P> Result = v;\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const Cos(cos(angle));\r\n\t\tT const Sin(sin(angle));\r\n#else\r\n#\t\tpragma message(\"GLM: rotateX function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const Cos(cos(radians(angle)));\r\n\t\tT const Sin(sin(radians(angle)));\r\n#endif\r\n\r\n\t\tResult.x =  v.x * Cos + v.z * Sin;\r\n\t\tResult.z = -v.x * Sin + v.z * Cos;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> rotateZ\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tT const & angle\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<T, P> Result = v;\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const Cos(cos(angle));\r\n\t\tT const Sin(sin(angle));\r\n#else\r\n#\t\tpragma message(\"GLM: rotateZ function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const Cos(cos(radians(angle)));\r\n\t\tT const Sin(sin(radians(angle)));\r\n#endif\r\n\r\n\t\tResult.x = v.x * Cos - v.y * Sin;\r\n\t\tResult.y = v.x * Sin + v.y * Cos;\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> orientation\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & Normal,\r\n\t\tdetail::tvec3<T, P> const & Up\r\n\t)\r\n\t{\r\n\t\tif(all(equal(Normal, Up)))\r\n\t\t\treturn detail::tmat4x4<T, P>(T(1));\r\n\r\n\t\tdetail::tvec3<T, P> RotationAxis = cross(Up, Normal);\r\n#\t\tifdef GLM_FORCE_RADIANS\r\n\t\t\tT Angle = acos(dot(Normal, Up));\r\n#\t\telse\r\n#\t\t\tpragma message(\"GLM: rotateZ function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\t\tT Angle = degrees(acos(dot(Normal, Up)));\r\n#\t\tendif\r\n\t\treturn rotate(Angle, RotationAxis);\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/scalar_relational.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_scalar_relational\r\n/// @file glm/gtx/scalar_relational.hpp\r\n/// @date 2013-02-04 / 2013-02-04\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_extend GLM_GTX_scalar_relational\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Extend a position from a source to a position at a defined length.\r\n/// \r\n/// <glm/gtx/scalar_relational.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_scalar_relational\r\n#define GLM_GTX_scalar_relational\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_extend extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_scalar_relational\r\n\t/// @{\r\n\r\n\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"scalar_relational.inl\"\r\n\r\n#endif//GLM_GTX_scalar_relational\r\n"
  },
  {
    "path": "gpu/glm/gtx/scalar_relational.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2013-02-04\r\n// Updated : 2013-02-04\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/scalar_relational.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER bool lessThan\r\n\t(\r\n\t\tT const & x, \r\n\t\tT const & y\r\n\t)\r\n\t{\r\n\t\treturn x < y;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER bool lessThanEqual\r\n\t(\r\n\t\tT const & x, \r\n\t\tT const & y\r\n\t)\r\n\t{\r\n\t\treturn x <= y;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER bool greaterThan\r\n\t(\r\n\t\tT const & x, \r\n\t\tT const & y\r\n\t)\r\n\t{\r\n\t\treturn x > y;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER bool greaterThanEqual\r\n\t(\r\n\t\tT const & x, \r\n\t\tT const & y\r\n\t)\r\n\t{\r\n\t\treturn x >= y;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER bool equal\r\n\t(\r\n\t\tT const & x, \r\n\t\tT const & y\r\n\t)\r\n\t{\r\n\t\treturn x == y;\r\n\t}\r\n\r\n\ttemplate <typename T>\r\n\tGLM_FUNC_QUALIFIER bool notEqual\r\n\t(\r\n\t\tT const & x, \r\n\t\tT const & y\r\n\t)\r\n\t{\r\n\t\treturn x != y;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER bool any\r\n\t(\r\n\t\tbool const & x\r\n\t)\r\n\t{\r\n\t\treturn x;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER bool all\r\n\t(\r\n\t\tbool const & x\r\n\t)\r\n\t{\r\n\t\treturn x;\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER bool not_\r\n\t(\r\n\t\tbool const & x\r\n\t)\r\n\t{\r\n\t\treturn !x;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/simd_mat4.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_simd_vec4\r\n/// @file glm/gtx/simd_vec4.hpp\r\n/// @date 2009-05-07 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_simd_mat4 GLM_GTX_simd_mat4\r\n/// @ingroup gtx\r\n/// \r\n/// @brief SIMD implementation of mat4 type.\r\n/// \r\n/// <glm/gtx/simd_mat4.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_simd_mat4\r\n#define GLM_GTX_simd_mat4\r\n\r\n// Dependencies\r\n#include \"../detail/setup.hpp\"\r\n\r\n#if(GLM_ARCH != GLM_ARCH_PURE)\r\n\r\n#if(GLM_ARCH & GLM_ARCH_SSE2)\r\n#\tinclude \"../detail/intrinsic_matrix.hpp\"\r\n#\tinclude \"../gtx/simd_vec4.hpp\"\r\n#else\r\n#\terror \"GLM: GLM_GTX_simd_mat4 requires compiler support of SSE2 through intrinsics\"\r\n#endif\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_simd_mat4 extension included\")\r\n#endif\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\t/// 4x4 Matrix implemented using SIMD SEE intrinsics.\r\n\t/// \\ingroup gtx_simd_mat4\r\n\tGLM_ALIGNED_STRUCT(16) fmat4x4SIMD\r\n\t{\r\n\t\tenum ctor{_null};\r\n\t\ttypedef float value_type;\r\n\t\ttypedef fvec4SIMD col_type;\r\n\t\ttypedef fvec4SIMD row_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\ttypedef fmat4x4SIMD type;\r\n\t\ttypedef fmat4x4SIMD transpose_type;\r\n\r\n\t\tGLM_FUNC_DECL length_t length() const;\r\n\r\n\t\tfvec4SIMD Data[4];\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Constructors\r\n\r\n\t\tfmat4x4SIMD();\r\n\t\texplicit fmat4x4SIMD(float const & s);\r\n\t\texplicit fmat4x4SIMD(\r\n\t\t\tfloat const & x0, float const & y0, float const & z0, float const & w0,\r\n\t\t\tfloat const & x1, float const & y1, float const & z1, float const & w1,\r\n\t\t\tfloat const & x2, float const & y2, float const & z2, float const & w2,\r\n\t\t\tfloat const & x3, float const & y3, float const & z3, float const & w3);\r\n\t\texplicit fmat4x4SIMD(\r\n\t\t\tfvec4SIMD const & v0,\r\n\t\t\tfvec4SIMD const & v1,\r\n\t\t\tfvec4SIMD const & v2,\r\n\t\t\tfvec4SIMD const & v3);\r\n\t\texplicit fmat4x4SIMD(\r\n\t\t\tmat4x4 const & m);\r\n\t\texplicit fmat4x4SIMD(\r\n\t\t\t__m128 const in[4]);\r\n\r\n\t\t// Conversions\r\n\t\t//template <typename U> \r\n\t\t//explicit tmat4x4(tmat4x4<U> const & m);\r\n\r\n\t\t//explicit tmat4x4(tmat2x2<T> const & x);\r\n\t\t//explicit tmat4x4(tmat3x3<T> const & x);\r\n\t\t//explicit tmat4x4(tmat2x3<T> const & x);\r\n\t\t//explicit tmat4x4(tmat3x2<T> const & x);\r\n\t\t//explicit tmat4x4(tmat2x4<T> const & x);\r\n\t\t//explicit tmat4x4(tmat4x2<T> const & x);\r\n\t\t//explicit tmat4x4(tmat3x4<T> const & x);\r\n\t\t//explicit tmat4x4(tmat4x3<T> const & x);\r\n\r\n\t\t// Accesses\r\n\t\tfvec4SIMD & operator[](length_t i);\r\n\t\tfvec4SIMD const & operator[](length_t i) const;\r\n\r\n\t\t// Unary updatable operators\r\n\t\tfmat4x4SIMD & operator= (fmat4x4SIMD const & m);\r\n\t\tfmat4x4SIMD & operator+= (float const & s);\r\n\t\tfmat4x4SIMD & operator+= (fmat4x4SIMD const & m);\r\n\t\tfmat4x4SIMD & operator-= (float const & s);\r\n\t\tfmat4x4SIMD & operator-= (fmat4x4SIMD const & m);\r\n\t\tfmat4x4SIMD & operator*= (float const & s);\r\n\t\tfmat4x4SIMD & operator*= (fmat4x4SIMD const & m);\r\n\t\tfmat4x4SIMD & operator/= (float const & s);\r\n\t\tfmat4x4SIMD & operator/= (fmat4x4SIMD const & m);\r\n\t\tfmat4x4SIMD & operator++ ();\r\n\t\tfmat4x4SIMD & operator-- ();\r\n\t};\r\n\r\n\t// Binary operators\r\n\tfmat4x4SIMD operator+ (fmat4x4SIMD const & m, float const & s);\r\n\tfmat4x4SIMD operator+ (float const & s, fmat4x4SIMD const & m);\r\n\tfmat4x4SIMD operator+ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);\r\n\r\n\tfmat4x4SIMD operator- (fmat4x4SIMD const & m, float const & s);\r\n\tfmat4x4SIMD operator- (float const & s, fmat4x4SIMD const & m);\r\n\tfmat4x4SIMD operator- (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);\r\n\r\n\tfmat4x4SIMD operator* (fmat4x4SIMD const & m, float const & s);\r\n\tfmat4x4SIMD operator* (float const & s, fmat4x4SIMD const & m);\r\n\r\n\tfvec4SIMD operator* (fmat4x4SIMD const & m, fvec4SIMD const & v);\r\n\tfvec4SIMD operator* (fvec4SIMD const & v, fmat4x4SIMD const & m);\r\n\r\n\tfmat4x4SIMD operator* (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);\r\n\r\n\tfmat4x4SIMD operator/ (fmat4x4SIMD const & m, float const & s);\r\n\tfmat4x4SIMD operator/ (float const & s, fmat4x4SIMD const & m);\r\n\r\n\tfvec4SIMD operator/ (fmat4x4SIMD const & m, fvec4SIMD const & v);\r\n\tfvec4SIMD operator/ (fvec4SIMD const & v, fmat4x4SIMD const & m);\r\n\r\n\tfmat4x4SIMD operator/ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2);\r\n\r\n\t// Unary constant operators\r\n\tfmat4x4SIMD const operator-  (fmat4x4SIMD const & m);\r\n\tfmat4x4SIMD const operator-- (fmat4x4SIMD const & m, int);\r\n\tfmat4x4SIMD const operator++ (fmat4x4SIMD const & m, int);\r\n}//namespace detail\r\n\r\n\ttypedef detail::fmat4x4SIMD simdMat4;\r\n\r\n\t/// @addtogroup gtx_simd_mat4\r\n\t/// @{\r\n\r\n\t//! Convert a simdMat4 to a mat4.\r\n\t//! (From GLM_GTX_simd_mat4 extension)\r\n\tmat4 mat4_cast(\r\n\t\tdetail::fmat4x4SIMD const & x);\r\n\r\n\t//! Multiply matrix x by matrix y component-wise, i.e.,\r\n\t//! result[i][j] is the scalar product of x[i][j] and y[i][j].\r\n\t//! (From GLM_GTX_simd_mat4 extension).\r\n\tdetail::fmat4x4SIMD matrixCompMult(\r\n\t\tdetail::fmat4x4SIMD const & x,\r\n\t\tdetail::fmat4x4SIMD const & y);\r\n\r\n\t//! Treats the first parameter c as a column vector\r\n\t//! and the second parameter r as a row vector\r\n\t//! and does a linear algebraic matrix multiply c * r.\r\n\t//! (From GLM_GTX_simd_mat4 extension).\r\n\tdetail::fmat4x4SIMD outerProduct(\r\n\t\tdetail::fvec4SIMD const & c,\r\n\t\tdetail::fvec4SIMD const & r);\r\n\r\n\t//! Returns the transposed matrix of x\r\n\t//! (From GLM_GTX_simd_mat4 extension).\r\n\tdetail::fmat4x4SIMD transpose(\r\n\t\tdetail::fmat4x4SIMD const & x);\r\n\r\n\t//! Return the determinant of a mat4 matrix.\r\n\t//! (From GLM_GTX_simd_mat4 extension).\r\n\tfloat determinant(\r\n\t\tdetail::fmat4x4SIMD const & m);\r\n\r\n\t//! Return the inverse of a mat4 matrix.\r\n\t//! (From GLM_GTX_simd_mat4 extension).\r\n\tdetail::fmat4x4SIMD inverse(\r\n\t\tdetail::fmat4x4SIMD const & m);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"simd_mat4.inl\"\r\n\r\n#endif//(GLM_ARCH != GLM_ARCH_PURE)\r\n\r\n#endif//GLM_GTX_simd_mat4\r\n"
  },
  {
    "path": "gpu/glm/gtx/simd_mat4.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2009-05-19\r\n// Updated : 2009-05-19\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/simd_mat4.hpp\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail{\r\n\r\nGLM_FUNC_QUALIFIER length_t fmat4x4SIMD::length() const\r\n{\r\n\treturn 4;\r\n}\r\n\r\n//////////////////////////////////////\r\n// Accesses\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD & fmat4x4SIMD::operator[]\r\n(\r\n\tlength_t i\r\n)\r\n{\r\n\tassert(i < this->length());\r\n\r\n\treturn this->Data[i];\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD const & fmat4x4SIMD::operator[]\r\n(\r\n\tlength_t i\r\n) const\r\n{\r\n\tassert(i < this->length());\r\n\r\n\treturn this->Data[i];\r\n}\r\n\r\n//////////////////////////////////////////////////////////////\r\n// Constructors\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD()\r\n{\r\n#ifndef GLM_SIMD_ENABLE_DEFAULT_INIT\r\n\tthis->Data[0] = fvec4SIMD(1.0f, 0, 0, 0);\r\n\tthis->Data[1] = fvec4SIMD(0, 1.0f, 0, 0);\r\n\tthis->Data[2] = fvec4SIMD(0, 0, 1.0f, 0);\r\n\tthis->Data[3] = fvec4SIMD(0, 0, 0, 1.0f);\r\n#endif\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD(float const & s)\r\n{\r\n\tthis->Data[0] = fvec4SIMD(s, 0, 0, 0);\r\n\tthis->Data[1] = fvec4SIMD(0, s, 0, 0);\r\n\tthis->Data[2] = fvec4SIMD(0, 0, s, 0);\r\n\tthis->Data[3] = fvec4SIMD(0, 0, 0, s);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD\r\n(\r\n\tfloat const & x0, float const & y0, float const & z0, float const & w0,\r\n\tfloat const & x1, float const & y1, float const & z1, float const & w1,\r\n\tfloat const & x2, float const & y2, float const & z2, float const & w2,\r\n\tfloat const & x3, float const & y3, float const & z3, float const & w3\r\n)\r\n{\r\n\tthis->Data[0] = fvec4SIMD(x0, y0, z0, w0);\r\n\tthis->Data[1] = fvec4SIMD(x1, y1, z1, w1);\r\n\tthis->Data[2] = fvec4SIMD(x2, y2, z2, w2);\r\n\tthis->Data[3] = fvec4SIMD(x3, y3, z3, w3);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD\r\n(\r\n\tfvec4SIMD const & v0,\r\n\tfvec4SIMD const & v1,\r\n\tfvec4SIMD const & v2,\r\n\tfvec4SIMD const & v3\r\n)\r\n{\r\n\tthis->Data[0] = v0;\r\n\tthis->Data[1] = v1;\r\n\tthis->Data[2] = v2;\r\n\tthis->Data[3] = v3;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD\r\n(\r\n\tmat4 const & m\r\n)\r\n{\r\n\tthis->Data[0] = fvec4SIMD(m[0]);\r\n\tthis->Data[1] = fvec4SIMD(m[1]);\r\n\tthis->Data[2] = fvec4SIMD(m[2]);\r\n\tthis->Data[3] = fvec4SIMD(m[3]);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD::fmat4x4SIMD\r\n(\r\n\t__m128 const in[4]\r\n)\r\n{\r\n\tthis->Data[0] = in[0];\r\n\tthis->Data[1] = in[1];\r\n\tthis->Data[2] = in[2];\r\n\tthis->Data[3] = in[3];\r\n}\r\n\r\n//////////////////////////////////////////////////////////////\r\n// mat4 operators\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD& fmat4x4SIMD::operator= \r\n(\r\n\tfmat4x4SIMD const & m\r\n)\r\n{\r\n\tthis->Data[0] = m[0];\r\n\tthis->Data[1] = m[1];\r\n\tthis->Data[2] = m[2];\r\n\tthis->Data[3] = m[3];\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator+= \r\n(\r\n\tfmat4x4SIMD const & m\r\n)\r\n{\r\n\tthis->Data[0].Data = _mm_add_ps(this->Data[0].Data, m[0].Data);\r\n\tthis->Data[1].Data = _mm_add_ps(this->Data[1].Data, m[1].Data);\r\n\tthis->Data[2].Data = _mm_add_ps(this->Data[2].Data, m[2].Data);\r\n\tthis->Data[3].Data = _mm_add_ps(this->Data[3].Data, m[3].Data);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-= \r\n(\r\n\tfmat4x4SIMD const & m\r\n)\r\n{\r\n\tthis->Data[0].Data = _mm_sub_ps(this->Data[0].Data, m[0].Data);\r\n\tthis->Data[1].Data = _mm_sub_ps(this->Data[1].Data, m[1].Data);\r\n\tthis->Data[2].Data = _mm_sub_ps(this->Data[2].Data, m[2].Data);\r\n\tthis->Data[3].Data = _mm_sub_ps(this->Data[3].Data, m[3].Data);\r\n\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator*= \r\n(\r\n\tfmat4x4SIMD const & m\r\n)\r\n{\r\n\tsse_mul_ps(&this->Data[0].Data, &m.Data[0].Data, &this->Data[0].Data);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator/= \r\n(\r\n\tfmat4x4SIMD const & m\r\n)\r\n{\r\n\t__m128 Inv[4];\r\n\tsse_inverse_ps(&m.Data[0].Data, Inv);\r\n\tsse_mul_ps(&this->Data[0].Data, Inv, &this->Data[0].Data);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator+= \r\n(\r\n\tfloat const & s\r\n)\r\n{\r\n\t__m128 Operand = _mm_set_ps1(s);\r\n\tthis->Data[0].Data = _mm_add_ps(this->Data[0].Data, Operand);\r\n\tthis->Data[1].Data = _mm_add_ps(this->Data[1].Data, Operand);\r\n\tthis->Data[2].Data = _mm_add_ps(this->Data[2].Data, Operand);\r\n\tthis->Data[3].Data = _mm_add_ps(this->Data[3].Data, Operand);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-= \r\n(\r\n\tfloat const & s\r\n)\r\n{\r\n\t__m128 Operand = _mm_set_ps1(s);\r\n\tthis->Data[0].Data = _mm_sub_ps(this->Data[0].Data, Operand);\r\n\tthis->Data[1].Data = _mm_sub_ps(this->Data[1].Data, Operand);\r\n\tthis->Data[2].Data = _mm_sub_ps(this->Data[2].Data, Operand);\r\n\tthis->Data[3].Data = _mm_sub_ps(this->Data[3].Data, Operand);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator*= \r\n(\r\n\tfloat const & s\r\n)\r\n{\r\n\t__m128 Operand = _mm_set_ps1(s);\r\n\tthis->Data[0].Data = _mm_mul_ps(this->Data[0].Data, Operand);\r\n\tthis->Data[1].Data = _mm_mul_ps(this->Data[1].Data, Operand);\r\n\tthis->Data[2].Data = _mm_mul_ps(this->Data[2].Data, Operand);\r\n\tthis->Data[3].Data = _mm_mul_ps(this->Data[3].Data, Operand);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator/= \r\n(\r\n\tfloat const & s\r\n)\r\n{\r\n\t__m128 Operand = _mm_div_ps(one, _mm_set_ps1(s));\r\n\tthis->Data[0].Data = _mm_mul_ps(this->Data[0].Data, Operand);\r\n\tthis->Data[1].Data = _mm_mul_ps(this->Data[1].Data, Operand);\r\n\tthis->Data[2].Data = _mm_mul_ps(this->Data[2].Data, Operand);\r\n\tthis->Data[3].Data = _mm_mul_ps(this->Data[3].Data, Operand);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator++ ()\r\n{\r\n\tthis->Data[0].Data = _mm_add_ps(this->Data[0].Data, one);\r\n\tthis->Data[1].Data = _mm_add_ps(this->Data[1].Data, one);\r\n\tthis->Data[2].Data = _mm_add_ps(this->Data[2].Data, one);\r\n\tthis->Data[3].Data = _mm_add_ps(this->Data[3].Data, one);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD & fmat4x4SIMD::operator-- ()\r\n{\r\n\tthis->Data[0].Data = _mm_sub_ps(this->Data[0].Data, one);\r\n\tthis->Data[1].Data = _mm_sub_ps(this->Data[1].Data, one);\r\n\tthis->Data[2].Data = _mm_sub_ps(this->Data[2].Data, one);\r\n\tthis->Data[3].Data = _mm_sub_ps(this->Data[3].Data, one);\r\n\treturn *this;\r\n}\r\n\r\n\r\n//////////////////////////////////////////////////////////////\r\n// Binary operators\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator+\r\n(\r\n\tconst fmat4x4SIMD &m,\r\n\tfloat const & s\r\n)\r\n{\r\n\treturn detail::fmat4x4SIMD\r\n\t(\r\n\t\tm[0] + s,\r\n\t\tm[1] + s,\r\n\t\tm[2] + s,\r\n\t\tm[3] + s\r\n\t);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator+\r\n(\r\n\tfloat const & s,\r\n\tconst fmat4x4SIMD &m\r\n)\r\n{\r\n\treturn detail::fmat4x4SIMD\r\n\t(\r\n\t\tm[0] + s,\r\n\t\tm[1] + s,\r\n\t\tm[2] + s,\r\n\t\tm[3] + s\r\n\t);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator+\r\n(\r\n    const fmat4x4SIMD &m1,\r\n    const fmat4x4SIMD &m2\r\n)\r\n{\r\n    return detail::fmat4x4SIMD\r\n    (\r\n        m1[0] + m2[0],\r\n        m1[1] + m2[1],\r\n        m1[2] + m2[2],\r\n        m1[3] + m2[3]\r\n    );\r\n}\r\n\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator-\r\n(\r\n    const fmat4x4SIMD &m,\r\n    float const & s\r\n)\r\n{\r\n    return detail::fmat4x4SIMD\r\n    (\r\n        m[0] - s,\r\n        m[1] - s,\r\n        m[2] - s,\r\n        m[3] - s\r\n    );\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator-\r\n(\r\n    float const & s,\r\n    const fmat4x4SIMD &m\r\n)\r\n{\r\n    return detail::fmat4x4SIMD\r\n    (\r\n        s - m[0],\r\n        s - m[1],\r\n        s - m[2],\r\n        s - m[3]\r\n    );\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator-\r\n(\r\n    const fmat4x4SIMD &m1,\r\n    const fmat4x4SIMD &m2\r\n)\r\n{\r\n    return detail::fmat4x4SIMD\r\n    (\r\n        m1[0] - m2[0],\r\n        m1[1] - m2[1],\r\n        m1[2] - m2[2],\r\n        m1[3] - m2[3]\r\n    );\r\n}\r\n\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator*\r\n(\r\n    const fmat4x4SIMD &m,\r\n    float const & s\r\n)\r\n{\r\n    return detail::fmat4x4SIMD\r\n    (\r\n        m[0] * s,\r\n        m[1] * s,\r\n        m[2] * s,\r\n        m[3] * s\r\n    );\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator*\r\n(\r\n    float const & s,\r\n    const fmat4x4SIMD &m\r\n)\r\n{\r\n    return detail::fmat4x4SIMD\r\n    (\r\n        m[0] * s,\r\n        m[1] * s,\r\n        m[2] * s,\r\n        m[3] * s\r\n    );\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator*\r\n(\r\n    const fmat4x4SIMD &m,\r\n    fvec4SIMD const & v\r\n)\r\n{\r\n    return sse_mul_ps(&m.Data[0].Data, v.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator*\r\n(\r\n    fvec4SIMD const & v,\r\n    const fmat4x4SIMD &m\r\n)\r\n{\r\n    return sse_mul_ps(v.Data, &m.Data[0].Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator*\r\n(\r\n    const fmat4x4SIMD &m1,\r\n    const fmat4x4SIMD &m2\r\n)\r\n{\r\n    fmat4x4SIMD result;\r\n    sse_mul_ps(&m1.Data[0].Data, &m2.Data[0].Data, &result.Data[0].Data);\r\n    \r\n    return result;\r\n}\r\n    \r\n\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator/\r\n(\r\n    const fmat4x4SIMD &m,\r\n    float const & s\r\n)\r\n{\r\n    return detail::fmat4x4SIMD\r\n    (\r\n        m[0] / s,\r\n        m[1] / s,\r\n        m[2] / s,\r\n        m[3] / s\r\n    );\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator/\r\n(\r\n    float const & s,\r\n    const fmat4x4SIMD &m\r\n)\r\n{\r\n    return detail::fmat4x4SIMD\r\n    (\r\n        s / m[0],\r\n        s / m[1],\r\n        s / m[2],\r\n        s / m[3]\r\n    );\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fmat4x4SIMD inverse(detail::fmat4x4SIMD const & m)\r\n{\r\n\tdetail::fmat4x4SIMD result;\r\n\tdetail::sse_inverse_ps(&m[0].Data, &result[0].Data);\r\n\treturn result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator/\r\n(\r\n\tconst fmat4x4SIMD & m,\r\n\tfvec4SIMD const & v\r\n)\r\n{\r\n\treturn inverse(m) * v;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator/\r\n(\r\n\tfvec4SIMD const & v,\r\n\tconst fmat4x4SIMD &m\r\n)\r\n{\r\n\treturn v * inverse(m);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD operator/\r\n(\r\n\tconst fmat4x4SIMD &m1,\r\n\tconst fmat4x4SIMD &m2\r\n)\r\n{\r\n\t__m128 result[4];\r\n\t__m128 inv[4];\r\n\r\n\tsse_inverse_ps(&m2.Data[0].Data, inv);\r\n\tsse_mul_ps(&m1.Data[0].Data, inv, result);\r\n\r\n\treturn fmat4x4SIMD(result);\r\n}\r\n\r\n\r\n//////////////////////////////////////////////////////////////\r\n// Unary constant operators\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD const operator-\r\n(\r\n    fmat4x4SIMD const & m\r\n)\r\n{\r\n    return detail::fmat4x4SIMD\r\n    (\r\n        -m[0],\r\n        -m[1],\r\n        -m[2],\r\n        -m[3]\r\n    );\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD const operator--\r\n(\r\n    fmat4x4SIMD const & m,\r\n    int\r\n)\r\n{\r\n    return detail::fmat4x4SIMD\r\n    (\r\n        m[0] - 1.0f,\r\n        m[1] - 1.0f,\r\n        m[2] - 1.0f,\r\n        m[3] - 1.0f\r\n    );\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fmat4x4SIMD const operator++\r\n(\r\n    fmat4x4SIMD const & m,\r\n    int\r\n)\r\n{\r\n    return detail::fmat4x4SIMD\r\n    (\r\n        m[0] + 1.0f,\r\n        m[1] + 1.0f,\r\n        m[2] + 1.0f,\r\n        m[3] + 1.0f\r\n    );\r\n}\r\n\r\n}//namespace detail\r\n\r\nGLM_FUNC_QUALIFIER mat4 mat4_cast\r\n(\r\n\tdetail::fmat4x4SIMD const & x\r\n)\r\n{\r\n\tGLM_ALIGN(16) mat4 Result;\r\n\t_mm_store_ps(&Result[0][0], x.Data[0].Data);\r\n\t_mm_store_ps(&Result[1][0], x.Data[1].Data);\r\n\t_mm_store_ps(&Result[2][0], x.Data[2].Data);\r\n\t_mm_store_ps(&Result[3][0], x.Data[3].Data);\r\n\treturn Result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fmat4x4SIMD matrixCompMult\r\n(\r\n\tdetail::fmat4x4SIMD const & x,\r\n\tdetail::fmat4x4SIMD const & y\r\n)\r\n{\r\n\tdetail::fmat4x4SIMD result;\r\n\tresult[0] = x[0] * y[0];\r\n\tresult[1] = x[1] * y[1];\r\n\tresult[2] = x[2] * y[2];\r\n\tresult[3] = x[3] * y[3];\r\n\treturn result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fmat4x4SIMD outerProduct\r\n(\r\n\tdetail::fvec4SIMD const & c,\r\n\tdetail::fvec4SIMD const & r\r\n)\r\n{\r\n\t__m128 Shu0 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(0, 0, 0, 0));\r\n\t__m128 Shu1 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(1, 1, 1, 1));\r\n\t__m128 Shu2 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(2, 2, 2, 2));\r\n\t__m128 Shu3 = _mm_shuffle_ps(r.Data, r.Data, _MM_SHUFFLE(3, 3, 3, 3));\r\n\r\n\tdetail::fmat4x4SIMD result(detail::fmat4x4SIMD::_null);\r\n\tresult[0].Data = _mm_mul_ps(c.Data, Shu0);\r\n\tresult[1].Data = _mm_mul_ps(c.Data, Shu1);\r\n\tresult[2].Data = _mm_mul_ps(c.Data, Shu2);\r\n\tresult[3].Data = _mm_mul_ps(c.Data, Shu3);\r\n\treturn result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fmat4x4SIMD transpose(detail::fmat4x4SIMD const & m)\r\n{\r\n\tdetail::fmat4x4SIMD result;\r\n\tdetail::sse_transpose_ps(&m[0].Data, &result[0].Data);\r\n\treturn result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER float determinant(detail::fmat4x4SIMD const & m)\r\n{\r\n\tfloat Result;\r\n\t_mm_store_ss(&Result, detail::sse_det_ps(&m[0].Data));\r\n\treturn Result;\r\n}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/simd_quat.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_simd_quat\r\n/// @file glm/gtx/simd_quat.hpp\r\n/// @date 2009-05-07 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_simd_vec4 GLM_GTX_simd_quat\r\n/// @ingroup gtx\r\n/// \r\n/// @brief SIMD implementation of quat type.\r\n/// \r\n/// <glm/gtx/simd_quat.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_simd_quat\r\n#define GLM_GTX_simd_quat\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtc/quaternion.hpp\"\r\n#include \"../gtx/fast_trigonometry.hpp\"\r\n\r\n#if(GLM_ARCH != GLM_ARCH_PURE)\r\n\r\n#if(GLM_ARCH & GLM_ARCH_SSE2)\r\n#\tinclude \"../core/intrinsic_common.hpp\"\r\n#\tinclude \"../core/intrinsic_geometric.hpp\"\r\n#   include \"../gtx/simd_mat4.hpp\"\r\n#else\r\n#\terror \"GLM: GLM_GTX_simd_quat requires compiler support of SSE2 through intrinsics\"\r\n#endif\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_simd_quat extension included\")\r\n#endif\r\n\r\n\r\n// Warning silencer for nameless struct/union.\r\n#if (GLM_COMPILER & GLM_COMPILER_VC)\r\n#   pragma warning(push)\r\n#   pragma warning(disable:4201)   // warning C4201: nonstandard extension used : nameless struct/union\r\n#endif\r\n\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\t/// Quaternion implemented using SIMD SEE intrinsics.\r\n\t/// \\ingroup gtx_simd_vec4\r\n\tGLM_ALIGNED_STRUCT(16) fquatSIMD\r\n\t{\r\n\t\tenum ctor{null};\r\n\t\ttypedef __m128 value_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\tstatic size_type value_size();\r\n\r\n\t\ttypedef fquatSIMD type;\r\n\t\ttypedef tquat<bool, defaultp> bool_type;\r\n\r\n#ifdef GLM_SIMD_ENABLE_XYZW_UNION\r\n        union\r\n        {\r\n\t\t    __m128 Data;\r\n            struct {float x, y, z, w;};\r\n        };\r\n#else\r\n        __m128 Data;\r\n#endif\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Implicit basic constructors\r\n\r\n\t\tfquatSIMD();\r\n\t\tfquatSIMD(__m128 const & Data);\r\n\t\tfquatSIMD(fquatSIMD const & q);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Explicit basic constructors\r\n\r\n\t\texplicit fquatSIMD(\r\n\t\t\tctor);\r\n\t\texplicit fquatSIMD(\r\n\t\t\tfloat const & w, \r\n\t\t\tfloat const & x, \r\n\t\t\tfloat const & y, \r\n\t\t\tfloat const & z);\r\n\t\texplicit fquatSIMD(\r\n\t\t\tquat const & v);\r\n        explicit fquatSIMD(\r\n\t\t\tvec3 const & eulerAngles);\r\n\t\t\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Unary arithmetic operators\r\n\r\n        fquatSIMD& operator =(fquatSIMD const & q);\r\n        fquatSIMD& operator*=(float const & s);\r\n\t\tfquatSIMD& operator/=(float const & s);\r\n\t};\r\n\r\n\r\n    //////////////////////////////////////\r\n    // Arithmetic operators\r\n\r\n\tdetail::fquatSIMD operator- (\r\n\t\tdetail::fquatSIMD const & q);\r\n\r\n\tdetail::fquatSIMD operator+ ( \r\n\t\tdetail::fquatSIMD const & q, \r\n\t\tdetail::fquatSIMD const & p); \r\n\r\n\tdetail::fquatSIMD operator* ( \r\n\t\tdetail::fquatSIMD const & q, \r\n\t\tdetail::fquatSIMD const & p); \r\n\r\n\tdetail::fvec4SIMD operator* (\r\n\t\tdetail::fquatSIMD const & q, \r\n\t\tdetail::fvec4SIMD const & v);\r\n\r\n\tdetail::fvec4SIMD operator* (\r\n\t\tdetail::fvec4SIMD const & v,\r\n\t\tdetail::fquatSIMD const & q);\r\n\r\n\tdetail::fquatSIMD operator* (\r\n\t\tdetail::fquatSIMD const & q, \r\n\t\tfloat s);\r\n\r\n\tdetail::fquatSIMD operator* (\r\n\t\tfloat s,\r\n\t\tdetail::fquatSIMD const & q);\r\n\r\n\tdetail::fquatSIMD operator/ (\r\n\t\tdetail::fquatSIMD const & q, \r\n\t\tfloat s);\r\n\r\n}//namespace detail\r\n\r\n\ttypedef glm::detail::fquatSIMD simdQuat;\r\n\r\n\t/// @addtogroup gtx_simd_quat\r\n\t/// @{\r\n\r\n    //! Convert a simdQuat to a quat.\r\n\t//! (From GLM_GTX_simd_quat extension)\r\n\tquat quat_cast(\r\n\t\tdetail::fquatSIMD const & x);\r\n\r\n    //! Convert a simdMat4 to a simdQuat.\r\n    //! (From GLM_GTX_simd_quat extension)\r\n    detail::fquatSIMD quatSIMD_cast(\r\n        detail::fmat4x4SIMD const & m);\r\n\r\n    //! Converts a mat4 to a simdQuat.\r\n    //! (From GLM_GTX_simd_quat extension)\r\n    template <typename T, precision P>\r\n    detail::fquatSIMD quatSIMD_cast(\r\n        detail::tmat4x4<T, P> const & m);\r\n\r\n    //! Converts a mat3 to a simdQuat.\r\n    //! (From GLM_GTX_simd_quat extension)\r\n    template <typename T, precision P>\r\n    detail::fquatSIMD quatSIMD_cast(\r\n        detail::tmat3x3<T, P> const & m);\r\n\r\n    //! Convert a simdQuat to a simdMat4\r\n    //! (From GLM_GTX_simd_quat extension)\r\n    detail::fmat4x4SIMD mat4SIMD_cast(\r\n        detail::fquatSIMD const & q);\r\n\r\n    //! Converts a simdQuat to a standard mat4.\r\n    //! (From GLM_GTX_simd_quat extension)\r\n    mat4 mat4_cast(\r\n        detail::fquatSIMD const & q);\r\n\r\n\r\n\t/// Returns the length of the quaternion. \r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\tfloat length(\r\n\t\tdetail::fquatSIMD const & x);\r\n\r\n\t/// Returns the normalized quaternion. \r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\tdetail::fquatSIMD normalize(\r\n\t\tdetail::fquatSIMD const & x);\r\n\r\n    /// Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ... \r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\tfloat dot(\r\n\t\tdetail::fquatSIMD const & q1, \r\n\t\tdetail::fquatSIMD const & q2);\r\n\r\n    /// Spherical linear interpolation of two quaternions.\r\n\t/// The interpolation is oriented and the rotation is performed at constant speed.\r\n\t/// For short path spherical linear interpolation, use the slerp function.\r\n\t/// \r\n\t/// @param x A quaternion\r\n\t/// @param y A quaternion\r\n\t/// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1].\r\n\t/// @tparam T Value type used to build the quaternion. Supported: half, float or double.\r\n\t/// @see gtc_quaternion\r\n\t/// @see - slerp(detail::fquatSIMD const & x, detail::fquatSIMD const & y, T const & a) \r\n\tdetail::fquatSIMD mix(\r\n\t\tdetail::fquatSIMD const & x, \r\n\t\tdetail::fquatSIMD const & y, \r\n\t\tfloat const & a);\r\n\r\n    /// Linear interpolation of two quaternions. \r\n\t/// The interpolation is oriented.\r\n\t/// \r\n\t/// @param x A quaternion\r\n\t/// @param y A quaternion\r\n\t/// @param a Interpolation factor. The interpolation is defined in the range [0, 1].\r\n\t/// @tparam T Value type used to build the quaternion. Supported: half, float or double.\r\n\t/// @see gtc_quaternion\r\n\tdetail::fquatSIMD lerp(\r\n\t\tdetail::fquatSIMD const & x, \r\n\t\tdetail::fquatSIMD const & y, \r\n\t\tfloat const & a);\r\n\r\n\t/// Spherical linear interpolation of two quaternions.\r\n\t/// The interpolation always take the short path and the rotation is performed at constant speed.\r\n\t/// \r\n\t/// @param x A quaternion\r\n\t/// @param y A quaternion\r\n\t/// @param a Interpolation factor. The interpolation is defined beyond the range [0, 1].\r\n\t/// @tparam T Value type used to build the quaternion. Supported: half, float or double.\r\n\t/// @see gtc_quaternion\r\n\tdetail::fquatSIMD slerp(\r\n\t\tdetail::fquatSIMD const & x, \r\n\t\tdetail::fquatSIMD const & y, \r\n\t\tfloat const & a);\r\n\r\n\r\n    /// Faster spherical linear interpolation of two unit length quaternions.\r\n    ///\r\n    /// This is the same as mix(), except for two rules:\r\n    ///   1) The two quaternions must be unit length.\r\n    ///   2) The interpolation factor (a) must be in the range [0, 1].\r\n    ///\r\n    /// This will use the equivalent to fastAcos() and fastSin().\r\n    ///\r\n\t/// @see gtc_quaternion\r\n\t/// @see - mix(detail::fquatSIMD const & x, detail::fquatSIMD const & y, T const & a) \r\n\tdetail::fquatSIMD fastMix(\r\n\t\tdetail::fquatSIMD const & x, \r\n\t\tdetail::fquatSIMD const & y, \r\n\t\tfloat const & a);\r\n\r\n    /// Identical to fastMix() except takes the shortest path.\r\n    ///\r\n    /// The same rules apply here as those in fastMix(). Both quaternions must be unit length and 'a' must be\r\n    /// in the range [0, 1].\r\n    ///\r\n\t/// @see - fastMix(detail::fquatSIMD const & x, detail::fquatSIMD const & y, T const & a) \r\n\t/// @see - slerp(detail::fquatSIMD const & x, detail::fquatSIMD const & y, T const & a) \r\n    detail::fquatSIMD fastSlerp(\r\n\t\tdetail::fquatSIMD const & x, \r\n\t\tdetail::fquatSIMD const & y, \r\n\t\tfloat const & a);\r\n\r\n\r\n\t/// Returns the q conjugate. \r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\tdetail::fquatSIMD conjugate(\r\n\t\tdetail::fquatSIMD const & q);\r\n\r\n\t/// Returns the q inverse. \r\n\t/// \r\n\t/// @see gtc_quaternion\r\n\tdetail::fquatSIMD inverse(\r\n\t\tdetail::fquatSIMD const & q);\r\n\r\n    /// Build a quaternion from an angle and a normalized axis.\r\n\t///\r\n\t/// @param angle Angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.\r\n\t/// @param axis Axis of the quaternion, must be normalized. \r\n\t///\r\n\t/// @see gtc_quaternion\r\n\tdetail::fquatSIMD angleAxisSIMD(\r\n\t\tfloat const & angle, \r\n\t\tvec3 const & axis);\r\n\r\n    /// Build a quaternion from an angle and a normalized axis. \r\n\t///\r\n\t/// @param angle Angle expressed in radians if GLM_FORCE_RADIANS is define or degrees otherwise.\r\n\t/// @param x x component of the x-axis, x, y, z must be a normalized axis\r\n\t/// @param y y component of the y-axis, x, y, z must be a normalized axis\r\n\t/// @param z z component of the z-axis, x, y, z must be a normalized axis\r\n\t///\r\n\t/// @see gtc_quaternion\r\n\tdetail::fquatSIMD angleAxisSIMD(\r\n\t\tfloat const & angle, \r\n\t\tfloat const & x, \r\n\t\tfloat const & y, \r\n\t\tfloat const & z);\r\n\r\n\r\n    // TODO: Move this to somewhere more appropriate. Used with fastMix() and fastSlerp().\r\n    /// Performs the equivalent of glm::fastSin() on each component of the given __m128.\r\n    __m128 fastSin(__m128 x);\r\n\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"simd_quat.inl\"\r\n\r\n\r\n#if (GLM_COMPILER & GLM_COMPILER_VC)\r\n#   pragma warning(pop)\r\n#endif\r\n\r\n\r\n#endif//(GLM_ARCH != GLM_ARCH_PURE)\r\n\r\n#endif//GLM_GTX_simd_quat\r\n"
  },
  {
    "path": "gpu/glm/gtx/simd_quat.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2013-04-22\r\n// Updated : 2013-04-22\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/simd_quat.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n\r\nnamespace glm{\r\nnamespace detail{\r\n\r\n\r\n//////////////////////////////////////\r\n// Debugging\r\n#if 0\r\nvoid print(__m128 v)\r\n{\r\n    GLM_ALIGN(16) float result[4];\r\n    _mm_store_ps(result, v);\r\n\r\n    printf(\"__m128:    %f %f %f %f\\n\", result[0], result[1], result[2], result[3]);\r\n}\r\n\r\nvoid print(const fvec4SIMD &v)\r\n{\r\n    printf(\"fvec4SIMD: %f %f %f %f\\n\", v.x, v.y, v.z, v.w);\r\n}\r\n#endif\r\n\r\n\r\n//////////////////////////////////////\r\n// Implicit basic constructors\r\n\r\nGLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD()\r\n#ifdef GLM_SIMD_ENABLE_DEFAULT_INIT\r\n    : Data(_mm_set_ps(1.0f, 0.0f, 0.0f, 0.0f))\r\n#endif\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(__m128 const & Data) :\r\n\tData(Data)\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(fquatSIMD const & q) :\r\n\tData(q.Data)\r\n{}\r\n\r\n\r\n//////////////////////////////////////\r\n// Explicit basic constructors\r\n\r\nGLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(float const & w, float const & x, float const & y, float const & z) :\r\n\tData(_mm_set_ps(w, z, y, x))\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(quat const & q) :\r\n\tData(_mm_set_ps(q.w, q.z, q.y, q.x))\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fquatSIMD::fquatSIMD(vec3 const & eulerAngles)\r\n{\r\n    vec3 c = glm::cos(eulerAngles * 0.5f);\r\n\tvec3 s = glm::sin(eulerAngles * 0.5f);\r\n\r\n    Data = _mm_set_ps(\r\n        (c.x * c.y * c.z) + (s.x * s.y * s.z),\r\n        (c.x * c.y * s.z) - (s.x * s.y * c.z),\r\n        (c.x * s.y * c.z) + (s.x * c.y * s.z),\r\n        (s.x * c.y * c.z) - (c.x * s.y * s.z));\r\n}\r\n\r\n\r\n//////////////////////////////////////\r\n// Unary arithmetic operators\r\n\r\nGLM_FUNC_QUALIFIER fquatSIMD& fquatSIMD::operator=(fquatSIMD const & q)\r\n{\r\n    this->Data = q.Data;\r\n    return *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fquatSIMD& fquatSIMD::operator*=(float const & s)\r\n{\r\n\tthis->Data = _mm_mul_ps(this->Data, _mm_set_ps1(s));\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fquatSIMD& fquatSIMD::operator/=(float const & s)\r\n{\r\n\tthis->Data = _mm_div_ps(Data, _mm_set1_ps(s));\r\n\treturn *this;\r\n}\r\n\r\n\r\n\r\n// negate operator\r\nGLM_FUNC_QUALIFIER fquatSIMD operator- (fquatSIMD const & q)\r\n{\r\n    return fquatSIMD(_mm_mul_ps(q.Data, _mm_set_ps(-1.0f, -1.0f, -1.0f, -1.0f)));\r\n}\r\n\r\n// operator+\r\nGLM_FUNC_QUALIFIER fquatSIMD operator+ (fquatSIMD const & q1, fquatSIMD const & q2)\r\n{\r\n\treturn fquatSIMD(_mm_add_ps(q1.Data, q2.Data));\r\n}\r\n\r\n//operator*\r\nGLM_FUNC_QUALIFIER fquatSIMD operator* (fquatSIMD const & q1, fquatSIMD const & q2)\r\n{\r\n    // SSE2 STATS:\r\n    //    11 shuffle\r\n    //    8  mul\r\n    //    8  add\r\n    \r\n    // SSE4 STATS:\r\n    //    3 shuffle\r\n    //    4 mul\r\n    //    4 dpps\r\n\r\n    __m128 mul0 = _mm_mul_ps(q1.Data, _mm_shuffle_ps(q2.Data, q2.Data, _MM_SHUFFLE(0, 1, 2, 3)));\r\n    __m128 mul1 = _mm_mul_ps(q1.Data, _mm_shuffle_ps(q2.Data, q2.Data, _MM_SHUFFLE(1, 0, 3, 2)));\r\n    __m128 mul2 = _mm_mul_ps(q1.Data, _mm_shuffle_ps(q2.Data, q2.Data, _MM_SHUFFLE(2, 3, 0, 1)));\r\n    __m128 mul3 = _mm_mul_ps(q1.Data, q2.Data);\r\n\r\n#   if((GLM_ARCH & GLM_ARCH_SSE4))\r\n    __m128 add0 = _mm_dp_ps(mul0, _mm_set_ps(1.0f, -1.0f,  1.0f,  1.0f), 0xff);\r\n    __m128 add1 = _mm_dp_ps(mul1, _mm_set_ps(1.0f,  1.0f,  1.0f, -1.0f), 0xff);\r\n    __m128 add2 = _mm_dp_ps(mul2, _mm_set_ps(1.0f,  1.0f, -1.0f,  1.0f), 0xff);\r\n    __m128 add3 = _mm_dp_ps(mul3, _mm_set_ps(1.0f, -1.0f, -1.0f, -1.0f), 0xff);\r\n#   else\r\n           mul0 = _mm_mul_ps(mul0, _mm_set_ps(1.0f, -1.0f,  1.0f,  1.0f));\r\n    __m128 add0 = _mm_add_ps(mul0, _mm_movehl_ps(mul0, mul0));\r\n           add0 = _mm_add_ss(add0, _mm_shuffle_ps(add0, add0, 1));\r\n\r\n           mul1 = _mm_mul_ps(mul1, _mm_set_ps(1.0f,  1.0f,  1.0f, -1.0f));\r\n    __m128 add1 = _mm_add_ps(mul1, _mm_movehl_ps(mul1, mul1));\r\n           add1 = _mm_add_ss(add1, _mm_shuffle_ps(add1, add1, 1));\r\n\r\n           mul2 = _mm_mul_ps(mul2, _mm_set_ps(1.0f,  1.0f, -1.0f,  1.0f));\r\n    __m128 add2 = _mm_add_ps(mul2, _mm_movehl_ps(mul2, mul2));\r\n           add2 = _mm_add_ss(add2, _mm_shuffle_ps(add2, add2, 1));\r\n\r\n           mul3 = _mm_mul_ps(mul3, _mm_set_ps(1.0f, -1.0f, -1.0f, -1.0f));\r\n    __m128 add3 = _mm_add_ps(mul3, _mm_movehl_ps(mul3, mul3));\r\n           add3 = _mm_add_ss(add3, _mm_shuffle_ps(add3, add3, 1));\r\n#endif\r\n\r\n\r\n    // This SIMD code is a politically correct way of doing this, but in every test I've tried it has been slower than\r\n    // the final code below. I'll keep this here for reference - maybe somebody else can do something better...\r\n    //\r\n    //__m128 xxyy = _mm_shuffle_ps(add0, add1, _MM_SHUFFLE(0, 0, 0, 0));\r\n    //__m128 zzww = _mm_shuffle_ps(add2, add3, _MM_SHUFFLE(0, 0, 0, 0));\r\n    //\r\n    //return _mm_shuffle_ps(xxyy, zzww, _MM_SHUFFLE(2, 0, 2, 0));\r\n    \r\n    float x;\r\n    float y;\r\n    float z;\r\n    float w;\r\n\r\n    _mm_store_ss(&x, add0);\r\n    _mm_store_ss(&y, add1);\r\n    _mm_store_ss(&z, add2);\r\n    _mm_store_ss(&w, add3);\r\n\r\n    return detail::fquatSIMD(w, x, y, z);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator* (fquatSIMD const & q, fvec4SIMD const & v)\r\n{\r\n    static const __m128 two = _mm_set1_ps(2.0f);\r\n\r\n    __m128 q_wwww  = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 3, 3, 3));\r\n    __m128 q_swp0  = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 0, 2, 1));\r\n\t__m128 q_swp1  = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 1, 0, 2));\r\n\t__m128 v_swp0  = _mm_shuffle_ps(v.Data, v.Data, _MM_SHUFFLE(3, 0, 2, 1));\r\n\t__m128 v_swp1  = _mm_shuffle_ps(v.Data, v.Data, _MM_SHUFFLE(3, 1, 0, 2));\r\n\t\r\n\t__m128 uv      = _mm_sub_ps(_mm_mul_ps(q_swp0, v_swp1), _mm_mul_ps(q_swp1, v_swp0));\r\n    __m128 uv_swp0 = _mm_shuffle_ps(uv, uv, _MM_SHUFFLE(3, 0, 2, 1));\r\n    __m128 uv_swp1 = _mm_shuffle_ps(uv, uv, _MM_SHUFFLE(3, 1, 0, 2));\r\n    __m128 uuv     = _mm_sub_ps(_mm_mul_ps(q_swp0, uv_swp1), _mm_mul_ps(q_swp1, uv_swp0));\r\n\r\n    \r\n    uv  = _mm_mul_ps(uv,  _mm_mul_ps(q_wwww, two));\r\n    uuv = _mm_mul_ps(uuv, two);\r\n\r\n    return _mm_add_ps(v.Data, _mm_add_ps(uv, uuv));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator* (fvec4SIMD const & v, fquatSIMD const & q)\r\n{\r\n\treturn inverse(q) * v;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fquatSIMD operator* (fquatSIMD const & q, float s)\r\n{\r\n\treturn fquatSIMD(_mm_mul_ps(q.Data, _mm_set1_ps(s)));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fquatSIMD operator* (float s, fquatSIMD const & q)\r\n{\r\n\treturn fquatSIMD(_mm_mul_ps(_mm_set1_ps(s), q.Data));\r\n}\r\n\r\n\r\n//operator/\r\nGLM_FUNC_QUALIFIER fquatSIMD operator/ (fquatSIMD const & q, float s)\r\n{\r\n\treturn fquatSIMD(_mm_div_ps(q.Data, _mm_set1_ps(s)));\r\n}\r\n\r\n\r\n}//namespace detail\r\n\r\n\r\nGLM_FUNC_QUALIFIER quat quat_cast\r\n(\r\n\tdetail::fquatSIMD const & x\r\n)\r\n{\r\n\tGLM_ALIGN(16) quat Result;\r\n\t_mm_store_ps(&Result[0], x.Data);\r\n\r\n\treturn Result;\r\n}\r\n\r\ntemplate <typename T>\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD quatSIMD_cast_impl(const T m0[], const T m1[], const T m2[])\r\n{\r\n    T trace = m0[0] + m1[1] + m2[2] + T(1.0);\r\n    if (trace > T(0))\r\n    {\r\n        T s = static_cast<T>(0.5) / sqrt(trace);\r\n\r\n        return _mm_set_ps(\r\n            static_cast<float>(T(0.25) / s),\r\n            static_cast<float>((m0[1] - m1[0]) * s),\r\n            static_cast<float>((m2[0] - m0[2]) * s),\r\n            static_cast<float>((m1[2] - m2[1]) * s));\r\n    }\r\n    else\r\n    {\r\n        if (m0[0] > m1[1])\r\n        {\r\n            if (m0[0] > m2[2])\r\n            {\r\n                // X is biggest.\r\n                T s = sqrt(m0[0] - m1[1] - m2[2] + T(1.0)) * T(0.5);\r\n\r\n                return _mm_set_ps(\r\n                    static_cast<float>((m1[2] - m2[1]) * s),\r\n                    static_cast<float>((m2[0] + m0[2]) * s),\r\n                    static_cast<float>((m0[1] + m1[0]) * s),\r\n                    static_cast<float>(T(0.5)          * s));\r\n            }\r\n        }\r\n        else\r\n        {\r\n            if (m1[1] > m2[2])\r\n            {\r\n                // Y is biggest.\r\n                T s = sqrt(m1[1] - m0[0] - m2[2] + T(1.0)) * T(0.5);\r\n\r\n                return _mm_set_ps(\r\n                    static_cast<float>((m2[0] - m0[2]) * s),\r\n                    static_cast<float>((m1[2] + m2[1]) * s),\r\n                    static_cast<float>(T(0.5)          * s),\r\n                    static_cast<float>((m0[1] + m1[0]) * s));\r\n            }\r\n        }\r\n\r\n        // Z is biggest.\r\n        T s = sqrt(m2[2] - m0[0] - m1[1] + T(1.0)) * T(0.5);\r\n\r\n        return _mm_set_ps(\r\n            static_cast<float>((m0[1] - m1[0]) * s),\r\n            static_cast<float>(T(0.5)          * s),\r\n            static_cast<float>((m1[2] + m2[1]) * s),\r\n            static_cast<float>((m2[0] + m0[2]) * s));\r\n    }\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD quatSIMD_cast\r\n(\r\n\tdetail::fmat4x4SIMD const & m\r\n)\r\n{\r\n    // Scalar implementation for now.\r\n    GLM_ALIGN(16) float m0[4];\r\n    GLM_ALIGN(16) float m1[4];\r\n    GLM_ALIGN(16) float m2[4];\r\n\r\n    _mm_store_ps(m0, m[0].Data);\r\n    _mm_store_ps(m1, m[1].Data);\r\n    _mm_store_ps(m2, m[2].Data);\r\n\r\n    return quatSIMD_cast_impl(m0, m1, m2);\r\n}\r\n\r\ntemplate <typename T, precision P>\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD quatSIMD_cast\r\n(\r\n    detail::tmat4x4<T, P> const & m\r\n)\r\n{\r\n    return quatSIMD_cast_impl(&m[0][0], &m[1][0], &m[2][0]);\r\n}\r\n\r\ntemplate <typename T, precision P>\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD quatSIMD_cast\r\n(\r\n    detail::tmat3x3<T, P> const & m\r\n)\r\n{\r\n    return quatSIMD_cast_impl(&m[0][0], &m[1][0], &m[2][0]);\r\n}\r\n\r\n\r\nGLM_FUNC_QUALIFIER detail::fmat4x4SIMD mat4SIMD_cast\r\n(\r\n\tdetail::fquatSIMD const & q\r\n)\r\n{\r\n    detail::fmat4x4SIMD result;\r\n\r\n    __m128 _wwww  = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 3, 3, 3));\r\n    __m128 _xyzw  = q.Data;\r\n    __m128 _zxyw  = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 1, 0, 2));\r\n    __m128 _yzxw  = _mm_shuffle_ps(q.Data, q.Data, _MM_SHUFFLE(3, 0, 2, 1));\r\n\r\n    __m128 _xyzw2 = _mm_add_ps(_xyzw, _xyzw);\r\n    __m128 _zxyw2 = _mm_shuffle_ps(_xyzw2, _xyzw2, _MM_SHUFFLE(3, 1, 0, 2));\r\n    __m128 _yzxw2 = _mm_shuffle_ps(_xyzw2, _xyzw2, _MM_SHUFFLE(3, 0, 2, 1));\r\n    \r\n    __m128 _tmp0  = _mm_sub_ps(_mm_set1_ps(1.0f), _mm_mul_ps(_yzxw2, _yzxw));\r\n           _tmp0  = _mm_sub_ps(_tmp0, _mm_mul_ps(_zxyw2, _zxyw));\r\n\r\n    __m128 _tmp1  = _mm_mul_ps(_yzxw2, _xyzw);\r\n           _tmp1  = _mm_add_ps(_tmp1, _mm_mul_ps(_zxyw2, _wwww));\r\n\r\n    __m128 _tmp2  = _mm_mul_ps(_zxyw2, _xyzw);\r\n           _tmp2  = _mm_sub_ps(_tmp2, _mm_mul_ps(_yzxw2, _wwww));\r\n\r\n\r\n    // There's probably a better, more politically correct way of doing this...\r\n    result[0].Data = _mm_set_ps(\r\n        0.0f,\r\n        reinterpret_cast<float*>(&_tmp2)[0],\r\n        reinterpret_cast<float*>(&_tmp1)[0],\r\n        reinterpret_cast<float*>(&_tmp0)[0]);\r\n\r\n    result[1].Data = _mm_set_ps(\r\n        0.0f,\r\n        reinterpret_cast<float*>(&_tmp1)[1],\r\n        reinterpret_cast<float*>(&_tmp0)[1],\r\n        reinterpret_cast<float*>(&_tmp2)[1]);\r\n\r\n    result[2].Data = _mm_set_ps(\r\n        0.0f,\r\n        reinterpret_cast<float*>(&_tmp0)[2],\r\n        reinterpret_cast<float*>(&_tmp2)[2],\r\n        reinterpret_cast<float*>(&_tmp1)[2]);\r\n\r\n   result[3].Data = _mm_set_ps(\r\n        1.0f,\r\n        0.0f,\r\n        0.0f,\r\n        0.0f);\r\n\r\n\r\n    return result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER mat4 mat4_cast\r\n(\r\n\tdetail::fquatSIMD const & q\r\n)\r\n{\r\n    return mat4_cast(mat4SIMD_cast(q));\r\n}\r\n\r\n\r\n\r\nGLM_FUNC_QUALIFIER float length\r\n(\r\n\tdetail::fquatSIMD const & q\r\n)\r\n{\r\n    return glm::sqrt(dot(q, q));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD normalize\r\n(\r\n\tdetail::fquatSIMD const & q\r\n)\r\n{\r\n    return _mm_mul_ps(q.Data, _mm_set1_ps(1.0f / length(q)));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER float dot\r\n(\r\n\tdetail::fquatSIMD const & q1,\r\n\tdetail::fquatSIMD const & q2\r\n)\r\n{\r\n    float result;\r\n    _mm_store_ss(&result, detail::sse_dot_ps(q1.Data, q2.Data));\r\n\r\n    return result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD mix\r\n(\r\n\tdetail::fquatSIMD const & x, \r\n\tdetail::fquatSIMD const & y, \r\n\tfloat const & a\r\n)\r\n{\r\n\tfloat cosTheta = dot(x, y);\r\n\r\n    if (cosTheta > 1.0f - glm::epsilon<float>())\r\n    {\r\n\t    return _mm_add_ps(x.Data, _mm_mul_ps(_mm_set1_ps(a), _mm_sub_ps(y.Data, x.Data)));\r\n    }\r\n    else\r\n    {\r\n        float angle = glm::acos(cosTheta);\r\n        \r\n        \r\n        float s0 = glm::sin((1.0f - a) * angle);\r\n        float s1 = glm::sin(a * angle);\r\n        float d  = 1.0f / glm::sin(angle);\r\n\r\n        return (s0 * x + s1 * y) * d;\r\n    }\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD lerp\r\n(\r\n\tdetail::fquatSIMD const & x, \r\n\tdetail::fquatSIMD const & y, \r\n\tfloat const & a\r\n)\r\n{\r\n\t// Lerp is only defined in [0, 1]\r\n\tassert(a >= 0.0f);\r\n\tassert(a <= 1.0f);\r\n\r\n    return _mm_add_ps(x.Data, _mm_mul_ps(_mm_set1_ps(a), _mm_sub_ps(y.Data, x.Data)));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD slerp\r\n(\r\n\tdetail::fquatSIMD const & x, \r\n\tdetail::fquatSIMD const & y, \r\n\tfloat const & a\r\n)\r\n{\r\n\tdetail::fquatSIMD z = y;\r\n\r\n\tfloat cosTheta = dot(x, y);\r\n\r\n\t// If cosTheta < 0, the interpolation will take the long way around the sphere. \r\n\t// To fix this, one quat must be negated.\r\n\tif (cosTheta < 0.0f)\r\n\t{\r\n\t\tz        = -y;\r\n\t\tcosTheta = -cosTheta;\r\n\t}\r\n\r\n\t// Perform a linear interpolation when cosTheta is close to 1 to avoid side effect of sin(angle) becoming a zero denominator\r\n\tif(cosTheta > 1.0f - epsilon<float>())\r\n\t{\r\n\t\treturn _mm_add_ps(x.Data, _mm_mul_ps(_mm_set1_ps(a), _mm_sub_ps(y.Data, x.Data)));\r\n\t}\r\n\telse\r\n\t{\r\n        float angle = glm::acos(cosTheta);\r\n\r\n\r\n\t\tfloat s0 = glm::sin((1.0f - a) * angle);\r\n        float s1 = glm::sin(a * angle);\r\n        float d  = 1.0f / glm::sin(angle);\r\n\r\n        return (s0 * x + s1 * y) * d;\r\n\t}\r\n}\r\n\r\n\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD fastMix\r\n(\r\n\tdetail::fquatSIMD const & x, \r\n\tdetail::fquatSIMD const & y, \r\n\tfloat const & a\r\n)\r\n{\r\n\tfloat cosTheta = dot(x, y);\r\n\r\n    if (cosTheta > 1.0f - glm::epsilon<float>())\r\n    {\r\n\t    return _mm_add_ps(x.Data, _mm_mul_ps(_mm_set1_ps(a), _mm_sub_ps(y.Data, x.Data)));\r\n    }\r\n    else\r\n    {\r\n        float angle = glm::fastAcos(cosTheta);\r\n\r\n\r\n        __m128 s  = glm::fastSin(_mm_set_ps((1.0f - a) * angle, a * angle, angle, 0.0f));\r\n\r\n        __m128 s0 =                               _mm_shuffle_ps(s, s, _MM_SHUFFLE(3, 3, 3, 3));\r\n        __m128 s1 =                               _mm_shuffle_ps(s, s, _MM_SHUFFLE(2, 2, 2, 2));\r\n        __m128 d  = _mm_div_ps(_mm_set1_ps(1.0f), _mm_shuffle_ps(s, s, _MM_SHUFFLE(1, 1, 1, 1)));\r\n        \r\n        return _mm_mul_ps(_mm_add_ps(_mm_mul_ps(s0, x.Data), _mm_mul_ps(s1, y.Data)), d);\r\n    }\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD fastSlerp\r\n(\r\n\tdetail::fquatSIMD const & x, \r\n\tdetail::fquatSIMD const & y, \r\n\tfloat const & a\r\n)\r\n{\r\n\tdetail::fquatSIMD z = y;\r\n\r\n\tfloat cosTheta = dot(x, y);\r\n\tif (cosTheta < 0.0f)\r\n\t{\r\n\t\tz        = -y;\r\n\t\tcosTheta = -cosTheta;\r\n\t}\r\n\r\n\r\n\tif(cosTheta > 1.0f - epsilon<float>())\r\n\t{\r\n\t\treturn _mm_add_ps(x.Data, _mm_mul_ps(_mm_set1_ps(a), _mm_sub_ps(y.Data, x.Data)));\r\n\t}\r\n\telse\r\n\t{\r\n        float angle = glm::fastAcos(cosTheta);\r\n\r\n\r\n        __m128 s  = glm::fastSin(_mm_set_ps((1.0f - a) * angle, a * angle, angle, 0.0f));\r\n\r\n        __m128 s0 =                               _mm_shuffle_ps(s, s, _MM_SHUFFLE(3, 3, 3, 3));\r\n        __m128 s1 =                               _mm_shuffle_ps(s, s, _MM_SHUFFLE(2, 2, 2, 2));\r\n        __m128 d  = _mm_div_ps(_mm_set1_ps(1.0f), _mm_shuffle_ps(s, s, _MM_SHUFFLE(1, 1, 1, 1)));\r\n        \r\n        return _mm_mul_ps(_mm_add_ps(_mm_mul_ps(s0, x.Data), _mm_mul_ps(s1, y.Data)), d);\r\n\t}\r\n}\r\n\r\n\r\n\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD conjugate\r\n(\r\n\tdetail::fquatSIMD const & q\r\n)\r\n{\r\n\treturn detail::fquatSIMD(_mm_mul_ps(q.Data, _mm_set_ps(1.0f, -1.0f, -1.0f, -1.0f)));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD inverse\r\n(\r\n\tdetail::fquatSIMD const & q\r\n)\r\n{\r\n\treturn conjugate(q) / dot(q, q);\r\n}\r\n\r\n\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD angleAxisSIMD\r\n(\r\n\tfloat const & angle,\r\n\tvec3 const & v\r\n)\r\n{\r\n#ifdef GLM_FORCE_RADIANS\r\n\tfloat a(angle);\r\n#else\r\n#\tpragma message(\"GLM: rotateZ function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\tfloat a(glm::radians(angle));\r\n#endif\r\n\tfloat s = glm::sin(a * 0.5f);\r\n\r\n\treturn _mm_set_ps(\r\n\t\tglm::cos(a * 0.5f),\r\n\t\tv.z * s,\r\n\t\tv.y * s,\r\n\t\tv.x * s);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fquatSIMD angleAxisSIMD\r\n(\r\n\tfloat const & angle, \r\n\tfloat const & x, \r\n\tfloat const & y, \r\n\tfloat const & z\r\n)\r\n{\r\n\treturn angleAxisSIMD(angle, vec3(x, y, z));\r\n}\r\n\r\n\r\nGLM_FUNC_QUALIFIER __m128 fastSin(__m128 x)\r\n{\r\n    static const __m128 c0 = _mm_set1_ps(0.16666666666666666666666666666667f);\r\n    static const __m128 c1 = _mm_set1_ps(0.00833333333333333333333333333333f);\r\n    static const __m128 c2 = _mm_set1_ps(0.00019841269841269841269841269841f);\r\n\r\n    __m128 x3 = _mm_mul_ps(x,  _mm_mul_ps(x, x));\r\n    __m128 x5 = _mm_mul_ps(x3, _mm_mul_ps(x, x));\r\n    __m128 x7 = _mm_mul_ps(x5, _mm_mul_ps(x, x));\r\n\r\n    __m128 y0 = _mm_mul_ps(x3, c0);\r\n    __m128 y1 = _mm_mul_ps(x5, c1);\r\n    __m128 y2 = _mm_mul_ps(x7, c2);\r\n        \r\n    return _mm_sub_ps(_mm_add_ps(_mm_sub_ps(x, y0), y1), y2);\r\n}\r\n\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/simd_vec4.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_simd_vec4\r\n/// @file glm/gtx/simd_vec4.hpp\r\n/// @date 2009-05-07 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_simd_vec4 GLM_GTX_simd_vec4\r\n/// @ingroup gtx\r\n/// \r\n/// @brief SIMD implementation of vec4 type.\r\n/// \r\n/// <glm/gtx/simd_vec4.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_simd_vec4\r\n#define GLM_GTX_simd_vec4\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(GLM_ARCH != GLM_ARCH_PURE)\r\n\r\n#if(GLM_ARCH & GLM_ARCH_SSE2)\r\n#\tinclude \"../detail/intrinsic_common.hpp\"\r\n#\tinclude \"../detail/intrinsic_geometric.hpp\"\r\n#\tinclude \"../detail/intrinsic_integer.hpp\"\r\n#else\r\n#\terror \"GLM: GLM_GTX_simd_vec4 requires compiler support of SSE2 through intrinsics\"\r\n#endif\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_simd_vec4 extension included\")\r\n#endif\r\n\r\n\r\n// Warning silencer for nameless struct/union.\r\n#if (GLM_COMPILER & GLM_COMPILER_VC)\r\n#\tpragma warning(push)\r\n#\tpragma warning(disable:4201)   // warning C4201: nonstandard extension used : nameless struct/union\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\tenum comp\r\n\t{\r\n\t\tX = 0,\r\n\t\tR = 0,\r\n\t\tS = 0,\r\n\t\tY = 1,\r\n\t\tG = 1,\r\n\t\tT = 1,\r\n\t\tZ = 2,\r\n\t\tB = 2,\r\n\t\tP = 2,\r\n\t\tW = 3,\r\n\t\tA = 3,\r\n\t\tQ = 3\r\n\t};\r\n\r\n}//namespace glm\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\t/// 4-dimensional vector implemented using SIMD SEE intrinsics.\r\n\t/// \\ingroup gtx_simd_vec4\r\n\tGLM_ALIGNED_STRUCT(16) fvec4SIMD\r\n\t{\r\n\t\tenum ctor{null};\r\n\t\ttypedef __m128 value_type;\r\n\t\ttypedef std::size_t size_type;\r\n\t\tstatic size_type value_size();\r\n\r\n\t\ttypedef fvec4SIMD type;\r\n\t\ttypedef tvec4<bool, highp> bool_type;\r\n\r\n#ifdef GLM_SIMD_ENABLE_XYZW_UNION\r\n\t\tunion\r\n\t\t{\r\n\t\t\t__m128 Data;\r\n\t\t\tstruct {float x, y, z, w;};\r\n\t\t};\r\n#else\r\n\t\t__m128 Data;\r\n#endif\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Implicit basic constructors\r\n\r\n\t\tfvec4SIMD();\r\n\t\tfvec4SIMD(__m128 const & Data);\r\n\t\tfvec4SIMD(fvec4SIMD const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Explicit basic constructors\r\n\r\n\t\texplicit fvec4SIMD(\r\n\t\t\tctor);\r\n\t\texplicit fvec4SIMD(\r\n\t\t\tfloat const & s);\r\n\t\texplicit fvec4SIMD(\r\n\t\t\tfloat const & x, \r\n\t\t\tfloat const & y, \r\n\t\t\tfloat const & z, \r\n\t\t\tfloat const & w);\r\n\t\texplicit fvec4SIMD(\r\n\t\t\tvec4 const & v);\r\n\r\n\t\t////////////////////////////////////////\r\n\t\t//// Conversion vector constructors\r\n\r\n\t\tfvec4SIMD(vec2 const & v, float const & s1, float const & s2);\r\n\t\tfvec4SIMD(float const & s1, vec2 const & v, float const & s2);\r\n\t\tfvec4SIMD(float const & s1, float const & s2, vec2 const & v);\r\n\t\tfvec4SIMD(vec3 const & v, float const & s);\r\n\t\tfvec4SIMD(float const & s, vec3 const & v);\r\n\t\tfvec4SIMD(vec2 const & v1, vec2 const & v2);\r\n\t\t//fvec4SIMD(ivec4SIMD const & v);\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Unary arithmetic operators\r\n\r\n\t\tfvec4SIMD& operator= (fvec4SIMD const & v);\r\n\t\tfvec4SIMD& operator+=(fvec4SIMD const & v);\r\n\t\tfvec4SIMD& operator-=(fvec4SIMD const & v);\r\n\t\tfvec4SIMD& operator*=(fvec4SIMD const & v);\r\n\t\tfvec4SIMD& operator/=(fvec4SIMD const & v);\r\n\r\n\t\tfvec4SIMD& operator+=(float const & s);\r\n\t\tfvec4SIMD& operator-=(float const & s);\r\n\t\tfvec4SIMD& operator*=(float const & s);\r\n\t\tfvec4SIMD& operator/=(float const & s);\r\n\r\n\t\tfvec4SIMD& operator++();\r\n\t\tfvec4SIMD& operator--();\r\n\r\n\t\t//////////////////////////////////////\r\n\t\t// Swizzle operators\r\n\r\n\t\ttemplate <comp X, comp Y, comp Z, comp W>\r\n\t\tfvec4SIMD& swizzle();\r\n\t\ttemplate <comp X, comp Y, comp Z, comp W>\r\n\t\tfvec4SIMD swizzle() const;\r\n\t\ttemplate <comp X, comp Y, comp Z>\r\n\t\tfvec4SIMD swizzle() const;\r\n\t\ttemplate <comp X, comp Y>\r\n\t\tfvec4SIMD swizzle() const;\r\n\t\ttemplate <comp X>\r\n\t\tfvec4SIMD swizzle() const;\r\n\t};\r\n}//namespace detail\r\n\r\n\ttypedef glm::detail::fvec4SIMD simdVec4;\r\n\r\n\t/// @addtogroup gtx_simd_vec4\r\n\t/// @{\r\n\r\n\t//! Convert a simdVec4 to a vec4.\r\n\t/// @see gtx_simd_vec4\r\n\tvec4 vec4_cast(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns x if x >= 0; otherwise, it returns -x.\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD abs(detail::fvec4SIMD const & x);\r\n\r\n\t//! Returns 1.0 if x > 0, 0.0 if x = 0, or -1.0 if x < 0.\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD sign(detail::fvec4SIMD const & x);\r\n\r\n\t//! Returns a value equal to the nearest integer that is less then or equal to x.\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD floor(detail::fvec4SIMD const & x);\r\n\r\n\t//! Returns a value equal to the nearest integer to x\r\n\t//! whose absolute value is not larger than the absolute value of x.\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD trunc(detail::fvec4SIMD const & x);\r\n\r\n\t//! Returns a value equal to the nearest integer to x.\r\n\t//! The fraction 0.5 will round in a direction chosen by the\r\n\t//! implementation, presumably the direction that is fastest.\r\n\t//! This includes the possibility that round(x) returns the\r\n\t//! same value as roundEven(x) for all values of x.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD round(detail::fvec4SIMD const & x);\r\n\r\n\t//! Returns a value equal to the nearest integer to x.\r\n\t//! A fractional part of 0.5 will round toward the nearest even\r\n\t//! integer. (Both 3.5 and 4.5 for x will return 4.0.) \r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\t//detail::fvec4SIMD roundEven(detail::fvec4SIMD const & x);\r\n\r\n\t//! Returns a value equal to the nearest integer \r\n\t//! that is greater than or equal to x. \r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD ceil(detail::fvec4SIMD const & x);\r\n\r\n\t//! Return x - floor(x).\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD fract(detail::fvec4SIMD const & x);\r\n\r\n\t//! Modulus. Returns x - y * floor(x / y)\r\n\t//! for each component in x using the floating point value y.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD mod(\r\n\t\tdetail::fvec4SIMD const & x, \r\n\t\tdetail::fvec4SIMD const & y);\r\n\r\n\t//! Modulus. Returns x - y * floor(x / y)\r\n\t//! for each component in x using the floating point value y.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD mod(\r\n\t\tdetail::fvec4SIMD const & x, \r\n\t\tfloat const & y);\r\n\r\n\t//! Returns the fractional part of x and sets i to the integer\r\n\t//! part (as a whole number floating point value). Both the\r\n\t//! return value and the output parameter will have the same\r\n\t//! sign as x.\r\n\t//! (From GLM_GTX_simd_vec4 extension, common function)\r\n\t//detail::fvec4SIMD modf(\r\n\t//\tdetail::fvec4SIMD const & x, \r\n\t//\tdetail::fvec4SIMD & i);\r\n\r\n\t//! Returns y if y < x; otherwise, it returns x.\r\n\t/// \r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD min(\r\n\t\tdetail::fvec4SIMD const & x, \r\n\t\tdetail::fvec4SIMD const & y);\r\n\r\n\tdetail::fvec4SIMD min(\r\n\t\tdetail::fvec4SIMD const & x, \r\n\t\tfloat const & y);\r\n\r\n\t//! Returns y if x < y; otherwise, it returns x.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD max(\r\n\t\tdetail::fvec4SIMD const & x, \r\n\t\tdetail::fvec4SIMD const & y);\r\n\r\n\tdetail::fvec4SIMD max(\r\n\t\tdetail::fvec4SIMD const & x, \r\n\t\tfloat const & y);\r\n\r\n\t//! Returns min(max(x, minVal), maxVal) for each component in x \r\n\t//! using the floating-point values minVal and maxVal.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD clamp(\r\n\t\tdetail::fvec4SIMD const & x, \r\n\t\tdetail::fvec4SIMD const & minVal, \r\n\t\tdetail::fvec4SIMD const & maxVal); \r\n\r\n\tdetail::fvec4SIMD clamp(\r\n\t\tdetail::fvec4SIMD const & x, \r\n\t\tfloat const & minVal, \r\n\t\tfloat const & maxVal); \r\n\r\n\t//! \\return If genTypeU is a floating scalar or vector: \r\n\t//! Returns x * (1.0 - a) + y * a, i.e., the linear blend of \r\n\t//! x and y using the floating-point value a. \r\n\t//! The value for a is not restricted to the range [0, 1].\r\n\t//!\r\n\t//! \\return If genTypeU is a boolean scalar or vector: \r\n\t//! Selects which vector each returned component comes\r\n\t//! from. For a component of a that is false, the\r\n\t//! corresponding component of x is returned. For a\r\n\t//! component of a that is true, the corresponding\r\n\t//! component of y is returned. Components of x and y that\r\n\t//! are not selected are allowed to be invalid floating point\r\n\t//! values and will have no effect on the results. Thus, this\r\n\t//! provides different functionality than\r\n\t//! genType mix(genType x, genType y, genType(a))\r\n\t//! where a is a Boolean vector.\r\n\t//! \r\n\t//! From GLSL 1.30.08 specification, section 8.3\r\n\t//! \r\n\t//! \\param[in]  x Floating point scalar or vector.\r\n\t//! \\param[in]  y Floating point scalar or vector.\r\n\t//! \\param[in]  a Floating point or boolean scalar or vector.\r\n\t//!\r\n\t/// \\todo Test when 'a' is a boolean.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD mix(\r\n\t\tdetail::fvec4SIMD const & x, \r\n\t\tdetail::fvec4SIMD const & y, \r\n\t\tdetail::fvec4SIMD const & a);\r\n\r\n\t//! Returns 0.0 if x < edge, otherwise it returns 1.0.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD step(\r\n\t\tdetail::fvec4SIMD const & edge, \r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\tdetail::fvec4SIMD step(\r\n\t\tfloat const & edge, \r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and\r\n\t//! performs smooth Hermite interpolation between 0 and 1\r\n\t//! when edge0 < x < edge1. This is useful in cases where\r\n\t//! you would want a threshold function with a smooth\r\n\t//! transition. This is equivalent to:\r\n\t//! genType t;\r\n\t//! t = clamp ((x - edge0) / (edge1 - edge0), 0, 1);\r\n\t//! return t * t * (3 - 2 * t);\r\n\t//! Results are undefined if edge0 >= edge1.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD smoothstep(\r\n\t\tdetail::fvec4SIMD const & edge0, \r\n\t\tdetail::fvec4SIMD const & edge1, \r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\tdetail::fvec4SIMD smoothstep(\r\n\t\tfloat const & edge0, \r\n\t\tfloat const & edge1, \r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns true if x holds a NaN (not a number)\r\n\t//! representation in the underlying implementation's set of\r\n\t//! floating point representations. Returns false otherwise,\r\n\t//! including for implementations with no NaN\r\n\t//! representations.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\t//bvec4 isnan(detail::fvec4SIMD const & x);\r\n\r\n\t//! Returns true if x holds a positive infinity or negative\r\n\t//! infinity representation in the underlying implementation's\r\n\t//! set of floating point representations. Returns false\r\n\t//! otherwise, including for implementations with no infinity\r\n\t//! representations.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\t//bvec4 isinf(detail::fvec4SIMD const & x);\r\n\r\n\t//! Returns a signed or unsigned integer value representing\r\n\t//! the encoding of a floating-point value. The floatingpoint\r\n\t//! value's bit-level representation is preserved.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\t//detail::ivec4SIMD floatBitsToInt(detail::fvec4SIMD const & value);\r\n\r\n\t//! Returns a floating-point value corresponding to a signed\r\n\t//! or unsigned integer encoding of a floating-point value.\r\n\t//! If an inf or NaN is passed in, it will not signal, and the\r\n\t//! resulting floating point value is unspecified. Otherwise,\r\n\t//! the bit-level representation is preserved.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\t//detail::fvec4SIMD intBitsToFloat(detail::ivec4SIMD const & value);\r\n\r\n\t//! Computes and returns a * b + c.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD fma(\r\n\t\tdetail::fvec4SIMD const & a, \r\n\t\tdetail::fvec4SIMD const & b, \r\n\t\tdetail::fvec4SIMD const & c);\r\n\r\n\t//! Splits x into a floating-point significand in the range\r\n\t//! [0.5, 1.0) and an integral exponent of two, such that:\r\n\t//! x = significand * exp(2, exponent)\r\n\t//! The significand is returned by the function and the\r\n\t//! exponent is returned in the parameter exp. For a\r\n\t//! floating-point value of zero, the significant and exponent\r\n\t//! are both zero. For a floating-point value that is an\r\n\t//! infinity or is not a number, the results are undefined.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\t//detail::fvec4SIMD frexp(detail::fvec4SIMD const & x, detail::ivec4SIMD & exp);\r\n\r\n\t//! Builds a floating-point number from x and the\r\n\t//! corresponding integral exponent of two in exp, returning:\r\n\t//! significand * exp(2, exponent)\r\n\t//! If this product is too large to be represented in the\r\n\t//! floating-point type, the result is undefined.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\t//detail::fvec4SIMD ldexp(detail::fvec4SIMD const & x, detail::ivec4SIMD const & exp);\r\n\r\n\t//! Returns the length of x, i.e., sqrt(x * x).\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tfloat length(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns the length of x, i.e., sqrt(x * x).\r\n\t//! Less accurate but much faster than simdLength.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tfloat fastLength(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns the length of x, i.e., sqrt(x * x).\r\n\t//! Slightly more accurate but much slower than simdLength.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tfloat niceLength(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns the length of x, i.e., sqrt(x * x).\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD length4(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns the length of x, i.e., sqrt(x * x).\r\n\t//! Less accurate but much faster than simdLength4.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD fastLength4(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns the length of x, i.e., sqrt(x * x).\r\n\t//! Slightly more accurate but much slower than simdLength4.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD niceLength4(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tfloat distance(\r\n\t\tdetail::fvec4SIMD const & p0,\r\n\t\tdetail::fvec4SIMD const & p1);\r\n\r\n\t//! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD distance4(\r\n\t\tdetail::fvec4SIMD const & p0,\r\n\t\tdetail::fvec4SIMD const & p1);\r\n\r\n\t//! Returns the dot product of x and y, i.e., result = x * y.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tfloat simdDot(\r\n\t\tdetail::fvec4SIMD const & x,\r\n\t\tdetail::fvec4SIMD const & y);\r\n\r\n\t//! Returns the dot product of x and y, i.e., result = x * y.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD dot4(\r\n\t\tdetail::fvec4SIMD const & x,\r\n\t\tdetail::fvec4SIMD const & y);\r\n\r\n\t//! Returns the cross product of x and y.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD cross(\r\n\t\tdetail::fvec4SIMD const & x,\r\n\t\tdetail::fvec4SIMD const & y);\r\n\r\n\t//! Returns a vector in the same direction as x but with length of 1.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD normalize(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns a vector in the same direction as x but with length of 1.\r\n\t//! Less accurate but much faster than simdNormalize.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD fastNormalize(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! If dot(Nref, I) < 0.0, return N, otherwise, return -N.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD simdFaceforward(\r\n\t\tdetail::fvec4SIMD const & N,\r\n\t\tdetail::fvec4SIMD const & I,\r\n\t\tdetail::fvec4SIMD const & Nref);\r\n\r\n\t//! For the incident vector I and surface orientation N,\r\n\t//! returns the reflection direction : result = I - 2.0 * dot(N, I) * N.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD reflect(\r\n\t\tdetail::fvec4SIMD const & I,\r\n\t\tdetail::fvec4SIMD const & N);\r\n\r\n\t//! For the incident vector I and surface normal N,\r\n\t//! and the ratio of indices of refraction eta,\r\n\t//! return the refraction vector.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD refract(\r\n\t\tdetail::fvec4SIMD const & I,\r\n\t\tdetail::fvec4SIMD const & N,\r\n\t\tfloat const & eta);\r\n\r\n\t//! Returns the positive square root of x.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD sqrt(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns the positive square root of x with the nicest quality but very slow.\r\n\t//! Slightly more accurate but much slower than simdSqrt.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD niceSqrt(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns the positive square root of x\r\n\t//! Less accurate but much faster than sqrt.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD fastSqrt(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns the reciprocal of the positive square root of x.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD inversesqrt(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t//! Returns the reciprocal of the positive square root of x.\r\n\t//! Faster than inversesqrt but less accurate.\r\n\t///\r\n\t/// @see gtx_simd_vec4\r\n\tdetail::fvec4SIMD fastInversesqrt(\r\n\t\tdetail::fvec4SIMD const & x);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"simd_vec4.inl\"\r\n\r\n#if (GLM_COMPILER & GLM_COMPILER_VC)\r\n#\tpragma warning(pop)\r\n#endif\r\n\r\n#endif//(GLM_ARCH != GLM_ARCH_PURE)\r\n\r\n#endif//GLM_GTX_simd_vec4\r\n"
  },
  {
    "path": "gpu/glm/gtx/simd_vec4.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2009-05-07\r\n// Updated : 2009-05-07\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/simd_vec4.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\nnamespace detail{\r\n\r\ntemplate <int Value>\r\nstruct mask\r\n{\r\n\tenum{value = Value};\r\n};\r\n\r\n//////////////////////////////////////\r\n// Implicit basic constructors\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD()\r\n#ifdef GLM_SIMD_ENABLE_DEFAULT_INIT\r\n    : Data(_mm_set_ps(0.0f, 0.0f, 0.0f, 0.0f))\r\n#endif\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(__m128 const & Data) :\r\n\tData(Data)\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(fvec4SIMD const & v) :\r\n\tData(v.Data)\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec4 const & v) :\r\n\tData(_mm_set_ps(v.w, v.z, v.y, v.x))\r\n{}\r\n\r\n//////////////////////////////////////\r\n// Explicit basic constructors\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s) :\r\n\tData(_mm_set1_ps(s))\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & x, float const & y, float const & z, float const & w) :\r\n//\t\tData(_mm_setr_ps(x, y, z, w))\r\n\tData(_mm_set_ps(w, z, y, x))\r\n{}\r\n/*\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const v[4]) :\r\n\tData(_mm_load_ps(v))\r\n{}\r\n*/\r\n//////////////////////////////////////\r\n// Swizzle constructors\r\n\r\n//fvec4SIMD(ref4<float> const & r);\r\n\r\n//////////////////////////////////////\r\n// Conversion vector constructors\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec2 const & v, float const & s1, float const & s2) :\r\n\tData(_mm_set_ps(s2, s1, v.y, v.x))\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s1, vec2 const & v, float const & s2) :\r\n\tData(_mm_set_ps(s2, v.y, v.x, s1))\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s1, float const & s2, vec2 const & v) :\r\n\tData(_mm_set_ps(v.y, v.x, s2, s1))\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec3 const & v, float const & s) :\r\n\tData(_mm_set_ps(s, v.z, v.y, v.x))\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(float const & s, vec3 const & v) :\r\n\tData(_mm_set_ps(v.z, v.y, v.x, s))\r\n{}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(vec2 const & v1, vec2 const & v2) :\r\n\tData(_mm_set_ps(v2.y, v2.x, v1.y, v1.x))\r\n{}\r\n\r\n//GLM_FUNC_QUALIFIER fvec4SIMD::fvec4SIMD(ivec4SIMD const & v) :\r\n//\tData(_mm_cvtepi32_ps(v.Data))\r\n//{}\r\n\r\n//////////////////////////////////////\r\n// Unary arithmetic operators\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator=(fvec4SIMD const & v)\r\n{\r\n\tthis->Data = v.Data;\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator+=(float const & s)\r\n{\r\n\tthis->Data = _mm_add_ps(Data, _mm_set_ps1(s));\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator+=(fvec4SIMD const & v)\r\n{\r\n\tthis->Data = _mm_add_ps(this->Data , v.Data);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator-=(float const & s)\r\n{\r\n\tthis->Data = _mm_sub_ps(Data, _mm_set_ps1(s));\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator-=(fvec4SIMD const & v)\r\n{\r\n\tthis->Data = _mm_sub_ps(this->Data , v.Data);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator*=(float const & s)\r\n{\r\n\tthis->Data = _mm_mul_ps(this->Data, _mm_set_ps1(s));\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator*=(fvec4SIMD const & v)\r\n{\r\n\tthis->Data = _mm_mul_ps(this->Data , v.Data);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator/=(float const & s)\r\n{\r\n\tthis->Data = _mm_div_ps(Data, _mm_set1_ps(s));\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator/=(fvec4SIMD const & v)\r\n{\r\n\tthis->Data = _mm_div_ps(this->Data , v.Data);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator++()\r\n{\r\n\tthis->Data = _mm_add_ps(this->Data , glm::detail::one);\r\n\treturn *this;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::operator--()\r\n{\r\n\tthis->Data = _mm_sub_ps(this->Data, glm::detail::one);\r\n\treturn *this;\r\n}\r\n\r\n//////////////////////////////////////\r\n// Swizzle operators\r\n\r\ntemplate <comp X, comp Y, comp Z, comp W>\r\nGLM_FUNC_QUALIFIER fvec4SIMD fvec4SIMD::swizzle() const\r\n{\r\n\t__m128 Data = _mm_shuffle_ps(\r\n\t\tthis->Data, this->Data, \r\n\t\tmask<(W << 6) | (Z << 4) | (Y << 2) | (X << 0)>::value);\r\n\treturn fvec4SIMD(Data);\r\n}\r\n\r\ntemplate <comp X, comp Y, comp Z, comp W>\r\nGLM_FUNC_QUALIFIER fvec4SIMD& fvec4SIMD::swizzle()\r\n{\r\n\tthis->Data = _mm_shuffle_ps(\r\n\t\tthis->Data, this->Data, \r\n\t\tmask<(W << 6) | (Z << 4) | (Y << 2) | (X << 0)>::value);\r\n\treturn *this;\r\n}\r\n\r\n// operator+\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator+ (fvec4SIMD const & v, float s)\r\n{\r\n\treturn fvec4SIMD(_mm_add_ps(v.Data, _mm_set1_ps(s)));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator+ (float s, fvec4SIMD const & v)\r\n{\r\n\treturn fvec4SIMD(_mm_add_ps(_mm_set1_ps(s), v.Data));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator+ (fvec4SIMD const & v1, fvec4SIMD const & v2)\r\n{\r\n\treturn fvec4SIMD(_mm_add_ps(v1.Data, v2.Data));\r\n}\r\n\r\n//operator-\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v, float s)\r\n{\r\n\treturn fvec4SIMD(_mm_sub_ps(v.Data, _mm_set1_ps(s)));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator- (float s, fvec4SIMD const & v)\r\n{\r\n\treturn fvec4SIMD(_mm_sub_ps(_mm_set1_ps(s), v.Data));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v1, fvec4SIMD const & v2)\r\n{\r\n\treturn fvec4SIMD(_mm_sub_ps(v1.Data, v2.Data));\r\n}\r\n\r\n//operator*\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator* (fvec4SIMD const & v, float s)\r\n{\r\n\t__m128 par0 = v.Data;\r\n\t__m128 par1 = _mm_set1_ps(s);\r\n\treturn fvec4SIMD(_mm_mul_ps(par0, par1));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator* (float s, fvec4SIMD const & v)\r\n{\r\n\t__m128 par0 = _mm_set1_ps(s);\r\n\t__m128 par1 = v.Data;\r\n\treturn fvec4SIMD(_mm_mul_ps(par0, par1));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator* (fvec4SIMD const & v1, fvec4SIMD const & v2)\r\n{\r\n\treturn fvec4SIMD(_mm_mul_ps(v1.Data, v2.Data));\r\n}\r\n\r\n//operator/\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator/ (fvec4SIMD const & v, float s)\r\n{\r\n\t__m128 par0 = v.Data;\r\n\t__m128 par1 = _mm_set1_ps(s);\r\n\treturn fvec4SIMD(_mm_div_ps(par0, par1));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator/ (float s, fvec4SIMD const & v)\r\n{\r\n\t__m128 par0 = _mm_set1_ps(s);\r\n\t__m128 par1 = v.Data;\r\n\treturn fvec4SIMD(_mm_div_ps(par0, par1));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator/ (fvec4SIMD const & v1, fvec4SIMD const & v2)\r\n{\r\n\treturn fvec4SIMD(_mm_div_ps(v1.Data, v2.Data));\r\n}\r\n\r\n// Unary constant operators\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator- (fvec4SIMD const & v)\r\n{\r\n\treturn fvec4SIMD(_mm_sub_ps(_mm_setzero_ps(), v.Data));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator++ (fvec4SIMD const & v, int)\r\n{\r\n\treturn fvec4SIMD(_mm_add_ps(v.Data, glm::detail::one));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER fvec4SIMD operator-- (fvec4SIMD const & v, int)\r\n{\r\n\treturn fvec4SIMD(_mm_sub_ps(v.Data, glm::detail::one));\r\n}\r\n\r\n}//namespace detail\r\n\r\nGLM_FUNC_QUALIFIER vec4 vec4_cast\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\tGLM_ALIGN(16) vec4 Result;\r\n\t_mm_store_ps(&Result[0], x.Data);\r\n\treturn Result;\r\n}\r\n\r\n// Other possible implementation\r\n//float abs(float a)\r\n//{\r\n//  return max(-a, a);\r\n//}\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD abs\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\treturn detail::sse_abs_ps(x.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD sign\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\treturn detail::sse_sgn_ps(x.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD floor\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\treturn detail::sse_flr_ps(x.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD trunc\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n    //return x < 0 ? -floor(-x) : floor(x);\r\n\r\n\t__m128 Flr0 = detail::sse_flr_ps(_mm_sub_ps(_mm_setzero_ps(), x.Data));\r\n\t__m128 Sub0 = _mm_sub_ps(Flr0, x.Data);\r\n\t__m128 Flr1 = detail::sse_flr_ps(x.Data);\r\n\r\n\t__m128 Cmp0 = _mm_cmplt_ps(x.Data, glm::detail::zero);\r\n\t__m128 Cmp1 = _mm_cmpnlt_ps(x.Data, glm::detail::zero);\r\n\r\n\t__m128 And0 = _mm_and_ps(Sub0, Cmp0);\r\n\t__m128 And1 = _mm_and_ps(Flr1, Cmp1);\r\n\r\n\treturn _mm_or_ps(And0, And1);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD round\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\treturn detail::sse_rnd_ps(x.Data);\r\n}\r\n\r\n//GLM_FUNC_QUALIFIER detail::fvec4SIMD roundEven\r\n//(\r\n//\tdetail::fvec4SIMD const & x\r\n//)\r\n//{\r\n\r\n//}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD ceil\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\treturn detail::sse_ceil_ps(x.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD fract\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\treturn detail::sse_frc_ps(x.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD mod\r\n(\r\n\tdetail::fvec4SIMD const & x, \r\n\tdetail::fvec4SIMD const & y\r\n)\r\n{\r\n\treturn detail::sse_mod_ps(x.Data, y.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD mod\r\n(\r\n\tdetail::fvec4SIMD const & x, \r\n\tfloat const & y\r\n)\r\n{\r\n\treturn detail::sse_mod_ps(x.Data, _mm_set1_ps(y));\r\n}\r\n\r\n//GLM_FUNC_QUALIFIER detail::fvec4SIMD modf\r\n//(\r\n//\tdetail::fvec4SIMD const & x, \r\n//\tdetail::fvec4SIMD & i\r\n//)\r\n//{\r\n\r\n//}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD min\r\n(\r\n\tdetail::fvec4SIMD const & x, \r\n\tdetail::fvec4SIMD const & y\r\n)\r\n{\r\n\treturn _mm_min_ps(x.Data, y.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD min\r\n(\r\n\tdetail::fvec4SIMD const & x, \r\n\tfloat const & y\r\n)\r\n{\r\n\treturn _mm_min_ps(x.Data, _mm_set1_ps(y));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD max\r\n(\r\n\tdetail::fvec4SIMD const & x, \r\n\tdetail::fvec4SIMD const & y\r\n)\r\n{\r\n\treturn _mm_max_ps(x.Data, y.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD max\r\n(\r\n\tdetail::fvec4SIMD const & x, \r\n\tfloat const & y\r\n)\r\n{\r\n\treturn _mm_max_ps(x.Data, _mm_set1_ps(y));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD clamp\r\n(\r\n\tdetail::fvec4SIMD const & x, \r\n\tdetail::fvec4SIMD const & minVal, \r\n\tdetail::fvec4SIMD const & maxVal\r\n)\r\n{\r\n\treturn detail::sse_clp_ps(x.Data, minVal.Data, maxVal.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD clamp\r\n(\r\n\tdetail::fvec4SIMD const & x, \r\n\tfloat const & minVal, \r\n\tfloat const & maxVal\r\n) \r\n{\r\n\treturn detail::sse_clp_ps(x.Data, _mm_set1_ps(minVal), _mm_set1_ps(maxVal));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD mix\r\n(\r\n\tdetail::fvec4SIMD const & x, \r\n\tdetail::fvec4SIMD const & y, \r\n\tdetail::fvec4SIMD const & a\r\n)\r\n{\r\n\t__m128 Sub0 = _mm_sub_ps(y.Data, x.Data);\r\n\t__m128 Mul0 = _mm_mul_ps(a.Data, Sub0);\r\n\treturn _mm_add_ps(x.Data, Mul0);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD step\r\n(\r\n\tdetail::fvec4SIMD const & edge, \r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\t__m128 cmp0 = _mm_cmpngt_ps(x.Data, edge.Data);\r\n\treturn _mm_max_ps(_mm_min_ps(cmp0, _mm_setzero_ps()), detail::one);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD step\r\n(\r\n\tfloat const & edge, \r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\t__m128 cmp0 = _mm_cmpngt_ps(x.Data, _mm_set1_ps(edge));\r\n\treturn _mm_max_ps(_mm_min_ps(cmp0, _mm_setzero_ps()), detail::one);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD smoothstep\r\n(\r\n\tdetail::fvec4SIMD const & edge0, \r\n\tdetail::fvec4SIMD const & edge1, \r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\treturn detail::sse_ssp_ps(edge0.Data, edge1.Data, x.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD smoothstep\r\n(\r\n\tfloat const & edge0, \r\n\tfloat const & edge1, \r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\treturn detail::sse_ssp_ps(_mm_set1_ps(edge0), _mm_set1_ps(edge1), x.Data);\r\n}\r\n\r\n//GLM_FUNC_QUALIFIER bvec4 isnan(detail::fvec4SIMD const & x)\r\n//{\r\n\r\n//}\r\n\r\n//GLM_FUNC_QUALIFIER bvec4 isinf(detail::fvec4SIMD const & x)\r\n//{\r\n\r\n//}\r\n\r\n//GLM_FUNC_QUALIFIER detail::ivec4SIMD floatBitsToInt\r\n//(\r\n//\tdetail::fvec4SIMD const & value\r\n//)\r\n//{\r\n\r\n//}\r\n\r\n//GLM_FUNC_QUALIFIER detail::fvec4SIMD intBitsToFloat\r\n//(\r\n//\tdetail::ivec4SIMD const & value\r\n//)\r\n//{\r\n\r\n//}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD fma\r\n(\r\n\tdetail::fvec4SIMD const & a, \r\n\tdetail::fvec4SIMD const & b, \r\n\tdetail::fvec4SIMD const & c\r\n)\r\n{\r\n\treturn _mm_add_ps(_mm_mul_ps(a.Data, b.Data), c.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER float length\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\tdetail::fvec4SIMD dot0 = detail::sse_dot_ss(x.Data, x.Data);\r\n\tdetail::fvec4SIMD sqt0 = sqrt(dot0);\r\n\tfloat Result = 0;\r\n\t_mm_store_ss(&Result, sqt0.Data);\r\n\treturn Result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER float fastLength\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\tdetail::fvec4SIMD dot0 = detail::sse_dot_ss(x.Data, x.Data);\r\n\tdetail::fvec4SIMD sqt0 = fastSqrt(dot0);\r\n\tfloat Result = 0;\r\n\t_mm_store_ss(&Result, sqt0.Data);\r\n\treturn Result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER float niceLength\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\tdetail::fvec4SIMD dot0 = detail::sse_dot_ss(x.Data, x.Data);\r\n\tdetail::fvec4SIMD sqt0 = niceSqrt(dot0);\r\n\tfloat Result = 0;\r\n\t_mm_store_ss(&Result, sqt0.Data);\r\n\treturn Result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD length4\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\treturn sqrt(dot4(x, x));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD fastLength4\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\treturn fastSqrt(dot4(x, x));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD niceLength4\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\treturn niceSqrt(dot4(x, x));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER float distance\r\n(\r\n\tdetail::fvec4SIMD const & p0,\r\n\tdetail::fvec4SIMD const & p1\r\n)\r\n{\r\n\tfloat Result = 0;\r\n\t_mm_store_ss(&Result, detail::sse_dst_ps(p0.Data, p1.Data));\r\n\treturn Result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD distance4\r\n(\r\n\tdetail::fvec4SIMD const & p0,\r\n\tdetail::fvec4SIMD const & p1\r\n)\r\n{\r\n\treturn detail::sse_dst_ps(p0.Data, p1.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER float dot\r\n(\r\n\tdetail::fvec4SIMD const & x,\r\n\tdetail::fvec4SIMD const & y\r\n)\r\n{\r\n\tfloat Result = 0;\r\n\t_mm_store_ss(&Result, detail::sse_dot_ss(x.Data, y.Data));\r\n\treturn Result;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD dot4\r\n(\r\n\tdetail::fvec4SIMD const & x,\r\n\tdetail::fvec4SIMD const & y\r\n)\r\n{\r\n\treturn detail::sse_dot_ps(x.Data, y.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD cross\r\n(\r\n\tdetail::fvec4SIMD const & x,\r\n\tdetail::fvec4SIMD const & y\r\n)\r\n{\r\n\treturn detail::sse_xpd_ps(x.Data, y.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD normalize\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\t__m128 dot0 = detail::sse_dot_ps(x.Data, x.Data);\r\n\t__m128 isr0 = inversesqrt(detail::fvec4SIMD(dot0)).Data;\r\n\t__m128 mul0 = _mm_mul_ps(x.Data, isr0);\r\n\treturn mul0;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD fastNormalize\r\n(\r\n\tdetail::fvec4SIMD const & x\r\n)\r\n{\r\n\t__m128 dot0 = detail::sse_dot_ps(x.Data, x.Data);\r\n\t__m128 isr0 = fastInversesqrt(dot0).Data;\r\n\t__m128 mul0 = _mm_mul_ps(x.Data, isr0);\r\n\treturn mul0;\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD faceforward\r\n(\r\n\tdetail::fvec4SIMD const & N,\r\n\tdetail::fvec4SIMD const & I,\r\n\tdetail::fvec4SIMD const & Nref\r\n)\r\n{\r\n\treturn detail::sse_ffd_ps(N.Data, I.Data, Nref.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD reflect\r\n(\r\n\tdetail::fvec4SIMD const & I,\r\n\tdetail::fvec4SIMD const & N\r\n)\r\n{\r\n\treturn detail::sse_rfe_ps(I.Data, N.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD refract\r\n(\r\n\tdetail::fvec4SIMD const & I,\r\n\tdetail::fvec4SIMD const & N,\r\n\tfloat const & eta\r\n)\r\n{\r\n\treturn detail::sse_rfa_ps(I.Data, N.Data, _mm_set1_ps(eta));\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD sqrt(detail::fvec4SIMD const & x)\r\n{\r\n\treturn _mm_mul_ps(inversesqrt(x).Data, x.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD niceSqrt(detail::fvec4SIMD const & x)\r\n{\r\n\treturn _mm_sqrt_ps(x.Data);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD fastSqrt(detail::fvec4SIMD const & x)\r\n{\r\n\treturn _mm_mul_ps(fastInversesqrt(x.Data).Data, x.Data);\r\n}\r\n\r\n// SSE scalar reciprocal sqrt using rsqrt op, plus one Newton-Rhaphson iteration\r\n// By Elan Ruskin, http://assemblyrequired.crashworks.org/\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD inversesqrt(detail::fvec4SIMD const & x)\r\n{\r\n\tGLM_ALIGN(4) static const __m128 three = {3, 3, 3, 3}; // aligned consts for fast load\r\n\tGLM_ALIGN(4) static const __m128 half = {0.5,0.5,0.5,0.5};\r\n\r\n\t__m128 recip = _mm_rsqrt_ps(x.Data);  // \"estimate\" opcode\r\n\t__m128 halfrecip = _mm_mul_ps(half, recip);\r\n\t__m128 threeminus_xrr = _mm_sub_ps(three, _mm_mul_ps(x.Data, _mm_mul_ps(recip, recip)));\r\n\treturn _mm_mul_ps(halfrecip, threeminus_xrr);\r\n}\r\n\r\nGLM_FUNC_QUALIFIER detail::fvec4SIMD fastInversesqrt(detail::fvec4SIMD const & x)\r\n{\r\n\treturn _mm_rsqrt_ps(x.Data);\r\n}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/spline.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_spline\r\n/// @file glm/gtx/spline.hpp\r\n/// @date 2007-01-25 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_spline GLM_GTX_spline\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Spline functions\r\n/// \r\n/// <glm/gtx/spline.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_spline\r\n#define GLM_GTX_spline\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtx/optimum_pow.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_spline extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_spline\r\n\t/// @{\r\n\r\n\t//! Return a point from a catmull rom curve.\r\n\t/// @see gtx_spline extension.\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType catmullRom(\r\n\t\tgenType const & v1, \r\n\t\tgenType const & v2, \r\n\t\tgenType const & v3, \r\n\t\tgenType const & v4, \r\n\t\ttypename genType::value_type const & s);\r\n\t\t\r\n\t//! Return a point from a hermite curve.\r\n\t/// @see gtx_spline extension.\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType hermite(\r\n\t\tgenType const & v1, \r\n\t\tgenType const & t1, \r\n\t\tgenType const & v2, \r\n\t\tgenType const & t2, \r\n\t\ttypename genType::value_type const & s);\r\n\t\t\r\n\t//! Return a point from a cubic curve. \r\n\t/// @see gtx_spline extension.\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType cubic(\r\n\t\tgenType const & v1, \r\n\t\tgenType const & v2, \r\n\t\tgenType const & v3, \r\n\t\tgenType const & v4, \r\n\t\ttypename genType::value_type const & s);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"spline.inl\"\r\n\r\n#endif//GLM_GTX_spline\r\n\r\n"
  },
  {
    "path": "gpu/glm/gtx/spline.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-01-25\r\n// Updated : 2009-02-19\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/spline.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm{\r\n\r\ntemplate <typename genType>\r\nGLM_FUNC_QUALIFIER genType catmullRom\r\n(\r\n\tgenType const & v1, \r\n\tgenType const & v2, \r\n\tgenType const & v3, \r\n\tgenType const & v4, \r\n\ttypename genType::value_type const & s\r\n)\r\n{\r\n\ttypename genType::value_type s1 = s;\r\n\ttypename genType::value_type s2 = pow2(s);\r\n\ttypename genType::value_type s3 = pow3(s);\r\n\r\n\ttypename genType::value_type f1 = -s3 + typename genType::value_type(2) * s2 - s;\r\n\ttypename genType::value_type f2 = typename genType::value_type(3) * s3 - typename genType::value_type(5) * s2 + typename genType::value_type(2);\r\n\ttypename genType::value_type f3 = typename genType::value_type(-3) * s3 + typename genType::value_type(4) * s2 + s;\r\n\ttypename genType::value_type f4 = s3 - s2;\r\n\r\n\treturn (f1 * v1 + f2 * v2 + f3 * v3 + f4 * v4) / typename genType::value_type(2);\r\n\r\n}\r\n\r\ntemplate <typename genType>\r\nGLM_FUNC_QUALIFIER genType hermite\r\n(\r\n\tgenType const & v1, \r\n\tgenType const & t1, \r\n\tgenType const & v2, \r\n\tgenType const & t2, \r\n\ttypename genType::value_type const & s\r\n)\r\n{\r\n\ttypename genType::value_type s1 = s;\r\n\ttypename genType::value_type s2 = pow2(s);\r\n\ttypename genType::value_type s3 = pow3(s);\r\n\r\n\ttypename genType::value_type f1 = typename genType::value_type(2) * s3 - typename genType::value_type(3) * s2 + typename genType::value_type(1);\r\n\ttypename genType::value_type f2 = typename genType::value_type(-2) * s3 + typename genType::value_type(3) * s2;\r\n\ttypename genType::value_type f3 = s3 - typename genType::value_type(2) * s2 + s;\r\n\ttypename genType::value_type f4 = s3 - s2;\r\n\r\n\treturn f1 * v1 + f2 * v2 + f3 * t1 + f4 * t2;\r\n}\r\n\r\ntemplate <typename genType>\r\nGLM_FUNC_QUALIFIER genType cubic\r\n(\r\n\tgenType const & v1, \r\n\tgenType const & v2, \r\n\tgenType const & v3, \r\n\tgenType const & v4, \r\n\ttypename genType::value_type const & s\r\n)\r\n{\r\n\treturn ((v1 * s + v2) * s + v3) * s + v4;\r\n}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/std_based_type.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_std_based_type\r\n/// @file glm/gtx/std_based_type.hpp\r\n/// @date 2008-06-08 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_extented_min_max (dependence)\r\n///\r\n/// @defgroup gtx_std_based_type GLM_GTX_std_based_type\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Adds vector types based on STL value types.\r\n/// <glm/gtx/std_based_type.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_std_based_type\r\n#define GLM_GTX_std_based_type\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include <cstdlib>\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_std_based_type extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_std_based_type\r\n\t/// @{\r\n\t\r\n\t/// Vector type based of two std::size_t components.\r\n\t/// @see GLM_GTX_std_based_type\r\n\ttypedef detail::tvec2<std::size_t, defaultp>\t\tsize2;\r\n\t\r\n\t/// Vector type based of three std::size_t components.\r\n\t/// @see GLM_GTX_std_based_type\r\n\ttypedef detail::tvec3<std::size_t, defaultp>\t\tsize3;\r\n\r\n\t/// Vector type based of four std::size_t components.\r\n\t/// @see GLM_GTX_std_based_type\r\n\ttypedef detail::tvec4<std::size_t, defaultp>\t\tsize4;\r\n\r\n\t/// Vector type based of two std::size_t components.\r\n\t/// @see GLM_GTX_std_based_type\r\n\ttypedef detail::tvec2<std::size_t, defaultp>\t\tsize2_t;\r\n\t\r\n\t/// Vector type based of three std::size_t components.\r\n\t/// @see GLM_GTX_std_based_type\r\n\ttypedef detail::tvec3<std::size_t, defaultp>\t\tsize3_t;\r\n\t\r\n\t/// Vector type based of four std::size_t components.\r\n\t/// @see GLM_GTX_std_based_type\r\n\ttypedef detail::tvec4<std::size_t, defaultp>\t\tsize4_t;\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"std_based_type.inl\"\r\n\r\n#endif//GLM_GTX_std_based_type\r\n"
  },
  {
    "path": "gpu/glm/gtx/std_based_type.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2008-06-08\r\n// Updated : 2008-06-08\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/std_based_type.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\r\n}\r\n"
  },
  {
    "path": "gpu/glm/gtx/string_cast.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_string_cast\r\n/// @file glm/gtx/string_cast.hpp\r\n/// @date 2008-04-26 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_half_float (dependence)\r\n/// @see gtx_integer (dependence)\r\n/// @see gtx_quaternion (dependence)\r\n///\r\n/// @defgroup gtx_string_cast GLM_GTX_string_cast\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Setup strings for GLM type values\r\n/// \r\n/// <glm/gtx/string_cast.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_string_cast\r\n#define GLM_GTX_string_cast\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtx/integer.hpp\"\r\n#include \"../gtx/quaternion.hpp\"\r\n#include <string>\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_string_cast extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_string_cast\r\n\t/// @{\r\n\r\n\t/// Create a string from a GLM type value.\r\n\t/// @see gtx_string_cast extension.\r\n\ttemplate <typename genType> \r\n\tstd::string to_string(genType const & x);\r\n\r\n\t/// @}\r\n}//namespace glm\r\n\r\n#include \"string_cast.inl\"\r\n\r\n#endif//GLM_GTX_string_cast\r\n"
  },
  {
    "path": "gpu/glm/gtx/string_cast.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2006 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2008-04-27\r\n// Updated : 2008-05-24\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/string_cast.hpp\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include <cstdarg>\r\n#include <cstdio>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\tGLM_FUNC_QUALIFIER std::string format(const char* msg, ...)\r\n\t{\r\n\t\tstd::size_t const STRING_BUFFER(4096);\r\n\t\tchar text[STRING_BUFFER];\r\n\t\tva_list list;\r\n\r\n\t\tif(msg == 0)\r\n\t\t\treturn std::string();\r\n\r\n\t\tva_start(list, msg);\r\n#if((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC8))\r\n\t\t\tvsprintf_s(text, STRING_BUFFER, msg, list);\r\n#else//\r\n\t\t\tvsprintf(text, msg, list);\r\n#endif//\r\n\t\tva_end(list);\r\n\r\n\t\treturn std::string(text);\r\n\t}\r\n\r\n\tstatic const char* True = \"true\";\r\n\tstatic const char* False = \"false\";\r\n}//namespace detail\r\n\r\n\t////////////////////////////////\r\n\t// Scalars\r\n\r\n\tGLM_FUNC_QUALIFIER std::string to_string(float x)\r\n\t{\r\n\t\treturn detail::format(\"float(%f)\", x);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER std::string to_string(double x)\r\n\t{\r\n\t\treturn detail::format(\"double(%f)\", x);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER std::string to_string(int x)\r\n\t{\r\n\t\treturn detail::format(\"int(%d)\", x);\r\n\t}\r\n\r\n\tGLM_FUNC_QUALIFIER std::string to_string(unsigned int x)\r\n\t{\r\n\t\treturn detail::format(\"uint(%d)\", x);\r\n\t}\r\n\r\n\t////////////////////////////////\r\n\t// Bool vectors\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec2<bool, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"bvec2(%s, %s)\",\r\n\t\t\tv.x ? detail::True : detail::False,\r\n\t\t\tv.y ? detail::True : detail::False);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec3<bool, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"bvec3(%s, %s, %s)\",\r\n\t\t\tv.x ? detail::True : detail::False,\r\n\t\t\tv.y ? detail::True : detail::False,\r\n\t\t\tv.z ? detail::True : detail::False);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec4<bool, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"bvec4(%s, %s, %s, %s)\",\r\n\t\t\tv.x ? detail::True : detail::False,\r\n\t\t\tv.y ? detail::True : detail::False,\r\n\t\t\tv.z ? detail::True : detail::False,\r\n\t\t\tv.w ? detail::True : detail::False);\r\n\t}\r\n\r\n\t////////////////////////////////\r\n\t// Float vectors\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec2<float, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"fvec2(%f, %f)\", v.x, v.y);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec3<float, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"fvec3(%f, %f, %f)\", v.x, v.y, v.z);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec4<float, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"fvec4(%f, %f, %f, %f)\", v.x, v.y, v.z, v.w);\r\n\t}\r\n\r\n\t////////////////////////////////\r\n\t// Double vectors\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec2<double, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dvec2(%f, %f)\", v.x, v.y);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec3<double, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dvec3(%f, %f, %f)\", v.x, v.y, v.z);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec4<double, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dvec4(%f, %f, %f, %f)\", v.x, v.y, v.z, v.w);\r\n\t}\r\n\r\n\t////////////////////////////////\r\n\t// Int vectors\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec2<int, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"ivec2(%d, %d)\", v.x, v.y);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec3<int, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"ivec3(%d, %d, %d)\", v.x, v.y, v.z);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec4<int, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"ivec4(%d, %d, %d, %d)\", v.x, v.y, v.z, v.w);\r\n\t}\r\n\r\n\t////////////////////////////////\r\n\t// Unsigned int vectors\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec2<unsigned int, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"uvec2(%d, %d)\", v.x, v.y);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec3<unsigned int, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"uvec3(%d, %d, %d)\", v.x, v.y, v.z);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tvec4<unsigned int, P> const & v\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"uvec4(%d, %d, %d, %d)\", v.x, v.y, v.z, v.w);\r\n\t}\r\n\r\n\t////////////////////////////////\r\n\t// Float matrices\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat2x2<float, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"mat2x2((%f, %f), (%f, %f))\", \r\n\t\t\tx[0][0], x[0][1], \r\n\t\t\tx[1][0], x[1][1]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat2x3<float, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"mat2x3((%f, %f, %f), (%f, %f, %f))\", \r\n\t\t\tx[0][0], x[0][1], x[0][2], \r\n\t\t\tx[1][0], x[1][1], x[1][2]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat2x4<float, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"mat2x4((%f, %f, %f, %f), (%f, %f, %f, %f))\", \r\n\t\t\tx[0][0], x[0][1], x[0][2], x[0][3], \r\n\t\t\tx[1][0], x[1][1], x[1][2], x[1][3]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat3x2<float, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"mat3x2((%f, %f), (%f, %f), (%f, %f))\", \r\n\t\t\tx[0][0], x[0][1], \r\n\t\t\tx[1][0], x[1][1], \r\n\t\t\tx[2][0], x[2][1]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat3x3<float, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"mat3x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f))\", \r\n\t\t\tx[0][0], x[0][1], x[0][2], \r\n\t\t\tx[1][0], x[1][1], x[1][2],\r\n\t\t\tx[2][0], x[2][1], x[2][2]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat3x4<float, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"mat3x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))\", \r\n\t\t\tx[0][0], x[0][1], x[0][2], x[0][3], \r\n\t\t\tx[1][0], x[1][1], x[1][2], x[1][3], \r\n\t\t\tx[2][0], x[2][1], x[2][2], x[2][3]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat4x2<float, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"mat4x2((%f, %f), (%f, %f), (%f, %f), (%f, %f))\", \r\n\t\t\tx[0][0], x[0][1], \r\n\t\t\tx[1][0], x[1][1], \r\n\t\t\tx[2][0], x[2][1], \r\n\t\t\tx[3][0], x[3][1]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat4x3<float, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"mat4x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f), (%f, %f, %f))\", \r\n\t\t\tx[0][0], x[0][1], x[0][2],\r\n\t\t\tx[1][0], x[1][1], x[1][2], \r\n\t\t\tx[2][0], x[2][1], x[2][2],\r\n\t\t\tx[3][0], x[3][1], x[3][2]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat4x4<float, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"mat4x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))\", \r\n\t\t\tx[0][0], x[0][1], x[0][2], x[0][3],\r\n\t\t\tx[1][0], x[1][1], x[1][2], x[1][3],\r\n\t\t\tx[2][0], x[2][1], x[2][2], x[2][3],\r\n\t\t\tx[3][0], x[3][1], x[3][2], x[3][3]);\r\n\t}\r\n\r\n\t////////////////////////////////\r\n\t// Double matrices\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat2x2<double, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dmat2x2((%f, %f), (%f, %f))\",\r\n\t\t\tx[0][0], x[0][1], \r\n\t\t\tx[1][0], x[1][1]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat2x3<double, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dmat2x3((%f, %f, %f), (%f, %f, %f))\",\r\n\t\t\tx[0][0], x[0][1], x[0][2], \r\n\t\t\tx[1][0], x[1][1], x[1][2]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat2x4<double, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dmat2x4((%f, %f, %f, %f), (%f, %f, %f, %f))\",\r\n\t\t\tx[0][0], x[0][1], x[0][2], x[0][3], \r\n\t\t\tx[1][0], x[1][1], x[1][2], x[1][3]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat3x2<double, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dmat3x2((%f, %f), (%f, %f), (%f, %f))\",\r\n\t\t\tx[0][0], x[0][1], \r\n\t\t\tx[1][0], x[1][1],\r\n\t\t\tx[2][0], x[2][1]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat3x3<double, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dmat3x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f))\",\r\n\t\t\tx[0][0], x[0][1], x[0][2], \r\n\t\t\tx[1][0], x[1][1], x[1][2],\r\n\t\t\tx[2][0], x[2][1], x[2][2]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat3x4<double, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dmat3x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))\",\r\n\t\t\tx[0][0], x[0][1], x[0][2], x[0][3], \r\n\t\t\tx[1][0], x[1][1], x[1][2], x[1][3],\r\n\t\t\tx[2][0], x[2][1], x[2][2], x[2][3]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat4x2<double, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dmat4x2((%f, %f), (%f, %f), (%f, %f), (%f, %f))\",\r\n\t\t\tx[0][0], x[0][1], \r\n\t\t\tx[1][0], x[1][1], \r\n\t\t\tx[2][0], x[2][1], \r\n\t\t\tx[3][0], x[3][1]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat4x3<double, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dmat4x3((%f, %f, %f), (%f, %f, %f), (%f, %f, %f), (%f, %f, %f))\",\r\n\t\t\tx[0][0], x[0][1], x[0][2], \r\n\t\t\tx[1][0], x[1][1], x[1][2], \r\n\t\t\tx[2][0], x[2][1], x[2][2], \r\n\t\t\tx[3][0], x[3][1], x[3][2]);\r\n\t}\r\n\r\n\ttemplate <precision P>\r\n\tGLM_FUNC_QUALIFIER std::string to_string\r\n\t(\r\n\t\tdetail::tmat4x4<double, P> const & x\r\n\t)\r\n\t{\r\n\t\treturn detail::format(\"dmat4x4((%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f), (%f, %f, %f, %f))\",\r\n\t\t\tx[0][0], x[0][1], x[0][2], x[0][3],\r\n\t\t\tx[1][0], x[1][1], x[1][2], x[1][3],\r\n\t\t\tx[2][0], x[2][1], x[2][2], x[2][3],\r\n\t\t\tx[3][0], x[3][1], x[3][2], x[3][3]);\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/transform.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_transform\r\n/// @file glm/gtx/transform.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_matrix_transform (dependence)\r\n/// @see gtx_transform\r\n/// @see gtx_transform2\r\n///\r\n/// @defgroup gtx_transform GLM_GTX_transform\r\n/// @ingroup gtx\r\n///\r\n/// @brief Add transformation matrices\r\n/// \r\n/// <glm/gtx/transform.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_transform \r\n#define GLM_GTX_transform\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtc/matrix_transform.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_transform extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_transform\r\n\t/// @{\r\n\r\n\t/// Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars. \r\n\t/// - From \\link gtx_transform GLM_GTX_transform \\endlink extension\r\n\t/// - See also: \\link glm::translate GLM_GTC_matrix_transform \\endlink\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> translate(\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\r\n\t/// Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. \r\n\t/// - From \\link gtx_transform GLM_GTX_transform \\endlink extension\r\n\t/// - See also: \\link glm::rotate GLM_GTC_matrix_transform \\endlink\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> rotate(\r\n\t\tT angle, \r\n\t\tdetail::tvec3<T, P> const & v);\r\n\r\n\t/// Transforms a matrix with a scale 4 * 4 matrix created from a vector of 3 components.\r\n\t/// - From \\link gtx_transform GLM_GTX_transform \\endlink extension\r\n\t/// - See also: \\link glm::scale GLM_GTC_matrix_transform \\endlink\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat4x4<T, P> scale(\r\n\t\tdetail::tvec3<T, P> const & v);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"transform.inl\"\r\n\r\n#endif//GLM_GTX_transform\r\n"
  },
  {
    "path": "gpu/glm/gtx/transform.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-21\r\n// Updated : 2009-04-29\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/transform.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> translate(\r\n\t\tdetail::tvec3<T, P> const & v)\r\n\t{\r\n\t\treturn translate(\r\n\t\t\tdetail::tmat4x4<T, P>(1.0f), v);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> rotate(\r\n\t\tT angle, \r\n\t\tdetail::tvec3<T, P> const & v)\r\n\t{\r\n\t\treturn rotate(\r\n\t\t\tdetail::tmat4x4<T, P>(1), angle, v);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> scale(\r\n\t\tdetail::tvec3<T, P> const & v)\r\n\t{\r\n\t\treturn scale(\r\n\t\t\tdetail::tmat4x4<T, P>(1.0f), v);\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/transform2.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_transform2\r\n/// @file glm/gtx/transform2.hpp\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_transform (dependence)\r\n///\r\n/// @defgroup gtx_transform2 GLM_GTX_transform2\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Add extra transformation matrices\r\n///\r\n/// <glm/gtx/transform2.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_transform2\r\n#define GLM_GTX_transform2\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtx/transform.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_transform2 extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_transform2\r\n\t/// @{\r\n\r\n\t//! Transforms a matrix with a shearing on X axis.\r\n\t//! From GLM_GTX_transform2 extension.\r\n\ttemplate <typename T, precision P>\r\n\tdetail::tmat3x3<T, P> shearX2D(\r\n\t\tdetail::tmat3x3<T, P> const & m, \r\n\t\tT y);\r\n\r\n\t//! Transforms a matrix with a shearing on Y axis.\r\n\t//! From GLM_GTX_transform2 extension.\r\n\ttemplate <typename T, precision P> \r\n\tdetail::tmat3x3<T, P> shearY2D(\r\n\t\tdetail::tmat3x3<T, P> const & m, \r\n\t\tT x);\r\n\r\n\t//! Transforms a matrix with a shearing on X axis\r\n\t//! From GLM_GTX_transform2 extension.\r\n\ttemplate <typename T, precision P> \r\n\tdetail::tmat4x4<T, P> shearX3D(\r\n\t\tconst detail::tmat4x4<T, P> & m,\r\n\t\tT y, \r\n\t\tT z);\r\n\r\n\t//! Transforms a matrix with a shearing on Y axis.\r\n\t//! From GLM_GTX_transform2 extension.\r\n\ttemplate <typename T, precision P> \r\n\tdetail::tmat4x4<T, P> shearY3D(\r\n\t\tconst detail::tmat4x4<T, P> & m, \r\n\t\tT x, \r\n\t\tT z);\r\n\r\n\t//! Transforms a matrix with a shearing on Z axis. \r\n\t//! From GLM_GTX_transform2 extension.\r\n\ttemplate <typename T, precision P> \r\n\tdetail::tmat4x4<T, P> shearZ3D(\r\n\t\tconst detail::tmat4x4<T, P> & m, \r\n\t\tT x, \r\n\t\tT y);\r\n\r\n\t//template <typename T> GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> shear(const detail::tmat4x4<T, P> & m, shearPlane, planePoint, angle)\r\n\t// Identity + tan(angle) * cross(Normal, OnPlaneVector)     0\r\n\t// - dot(PointOnPlane, normal) * OnPlaneVector              1\r\n\r\n\t// Reflect functions seem to don't work\r\n\t//template <typename T> detail::tmat3x3<T, P> reflect2D(const detail::tmat3x3<T, P> & m, const detail::tvec3<T, P>& normal){return reflect2DGTX(m, normal);}\t\t\t\t\t\t\t\t\t//!< \\brief Build a reflection matrix (from GLM_GTX_transform2 extension)\r\n\t//template <typename T> detail::tmat4x4<T, P> reflect3D(const detail::tmat4x4<T, P> & m, const detail::tvec3<T, P>& normal){return reflect3DGTX(m, normal);}\t\t\t\t\t\t\t\t\t//!< \\brief Build a reflection matrix (from GLM_GTX_transform2 extension)\r\n\t\t\r\n\t//! Build planar projection matrix along normal axis.\r\n\t//! From GLM_GTX_transform2 extension.\r\n\ttemplate <typename T, precision P> \r\n\tdetail::tmat3x3<T, P> proj2D(\r\n\t\tconst detail::tmat3x3<T, P> & m, \r\n\t\tconst detail::tvec3<T, P>& normal);\r\n\r\n\t//! Build planar projection matrix along normal axis.\r\n\t//! From GLM_GTX_transform2 extension.\r\n\ttemplate <typename T, precision P> \r\n\tdetail::tmat4x4<T, P> proj3D(\r\n\t\tconst detail::tmat4x4<T, P> & m, \r\n\t\tconst detail::tvec3<T, P>& normal);\r\n\r\n\t//! Build a scale bias matrix. \r\n\t//! From GLM_GTX_transform2 extension.\r\n\ttemplate <typename valType, precision P> \r\n\tdetail::tmat4x4<valType, P> scaleBias(\r\n\t\tvalType scale, \r\n\t\tvalType bias);\r\n\r\n\t//! Build a scale bias matrix.\r\n\t//! From GLM_GTX_transform2 extension.\r\n\ttemplate <typename valType, precision P> \r\n\tdetail::tmat4x4<valType, P> scaleBias(\r\n\t\tdetail::tmat4x4<valType, P> const & m, \r\n\t\tvalType scale, \r\n\t\tvalType bias);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"transform2.inl\"\r\n\r\n#endif//GLM_GTX_transform2\r\n"
  },
  {
    "path": "gpu/glm/gtx/transform2.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-02-28\r\n// Updated : 2005-04-23\r\n// Licence : This source is under MIT License\r\n// File : glm/gtx/transform2.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> shearX2D(\r\n\t\tconst detail::tmat3x3<T, P>& m, \r\n\t\tT s)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> r(1);\r\n\t\tr[0][1] = s;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> shearY2D(\r\n\t\tconst detail::tmat3x3<T, P>& m, \r\n\t\tT s)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> r(1);\r\n\t\tr[1][0] = s;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> shearX3D(\r\n\t\tconst detail::tmat4x4<T, P>& m, \r\n\t\tT s, \r\n\t\tT t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> r(1);\r\n\t\tr[1][0] = s;\r\n\t\tr[2][0] = t;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> shearY3D(\r\n\t\tconst detail::tmat4x4<T, P>& m, \r\n\t\tT s, \r\n\t\tT t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> r(1);\r\n\t\tr[0][1] = s;\r\n\t\tr[2][1] = t;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> shearZ3D(\r\n\t\tconst detail::tmat4x4<T, P>& m, \r\n\t\tT s, \r\n\t\tT t)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> r(1);\r\n\t\tr[0][2] = s;\r\n\t\tr[1][2] = t;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> reflect2D(\r\n\t\tconst detail::tmat3x3<T, P>& m, \r\n\t\tconst detail::tvec3<T, P>& normal)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> r(1);\r\n\t\tr[0][0] = 1 - 2 * normal.x * normal.x;\r\n\t\tr[0][1] = -2 * normal.x * normal.y;\r\n\t\tr[1][0] = -2 * normal.x * normal.y;\r\n\t\tr[1][1] = 1 - 2 * normal.y * normal.y;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> reflect3D(\r\n\t\tconst detail::tmat4x4<T, P>& m, \r\n\t\tconst detail::tvec3<T, P>& normal)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> r(1);\r\n\t\tr[0][0] = 1 - 2 * normal.x * normal.x;\r\n\t\tr[0][1] = -2 * normal.x * normal.y;\r\n\t\tr[0][2] = -2 * normal.x * normal.z;\r\n\r\n\t\tr[1][0] = -2 * normal.x * normal.y;\r\n\t\tr[1][1] = 1 - 2 * normal.y * normal.y;\r\n\t\tr[1][2] = -2 * normal.y * normal.z;\r\n\r\n\t\tr[2][0] = -2 * normal.x * normal.z;\r\n\t\tr[2][1] = -2 * normal.y * normal.z;\r\n\t\tr[2][2] = 1 - 2 * normal.z * normal.z;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat3x3<T, P> proj2D(\r\n\t\tconst detail::tmat3x3<T, P>& m, \r\n\t\tconst detail::tvec3<T, P>& normal)\r\n\t{\r\n\t\tdetail::tmat3x3<T, P> r(1);\r\n\t\tr[0][0] = 1 - normal.x * normal.x;\r\n\t\tr[0][1] = - normal.x * normal.y;\r\n\t\tr[1][0] = - normal.x * normal.y;\r\n\t\tr[1][1] = 1 - normal.y * normal.y;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> proj3D(\r\n\t\tconst detail::tmat4x4<T, P>& m, \r\n\t\tconst detail::tvec3<T, P>& normal)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> r(1);\r\n\t\tr[0][0] = 1 - normal.x * normal.x;\r\n\t\tr[0][1] = - normal.x * normal.y;\r\n\t\tr[0][2] = - normal.x * normal.z;\r\n\t\tr[1][0] = - normal.x * normal.y;\r\n\t\tr[1][1] = 1 - normal.y * normal.y;\r\n\t\tr[1][2] = - normal.y * normal.z;\r\n\t\tr[2][0] = - normal.x * normal.z;\r\n\t\tr[2][1] = - normal.y * normal.z;\r\n\t\tr[2][2] = 1 - normal.z * normal.z;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> scaleBias(\r\n\t\tT scale, \r\n\t\tT bias)\r\n\t{\r\n\t\tdetail::tmat4x4<T, P> result;\r\n\t\tresult[3] = detail::tvec4<T, P>(detail::tvec3<T, P>(bias), T(1));\r\n\t\tresult[0][0] = scale;\r\n\t\tresult[1][1] = scale;\r\n\t\tresult[2][2] = scale;\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tmat4x4<T, P> scaleBias(\r\n\t\tconst detail::tmat4x4<T, P>& m, \r\n\t\tT scale, \r\n\t\tT bias)\r\n\t{\r\n\t\treturn m * scaleBias(scale, bias);\r\n\t}\r\n}//namespace glm\r\n\r\n"
  },
  {
    "path": "gpu/glm/gtx/ulp.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#if(defined(GLM_MESSAGES))\r\n#\tpragma message(\"GLM: GLM_GTX_ulp extension is deprecated, include GLM_GTC_ulp (glm/gtc/ulp.hpp) instead\")\r\n#endif\r\n\r\n// Promoted:\r\n#include \"../gtc/ulp.hpp\"\r\n"
  },
  {
    "path": "gpu/glm/gtx/unsigned_int.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#if(defined(GLM_MESSAGES))\r\n#\tpragma message(\"GLM: GLM_GTX_unsigned_int extension is deprecated, include GLM_GTX_integer instead\")\r\n#endif\r\n"
  },
  {
    "path": "gpu/glm/gtx/unsigned_int.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-24\r\n// Updated : 2008-10-07\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/unsigned_int.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/vec1.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_vec1\r\n/// @file glm/gtx/vec1.hpp\r\n/// @date 2010-02-08 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_vec1 GLM_GTX_vec1\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Add vec1, ivec1, uvec1 and bvec1 types.\r\n/// <glm/gtx/vec1.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_vec1\r\n#define GLM_GTX_vec1\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../detail/type_vec1.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_vec1 extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t//! 1 component vector of high precision floating-point numbers. \r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef highp_vec1_t\t\t\thighp_vec1;\r\n\r\n\t//! 1 component vector of medium precision floating-point numbers. \r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef mediump_vec1_t\t\t\tmediump_vec1;\r\n\r\n\t//! 1 component vector of low precision floating-point numbers. \r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef lowp_vec1_t\t\t\t\tlowp_vec1;\r\n\r\n\t//! 1 component vector of high precision signed integer numbers. \r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef highp_ivec1_t\t\t\thighp_ivec1;\r\n\r\n\t//! 1 component vector of medium precision signed integer numbers. \r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef mediump_ivec1_t\t\t\tmediump_ivec1;\r\n\r\n\t//! 1 component vector of low precision signed integer numbers. \r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef lowp_ivec1_t\t\t\tlowp_ivec1;\r\n\r\n\t//! 1 component vector of high precision unsigned integer numbers. \r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef highp_uvec1_t\t\t\thighp_uvec1;\r\n\r\n\t//! 1 component vector of medium precision unsigned integer numbers. \r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef mediump_uvec1_t\t\t\tmediump_uvec1;\r\n\r\n\t//! 1 component vector of low precision unsigned integer numbers. \r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef lowp_uvec1_t\t\t\tlowp_uvec1;\r\n\r\n\t//! 1 component vector of high precision boolean. \r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef highp_bvec1_t\t\t\thighp_bvec1;\r\n\r\n\t//! 1 component vector of medium precision boolean.\r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef mediump_bvec1_t\t\t\tmediump_bvec1;\r\n\r\n\t//! 1 component vector of low precision boolean.\r\n\t//! There is no guarantee on the actual precision.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef lowp_bvec1_t\t\t\tlowp_bvec1;\r\n\r\n\t//////////////////////////\r\n\t// vec1 definition\r\n\r\n#if(defined(GLM_PRECISION_HIGHP_BOOL))\r\n\ttypedef highp_bvec1\t\t\t\tbvec1;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_BOOL))\r\n\ttypedef mediump_bvec1\t\t\tbvec1;\r\n#elif(defined(GLM_PRECISION_LOWP_BOOL))\r\n\ttypedef lowp_bvec1\t\t\t\tbvec1;\r\n#else\r\n\t/// 1 component vector of boolean.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef highp_bvec1\t\t\t\tbvec1;\r\n#endif//GLM_PRECISION\r\n\r\n#if(defined(GLM_PRECISION_HIGHP_FLOAT))\r\n\ttypedef highp_vec1\t\t\t\tvec1;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_FLOAT))\r\n\ttypedef mediump_vec1\t\t\tvec1;\r\n#elif(defined(GLM_PRECISION_LOWP_FLOAT))\r\n\ttypedef lowp_vec1\t\t\t\tvec1;\r\n#else\r\n\t/// 1 component vector of floating-point numbers.\r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef highp_vec1\t\t\t\tvec1;\r\n#endif//GLM_PRECISION\r\n\r\n#if(defined(GLM_PRECISION_HIGHP_INT))\r\n\ttypedef highp_ivec1\t\t\tivec1;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_INT))\r\n\ttypedef mediump_ivec1\t\tivec1;\r\n#elif(defined(GLM_PRECISION_LOWP_INT))\r\n\ttypedef lowp_ivec1\t\t\tivec1;\r\n#else\r\n\t/// 1 component vector of signed integer numbers. \r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef highp_ivec1\t\t\tivec1;\r\n#endif//GLM_PRECISION\r\n\r\n#if(defined(GLM_PRECISION_HIGHP_UINT))\r\n\ttypedef highp_uvec1\t\t\tuvec1;\r\n#elif(defined(GLM_PRECISION_MEDIUMP_UINT))\r\n\ttypedef mediump_uvec1\t\tuvec1;\r\n#elif(defined(GLM_PRECISION_LOWP_UINT))\r\n\ttypedef lowp_uvec1\t\t\tuvec1;\r\n#else\r\n\t/// 1 component vector of unsigned integer numbers. \r\n\t/// @see gtx_vec1 extension.\r\n\ttypedef highp_uvec1\t\t\tuvec1;\r\n#endif//GLM_PRECISION\r\n\r\n}// namespace glm\r\n\r\n#include \"vec1.inl\"\r\n\r\n#endif//GLM_GTX_vec1\r\n\r\n"
  },
  {
    "path": "gpu/glm/gtx/vec1.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_vec1\r\n/// @file glm/gtx/vec1.inl\r\n/// @date 2013-03-16 / 2013-03-16\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n"
  },
  {
    "path": "gpu/glm/gtx/vector_angle.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_vector_angle\r\n/// @file glm/gtx/vector_angle.hpp\r\n/// @date 2005-12-30 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n/// @see gtx_quaternion (dependence)\r\n/// @see gtx_epsilon (dependence)\r\n///\r\n/// @defgroup gtx_vector_angle GLM_GTX_vector_angle\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Compute angle between vectors\r\n/// \r\n/// <glm/gtx/vector_angle.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_vector_angle\r\n#define GLM_GTX_vector_angle\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include \"../gtc/epsilon.hpp\"\r\n#include \"../gtx/quaternion.hpp\"\r\n#include \"../gtx/rotate_vector.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_vector_angle extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_vector_angle\r\n\t/// @{\r\n\r\n\t//! Returns the absolute angle between two vectors\r\n\t//! Parameters need to be normalized.\r\n\t/// @see gtx_vector_angle extension\r\n\ttemplate <typename vecType>\r\n\tGLM_FUNC_QUALIFIER typename vecType::value_type angle(\r\n\t\tvecType const & x, \r\n\t\tvecType const & y);\r\n\r\n\t//! Returns the oriented angle between two 2d vectors \r\n\t//! Parameters need to be normalized.\r\n\t/// @see gtx_vector_angle extension.\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T orientedAngle(\r\n\t\tdetail::tvec2<T, P> const & x,\r\n\t\tdetail::tvec2<T, P> const & y);\r\n\r\n\t//! Returns the oriented angle between two 3d vectors based from a reference axis.\r\n\t//! Parameters need to be normalized.\r\n\t/// @see gtx_vector_angle extension.\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T orientedAngle(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<T, P> const & y,\r\n\t\tdetail::tvec3<T, P> const & ref);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"vector_angle.inl\"\r\n\r\n#endif//GLM_GTX_vector_angle\r\n"
  },
  {
    "path": "gpu/glm/gtx/vector_angle.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2005-12-30\r\n// Updated : 2008-09-29\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/vector_angle.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType angle\r\n\t(\r\n\t\tgenType const & x,\r\n\t\tgenType const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<genType>::is_iec559, \"'angle' only accept floating-point inputs\");\r\n\r\n\t\tgenType const Angle(acos(clamp(dot(x, y), genType(-1), genType(1))));\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\treturn Angle;\r\n#else\r\n#\t\tpragma message(\"GLM: angle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\treturn degrees(Angle);\r\n#endif\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType> \r\n\tGLM_FUNC_QUALIFIER T angle\r\n\t(\r\n\t\tvecType<T, P> const & x,\r\n\t\tvecType<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'angle' only accept floating-point inputs\");\r\n\r\n\t\tT const Angle(acos(clamp(dot(x, y), T(-1), T(1))));\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\treturn Angle;\r\n#else\r\n#\t\tpragma message(\"GLM: angle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\treturn degrees(Angle);\r\n#endif\r\n\t}\r\n\r\n\t//! \\todo epsilon is hard coded to 0.01\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T orientedAngle\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & x,\r\n\t\tdetail::tvec2<T, P> const & y\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'orientedAngle' only accept floating-point inputs\");\r\n\r\n\t\tT const Dot = clamp(dot(x, y), T(-1), T(1));\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const Angle(acos(Dot));\r\n#else\r\n#\t\tpragma message(\"GLM: orientedAngle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const Angle(degrees(acos(Dot)));\r\n#endif\r\n\t\tdetail::tvec2<T, P> const TransformedVector(glm::rotate(x, Angle));\r\n\t\tif(all(epsilonEqual(y, TransformedVector, T(0.01))))\r\n\t\t\treturn Angle;\r\n\t\telse\r\n\t\t\treturn -Angle;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER T orientedAngle\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & x,\r\n\t\tdetail::tvec3<T, P> const & y,\r\n\t\tdetail::tvec3<T, P> const & ref\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'orientedAngle' only accept floating-point inputs\");\r\n\r\n\t\tT const Dot = clamp(dot(x, y), T(-1), T(1));\r\n\r\n#ifdef GLM_FORCE_RADIANS\r\n\t\tT const Angle(acos(Dot));\r\n#else\r\n#\t\tpragma message(\"GLM: orientedAngle function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.\")\r\n\t\tT const Angle(degrees(acos(Dot)));\r\n#endif\r\n\r\n\t\tif(dot(ref, cross(x, y)) < T(0))\r\n\t\t\treturn -Angle;\r\n\t\telse\r\n\t\t\treturn Angle;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/vector_query.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_vector_query\r\n/// @file glm/gtx/vector_query.hpp\r\n/// @date 2008-03-10 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_vector_query GLM_GTX_vector_query\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Query informations of vector types\r\n///\r\n/// <glm/gtx/vector_query.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_vector_query\r\n#define GLM_GTX_vector_query\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n#include <cfloat>\r\n#include <limits>\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_vector_query extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_vector_query\r\n\t/// @{\r\n\r\n\t//! Check whether two vectors are collinears.\r\n\t/// @see gtx_vector_query extensions.\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tbool areCollinear(vecType<T, P> const & v0, vecType<T, P> const & v1, T const & epsilon);\r\n\t\t\r\n\t//! Check whether two vectors are orthogonals.\r\n\t/// @see gtx_vector_query extensions.\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tbool areOrthogonal(vecType<T, P> const & v0, vecType<T, P> const & v1, T const & epsilon);\r\n\r\n\t//! Check whether a vector is normalized.\r\n\t/// @see gtx_vector_query extensions.\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tbool isNormalized(vecType<T, P> const & v, T const & epsilon);\r\n\t\t\r\n\t//! Check whether a vector is null.\r\n\t/// @see gtx_vector_query extensions.\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tbool isNull(vecType<T, P> const & v, T const & epsilon);\r\n\r\n\t//! Check whether a each component of a vector is null.\r\n\t/// @see gtx_vector_query extensions.\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tvecType<bool, P> isCompNull(vecType<T, P> const & v, T const & epsilon);\r\n\r\n\t//! Check whether two vectors are orthonormal.\r\n\t/// @see gtx_vector_query extensions.\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tbool areOrthonormal(vecType<T, P> const & v0, vecType<T, P> const & v1, T const & epsilon);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"vector_query.inl\"\r\n\r\n#endif//GLM_GTX_vector_query\r\n"
  },
  {
    "path": "gpu/glm/gtx/vector_query.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2007-03-05\r\n// Updated : 2010-02-16\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/vector_query.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Dependency:\r\n// - GLM core\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n#include <cassert>\r\n\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tstruct compute_areCollinear{};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_areCollinear<T, P, tvec2>\r\n\t{\r\n\t\tstatic bool call(detail::tvec2<T, P> const & v0, detail::tvec2<T, P> const & v1, T const & epsilon)\r\n\t\t{\r\n\t\t\treturn length(cross(detail::tvec3<T, P>(v0, static_cast<T>(0)), detail::tvec3<T, P>(v1, static_cast<T>(0)))) < epsilon;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_areCollinear<T, P, tvec3>\r\n\t{\r\n\t\tstatic bool call(detail::tvec3<T, P> const & v0, detail::tvec3<T, P> const & v1, T const & epsilon)\r\n\t\t{\r\n\t\t\treturn length(cross(v0, v1)) < epsilon;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_areCollinear<T, P, tvec4>\r\n\t{\r\n\t\tstatic bool call(detail::tvec4<T, P> const & v0, detail::tvec4<T, P> const & v1, T const & epsilon)\r\n\t\t{\r\n\t\t\treturn length(cross(detail::tvec3<T, P>(v0), detail::tvec3<T, P>(v1))) < epsilon;\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tstruct compute_isCompNull{};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_isCompNull<T, P, tvec2>\r\n\t{\r\n\t\tstatic detail::tvec2<bool, P> call(detail::tvec2<T, P> const & v, T const & epsilon)\r\n\t\t{\r\n\t\t\treturn detail::tvec2<bool, P>(\r\n\t\t\t\t(abs(v.x) < epsilon),\r\n\t\t\t\t(abs(v.y) < epsilon));\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_isCompNull<T, P, tvec3>\r\n\t{\r\n\t\tstatic detail::tvec3<bool, P> call(detail::tvec3<T, P> const & v, T const & epsilon)\r\n\t\t{\r\n\t\t\treturn detail::tvec3<bool, P>(\r\n\t\t\t\t(abs(v.x) < epsilon),\r\n\t\t\t\t(abs(v.y) < epsilon),\r\n\t\t\t\t(abs(v.z) < epsilon));\r\n\t\t}\r\n\t};\r\n\r\n\ttemplate <typename T, precision P>\r\n\tstruct compute_isCompNull<T, P, tvec4>\r\n\t{\r\n\t\tstatic detail::tvec4<bool, P> call(detail::tvec4<T, P> const & v, T const & epsilon)\r\n\t\t{\r\n\t\t\treturn detail::tvec4<bool, P>(\r\n\t\t\t\t(abs(v.x) < epsilon),\r\n\t\t\t\t(abs(v.y) < epsilon),\r\n\t\t\t\t(abs(v.z) < epsilon),\r\n\t\t\t\t(abs(v.w) < epsilon));\r\n\t\t}\r\n\t};\r\n\r\n}//namespace detail\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER bool areCollinear\r\n\t(\r\n\t\tvecType<T, P> const & v0,\r\n\t\tvecType<T, P> const & v1,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'areCollinear' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::compute_areCollinear<T, P, vecType>::call(v0, v1, epsilon);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER bool areOrthogonal\r\n\t(\r\n\t\tvecType<T, P> const & v0,\r\n\t\tvecType<T, P> const & v1,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'areOrthogonal' only accept floating-point inputs\");\r\n\r\n\t\treturn abs(dot(v0, v1)) <= max(\r\n\t\t\tstatic_cast<T>(1),\r\n\t\t\tlength(v0)) * max(static_cast<T>(1), length(v1)) * epsilon;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER bool isNormalized\r\n\t(\r\n\t\tvecType<T, P> const & v,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'isNormalized' only accept floating-point inputs\");\r\n\r\n\t\treturn abs(length(v) - static_cast<T>(1)) <= static_cast<T>(2) * epsilon;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER bool isNull\r\n\t(\r\n\t\tvecType<T, P> const & v,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'isNull' only accept floating-point inputs\");\r\n\r\n\t\treturn length(v) <= epsilon;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER vecType<bool, P> isCompNull\r\n\t(\r\n\t\tvecType<T, P> const & v,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\tGLM_STATIC_ASSERT(std::numeric_limits<T>::is_iec559, \"'isCompNull' only accept floating-point inputs\");\r\n\r\n\t\treturn detail::compute_isCompNull<T, P, vecType>::call(v, epsilon);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec2<bool, P> isCompNull\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & v,\r\n\t\tT const & epsilon)\r\n\t{\r\n\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec3<bool, P> isCompNull\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & v,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec3<bool, P>(\r\n\t\t\tabs(v.x) < epsilon,\r\n\t\t\tabs(v.y) < epsilon,\r\n\t\t\tabs(v.z) < epsilon);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P>\r\n\tGLM_FUNC_QUALIFIER detail::tvec4<bool, P> isCompNull\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & v,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\treturn detail::tvec4<bool, P>(\r\n\t\t\tabs(v.x) < epsilon,\r\n\t\t\tabs(v.y) < epsilon,\r\n\t\t\tabs(v.z) < epsilon,\r\n\t\t\tabs(v.w) < epsilon);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P, template <typename, precision> class vecType>\r\n\tGLM_FUNC_QUALIFIER bool areOrthonormal\r\n\t(\r\n\t\tvecType<T, P> const & v0,\r\n\t\tvecType<T, P> const & v1,\r\n\t\tT const & epsilon\r\n\t)\r\n\t{\r\n\t\treturn isNormalized(v0, epsilon) && isNormalized(v1, epsilon) && (abs(dot(v0, v1)) <= epsilon);\r\n\t}\r\n\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/gtx/wrap.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_wrap\r\n/// @file glm/gtx/wrap.hpp\r\n/// @date 2009-11-25 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///\r\n/// @see core (dependence)\r\n///\r\n/// @defgroup gtx_wrap GLM_GTX_wrap\r\n/// @ingroup gtx\r\n/// \r\n/// @brief Wrapping mode of texture coordinates.\r\n/// \r\n/// <glm/gtx/wrap.hpp> need to be included to use these functionalities.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_GTX_wrap\r\n#define GLM_GTX_wrap\r\n\r\n// Dependency:\r\n#include \"../glm.hpp\"\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\r\n#\tpragma message(\"GLM: GLM_GTX_wrap extension included\")\r\n#endif\r\n\r\nnamespace glm\r\n{\r\n\t/// @addtogroup gtx_wrap\r\n\t/// @{\r\n\r\n\t/// Simulate GL_CLAMP OpenGL wrap mode\r\n\t/// @see gtx_wrap extension.\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType clamp(genType const & Texcoord);\r\n\r\n\t/// Simulate GL_REPEAT OpenGL wrap mode\r\n\t/// @see gtx_wrap extension.\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType repeat(genType const & Texcoord);\r\n\r\n\t/// Simulate GL_MIRROR_REPEAT OpenGL wrap mode\r\n\t/// @see gtx_wrap extension.\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_DECL genType mirrorRepeat(genType const & Texcoord);\r\n\r\n\t/// @}\r\n}// namespace glm\r\n\r\n#include \"wrap.inl\"\r\n\r\n#endif//GLM_GTX_wrap\r\n"
  },
  {
    "path": "gpu/glm/gtx/wrap.inl",
    "content": "///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Created : 2009-11-25\r\n// Updated : 2010-02-13\r\n// Licence : This source is under MIT License\r\n// File    : glm/gtx/wrap.inl\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n// Dependency:\r\n// - GLM core\r\n///////////////////////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType clamp\r\n\t(\r\n\t\tgenType const & Texcoord\r\n\t)\r\n\t{\r\n\t\treturn glm::clamp(Texcoord, genType(0), genType(1));\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> clamp\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & Texcoord\r\n\t)\r\n\t{\r\n\t\tdetail::tvec2<T, P> Result;\r\n\t\tfor(typename detail::tvec2<T, P>::size_type i = 0; i < detail::tvec2<T, P>::value_size(); ++i)\r\n\t\t\tResult[i] = clamp(Texcoord[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> clamp\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & Texcoord\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> Result;\r\n\t\tfor(typename detail::tvec3<T, P>::size_type i = 0; i < detail::tvec3<T, P>::value_size(); ++i)\r\n\t\t\tResult[i] = clamp(Texcoord[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> clamp\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & Texcoord\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<T, P> Result;\r\n\t\tfor(typename detail::tvec4<T, P>::size_type i = 0; i < detail::tvec4<T, P>::value_size(); ++i)\r\n\t\t\tResult[i] = clamp(Texcoord[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t////////////////////////\r\n\t// repeat\r\n\r\n\ttemplate <typename genType> \r\n\tGLM_FUNC_QUALIFIER genType repeat\r\n\t(\r\n\t\tgenType const & Texcoord\r\n\t)\r\n\t{\r\n\t\treturn glm::fract(Texcoord);\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> repeat\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & Texcoord\r\n\t)\r\n\t{\r\n\t\tdetail::tvec2<T, P> Result;\r\n\t\tfor(typename detail::tvec2<T, P>::size_type i = 0; i < detail::tvec2<T, P>::value_size(); ++i)\r\n\t\t\tResult[i] = repeat(Texcoord[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> repeat\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & Texcoord\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> Result;\r\n\t\tfor(typename detail::tvec3<T, P>::size_type i = 0; i < detail::tvec3<T, P>::value_size(); ++i)\r\n\t\t\tResult[i] = repeat(Texcoord[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> repeat\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & Texcoord\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<T, P> Result;\r\n\t\tfor(typename detail::tvec4<T, P>::size_type i = 0; i < detail::tvec4<T, P>::value_size(); ++i)\r\n\t\t\tResult[i] = repeat(Texcoord[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\t////////////////////////\r\n\t// mirrorRepeat\r\n\r\n\ttemplate <typename genType, precision P> \r\n\tGLM_FUNC_QUALIFIER genType mirrorRepeat\r\n\t(\r\n\t\tgenType const & Texcoord\r\n\t)\r\n\t{\r\n\t\tgenType const Clamp = genType(int(glm::floor(Texcoord)) % 2);\r\n\t\tgenType const Floor = glm::floor(Texcoord);\r\n\t\tgenType const Rest = Texcoord - Floor;\r\n\t\tgenType const Mirror = Clamp + Rest;\r\n\r\n\t\tgenType Out;\r\n\t\tif(Mirror >= genType(1))\r\n\t\t\tOut = genType(1) - Rest;\r\n\t\telse\r\n\t\t\tOut = Rest;\r\n\t\treturn Out;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tvec2<T, P> mirrorRepeat\r\n\t(\r\n\t\tdetail::tvec2<T, P> const & Texcoord\r\n\t)\r\n\t{\r\n\t\tdetail::tvec2<T, P> Result;\r\n\t\tfor(typename detail::tvec2<T, P>::size_type i = 0; i < detail::tvec2<T, P>::value_size(); ++i)\r\n\t\t\tResult[i] = mirrorRepeat(Texcoord[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tvec3<T, P> mirrorRepeat\r\n\t(\r\n\t\tdetail::tvec3<T, P> const & Texcoord\r\n\t)\r\n\t{\r\n\t\tdetail::tvec3<T, P> Result;\r\n\t\tfor(typename detail::tvec3<T, P>::size_type i = 0; i < detail::tvec3<T, P>::value_size(); ++i)\r\n\t\t\tResult[i] = mirrorRepeat(Texcoord[i]);\r\n\t\treturn Result;\r\n\t}\r\n\r\n\ttemplate <typename T, precision P> \r\n\tGLM_FUNC_QUALIFIER detail::tvec4<T, P> mirrorRepeat\r\n\t(\r\n\t\tdetail::tvec4<T, P> const & Texcoord\r\n\t)\r\n\t{\r\n\t\tdetail::tvec4<T, P> Result;\r\n\t\tfor(typename detail::tvec4<T, P>::size_type i = 0; i < detail::tvec4<T, P>::value_size(); ++i)\r\n\t\t\tResult[i] = mirrorRepeat(Texcoord[i]);\r\n\t\treturn Result;\r\n\t}\r\n}//namespace glm\r\n"
  },
  {
    "path": "gpu/glm/integer.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/integer.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_INTEGER_INCLUDED\r\n#define GLM_INTEGER_INCLUDED\r\n\r\n#include \"detail/func_integer.hpp\"\r\n\r\n#endif//GLM_INTEGER_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/mat2x2.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/mat2x2.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_MAT2X2_INCLUDED\r\n#define GLM_MAT2X2_INCLUDED\r\n\r\n#include \"detail/type_mat2x2.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// 2 columns of 2 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, lowp>\t\tlowp_mat2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, mediump>\t\tmediump_mat2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, highp>\t\thighp_mat2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, lowp>\t\tlowp_mat2x2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, mediump>\t\tmediump_mat2x2;\r\n\t\r\n\t/// 2 columns of 2 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x2<float, highp>\t\thighp_mat2x2;\r\n\r\n}//namespace glm\r\n\r\n#endif//GLM_MAT2X2_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/mat2x3.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/mat2x3.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_MAT2X3_INCLUDED\r\n#define GLM_MAT2X3_INCLUDED\r\n\r\n#include \"detail/type_mat2x3.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// 2 columns of 3 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x3<float, lowp>\t\tlowp_mat2x3;\r\n\r\n\t/// 2 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x3<float, mediump>\t\tmediump_mat2x3;\r\n\r\n\t/// 2 columns of 3 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x3<float, highp>\t\thighp_mat2x3;\r\n\r\n}//namespace glm\r\n\r\n#endif//GLM_MAT2X3_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/mat2x4.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/mat2x4.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_MAT2X4_INCLUDED\r\n#define GLM_MAT2X4_INCLUDED\r\n\r\n#include \"detail/type_mat2x4.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// 2 columns of 4 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x4<float, lowp>\t\tlowp_mat2x4;\r\n\t\r\n\t/// 2 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x4<float, mediump>\t\tmediump_mat2x4;\r\n\t\r\n\t/// 2 columns of 4 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat2x4<float, highp>\t\thighp_mat2x4;\r\n\r\n}//namespace glm\r\n\r\n#endif//GLM_MAT2X4_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/mat3x2.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/mat3x2.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_MAT3X2_INCLUDED\r\n#define GLM_MAT3X2_INCLUDED\r\n\r\n#include \"detail/type_mat3x2.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// 3 columns of 2 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x2<float, lowp>\t\tlowp_mat3x2;\r\n\t\r\n\t/// 3 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x2<float, mediump>\t\tmediump_mat3x2;\r\n\t\r\n\t/// 3 columns of 2 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x2<float, highp>\t\thighp_mat3x2;\r\n\r\n}//namespace\r\n\r\n#endif//GLM_MAT3X2_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/mat3x3.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/mat3x3.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_MAT3X3_INCLUDED\r\n#define GLM_MAT3X3_INCLUDED\r\n\r\n#include \"detail/type_mat3x3.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// 3 columns of 3 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, lowp>\t\tlowp_mat3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, mediump>\t\tmediump_mat3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, highp>\t\thighp_mat3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, lowp>\t\tlowp_mat3x3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, mediump>\t\tmediump_mat3x3;\r\n\t\r\n\t/// 3 columns of 3 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x3<float, highp>\t\thighp_mat3x3;\r\n\r\n}//namespace glm\r\n\r\n#endif//GLM_MAT3X3_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/mat3x4.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/mat3x4.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_MAT3X4_INCLUDED\r\n#define GLM_MAT3X4_INCLUDED\r\n\r\n#include \"detail/type_mat3x4.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// 3 columns of 4 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x4<float, lowp>\t\tlowp_mat3x4;\r\n\t\r\n\t/// 3 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x4<float, mediump>\t\tmediump_mat3x4;\r\n\t\r\n\t/// 3 columns of 4 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat3x4<float, highp>\t\thighp_mat3x4;\r\n\r\n}//namespace glm\r\n\r\n#endif//GLM_MAT3X4_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/mat4x2.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/mat4x2.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_MAT4X2_INCLUDED\r\n#define GLM_MAT4X2_INCLUDED\r\n\r\n#include \"detail/type_mat4x2.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// 4 columns of 2 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x2<float, lowp>\t\tlowp_mat4x2;\r\n\t\r\n\t/// 4 columns of 2 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x2<float, mediump>\t\tmediump_mat4x2;\r\n\t\r\n\t/// 4 columns of 2 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x2<float, highp>\t\thighp_mat4x2;\r\n\r\n}//namespace glm\r\n\r\n#endif//GLM_MAT4X2_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/mat4x3.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/mat4x4.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_MAT4X3_INCLUDED\r\n#define GLM_MAT4X3_INCLUDED\r\n\r\n#include \"detail/type_mat4x3.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// 4 columns of 3 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x3<float, lowp>\t\tlowp_mat4x3;\r\n\t\r\n\t/// 4 columns of 3 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x3<float, mediump>\t\tmediump_mat4x3;\r\n\t\r\n\t/// 4 columns of 3 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x3<float, highp>\t\thighp_mat4x3;\r\n\r\n}//namespace glm\r\n\r\n#endif//GLM_MAT4X3_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/mat4x4.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/mat4x4.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_MAT4X4_INCLUDED\r\n#define GLM_MAT4X4_INCLUDED\r\n\r\n#include \"detail/type_mat4x4.hpp\"\r\n\r\nnamespace glm\r\n{\r\n\t/// 4 columns of 4 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, lowp>\t\tlowp_mat4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, mediump>\t\tmediump_mat4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, highp>\t\thighp_mat4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of low precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, lowp>\t\tlowp_mat4x4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of medium precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, mediump>\t\tmediump_mat4x4;\r\n\t\r\n\t/// 4 columns of 4 components matrix of high precision floating-point numbers.\r\n\t/// There is no guarantee on the actual precision.\r\n\t///\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.1.6 Matrices</a>\r\n\t/// @see <a href=\"http://www.opengl.org/registry/doc/GLSLangSpec.4.20.8.pdf\">GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier</a>\r\n\ttypedef detail::tmat4x4<float, highp>\t\thighp_mat4x4;\r\n\r\n}//namespace glm\r\n\r\n#endif//GLM_MAT4X4_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/matrix.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/matrix.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_MATRIX_INCLUDED\r\n#define GLM_MATRIX_INCLUDED\r\n\r\n#include \"detail/func_matrix.hpp\"\r\n\r\n#endif//GLM_MATRIX_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/packing.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/packing.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_PACKING_INCLUDED\r\n#define GLM_PACKING_INCLUDED\r\n\r\n#include \"detail/func_packing.hpp\"\r\n\r\n#endif//GLM_PACKING_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/trigonometric.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/trigonometric.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_TRIGONOMETRIC_INCLUDED\r\n#define GLM_TRIGONOMETRIC_INCLUDED\r\n\r\n#include \"detail/func_trigonometric.hpp\"\r\n\r\n#endif//GLM_TRIGONOMETRIC_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/vec2.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/vec2.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_VEC2_INCLUDED\r\n#define GLM_VEC2_INCLUDED\r\n\r\n#include \"detail/type_vec2.hpp\"\r\n\r\n#endif//GLM_VEC2_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/vec3.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/vec3.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_VEC3_INCLUDED\r\n#define GLM_VEC3_INCLUDED\r\n\r\n#include \"detail/type_vec3.hpp\"\r\n\r\n#endif//GLM_VEC3_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/vec4.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/vec4.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_VEC4_INCLUDED\r\n#define GLM_VEC4_INCLUDED\r\n\r\n#include \"detail/type_vec4.hpp\"\r\n\r\n#endif//GLM_VEC4_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/vector_relational.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref core\r\n/// @file glm/vector_relational.hpp\r\n/// @date 2013-12-24 / 2013-12-24\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_VECTOR_RELATIONAL_INCLUDED\r\n#define GLM_VECTOR_RELATIONAL_INCLUDED\r\n\r\n#include \"detail/func_vector_relational.hpp\"\r\n\r\n#endif//GLM_VECTOR_RELATIONAL_INCLUDED\r\n"
  },
  {
    "path": "gpu/glm/virtrev/xstream.hpp",
    "content": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref virtrev_xstream\r\n/// @file glm/virtrev/xstream.hpp\r\n/// @date 2008-05-24 / 2008-05-26\r\n/// @author Mathieu Roumillac (matrem84.free.fr)\r\n///\r\n/// @see core (dependence)\r\n/// @see gtc_matrix_access (dependence)\r\n///\r\n/// @defgroup virtrev_xstream GLM_VIRTREV_xstream: xml like output\r\n/// @ingroup virtrev\r\n/// \r\n/// @brief Streaming vector and matrix in a xml way.\r\n/// \r\n/// Include <glm/virtrev/xstream.hpp> for this functionality.\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\n#ifndef GLM_VIRTREV_xstream\r\n#define GLM_VIRTREV_xstream GLM_VERSION\r\n\r\n#include \"../glm.hpp\"\r\n#include \"../gtc/matrix_access.hpp\"\r\n#include <iostream>\r\n\r\n#if(defined(GLM_MESSAGES) && !defined(glm_ext))\r\n#\tpragma message(\"GLM: GLM_VIRTREV_xstream extension included\")\r\n#endif\r\n/*\r\nnamespace glm{\r\nnamespace detail\r\n{\r\n\ttemplate<typename T>\r\n\tstd::ostream & operator << (std::ostream & stream, glm::detail::tvec2<T, P> const & vec)\r\n\t{\r\n\t\tstream << \"<glm_vec2 \";\r\n\t\tstream << \"x=\\\"\" << vec.x << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << vec.y << \"\\\" \";\r\n\t\tstream << \"/>\";\r\n\r\n\t\treturn stream;\r\n\t}\r\n\r\n\ttemplate<typename T>\r\n\tstd::ostream & operator << (std::ostream & stream, glm::detail::tvec3<T, P> const & vec)\r\n\t{\r\n\t\tstream << \"<glm_vec3 \";\r\n\t\tstream << \"x=\\\"\" << vec.x << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << vec.y << \"\\\" \";\r\n\t\tstream << \"z=\\\"\" << vec.z << \"\\\" \";\r\n\t\tstream << \"/>\";\r\n\r\n\t\treturn stream;\r\n\t}\r\n\r\n\ttemplate<typename T>\r\n\tstd::ostream & operator << (std::ostream & stream, glm::detail::tvec4<T, P> const & vec)\r\n\t{\r\n\t\tstream << \"<glm_vec4 \";\r\n\t\tstream << \"x=\\\"\" << vec.x << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << vec.y << \"\\\" \";\r\n\t\tstream << \"z=\\\"\" << vec.z << \"\\\" \";\r\n\t\tstream << \"w=\\\"\" << vec.w << \"\\\" \";\r\n\t\tstream << \"/>\";\r\n\r\n\t\treturn stream;\r\n\t}\r\n\r\n\ttemplate<typename T>\r\n\tstd::ostream & operator << (std::ostream & stream, glm::detail::tmat2x2<T, P> const & mat)\r\n\t{\r\n\t\tstream << \"<glm_mat2>\" << std::endl;\r\n\t\tstream << \"<row \";\r\n\t\tstream << \"x=\\\"\" << glm::row(mat, 0)[0] << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << glm::row(mat, 0)[1] << \"\\\" \";\r\n\t\tstream << \"/>\" << std::endl;\r\n\t\tstream << \"<row \";\r\n\t\tstream << \"x=\\\"\" << glm::row(mat, 1)[0] << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << glm::row(mat, 1)[1] << \"\\\" \";\r\n\t\tstream << \"/>\" << std::endl;\r\n\t\tstream << \"</glm_mat2>\";\r\n\r\n\t\treturn stream;\r\n\t}\r\n\r\n\ttemplate<typename T>\r\n\tstd::ostream & operator << (std::ostream & stream, glm::detail::tmat3x3<T, P> const & mat)\r\n\t{\r\n\t\tstream << \"<glm_mat3>\" << std::endl;\r\n\t\tstream << \"<row \";\r\n\t\tstream << \"x=\\\"\" << glm::row(mat, 0)[0] << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << glm::row(mat, 0)[1] << \"\\\" \";\r\n\t\tstream << \"z=\\\"\" << glm::row(mat, 0)[2] << \"\\\" \";\r\n\t\tstream << \"/>\" << std::endl;\r\n\t\tstream << \"<row \";\r\n\t\tstream << \"x=\\\"\" << glm::row(mat, 1)[0] << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << glm::row(mat, 1)[1] << \"\\\" \";\r\n\t\tstream << \"z=\\\"\" << glm::row(mat, 1)[2] << \"\\\" \";\r\n\t\tstream << \"/>\" << std::endl;\r\n\t\tstream << \"<row \";\r\n\t\tstream << \"x=\\\"\" << glm::row(mat, 2)[0] << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << glm::row(mat, 2)[1] << \"\\\" \";\r\n\t\tstream << \"z=\\\"\" << glm::row(mat, 2)[2] << \"\\\" \";\r\n\t\tstream << \"/>\" << std::endl;\r\n\t\tstream << \"</glm_mat3>\";\r\n\r\n\t\treturn stream;\r\n\t}\r\n\r\n\ttemplate<typename T>\r\n\tstd::ostream & operator << (std::ostream & stream, glm::detail::tmat4x4<T, P> const & mat)\r\n\t{\r\n\t\tstream << \"<glm_mat4>\" << std::endl;\r\n\t\tstream << \"<row \";\r\n\t\tstream << \"x=\\\"\" << glm::row(mat, 0)[0] << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << glm::row(mat, 0)[1] << \"\\\" \";\r\n\t\tstream << \"z=\\\"\" << glm::row(mat, 0)[2] << \"\\\" \";\r\n\t\tstream << \"w=\\\"\" << glm::row(mat, 0)[3] << \"\\\" \";\r\n\t\tstream << \"/>\" << std::endl;\r\n\t\tstream << \"<row \";\r\n\t\tstream << \"x=\\\"\" << glm::row(mat, 1)[0] << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << glm::row(mat, 1)[1] << \"\\\" \";\r\n\t\tstream << \"z=\\\"\" << glm::row(mat, 1)[2] << \"\\\" \";\r\n\t\tstream << \"w=\\\"\" << glm::row(mat, 1)[3] << \"\\\" \";\r\n\t\tstream << \"/>\" << std::endl;\r\n\t\tstream << \"<row \";\r\n\t\tstream << \"x=\\\"\" << glm::row(mat, 2)[0] << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << glm::row(mat, 2)[1] << \"\\\" \";\r\n\t\tstream << \"z=\\\"\" << glm::row(mat, 2)[2] << \"\\\" \";\r\n\t\tstream << \"w=\\\"\" << glm::row(mat, 2)[3] << \"\\\" \";\r\n\t\tstream << \"/>\" << std::endl;\r\n\t\tstream << \"<row \";\r\n\t\tstream << \"x=\\\"\" << glm::row(mat, 3)[0] << \"\\\" \";\r\n\t\tstream << \"y=\\\"\" << glm::row(mat, 3)[1] << \"\\\" \";\r\n\t\tstream << \"z=\\\"\" << glm::row(mat, 3)[2] << \"\\\" \";\r\n\t\tstream << \"w=\\\"\" << glm::row(mat, 3)[3] << \"\\\" \";\r\n\t\tstream << \"/>\" << std::endl;\r\n\t\tstream << \"</glm_mat4>\";\r\n\t\t\t\r\n\t\treturn stream;\r\n\t}\r\n\r\n}//namespace detail\r\n}//namespace glm\r\n*/\r\n#endif//GLM_VIRTREV_xstream\r\n"
  },
  {
    "path": "gpu/particles_cuda.pro",
    "content": "QT += core gui opengl\n\nTARGET = particles_cuda\nTEMPLATE = app\n\n# project build directories\nDESTDIR     = $$system(pwd) # target dir\nBUILDDIR    = $$DESTDIR/build\n\nMOC_DIR     = $$BUILDDIR # moc_...\nRCC_DIR     = $$BUILDDIR # qrc_resources.cpp\nUI_DIR      = $$BUILDDIR # ui_mainwindow.cpp\n\nOBJECTS_DIR = $$BUILDDIR/bin # .o files\n\nunix:!macx {\n    NON_CUDA_LIBS = -lGLU\n    LIBS += $$NON_CUDA_LIBS\n    QMAKE_CXXFLAGS += -std=c++11\n    DEFINES += LINUX    #define LINUX\n}\nmacx {\n    NON_CUDA_LIBS += -stdlib=libc++\n    LIBS += $$NON_CUDA_LIBS\n\n    QMAKE_CXXFLAGS += -stdlib=libc++\n    QMAKE_CXXFLAGS += -std=c++11\n    QMAKE_CXXFLAGS += -mmacosx-version-min=10.7\n    QMAKE_LFLAGS += -mmacosx-version-min=10.7\n    QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7\n\n    MAC_SDK  = /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/\n    if( exists( $$MAC_SDK) ) {\n        QMAKE_MAC_SDK = macosx10.9\n    }\n\n    QMAKE_CXXFLAGS += -Wno-c++11-extensions\n}\n\n\nINCLUDEPATH += glm src src/ui src/constraints src/rendering src/cuda\nDEPENDPATH += glm src src/ui src/constraints src/rendering src/cuda\n\nSOURCES += src/main.cpp \\\n    src/ui/mainwindow.cpp \\\n    src/ui/view.cpp \\\n    src/rendering/renderer.cpp \\\n    src/particleapp.cpp \\\n    src/particlesystem.cpp \\\n    src/rendering/camera.cpp \\\n    src/rendering/orbitingcamera.cpp \\\n    src/rendering/actioncamera.cpp\n\nHEADERS += src/ui/mainwindow.h \\\n    src/ui/view.h \\\n    src/rendering/renderer.h \\\n    src/particleapp.h \\\n    src/particlesystem.h \\\n    src/rendering/camera.h \\\n    src/rendering/orbitingcamera.h \\\n    src/debugprinting.h \\\n    src/rendering/actioncamera.h\n\nFORMS += src/ui/mainwindow.ui\n\nOTHER_FILES += res/shader.vert res/shader.frag\n\n#TODO (Windows): If you are setting up local development on Windows (NOT Mac), comment out the following lines\nwin32:CONFIG(release, debug|release): LIBS += -L/course/cs123/lib/glew/glew-1.10.0/lib/release/ -lGLEW\nelse:win32:CONFIG(debug, debug|release): LIBS += -L/course/cs123/lib/glew/glew-1.10.0/lib/debug/ -lGLEW\nelse:unix: LIBS += -L/usr/local/Cellar/glew/1.11.0/lib -lGLEW\n\n#TODO (Windows or Mac): If you are setting up local development on Windows OR Mac, fill in the correct path to your glew and uncomment the following lines:\nINCLUDEPATH+=/usr/local/Cellar/glew/1.11.0/include\nDEPENDPATH+=/usr/local/Cellar/glew/1.11.0/include\n\nRESOURCES += \\\n    resources.qrc\n\n\n\n################################ CUDA #################################\n\n\nunix:!macx {\n    # Path to cuda stuff\n    CUDA_DIR = /contrib/projects/cuda5-toolkit\n    CUDA_LIB = $$CUDA_DIR/lib64\n\n    CUDA_DEF += -DCUDA_5\n    DEFINES += CUDA_5\n\n    # GPU architecture\n    CUDA_ARCH     = sm_21 # should be able to detect this somehow instead of hardcoding\n\n    SED_STUFF = 2>&1 | sed -r \\\"s/\\\\(([0-9]+)\\\\)/:\\\\1/g\\\" 1>&2\n}\nmacx {\n    # Path to cuda stuff\n    CUDA_DIR = /usr/local/cuda\n    CUDA_LIB = $$CUDA_DIR/lib\n\n    CUDA_DEF += -DCUDA_7\n    DEFINES += CUDA_7\n\n    # GPU architecture\n    CUDA_ARCH     = sm_30 # should be able to detect this somehow instead of hardcoding\n\n    SED_STUFF = 2>&1 | sed -E \\\"s/\\\\(([0-9]+)\\\\)/:\\\\1/g\\\" 1>&2\n\n    NVCCFLAGS += --std=c++11\n}\n\nif ( exists( $$CUDA_DIR/ ) ) {\n    message( \"Configuring for cuda...\" );\n    DEFINES += CUDA\n\n# Cuda sources\nCUDA_SOURCES += src/cuda/shared_variables.cu \\\n                src/cuda/integration.cu \\\n                src/cuda/solver.cu \\\n                src/cuda/util.cu\n\nOTHER_FILES +=  src/cuda/wrappers.cuh \\\n                src/cuda/integration_kernel.cuh \\\n                src/cuda/solver_kernel.cuh \\\n                src/cuda/kernel.cuh \\\n                src/cuda/util.cuh \\\n                src/cuda/util.cu \\\n                src/cuda/integration.cu \\\n                src/cuda/solver.cu \\\n                src/cuda/shared_variables.cu \\\n                src/cuda/shared_variables.cuh \\\n                src/cuda/helper_cuda.h\n\n    # Pather to header and lib files\n    INCLUDEPATH += $$CUDA_DIR/include\n    QMAKE_LIBDIR += $$CUDA_LIB\n\n    # prevents warnings from code we didn't write\n    QMAKE_CXXFLAGS += -isystem $$CUDA_DIR/include\n\n    # required libs\n    LIBS += -lcudart -lcurand #-lcublas -lcusparse\n    QMAKE_LFLAGS += -Wl,-rpath,$$CUDA_LIB\n    NVCCFLAGS = -Xlinker -rpath,$$CUDA_LIB\n\n    # libs used in the code\n    CUDA_LIBS = $$LIBS\n    CUDA_LIBS -= $$NON_CUDA_LIBS\n\n    # Here are some NVCC flags I've always used by default.\n    NVCCFLAGS     += --compiler-options -fno-strict-aliasing -use_fast_math --ptxas-options=-v\n\n    # Prepare the extra compiler configuration (taken from the nvidia forum)\n    CUDA_INC = $$join(INCLUDEPATH,' -I','-I',' ')\n\n    cuda.commands = $$CUDA_DIR/bin/nvcc -m64 -O3 -arch=$$CUDA_ARCH -c $$NVCCFLAGS \\\n                    $$CUDA_INC $$CUDA_LIBS  ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT} \\\n                    $$CUDA_DEF $$SED_STUFF\n    # nvcc error printout format ever so slightly different from gcc\n    # http://forums.nvidia.com/index.php?showtopic=171651\n\n    cuda.dependency_type = TYPE_C\n    cuda.depend_command = $$CUDA_DIR/bin/nvcc -O3 -M $$CUDA_INC $$NVCCFLAGS   ${QMAKE_FILE_NAME}\n\n    cuda.input = CUDA_SOURCES\n    cuda.output = ${OBJECTS_DIR}${QMAKE_FILE_BASE}_cuda.o\n\n    # Tell Qt that we want add more stuff to the Makefile\n    QMAKE_EXTRA_COMPILERS += cuda\n}\n"
  },
  {
    "path": "gpu/res/shaders/shader.frag",
    "content": "#version 410 core\n\nuniform vec4 color;\nuniform mat4 view;\nuniform float particleRadius = -1.0; // world space particle size\n\nout vec4 fragColor;\n\nvoid main()\n{\n    if (particleRadius > -.5)\n    {\n        vec3 camPos = -vec3(view[3]);\n        vec3 lightDir = camPos + vec3(-camPos.z, camPos.y, camPos.x);\n        lightDir = normalize(lightDir);\n        // calculate normal from texture coordinates\n        vec3 N;\n        N.xy = gl_PointCoord * vec2(2.0, -2.0) + vec2(-1.0, 1.0);\n        float mag = dot(N.xy, N.xy);\n\n        if (mag > 1.0) discard;   // kill pixels outside circle\n\n        N.z = sqrt(1.0-mag);\n\n        // calculate lighting\n        vec3 diffuse = vec3(max(0.0, dot(lightDir, N)));\n        vec3 shadingColor = diffuse + vec3(.2); // plus ambient\n\n        fragColor = vec4(color.xyz * shadingColor, color.w);\n    }\n    else\n        fragColor = color;\n}\n"
  },
  {
    "path": "gpu/res/shaders/shader.vert",
    "content": "#version 410 core\n\nin vec4 position;           // position of point in world space\n\nuniform mat4 pv;            // projection * view matrix\nuniform mat4 projection;\nuniform mat4 view;\nuniform float particleRadius = -1.0; // world space particle size\n\nuniform int screenHeight;\n\nconst float PI = 3.1415926535;\n\nvoid main()\n{\n    gl_Position = pv * vec4(position.xyz, 1); // storing inverse mass in w position\n\n    if (particleRadius > -.5)\n        gl_PointSize = screenHeight * projection[1][1] * particleRadius / gl_Position.w;\n}\n"
  },
  {
    "path": "gpu/resources.qrc",
    "content": "<RCC>\n    <qresource prefix=\"/shaders\">\n        <file alias=\"default.frag\">res/shaders/shader.frag</file>\n        <file alias=\"default.vert\">res/shaders/shader.vert</file>\n    </qresource>\n</RCC>\n"
  },
  {
    "path": "gpu/src/cuda/helper_cuda.h",
    "content": "/**\n * Copyright 1993-2013 NVIDIA Corporation.  All rights reserved.\n *\n * Please refer to the NVIDIA end user license agreement (EULA) associated\n * with this source code for terms and conditions that govern your use of\n * this software. Any use, reproduction, disclosure, or distribution of\n * this software and related documentation outside the terms of the EULA\n * is strictly prohibited.\n *\n */\n\n////////////////////////////////////////////////////////////////////////////////\n// These are CUDA Helper functions for initialization and error checking\n\n#ifndef HELPER_CUDA_H\n#define HELPER_CUDA_H\n\n#pragma once\n\n#include <stdlib.h>\n#include <stdio.h>\n#include <string.h>\n\n#ifndef EXIT_WAIVED\n#define EXIT_WAIVED 2\n#endif\n\n// Note, it is required that your SDK sample to include the proper header files, please\n// refer the CUDA examples for examples of the needed CUDA headers, which may change depending\n// on which CUDA functions are used.\n\n// CUDA Runtime error messages\n#ifdef __DRIVER_TYPES_H__\nstatic const char *_cudaGetErrorEnum(cudaError_t error)\n{\n    switch (error)\n    {\n        case cudaSuccess:\n            return \"cudaSuccess\";\n\n        case cudaErrorMissingConfiguration:\n            return \"cudaErrorMissingConfiguration\";\n\n        case cudaErrorMemoryAllocation:\n            return \"cudaErrorMemoryAllocation\";\n\n        case cudaErrorInitializationError:\n            return \"cudaErrorInitializationError\";\n\n        case cudaErrorLaunchFailure:\n            return \"cudaErrorLaunchFailure\";\n\n        case cudaErrorPriorLaunchFailure:\n            return \"cudaErrorPriorLaunchFailure\";\n\n        case cudaErrorLaunchTimeout:\n            return \"cudaErrorLaunchTimeout\";\n\n        case cudaErrorLaunchOutOfResources:\n            return \"cudaErrorLaunchOutOfResources\";\n\n        case cudaErrorInvalidDeviceFunction:\n            return \"cudaErrorInvalidDeviceFunction\";\n\n        case cudaErrorInvalidConfiguration:\n            return \"cudaErrorInvalidConfiguration\";\n\n        case cudaErrorInvalidDevice:\n            return \"cudaErrorInvalidDevice\";\n\n        case cudaErrorInvalidValue:\n            return \"cudaErrorInvalidValue\";\n\n        case cudaErrorInvalidPitchValue:\n            return \"cudaErrorInvalidPitchValue\";\n\n        case cudaErrorInvalidSymbol:\n            return \"cudaErrorInvalidSymbol\";\n\n        case cudaErrorMapBufferObjectFailed:\n            return \"cudaErrorMapBufferObjectFailed\";\n\n        case cudaErrorUnmapBufferObjectFailed:\n            return \"cudaErrorUnmapBufferObjectFailed\";\n\n        case cudaErrorInvalidHostPointer:\n            return \"cudaErrorInvalidHostPointer\";\n\n        case cudaErrorInvalidDevicePointer:\n            return \"cudaErrorInvalidDevicePointer\";\n\n        case cudaErrorInvalidTexture:\n            return \"cudaErrorInvalidTexture\";\n\n        case cudaErrorInvalidTextureBinding:\n            return \"cudaErrorInvalidTextureBinding\";\n\n        case cudaErrorInvalidChannelDescriptor:\n            return \"cudaErrorInvalidChannelDescriptor\";\n\n        case cudaErrorInvalidMemcpyDirection:\n            return \"cudaErrorInvalidMemcpyDirection\";\n\n        case cudaErrorAddressOfConstant:\n            return \"cudaErrorAddressOfConstant\";\n\n        case cudaErrorTextureFetchFailed:\n            return \"cudaErrorTextureFetchFailed\";\n\n        case cudaErrorTextureNotBound:\n            return \"cudaErrorTextureNotBound\";\n\n        case cudaErrorSynchronizationError:\n            return \"cudaErrorSynchronizationError\";\n\n        case cudaErrorInvalidFilterSetting:\n            return \"cudaErrorInvalidFilterSetting\";\n\n        case cudaErrorInvalidNormSetting:\n            return \"cudaErrorInvalidNormSetting\";\n\n        case cudaErrorMixedDeviceExecution:\n            return \"cudaErrorMixedDeviceExecution\";\n\n        case cudaErrorCudartUnloading:\n            return \"cudaErrorCudartUnloading\";\n\n        case cudaErrorUnknown:\n            return \"cudaErrorUnknown\";\n\n        case cudaErrorNotYetImplemented:\n            return \"cudaErrorNotYetImplemented\";\n\n        case cudaErrorMemoryValueTooLarge:\n            return \"cudaErrorMemoryValueTooLarge\";\n\n        case cudaErrorInvalidResourceHandle:\n            return \"cudaErrorInvalidResourceHandle\";\n\n        case cudaErrorNotReady:\n            return \"cudaErrorNotReady\";\n\n        case cudaErrorInsufficientDriver:\n            return \"cudaErrorInsufficientDriver\";\n\n        case cudaErrorSetOnActiveProcess:\n            return \"cudaErrorSetOnActiveProcess\";\n\n        case cudaErrorInvalidSurface:\n            return \"cudaErrorInvalidSurface\";\n\n        case cudaErrorNoDevice:\n            return \"cudaErrorNoDevice\";\n\n        case cudaErrorECCUncorrectable:\n            return \"cudaErrorECCUncorrectable\";\n\n        case cudaErrorSharedObjectSymbolNotFound:\n            return \"cudaErrorSharedObjectSymbolNotFound\";\n\n        case cudaErrorSharedObjectInitFailed:\n            return \"cudaErrorSharedObjectInitFailed\";\n\n        case cudaErrorUnsupportedLimit:\n            return \"cudaErrorUnsupportedLimit\";\n\n        case cudaErrorDuplicateVariableName:\n            return \"cudaErrorDuplicateVariableName\";\n\n        case cudaErrorDuplicateTextureName:\n            return \"cudaErrorDuplicateTextureName\";\n\n        case cudaErrorDuplicateSurfaceName:\n            return \"cudaErrorDuplicateSurfaceName\";\n\n        case cudaErrorDevicesUnavailable:\n            return \"cudaErrorDevicesUnavailable\";\n\n        case cudaErrorInvalidKernelImage:\n            return \"cudaErrorInvalidKernelImage\";\n\n        case cudaErrorNoKernelImageForDevice:\n            return \"cudaErrorNoKernelImageForDevice\";\n\n        case cudaErrorIncompatibleDriverContext:\n            return \"cudaErrorIncompatibleDriverContext\";\n\n        case cudaErrorPeerAccessAlreadyEnabled:\n            return \"cudaErrorPeerAccessAlreadyEnabled\";\n\n        case cudaErrorPeerAccessNotEnabled:\n            return \"cudaErrorPeerAccessNotEnabled\";\n\n        case cudaErrorDeviceAlreadyInUse:\n            return \"cudaErrorDeviceAlreadyInUse\";\n\n        case cudaErrorProfilerDisabled:\n            return \"cudaErrorProfilerDisabled\";\n\n        case cudaErrorProfilerNotInitialized:\n            return \"cudaErrorProfilerNotInitialized\";\n\n        case cudaErrorProfilerAlreadyStarted:\n            return \"cudaErrorProfilerAlreadyStarted\";\n\n        case cudaErrorProfilerAlreadyStopped:\n            return \"cudaErrorProfilerAlreadyStopped\";\n\n        /* Since CUDA 4.0*/\n        case cudaErrorAssert:\n            return \"cudaErrorAssert\";\n\n        case cudaErrorTooManyPeers:\n            return \"cudaErrorTooManyPeers\";\n\n        case cudaErrorHostMemoryAlreadyRegistered:\n            return \"cudaErrorHostMemoryAlreadyRegistered\";\n\n        case cudaErrorHostMemoryNotRegistered:\n            return \"cudaErrorHostMemoryNotRegistered\";\n\n        /* Since CUDA 5.0 */\n        case cudaErrorOperatingSystem:\n            return \"cudaErrorOperatingSystem\";\n\n        case cudaErrorPeerAccessUnsupported:\n            return \"cudaErrorPeerAccessUnsupported\";\n\n        case cudaErrorLaunchMaxDepthExceeded:\n            return \"cudaErrorLaunchMaxDepthExceeded\";\n\n        case cudaErrorLaunchFileScopedTex:\n            return \"cudaErrorLaunchFileScopedTex\";\n\n        case cudaErrorLaunchFileScopedSurf:\n            return \"cudaErrorLaunchFileScopedSurf\";\n\n        case cudaErrorSyncDepthExceeded:\n            return \"cudaErrorSyncDepthExceeded\";\n\n        case cudaErrorLaunchPendingCountExceeded:\n            return \"cudaErrorLaunchPendingCountExceeded\";\n\n        case cudaErrorNotPermitted:\n            return \"cudaErrorNotPermitted\";\n\n        case cudaErrorNotSupported:\n            return \"cudaErrorNotSupported\";\n\n#ifdef CUDA_7\n        /* Since CUDA 6.0 */\n        case cudaErrorHardwareStackError:\n            return \"cudaErrorHardwareStackError\";\n\n        case cudaErrorIllegalInstruction:\n            return \"cudaErrorIllegalInstruction\";\n\n        case cudaErrorMisalignedAddress:\n            return \"cudaErrorMisalignedAddress\";\n\n        case cudaErrorInvalidAddressSpace:\n            return \"cudaErrorInvalidAddressSpace\";\n\n        case cudaErrorInvalidPc:\n            return \"cudaErrorInvalidPc\";\n\n        case cudaErrorIllegalAddress:\n            return \"cudaErrorIllegalAddress\";\n\n        /* Since CUDA 6.5*/\n        case cudaErrorInvalidPtx:\n            return \"cudaErrorInvalidPtx\";\n\n        case cudaErrorInvalidGraphicsContext:\n            return \"cudaErrorInvalidGraphicsContext\";\n#endif\n        case cudaErrorStartupFailure:\n            return \"cudaErrorStartupFailure\";\n\n        case cudaErrorApiFailureBase:\n            return \"cudaErrorApiFailureBase\";\n    }\n\n    return \"<unknown>\";\n}\n#endif\n\n#ifdef __cuda_cuda_h__\n// CUDA Driver API errors\nstatic const char *_cudaGetErrorEnum(CUresult error)\n{\n    switch (error)\n    {\n        case CUDA_SUCCESS:\n            return \"CUDA_SUCCESS\";\n\n        case CUDA_ERROR_INVALID_VALUE:\n            return \"CUDA_ERROR_INVALID_VALUE\";\n\n        case CUDA_ERROR_OUT_OF_MEMORY:\n            return \"CUDA_ERROR_OUT_OF_MEMORY\";\n\n        case CUDA_ERROR_NOT_INITIALIZED:\n            return \"CUDA_ERROR_NOT_INITIALIZED\";\n\n        case CUDA_ERROR_DEINITIALIZED:\n            return \"CUDA_ERROR_DEINITIALIZED\";\n\n        case CUDA_ERROR_PROFILER_DISABLED:\n            return \"CUDA_ERROR_PROFILER_DISABLED\";\n\n        case CUDA_ERROR_PROFILER_NOT_INITIALIZED:\n            return \"CUDA_ERROR_PROFILER_NOT_INITIALIZED\";\n\n        case CUDA_ERROR_PROFILER_ALREADY_STARTED:\n            return \"CUDA_ERROR_PROFILER_ALREADY_STARTED\";\n\n        case CUDA_ERROR_PROFILER_ALREADY_STOPPED:\n            return \"CUDA_ERROR_PROFILER_ALREADY_STOPPED\";\n\n        case CUDA_ERROR_NO_DEVICE:\n            return \"CUDA_ERROR_NO_DEVICE\";\n\n        case CUDA_ERROR_INVALID_DEVICE:\n            return \"CUDA_ERROR_INVALID_DEVICE\";\n\n        case CUDA_ERROR_INVALID_IMAGE:\n            return \"CUDA_ERROR_INVALID_IMAGE\";\n\n        case CUDA_ERROR_INVALID_CONTEXT:\n            return \"CUDA_ERROR_INVALID_CONTEXT\";\n\n        case CUDA_ERROR_CONTEXT_ALREADY_CURRENT:\n            return \"CUDA_ERROR_CONTEXT_ALREADY_CURRENT\";\n\n        case CUDA_ERROR_MAP_FAILED:\n            return \"CUDA_ERROR_MAP_FAILED\";\n\n        case CUDA_ERROR_UNMAP_FAILED:\n            return \"CUDA_ERROR_UNMAP_FAILED\";\n\n        case CUDA_ERROR_ARRAY_IS_MAPPED:\n            return \"CUDA_ERROR_ARRAY_IS_MAPPED\";\n\n        case CUDA_ERROR_ALREADY_MAPPED:\n            return \"CUDA_ERROR_ALREADY_MAPPED\";\n\n        case CUDA_ERROR_NO_BINARY_FOR_GPU:\n            return \"CUDA_ERROR_NO_BINARY_FOR_GPU\";\n\n        case CUDA_ERROR_ALREADY_ACQUIRED:\n            return \"CUDA_ERROR_ALREADY_ACQUIRED\";\n\n        case CUDA_ERROR_NOT_MAPPED:\n            return \"CUDA_ERROR_NOT_MAPPED\";\n\n        case CUDA_ERROR_NOT_MAPPED_AS_ARRAY:\n            return \"CUDA_ERROR_NOT_MAPPED_AS_ARRAY\";\n\n        case CUDA_ERROR_NOT_MAPPED_AS_POINTER:\n            return \"CUDA_ERROR_NOT_MAPPED_AS_POINTER\";\n\n        case CUDA_ERROR_ECC_UNCORRECTABLE:\n            return \"CUDA_ERROR_ECC_UNCORRECTABLE\";\n\n        case CUDA_ERROR_UNSUPPORTED_LIMIT:\n            return \"CUDA_ERROR_UNSUPPORTED_LIMIT\";\n\n        case CUDA_ERROR_CONTEXT_ALREADY_IN_USE:\n            return \"CUDA_ERROR_CONTEXT_ALREADY_IN_USE\";\n\n        case CUDA_ERROR_PEER_ACCESS_UNSUPPORTED:\n            return \"CUDA_ERROR_PEER_ACCESS_UNSUPPORTED\";\n\n#ifdef CUDA_7\n        case CUDA_ERROR_INVALID_PTX:\n            return \"CUDA_ERROR_INVALID_PTX\";\n\n        case CUDA_ERROR_INVALID_GRAPHICS_CONTEXT:\n            return \"CUDA_ERROR_INVALID_GRAPHICS_CONTEXT\";\n#endif\n\n        case CUDA_ERROR_INVALID_SOURCE:\n            return \"CUDA_ERROR_INVALID_SOURCE\";\n\n        case CUDA_ERROR_FILE_NOT_FOUND:\n            return \"CUDA_ERROR_FILE_NOT_FOUND\";\n\n        case CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND:\n            return \"CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND\";\n\n        case CUDA_ERROR_SHARED_OBJECT_INIT_FAILED:\n            return \"CUDA_ERROR_SHARED_OBJECT_INIT_FAILED\";\n\n        case CUDA_ERROR_OPERATING_SYSTEM:\n            return \"CUDA_ERROR_OPERATING_SYSTEM\";\n\n        case CUDA_ERROR_INVALID_HANDLE:\n            return \"CUDA_ERROR_INVALID_HANDLE\";\n\n        case CUDA_ERROR_NOT_FOUND:\n            return \"CUDA_ERROR_NOT_FOUND\";\n\n        case CUDA_ERROR_NOT_READY:\n            return \"CUDA_ERROR_NOT_READY\";\n\n#ifdef CUDA_7\n        case CUDA_ERROR_ILLEGAL_ADDRESS:\n            return \"CUDA_ERROR_ILLEGAL_ADDRESS\";\n#endif\n\n        case CUDA_ERROR_LAUNCH_FAILED:\n            return \"CUDA_ERROR_LAUNCH_FAILED\";\n\n        case CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES:\n            return \"CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES\";\n\n        case CUDA_ERROR_LAUNCH_TIMEOUT:\n            return \"CUDA_ERROR_LAUNCH_TIMEOUT\";\n\n        case CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING:\n            return \"CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING\";\n\n        case CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED:\n            return \"CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED\";\n\n        case CUDA_ERROR_PEER_ACCESS_NOT_ENABLED:\n            return \"CUDA_ERROR_PEER_ACCESS_NOT_ENABLED\";\n\n        case CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE:\n            return \"CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE\";\n\n        case CUDA_ERROR_CONTEXT_IS_DESTROYED:\n            return \"CUDA_ERROR_CONTEXT_IS_DESTROYED\";\n\n        case CUDA_ERROR_ASSERT:\n            return \"CUDA_ERROR_ASSERT\";\n\n        case CUDA_ERROR_TOO_MANY_PEERS:\n            return \"CUDA_ERROR_TOO_MANY_PEERS\";\n\n        case CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED:\n            return \"CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED\";\n\n        case CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED:\n            return \"CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED\";\n\n#ifdef CUDA_7\n        case CUDA_ERROR_HARDWARE_STACK_ERROR:\n            return \"CUDA_ERROR_HARDWARE_STACK_ERROR\";\n\n        case CUDA_ERROR_ILLEGAL_INSTRUCTION:\n            return \"CUDA_ERROR_ILLEGAL_INSTRUCTION\";\n\n        case CUDA_ERROR_MISALIGNED_ADDRESS:\n            return \"CUDA_ERROR_MISALIGNED_ADDRESS\";\n\n        case CUDA_ERROR_INVALID_ADDRESS_SPACE:\n            return \"CUDA_ERROR_INVALID_ADDRESS_SPACE\";\n\n        case CUDA_ERROR_INVALID_PC:\n            return \"CUDA_ERROR_INVALID_PC\";\n#endif\n\n        case CUDA_ERROR_NOT_PERMITTED:\n            return \"CUDA_ERROR_NOT_PERMITTED\";\n\n        case CUDA_ERROR_NOT_SUPPORTED:\n            return \"CUDA_ERROR_NOT_SUPPORTED\";\n\n        case CUDA_ERROR_UNKNOWN:\n            return \"CUDA_ERROR_UNKNOWN\";\n    }\n\n    return \"<unknown>\";\n}\n#endif\n\n#ifdef CUBLAS_API_H_\n// cuBLAS API errors\nstatic const char *_cudaGetErrorEnum(cublasStatus_t error)\n{\n    switch (error)\n    {\n        case CUBLAS_STATUS_SUCCESS:\n            return \"CUBLAS_STATUS_SUCCESS\";\n\n        case CUBLAS_STATUS_NOT_INITIALIZED:\n            return \"CUBLAS_STATUS_NOT_INITIALIZED\";\n\n        case CUBLAS_STATUS_ALLOC_FAILED:\n            return \"CUBLAS_STATUS_ALLOC_FAILED\";\n\n        case CUBLAS_STATUS_INVALID_VALUE:\n            return \"CUBLAS_STATUS_INVALID_VALUE\";\n\n        case CUBLAS_STATUS_ARCH_MISMATCH:\n            return \"CUBLAS_STATUS_ARCH_MISMATCH\";\n\n        case CUBLAS_STATUS_MAPPING_ERROR:\n            return \"CUBLAS_STATUS_MAPPING_ERROR\";\n\n        case CUBLAS_STATUS_EXECUTION_FAILED:\n            return \"CUBLAS_STATUS_EXECUTION_FAILED\";\n\n        case CUBLAS_STATUS_INTERNAL_ERROR:\n            return \"CUBLAS_STATUS_INTERNAL_ERROR\";\n\n#ifdef CUDA_7\n        case CUBLAS_STATUS_NOT_SUPPORTED:\n            return \"CUBLAS_STATUS_NOT_SUPPORTED\";\n\n        case CUBLAS_STATUS_LICENSE_ERROR:\n            return \"CUBLAS_STATUS_LICENSE_ERROR\";\n#endif\n    }\n\n    return \"<unknown>\";\n}\n#endif\n\n#ifdef _CUFFT_H_\n// cuFFT API errors\nstatic const char *_cudaGetErrorEnum(cufftResult error)\n{\n    switch (error)\n    {\n        case CUFFT_SUCCESS:\n            return \"CUFFT_SUCCESS\";\n\n        case CUFFT_INVALID_PLAN:\n            return \"CUFFT_INVALID_PLAN\";\n\n        case CUFFT_ALLOC_FAILED:\n            return \"CUFFT_ALLOC_FAILED\";\n\n        case CUFFT_INVALID_TYPE:\n            return \"CUFFT_INVALID_TYPE\";\n\n        case CUFFT_INVALID_VALUE:\n            return \"CUFFT_INVALID_VALUE\";\n\n        case CUFFT_INTERNAL_ERROR:\n            return \"CUFFT_INTERNAL_ERROR\";\n\n        case CUFFT_EXEC_FAILED:\n            return \"CUFFT_EXEC_FAILED\";\n\n        case CUFFT_SETUP_FAILED:\n            return \"CUFFT_SETUP_FAILED\";\n\n        case CUFFT_INVALID_SIZE:\n            return \"CUFFT_INVALID_SIZE\";\n\n        case CUFFT_UNALIGNED_DATA:\n            return \"CUFFT_UNALIGNED_DATA\";\n\n        case CUFFT_INCOMPLETE_PARAMETER_LIST:\n            return \"CUFFT_INCOMPLETE_PARAMETER_LIST\";\n\n        case CUFFT_INVALID_DEVICE:\n            return \"CUFFT_INVALID_DEVICE\";\n\n        case CUFFT_PARSE_ERROR:\n            return \"CUFFT_PARSE_ERROR\";\n\n        case CUFFT_NO_WORKSPACE:\n            return \"CUFFT_NO_WORKSPACE\";\n\n        case CUFFT_NOT_IMPLEMENTED:\n            return \"CUFFT_NOT_IMPLEMENTED\";\n\n        case CUFFT_LICENSE_ERROR:\n            return \"CUFFT_LICENSE_ERROR\";\n    }\n\n    return \"<unknown>\";\n}\n#endif\n\n\n#ifdef CUSPARSEAPI\n// cuSPARSE API errors\nstatic const char *_cudaGetErrorEnum(cusparseStatus_t error)\n{\n    switch (error)\n    {\n        case CUSPARSE_STATUS_SUCCESS:\n            return \"CUSPARSE_STATUS_SUCCESS\";\n\n#ifdef CUDA_7\n        case CUSPARSE_STATUS_NOT_INITIALIZED:\n            return \"CUSPARSE_STATUS_NOT_INITIALIZED\";\n#endif\n\n        case CUSPARSE_STATUS_ALLOC_FAILED:\n            return \"CUSPARSE_STATUS_ALLOC_FAILED\";\n\n        case CUSPARSE_STATUS_INVALID_VALUE:\n            return \"CUSPARSE_STATUS_INVALID_VALUE\";\n\n        case CUSPARSE_STATUS_ARCH_MISMATCH:\n            return \"CUSPARSE_STATUS_ARCH_MISMATCH\";\n\n        case CUSPARSE_STATUS_MAPPING_ERROR:\n            return \"CUSPARSE_STATUS_MAPPING_ERROR\";\n\n        case CUSPARSE_STATUS_EXECUTION_FAILED:\n            return \"CUSPARSE_STATUS_EXECUTION_FAILED\";\n\n        case CUSPARSE_STATUS_INTERNAL_ERROR:\n            return \"CUSPARSE_STATUS_INTERNAL_ERROR\";\n\n        case CUSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED:\n            return \"CUSPARSE_STATUS_MATRIX_TYPE_NOT_SUPPORTED\";\n\n#ifdef CUDA_7\n        case CUSPARSE_STATUS_ZERO_PIVOT:\n            return \"CUSPARSE_STATUS_ZERO_PIVOT\";\n#endif\n    }\n\n    return \"<unknown>\";\n}\n#endif\n\n#ifdef CUSOLVER_COMMON_H_\n//cuSOLVER API errors\nstatic const char *_cudaGetErrorEnum(cusolverStatus_t error)\n{\n   switch(error)\n   {\n       case CUSOLVER_STATUS_SUCCESS:\n           return \"CUSOLVER_STATUS_SUCCESS\";\n       case CUSOLVER_STATUS_NOT_INITIALIZED:\n           return \"CUSOLVER_STATUS_NOT_INITIALIZED\";\n       case CUSOLVER_STATUS_ALLOC_FAILED:\n           return \"CUSOLVER_STATUS_ALLOC_FAILED\";\n       case CUSOLVER_STATUS_INVALID_VALUE:\n           return \"CUSOLVER_STATUS_INVALID_VALUE\";\n       case CUSOLVER_STATUS_ARCH_MISMATCH:\n           return \"CUSOLVER_STATUS_ARCH_MISMATCH\";\n       case CUSOLVER_STATUS_MAPPING_ERROR:\n           return \"CUSOLVER_STATUS_MAPPING_ERROR\";\n       case CUSOLVER_STATUS_EXECUTION_FAILED:\n           return \"CUSOLVER_STATUS_EXECUTION_FAILED\";\n       case CUSOLVER_STATUS_INTERNAL_ERROR:\n           return \"CUSOLVER_STATUS_INTERNAL_ERROR\";\n       case CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED:\n           return \"CUSOLVER_STATUS_MATRIX_TYPE_NOT_SUPPORTED\";\n       case CUSOLVER_STATUS_NOT_SUPPORTED :\n           return \"CUSOLVER_STATUS_NOT_SUPPORTED \";\n       case CUSOLVER_STATUS_ZERO_PIVOT:\n           return \"CUSOLVER_STATUS_ZERO_PIVOT\";\n       case CUSOLVER_STATUS_INVALID_LICENSE:\n           return \"CUSOLVER_STATUS_INVALID_LICENSE\";\n    }\n\n    return \"<unknown>\";\n\n}\n#endif\n\n#ifdef CURAND_H_\n// cuRAND API errors\nstatic const char *_cudaGetErrorEnum(curandStatus_t error)\n{\n    switch (error)\n    {\n        case CURAND_STATUS_SUCCESS:\n            return \"CURAND_STATUS_SUCCESS\";\n\n        case CURAND_STATUS_VERSION_MISMATCH:\n            return \"CURAND_STATUS_VERSION_MISMATCH\";\n\n        case CURAND_STATUS_NOT_INITIALIZED:\n            return \"CURAND_STATUS_NOT_INITIALIZED\";\n\n        case CURAND_STATUS_ALLOCATION_FAILED:\n            return \"CURAND_STATUS_ALLOCATION_FAILED\";\n\n        case CURAND_STATUS_TYPE_ERROR:\n            return \"CURAND_STATUS_TYPE_ERROR\";\n\n        case CURAND_STATUS_OUT_OF_RANGE:\n            return \"CURAND_STATUS_OUT_OF_RANGE\";\n\n        case CURAND_STATUS_LENGTH_NOT_MULTIPLE:\n            return \"CURAND_STATUS_LENGTH_NOT_MULTIPLE\";\n\n        case CURAND_STATUS_DOUBLE_PRECISION_REQUIRED:\n            return \"CURAND_STATUS_DOUBLE_PRECISION_REQUIRED\";\n\n        case CURAND_STATUS_LAUNCH_FAILURE:\n            return \"CURAND_STATUS_LAUNCH_FAILURE\";\n\n        case CURAND_STATUS_PREEXISTING_FAILURE:\n            return \"CURAND_STATUS_PREEXISTING_FAILURE\";\n\n        case CURAND_STATUS_INITIALIZATION_FAILED:\n            return \"CURAND_STATUS_INITIALIZATION_FAILED\";\n\n        case CURAND_STATUS_ARCH_MISMATCH:\n            return \"CURAND_STATUS_ARCH_MISMATCH\";\n\n        case CURAND_STATUS_INTERNAL_ERROR:\n            return \"CURAND_STATUS_INTERNAL_ERROR\";\n    }\n\n    return \"<unknown>\";\n}\n#endif\n\n#ifdef NV_NPPIDEFS_H\n// NPP API errors\nstatic const char *_cudaGetErrorEnum(NppStatus error)\n{\n    switch (error)\n    {\n        case NPP_NOT_SUPPORTED_MODE_ERROR:\n            return \"NPP_NOT_SUPPORTED_MODE_ERROR\";\n\n        case NPP_ROUND_MODE_NOT_SUPPORTED_ERROR:\n            return \"NPP_ROUND_MODE_NOT_SUPPORTED_ERROR\";\n\n        case NPP_RESIZE_NO_OPERATION_ERROR:\n            return \"NPP_RESIZE_NO_OPERATION_ERROR\";\n\n        case NPP_NOT_SUFFICIENT_COMPUTE_CAPABILITY:\n            return \"NPP_NOT_SUFFICIENT_COMPUTE_CAPABILITY\";\n\n#if ((NPP_VERSION_MAJOR << 12) + (NPP_VERSION_MINOR << 4)) <= 0x5000\n\n        case NPP_BAD_ARG_ERROR:\n            return \"NPP_BAD_ARGUMENT_ERROR\";\n\n        case NPP_COEFF_ERROR:\n            return \"NPP_COEFFICIENT_ERROR\";\n\n        case NPP_RECT_ERROR:\n            return \"NPP_RECTANGLE_ERROR\";\n\n        case NPP_QUAD_ERROR:\n            return \"NPP_QUADRANGLE_ERROR\";\n\n        case NPP_MEM_ALLOC_ERR:\n            return \"NPP_MEMORY_ALLOCATION_ERROR\";\n\n        case NPP_HISTO_NUMBER_OF_LEVELS_ERROR:\n            return \"NPP_HISTOGRAM_NUMBER_OF_LEVELS_ERROR\";\n\n        case NPP_INVALID_INPUT:\n            return \"NPP_INVALID_INPUT\";\n\n        case NPP_POINTER_ERROR:\n            return \"NPP_POINTER_ERROR\";\n\n        case NPP_WARNING:\n            return \"NPP_WARNING\";\n\n        case NPP_ODD_ROI_WARNING:\n            return \"NPP_ODD_ROI_WARNING\";\n#else\n\n            // These are for CUDA 5.5 or higher\n        case NPP_BAD_ARGUMENT_ERROR:\n            return \"NPP_BAD_ARGUMENT_ERROR\";\n\n        case NPP_COEFFICIENT_ERROR:\n            return \"NPP_COEFFICIENT_ERROR\";\n\n        case NPP_RECTANGLE_ERROR:\n            return \"NPP_RECTANGLE_ERROR\";\n\n        case NPP_QUADRANGLE_ERROR:\n            return \"NPP_QUADRANGLE_ERROR\";\n\n        case NPP_MEMORY_ALLOCATION_ERR:\n            return \"NPP_MEMORY_ALLOCATION_ERROR\";\n\n        case NPP_HISTOGRAM_NUMBER_OF_LEVELS_ERROR:\n            return \"NPP_HISTOGRAM_NUMBER_OF_LEVELS_ERROR\";\n\n        case NPP_INVALID_HOST_POINTER_ERROR:\n            return \"NPP_INVALID_HOST_POINTER_ERROR\";\n\n        case NPP_INVALID_DEVICE_POINTER_ERROR:\n            return \"NPP_INVALID_DEVICE_POINTER_ERROR\";\n#endif\n\n        case NPP_LUT_NUMBER_OF_LEVELS_ERROR:\n            return \"NPP_LUT_NUMBER_OF_LEVELS_ERROR\";\n\n        case NPP_TEXTURE_BIND_ERROR:\n            return \"NPP_TEXTURE_BIND_ERROR\";\n\n        case NPP_WRONG_INTERSECTION_ROI_ERROR:\n            return \"NPP_WRONG_INTERSECTION_ROI_ERROR\";\n\n        case NPP_NOT_EVEN_STEP_ERROR:\n            return \"NPP_NOT_EVEN_STEP_ERROR\";\n\n        case NPP_INTERPOLATION_ERROR:\n            return \"NPP_INTERPOLATION_ERROR\";\n\n        case NPP_RESIZE_FACTOR_ERROR:\n            return \"NPP_RESIZE_FACTOR_ERROR\";\n\n        case NPP_HAAR_CLASSIFIER_PIXEL_MATCH_ERROR:\n            return \"NPP_HAAR_CLASSIFIER_PIXEL_MATCH_ERROR\";\n\n\n#if ((NPP_VERSION_MAJOR << 12) + (NPP_VERSION_MINOR << 4)) <= 0x5000\n\n        case NPP_MEMFREE_ERR:\n            return \"NPP_MEMFREE_ERR\";\n\n        case NPP_MEMSET_ERR:\n            return \"NPP_MEMSET_ERR\";\n\n        case NPP_MEMCPY_ERR:\n            return \"NPP_MEMCPY_ERROR\";\n\n        case NPP_MIRROR_FLIP_ERR:\n            return \"NPP_MIRROR_FLIP_ERR\";\n#else\n\n        case NPP_MEMFREE_ERROR:\n            return \"NPP_MEMFREE_ERROR\";\n\n        case NPP_MEMSET_ERROR:\n            return \"NPP_MEMSET_ERROR\";\n\n        case NPP_MEMCPY_ERROR:\n            return \"NPP_MEMCPY_ERROR\";\n\n        case NPP_MIRROR_FLIP_ERROR:\n            return \"NPP_MIRROR_FLIP_ERROR\";\n#endif\n\n        case NPP_ALIGNMENT_ERROR:\n            return \"NPP_ALIGNMENT_ERROR\";\n\n        case NPP_STEP_ERROR:\n            return \"NPP_STEP_ERROR\";\n\n        case NPP_SIZE_ERROR:\n            return \"NPP_SIZE_ERROR\";\n\n        case NPP_NULL_POINTER_ERROR:\n            return \"NPP_NULL_POINTER_ERROR\";\n\n        case NPP_CUDA_KERNEL_EXECUTION_ERROR:\n            return \"NPP_CUDA_KERNEL_EXECUTION_ERROR\";\n\n        case NPP_NOT_IMPLEMENTED_ERROR:\n            return \"NPP_NOT_IMPLEMENTED_ERROR\";\n\n        case NPP_ERROR:\n            return \"NPP_ERROR\";\n\n        case NPP_SUCCESS:\n            return \"NPP_SUCCESS\";\n\n        case NPP_WRONG_INTERSECTION_QUAD_WARNING:\n            return \"NPP_WRONG_INTERSECTION_QUAD_WARNING\";\n\n        case NPP_MISALIGNED_DST_ROI_WARNING:\n            return \"NPP_MISALIGNED_DST_ROI_WARNING\";\n\n        case NPP_AFFINE_QUAD_INCORRECT_WARNING:\n            return \"NPP_AFFINE_QUAD_INCORRECT_WARNING\";\n\n        case NPP_DOUBLE_SIZE_WARNING:\n            return \"NPP_DOUBLE_SIZE_WARNING\";\n\n        case NPP_WRONG_INTERSECTION_ROI_WARNING:\n            return \"NPP_WRONG_INTERSECTION_ROI_WARNING\";\n\n#if ((NPP_VERSION_MAJOR << 12) + (NPP_VERSION_MINOR << 4)) >= 0x6000\n        /* These are 6.0 or higher */\n        case NPP_LUT_PALETTE_BITSIZE_ERROR:\n            return \"NPP_LUT_PALETTE_BITSIZE_ERROR\";\n\n        case NPP_ZC_MODE_NOT_SUPPORTED_ERROR:\n            return \"NPP_ZC_MODE_NOT_SUPPORTED_ERROR\";\n\n        case NPP_QUALITY_INDEX_ERROR:\n            return \"NPP_QUALITY_INDEX_ERROR\";\n\n        case NPP_CHANNEL_ORDER_ERROR:\n            return \"NPP_CHANNEL_ORDER_ERROR\";\n\n        case NPP_ZERO_MASK_VALUE_ERROR:\n            return \"NPP_ZERO_MASK_VALUE_ERROR\";\n\n        case NPP_NUMBER_OF_CHANNELS_ERROR:\n            return \"NPP_NUMBER_OF_CHANNELS_ERROR\";\n\n        case NPP_COI_ERROR:\n            return \"NPP_COI_ERROR\";\n\n        case NPP_DIVISOR_ERROR:\n            return \"NPP_DIVISOR_ERROR\";\n\n        case NPP_CHANNEL_ERROR:\n            return \"NPP_CHANNEL_ERROR\";\n\n        case NPP_STRIDE_ERROR:\n            return \"NPP_STRIDE_ERROR\";\n\n        case NPP_ANCHOR_ERROR:\n            return \"NPP_ANCHOR_ERROR\";\n\n        case NPP_MASK_SIZE_ERROR:\n            return \"NPP_MASK_SIZE_ERROR\";\n\n        case NPP_MOMENT_00_ZERO_ERROR:\n            return \"NPP_MOMENT_00_ZERO_ERROR\";\n\n        case NPP_THRESHOLD_NEGATIVE_LEVEL_ERROR:\n            return \"NPP_THRESHOLD_NEGATIVE_LEVEL_ERROR\";\n\n        case NPP_THRESHOLD_ERROR:\n            return \"NPP_THRESHOLD_ERROR\";\n\n        case NPP_CONTEXT_MATCH_ERROR:\n            return \"NPP_CONTEXT_MATCH_ERROR\";\n\n        case NPP_FFT_FLAG_ERROR:\n            return \"NPP_FFT_FLAG_ERROR\";\n\n        case NPP_FFT_ORDER_ERROR:\n            return \"NPP_FFT_ORDER_ERROR\";\n\n        case NPP_SCALE_RANGE_ERROR:\n            return \"NPP_SCALE_RANGE_ERROR\";\n\n        case NPP_DATA_TYPE_ERROR:\n            return \"NPP_DATA_TYPE_ERROR\";\n\n        case NPP_OUT_OFF_RANGE_ERROR:\n            return \"NPP_OUT_OFF_RANGE_ERROR\";\n\n        case NPP_DIVIDE_BY_ZERO_ERROR:\n            return \"NPP_DIVIDE_BY_ZERO_ERROR\";\n\n        case NPP_RANGE_ERROR:\n            return \"NPP_RANGE_ERROR\";\n\n        case NPP_NO_MEMORY_ERROR:\n            return \"NPP_NO_MEMORY_ERROR\";\n\n        case NPP_ERROR_RESERVED:\n            return \"NPP_ERROR_RESERVED\";\n\n        case NPP_NO_OPERATION_WARNING:\n            return \"NPP_NO_OPERATION_WARNING\";\n\n        case NPP_DIVIDE_BY_ZERO_WARNING:\n            return \"NPP_DIVIDE_BY_ZERO_WARNING\";\n#endif\n\n    }\n\n    return \"<unknown>\";\n}\n#endif\n\n#ifdef __DRIVER_TYPES_H__\n#ifndef DEVICE_RESET\n#define DEVICE_RESET cudaDeviceReset();\n#endif\n#else\n#ifndef DEVICE_RESET\n#define DEVICE_RESET\n#endif\n#endif\n\ntemplate< typename T >\nvoid check(T result, char const *const func, const char *const file, int const line)\n{\n    if (result)\n    {\n        fprintf(stderr, \"CUDA error at %s:%d code=%d(%s) \\\"%s\\\" \\n\",\n                file, line, static_cast<unsigned int>(result), _cudaGetErrorEnum(result), func);\n        DEVICE_RESET\n        // Make sure we call CUDA Device Reset before exiting\n        exit(EXIT_FAILURE);\n    }\n}\n\n// This will output the proper CUDA error strings in the event that a CUDA host call returns an error\n#define checkCudaErrors(val)           check ( (val), #val, __FILE__, __LINE__ )\n\n// This will output the proper error string when calling cudaGetLastError\n#define getLastCudaError(msg)      __getLastCudaError (msg, __FILE__, __LINE__)\n\ninline void __getLastCudaError(const char *errorMessage, const char *file, const int line)\n{\n    cudaError_t err = cudaGetLastError();\n\n    if (cudaSuccess != err)\n    {\n        fprintf(stderr, \"%s(%i) : getLastCudaError() CUDA error : %s : (%d) %s.\\n\",\n                file, line, errorMessage, (int)err, cudaGetErrorString(err));\n        DEVICE_RESET\n        exit(EXIT_FAILURE);\n    }\n}\n\n#ifndef MAX\n#define MAX(a,b) (a > b ? a : b)\n#endif\n\n// Float To Int conversion\ninline int ftoi(float value)\n{\n    return (value >= 0 ? (int)(value + 0.5) : (int)(value - 0.5));\n}\n\n// Beginning of GPU Architecture definitions\ninline int _ConvertSMVer2Cores(int major, int minor)\n{\n    // Defines for GPU Architecture types (using the SM version to determine the # of cores per SM\n    typedef struct\n    {\n        int SM; // 0xMm (hexidecimal notation), M = SM Major version, and m = SM minor version\n        int Cores;\n    } sSMtoCores;\n\n    sSMtoCores nGpuArchCoresPerSM[] =\n    {\n        { 0x20, 32 }, // Fermi Generation (SM 2.0) GF100 class\n        { 0x21, 48 }, // Fermi Generation (SM 2.1) GF10x class\n        { 0x30, 192}, // Kepler Generation (SM 3.0) GK10x class\n        { 0x32, 192}, // Kepler Generation (SM 3.2) GK10x class\n        { 0x35, 192}, // Kepler Generation (SM 3.5) GK11x class\n        { 0x37, 192}, // Kepler Generation (SM 3.7) GK21x class\n        { 0x50, 128}, // Maxwell Generation (SM 5.0) GM10x class\n        { 0x52, 128}, // Maxwell Generation (SM 5.2) GM20x class\n        {   -1, -1 }\n    };\n\n    int index = 0;\n\n    while (nGpuArchCoresPerSM[index].SM != -1)\n    {\n        if (nGpuArchCoresPerSM[index].SM == ((major << 4) + minor))\n        {\n            return nGpuArchCoresPerSM[index].Cores;\n        }\n\n        index++;\n    }\n\n    // If we don't find the values, we default use the previous one to run properly\n    printf(\"MapSMtoCores for SM %d.%d is undefined.  Default to use %d Cores/SM\\n\", major, minor, nGpuArchCoresPerSM[index-1].Cores);\n    return nGpuArchCoresPerSM[index-1].Cores;\n}\n// end of GPU Architecture definitions\n\n#ifdef __CUDA_RUNTIME_H__\n// General GPU Device CUDA Initialization\ninline int gpuDeviceInit(int devID)\n{\n    int device_count;\n    checkCudaErrors(cudaGetDeviceCount(&device_count));\n\n    if (device_count == 0)\n    {\n        fprintf(stderr, \"gpuDeviceInit() CUDA error: no devices supporting CUDA.\\n\");\n        exit(EXIT_FAILURE);\n    }\n\n    if (devID < 0)\n    {\n        devID = 0;\n    }\n\n    if (devID > device_count-1)\n    {\n        fprintf(stderr, \"\\n\");\n        fprintf(stderr, \">> %d CUDA capable GPU device(s) detected. <<\\n\", device_count);\n        fprintf(stderr, \">> gpuDeviceInit (-device=%d) is not a valid GPU device. <<\\n\", devID);\n        fprintf(stderr, \"\\n\");\n        return -devID;\n    }\n\n    cudaDeviceProp deviceProp;\n    checkCudaErrors(cudaGetDeviceProperties(&deviceProp, devID));\n\n    if (deviceProp.computeMode == cudaComputeModeProhibited)\n    {\n        fprintf(stderr, \"Error: device is running in <Compute Mode Prohibited>, no threads can use ::cudaSetDevice().\\n\");\n        return -1;\n    }\n\n    if (deviceProp.major < 1)\n    {\n        fprintf(stderr, \"gpuDeviceInit(): GPU device does not support CUDA.\\n\");\n        exit(EXIT_FAILURE);\n    }\n\n    checkCudaErrors(cudaSetDevice(devID));\n    printf(\"gpuDeviceInit() CUDA Device [%d]: \\\"%s\\n\", devID, deviceProp.name);\n\n    return devID;\n}\n\n// This function returns the best GPU (with maximum GFLOPS)\ninline int gpuGetMaxGflopsDeviceId()\n{\n    int current_device     = 0, sm_per_multiproc  = 0;\n    int max_perf_device    = 0;\n    int device_count       = 0, best_SM_arch      = 0;\n    int devices_prohibited = 0;\n\n    unsigned long long max_compute_perf = 0;\n    cudaDeviceProp deviceProp;\n    cudaGetDeviceCount(&device_count);\n\n    checkCudaErrors(cudaGetDeviceCount(&device_count));\n\n    if (device_count == 0)\n    {\n        fprintf(stderr, \"gpuGetMaxGflopsDeviceId() CUDA error: no devices supporting CUDA.\\n\");\n        exit(EXIT_FAILURE);\n    }\n\n    // Find the best major SM Architecture GPU device\n    while (current_device < device_count)\n    {\n        cudaGetDeviceProperties(&deviceProp, current_device);\n\n        // If this GPU is not running on Compute Mode prohibited, then we can add it to the list\n        if (deviceProp.computeMode != cudaComputeModeProhibited)\n        {\n            if (deviceProp.major > 0 && deviceProp.major < 9999)\n            {\n                best_SM_arch = MAX(best_SM_arch, deviceProp.major);\n            }\n        }\n        else\n        {\n            devices_prohibited++;\n        }\n\n        current_device++;\n    }\n\n    if (devices_prohibited == device_count)\n    {\n        fprintf(stderr, \"gpuGetMaxGflopsDeviceId() CUDA error: all devices have compute mode prohibited.\\n\");\n        exit(EXIT_FAILURE);\n    }\n\n    // Find the best CUDA capable GPU device\n    current_device = 0;\n\n    while (current_device < device_count)\n    {\n        cudaGetDeviceProperties(&deviceProp, current_device);\n\n        // If this GPU is not running on Compute Mode prohibited, then we can add it to the list\n        if (deviceProp.computeMode != cudaComputeModeProhibited)\n        {\n            if (deviceProp.major == 9999 && deviceProp.minor == 9999)\n            {\n                sm_per_multiproc = 1;\n            }\n            else\n            {\n                sm_per_multiproc = _ConvertSMVer2Cores(deviceProp.major, deviceProp.minor);\n            }\n\n            unsigned long long compute_perf  = (unsigned long long) deviceProp.multiProcessorCount * sm_per_multiproc * deviceProp.clockRate;\n\n            if (compute_perf  > max_compute_perf)\n            {\n                // If we find GPU with SM major > 2, search only these\n                if (best_SM_arch > 2)\n                {\n                    // If our device==dest_SM_arch, choose this, or else pass\n                    if (deviceProp.major == best_SM_arch)\n                    {\n                        max_compute_perf  = compute_perf;\n                        max_perf_device   = current_device;\n                    }\n                }\n                else\n                {\n                    max_compute_perf  = compute_perf;\n                    max_perf_device   = current_device;\n                }\n            }\n        }\n\n        ++current_device;\n    }\n\n    return max_perf_device;\n}\n\n\n// Initialization code to find the best CUDA Device\ninline int findCudaDevice()\n{\n    cudaDeviceProp deviceProp;\n    int devID = 0;\n\n    // Pick the device with highest Gflops/s\n    devID = gpuGetMaxGflopsDeviceId();\n    checkCudaErrors(cudaSetDevice(devID));\n    checkCudaErrors(cudaGetDeviceProperties(&deviceProp, devID));\n    printf(\"GPU Device %d: \\\"%s\\\" with compute capability %d.%d\\n\\n\", devID, deviceProp.name, deviceProp.major, deviceProp.minor);\n\n    return devID;\n}\n\n// General check for CUDA GPU SM Capabilities\ninline bool checkCudaCapabilities(int major_version, int minor_version)\n{\n    cudaDeviceProp deviceProp;\n    deviceProp.major = 0;\n    deviceProp.minor = 0;\n    int dev;\n\n    checkCudaErrors(cudaGetDevice(&dev));\n    checkCudaErrors(cudaGetDeviceProperties(&deviceProp, dev));\n\n    if ((deviceProp.major > major_version) ||\n        (deviceProp.major == major_version && deviceProp.minor >= minor_version))\n    {\n        printf(\"  Device %d: <%16s >, Compute SM %d.%d detected\\n\", dev, deviceProp.name, deviceProp.major, deviceProp.minor);\n        return true;\n    }\n    else\n    {\n        printf(\"  No GPU device was found that can support CUDA compute capability %d.%d.\\n\", major_version, minor_version);\n        return false;\n    }\n}\n#endif\n\n// end of CUDA Helper Functions\n\n\n#endif // HELPER_CUDA_H\n"
  },
  {
    "path": "gpu/src/cuda/helper_math.h",
    "content": "/**\n * Copyright 1993-2013 NVIDIA Corporation.  All rights reserved.\n *\n * Please refer to the NVIDIA end user license agreement (EULA) associated\n * with this source code for terms and conditions that govern your use of\n * this software. Any use, reproduction, disclosure, or distribution of\n * this software and related documentation outside the terms of the EULA\n * is strictly prohibited.\n *\n */\n\n/*\n *  This file implements common mathematical operations on vector types\n *  (float3, float4 etc.) since these are not provided as standard by CUDA.\n *\n *  The syntax is modeled on the Cg standard library.\n *\n *  This is part of the Helper library includes\n *\n *    Thanks to Linh Hah for additions and fixes.\n */\n\n#ifndef HELPER_MATH_H\n#define HELPER_MATH_H\n\n#include \"cuda_runtime.h\"\n\ntypedef unsigned int uint;\ntypedef unsigned short ushort;\n\n#ifndef EXIT_WAIVED\n#define EXIT_WAIVED 2\n#endif\n\n#ifndef __CUDACC__\n#include <math.h>\n#include <stdlib.h>\n\n////////////////////////////////////////////////////////////////////////////////\n// host implementations of CUDA functions\n////////////////////////////////////////////////////////////////////////////////\n\ninline float fminf(float a, float b)\n{\n    return a < b ? a : b;\n}\n\ninline float fmaxf(float a, float b)\n{\n    return a > b ? a : b;\n}\n\ninline int max(int a, int b)\n{\n    return a > b ? a : b;\n}\n\ninline int min(int a, int b)\n{\n    return a < b ? a : b;\n}\n\ninline float rsqrtf(float x)\n{\n    return 1.0f / sqrtf(x);\n}\n#endif\n\n////////////////////////////////////////////////////////////////////////////////\n// constructors\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float2 make_float2(float s)\n{\n    return make_float2(s, s);\n}\ninline __host__ __device__ float2 make_float2(float3 a)\n{\n    return make_float2(a.x, a.y);\n}\ninline __host__ __device__ float2 make_float2(int2 a)\n{\n    return make_float2(float(a.x), float(a.y));\n}\ninline __host__ __device__ float2 make_float2(uint2 a)\n{\n    return make_float2(float(a.x), float(a.y));\n}\n\ninline __host__ __device__ int2 make_int2(int s)\n{\n    return make_int2(s, s);\n}\ninline __host__ __device__ int2 make_int2(int3 a)\n{\n    return make_int2(a.x, a.y);\n}\ninline __host__ __device__ int2 make_int2(uint2 a)\n{\n    return make_int2(int(a.x), int(a.y));\n}\ninline __host__ __device__ int2 make_int2(float2 a)\n{\n    return make_int2(int(a.x), int(a.y));\n}\n\ninline __host__ __device__ uint2 make_uint2(uint s)\n{\n    return make_uint2(s, s);\n}\ninline __host__ __device__ uint2 make_uint2(uint3 a)\n{\n    return make_uint2(a.x, a.y);\n}\ninline __host__ __device__ uint2 make_uint2(int2 a)\n{\n    return make_uint2(uint(a.x), uint(a.y));\n}\n\ninline __host__ __device__ float3 make_float3(float s)\n{\n    return make_float3(s, s, s);\n}\ninline __host__ __device__ float3 make_float3(float2 a)\n{\n    return make_float3(a.x, a.y, 0.0f);\n}\ninline __host__ __device__ float3 make_float3(float2 a, float s)\n{\n    return make_float3(a.x, a.y, s);\n}\ninline __host__ __device__ float3 make_float3(float4 a)\n{\n    return make_float3(a.x, a.y, a.z);\n}\ninline __host__ __device__ float3 make_float3(int3 a)\n{\n    return make_float3(float(a.x), float(a.y), float(a.z));\n}\ninline __host__ __device__ float3 make_float3(uint3 a)\n{\n    return make_float3(float(a.x), float(a.y), float(a.z));\n}\n\ninline __host__ __device__ int3 make_int3(int s)\n{\n    return make_int3(s, s, s);\n}\ninline __host__ __device__ int3 make_int3(int2 a)\n{\n    return make_int3(a.x, a.y, 0);\n}\ninline __host__ __device__ int3 make_int3(int2 a, int s)\n{\n    return make_int3(a.x, a.y, s);\n}\ninline __host__ __device__ int3 make_int3(uint3 a)\n{\n    return make_int3(int(a.x), int(a.y), int(a.z));\n}\ninline __host__ __device__ int3 make_int3(float3 a)\n{\n    return make_int3(int(a.x), int(a.y), int(a.z));\n}\n\ninline __host__ __device__ uint3 make_uint3(uint s)\n{\n    return make_uint3(s, s, s);\n}\ninline __host__ __device__ uint3 make_uint3(uint2 a)\n{\n    return make_uint3(a.x, a.y, 0);\n}\ninline __host__ __device__ uint3 make_uint3(uint2 a, uint s)\n{\n    return make_uint3(a.x, a.y, s);\n}\ninline __host__ __device__ uint3 make_uint3(uint4 a)\n{\n    return make_uint3(a.x, a.y, a.z);\n}\ninline __host__ __device__ uint3 make_uint3(int3 a)\n{\n    return make_uint3(uint(a.x), uint(a.y), uint(a.z));\n}\n\ninline __host__ __device__ float4 make_float4(float s)\n{\n    return make_float4(s, s, s, s);\n}\ninline __host__ __device__ float4 make_float4(float3 a)\n{\n    return make_float4(a.x, a.y, a.z, 0.0f);\n}\ninline __host__ __device__ float4 make_float4(float3 a, float w)\n{\n    return make_float4(a.x, a.y, a.z, w);\n}\ninline __host__ __device__ float4 make_float4(int4 a)\n{\n    return make_float4(float(a.x), float(a.y), float(a.z), float(a.w));\n}\ninline __host__ __device__ float4 make_float4(uint4 a)\n{\n    return make_float4(float(a.x), float(a.y), float(a.z), float(a.w));\n}\n\ninline __host__ __device__ int4 make_int4(int s)\n{\n    return make_int4(s, s, s, s);\n}\ninline __host__ __device__ int4 make_int4(int3 a)\n{\n    return make_int4(a.x, a.y, a.z, 0);\n}\ninline __host__ __device__ int4 make_int4(int3 a, int w)\n{\n    return make_int4(a.x, a.y, a.z, w);\n}\ninline __host__ __device__ int4 make_int4(uint4 a)\n{\n    return make_int4(int(a.x), int(a.y), int(a.z), int(a.w));\n}\ninline __host__ __device__ int4 make_int4(float4 a)\n{\n    return make_int4(int(a.x), int(a.y), int(a.z), int(a.w));\n}\n\n\ninline __host__ __device__ uint4 make_uint4(uint s)\n{\n    return make_uint4(s, s, s, s);\n}\ninline __host__ __device__ uint4 make_uint4(uint3 a)\n{\n    return make_uint4(a.x, a.y, a.z, 0);\n}\ninline __host__ __device__ uint4 make_uint4(uint3 a, uint w)\n{\n    return make_uint4(a.x, a.y, a.z, w);\n}\ninline __host__ __device__ uint4 make_uint4(int4 a)\n{\n    return make_uint4(uint(a.x), uint(a.y), uint(a.z), uint(a.w));\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// negate\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float2 operator-(float2 &a)\n{\n    return make_float2(-a.x, -a.y);\n}\ninline __host__ __device__ int2 operator-(int2 &a)\n{\n    return make_int2(-a.x, -a.y);\n}\ninline __host__ __device__ float3 operator-(float3 &a)\n{\n    return make_float3(-a.x, -a.y, -a.z);\n}\ninline __host__ __device__ int3 operator-(int3 &a)\n{\n    return make_int3(-a.x, -a.y, -a.z);\n}\ninline __host__ __device__ float4 operator-(float4 &a)\n{\n    return make_float4(-a.x, -a.y, -a.z, -a.w);\n}\ninline __host__ __device__ int4 operator-(int4 &a)\n{\n    return make_int4(-a.x, -a.y, -a.z, -a.w);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// addition\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float2 operator+(float2 a, float2 b)\n{\n    return make_float2(a.x + b.x, a.y + b.y);\n}\ninline __host__ __device__ void operator+=(float2 &a, float2 b)\n{\n    a.x += b.x;\n    a.y += b.y;\n}\ninline __host__ __device__ float2 operator+(float2 a, float b)\n{\n    return make_float2(a.x + b, a.y + b);\n}\ninline __host__ __device__ float2 operator+(float b, float2 a)\n{\n    return make_float2(a.x + b, a.y + b);\n}\ninline __host__ __device__ void operator+=(float2 &a, float b)\n{\n    a.x += b;\n    a.y += b;\n}\n\ninline __host__ __device__ int2 operator+(int2 a, int2 b)\n{\n    return make_int2(a.x + b.x, a.y + b.y);\n}\ninline __host__ __device__ void operator+=(int2 &a, int2 b)\n{\n    a.x += b.x;\n    a.y += b.y;\n}\ninline __host__ __device__ int2 operator+(int2 a, int b)\n{\n    return make_int2(a.x + b, a.y + b);\n}\ninline __host__ __device__ int2 operator+(int b, int2 a)\n{\n    return make_int2(a.x + b, a.y + b);\n}\ninline __host__ __device__ void operator+=(int2 &a, int b)\n{\n    a.x += b;\n    a.y += b;\n}\n\ninline __host__ __device__ uint2 operator+(uint2 a, uint2 b)\n{\n    return make_uint2(a.x + b.x, a.y + b.y);\n}\ninline __host__ __device__ void operator+=(uint2 &a, uint2 b)\n{\n    a.x += b.x;\n    a.y += b.y;\n}\ninline __host__ __device__ uint2 operator+(uint2 a, uint b)\n{\n    return make_uint2(a.x + b, a.y + b);\n}\ninline __host__ __device__ uint2 operator+(uint b, uint2 a)\n{\n    return make_uint2(a.x + b, a.y + b);\n}\ninline __host__ __device__ void operator+=(uint2 &a, uint b)\n{\n    a.x += b;\n    a.y += b;\n}\n\n\ninline __host__ __device__ float3 operator+(float3 a, float3 b)\n{\n    return make_float3(a.x + b.x, a.y + b.y, a.z + b.z);\n}\ninline __host__ __device__ void operator+=(float3 &a, float3 b)\n{\n    a.x += b.x;\n    a.y += b.y;\n    a.z += b.z;\n}\ninline __host__ __device__ float3 operator+(float3 a, float b)\n{\n    return make_float3(a.x + b, a.y + b, a.z + b);\n}\ninline __host__ __device__ void operator+=(float3 &a, float b)\n{\n    a.x += b;\n    a.y += b;\n    a.z += b;\n}\n\ninline __host__ __device__ int3 operator+(int3 a, int3 b)\n{\n    return make_int3(a.x + b.x, a.y + b.y, a.z + b.z);\n}\ninline __host__ __device__ void operator+=(int3 &a, int3 b)\n{\n    a.x += b.x;\n    a.y += b.y;\n    a.z += b.z;\n}\ninline __host__ __device__ int3 operator+(int3 a, int b)\n{\n    return make_int3(a.x + b, a.y + b, a.z + b);\n}\ninline __host__ __device__ void operator+=(int3 &a, int b)\n{\n    a.x += b;\n    a.y += b;\n    a.z += b;\n}\n\ninline __host__ __device__ uint3 operator+(uint3 a, uint3 b)\n{\n    return make_uint3(a.x + b.x, a.y + b.y, a.z + b.z);\n}\ninline __host__ __device__ void operator+=(uint3 &a, uint3 b)\n{\n    a.x += b.x;\n    a.y += b.y;\n    a.z += b.z;\n}\ninline __host__ __device__ uint3 operator+(uint3 a, uint b)\n{\n    return make_uint3(a.x + b, a.y + b, a.z + b);\n}\ninline __host__ __device__ void operator+=(uint3 &a, uint b)\n{\n    a.x += b;\n    a.y += b;\n    a.z += b;\n}\n\ninline __host__ __device__ int3 operator+(int b, int3 a)\n{\n    return make_int3(a.x + b, a.y + b, a.z + b);\n}\ninline __host__ __device__ uint3 operator+(uint b, uint3 a)\n{\n    return make_uint3(a.x + b, a.y + b, a.z + b);\n}\ninline __host__ __device__ float3 operator+(float b, float3 a)\n{\n    return make_float3(a.x + b, a.y + b, a.z + b);\n}\n\ninline __host__ __device__ float4 operator+(float4 a, float4 b)\n{\n    return make_float4(a.x + b.x, a.y + b.y, a.z + b.z,  a.w + b.w);\n}\ninline __host__ __device__ void operator+=(float4 &a, float4 b)\n{\n    a.x += b.x;\n    a.y += b.y;\n    a.z += b.z;\n    a.w += b.w;\n}\ninline __host__ __device__ float4 operator+(float4 a, float b)\n{\n    return make_float4(a.x + b, a.y + b, a.z + b, a.w + b);\n}\ninline __host__ __device__ float4 operator+(float b, float4 a)\n{\n    return make_float4(a.x + b, a.y + b, a.z + b, a.w + b);\n}\ninline __host__ __device__ void operator+=(float4 &a, float b)\n{\n    a.x += b;\n    a.y += b;\n    a.z += b;\n    a.w += b;\n}\n\ninline __host__ __device__ int4 operator+(int4 a, int4 b)\n{\n    return make_int4(a.x + b.x, a.y + b.y, a.z + b.z,  a.w + b.w);\n}\ninline __host__ __device__ void operator+=(int4 &a, int4 b)\n{\n    a.x += b.x;\n    a.y += b.y;\n    a.z += b.z;\n    a.w += b.w;\n}\ninline __host__ __device__ int4 operator+(int4 a, int b)\n{\n    return make_int4(a.x + b, a.y + b, a.z + b,  a.w + b);\n}\ninline __host__ __device__ int4 operator+(int b, int4 a)\n{\n    return make_int4(a.x + b, a.y + b, a.z + b,  a.w + b);\n}\ninline __host__ __device__ void operator+=(int4 &a, int b)\n{\n    a.x += b;\n    a.y += b;\n    a.z += b;\n    a.w += b;\n}\n\ninline __host__ __device__ uint4 operator+(uint4 a, uint4 b)\n{\n    return make_uint4(a.x + b.x, a.y + b.y, a.z + b.z,  a.w + b.w);\n}\ninline __host__ __device__ void operator+=(uint4 &a, uint4 b)\n{\n    a.x += b.x;\n    a.y += b.y;\n    a.z += b.z;\n    a.w += b.w;\n}\ninline __host__ __device__ uint4 operator+(uint4 a, uint b)\n{\n    return make_uint4(a.x + b, a.y + b, a.z + b,  a.w + b);\n}\ninline __host__ __device__ uint4 operator+(uint b, uint4 a)\n{\n    return make_uint4(a.x + b, a.y + b, a.z + b,  a.w + b);\n}\ninline __host__ __device__ void operator+=(uint4 &a, uint b)\n{\n    a.x += b;\n    a.y += b;\n    a.z += b;\n    a.w += b;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// subtract\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float2 operator-(float2 a, float2 b)\n{\n    return make_float2(a.x - b.x, a.y - b.y);\n}\ninline __host__ __device__ void operator-=(float2 &a, float2 b)\n{\n    a.x -= b.x;\n    a.y -= b.y;\n}\ninline __host__ __device__ float2 operator-(float2 a, float b)\n{\n    return make_float2(a.x - b, a.y - b);\n}\ninline __host__ __device__ float2 operator-(float b, float2 a)\n{\n    return make_float2(b - a.x, b - a.y);\n}\ninline __host__ __device__ void operator-=(float2 &a, float b)\n{\n    a.x -= b;\n    a.y -= b;\n}\n\ninline __host__ __device__ int2 operator-(int2 a, int2 b)\n{\n    return make_int2(a.x - b.x, a.y - b.y);\n}\ninline __host__ __device__ void operator-=(int2 &a, int2 b)\n{\n    a.x -= b.x;\n    a.y -= b.y;\n}\ninline __host__ __device__ int2 operator-(int2 a, int b)\n{\n    return make_int2(a.x - b, a.y - b);\n}\ninline __host__ __device__ int2 operator-(int b, int2 a)\n{\n    return make_int2(b - a.x, b - a.y);\n}\ninline __host__ __device__ void operator-=(int2 &a, int b)\n{\n    a.x -= b;\n    a.y -= b;\n}\n\ninline __host__ __device__ uint2 operator-(uint2 a, uint2 b)\n{\n    return make_uint2(a.x - b.x, a.y - b.y);\n}\ninline __host__ __device__ void operator-=(uint2 &a, uint2 b)\n{\n    a.x -= b.x;\n    a.y -= b.y;\n}\ninline __host__ __device__ uint2 operator-(uint2 a, uint b)\n{\n    return make_uint2(a.x - b, a.y - b);\n}\ninline __host__ __device__ uint2 operator-(uint b, uint2 a)\n{\n    return make_uint2(b - a.x, b - a.y);\n}\ninline __host__ __device__ void operator-=(uint2 &a, uint b)\n{\n    a.x -= b;\n    a.y -= b;\n}\n\ninline __host__ __device__ float3 operator-(float3 a, float3 b)\n{\n    return make_float3(a.x - b.x, a.y - b.y, a.z - b.z);\n}\ninline __host__ __device__ void operator-=(float3 &a, float3 b)\n{\n    a.x -= b.x;\n    a.y -= b.y;\n    a.z -= b.z;\n}\ninline __host__ __device__ float3 operator-(float3 a, float b)\n{\n    return make_float3(a.x - b, a.y - b, a.z - b);\n}\ninline __host__ __device__ float3 operator-(float b, float3 a)\n{\n    return make_float3(b - a.x, b - a.y, b - a.z);\n}\ninline __host__ __device__ void operator-=(float3 &a, float b)\n{\n    a.x -= b;\n    a.y -= b;\n    a.z -= b;\n}\n\ninline __host__ __device__ int3 operator-(int3 a, int3 b)\n{\n    return make_int3(a.x - b.x, a.y - b.y, a.z - b.z);\n}\ninline __host__ __device__ void operator-=(int3 &a, int3 b)\n{\n    a.x -= b.x;\n    a.y -= b.y;\n    a.z -= b.z;\n}\ninline __host__ __device__ int3 operator-(int3 a, int b)\n{\n    return make_int3(a.x - b, a.y - b, a.z - b);\n}\ninline __host__ __device__ int3 operator-(int b, int3 a)\n{\n    return make_int3(b - a.x, b - a.y, b - a.z);\n}\ninline __host__ __device__ void operator-=(int3 &a, int b)\n{\n    a.x -= b;\n    a.y -= b;\n    a.z -= b;\n}\n\ninline __host__ __device__ uint3 operator-(uint3 a, uint3 b)\n{\n    return make_uint3(a.x - b.x, a.y - b.y, a.z - b.z);\n}\ninline __host__ __device__ void operator-=(uint3 &a, uint3 b)\n{\n    a.x -= b.x;\n    a.y -= b.y;\n    a.z -= b.z;\n}\ninline __host__ __device__ uint3 operator-(uint3 a, uint b)\n{\n    return make_uint3(a.x - b, a.y - b, a.z - b);\n}\ninline __host__ __device__ uint3 operator-(uint b, uint3 a)\n{\n    return make_uint3(b - a.x, b - a.y, b - a.z);\n}\ninline __host__ __device__ void operator-=(uint3 &a, uint b)\n{\n    a.x -= b;\n    a.y -= b;\n    a.z -= b;\n}\n\ninline __host__ __device__ float4 operator-(float4 a, float4 b)\n{\n    return make_float4(a.x - b.x, a.y - b.y, a.z - b.z,  a.w - b.w);\n}\ninline __host__ __device__ void operator-=(float4 &a, float4 b)\n{\n    a.x -= b.x;\n    a.y -= b.y;\n    a.z -= b.z;\n    a.w -= b.w;\n}\ninline __host__ __device__ float4 operator-(float4 a, float b)\n{\n    return make_float4(a.x - b, a.y - b, a.z - b,  a.w - b);\n}\ninline __host__ __device__ void operator-=(float4 &a, float b)\n{\n    a.x -= b;\n    a.y -= b;\n    a.z -= b;\n    a.w -= b;\n}\n\ninline __host__ __device__ int4 operator-(int4 a, int4 b)\n{\n    return make_int4(a.x - b.x, a.y - b.y, a.z - b.z,  a.w - b.w);\n}\ninline __host__ __device__ void operator-=(int4 &a, int4 b)\n{\n    a.x -= b.x;\n    a.y -= b.y;\n    a.z -= b.z;\n    a.w -= b.w;\n}\ninline __host__ __device__ int4 operator-(int4 a, int b)\n{\n    return make_int4(a.x - b, a.y - b, a.z - b,  a.w - b);\n}\ninline __host__ __device__ int4 operator-(int b, int4 a)\n{\n    return make_int4(b - a.x, b - a.y, b - a.z, b - a.w);\n}\ninline __host__ __device__ void operator-=(int4 &a, int b)\n{\n    a.x -= b;\n    a.y -= b;\n    a.z -= b;\n    a.w -= b;\n}\n\ninline __host__ __device__ uint4 operator-(uint4 a, uint4 b)\n{\n    return make_uint4(a.x - b.x, a.y - b.y, a.z - b.z,  a.w - b.w);\n}\ninline __host__ __device__ void operator-=(uint4 &a, uint4 b)\n{\n    a.x -= b.x;\n    a.y -= b.y;\n    a.z -= b.z;\n    a.w -= b.w;\n}\ninline __host__ __device__ uint4 operator-(uint4 a, uint b)\n{\n    return make_uint4(a.x - b, a.y - b, a.z - b,  a.w - b);\n}\ninline __host__ __device__ uint4 operator-(uint b, uint4 a)\n{\n    return make_uint4(b - a.x, b - a.y, b - a.z, b - a.w);\n}\ninline __host__ __device__ void operator-=(uint4 &a, uint b)\n{\n    a.x -= b;\n    a.y -= b;\n    a.z -= b;\n    a.w -= b;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// multiply\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float2 operator*(float2 a, float2 b)\n{\n    return make_float2(a.x * b.x, a.y * b.y);\n}\ninline __host__ __device__ void operator*=(float2 &a, float2 b)\n{\n    a.x *= b.x;\n    a.y *= b.y;\n}\ninline __host__ __device__ float2 operator*(float2 a, float b)\n{\n    return make_float2(a.x * b, a.y * b);\n}\ninline __host__ __device__ float2 operator*(float b, float2 a)\n{\n    return make_float2(b * a.x, b * a.y);\n}\ninline __host__ __device__ void operator*=(float2 &a, float b)\n{\n    a.x *= b;\n    a.y *= b;\n}\n\ninline __host__ __device__ int2 operator*(int2 a, int2 b)\n{\n    return make_int2(a.x * b.x, a.y * b.y);\n}\ninline __host__ __device__ void operator*=(int2 &a, int2 b)\n{\n    a.x *= b.x;\n    a.y *= b.y;\n}\ninline __host__ __device__ int2 operator*(int2 a, int b)\n{\n    return make_int2(a.x * b, a.y * b);\n}\ninline __host__ __device__ int2 operator*(int b, int2 a)\n{\n    return make_int2(b * a.x, b * a.y);\n}\ninline __host__ __device__ void operator*=(int2 &a, int b)\n{\n    a.x *= b;\n    a.y *= b;\n}\n\ninline __host__ __device__ uint2 operator*(uint2 a, uint2 b)\n{\n    return make_uint2(a.x * b.x, a.y * b.y);\n}\ninline __host__ __device__ void operator*=(uint2 &a, uint2 b)\n{\n    a.x *= b.x;\n    a.y *= b.y;\n}\ninline __host__ __device__ uint2 operator*(uint2 a, uint b)\n{\n    return make_uint2(a.x * b, a.y * b);\n}\ninline __host__ __device__ uint2 operator*(uint b, uint2 a)\n{\n    return make_uint2(b * a.x, b * a.y);\n}\ninline __host__ __device__ void operator*=(uint2 &a, uint b)\n{\n    a.x *= b;\n    a.y *= b;\n}\n\ninline __host__ __device__ float3 operator*(float3 a, float3 b)\n{\n    return make_float3(a.x * b.x, a.y * b.y, a.z * b.z);\n}\ninline __host__ __device__ void operator*=(float3 &a, float3 b)\n{\n    a.x *= b.x;\n    a.y *= b.y;\n    a.z *= b.z;\n}\ninline __host__ __device__ float3 operator*(float3 a, float b)\n{\n    return make_float3(a.x * b, a.y * b, a.z * b);\n}\ninline __host__ __device__ float3 operator*(float b, float3 a)\n{\n    return make_float3(b * a.x, b * a.y, b * a.z);\n}\ninline __host__ __device__ void operator*=(float3 &a, float b)\n{\n    a.x *= b;\n    a.y *= b;\n    a.z *= b;\n}\n\ninline __host__ __device__ int3 operator*(int3 a, int3 b)\n{\n    return make_int3(a.x * b.x, a.y * b.y, a.z * b.z);\n}\ninline __host__ __device__ void operator*=(int3 &a, int3 b)\n{\n    a.x *= b.x;\n    a.y *= b.y;\n    a.z *= b.z;\n}\ninline __host__ __device__ int3 operator*(int3 a, int b)\n{\n    return make_int3(a.x * b, a.y * b, a.z * b);\n}\ninline __host__ __device__ int3 operator*(int b, int3 a)\n{\n    return make_int3(b * a.x, b * a.y, b * a.z);\n}\ninline __host__ __device__ void operator*=(int3 &a, int b)\n{\n    a.x *= b;\n    a.y *= b;\n    a.z *= b;\n}\n\ninline __host__ __device__ uint3 operator*(uint3 a, uint3 b)\n{\n    return make_uint3(a.x * b.x, a.y * b.y, a.z * b.z);\n}\ninline __host__ __device__ void operator*=(uint3 &a, uint3 b)\n{\n    a.x *= b.x;\n    a.y *= b.y;\n    a.z *= b.z;\n}\ninline __host__ __device__ uint3 operator*(uint3 a, uint b)\n{\n    return make_uint3(a.x * b, a.y * b, a.z * b);\n}\ninline __host__ __device__ uint3 operator*(uint b, uint3 a)\n{\n    return make_uint3(b * a.x, b * a.y, b * a.z);\n}\ninline __host__ __device__ void operator*=(uint3 &a, uint b)\n{\n    a.x *= b;\n    a.y *= b;\n    a.z *= b;\n}\n\ninline __host__ __device__ float4 operator*(float4 a, float4 b)\n{\n    return make_float4(a.x * b.x, a.y * b.y, a.z * b.z,  a.w * b.w);\n}\ninline __host__ __device__ void operator*=(float4 &a, float4 b)\n{\n    a.x *= b.x;\n    a.y *= b.y;\n    a.z *= b.z;\n    a.w *= b.w;\n}\ninline __host__ __device__ float4 operator*(float4 a, float b)\n{\n    return make_float4(a.x * b, a.y * b, a.z * b,  a.w * b);\n}\ninline __host__ __device__ float4 operator*(float b, float4 a)\n{\n    return make_float4(b * a.x, b * a.y, b * a.z, b * a.w);\n}\ninline __host__ __device__ void operator*=(float4 &a, float b)\n{\n    a.x *= b;\n    a.y *= b;\n    a.z *= b;\n    a.w *= b;\n}\n\ninline __host__ __device__ int4 operator*(int4 a, int4 b)\n{\n    return make_int4(a.x * b.x, a.y * b.y, a.z * b.z,  a.w * b.w);\n}\ninline __host__ __device__ void operator*=(int4 &a, int4 b)\n{\n    a.x *= b.x;\n    a.y *= b.y;\n    a.z *= b.z;\n    a.w *= b.w;\n}\ninline __host__ __device__ int4 operator*(int4 a, int b)\n{\n    return make_int4(a.x * b, a.y * b, a.z * b,  a.w * b);\n}\ninline __host__ __device__ int4 operator*(int b, int4 a)\n{\n    return make_int4(b * a.x, b * a.y, b * a.z, b * a.w);\n}\ninline __host__ __device__ void operator*=(int4 &a, int b)\n{\n    a.x *= b;\n    a.y *= b;\n    a.z *= b;\n    a.w *= b;\n}\n\ninline __host__ __device__ uint4 operator*(uint4 a, uint4 b)\n{\n    return make_uint4(a.x * b.x, a.y * b.y, a.z * b.z,  a.w * b.w);\n}\ninline __host__ __device__ void operator*=(uint4 &a, uint4 b)\n{\n    a.x *= b.x;\n    a.y *= b.y;\n    a.z *= b.z;\n    a.w *= b.w;\n}\ninline __host__ __device__ uint4 operator*(uint4 a, uint b)\n{\n    return make_uint4(a.x * b, a.y * b, a.z * b,  a.w * b);\n}\ninline __host__ __device__ uint4 operator*(uint b, uint4 a)\n{\n    return make_uint4(b * a.x, b * a.y, b * a.z, b * a.w);\n}\ninline __host__ __device__ void operator*=(uint4 &a, uint b)\n{\n    a.x *= b;\n    a.y *= b;\n    a.z *= b;\n    a.w *= b;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// divide\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float2 operator/(float2 a, float2 b)\n{\n    return make_float2(a.x / b.x, a.y / b.y);\n}\ninline __host__ __device__ void operator/=(float2 &a, float2 b)\n{\n    a.x /= b.x;\n    a.y /= b.y;\n}\ninline __host__ __device__ float2 operator/(float2 a, float b)\n{\n    return make_float2(a.x / b, a.y / b);\n}\ninline __host__ __device__ void operator/=(float2 &a, float b)\n{\n    a.x /= b;\n    a.y /= b;\n}\ninline __host__ __device__ float2 operator/(float b, float2 a)\n{\n    return make_float2(b / a.x, b / a.y);\n}\n\ninline __host__ __device__ float3 operator/(float3 a, float3 b)\n{\n    return make_float3(a.x / b.x, a.y / b.y, a.z / b.z);\n}\ninline __host__ __device__ void operator/=(float3 &a, float3 b)\n{\n    a.x /= b.x;\n    a.y /= b.y;\n    a.z /= b.z;\n}\ninline __host__ __device__ float3 operator/(float3 a, float b)\n{\n    return make_float3(a.x / b, a.y / b, a.z / b);\n}\ninline __host__ __device__ void operator/=(float3 &a, float b)\n{\n    a.x /= b;\n    a.y /= b;\n    a.z /= b;\n}\ninline __host__ __device__ float3 operator/(float b, float3 a)\n{\n    return make_float3(b / a.x, b / a.y, b / a.z);\n}\n\ninline __host__ __device__ float4 operator/(float4 a, float4 b)\n{\n    return make_float4(a.x / b.x, a.y / b.y, a.z / b.z,  a.w / b.w);\n}\ninline __host__ __device__ void operator/=(float4 &a, float4 b)\n{\n    a.x /= b.x;\n    a.y /= b.y;\n    a.z /= b.z;\n    a.w /= b.w;\n}\ninline __host__ __device__ float4 operator/(float4 a, float b)\n{\n    return make_float4(a.x / b, a.y / b, a.z / b,  a.w / b);\n}\ninline __host__ __device__ void operator/=(float4 &a, float b)\n{\n    a.x /= b;\n    a.y /= b;\n    a.z /= b;\n    a.w /= b;\n}\ninline __host__ __device__ float4 operator/(float b, float4 a)\n{\n    return make_float4(b / a.x, b / a.y, b / a.z, b / a.w);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// min\n////////////////////////////////////////////////////////////////////////////////\n\ninline  __host__ __device__ float2 fminf(float2 a, float2 b)\n{\n    return make_float2(fminf(a.x,b.x), fminf(a.y,b.y));\n}\ninline __host__ __device__ float3 fminf(float3 a, float3 b)\n{\n    return make_float3(fminf(a.x,b.x), fminf(a.y,b.y), fminf(a.z,b.z));\n}\ninline  __host__ __device__ float4 fminf(float4 a, float4 b)\n{\n    return make_float4(fminf(a.x,b.x), fminf(a.y,b.y), fminf(a.z,b.z), fminf(a.w,b.w));\n}\n\ninline __host__ __device__ int2 min(int2 a, int2 b)\n{\n    return make_int2(min(a.x,b.x), min(a.y,b.y));\n}\ninline __host__ __device__ int3 min(int3 a, int3 b)\n{\n    return make_int3(min(a.x,b.x), min(a.y,b.y), min(a.z,b.z));\n}\ninline __host__ __device__ int4 min(int4 a, int4 b)\n{\n    return make_int4(min(a.x,b.x), min(a.y,b.y), min(a.z,b.z), min(a.w,b.w));\n}\n\ninline __host__ __device__ uint2 min(uint2 a, uint2 b)\n{\n    return make_uint2(min(a.x,b.x), min(a.y,b.y));\n}\ninline __host__ __device__ uint3 min(uint3 a, uint3 b)\n{\n    return make_uint3(min(a.x,b.x), min(a.y,b.y), min(a.z,b.z));\n}\ninline __host__ __device__ uint4 min(uint4 a, uint4 b)\n{\n    return make_uint4(min(a.x,b.x), min(a.y,b.y), min(a.z,b.z), min(a.w,b.w));\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// max\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float2 fmaxf(float2 a, float2 b)\n{\n    return make_float2(fmaxf(a.x,b.x), fmaxf(a.y,b.y));\n}\ninline __host__ __device__ float3 fmaxf(float3 a, float3 b)\n{\n    return make_float3(fmaxf(a.x,b.x), fmaxf(a.y,b.y), fmaxf(a.z,b.z));\n}\ninline __host__ __device__ float4 fmaxf(float4 a, float4 b)\n{\n    return make_float4(fmaxf(a.x,b.x), fmaxf(a.y,b.y), fmaxf(a.z,b.z), fmaxf(a.w,b.w));\n}\n\ninline __host__ __device__ int2 max(int2 a, int2 b)\n{\n    return make_int2(max(a.x,b.x), max(a.y,b.y));\n}\ninline __host__ __device__ int3 max(int3 a, int3 b)\n{\n    return make_int3(max(a.x,b.x), max(a.y,b.y), max(a.z,b.z));\n}\ninline __host__ __device__ int4 max(int4 a, int4 b)\n{\n    return make_int4(max(a.x,b.x), max(a.y,b.y), max(a.z,b.z), max(a.w,b.w));\n}\n\ninline __host__ __device__ uint2 max(uint2 a, uint2 b)\n{\n    return make_uint2(max(a.x,b.x), max(a.y,b.y));\n}\ninline __host__ __device__ uint3 max(uint3 a, uint3 b)\n{\n    return make_uint3(max(a.x,b.x), max(a.y,b.y), max(a.z,b.z));\n}\ninline __host__ __device__ uint4 max(uint4 a, uint4 b)\n{\n    return make_uint4(max(a.x,b.x), max(a.y,b.y), max(a.z,b.z), max(a.w,b.w));\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// lerp\n// - linear interpolation between a and b, based on value t in [0, 1] range\n////////////////////////////////////////////////////////////////////////////////\n\ninline __device__ __host__ float lerp(float a, float b, float t)\n{\n    return a + t*(b-a);\n}\ninline __device__ __host__ float2 lerp(float2 a, float2 b, float t)\n{\n    return a + t*(b-a);\n}\ninline __device__ __host__ float3 lerp(float3 a, float3 b, float t)\n{\n    return a + t*(b-a);\n}\ninline __device__ __host__ float4 lerp(float4 a, float4 b, float t)\n{\n    return a + t*(b-a);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// clamp\n// - clamp the value v to be in the range [a, b]\n////////////////////////////////////////////////////////////////////////////////\n\ninline __device__ __host__ float clamp(float f, float a, float b)\n{\n    return fmaxf(a, fminf(f, b));\n}\ninline __device__ __host__ int clamp(int f, int a, int b)\n{\n    return max(a, min(f, b));\n}\ninline __device__ __host__ uint clamp(uint f, uint a, uint b)\n{\n    return max(a, min(f, b));\n}\n\ninline __device__ __host__ float2 clamp(float2 v, float a, float b)\n{\n    return make_float2(clamp(v.x, a, b), clamp(v.y, a, b));\n}\ninline __device__ __host__ float2 clamp(float2 v, float2 a, float2 b)\n{\n    return make_float2(clamp(v.x, a.x, b.x), clamp(v.y, a.y, b.y));\n}\ninline __device__ __host__ float3 clamp(float3 v, float a, float b)\n{\n    return make_float3(clamp(v.x, a, b), clamp(v.y, a, b), clamp(v.z, a, b));\n}\ninline __device__ __host__ float3 clamp(float3 v, float3 a, float3 b)\n{\n    return make_float3(clamp(v.x, a.x, b.x), clamp(v.y, a.y, b.y), clamp(v.z, a.z, b.z));\n}\ninline __device__ __host__ float4 clamp(float4 v, float a, float b)\n{\n    return make_float4(clamp(v.x, a, b), clamp(v.y, a, b), clamp(v.z, a, b), clamp(v.w, a, b));\n}\ninline __device__ __host__ float4 clamp(float4 v, float4 a, float4 b)\n{\n    return make_float4(clamp(v.x, a.x, b.x), clamp(v.y, a.y, b.y), clamp(v.z, a.z, b.z), clamp(v.w, a.w, b.w));\n}\n\ninline __device__ __host__ int2 clamp(int2 v, int a, int b)\n{\n    return make_int2(clamp(v.x, a, b), clamp(v.y, a, b));\n}\ninline __device__ __host__ int2 clamp(int2 v, int2 a, int2 b)\n{\n    return make_int2(clamp(v.x, a.x, b.x), clamp(v.y, a.y, b.y));\n}\ninline __device__ __host__ int3 clamp(int3 v, int a, int b)\n{\n    return make_int3(clamp(v.x, a, b), clamp(v.y, a, b), clamp(v.z, a, b));\n}\ninline __device__ __host__ int3 clamp(int3 v, int3 a, int3 b)\n{\n    return make_int3(clamp(v.x, a.x, b.x), clamp(v.y, a.y, b.y), clamp(v.z, a.z, b.z));\n}\ninline __device__ __host__ int4 clamp(int4 v, int a, int b)\n{\n    return make_int4(clamp(v.x, a, b), clamp(v.y, a, b), clamp(v.z, a, b), clamp(v.w, a, b));\n}\ninline __device__ __host__ int4 clamp(int4 v, int4 a, int4 b)\n{\n    return make_int4(clamp(v.x, a.x, b.x), clamp(v.y, a.y, b.y), clamp(v.z, a.z, b.z), clamp(v.w, a.w, b.w));\n}\n\ninline __device__ __host__ uint2 clamp(uint2 v, uint a, uint b)\n{\n    return make_uint2(clamp(v.x, a, b), clamp(v.y, a, b));\n}\ninline __device__ __host__ uint2 clamp(uint2 v, uint2 a, uint2 b)\n{\n    return make_uint2(clamp(v.x, a.x, b.x), clamp(v.y, a.y, b.y));\n}\ninline __device__ __host__ uint3 clamp(uint3 v, uint a, uint b)\n{\n    return make_uint3(clamp(v.x, a, b), clamp(v.y, a, b), clamp(v.z, a, b));\n}\ninline __device__ __host__ uint3 clamp(uint3 v, uint3 a, uint3 b)\n{\n    return make_uint3(clamp(v.x, a.x, b.x), clamp(v.y, a.y, b.y), clamp(v.z, a.z, b.z));\n}\ninline __device__ __host__ uint4 clamp(uint4 v, uint a, uint b)\n{\n    return make_uint4(clamp(v.x, a, b), clamp(v.y, a, b), clamp(v.z, a, b), clamp(v.w, a, b));\n}\ninline __device__ __host__ uint4 clamp(uint4 v, uint4 a, uint4 b)\n{\n    return make_uint4(clamp(v.x, a.x, b.x), clamp(v.y, a.y, b.y), clamp(v.z, a.z, b.z), clamp(v.w, a.w, b.w));\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// dot product\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float dot(float2 a, float2 b)\n{\n    return a.x * b.x + a.y * b.y;\n}\ninline __host__ __device__ float dot(float3 a, float3 b)\n{\n    return a.x * b.x + a.y * b.y + a.z * b.z;\n}\ninline __host__ __device__ float dot(float4 a, float4 b)\n{\n    return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;\n}\n\ninline __host__ __device__ int dot(int2 a, int2 b)\n{\n    return a.x * b.x + a.y * b.y;\n}\ninline __host__ __device__ int dot(int3 a, int3 b)\n{\n    return a.x * b.x + a.y * b.y + a.z * b.z;\n}\ninline __host__ __device__ int dot(int4 a, int4 b)\n{\n    return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;\n}\n\ninline __host__ __device__ uint dot(uint2 a, uint2 b)\n{\n    return a.x * b.x + a.y * b.y;\n}\ninline __host__ __device__ uint dot(uint3 a, uint3 b)\n{\n    return a.x * b.x + a.y * b.y + a.z * b.z;\n}\ninline __host__ __device__ uint dot(uint4 a, uint4 b)\n{\n    return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// length\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float length(float2 v)\n{\n    return sqrtf(dot(v, v));\n}\ninline __host__ __device__ float length(float3 v)\n{\n    return sqrtf(dot(v, v));\n}\ninline __host__ __device__ float length(float4 v)\n{\n    return sqrtf(dot(v, v));\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// normalize\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float2 normalize(float2 v)\n{\n    float invLen = rsqrtf(dot(v, v));\n    return v * invLen;\n}\ninline __host__ __device__ float3 normalize(float3 v)\n{\n    float invLen = rsqrtf(dot(v, v));\n    return v * invLen;\n}\ninline __host__ __device__ float4 normalize(float4 v)\n{\n    float invLen = rsqrtf(dot(v, v));\n    return v * invLen;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// floor\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float2 floorf(float2 v)\n{\n    return make_float2(floorf(v.x), floorf(v.y));\n}\ninline __host__ __device__ float3 floorf(float3 v)\n{\n    return make_float3(floorf(v.x), floorf(v.y), floorf(v.z));\n}\ninline __host__ __device__ float4 floorf(float4 v)\n{\n    return make_float4(floorf(v.x), floorf(v.y), floorf(v.z), floorf(v.w));\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// frac - returns the fractional portion of a scalar or each vector component\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float fracf(float v)\n{\n    return v - floorf(v);\n}\ninline __host__ __device__ float2 fracf(float2 v)\n{\n    return make_float2(fracf(v.x), fracf(v.y));\n}\ninline __host__ __device__ float3 fracf(float3 v)\n{\n    return make_float3(fracf(v.x), fracf(v.y), fracf(v.z));\n}\ninline __host__ __device__ float4 fracf(float4 v)\n{\n    return make_float4(fracf(v.x), fracf(v.y), fracf(v.z), fracf(v.w));\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// fmod\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float2 fmodf(float2 a, float2 b)\n{\n    return make_float2(fmodf(a.x, b.x), fmodf(a.y, b.y));\n}\ninline __host__ __device__ float3 fmodf(float3 a, float3 b)\n{\n    return make_float3(fmodf(a.x, b.x), fmodf(a.y, b.y), fmodf(a.z, b.z));\n}\ninline __host__ __device__ float4 fmodf(float4 a, float4 b)\n{\n    return make_float4(fmodf(a.x, b.x), fmodf(a.y, b.y), fmodf(a.z, b.z), fmodf(a.w, b.w));\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// absolute value\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float2 fabs(float2 v)\n{\n    return make_float2(fabs(v.x), fabs(v.y));\n}\ninline __host__ __device__ float3 fabs(float3 v)\n{\n    return make_float3(fabs(v.x), fabs(v.y), fabs(v.z));\n}\ninline __host__ __device__ float4 fabs(float4 v)\n{\n    return make_float4(fabs(v.x), fabs(v.y), fabs(v.z), fabs(v.w));\n}\n\ninline __host__ __device__ int2 abs(int2 v)\n{\n    return make_int2(abs(v.x), abs(v.y));\n}\ninline __host__ __device__ int3 abs(int3 v)\n{\n    return make_int3(abs(v.x), abs(v.y), abs(v.z));\n}\ninline __host__ __device__ int4 abs(int4 v)\n{\n    return make_int4(abs(v.x), abs(v.y), abs(v.z), abs(v.w));\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// reflect\n// - returns reflection of incident ray I around surface normal N\n// - N should be normalized, reflected vector's length is equal to length of I\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float3 reflect(float3 i, float3 n)\n{\n    return i - 2.0f * n * dot(n,i);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// cross product\n////////////////////////////////////////////////////////////////////////////////\n\ninline __host__ __device__ float3 cross(float3 a, float3 b)\n{\n    return make_float3(a.y*b.z - a.z*b.y, a.z*b.x - a.x*b.z, a.x*b.y - a.y*b.x);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// smoothstep\n// - returns 0 if x < a\n// - returns 1 if x > b\n// - otherwise returns smooth interpolation between 0 and 1 based on x\n////////////////////////////////////////////////////////////////////////////////\n\ninline __device__ __host__ float smoothstep(float a, float b, float x)\n{\n    float y = clamp((x - a) / (b - a), 0.0f, 1.0f);\n    return (y*y*(3.0f - (2.0f*y)));\n}\ninline __device__ __host__ float2 smoothstep(float2 a, float2 b, float2 x)\n{\n    float2 y = clamp((x - a) / (b - a), 0.0f, 1.0f);\n    return (y*y*(make_float2(3.0f) - (make_float2(2.0f)*y)));\n}\ninline __device__ __host__ float3 smoothstep(float3 a, float3 b, float3 x)\n{\n    float3 y = clamp((x - a) / (b - a), 0.0f, 1.0f);\n    return (y*y*(make_float3(3.0f) - (make_float3(2.0f)*y)));\n}\ninline __device__ __host__ float4 smoothstep(float4 a, float4 b, float4 x)\n{\n    float4 y = clamp((x - a) / (b - a), 0.0f, 1.0f);\n    return (y*y*(make_float4(3.0f) - (make_float4(2.0f)*y)));\n}\n\n#endif\n"
  },
  {
    "path": "gpu/src/cuda/integration.cu",
    "content": "\n#include <cuda_runtime.h>\n#include <cuda_gl_interop.h>\n\n#include <curand.h>\n#include <stdio.h>\n\n#include <thrust/device_ptr.h>\n#include <thrust/device_vector.h>\n#include <thrust/for_each.h>\n#include <thrust/iterator/zip_iterator.h>\n#include <thrust/transform.h>\n\n#include \"helper_cuda.h\"\n#include \"integration_kernel.cuh\"\n#include \"util.cuh\"\n#include \"shared_variables.cuh\"\n\n//#define PRINT\n\ncurandGenerator_t gen(0);\n\nthrust::device_vector<float> V; // particle velocities\nthrust::device_vector<float> lambda;\nthrust::device_vector<float> denom;\n\nthrust::device_vector<float> ros;\n\nthrust::device_vector<uint> neighbors;\nthrust::device_vector<uint> numNeighbors;\n\nthrust::device_vector<float> textureVec;\n\nfloat *rands;\n\nextern \"C\"\n{\n    /*****************************************************************************\n     *                              INITIALIZATION\n     *****************************************************************************/\n\n\n    void initIntegration()\n    {\n        allocateArray((void **)&rands, 6 * sizeof(float));\n        checkCudaErrors(curandCreateGenerator(&gen, CURAND_RNG_PSEUDO_DEFAULT));\n        checkCudaErrors(curandSetPseudoRandomGeneratorSeed(gen, 1234ULL));\n    }\n\n    void appendIntegrationParticle(float *v, float *ro, uint numParticles)\n    {\n        int sizeV = V.size();\n        int sizeRo = ros.size();\n\n        // resize the vectors\n        V.resize(sizeV + 4 * numParticles);\n        ros.resize(sizeRo + numParticles);\n\n        // get raw pointers to the data\n        float *dV = thrust::raw_pointer_cast(V.data());\n        float *dRos = thrust::raw_pointer_cast(ros.data());\n\n        // copy the new data over to the gpu\n        copyArrayToDevice(dV + sizeV, v, 0, 4 * numParticles * sizeof(float));\n        copyArrayToDevice(dRos + sizeRo, ro, 0, numParticles * sizeof(float));\n\n        // resize but don't need to fill\n        lambda.resize(ros.size());\n        numNeighbors.resize(ros.size());\n        neighbors.resize(V.size() * MAX_FLUID_NEIGHBORS);\n        textureVec.resize(V.size());\n    }\n\n    void freeIntegrationVectors()\n    {\n         V.clear();\n         lambda.clear();\n         denom.clear();\n         ros.clear();\n         neighbors.clear();\n         numNeighbors.clear();\n         textureVec.clear();\n\n         V.shrink_to_fit();\n         lambda.shrink_to_fit();\n         denom.shrink_to_fit();\n         ros.shrink_to_fit();\n         neighbors.shrink_to_fit();\n         numNeighbors.shrink_to_fit();\n         textureVec.shrink_to_fit();\n\n         checkCudaErrors(curandDestroyGenerator(gen));\n         freeArray(rands);\n    }\n\n    void setParameters(SimParams *hostParams)\n    {\n        // copy parameters to constant memory\n        checkCudaErrors(cudaMemcpyToSymbol(params, hostParams, 1 * sizeof(SimParams)));\n    }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n    /*****************************************************************************\n     *                              UPDATE POSITIONS\n     *****************************************************************************/\n\n    void integrateSystem(float *pos, float deltaTime, uint numParticles)\n    {\n        thrust::device_ptr<float4> d_pos4((float4 *)pos);\n        thrust::device_ptr<float4> d_vel4((float4 *)thrust::raw_pointer_cast(V.data()));\n\n        // copy current positions for reference later\n        copyToXstar(pos, numParticles);\n\n        // guess new positions based on forces\n        thrust::for_each(\n            thrust::make_zip_iterator(thrust::make_tuple(d_pos4, d_vel4)),\n            thrust::make_zip_iterator(thrust::make_tuple(d_pos4+numParticles, d_vel4+numParticles)),\n            integrate_functor(deltaTime));\n    }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n    /*****************************************************************************\n     *                              BUILD GRID\n     *****************************************************************************/\n\n    void calcHash(uint *gridParticleHash, uint *gridParticleIndex, float *pos, int numParticles)\n    {\n        uint numThreads, numBlocks;\n        computeGridSize(numParticles, 256, numBlocks, numThreads);\n\n        // execute the kernel\n        calcHashD<<< numBlocks, numThreads >>>(gridParticleHash, gridParticleIndex, (float4 *) pos, numParticles);\n\n#ifdef PRINT\n        printf(\"HASHES:\\n\");\n        thrust::device_ptr<uint> dGPH(gridParticleHash);\n        for (uint i = 0; i < numParticles; i++)\n        {\n            printf(\"particle: %u: hash: %u\\n\", i, (uint)*(dGPH + i));\n        }\n        printf(\"\\n\");\n#endif\n\n        // check if kernel invocation generated an error\n        getLastCudaError(\"Kernel execution failed\");\n    }\n\n\n    void reorderDataAndFindCellStart(uint  *cellStart,\n                                     uint  *cellEnd,\n                                     float *sortedPos,\n                                     float *sortedW,\n                                     int   *sortedPhase,\n                                     uint  *gridParticleHash,\n                                     uint  *gridParticleIndex,\n                                     float *oldPos,\n                                     uint   numParticles,\n                                     uint   numCells)\n    {\n        uint numThreads, numBlocks;\n        computeGridSize(numParticles, 256, numBlocks, numThreads);\n\n        // set all cells to empty\n        checkCudaErrors(cudaMemset(cellStart, 0xffffffff, numCells*sizeof(uint)));\n\n        float *dW = getWRawPtr();\n        int *dPhase = getPhaseRawPtr();\n\n        thrust::device_ptr<float> d_pos(oldPos);\n        thrust::device_ptr<float> d_W(dW);\n        thrust::device_ptr<int> d_Phase(dPhase);\n\n//        printf(\"particles\\n\");\n//        for (int i = 0; i < numParticles; i++)\n//        {\n//            printf(\"%.2f %.2f %.2f %.2f, \", (float)*(d_pos+i*4), (float)*(d_pos+i*4+1), (float)*(d_pos+i*4+2), (float)*(d_pos+i*4+3));\n//            printf(\"w: %.2f, phase: %d\\n\", (float)*(d_W+i), (int)*(d_Phase+i));\n//        }\n//        printf(\"\\n\");\n//        float4 *pos4 = (float4*)oldPos;\n        float *pos;\n        checkCudaErrors(cudaMalloc((void**)&pos, numParticles*4*sizeof(float)));\n//        textureVec.resize(4 * numParticles);\n//        float *pos = thrust::raw_pointer_cast(textureVec.data());\n        checkCudaErrors(cudaMemcpy(pos, oldPos, numParticles*4*sizeof(float), cudaMemcpyDeviceToDevice));\n\n        checkCudaErrors(cudaBindTexture(0, oldPosTex, pos, numParticles*sizeof(float4)));\n        checkCudaErrors(cudaBindTexture(0, invMassTex, dW, numParticles*sizeof(float)));\n        checkCudaErrors(cudaBindTexture(0, oldPhaseTex, dPhase, numParticles*sizeof(int)));\n\n        uint smemSize = sizeof(uint)*(numThreads+1);\n        reorderDataAndFindCellStartD<<< numBlocks, numThreads, smemSize>>>(cellStart,\n                                                                           cellEnd,\n                                                                           (float4 *) sortedPos,\n                                                                           sortedW,\n                                                                           sortedPhase,\n                                                                           gridParticleHash,\n                                                                           gridParticleIndex,\n                                                                           (float4 *) oldPos,\n                                                                           dW,\n                                                                           dPhase,\n                                                                           numParticles);\n        getLastCudaError(\"Kernel execution failed: reorderDataAndFindCellStartD\");\n\n#ifdef PRINT\n        printf(\"Sorted:\\n\");\n        thrust::device_ptr<uint> dGPH(gridParticleHash);\n        thrust::device_ptr<uint> dGPI(gridParticleIndex);\n        for (uint i = 0; i < numParticles; i++)\n        {\n            printf(\"i: %u: hash: %u\\n\", i, (uint)*(dGPH + i));\n            printf(\"i: %u: part: %u\\n\", i, (uint)*(dGPI + i));\n        }\n        printf(\"\\n\");\n\n\n        printf(\"Sorted:\\n\");\n        thrust::device_ptr<uint> dstart(cellStart);\n        thrust::device_ptr<uint> dend(cellEnd);\n        for (uint i = 0; i < 16; i++)\n        {\n            printf(\"i: %u: start: %u\\n\", i, (uint)*(dstart + i));\n            printf(\"i: %u: end: %u\\n\", i, (uint)*(dend + i));\n        }\n        printf(\"\\n\");\n#endif\n\n        checkCudaErrors(cudaUnbindTexture(oldPosTex));\n        checkCudaErrors(cudaUnbindTexture(invMassTex));\n        checkCudaErrors(cudaUnbindTexture(oldPhaseTex));\n\n        checkCudaErrors(cudaFree(pos));\n    }\n\n    void sortParticles(uint *dGridParticleHash, uint *dGridParticleIndex, uint numParticles)\n    {\n        thrust::sort_by_key(thrust::device_ptr<uint>(dGridParticleHash),\n                            thrust::device_ptr<uint>(dGridParticleHash + numParticles),\n                            thrust::device_ptr<uint>(dGridParticleIndex));\n    }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n    /*****************************************************************************\n     *                              PROCESS COLLISIONS\n     *****************************************************************************/\n\n    void sortByType(float *dPos, uint numParticles)\n    {\n\n    }\n\n    void collideWorld(float *pos, float *sortedPos, uint numParticles, int3 minBounds, int3 maxBounds)\n    {\n        thrust::device_ptr<float4> d_pos4((float4 *)pos);\n        thrust::device_ptr<float4> d_Xstar((float4*)getXstarRawPtr());\n        thrust::device_ptr<int> d_phase(getPhaseRawPtr());\n\n        // create random vars for boundary collisions\n        checkCudaErrors(curandGenerateUniform(gen, rands, 6));\n\n        // check for boundary collisions and move particles\n//        thrust::for_each\n//        thrust::transform(d_pos4, d_pos4 + numParticles, d_Xstar, d_pos4, collide_world_functor(rands, minBounds, maxBounds));\n\n        thrust::for_each(\n            thrust::make_zip_iterator(thrust::make_tuple(d_pos4, d_Xstar, d_phase)),\n            thrust::make_zip_iterator(thrust::make_tuple(d_pos4+numParticles, d_Xstar+numParticles, d_phase+numParticles)),\n            collide_world_functor(rands, minBounds, maxBounds));\n    }\n\n    void collide(float *particles,\n                 float *sortedPos,\n                 float *sortedW,\n                 int   *sortedPhase,\n                 uint  *gridParticleIndex,\n                 uint  *cellStart,\n                 uint  *cellEnd,\n                 uint   numParticles,\n                 uint   numCells)\n    {\n        checkCudaErrors(cudaBindTexture(0, oldPosTex, sortedPos, numParticles*sizeof(float4)));\n        checkCudaErrors(cudaBindTexture(0, invMassTex, sortedW, numParticles*sizeof(float)));\n        checkCudaErrors(cudaBindTexture(0, oldPhaseTex, sortedPhase, numParticles*sizeof(int)));\n\n        checkCudaErrors(cudaBindTexture(0, cellStartTex, cellStart, numCells*sizeof(uint)));\n        checkCudaErrors(cudaBindTexture(0, cellEndTex, cellEnd, numCells*sizeof(uint)));\n\n        // store neighbors\n        uint *dNeighbors = thrust::raw_pointer_cast(neighbors.data());\n        uint *dNumNeighbors = thrust::raw_pointer_cast(numNeighbors.data());\n        float *dXstar = getXstarRawPtr();\n\n        // thread per particle\n        uint numThreads, numBlocks;\n        computeGridSize(numParticles, 64, numBlocks, numThreads);\n\n        // execute the kernel\n        collideD<<< numBlocks, numThreads >>>((float4 *)particles,\n                                              (float4 *)dXstar,\n                                              (float4 *)sortedPos,\n                                              sortedW,\n                                              sortedPhase,\n                                              gridParticleIndex,\n                                              cellStart,\n                                              cellEnd,\n                                              numParticles,\n                                              dNeighbors,\n                                              dNumNeighbors);\n\n        // check if kernel invocation generated an error\n        getLastCudaError(\"Kernel execution failed\");\n\n        checkCudaErrors(cudaUnbindTexture(oldPosTex));\n        checkCudaErrors(cudaUnbindTexture(invMassTex));\n        checkCudaErrors(cudaUnbindTexture(oldPhaseTex));\n\n        checkCudaErrors(cudaUnbindTexture(cellStartTex));\n        checkCudaErrors(cudaUnbindTexture(cellEndTex));\n    }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n    /*****************************************************************************\n     *                              UPDATE VELOCITIES\n     *****************************************************************************/\n\n    void calcVelocity(float *dpos, float deltaTime, uint numParticles)\n    {\n        float *dXstar = getXstarRawPtr();\n        thrust::device_ptr<float4> d_Xstar((float4*)dXstar);\n        thrust::device_ptr<float4> d_pos((float4*)dpos);\n        thrust::device_ptr<float4> d_vel((float4*)thrust::raw_pointer_cast(V.data()));\n\n\n        thrust::transform(d_pos, d_pos + numParticles, d_Xstar, d_vel, subtract_functor(deltaTime));\n\n    }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n    /*****************************************************************************\n     *                              SOLVE FLUIDS\n     *****************************************************************************/\n    void solveFluids(float *sortedPos,\n                     float *sortedW,\n                     int   *sortedPhase,\n                     uint  *gridParticleIndex,\n                     uint  *cellStart,\n                     uint  *cellEnd,\n                     float *particles,\n                     uint   numParticles,\n                     uint   numCells)\n    {\n        checkCudaErrors(cudaBindTexture(0, oldPosTex, sortedPos, numParticles*sizeof(float4)));\n        checkCudaErrors(cudaBindTexture(0, invMassTex, sortedW, numParticles*sizeof(float)));\n        checkCudaErrors(cudaBindTexture(0, oldPhaseTex, sortedPhase, numParticles*sizeof(float4)));\n        checkCudaErrors(cudaBindTexture(0, cellStartTex, cellStart, numCells*sizeof(uint)));\n        checkCudaErrors(cudaBindTexture(0, cellEndTex, cellEnd, numCells*sizeof(uint)));\n\n        // thread per particle\n        uint numThreads, numBlocks;\n        computeGridSize(numParticles, 256, numBlocks, numThreads);\n\n        float *dLambda = thrust::raw_pointer_cast(lambda.data());\n//        float *dDenom = thrust::raw_pointer_cast(denom.data());\n        uint *dNeighbors = thrust::raw_pointer_cast(neighbors.data());\n        uint *dNumNeighbors = thrust::raw_pointer_cast(numNeighbors.data());\n        float *dRos = thrust::raw_pointer_cast(ros.data());\n\n//        printf(\"ros: %u, numParts: %u\\n\", (uint)ros.size(), numParticles);\n\n        // execute the kernel\n        findLambdasD<<< numBlocks, numThreads >>>(dLambda,\n                                                  gridParticleIndex,\n                                                  cellStart,\n                                                  cellEnd,\n                                                  numParticles,\n                                                  dNeighbors,\n                                                  dNumNeighbors,\n                                                  dRos);\n\n        // execute the kernel\n        solveFluidsD<<< numBlocks, numThreads >>>(dLambda,\n                                                  gridParticleIndex,\n                                                  (float4 *) particles,\n                                                  numParticles,\n                                                  dNeighbors,\n                                                  dNumNeighbors,\n                                                  dRos);\n\n        // check if kernel invocation generated an error\n        getLastCudaError(\"Kernel execution failed\");\n\n        checkCudaErrors(cudaUnbindTexture(oldPosTex));\n        checkCudaErrors(cudaUnbindTexture(invMassTex));\n        checkCudaErrors(cudaUnbindTexture(oldPhaseTex));\n        checkCudaErrors(cudaUnbindTexture(cellStartTex));\n        checkCudaErrors(cudaUnbindTexture(cellEndTex));\n    }\n}\n"
  },
  {
    "path": "gpu/src/cuda/integration_kernel.cuh",
    "content": "#ifndef INTEGRATION_KERNEL_H\n#define INTEGRATION_KERNEL_H\n\n#include <stdio.h>\n#include <math.h>\n#include <curand.h>\n#include <thrust/sort.h>\n\n#include \"helper_math.h\"\n#include \"math_constants.h\"\n#include \"kernel.cuh\"\n#include \"shared_variables.cuh\"\n\n//#define X_BOUNDARY 7.f\n//#define X_BOUNDARY 50.f\n//#define Z_BOUNDARY 50.f\n\n//#define\n\n#define EPS 0.001f\n\n////////////// fluid constants /////////////\n#define MAX_FLUID_NEIGHBORS 500\n\n#define H 2.f       // kernel radius\n#define H2 4.f      // H^2\n#define H6 64.f     // H^6\n#define H9 512.f    // H^9\n#define POLY6_COEFF 0.00305992474f // 315 / (64 * pi * H9)\n#define SPIKEY_COEFF 0.22381163872f // 45 / (pi * H6)\n\n#define FLUID_RELAXATION .01f // epsilon used when calculating lambda\n#define K_P .1f              // scales artificial pressure\n#define E_P 4.f              // exponent to art. pressure\n#define DQ_P .2f             // between .1 and .3 (for art pressure)\n\n\n/////////////////// friction ///////////////\n#define S_FRICTION .005f\n#define K_FRICTION .0002f\n//#define S_FRICTION .15f\n//#define K_FRICTION .003f\n\n// textures for particle position and velocity\ntexture<float4, 1, cudaReadModeElementType> oldPosTex;\ntexture<float, 1, cudaReadModeElementType> invMassTex;\ntexture<int, 1, cudaReadModeElementType> oldPhaseTex;\n\ntexture<uint, 1, cudaReadModeElementType> gridParticleHashTex;\ntexture<uint, 1, cudaReadModeElementType> cellStartTex;\ntexture<uint, 1, cudaReadModeElementType> cellEndTex;\n\n\n// simulation parameters in constant memory\n__constant__ SimParams params;\n\nstruct collide_world_functor\n{\n    float *rands;\n    int3 minBounds;\n    int3 maxBounds;\n\n    __host__ __device__\n    collide_world_functor(float *_rands, int3 _minBounds, int3 _maxBounds)\n        : rands(_rands), minBounds(_minBounds), maxBounds(_maxBounds) {}\n\n    template <typename Tuple>\n    __device__\n    void operator()(Tuple t)\n    {\n        float4 posData = thrust::get<0>(t);\n        float4 Xstar = thrust::get<1>(t);\n        int phase = thrust::get<2>(t);\n\n        float3 epos = make_float3(posData.x, posData.y, posData.z);\n        float3 pos = make_float3(Xstar.x, Xstar.y, Xstar.z);\n\n        float3 n = make_float3(0.f);\n\n        float d = params.particleRadius;\n        float eps = d * 0.f;\n        if (phase < SOLID)\n            eps = d * 0.01f;\n\n        if (epos.y < minBounds.y + params.particleRadius)\n        {\n            epos.y = minBounds.y + params.particleRadius + rands[5] * eps;\n            n += make_float3(0,1,0);\n        }\n\n        eps = d * 0.01f;\n\n        if (epos.x > maxBounds.x - params.particleRadius)\n        {\n            epos.x = maxBounds.x - (params.particleRadius + rands[0] * eps);\n            n += make_float3(-1,0,0);\n        }\n\n        if (epos.x < minBounds.x + params.particleRadius)\n        {\n            epos.x = minBounds.x + (params.particleRadius + rands[1] * eps);\n            n += make_float3(1,0,0);\n        }\n\n        if (epos.y > maxBounds.y - params.particleRadius)\n        {\n            epos.y = maxBounds.y - (params.particleRadius + rands[2] * eps);\n            n += make_float3(0,-1,0);\n        }\n\n#ifndef TWOD\n        if (epos.z > maxBounds.z - params.particleRadius)\n        {\n            epos.z = maxBounds.z - (params.particleRadius + rands[3] * eps);\n            n += make_float3(0,0,-1);\n        }\n\n        if (epos.z < minBounds.z + params.particleRadius)\n        {\n            epos.z = minBounds.z + (params.particleRadius + rands[4] * eps);\n            n += make_float3(0,0,1);\n        }\n#endif\n\n\n#ifdef TWOD\n        epos.z = ZPOS; // 2D\n        pos.z = ZPOS;\n#endif\n\n        if (length(n) < EPS || phase < CLOTH)\n        {\n            thrust::get<0>(t) = make_float4(epos, posData.w);\n            return;\n        }\n\n        float3 dp = (epos - pos);\n        float3 dpt = dp - dot(dp, n) * n;\n        float ldpt = length(dpt);\n\n        if (ldpt < EPS)\n        {\n            thrust::get<0>(t) = make_float4(epos, posData.w);\n            return;\n        }\n\n\n        if (ldpt < sqrt(S_FRICTION) * d)\n            epos -= dpt;\n        else\n            epos -= dpt * min(sqrt(K_FRICTION) * d / ldpt, 1.f);\n\n        // store new position and velocity\n\n        thrust::get<0>(t) = make_float4(epos, posData.w);\n    }\n};\n\nstruct integrate_functor\n{\n    float deltaTime;\n\n    __host__ __device__\n    integrate_functor(float delta_time)\n        : deltaTime(delta_time) {}\n\n    template <typename Tuple>\n    __device__\n    void operator()(Tuple t)\n    {\n        volatile float4 posData = thrust::get<0>(t);\n        volatile float4 velData = thrust::get<1>(t);\n        float3 pos = make_float3(posData.x, posData.y, posData.z);\n        float3 vel = make_float3(velData.x, velData.y, velData.z);\n\n        vel += params.gravity * deltaTime;\n\n        // new position = old position + velocity * deltaTime\n        pos += vel * deltaTime;\n\n        // store new position and velocity\n        thrust::get<0>(t) = make_float4(pos, posData.w);\n    }\n};\n\n// calculate position in uniform grid\n__device__ int3 calcGridPos(float3 p)\n{\n    int3 gridPos;\n    gridPos.x = floor((p.x - params.worldOrigin.x) / params.cellSize.x);\n    gridPos.y = floor((p.y - params.worldOrigin.y) / params.cellSize.y);\n    gridPos.z = floor((p.z - params.worldOrigin.z) / params.cellSize.z);\n    return gridPos;\n}\n\n// calculate address in grid from position (clamping to edges)\n__device__ uint calcGridHash(int3 gridPos)\n{\n    gridPos.x = gridPos.x & (params.gridSize.x-1);  // wrap grid, assumes size is power of 2\n    gridPos.y = gridPos.y & (params.gridSize.y-1);\n    gridPos.z = gridPos.z & (params.gridSize.z-1);\n    return __umul24(__umul24(gridPos.z, params.gridSize.y), params.gridSize.x) + __umul24(gridPos.y, params.gridSize.x) + gridPos.x;\n}\n\n// calculate grid hash value for each particle\n__global__\nvoid calcHashD(uint   *gridParticleHash,  // output\n               uint   *gridParticleIndex, // output\n               float4 *pos,               // input: positions\n               uint    numParticles)\n{\n    uint index = __umul24(blockIdx.x, blockDim.x) + threadIdx.x;\n\n    if (index >= numParticles) return;\n\n    volatile float4 p = pos[index];\n\n    // get address in grid\n    int3 gridPos = calcGridPos(make_float3(p.x, p.y, p.z));\n    uint hash = calcGridHash(gridPos);\n\n    // store grid hash and particle index\n    gridParticleHash[index] = hash;\n    gridParticleIndex[index] = index;\n}\n\n// rearrange particle data into sorted order, and find the start of each cell\n// in the sorted hash array\n__global__\nvoid reorderDataAndFindCellStartD(uint   *cellStart,        // output: cell start index\n                                  uint   *cellEnd,          // output: cell end index\n                                  float4 *sortedPos,        // output: sorted positions\n                                  float  *sortedW,          // output: sorted inverse masses\n                                  int    *sortedPhase,      // output: sorted phase values\n                                  uint   *gridParticleHash, // input: sorted grid hashes\n                                  uint   *gridParticleIndex,// input: sorted particle indices\n                                  float4 *oldPos,           // input: position array\n                                  float  *W,\n                                  int    *phase,\n                                  uint    numParticles)\n{\n    extern __shared__ uint sharedHash[];    // blockSize + 1 elements\n    uint index = __umul24(blockIdx.x,blockDim.x) + threadIdx.x;\n\n    uint hash;\n\n    // handle case when no. of particles not multiple of block size\n    if (index < numParticles)\n    {\n        hash = gridParticleHash[index];\n\n        // Load hash data into shared memory so that we can look\n        // at neighboring particle's hash value without loading\n        // two hash values per thread\n        sharedHash[threadIdx.x+1] = hash;\n\n        if (index > 0 && threadIdx.x == 0)\n        {\n            // first thread in block must load neighbor particle hash\n            sharedHash[0] = gridParticleHash[index-1];\n        }\n    }\n\n    __syncthreads();\n\n    if (index < numParticles)\n    {\n        // If this particle has a different cell index to the previous\n        // particle then it must be the first particle in the cell,\n        // so store the index of this particle in the cell.\n        // As it isn't the first particle, it must also be the cell end of\n        // the previous particle's cell\n\n        if (index == 0 || hash != sharedHash[threadIdx.x])\n        {\n            cellStart[hash] = index;\n\n            if (index > 0)\n                cellEnd[sharedHash[threadIdx.x]] = index;\n        }\n\n        if (index == numParticles - 1)\n        {\n            cellEnd[hash] = index + 1;\n        }\n\n        // Now use the sorted index to reorder the pos and vel data\n        uint sortedIndex = gridParticleIndex[index];\n        float4 pos = FETCH(oldPos, sortedIndex);       // macro does either global read or texture fetch\n        float w = FETCH(invMass, sortedIndex);       // macro does either global read or texture fetch\n        int phase = FETCH(oldPhase, sortedIndex);       // macro does either global read or texture fetch\n\n        sortedPos[index] = pos;\n        sortedW[index] = w;\n        sortedPhase[index] = phase;\n    }\n\n\n}\n\n\n// collide a particle against all other particles in a given cell\n__device__\nvoid collideCell(int3    gridPos,\n                 uint    index,\n                 float3  pos,\n                 int     phase,\n                 float4 *oldPos,\n                 uint   *cellStart,\n                 uint   *cellEnd,\n                 uint   *neighbors,\n                 uint   *numNeighbors)\n{\n    uint gridHash = calcGridHash(gridPos);\n\n    // get start of bucket for this cell\n    uint startIndex = FETCH(cellStart, gridHash);\n\n    float collideDist = params.particleRadius * 2.001f; // slightly bigger radius\n    float collideDist2 = collideDist * collideDist;\n\n//    float3 delta = make_float3(0.0f);\n\n    if (startIndex != 0xffffffff)          // cell is not empty\n    {\n        // iterate over particles in this cell\n        uint endIndex = FETCH(cellEnd, gridHash);\n\n        for (uint j=startIndex; j<endIndex; j++)\n        {\n            if (j != index)                // check not colliding with self\n            {\n                float3 pos2 = make_float3(FETCH(oldPos, j));\n                int phase2 = FETCH(oldPhase, j);\n\n                if (phase > SOLID && phase == phase2)\n                    continue;\n\n                // collide two spheres\n                float3 diff = pos - pos2;\n\n                float mag2 = dot(diff, diff);\n\n                if (mag2 < collideDist2 && numNeighbors[index] < MAX_FLUID_NEIGHBORS)\n                {\n                    // neighbor stuff\n                    neighbors[index * MAX_FLUID_NEIGHBORS + numNeighbors[index]] = j;\n                    numNeighbors[index] += 1;\n\n//                    delta += diff * (sqrt(mag2) - collideDist) * -.5f;\n                }\n            }\n        }\n    }\n}\n\n\n__global__\nvoid collideD(float4 *newPos,               // output: new pos\n              float4 *prevPositions,\n              float4 *sortedPos,               // input: sorted positions\n              float  *sortedW,\n              int    *sortedPhase,\n              uint   *gridParticleIndex,    // input: sorted particle indices\n              uint   *cellStart,\n              uint   *cellEnd,\n              uint    numParticles,\n              uint   *neighbors,\n              uint   *numNeighbors)\n{\n    uint index = __mul24(blockIdx.x,blockDim.x) + threadIdx.x;\n\n    if (index >= numParticles) return;\n\n    int phase = FETCH(oldPhase, index);\n    if (phase < CLOTH) return;\n\n    // read particle data from sorted arrays\n    float3 pos = make_float3(FETCH(oldPos, index));\n\n    // get address in grid\n    int3 gridPos = calcGridPos(pos);\n\n    // examine neighbouring cells\n    float3 delta = make_float3(0.f);\n\n    numNeighbors[index] = 0;\n    for (int z=-1; z<=1; z++)\n    {\n        for (int y=-1; y<=1; y++)\n        {\n            for (int x=-1; x<=1; x++)\n            {\n                int3 neighbourPos = gridPos + make_int3(x, y, z);\n                collideCell(neighbourPos, index, pos, phase, sortedPos, cellStart, cellEnd, neighbors, numNeighbors);\n            }\n        }\n    }\n\n    float collideDist = params.particleRadius * 2.001f;\n\n    float w = FETCH(invMass, index);\n    float sW = (w != 0.f ? (1.f / ((1.f / w) * exp(-pos.y))) : w);\n\n    uint originalIndex = gridParticleIndex[index];\n//    float3 currPos = make_float3(newPos[originalIndex]);\n    float3 prevPos = make_float3(prevPositions[originalIndex]);\n\n    for (uint i = 0; i < numNeighbors[index]; i++)\n    {\n        float3 pos2 =  make_float3(FETCH(oldPos, neighbors[index * MAX_FLUID_NEIGHBORS + i]));\n        float w2 =  FETCH(invMass, neighbors[index * MAX_FLUID_NEIGHBORS + i]);\n        int phase2 =  FETCH(oldPhase, neighbors[index * MAX_FLUID_NEIGHBORS + i]);\n\n        float3 diff = pos - pos2;\n        float dist = length(diff);\n        float mag = dist - collideDist;\n\n        float colW = w;\n        float colW2 = w2;\n\n        if (phase >= SOLID && phase2 >= SOLID)\n        {\n            colW = sW;\n            colW2 = (w2 != 0.f ? (1.f / ((1.f / w2) * exp(-pos.y))) : w2);\n        }\n\n//        colWsum = colW + colW1);\n        float scale = mag / (colW + colW2);\n        float3 dp = diff * (scale / dist);\n        float3 dp1 = -colW * dp / numNeighbors[index];\n        float3 dp2 = colW2 * dp / numNeighbors[index];\n\n        delta += dp1;\n\n\n\n        ////////////////////// friction //////////////////\n        if (phase < SOLID || phase2 < SOLID)\n            continue;\n\n        uint neighborIndex = gridParticleIndex[neighbors[index * MAX_FLUID_NEIGHBORS + i]];\n        float3 prevPos2 = make_float3(prevPositions[neighborIndex]);\n//        float3 currPos2 = make_float3(newPos[neighbors[index * MAX_FLUID_NEIGHBORS + i]]);\n\n        float3 nf = normalize(diff);\n        float3 dpRel = (pos + dp1 - prevPos) - (prevPos + dp2 - prevPos2);\n        float3 dpt = dpRel - dot(dpRel, nf) * nf;\n        float ldpt = length(dpt);\n\n        if (ldpt < EPS)\n            continue;\n\n        if (ldpt < (S_FRICTION) * dist)\n            delta -= dpt * colW / (colW + colW2);\n        else\n            delta -= dpt * min((K_FRICTION) * dist / ldpt, 1.f);\n    }\n\n    // write new velocity back to original unsorted location\n    newPos[originalIndex] = make_float4(pos + delta, 1.0f);\n}\n\n\nstruct subtract_functor\n{\n    const float time;\n\n    subtract_functor(float _time) : time(_time) {}\n\n    __device__\n    float4 operator()(const float4& orig, const float4& solved) const {\n        return (solved - orig) / -time;\n    }\n};\n\n\n\n\n// collide a particle against all other particles in a given cell\n__device__\nvoid collideCellRadius(int3    gridPos,\n                         uint    index,\n                         float3  pos,\n                         uint   *cellStart,\n                         uint   *cellEnd,\n                         uint   *neighbors,\n                         uint   *numNeighbors)\n{\n    uint gridHash = calcGridHash(gridPos);\n\n    // get start of bucket for this cell\n    uint startIndex = FETCH(cellStart, gridHash);\n\n    if (startIndex != 0xffffffff)          // cell is not empty\n    {\n        // iterate over particles in this cell\n        uint endIndex = FETCH(cellEnd, gridHash);\n\n        for (uint j=startIndex; j<endIndex; j++)\n        {\n            if (j != index)                // check not colliding with self\n            {\n                float3 pos2 = make_float3(FETCH(oldPos, j));\n\n                float3 relPos = pos - pos2;\n                float dist2 = dot(relPos, relPos);\n                if (dist2 < H2 && numNeighbors[index] < MAX_FLUID_NEIGHBORS)\n                {\n                    // neighbor stuff\n                    neighbors[index * MAX_FLUID_NEIGHBORS + numNeighbors[index]] = j;\n                    numNeighbors[index] += 1;\n                }\n            }\n        }\n    }\n\n}\n\n\n__global__\nvoid findLambdasD(float  *lambda,               // input: sorted positions\n                  uint   *gridParticleIndex,    // input: sorted particle indices\n                  uint   *cellStart,\n                  uint   *cellEnd,\n                  uint    numParticles,\n                  uint   *neighbors,\n                  uint   *numNeighbors,\n                  float  *ros)\n{\n    uint index = __mul24(blockIdx.x,blockDim.x) + threadIdx.x;\n\n    if (index >= numParticles) return;\n\n    int phase = FETCH(oldPhase, index);\n    if (phase != FLUID) return;\n\n    // read particle data from sorted arrays\n    float3 pos = make_float3(FETCH(oldPos, index));\n\n    // get address in grid\n    int3 gridPos = calcGridPos(pos);\n\n    // examine neighbouring cells\n\n    int rad = (int)ceil(H / params.cellSize.x);\n\n    numNeighbors[index] = 0;\n    for (int z=-rad; z<=rad; z++)\n    {\n        for (int y=-rad; y<=rad; y++)\n        {\n            for (int x=-rad; x<=rad; x++)\n            {\n                int3 neighbourPos = gridPos + make_int3(x, y, z);\n                collideCellRadius(neighbourPos, index, pos, cellStart, cellEnd, neighbors, numNeighbors);\n            }\n        }\n    }\n\n    float w = FETCH(invMass, index);\n    float ro = 0.f;\n    float denom = 0.f;\n    float3 grad = make_float3(0.f);\n    for (uint i = 0; i < numNeighbors[index]; i++)\n    {\n        uint ni = neighbors[index * MAX_FLUID_NEIGHBORS + i];\n        float3 pos2 =  make_float3(FETCH(oldPos, ni));\n//        float w2 = FETCH(invMass, ni);\n        float3 r = pos - pos2;\n        float rlen2 = dot(r, r);\n        float rlen = sqrt(rlen2);\n        float hMinus2 = H2 - rlen2;\n        float hMinus = H - rlen;\n\n        // do fluid solid scaling hurr\n        ro += (POLY6_COEFF * hMinus2*hMinus2*hMinus2 ) / w;\n\n        float3 spikeyGrad;\n        if (rlen < 0.0001f)\n            spikeyGrad = make_float3(0.f); // randomize a little\n        else\n            spikeyGrad = (r / rlen) * -SPIKEY_COEFF * hMinus*hMinus;\n        spikeyGrad /= ros[gridParticleIndex[index]];\n\n        grad += -spikeyGrad;\n        denom += dot(spikeyGrad, spikeyGrad);\n    }\n    ro += (POLY6_COEFF * H6 ) / w;\n    denom += dot(grad, grad);\n\n    lambda[index] = - ((ro / ros[gridParticleIndex[index]]) - 1) / (denom + FLUID_RELAXATION);\n}\n\n\n__global__\nvoid solveFluidsD(float  *lambda,              // input: sorted positions\n                  uint   *gridParticleIndex,    // input: sorted particle indices\n                  float4 *particles,\n                  uint    numParticles,\n                  uint   *neighbors,\n                  uint   *numNeighbors,\n                  float  *ros)\n{\n    uint index = __mul24(blockIdx.x,blockDim.x) + threadIdx.x;\n\n    if (index >= numParticles) return;\n\n    int phase = FETCH(oldPhase, index);\n    if (phase != FLUID) return;\n\n    float4 pos = FETCH(oldPos, index);\n\n    float4 delta = make_float4(0.f);\n    for (uint i = 0; i < numNeighbors[index]; i++)\n    {\n        float4 pos2 =  FETCH(oldPos, neighbors[index * MAX_FLUID_NEIGHBORS + i]);\n        float4 r = pos - pos2;\n        float rlen2 = dot(r, r);\n        float rlen = sqrt(rlen2);\n        float hMinus2 = H2 - rlen2;\n        float hMinus = H - rlen;\n\n        float4 spikeyGrad;\n        if (rlen < 0.0001f)\n            spikeyGrad = make_float4(0,EPS,0,0) * -SPIKEY_COEFF * hMinus*hMinus;\n        else\n            spikeyGrad = (r / rlen) * -SPIKEY_COEFF * hMinus*hMinus;\n\n        float term2 = H2 - (DQ_P * DQ_P * H2);\n\n        float numer = (POLY6_COEFF * hMinus2*hMinus2*hMinus2 ) ;\n        float denom = (POLY6_COEFF * term2*term2*term2 );\n        float lambdaCorr = -K_P * pow(numer / denom, E_P);\n\n        delta += (lambda[index] + lambda[neighbors[index * MAX_FLUID_NEIGHBORS + i]] + lambdaCorr) * spikeyGrad;\n    }\n\n    uint origIndex = gridParticleIndex[index];\n    particles[origIndex] += delta / (ros[gridParticleIndex[index]] + numNeighbors[index]);\n\n}\n\n#endif // INTEGRATION_KERNEL_H\n\n"
  },
  {
    "path": "gpu/src/cuda/kernel.cuh",
    "content": "#ifndef PARTICLES_KERNEL_H\n#define PARTICLES_KERNEL_H\n\n#define FETCH(t, i) tex1Dfetch(t##Tex, i)\n\n#include \"vector_types.h\"\n\n// simulation parameters\nstruct SimParams\n{\n    float3 gravity;\n    float globalDamping;\n    float particleRadius;\n\n    uint3 gridSize;\n    unsigned int numCells;\n    float3 worldOrigin;\n    float3 cellSize;\n\n    unsigned int numBodies;\n    unsigned int maxParticlesPerCell;\n};\n\n#endif //PARTICLES_KERNEL_H\n"
  },
  {
    "path": "gpu/src/cuda/kernel_impl.cuh",
    "content": "#ifndef PARTICLES_KERNEL_IMPL_H\n#define PARTICLES_KERNEL_IMPL_H\n\n#include <stdio.h>\n#include <math.h>\n#include \"helper_math.h\"\n#include \"math_constants.h\"\n#include \"kernel.cuh\"\n#include \"cusp/ell_matrix.h\"\n\n// textures for particle position and velocity\ntexture<float4, 1, cudaReadModeElementType> oldPosTex;\ntexture<float4, 1, cudaReadModeElementType> oldVelTex;\n\ntexture<uint, 1, cudaReadModeElementType> gridParticleHashTex;\ntexture<uint, 1, cudaReadModeElementType> cellStartTex;\ntexture<uint, 1, cudaReadModeElementType> cellEndTex;\n\n// simulation parameters in constant memory\n__constant__ SimParams params;\n\nstruct integrate_functor\n{\n    float deltaTime;\n\n    __host__ __device__\n    integrate_functor(float delta_time) : deltaTime(delta_time) {}\n\n    template <typename Tuple>\n    __device__\n    void operator()(Tuple t)\n    {\n        volatile float4 posData = thrust::get<0>(t);\n        volatile float4 velData = thrust::get<1>(t);\n        float3 pos = make_float3(posData.x, posData.y, posData.z);\n        float3 vel = make_float3(velData.x, velData.y, velData.z);\n\n        vel += params.gravity * deltaTime;\n        vel *= params.globalDamping;\n\n        // new position = old position + velocity * deltaTime\n        pos += vel * deltaTime;\n\n        // set this to zero to disable collisions with cube sides\n#if 0\n\n        if (pos.x > 29.0f - params.particleRadius)\n        {\n            pos.x = 29.0f - params.particleRadius;\n            vel.x *= params.boundaryDamping;\n        }\n\n        if (pos.x < -29.0f + params.particleRadius)\n        {\n            pos.x = -29.0f + params.particleRadius;\n            vel.x *= params.boundaryDamping;\n        }\n\n        if (pos.y > 205.0f - params.particleRadius)\n        {\n            pos.y = 205.0f - params.particleRadius;\n            vel.y *= params.boundaryDamping;\n        }\n\n//        if (pos.z > 10.0f - params.particleRadius)\n//        {\n//            pos.z = 10.0f - params.particleRadius;\n//            vel.z *= params.boundaryDamping;\n//        }\n\n//        if (pos.z < -10.0f + params.particleRadius)\n//        {\n//            pos.z = -10.0f + params.particleRadius;\n//            vel.z *= params.boundaryDamping;\n//        }\n\n#endif\n\n        if (pos.y < -1.0f + params.particleRadius)\n        {\n            pos.y = -1.0f + params.particleRadius;\n            vel.y *= params.boundaryDamping;\n        }\n\n        // store new position and velocity\n        thrust::get<0>(t) = make_float4(pos, posData.w);\n        thrust::get<1>(t) = make_float4(vel, velData.w);\n    }\n};\n\n\n// calculate position in uniform grid\n__device__ int3 calcGridPos(float3 p)\n{\n    int3 gridPos;\n    gridPos.x = floor((p.x/* - params.worldOrigin.x*/) / params.cellSize.x);\n    gridPos.y = floor((p.y/* - params.worldOrigin.y*/) / params.cellSize.y);\n    gridPos.z = floor((p.z/* - params.worldOrigin.z*/) / params.cellSize.z);\n    return gridPos;\n}\n\n// calculate address in grid from position (clamping to edges)\n__device__ uint calcGridHash(int3 gridPos)\n{\n    gridPos.x = gridPos.x & (params.gridSize.x-1);  // wrap grid, assumes size is power of 2\n    gridPos.y = gridPos.y & (params.gridSize.y-1);\n    gridPos.z = gridPos.z & (params.gridSize.z-1);\n    return __umul24(__umul24(gridPos.z, params.gridSize.y), params.gridSize.x) + __umul24(gridPos.y, params.gridSize.x) + gridPos.x;\n}\n\n\n// calculate grid hash value for each particle\n__global__\nvoid calcHashD(uint   *gridParticleHash,  // output\n               uint   *gridParticleIndex, // output\n               float4 *pos,               // input: positions\n               uint    numParticles)\n{\n    uint index = __umul24(blockIdx.x, blockDim.x) + threadIdx.x;\n\n    if (index >= numParticles) return;\n\n    volatile float4 p = pos[index];\n\n    // get address in grid\n    int3 gridPos = calcGridPos(make_float3(p.x, p.y, p.z));\n    uint hash = calcGridHash(gridPos);\n\n    // store grid hash and particle index\n    gridParticleHash[index] = hash;\n    gridParticleIndex[index] = index;\n}\n\n// rearrange particle data into sorted order, and find the start of each cell\n// in the sorted hash array\n__global__\nvoid reorderDataAndFindCellStartD(uint   *cellStart,        // output: cell start index\n                                  uint   *cellEnd,          // output: cell end index\n                                  float4 *sortedPos,        // output: sorted positions\n                                  float4 *sortedVel,        // output: sorted velocities\n                                  uint   *gridParticleHash, // input: sorted grid hashes\n                                  uint   *gridParticleIndex,// input: sorted particle indices\n                                  float4 *oldPos,           // input: sorted position array\n                                  float4 *oldVel,           // input: sorted velocity array\n                                  uint    numParticles)\n{\n    extern __shared__ uint sharedHash[];    // blockSize + 1 elements\n    uint index = __umul24(blockIdx.x,blockDim.x) + threadIdx.x;\n\n    uint hash;\n\n    // handle case when no. of particles not multiple of block size\n    if (index < numParticles)\n    {\n        hash = gridParticleHash[index];\n\n        // Load hash data into shared memory so that we can look\n        // at neighboring particle's hash value without loading\n        // two hash values per thread\n        sharedHash[threadIdx.x+1] = hash;\n\n        if (index > 0 && threadIdx.x == 0)\n        {\n            // first thread in block must load neighbor particle hash\n            sharedHash[0] = gridParticleHash[index-1];\n        }\n    }\n\n    __syncthreads();\n\n    if (index < numParticles)\n    {\n        // If this particle has a different cell index to the previous\n        // particle then it must be the first particle in the cell,\n        // so store the index of this particle in the cell.\n        // As it isn't the first particle, it must also be the cell end of\n        // the previous particle's cell\n\n        if (index == 0 || hash != sharedHash[threadIdx.x])\n        {\n            cellStart[hash] = index;\n\n            if (index > 0)\n                cellEnd[sharedHash[threadIdx.x]] = index;\n        }\n\n        if (index == numParticles - 1)\n        {\n            cellEnd[hash] = index + 1;\n        }\n\n        // Now use the sorted index to reorder the pos and vel data\n        uint sortedIndex = gridParticleIndex[index];\n        float4 pos = FETCH(oldPos, sortedIndex);       // macro does either global read or texture fetch\n        float4 vel = FETCH(oldVel, sortedIndex);       // see particles_kernel.cuh\n\n        sortedPos[index] = pos;\n        sortedVel[index] = vel;\n    }\n}\n\n// collide two spheres using DEM method\n__device__\nfloat3 collideSpheres(float3 posA, float3 posB,\n                      float3 velA, float3 velB,\n                      float radiusA, float radiusB,\n                      float attraction)\n{\n    // calculate relative position\n    float3 relPos = posB - posA;\n\n    // 2D\n    relPos.z = 0.f;\n\n    float dist = length(relPos);\n    float collideDist = radiusA + radiusB;\n\n    float3 force = make_float3(0.0f);\n\n    if (dist < collideDist)\n    {\n        float3 norm = relPos / dist;\n\n        // relative velocity\n        float3 relVel = velB - velA;\n\n        // relative tangential velocity\n        float3 tanVel = relVel - (dot(relVel, norm) * norm);\n\n        // spring force\n        force = -params.spring*(collideDist - dist) * norm;\n        // dashpot (damping) force\n        force += params.damping*relVel;\n        // tangential shear force\n//        force += params.shear*tanVel;\n        // attraction\n        force += attraction*relPos;\n\n        // make 2D\n        force.z = 0.0f;\n    }\n\n    return force;\n}\n\n\n\n// collide a particle against all other particles in a given cell\n__device__\nfloat3 collideCell(int3    gridPos,\n                   uint    index,\n                   float3  pos,\n                   float3  vel,\n                   float4 *oldPos,\n                   float4 *oldVel,\n                   uint   *cellStart,\n                   uint   *cellEnd)\n{\n    uint gridHash = calcGridHash(gridPos);\n\n    // get start of bucket for this cell\n    uint startIndex = FETCH(cellStart, gridHash);\n\n    float3 force = make_float3(0.0f);\n\n    if (startIndex != 0xffffffff)          // cell is not empty\n    {\n        // iterate over particles in this cell\n        uint endIndex = FETCH(cellEnd, gridHash);\n\n        for (uint j=startIndex; j<endIndex; j++)\n        {\n            if (j != index)                // check not colliding with self\n            {\n                float3 pos2 = make_float3(FETCH(oldPos, j));\n                float3 vel2 = make_float3(FETCH(oldVel, j));\n\n                // collide two spheres\n                force += collideSpheres(pos, pos2, vel, vel2, params.particleRadius, params.particleRadius, params.attraction);\n            }\n        }\n    }\n\n    return force;\n}\n\n\n__global__\nvoid collideD(float4 *newVel,               // output: new velocity\n              float4 *oldPos,               // input: sorted positions\n              float4 *oldVel,               // input: sorted velocities\n              uint   *gridParticleIndex,    // input: sorted particle indices\n              uint   *cellStart,\n              uint   *cellEnd,\n              uint    numParticles)\n{\n    uint index = __mul24(blockIdx.x,blockDim.x) + threadIdx.x;\n\n    if (index >= numParticles) return;\n\n    // read particle data from sorted arrays\n    float3 pos = make_float3(FETCH(oldPos, index));\n    float3 vel = make_float3(FETCH(oldVel, index));\n\n    // get address in grid\n    int3 gridPos = calcGridPos(pos);\n\n    // examine neighbouring cells\n    float3 force = make_float3(0.0f);\n\n    for (int z=-1; z<=1; z++)\n    {\n        for (int y=-1; y<=1; y++)\n        {\n            for (int x=-1; x<=1; x++)\n            {\n                int3 neighbourPos = gridPos + make_int3(x, y, z);\n                force += collideCell(neighbourPos, index, pos, vel, oldPos, oldVel, cellStart, cellEnd);\n            }\n        }\n    }\n\n    // collide with cursor sphere\n//    force += collideSpheres(pos, params.colliderPos, vel, make_float3(0.0f, 0.0f, 0.0f), params.particleRadius, params.colliderRadius, 0.0f);\n\n    // write new velocity back to original unsorted location\n    uint originalIndex = gridParticleIndex[index];\n    newVel[originalIndex] = make_float4(vel + force, 0.0f);\n}\n\nstruct point_constraint_functor\n{\n    float4 *particles;\n\n    __host__ __device__\n    point_constraint_functor(float4 *particles_) : particles(particles_) {}\n\n    template <typename Tuple>\n    __device__\n    void operator()(Tuple t)\n    {\n        particles[thrust::get<0>(t)] = thrust::get<1>(t);\n    }\n};\n\nstruct delta_computing_functor\n{\n    float4 *particles;\n\n    __host__ __device__\n    delta_computing_functor(float4 *particles_) : particles(particles_) {}\n\n    template <typename Tuple>\n    __device__\n    void operator()(Tuple t)\n    {\n        float4 p1 = particles[thrust::get<0>(t)];\n        float4 p2 = particles[thrust::get<1>(t)];\n\n        float4 relPos = p1 - p2;\n\n        // 2D\n        relPos.z = 0.f;\n\n        float dist = length(relPos);\n        if (dist > 0.0001f)\n        {\n            float4 grad = relPos / dist;\n            float mag = (thrust::get<2>(t) - dist) * .25f;\n            float4 delta = grad * mag;\n            thrust::get<3>(t) = delta;\n            thrust::get<4>(t) = -delta;\n        }\n        else\n        {\n            thrust::get<3>(t) = make_float4(0);\n            thrust::get<4>(t) = make_float4(0);\n        }\n    }\n};\n\nstruct gradient_functor\n{\n    float4 *particles;\n    float *val;\n    float *JT;\n    uint numParticles;\n    uint numConstraints;\n\n    __host__ __device__\n    gradient_functor(float4 *particles_, float *val_, float *JT_, uint numParticles_, uint numConstraints_)\n        : particles(particles_), val(val_), JT(JT_), numParticles(numParticles_), numConstraints(numConstraints_) {}\n\n    template <typename Tuple>\n    __device__\n    void operator()(Tuple t)\n    {\n        uint constraintIndex = thrust::get<0>(t);\n        uint p1i = thrust::get<1>(t);\n        uint p2i = thrust::get<2>(t);\n        float4 p14 = particles[p1i];\n        float4 p24 = particles[p2i];\n        float3 p1 = make_float3(p14.x, p14.y, p14.z);\n        float3 p2 = make_float3(p24.x, p24.y, p24.z);\n\n        float3 relPos = p1 - p2;\n\n        // 2D\n        relPos.z = 0.f;\n\n        float dist = length(relPos);\n\n        if (dist > 0.0001f)\n        {\n            float3 grad = relPos / dist;\n\n            // set sparse matrix values for J\n            if (p1i < p2i)\n            {\n                val[constraintIndex * 4] = grad.x;\n                val[constraintIndex*4+1] = grad.y;\n                val[constraintIndex*4+2] = -grad.x;\n                val[constraintIndex*4+3] = -grad.y;\n            }\n            else\n            {\n                val[constraintIndex * 4] = -grad.x;\n                val[constraintIndex*4+1] = -grad.y;\n                val[constraintIndex*4+2] = grad.x;\n                val[constraintIndex*4+3] = grad.y;\n            }\n\n            // set dense matrix values for JT\n            uint col = constraintIndex * numParticles * 2;\n            JT[col + p1i * 2] = grad.x;\n            JT[col + p1i*2+1] = grad.y;\n            JT[col + p2i * 2] = -grad.x;\n            JT[col + p2i*2+1] = -grad.y;\n        }\n        else\n        {\n            // reset to zero if gradient can't be computed\n\n            // sparse J\n            val[constraintIndex * 4] = 0.f;\n            val[constraintIndex*4+1] = 0.f;\n            val[constraintIndex*4+2] = 0.f;\n            val[constraintIndex*4+3] = 0.f;\n\n            // dense JT\n            uint col = constraintIndex * numParticles * 2;\n            JT[col + p1i * 2] = 0.f;\n            JT[col + p1i*2+1] = 0.f;\n            JT[col + p2i * 2] = 0.f;\n            JT[col + p2i*2+1] = 0.f;\n        }\n\n        // negative distance for vec b\n        thrust::get<4>(t) = (thrust::get<3>(t) - dist);\n    }\n};\n\nstruct distance_constraint_functor\n{\n    float4 *particles;\n\n    __host__ __device__\n    distance_constraint_functor(float4 *particles_) : particles(particles_) {}\n\n    template <typename Tuple>\n    __device__\n    void operator()(Tuple t)\n    {\n        particles[thrust::get<0>(t)] += thrust::get<1>(t);\n    }\n};\n\nstruct subtract_functor\n{\n    const float time;\n\n    subtract_functor(float _time) : time(_time) {}\n\n    __device__\n    float4 operator()(const float4& orig, const float4& solved) const {\n        return (solved - orig) / time;\n    }\n};\n\nstruct identity_functor\n{\n    const uint w;\n\n    identity_functor(uint _w) : w(_w) {}\n\n    __device__\n    float operator()(const uint& x) const\n    {\n        if (x / w == x % w)\n            return 1;\n        return 0;\n    }\n};\n\nstruct diag_extraction_functor\n{\n    float *A;\n    uint width;\n\n    diag_extraction_functor(float *_A, uint _width)\n        : A(_A), width(_width) {}\n\n    template <typename Tuple>\n    __device__\n    void operator()(Tuple t)\n    {\n        uint index = thrust::get<0>(t);\n        index = index * width + index;\n        float elmt = A[index];\n        thrust::get<1>(t) = (abs(elmt) < 0.0001f ? 0.f : 1.f / elmt);\n        A[index] = 0.f;\n    }\n};\n\nstruct col_reduction\n{\n    float4 *particles;\n    float *b;\n    float *J;\n    const uint rowsJ;\n    const uint colsJ;\n\n    __host__ __device__\n    col_reduction(float4 *_particles, float *_b, float *_J, const uint _rowsJ, const uint _colsJ)\n        : particles(_particles), b(_b), J(_J), rowsJ(_rowsJ), colsJ(_colsJ) {}\n\n\n    template <typename Tuple>\n    __device__\n    void operator()(Tuple t)\n    {\n        uint row = thrust::get<0>(t);\n        uint index = row*2;\n        float4 temp = make_float4(0.f);\n        for (uint i = 0; i < colsJ; i++)\n        {\n            temp.x += J[index] * b[i];\n            temp.y += J[index+1] * b[i];\n            index += rowsJ;\n        }\n\n        particles[row] += temp / (thrust::get<1>(t) * thrust::get<2>(t));\n    }\n};\n\n\n__global__\nvoid constraintCentricSolveD(float      *A,\n                             float      *B,\n                             float      *JT,\n                             float      *lambdas,\n                             float      *particles,\n                             uint       *indices,\n                             uint       *occurences,\n                             uint       numParticles,\n                             uint       numConstraints,\n                             float      minErr,\n                             uint       maxIter,\n                             float      omega)\n{\n    uint index = __umul24(blockIdx.x,blockDim.x) + threadIdx.x;\n\n    if (index < numConstraints)\n    {\n        int vars = numConstraints - 1;\n        float bi = B[index];\n\n        float err = 1.f;\n        int iter = 0;\n        float sum, lambda, old_lambda = 0.f;\n        uint row;\n\n        __syncthreads();\n        while ((err > minErr /*|| iter < 10*/) && iter < maxIter)\n        {\n            sum = bi;\n            row = index;\n            for (int i = 0; i < vars; i++)\n            {\n                if (i != index)\n                    sum -= lambdas[i] * A[row];\n                row += numConstraints;              // next column of matrix A (stored in column-major order)\n            }\n            lambda = sum / A[index * numConstraints + index]; // divide by corresponding diagonal coefficient\n            lambdas[index] = lambda;\n\n            err = lambda - old_lambda;\n            old_lambda = lambda;\n            iter++;\n        }\n\n        uint pi = indices[index];\n        atomicAdd(particles + pi * 4, omega * lambda * JT[index * numParticles * 2 + pi * 2] / occurences[pi]);\n        atomicAdd(particles + pi*4+1, omega * lambda * JT[index * numParticles * 2 + pi*2+1] / occurences[pi]);\n\n        pi = indices[index + numConstraints];\n        atomicAdd(particles + pi * 4, omega * lambda * JT[index * numParticles * 2 + pi * 2] / occurences[pi]);\n        atomicAdd(particles + pi*4+1, omega * lambda * JT[index * numParticles * 2 + pi*2+1] / occurences[pi]);\n    }\n\n    __syncthreads();\n}\n\nstruct rigid_body_functor\n{\n    float2 *rVecs;\n\n    __host__ __device__\n    rigid_body_functor(float2 *_rVecs) : rVecs(_rVecs) {}\n\n    template <typename Tuple>\n    __device__\n    void operator()(Tuple t)\n    {\n//        particles[thrust::get<0>(t)] = thrust::get<1>(t);\n    }\n};\n\n#endif // PARTICLES_KERNEL_IMPL_H\n\n"
  },
  {
    "path": "gpu/src/cuda/shared_variables.cu",
    "content": "\n\n#include \"thrust/device_vector.h\"\n#include \"helper_cuda.h\"\n#include \"cuda_runtime.h\"\n#include \"util.cuh\"\n\nthrust::device_vector<float> Xstar;\t// guess vectors\nthrust::device_vector<float> W;     // vector of inverse masses\nthrust::device_vector<int> phase;\n\n\n// textures\ntexture<float4, 1, cudaReadModeElementType> oldPosTex;\ntexture<float4, 1, cudaReadModeElementType> oldVelTex;\n\n\nextern \"C\"\n{\n\n\tvoid freeSharedVectors()\n\t{\n        Xstar.clear();\n        W.clear();\n        phase.clear();\n\n        Xstar.shrink_to_fit();\n        W.shrink_to_fit();\n        phase.shrink_to_fit();\n\t}\n\n    void appendPhaseAndMass(int *fase, float *w, uint numParticles)\n    {\n        int sizeW = W.size();\n\n        // resize the vectors\n        phase.resize(sizeW + numParticles);\n        W.resize(sizeW + numParticles);\n\n        // get raw pointers to the data\n        int *dPhase = thrust::raw_pointer_cast(phase.data());\n        float *dW = thrust::raw_pointer_cast(W.data());\n\n        // copy the new data to the gpu\n        copyArrayToDevice(dPhase + sizeW, fase, 0, numParticles * sizeof(int));\n        copyArrayToDevice(dW + sizeW, w, 0, numParticles * sizeof(float));\n\n        // resize but don't neet to fill\n        Xstar.resize(4 * W.size());\n    }\n\n\tvoid copyToXstar(float *pos, uint numParticles)\n\t{\n        // copy X to X*\n        float *dXstar = thrust::raw_pointer_cast(Xstar.data());\n        checkCudaErrors(cudaMemcpy((void*)dXstar, (void*)pos, numParticles*4*sizeof(float), cudaMemcpyDeviceToDevice));\n    }\n\n    int *getPhaseRawPtr()\n    {\n        return thrust::raw_pointer_cast(phase.data());\n    }\n\n    float *getXstarRawPtr()\n    {\n        return thrust::raw_pointer_cast(Xstar.data());\n    }\n\n    float *getWRawPtr()\n    {\n        return thrust::raw_pointer_cast(W.data());\n    }\n\n    void printXstar()\n    {\n        printf(\"Xstar: size: %u\\n\", (uint)Xstar.size());\n        thrust::device_ptr<float> d_Xstar(Xstar.data());\n        uint index;\n        for (uint i = 0; i < Xstar.size(); i++)\n        {\n            index = i * 4;\n            printf(\"i: %u: %.2f, %.2f, %.2f\\n\", i, (float)*(d_Xstar + index + 0), (float)*(d_Xstar + index + 1), (float)*(d_Xstar + index + 2));\n        }\n        printf(\"\\n\");\n    }\n\n}\n"
  },
  {
    "path": "gpu/src/cuda/shared_variables.cuh",
    "content": "#ifndef DEVICE_VARIABLES_H\n#define DEVICE_VARIABLES_H\n\n#define NO_COLLIDE -1\n#define FLUID 0\n#define GAS 1\n#define CLOTH 2\n#define SOLID 3\n#define RIGID 4\n\n#include \"thrust/device_vector.h\"\n\nextern \"C\"\n{\n\tvoid freeSharedVectors();\n\n    void appendPhaseAndMass(int *fase, float *w, uint numParticles);\n\n\tvoid copyToXstar(float *pos, uint numParticles);\n\t\n\tint *getPhaseRawPtr();\n\n    float *getXstarRawPtr();\n\n    float *getWRawPtr();\n\n    void printXstar();\n    \n    // void bindOldPos();\n       \n    // void bindOldVel();\n\n    // void unbindOldPos();\n       \n    // void unbindOldVel();\n}\n\n\n#endif // DEVICE_VARIABLES_H\n"
  },
  {
    "path": "gpu/src/cuda/solver.cu",
    "content": "\n//#define PRINT\n\n\n#include <cuda_runtime.h>\n#include <cuda_gl_interop.h>\n\n#include <thrust/device_ptr.h>\n#include <thrust/device_vector.h>\n#include <thrust/for_each.h>\n#include <thrust/iterator/zip_iterator.h>\n#include <thrust/sort.h>\n#include <thrust/reduce.h>\n#include <thrust/transform.h>\n\n#include <stdio.h>\n\n\n//#include <cublas_v2.h>\n//#include <cusparse.h>\n\n#include \"helper_cuda.h\"\n#include \"solver_kernel.cuh\"\n#include \"util.cuh\"\n#include \"shared_variables.cuh\"\n\n\n//cublasHandle_t cublasHandle;\n//cusparseHandle_t cusparseHandle;\n//cusparseMatDescr_t matDescr;\n\nthrust::device_vector<uint> distsI;\nthrust::device_vector<float> dists;\n\nthrust::device_vector<uint> pointsI;\nthrust::device_vector<float> points;\n\nthrust::device_vector<uint> sortedI;\nthrust::device_vector<float> deltas;\n\nthrust::device_vector<uint> occurences;     // number of constraints affecting a particle\n\nextern \"C\"\n{\n\n//    void initHandles()\n//    {\n\n////        checkCudaErrors(cublasCreate(&cublasHandle));\n////        checkCudaErrors(cusparseCreate(&cusparseHandle));\n\n////        checkCudaErrors(cusparseCreateMatDescr(&matDescr));\n////        cusparseSetMatType(matDescr, CUSPARSE_MATRIX_TYPE_GENERAL);\n////        cusparseSetMatIndexBase(matDescr,CUSPARSE_INDEX_BASE_ZERO);\n\n//    }\n\n//    void destroyHandles()\n//    {\n////        checkCudaErrors(cublasDestroy(cublasHandle));\n////        checkCudaErrors(cusparseDestroy(cusparseHandle));\n//    }\n\n    void appendSolverParticle(uint numParticles)\n    {\n        uint sizeO = occurences.size();\n        occurences.resize(sizeO + numParticles);\n        uint *dOcc = thrust::raw_pointer_cast(occurences.data());\n        checkCudaErrors(cudaMemset(dOcc + sizeO, 0, numParticles * sizeof(uint)));\n    }\n\n    void updateOccurences(uint *index, uint num)\n    {\n        thrust::device_vector<uint> dvIndex(index, index + num);\n        thrust::device_vector<uint> dvSorted(num);\n        thrust::device_vector<uint> dvOnes(num, 1);\n\n        thrust::device_ptr<uint> d_Index(dvIndex.data());\n        thrust::device_ptr<uint> d_Ones(dvOnes.data());\n        thrust::device_ptr<uint> d_Sorted(dvSorted.data());\n\n        thrust::sort(dvIndex.begin(), dvIndex.end());\n\n//        printf(\"sorted: %u\\n\", dvIndex.size());\n//        for (uint i = 0; i < dvIndex.size(); i++)\n//        {\n//            printf(\"%u\\n\", (uint)*(d_Index + i));\n//        }\n\n        thrust::pair<thrust::device_ptr<uint>,thrust::device_ptr<uint> > new_end;\n        new_end = thrust::reduce_by_key(d_Index, d_Index + num, d_Ones, d_Sorted, d_Ones);\n\n//        printf(\"reduced: %u\\n\", dvIndex.size());\n//        for (uint i = 0; i < dvIndex.size(); i++)\n//        {\n//            printf(\"%u\\n\", (uint)*(d_Index + i));\n//        }\n\n\n        uint *dOcc = thrust::raw_pointer_cast(occurences.data());\n\n        thrust::for_each(\n            thrust::make_zip_iterator(thrust::make_tuple(d_Sorted, d_Ones)),\n            thrust::make_zip_iterator(thrust::make_tuple(new_end.first, new_end.second)),\n            occurence_functor(dOcc));\n    }\n\n    void addPointConstraint(uint *index, float *point, uint numConstraints)\n    {\n        uint sizeP = points.size();\n        uint sizeI = pointsI.size();\n\n        points.resize(sizeP + 3 * numConstraints);\n        pointsI.resize(sizeI + numConstraints);\n\n        float *dPoints = thrust::raw_pointer_cast(points.data());\n        uint *dPointsI = thrust::raw_pointer_cast(pointsI.data());\n\n        copyArrayToDevice(dPoints + sizeP, point, 0, 3 * numConstraints * sizeof(float));\n        copyArrayToDevice(dPointsI + sizeI, index, 0, numConstraints * sizeof(uint));\n\n        updateOccurences(index, numConstraints);\n    }\n\n    void addDistanceConstraint(uint *index, float *distance, uint numConstraints)\n    {\n        uint sizeD = dists.size();\n        uint sizeI = distsI.size();\n\n        dists.resize(sizeD + numConstraints);\n        distsI.resize(sizeI + 2 * numConstraints);\n\n        float *dDists = thrust::raw_pointer_cast(dists.data());\n        uint *dDistsI = thrust::raw_pointer_cast(distsI.data());\n\n        copyArrayToDevice(dDists + sizeD, distance, 0, numConstraints * sizeof(float));\n        copyArrayToDevice(dDistsI + sizeI, index, 0, 2 * numConstraints * sizeof(uint));\n\n//        thrust::device_ptr<uint> dOcc(occurences.data());\n//        printf(\"before: \\n\");\n//        for (uint i = 0; i < occurences.size(); i++)\n//        {\n//            printf(\"%u\\n\", (uint)*(dOcc + i));\n//        }\n\n        sortedI.resize(distsI.size());\n        deltas.resize(8 * dists.size());\n\n        updateOccurences(index, 2 * numConstraints);\n\n//        printf(\"after: \\n\");\n//        for (uint i = 0; i < occurences.size(); i++)\n//        {\n//            printf(\"%u\\n\", (uint)*(dOcc + i));\n//        }\n    }\n\n    void freeSolverVectors()\n    {\n        // set size to zero\n        distsI.clear();\n        dists.clear();\n        pointsI.clear();\n        points.clear();\n        sortedI.clear();\n        deltas.clear();\n        occurences.clear();\n\n        // free memory\n        distsI.shrink_to_fit();\n        dists.shrink_to_fit();\n        pointsI.shrink_to_fit();\n        points.shrink_to_fit();\n        sortedI.shrink_to_fit();\n        deltas.shrink_to_fit();\n        occurences.shrink_to_fit();\n\n    }\n\n    void solvePointConstraints(float *particles)\n    {\n        uint numConstraints = pointsI.size();\n\n        if (numConstraints == 0)\n            return;\n\n        thrust::device_ptr<uint> d_indices(pointsI.data());\n        thrust::device_ptr<float3> d_points((float3*) thrust::raw_pointer_cast(points.data()));\n\n        thrust::for_each(\n            thrust::make_zip_iterator(thrust::make_tuple(d_indices, d_points)),\n            thrust::make_zip_iterator(thrust::make_tuple(d_indices+numConstraints, d_points+numConstraints)),\n            point_constraint_functor((float4 *)particles));\n    }\n\n    void solveDistanceConstraints(float *particles)\n    {\n        uint numConstraints = dists.size();\n\n        if (numConstraints == 0)\n            return;\n\n        thrust::device_ptr<float4> d_pos4((float4*)particles);\n\n        thrust::device_ptr<uint2> d_indices((uint2*)thrust::raw_pointer_cast(distsI.data()));\n        thrust::device_ptr<float> d_dists(dists.data());\n        thrust::device_ptr<uint> d_sortedI1(sortedI.data());\n        thrust::device_ptr<uint> d_sortedI2 = d_sortedI1 + numConstraints;\n        thrust::device_ptr<float4> d_deltas1((float4*) thrust::raw_pointer_cast(deltas.data()));\n        thrust::device_ptr<float4> d_deltas2 = d_deltas1 + numConstraints;\n\n        thrust::for_each(\n                    thrust::make_zip_iterator(thrust::make_tuple(d_indices, d_dists, d_sortedI1, d_sortedI2, d_deltas1, d_deltas2)),\n                    thrust::make_zip_iterator(thrust::make_tuple(d_indices+numConstraints, d_dists+numConstraints,\n                                                                 d_sortedI1+numConstraints, d_sortedI2+numConstraints,\n                                                                 d_deltas1+numConstraints, d_deltas2+numConstraints)),\n            delta_computing_functor((float4 *)particles));\n\n        thrust::sort_by_key(sortedI.begin(), sortedI.end(), d_deltas1);\n\n        thrust::pair<thrust::device_ptr<uint>,thrust::device_ptr<float4> > new_end;\n        new_end = thrust::reduce_by_key(d_sortedI1, d_sortedI1+numConstraints*2, d_deltas1, d_sortedI1, d_deltas1);\n\n        uint size = new_end.first - d_sortedI1;\n        thrust::device_ptr<uint> d_occ(occurences.data());\n\n        thrust::for_each(\n            thrust::make_zip_iterator(thrust::make_tuple(d_pos4, d_deltas1, d_occ)),\n            thrust::make_zip_iterator(thrust::make_tuple(d_pos4+size, d_deltas1 + size, d_occ+size)),\n            distance_constraint_functor());\n    }\n\n}\n"
  },
  {
    "path": "gpu/src/cuda/solver_kernel.cuh",
    "content": "#ifndef SOLVER_KERNEL_H\n#define SOLVER_KERNEL_H\n\n#include <stdio.h>\n#include <math.h>\n#include \"helper_math.h\"\n#include \"math_constants.h\"\n#include \"thrust/tuple.h\"\n\nstruct point_constraint_functor\n{\n    float4 *particles;\n\n    __host__ __device__\n    point_constraint_functor(float4 *particles_) : particles(particles_) {}\n\n    template <typename Tuple>\n    __device__\n    void operator()(Tuple t)\n    {\n        uint index = thrust::get<0>(t);\n        float4 pos = particles[index];\n        particles[index] = make_float4(thrust::get<1>(t), pos.w);\n    }\n};\n\nstruct delta_computing_functor\n{\n    float4 *particles;\n\n    __host__ __device__\n    delta_computing_functor(float4 *particles_) : particles(particles_) {}\n\n    template <typename Tuple>\n    __device__\n    void operator()(Tuple t)\n    {\n        /*\n         * 0: index\n         * 1: dists\n         * 2: sortedI1\n         * 3: sortedI2\n         * 4: delta1\n         * 5: delta2\n         */\n        uint2 index = thrust::get<0>(t);\n        float4 p1 = particles[index.x];\n        float4 p2 = particles[index.y];\n\n        thrust::get<2>(t) = index.x;\n        thrust::get<3>(t) = index.y;\n\n        float4 relPos = p1 - p2;\n        relPos.w = 0.f; // inverse masses not needed\n\n        float dist = length(relPos);\n        if (dist > 0.0001f)\n        {\n            float4 grad = relPos / dist;\n            float mag = (thrust::get<1>(t) - dist) * .5f;\n            float4 delta = grad * mag;\n\n            thrust::get<4>(t) = delta;\n            thrust::get<5>(t) = -delta;\n        }\n        else\n        {\n            thrust::get<4>(t) = make_float4(0);\n            thrust::get<5>(t) = make_float4(0);\n        }\n    }\n};\n\nstruct gradient_functor\n{\n    float4 *particles;\n    float *val;\n    float *JT;\n    uint numParticles;\n    uint numConstraints;\n\n    __host__ __device__\n    gradient_functor(float4 *particles_, float *val_, float *JT_, uint numParticles_, uint numConstraints_)\n        : particles(particles_), val(val_), JT(JT_), numParticles(numParticles_), numConstraints(numConstraints_) {}\n\n    template <typename Tuple>\n    __device__\n    void operator()(Tuple t)\n    {\n        uint constraintIndex = thrust::get<0>(t);\n        uint p1i = thrust::get<1>(t);\n        uint p2i = thrust::get<2>(t);\n        float4 p14 = particles[p1i];\n        float4 p24 = particles[p2i];\n        float3 p1 = make_float3(p14.x, p14.y, p14.z);\n        float3 p2 = make_float3(p24.x, p24.y, p24.z);\n\n        float3 relPos = p1 - p2;\n\n        // 2D\n        relPos.z = 0.f;\n\n        float dist = length(relPos);\n\n        if (dist > 0.0001f)\n        {\n            float3 grad = relPos / dist;\n\n            // set sparse matrix values for J\n            if (p1i < p2i)\n            {\n                val[constraintIndex * 4] = grad.x;\n                val[constraintIndex*4+1] = grad.y;\n                val[constraintIndex*4+2] = -grad.x;\n                val[constraintIndex*4+3] = -grad.y;\n            }\n            else\n            {\n                val[constraintIndex * 4] = -grad.x;\n                val[constraintIndex*4+1] = -grad.y;\n                val[constraintIndex*4+2] = grad.x;\n                val[constraintIndex*4+3] = grad.y;\n            }\n\n            // set dense matrix values for JT\n            uint col = constraintIndex * numParticles * 2;\n            JT[col + p1i * 2] = grad.x;\n            JT[col + p1i*2+1] = grad.y;\n            JT[col + p2i * 2] = -grad.x;\n            JT[col + p2i*2+1] = -grad.y;\n        }\n        else\n        {\n            // reset to zero if gradient can't be computed\n\n            // sparse J\n            val[constraintIndex * 4] = 0.f;\n            val[constraintIndex*4+1] = 0.f;\n            val[constraintIndex*4+2] = 0.f;\n            val[constraintIndex*4+3] = 0.f;\n\n            // dense JT\n            uint col = constraintIndex * numParticles * 2;\n            JT[col + p1i * 2] = 0.f;\n            JT[col + p1i*2+1] = 0.f;\n            JT[col + p2i * 2] = 0.f;\n            JT[col + p2i*2+1] = 0.f;\n        }\n\n        // negative distance for vec b\n        thrust::get<4>(t) = (thrust::get<3>(t) - dist);\n    }\n};\n\nstruct distance_constraint_functor\n{\n    template <typename Tuple>\n    __device__\n    void operator()(Tuple t)\n    {\n        thrust::get<0>(t) += thrust::get<1>(t) / thrust::get<2>(t);\n    }\n};\n\nstruct identity_functor\n{\n    const uint w;\n\n    identity_functor(uint _w) : w(_w) {}\n\n    __device__\n    float operator()(const uint& x) const\n    {\n        if (x / w == x % w)\n            return 1;\n        return 0;\n    }\n};\n\nstruct diag_extraction_functor\n{\n    float *A;\n    uint width;\n\n    diag_extraction_functor(float *_A, uint _width)\n        : A(_A), width(_width) {}\n\n    template <typename Tuple>\n    __device__\n    void operator()(Tuple t)\n    {\n        uint index = thrust::get<0>(t);\n        index = index * width + index;\n        float elmt = A[index];\n        thrust::get<1>(t) = (abs(elmt) < 0.0001f ? 0.f : 1.f / elmt);\n        A[index] = 0.f;\n    }\n};\n\nstruct col_reduction\n{\n    float4 *particles;\n    float *b;\n    float *J;\n    const uint rowsJ;\n    const uint colsJ;\n\n    __host__ __device__\n    col_reduction(float4 *_particles, float *_b, float *_J, const uint _rowsJ, const uint _colsJ)\n        : particles(_particles), b(_b), J(_J), rowsJ(_rowsJ), colsJ(_colsJ) {}\n\n\n    template <typename Tuple>\n    __device__\n    void operator()(Tuple t)\n    {\n        uint row = thrust::get<0>(t);\n        uint index = row*2;\n        float4 temp = make_float4(0.f);\n        for (uint i = 0; i < colsJ; i++)\n        {\n            temp.x += J[index] * b[i];\n            temp.y += J[index+1] * b[i];\n            index += rowsJ;\n        }\n\n        particles[row] += temp / (thrust::get<1>(t) * thrust::get<2>(t));\n    }\n};\n\n\n__global__\nvoid constraintCentricSolveD(float      *A,\n                             float      *B,\n                             float      *JT,\n                             float      *lambdas,\n                             float      *particles,\n                             uint       *indices,\n                             uint       *occurences,\n                             uint       numParticles,\n                             uint       numConstraints,\n                             float      minErr,\n                             uint       maxIter,\n                             float      omega)\n{\n    uint index = __umul24(blockIdx.x,blockDim.x) + threadIdx.x;\n\n    if (index < numConstraints)\n    {\n        int vars = numConstraints - 1;\n        float bi = B[index];\n\n        float err = 1.f;\n        int iter = 0;\n        float sum, lambda, old_lambda = 0.f;\n        uint row;\n\n        __syncthreads();\n        while ((err > minErr /*|| iter < 10*/) && iter < maxIter)\n        {\n            sum = bi;\n            row = index;\n            for (int i = 0; i < vars; i++)\n            {\n                if (i != index)\n                    sum -= lambdas[i] * A[row];\n                row += numConstraints;              // next column of matrix A (stored in column-major order)\n            }\n            lambda = sum / A[index * numConstraints + index]; // divide by corresponding diagonal coefficient\n            lambdas[index] = lambda;\n\n            err = lambda - old_lambda;\n            old_lambda = lambda;\n            iter++;\n        }\n\n        uint pi = indices[index];\n        atomicAdd(particles + pi * 4, omega * lambda * JT[index * numParticles * 2 + pi * 2] / occurences[pi]);\n        atomicAdd(particles + pi*4+1, omega * lambda * JT[index * numParticles * 2 + pi*2+1] / occurences[pi]);\n\n        pi = indices[index + numConstraints];\n        atomicAdd(particles + pi * 4, omega * lambda * JT[index * numParticles * 2 + pi * 2] / occurences[pi]);\n        atomicAdd(particles + pi*4+1, omega * lambda * JT[index * numParticles * 2 + pi*2+1] / occurences[pi]);\n    }\n\n    __syncthreads();\n}\n\nstruct rigid_body_functor\n{\n    float2 *rVecs;\n    float4 *particles;\n\n    __host__ __device__\n    rigid_body_functor(float2 *_rVecs, float4 *_particles)\n        : rVecs(_rVecs), particles(_particles) {}\n\n    template <typename Tuple>\n    __device__\n    void operator()(Tuple t)\n    {\n        /* Tuple:\n         * 0: angle\n         * 1: center mass\n         * 2: particle index start\n         * 3: rVec index start\n         * 4: size\n         */\n\n\n     }\n};\n\n\nstruct occurence_functor\n{\n    uint *occ;\n\n    __host__ __device__\n    occurence_functor(uint *_occ)\n        : occ(_occ) {}\n\n    template <typename Tuple>\n    __device__\n    void operator()(Tuple t)\n    {\n        occ[thrust::get<0>(t)] += thrust::get<1>(t);\n    }\n};\n\n#endif // SOLVER_KERNEL_H\n\n"
  },
  {
    "path": "gpu/src/cuda/util.cu",
    "content": "\n #include <cuda_runtime.h>\n #include <cuda_gl_interop.h>\n\n #include \"helper_cuda.h\"\n\ntypedef unsigned int uint;\n\nextern \"C\"\n{\n\n    void allocateArray(void **devPtr, size_t size)\n    {\n        checkCudaErrors(cudaMalloc(devPtr, size));\n    }\n\n    void freeArray(void *devPtr)\n    {\n        checkCudaErrors(cudaFree(devPtr));\n    }\n\n    void cudaInit()\n    {\n        // use device with highest Gflops/s\n        int devID = findCudaDevice();\n\n        if (devID < 0)\n        {\n            printf(\"No CUDA Capable devices found, exiting...\\n\");\n            exit(EXIT_SUCCESS);\n        }\n    }\n\n    void copyArrayToDevice(void *device, const void *host, int offset, int size)\n    {\n        checkCudaErrors(cudaMemcpy((char *) device + offset, host, size, cudaMemcpyHostToDevice));\n    }\n\n    void registerGLBufferObject(unsigned int vbo, struct cudaGraphicsResource **cuda_vbo_resource)\n    {\n        checkCudaErrors(cudaGraphicsGLRegisterBuffer(cuda_vbo_resource, vbo,\n                                                     cudaGraphicsMapFlagsNone));\n    }\n\n    void unregisterGLBufferObject(struct cudaGraphicsResource *cuda_vbo_resource)\n    {\n        checkCudaErrors(cudaGraphicsUnregisterResource(cuda_vbo_resource));\n    }\n\n    void *mapGLBufferObject(struct cudaGraphicsResource **cuda_vbo_resource)\n    {\n        void *ptr;\n        checkCudaErrors(cudaGraphicsMapResources(1, cuda_vbo_resource, 0));\n        size_t num_bytes;\n        checkCudaErrors(cudaGraphicsResourceGetMappedPointer((void **)&ptr, &num_bytes, *cuda_vbo_resource));\n        return ptr;\n    }\n\n    void unmapGLBufferObject(struct cudaGraphicsResource *cuda_vbo_resource)\n    {\n        checkCudaErrors(cudaGraphicsUnmapResources(1, &cuda_vbo_resource, 0));\n    }\n\n    void copyArrayFromDevice(void *host, const void *device, int size)\n    {\n        checkCudaErrors(cudaMemcpy(host, device, size, cudaMemcpyDeviceToHost));\n    }\n\n    //Round a / b to nearest higher integer value\n    uint iDivUp(uint a, uint b)\n    {\n        return (a % b != 0) ? (a / b + 1) : (a / b);\n    }\n\n    // compute grid and thread block size for a given number of elements\n    void computeGridSize(uint n, uint blockSize, uint &numBlocks, uint &numThreads)\n    {\n        numThreads = min(blockSize, n);\n        numBlocks = iDivUp(n, numThreads);\n    }\n}\n"
  },
  {
    "path": "gpu/src/cuda/util.cuh",
    "content": "#ifndef UTIL_CUH\n#define UTIL_CUH\n\ntypedef unsigned int uint;\n\nextern \"C\"\n{\n    void cudaInit();\n\n    void allocateArray(void **devPtr, int size);\n    void freeArray(void *devPtr);\n\n    void copyArrayToDevice(void *device, const void *host, int offset, int size);\n\n    void registerGLBufferObject(unsigned int vbo, struct cudaGraphicsResource **cuda_vbo_resource);\n    void unregisterGLBufferObject(struct cudaGraphicsResource *cuda_vbo_resource);\n\n    void *mapGLBufferObject(struct cudaGraphicsResource **cuda_vbo_resource);\n    void unmapGLBufferObject(struct cudaGraphicsResource *cuda_vbo_resource);\n\n    void copyArrayFromDevice(void *host, const void *device, int size);\n\n    uint iDivUp(uint a, uint b);\n    void computeGridSize(uint n, uint blockSize, uint &numBlocks, uint &numThreads);\n}\n\n#endif // UTIL_CUH\n"
  },
  {
    "path": "gpu/src/cuda/wrappers.cuh",
    "content": "/*\n * A CUDA header file for functions compiled with\n * nvcc (cuda compiler). This allows the functions\n * to be called from normal .cpp files\n */\n\n#ifndef WRAPPERS_CUH\n#define WRAPPERS_CUH\n\ntypedef unsigned int uint;\n\nextern \"C\"\n{\n\n    /*\n     *   INTEGRATION\n     */\n    void initIntegration();\n\n    void appendIntegrationParticle(float *v, float *ro, uint iterations);\n\n    void freeIntegrationVectors();\n\n    void setParameters(SimParams *hostParams);\n\n    void integrateSystem(float *pos,\n                         float deltaTime,\n                         uint numParticles);\n\n    void calcHash(uint  *gridParticleHash,\n                  uint  *gridParticleIndex,\n                  float *pos,\n                  int    numParticles);\n\n    void sortParticles(uint *dGridParticleHash, uint *dGridParticleIndex, uint numParticles);\n\n    void reorderDataAndFindCellStart(uint  *cellStart,\n                                     uint  *cellEnd,\n                                     float *sortedPos,\n                                     float *sortedW,\n                                     int   *sortedPhase,\n                                     uint  *gridParticleHash,\n                                     uint  *gridParticleIndex,\n                                     float *oldPos,\n                                     uint   numParticles,\n                                     uint   numCells);\n\n    void collideWorld(float *pos,\n                      float *sortedPos,\n                      uint numParticles,\n                      int3 minBounds,\n                      int3 maxBounds);\n\n    void collide(float *particles,\n                 float *sortedPos,\n                 float *sortedW,\n                 int   *sortedPhase,\n                 uint  *gridParticleIndex,\n                 uint  *cellStart,\n                 uint  *cellEnd,\n                 uint   numParticles,\n                 uint   numCells);\n\n    void sortByType(float *dPos, uint numParticles);\n\n\n    void calcVelocity(float *dpos, float deltaTime, uint numParticles);\n\n\n    /*\n     * SOLVER\n     */\n//    void initHandles();\n//    void destroyHandles();\n\n    void appendSolverParticle(uint numParticles);\n\n    void addPointConstraint(uint *index, float *point, uint numConstraints);\n    void addDistanceConstraint(uint *index, float *distance, uint numConstraints);\n\n    void freeSolverVectors();\n\n    void solvePointConstraints(float *particles);\n\n    void solveDistanceConstraints(float *particles);\n\n    ////////////////////////////////// FLUIDS ////////////////////////\n    void solveFluids(float *sortedPos,\n                     float *sortedW,\n                     int   *sortedPhase,\n                     uint  *gridParticleIndex,\n                     uint  *cellStart,\n                     uint  *cellEnd,\n                     float *particles,\n                     uint   numParticles,\n                     uint   numCells);\n}\n\n#endif // WRAPPERS_CUH\n"
  },
  {
    "path": "gpu/src/cuda/wrappers_cuda.cu",
    "content": "\n//#define PRINT\n//#define JACOBI\n//#define GAUSS\n//#define SOLVER\n\n\n#include <cuda_runtime.h>\n#include <cuda_gl_interop.h>\n\n\n#include <cublas_v2.h>\n#include <cusparse.h>\n#ifdef SOLVER\n#include <cusolverDn.h>\n#endif\n\n#include \"helper_cuda.h\"\n#include \"kernel_impl.cuh\"\n\n#include \"thrust/device_ptr.h\"\n#include \"thrust/device_vector.h\"\n#include \"thrust/for_each.h\"\n#include \"thrust/iterator/zip_iterator.h\"\n//#include \"thrust/sort.h\"\n//#include \"thrust/reduce.h\"\n#include \"thrust/transform.h\"\n\n//#include <stdlib.h>\n//#include <string.h>\n#include <stdio.h>\n\n#ifdef PRINT\n#include \"cusp/csr_matrix.h\"\n#include \"cusp/print.h\"\n//#include \"cusp/multiply.h\"\n//#include \"cusp/transpose.h\"\n#include \"cusp/array1d.h\"\n#endif\n\ntypedef typename cusp::array1d_view< thrust::device_vector<uint>::iterator > IndexArrayView;\ntypedef typename cusp::array1d_view< thrust::device_vector<float>::iterator > ValueArrayView;\ntypedef cusp::csr_matrix_view<IndexArrayView, IndexArrayView, ValueArrayView> CSRView;\n\ncublasHandle_t cublasHandle;\ncusparseHandle_t cusparseHandle;\ncusparseMatDescr_t matDescr;\n\n#ifdef SOLVER\ncusolverDnHandle_t cusolverHandle;\n#endif\n\nthrust::device_vector<uint> Jr; // row offsets for J\nthrust::device_vector<uint> Jc; // col indices for J\nthrust::device_vector<float> Jv; // values for J\n\n// D contains Diag of A\nthrust::device_vector<uint> Dr; // row offsets for D\nthrust::device_vector<uint> Dc; // col indices for D\nthrust::device_vector<float> Dv; // values for D\n\nthrust::device_vector<uint> occurences;     // number of constraints affecting a particle\nthrust::device_vector<float> W;     // vector of inverse masses\nthrust::device_vector<float> JT;    // dense matrix of J transpose\nthrust::device_vector<float> A;     // Solution to J * W * JT // doubles as T in jacobi iteration\nthrust::device_vector<float> B;\nthrust::device_vector<float> B2;\nthrust::device_vector<float> C;\n\n\n//thrust::device_vector<float> deltas;\nfloat *d_oldPos;\n\nint workSize;\nfloat *d_work;\nint *d_devIpiv;\nint *d_devInfo;\n\n////////////////////////// RIGID BODIES ///////////////////////\n\nthrust::device_vector<float> d_rbAngle;\nthrust::device_vector<float> d_rbCenterMass;    // dim2\nthrust::device_vector<uint> d_rbPartStart;\nthrust::device_vector<uint> d_rbRStart;\nthrust::device_vector<uint> d_rbSize;\n\nthrust::device_vector<float> d_Rs;              // dim 2\n\n\nextern \"C\"\n{\n\n    void allocateArray(void **devPtr, size_t size)\n    {\n        checkCudaErrors(cudaMalloc(devPtr, size));\n    }\n\n    void freeArray(void *devPtr)\n    {\n        checkCudaErrors(cudaFree(devPtr));\n    }\n\n    void cudaInit()\n    {\n        int devID;\n\n        // use command-line specified CUDA device, otherwise use device with highest Gflops/s\n        devID = findCudaDevice();\n\n        if (devID < 0)\n        {\n            printf(\"No CUDA Capable devices found, exiting...\\n\");\n            exit(EXIT_SUCCESS);\n        }\n\n        checkCudaErrors(cublasCreate(&cublasHandle));\n        checkCudaErrors(cusparseCreate(&cusparseHandle));\n\n        checkCudaErrors(cusparseCreateMatDescr(&matDescr));\n        cusparseSetMatType(matDescr, CUSPARSE_MATRIX_TYPE_GENERAL);\n        cusparseSetMatIndexBase(matDescr,CUSPARSE_INDEX_BASE_ZERO);\n#ifdef SOLVER\n        checkCudaErrors(cusolverDnCreate(&cusolverHandle));\n#endif\n    }\n\n    void cudaClean()\n    {\n        // Destroy the handles\n        checkCudaErrors(cublasDestroy(cublasHandle));\n        checkCudaErrors(cusparseDestroy(cusparseHandle));\n#ifdef SOLVER\n        checkCudaErrors(cusolverDnDestroy(cusolverHandle));\n#endif\n    }\n\n    void initDeviceVectors(uint *indices, uint numParticles, uint numConstraints)\n    {\n        thrust::device_ptr<uint> d_i(indices);\n\n        occurences.resize(numParticles);\n        thrust::device_vector<uint> dv_is(numConstraints * 2);\n        thrust::copy(d_i, d_i + numConstraints * 2, dv_is.begin());\n        thrust::device_vector<uint> d_occurs(dv_is.size(), 1.f);\n        thrust::sort(dv_is.begin(), dv_is.end());\n        thrust::reduce_by_key(dv_is.begin(), dv_is.end(), d_occurs.begin(), dv_is.begin(), occurences.begin());\n\n        uint p1i, p2i;\n        // row offsets and column indices for matrix J\n        for (uint i = 0; i < numConstraints; i++)\n        {\n            Dr.push_back(i);\n            Dc.push_back(i);\n\n            Jr.push_back(i*4);\n\n            p1i =  d_i[i];\n            p2i =  d_i[numConstraints + i];\n            if (p1i < p2i)\n            {\n                Jc.push_back(p1i * 2);\n                Jc.push_back(p1i*2+1);\n                Jc.push_back(p2i * 2);\n                Jc.push_back(p2i*2+1);\n            }\n            else\n            {\n                Jc.push_back(p2i * 2);\n                Jc.push_back(p2i*2+1);\n                Jc.push_back(p1i * 2);\n                Jc.push_back(p1i*2+1);\n            }\n        }\n        Dr.push_back(numConstraints);\n        Jr.push_back(numConstraints*4);\n\n        W.resize(numParticles);\n        thrust::fill(W.begin(), W.end(), 1.f);\n\n#ifdef PRINT\n        thrust::device_ptr<uint> O(occurences.data());\n        printf(\"Occurs:\\n\");\n        for (uint i = 0; i < occurences.size(); i++)\n        {\n            printf(\"%u \", (uint)*(O + i));\n        }\n        printf(\"\\n\");\n\n        thrust::device_ptr<float> d_W(W.data());\n        printf(\"W:\\n\");\n        for (uint i = 0; i < W.size(); i++)\n        {\n            printf(\"%.2f \", (float)*(d_W + i));\n        }\n        printf(\"\\n\");\n#endif\n\n        uint numParticles2 = numParticles * 2;\n\n        Dv.resize(numConstraints);\n        Jv.resize(numConstraints * 4);\n        JT.resize(numConstraints * numParticles2);\n        thrust::fill(JT.begin(), JT.end(), 0.f);\n        A.resize(numConstraints * numConstraints);\n        B.resize(numConstraints);\n        B2.resize(numConstraints);\n        C.resize(numConstraints);\n//        deltas.resize(numParticles2);\n\n        allocateArray((void **)&d_oldPos, numParticles * 4 * sizeof(float));\n\n#ifdef SOLVER\n        float *pA = thrust::raw_pointer_cast(A.data());\n        cusolverDnSpotrf_bufferSize(cusolverHandle, CUBLAS_FILL_MODE_LOWER, numConstraints, pA, numConstraints, &workSize);\n        allocateArray((void**)&d_work, workSize * sizeof(float));\n        allocateArray((void **)&d_devIpiv, numConstraints * sizeof(int));\n        allocateArray((void**)&d_devInfo, sizeof(int));\n#endif\n    }\n\n    void freeDeviceVectors()\n    {\n        // set size to zero\n        Jr.clear();\n        Jc.clear();\n        Jv.clear();\n\n        Dr.clear();\n        Dc.clear();\n        Dv.clear();\n\n        occurences.clear();\n        W.clear();\n        JT.clear();\n        A.clear();\n        B.clear();\n        B2.clear();\n        C.clear();\n//        deltas.clear();\n\n        // free memory\n        Jr.shrink_to_fit();\n        Jc.shrink_to_fit();\n        Jv.shrink_to_fit();\n\n        Dr.shrink_to_fit();\n        Dc.shrink_to_fit();\n        Dv.shrink_to_fit();\n\n        occurences.shrink_to_fit();\n        W.shrink_to_fit();\n        JT.shrink_to_fit();\n        A.shrink_to_fit();\n        B.shrink_to_fit();\n        B2.shrink_to_fit();\n        C.shrink_to_fit();\n//        deltas.shrink_to_fit();\n        freeArray(d_oldPos);\n\n#ifdef SOLVER\n        freeArray(d_work);\n        freeArray(d_devIpiv);\n        freeArray(d_devInfo);\n#endif\n        d_rbAngle.clear();\n        d_rbCenterMass.clear();\n        d_rbPartStart.clear();\n        d_rbRStart.clear();\n        d_rbSize.clear();\n\n        d_Rs.clear();\n\n        d_rbAngle.shrink_to_fit();\n        d_rbCenterMass.shrink_to_fit();\n        d_rbPartStart.shrink_to_fit();\n        d_rbRStart.shrink_to_fit();\n        d_rbSize.shrink_to_fit();\n\n        d_Rs.shrink_to_fit();\n\n    }\n\n    void copyArrayToDevice(void *device, const void *host, int offset, int size)\n    {\n        checkCudaErrors(cudaMemcpy((char *) device + offset, host, size, cudaMemcpyHostToDevice));\n    }\n\n    void registerGLBufferObject(unsigned int vbo, struct cudaGraphicsResource **cuda_vbo_resource)\n    {\n        checkCudaErrors(cudaGraphicsGLRegisterBuffer(cuda_vbo_resource, vbo,\n                                                     cudaGraphicsMapFlagsNone));\n    }\n\n    void unregisterGLBufferObject(struct cudaGraphicsResource *cuda_vbo_resource)\n    {\n        checkCudaErrors(cudaGraphicsUnregisterResource(cuda_vbo_resource));\n    }\n\n    void *mapGLBufferObject(struct cudaGraphicsResource **cuda_vbo_resource)\n    {\n        void *ptr;\n        checkCudaErrors(cudaGraphicsMapResources(1, cuda_vbo_resource, 0));\n        size_t num_bytes;\n        checkCudaErrors(cudaGraphicsResourceGetMappedPointer((void **)&ptr, &num_bytes,\n                                                             *cuda_vbo_resource));\n        return ptr;\n    }\n\n    void unmapGLBufferObject(struct cudaGraphicsResource *cuda_vbo_resource)\n    {\n        checkCudaErrors(cudaGraphicsUnmapResources(1, &cuda_vbo_resource, 0));\n    }\n\n    void copyArrayFromDevice(void *host, const void *device, int size)\n    {\n        checkCudaErrors(cudaMemcpy(host, device, size, cudaMemcpyDeviceToHost));\n    }\n\n    void setParameters(SimParams *hostParams)\n    {\n        // copy parameters to constant memory\n        checkCudaErrors(cudaMemcpyToSymbol(params, hostParams, sizeof(SimParams)));\n    }\n\n    //Round a / b to nearest higher integer value\n    uint iDivUp(uint a, uint b)\n    {\n        return (a % b != 0) ? (a / b + 1) : (a / b);\n    }\n\n    // compute grid and thread block size for a given number of elements\n    void computeGridSize(uint n, uint blockSize, uint &numBlocks, uint &numThreads)\n    {\n        numThreads = min(blockSize, n);\n        numBlocks = iDivUp(n, numThreads);\n    }\n\n    void integrateSystem(float *pos, float *vel, float deltaTime, uint numParticles)\n    {\n        thrust::device_ptr<float4> d_pos4((float4 *)pos);\n        thrust::device_ptr<float4> d_vel4((float4 *)vel);\n\n        thrust::device_ptr<float4> d_old4((float4 *)d_oldPos);\n        thrust::copy(d_pos4, d_pos4 + numParticles, d_old4);\n\n        thrust::for_each(\n            thrust::make_zip_iterator(thrust::make_tuple(d_pos4, d_vel4)),\n            thrust::make_zip_iterator(thrust::make_tuple(d_pos4+numParticles, d_vel4+numParticles)),\n            integrate_functor(deltaTime));\n\n#ifdef PRINT\n        for (uint i = 0; i < numParticles; i++)\n        {\n            printf(\"Integrated Pos : (%.2f, %.2f, %.2f, %.2f)\\n\",\n                   ((float4)*(d_pos4+i)).x,((float4)*(d_pos4+i)).y,\n                   ((float4)*(d_pos4+i)).z,((float4)*(d_pos4+i)).w);\n        }\n#endif\n    }\n\n    void calcHash(uint *gridParticleHash, uint *gridParticleIndex, float *pos, int numParticles)\n    {\n        uint numThreads, numBlocks;\n        computeGridSize(numParticles, 256, numBlocks, numThreads);\n\n        // execute the kernel\n        calcHashD<<< numBlocks, numThreads >>>(gridParticleHash, gridParticleIndex, (float4 *) pos, numParticles);\n\n        // check if kernel invocation generated an error\n        getLastCudaError(\"Kernel execution failed\");\n    }\n\n\n    void reorderDataAndFindCellStart(uint  *cellStart,\n                                     uint  *cellEnd,\n                                     float *sortedPos,\n                                     float *sortedVel,\n                                     uint  *gridParticleHash,\n                                     uint  *gridParticleIndex,\n                                     float *oldPos,\n                                     float *oldVel,\n                                     uint   numParticles,\n                                     uint   numCells)\n    {\n        uint numThreads, numBlocks;\n        computeGridSize(numParticles, 256, numBlocks, numThreads);\n\n        // set all cells to empty\n        checkCudaErrors(cudaMemset(cellStart, 0xffffffff, numCells*sizeof(uint)));\n\n        checkCudaErrors(cudaBindTexture(0, oldPosTex, oldPos, numParticles*sizeof(float4)));\n        checkCudaErrors(cudaBindTexture(0, oldVelTex, oldVel, numParticles*sizeof(float4)));\n\n        uint smemSize = sizeof(uint)*(numThreads+1);\n        reorderDataAndFindCellStartD<<< numBlocks, numThreads, smemSize>>>(\n            cellStart,\n            cellEnd,\n            (float4 *) sortedPos,\n            (float4 *) sortedVel,\n            gridParticleHash,\n            gridParticleIndex,\n            (float4 *) oldPos,\n            (float4 *) oldVel,\n            numParticles);\n        getLastCudaError(\"Kernel execution failed: reorderDataAndFindCellStartD\");\n\n        checkCudaErrors(cudaUnbindTexture(oldPosTex));\n        checkCudaErrors(cudaUnbindTexture(oldVelTex));\n    }\n\n    void collide(float *newVel,\n                 float *sortedPos,\n                 float *sortedVel,\n                 uint  *gridParticleIndex,\n                 uint  *cellStart,\n                 uint  *cellEnd,\n                 uint   numParticles,\n                 uint   numCells)\n    {\n        checkCudaErrors(cudaBindTexture(0, oldPosTex, sortedPos, numParticles*sizeof(float4)));\n        checkCudaErrors(cudaBindTexture(0, oldVelTex, sortedVel, numParticles*sizeof(float4)));\n        checkCudaErrors(cudaBindTexture(0, cellStartTex, cellStart, numCells*sizeof(uint)));\n        checkCudaErrors(cudaBindTexture(0, cellEndTex, cellEnd, numCells*sizeof(uint)));\n\n        // thread per particle\n        uint numThreads, numBlocks;\n        computeGridSize(numParticles, 64, numBlocks, numThreads);\n\n        // execute the kernel\n        collideD<<< numBlocks, numThreads >>>((float4 *)newVel,\n                                              (float4 *)sortedPos,\n                                              (float4 *)sortedVel,\n                                              gridParticleIndex,\n                                              cellStart,\n                                              cellEnd,\n                                              numParticles);\n\n        // check if kernel invocation generated an error\n        getLastCudaError(\"Kernel execution failed\");\n\n        checkCudaErrors(cudaUnbindTexture(oldPosTex));\n        checkCudaErrors(cudaUnbindTexture(oldVelTex));\n        checkCudaErrors(cudaUnbindTexture(cellStartTex));\n        checkCudaErrors(cudaUnbindTexture(cellEndTex));\n    }\n\n    void sortParticles(uint *dGridParticleHash, uint *dGridParticleIndex, uint numParticles)\n    {\n        thrust::sort_by_key(thrust::device_ptr<uint>(dGridParticleHash),\n                            thrust::device_ptr<uint>(dGridParticleHash + numParticles),\n                            thrust::device_ptr<uint>(dGridParticleIndex));\n    }\n\n\n//    void solvePointConstraints(uint *indices, float *points, float *particles, uint numConstraints)\n//    {\n//        thrust::device_ptr<uint> d_indices(indices);\n//        thrust::device_ptr<float4> d_points((float4 *) points);\n\n//        thrust::for_each(\n//            thrust::make_zip_iterator(thrust::make_tuple(d_indices, d_points)),\n//            thrust::make_zip_iterator(thrust::make_tuple(d_indices+numConstraints, d_points+numConstraints)),\n//            point_constraint_functor((float4 *)particles));\n//    }\n\n//    void iterativeSolveDistanceConstraints(uint *indices, float *distance, float *particles, uint numConstraints)\n//    {\n//        // copy indices to device vector (this gets manipulated)\n//        thrust::device_vector<uint> d_indices(indices, indices + numConstraints*2);\n\n//        // pointers to the locations of the first and second indices\n//        thrust::device_ptr<uint> d_index1 = d_indices.data();\n//        thrust::device_ptr<uint> d_index2 = d_indices.data() + numConstraints;\n\n//        // pointer to the distance values\n//        thrust::device_ptr<float> d_distances(distance);\n\n//        // device vector of delta values (to accumulate then sum)\n//        thrust::device_vector<float4> d_deltas_vec(numConstraints*2);\n//        thrust::device_ptr<float4> d_deltas_ptr = d_deltas_vec.data();\n\n//        // calculate the delta values for each point\n//        thrust::for_each(\n//            thrust::make_zip_iterator(thrust::make_tuple(d_index1, d_index2, d_distances, d_deltas_ptr, d_deltas_ptr+ numConstraints)),\n//            thrust::make_zip_iterator(thrust::make_tuple(d_index1+numConstraints, d_index2+numConstraints, d_distances+numConstraints, d_deltas_ptr+numConstraints, d_deltas_ptr+numConstraints*2)),\n//            delta_computing_functor((float4 *) particles));\n\n//        thrust::sort_by_key(d_index1, d_index1+numConstraints*2, d_deltas_ptr);\n\n//        thrust::pair<thrust::device_ptr<uint>,thrust::device_ptr<float4>> new_end;\n//        new_end = thrust::reduce_by_key(d_index1, d_index1+numConstraints*2, d_deltas_ptr, d_index1, d_deltas_ptr);\n\n//        thrust::for_each(\n//            thrust::make_zip_iterator(thrust::make_tuple(d_index1, d_deltas_ptr)),\n//            thrust::make_zip_iterator(thrust::make_tuple(new_end.first, new_end.second)),\n//            distance_constraint_functor((float4 *)particles));\n//    }\n\n    void calcVelocity(float *hpos, float *dpos, float *vel, float deltaTime, uint numParticles)\n    {\n//        thrust::host_vector<float> h_origPos(hpos, hpos + numParticles*4);\n//        thrust::device_vector<float> d_origPos = h_origPos;\n        thrust::device_ptr<float4> d_origPos((float4*)d_oldPos);\n        thrust::device_ptr<float4> d_solvedPos((float4*)dpos);\n        thrust::device_ptr<float4> d_vel((float4*)vel);\n\n        thrust::transform(d_origPos, d_origPos + numParticles * 4, d_solvedPos, d_vel, subtract_functor(deltaTime));\n    }\n\n\n//    void buildJAndB(uint *indices, float *distance, float *particles, float *jay_, float *b, uint numParticles, uint numConstraints)\n//    {\n////        uint2 sizeJ = make_uint2(numParticles * 2, numConstraints); // rows, cols\n////        // raw pointer to device memory\n//////        float *_J, *_b;\n//////        allocateArray((void **)&_J, sizeJ.x * sizeJ.y * sizeof(float));\n//////        allocateArray((void **)&_b, numConstraints * sizeof(float));\n\n////        // wrap raw pointer with a device_ptr\n////        thrust::device_ptr<float> d_J(J);\n//        thrust::device_ptr<float> d_b(b);\n\n////        // use device_ptr in thrust algorithms\n////        thrust::fill(d_J, d_J + sizeJ.x * sizeJ.y, 0.f);\n////        thrust::fill(d_b, d_b + numConstraints, 0.f);\n\n//        uint numPartsExp = numParticles * 2; // * 3 for 3D\n////        cusp::print(W);\n\n////        J.column_indices(1, 1) = 0;\n\n\n\n\n//#ifdef PRINT\n//        thrust::device_ptr<float4> d_particles((float4*)particles);\n//        for (uint i = 0; i < numParticles; i++)\n//        {\n//            printf(\"particles before : (%.2f, %.2f, %.2f, %.2f)\\n\",\n//                   ((float4)*(d_particles+i)).x,((float4)*(d_particles+i)).y,\n//                   ((float4)*(d_particles+i)).z,((float4)*(d_particles+i)).w);\n//        }\n\n//        printf(\"MATRIX J (before):\\n\");\n//        for (uint r = 0; r < sizeJ.x; r++)\n//        {\n//            for (uint c = 0; c < sizeJ.y; c++)\n//            {\n//                uint index = c * sizeJ.x + r;\n//                printf(\"%.2f \", (float)*(d_J+index));\n//            }\n//            printf(\"\\n\");\n//        }\n\n//        printf(\"B (before):\\n\");\n//        for (uint i = 0; i < numConstraints * 4; i++)\n//        {\n//            printf(\"%.2f, \", (float)*(d_b+i));\n//        }\n//        printf(\"\\b \\n\");\n//#endif\n\n////        // copy indices to device vector (this gets manipulated)\n////        thrust::device_vector<uint> d_indices(indices, indices + numConstraints*2);\n\n////        // pointers to the locations of the first and second indices\n////        thrust::device_ptr<uint> d_index1 = d_indices.data();\n////        thrust::device_ptr<uint> d_index2 = d_indices.data() + numConstraints;\n\n//        // pointer to the indices\n//        thrust::device_ptr<uint> d_index1(indices);\n//        thrust::device_ptr<uint> d_index2(indices + numConstraints);\n//        // pointer to the distance values\n//        thrust::device_ptr<float> d_distances(distance);\n\n//        // keeps track of the index\n//        thrust::counting_iterator<uint> first(0);\n//        thrust::counting_iterator<uint> last = first + numConstraints;\n\n////        J.row_offsets[0] = 0;\n////        J.row_offsets[1] = 4;\n////        J.row_offsets[2] = 7;\n\n////        J.column_indices[0] = 1; J.values[0] = 1.f;\n////        J.column_indices[1] = 3; J.values[1] = 2.f;\n////        J.column_indices[2] = 4; J.values[2] = 3.f;\n////        J.column_indices[3] = 5; J.values[3] = 4.f;\n////        J.column_indices[4] = 0; J.values[4] = 5.f;\n////        J.column_indices[5] = 1; J.values[5] = 6.f;\n////        J.column_indices[6] = 2; J.values[6] = 7.f;\n////        J.column_indices[7] = 4; J.values[7] = 8.f;\n\n//        cusp::csr_matrix<uint, float, cusp::device_memory> J(numConstraints, numPartsExp, numConstraints * 4);\n\n//        uint *row_off = thrust::raw_pointer_cast(&J.row_offsets[0]);\n//        uint *col_ind = thrust::raw_pointer_cast(&J.column_indices[0]);\n//        float *val = thrust::raw_pointer_cast(&J.values[0]);\n\n////        CSRView j(2, 6, 8, );\n\n\n\n//        // fill J and b\n////        thrust::for_each(\n////                    thrust::make_zip_iterator(thrust::make_tuple(first, d_index1, d_index2, d_distances, d_b)),\n////                    thrust::make_zip_iterator(thrust::make_tuple(last, d_index1+numConstraints, d_index2+numConstraints, d_distances+numConstraints, d_b+numConstraints)),\n////                    gradient_functor((float4 *) particles, row_off, col_ind, val, numConstraints));\n\n//        J.row_offsets[numConstraints] = numConstraints * 4 - 1;\n\n//#ifdef PRINT\n//        printf(\"MATRIX J (after):\\n\");\n//        for (uint r = 0; r < sizeJ.x; r++)\n//        {\n//            for (uint c = 0; c < sizeJ.y; c++)\n//            {\n//                uint index = c * sizeJ.x + r;\n//                printf(\"%.2f \", (float)*(d_J+index));\n//            }\n//            printf(\"\\n\");\n//        }\n\n//        printf(\"B (after):\\n\");\n//        for (uint i = 0; i < numConstraints; i++)\n//        {\n//            printf(\"%.2f, \", (float)*(d_b+i));\n//        }\n//        printf(\"\\b \\n\");\n//#endif\n\n//        cusp::csr_matrix<uint, float, cusp::device_memory> JW(numConstraints, numPartsExp, numConstraints * 4);\n//        cusp::csr_matrix<uint, float, cusp::device_memory> JT(numPartsExp, numConstraints, numConstraints * 4);\n//        cusp::csr_matrix<uint, float, cusp::device_memory> A(numConstraints, numConstraints, numConstraints * numConstraints);\n\n////        cusp::multiply(J, W, JW);\n////        cusp::transpose(J, JT);\n////        cusp::multiply(JW,JT,A);\n\n////        printf(\"J:\\n\");\n////        cusp::print(J);\n////        printf(\"JW:\\n\");\n////        cusp::print(JW);\n////        printf(\"JT:\\n\");\n////        cusp::print(J);\n////        printf(\"A:\\n\");\n////        cusp::print(A);\n\n////        freeArray(_J);\n////        freeArray(_b);\n//    }\n\n\n//    void makeA(float *J, float *A, uint numParticles, uint numConstraints)\n//    {\n//        float alpha = 1.f, beta = 0.f;\n//        checkCudaErrors(cublasSgemm(cublasHandle, CUBLAS_OP_T, CUBLAS_OP_N, numConstraints, numConstraints, numParticles * 2, &alpha, J, numParticles * 2, J, numParticles * 2, &beta, A, numConstraints));\n//#ifdef PRINT\n//        thrust::device_ptr<float> d_A(A);\n//        printf(\"MATRIX A:\\n\");\n//        for (uint r = 0; r < numConstraints; r++)\n//        {\n//            for (uint c = 0; c < numConstraints; c++)\n//            {\n//                uint index = c * numConstraints + r;\n//                printf(\"%.2f \", (float)*(d_A+index));\n//            }\n//            printf(\"\\n\");\n//        }\n//#endif\n//    }\n\n    void solveAxb(uint *indices, float *distances, float *particles, uint numParticles, uint numConstraints, int gaussIters, float omega)\n    {\n        uint numParticles2 = numParticles * 2;\n\n        float *val = thrust::raw_pointer_cast(Jv.data());\n\n        // pointer to the indices\n        thrust::device_ptr<uint> d_index1(indices);\n        thrust::device_ptr<uint> d_index2(indices + numConstraints);\n        // pointer to the distance values\n        thrust::device_ptr<float> d_distances(distances);\n\n#ifdef PRINT\n        printf(\"dis: \");\n        for (int i = 0; i < numConstraints*2; i++)\n            printf(\"%u \", (uint)*(d_index1 + i));\n        printf(\"\\n\");\n\n        printf(\"ds: \");\n        for (int i = 0; i < numConstraints; i++)\n            printf(\"%u \", (uint)*(d_distances + i));\n        printf(\"\\n\");\n#endif\n\n        // keeps track of the index\n        thrust::counting_iterator<uint> first(0);\n        thrust::counting_iterator<uint> last = first + numConstraints;\n\n        thrust::device_ptr<float> d_B(B.data());\n        float *pJT = thrust::raw_pointer_cast(JT.data());\n\n        // fill J and b\n        thrust::for_each(\n                    thrust::make_zip_iterator(thrust::make_tuple(first, d_index1, d_index2, d_distances, d_B)),\n                    thrust::make_zip_iterator(thrust::make_tuple(last, d_index1+numConstraints, d_index2+numConstraints, d_distances+numConstraints, d_B+numConstraints)),\n                    gradient_functor((float4 *) particles, val, pJT, numParticles, numConstraints));\n\n        float alpha = 1.f;\n        float beta = 0.f;\n\n        // raw pointers to data from vectors\n        float *pJv = thrust::raw_pointer_cast(Jv.data());\n        int *pJr = (int*)thrust::raw_pointer_cast(Jr.data());\n        int *pJc = (int*)thrust::raw_pointer_cast(Jc.data());\n\n        float *pDv = thrust::raw_pointer_cast(Dv.data());\n        int *pDr = (int*)thrust::raw_pointer_cast(Dr.data());\n        int *pDc = (int*)thrust::raw_pointer_cast(Dc.data());\n\n        float *pA = thrust::raw_pointer_cast(A.data());\n        float *pB = thrust::raw_pointer_cast(B.data());\n        float *pB2 = thrust::raw_pointer_cast(B2.data());\n        float *pC = thrust::raw_pointer_cast(C.data());\n\n        // A = J * JT\n        cusparseScsrmm(\n                    cusparseHandle,\n                    CUSPARSE_OPERATION_NON_TRANSPOSE,\n                    numConstraints,      // m: rows of J\n                    numConstraints,     // n: cols of JT and A\n                    numParticles2,      // k: cols of J\n                    numConstraints * 4, // nnz: num non-zero elements of J\n                    &alpha,             // needs to be 1.f\n                    matDescr,           // matrix descriptor for J\n                    pJv,                // non zeros values of J\n                    pJr,                // row offsets of J\n                    pJc,                // col indices of J\n                    pJT,                // dense matrix JT\n                    numParticles2,      // leading dimension of JT\n                    &beta,              // needs to be 0.f\n                    pA,                 // matrix A: answer is stored here\n                    numConstraints);    // leading dimension of A\n\n#ifdef GAUSS\n        float minimumError = 0.0001f;\n        uint maximumIterations = gaussIters;\n\n        uint numThreads, numBlocks;\n        computeGridSize(numConstraints, 256, numBlocks, numThreads);\n\n        thrust::fill(C.begin(), C.end(), 0.f);\n//        thrust::fill(deltas.begin(), deltas.end(), 0.f);\n\n//        float *pDeltas = thrust::raw_pointer_cast(deltas.data());\n        uint *pOccurences = thrust::raw_pointer_cast(occurences.data());\n\n        // execute the kernel\n        constraintCentricSolveD<<< numBlocks, numThreads >>>(pA,\n                                                             pB,\n                                                             pJT,\n                                                             pC,\n                                                             particles,\n                                                             indices,\n                                                             pOccurences,\n                                                             numParticles,\n                                                             numConstraints,\n                                                             minimumError,\n                                                             maximumIterations,\n                                                             omega);\n\n#endif\n#ifdef JACOBI\n\n//        A[0] = 2;\n//        A[1] = 5;\n//        A[2] = 1;\n//        A[3] = 7;\n\n//        B[0] = 11;\n//        B[1] = 13;\n\n        // set D as diagonal from A and set A diag to zeros\n        thrust::for_each(\n                    thrust::make_zip_iterator(thrust::make_tuple(first, Dv.begin())),\n                    thrust::make_zip_iterator(thrust::make_tuple(last, Dv.end())),\n                    diag_extraction_functor(pA, numConstraints));\n\n        // T = -D * A (A doubles as T after this computation)\n        alpha = -1.f;\n        cusparseScsrmm(\n                    cusparseHandle,\n                    CUSPARSE_OPERATION_NON_TRANSPOSE,\n                    numConstraints,      // m: rows of D\n                    numConstraints,     // n: cols of D and T (stored in A)\n                    numConstraints,      // k: cols of D\n                    numConstraints, // nnz: num non-zero elements of D\n                    &alpha,             // -1.f\n                    matDescr,           // matrix descriptor for D\n                    pDv,                // non zeros values of D\n                    pDr,                // row offsets of D\n                    pDc,                // col indices of D\n                    pA,                // dense matrix A\n                    numConstraints,      // leading dimension of A\n                    &beta,              // needs to be 0.f\n                    pA,                 // matrix A: answer is stored here\n                    numConstraints);    // leading dimension of A\n\n        // c = D * b\n        alpha = 1.f;\n        cusparseScsrmv(cusparseHandle,\n                       CUSPARSE_OPERATION_NON_TRANSPOSE,\n                       numConstraints,\n                       numConstraints,\n                       numConstraints,\n                       &alpha,\n                       matDescr,\n                       pDv,\n                       pDr,\n                       pDc,\n                       pB,\n                       &beta,\n                       pC);\n\n        thrust::fill(B.begin(), B.end(), 1.f);\n        beta = 1.f;\n\n        for (int i = 0; i < 100; i++)\n        {\n            thrust::copy(C.begin(), C.end(), B2.begin());\n            cublasSgemv(cublasHandle,\n                        CUBLAS_OP_N,\n                        numConstraints,\n                        numConstraints,\n                        &alpha,\n                        pA,\n                        numConstraints,\n                        pB,\n                        1,\n                        &beta,\n                        pB2,\n                        1);\n\n            thrust::copy(C.begin(), C.end(), B.begin());\n            cublasSgemv(cublasHandle,\n                        CUBLAS_OP_N,\n                        numConstraints,\n                        numConstraints,\n                        &alpha,\n                        pA,\n                        numConstraints,\n                        pB2,\n                        1,\n                        &beta,\n                        pB,\n                        1);\n        }\n#endif\n#ifdef SOLVER\n        cusolverDnSpotrf(\n                    cusolverHandle,\n                    CUBLAS_FILL_MODE_LOWER,\n                    numConstraints,\n                    pA,\n                    numConstraints,\n                    d_work,\n                    workSize,\n                    d_devInfo);\n\n        // overwrite b\n        cusolverDnSpotrs(\n                    cusolverHandle,\n                    CUBLAS_FILL_MODE_LOWER,\n                    numConstraints,\n                    1,\n                    pA,\n                    numConstraints,\n                    pB,\n                    numConstraints,\n                    d_devInfo);\n#endif\n#ifndef GAUSS\n        // update particles\n        thrust::for_each(\n                    thrust::make_zip_iterator(thrust::make_tuple(first, W.begin(), occurences.begin())),\n                    thrust::make_zip_iterator(thrust::make_tuple(last, W.end(), occurences.end())),\n                    col_reduction((float4 *) particles, pB, pJT, numParticles2, numConstraints));\n#endif\n\n\n\n\n#ifdef PRINT\n\n        thrust::device_ptr<float> d_deltas(deltas.data());\n        printf(\"Deltas:\\n\");\n        for (uint c = 0; c < numParticles2; c++)\n        {\n            printf(\"%.2f \", (float)*(d_deltas+c));\n        }\n        printf(\"\\n\");\n\n        CSRView J(numConstraints, numParticles2, numConstraints * 4,\n                cusp::make_array1d_view(Jr.begin(), Jr.end()),\n                cusp::make_array1d_view(Jc.begin(), Jc.end()),\n                cusp::make_array1d_view(Jv.begin(), Jv.end()));\n\n        printf(\"J:\\n\");\n        cusp::print(J);\n\n        thrust::device_ptr<float> d_JT(JT.data());\n        printf(\"MATRIX JT:\\n\");\n        for (uint r = 0; r < numParticles2; r++)\n        {\n            for (uint c = 0; c < numConstraints; c++)\n            {\n                uint index = c * numParticles2 + r;\n                printf(\"%.2f \", (float)*(d_JT+index));\n            }\n            printf(\"\\n\");\n        }\n        printf(\"\\n\");\n\n        thrust::device_ptr<float> d_A(A.data());\n        printf(\"MATRIX A:\\n\");\n        for (uint r = 0; r < numConstraints; r++)\n        {\n            for (uint c = 0; c < numConstraints; c++)\n            {\n                uint index = c * numConstraints + r;\n                printf(\"%.2f \", (float)*(d_A+index));\n            }\n            printf(\"\\n\");\n        }\n        printf(\"\\n\");\n\n        CSRView D(numConstraints, numConstraints, numConstraints,\n                cusp::make_array1d_view(Dr.begin(), Dr.end()),\n                cusp::make_array1d_view(Dc.begin(), Dc.end()),\n                cusp::make_array1d_view(Dv.begin(), Dv.end()));\n        printf(\"MATRIX D:\\n\");\n        cusp::print(D);\n\n        printf(\"Vector B:\\n\");\n        for (uint c = 0; c < numConstraints; c++)\n        {\n            printf(\"%.2f \", (float)*(d_B+c));\n        }\n        printf(\"\\n\");\n\n        thrust::device_ptr<float> d_B2(B2.data());\n        printf(\"Vector B2:\\n\");\n        for (uint c = 0; c < numConstraints; c++)\n        {\n            printf(\"%.2f \", (float)*(d_B2+c));\n        }\n        printf(\"\\n\");\n\n        thrust::device_ptr<float> d_C(C.data());\n        printf(\"Vector C:\\n\");\n        for (uint c = 0; c < numConstraints; c++)\n        {\n            printf(\"%.2f \", (float)*(d_C+c));\n        }\n        printf(\"\\n\");\n\n        thrust::device_ptr<float4> d_pos4((float4 *)particles);\n        for (uint i = 0; i < numParticles; i++)\n        {\n            printf(\"Pos : (%.2f, %.2f, %.2f, %.2f)\\n\",\n                   ((float4)*(d_pos4+i)).x,((float4)*(d_pos4+i)).y,\n                   ((float4)*(d_pos4+i)).z,((float4)*(d_pos4+i)).w);\n        }\n\n#endif\n    }\n\n\n    void addRigidBody(float *hpos, int width, int height, float2 center, float particleRadius)\n    {\n        float diameter = particleRadius * 2;\n        float startX = center.x - (width * .5f) * diameter + particleRadius;\n        float startY = center.y - (height * .5f) * diameter + particleRadius;\n\n        float2 posSum = make_float2(0.f);\n        int numParticles = 0;\n\n        d_rbAngle.push_back(0);\n        d_rbRStart.push_back(d_Rs.size());\n        d_rbPartStart.push_back(0);\n\n        float2 pos;\n        int index = 0;\n        for (int i = 0; i < width; i++)\n        {\n            for (int j = 0; j < height; j++)\n            {\n                pos = make_float2(startX + i * diameter, startY + j * diameter);\n                hpos[index]   = pos.x;\n                hpos[index+1] = pos.y;\n                hpos[index+2] = 0.f;\n                hpos[index+3] = 1.f;\n\n                d_Rs.push_back(pos.x - center.x);\n                d_Rs.push_back(pos.y - center.y);\n\n                posSum += pos;\n                numParticles++;\n                index += 4;\n            }\n        }\n\n        d_rbCenterMass.push_back(posSum.x / numParticles);\n        d_rbCenterMass.push_back(posSum.y / numParticles);\n        d_rbSize.push_back(numParticles);\n\n    }\n\n    void solveRigidBodies()\n    {\n        float *dRs = thrust::raw_pointer_cast(d_Rs.data());\n\n        thrust::for_each(\n                    thrust::make_zip_iterator(thrust::make_tuple(d_rbAngle.begin(), d_rbCenterMass.begin(), d_rbPartStart.begin(), d_rbRStart.begin(), d_rbSize.begin())),\n                    thrust::make_zip_iterator(thrust::make_tuple(d_rbAngle.end(), d_rbCenterMass.end(), d_rbPartStart.end(), d_rbRStart.end(), d_rbSize.end())),\n                    rigid_body_functor((float2*) dRs));\n    }\n\n//    thrust::device_vector<float> d_rbAngle;\n//    thrust::device_vector<float> d_rbCenterMass;    // dim2\n//    thrust::device_vector<uint> d_rbPartStart;\n//    thrust::device_vector<uint> d_rbRStart;\n//    thrust::device_vector<uint> d_rbSize;\n\n//    thrust::device_vector<float> d_Rs;              // dim 2\n}\n"
  },
  {
    "path": "gpu/src/debugprinting.h",
    "content": "#ifndef DEBUGPRINTING_H\n#define DEBUGPRINTING_H\n\n#include <iostream>\nusing namespace std;\n#define GLM_FORCE_RADIANS\n#include \"gtx/string_cast.hpp\"\n\n#endif // DEBUGPRINTING_H\n"
  },
  {
    "path": "gpu/src/main.cpp",
    "content": "#include <QApplication>\n#include <iostream>\n#include \"mainwindow.h\"\n\nint main(int argc, char *argv[])\n{\n#ifdef CUDA\n    QApplication a(argc, argv);\n    MainWindow w;\n\n    // We cannot use w.showFullscreen() here because on Linux that creates the\n    // window behind all other windows, so we have to set it to fullscreen after\n    // it has been shown. \n    w.show();\n    w.setWindowState(w.windowState() | Qt::WindowFullScreen); // Comment out this line to have a windowed 800x600 game on startup.\n\n    return a.exec();\n#else\n    std::cout << \"The CUDA directory required to run this program cannot be located.\\nExiting...\" << std::endl;\n    return 0;\n#endif\n\n}\n\n"
  },
  {
    "path": "gpu/src/particleapp.cpp",
    "content": "/*\n * This class controls helper classes for rendering and\n * updating the particle system.\n *\n * Mouse events, key events, window sizing, timing updates,\n * and render calls are all received by this application then\n * passed to the corresponding render or particlesystem class.\n */\n\n#include <cuda_runtime.h>\n#include <QMouseEvent>\n#include <QWheelEvent>\n#include <QKeyEvent>\n#include <random>\n#include <unistd.h>\n\n#include \"particleapp.h\"\n#include \"particlesystem.h\"\n#include \"renderer.h\"\n#include \"helper_math.h\"\n#include \"util.cuh\"\n\n#define MAX_PARTICLES 15000 // (vbo size)\n#define PARTICLE_RADIUS 0.25f\n#define GRID_SIZE make_uint3(64, 64, 64) // 3D\n\n\nParticleApp::ParticleApp()\n    : m_particleSystem(NULL),\n      m_renderer(NULL),\n      m_mouseDownL(false),\n      m_mouseDownR(false),\n      m_fluidEmmiterOn(false),\n      m_timer(-1.f)\n{\n    cudaInit();\n\n    m_particleSystem = new ParticleSystem(PARTICLE_RADIUS, GRID_SIZE, MAX_PARTICLES, make_int3(-50, 0, -50), make_int3(50, 200, 50), 5);\n    m_renderer = new Renderer(m_particleSystem->getMinBounds(), m_particleSystem->getMaxBounds());\n    m_renderer->createVAO(m_particleSystem->getCurrentReadBuffer(),\n                          m_particleSystem->getParticleRadius());\n    makeInitScene();\n}\n\n\nParticleApp::~ParticleApp()\n{\n    if (m_particleSystem)\n        delete m_particleSystem;\n    if (m_renderer)\n        delete m_renderer;\n\n    // cudaDeviceReset causes the driver to clean up all state. While\n    // not mandatory in normal operation, it is good practice.  It is also\n    // needed to ensure correct operation when the application is being\n    // profiled. Calling cudaDeviceReset causes all profile data to be\n    // flushed before the application exits\n    cudaDeviceReset();\n}\n\ninline float frand()\n{\n    return rand() / (float) RAND_MAX;\n}\n\nvoid ParticleApp::makeInitScene()\n{\n    m_particleSystem->addRope(make_float3(0, 20, 0), make_float3(0, -.5, 0), .4f, 32, 1.f, true);\n}\n\n\nvoid ParticleApp::tick(float secs)\n{\n    if (m_fluidEmmiterOn && m_timer <= 0.f)\n    {\n        m_particleSystem->addFluid(make_int3(-1,0,-1), make_int3(1,1,1), 1.f, 1.f, make_float3(0,0,1));\n        m_timer = 0.1f;\n    }\n    m_timer -= secs;\n\n    m_particleSystem->update(secs);\n    m_renderer->update(secs);\n}\n\n\nvoid ParticleApp::render()\n{\n    m_renderer->render(m_particleSystem->getColorIndex(), m_particleSystem->getColors());\n}\n\n\nvoid ParticleApp::mousePressed(QMouseEvent *e, float x, float y)\n{\n    // shoot a particle into the sceen on left mouse click\n    if (e->button() == Qt::LeftButton)\n    {\n        m_particleSystem->setParticleToAdd(m_renderer->getEye(), m_renderer->getDir(x, y) * 30.f, 2.f);\n        m_mouseDownL = true;\n    }\n    else if (e->button() == Qt::RightButton)\n    {\n        m_mouseDownR = true;\n    }\n\n}\n\nvoid ParticleApp::mouseReleased(QMouseEvent *e, float, float)\n{\n    if (e->button() == Qt::LeftButton)\n    {\n        m_mouseDownL = false;\n    }\n    if (e->button() == Qt::RightButton)\n    {\n        m_mouseDownR = false;\n    }\n}\n\n\nvoid ParticleApp::mouseMoved(QMouseEvent *e, float deltaX, float deltaY)\n{\n    m_renderer->mouseMoved(e, deltaX, deltaY);\n}\n\nvoid ParticleApp::mouseScrolled(QWheelEvent *) {}\n\n\nvoid ParticleApp::keyPressed(QKeyEvent *e)\n{\n    m_renderer->keyPressed(e);\n}\n\nvoid ParticleApp::keyReleased(QKeyEvent *e)\n{\n    bool resetVbo = true;\n    float3 h, vec;\n    float angle;\n\n\n    // numbers 0-9 toggle different scenes\n    switch (e->key())\n    {\n    case Qt::Key_1: // single rope\n        delete m_particleSystem;\n        m_particleSystem = new ParticleSystem(PARTICLE_RADIUS, GRID_SIZE, MAX_PARTICLES, make_int3(-50, 0, -50), make_int3(50, 200, 50), 5);\n        makeInitScene();\n        break;\n    case Qt::Key_2: // single cloth\n        delete m_particleSystem;\n        m_particleSystem = new ParticleSystem(PARTICLE_RADIUS, GRID_SIZE, MAX_PARTICLES, make_int3(-50, 0, -50), make_int3(50, 200, 50), 5);\n        m_particleSystem->addHorizCloth(make_int2(0, -3), make_int2(6,3), make_float3(.5f,7.f,.5f), make_float2(.3f, .3f), 3.f, false);\n        break;\n    case Qt::Key_3: // two fluids, different densities\n        delete m_particleSystem;\n        m_particleSystem = new ParticleSystem(PARTICLE_RADIUS, GRID_SIZE, MAX_PARTICLES, make_int3(-7, 0, -5), make_int3(7, 20, 5), 5);\n        m_particleSystem->addFluid(make_int3(-7, 0, -5), make_int3(7, 5, 5), 1.f, 2.f, colors[rand() % numColors]);\n        m_particleSystem->addFluid(make_int3(-7, 5, -5), make_int3(7, 10, 5), 1.f, 3.f, colors[rand() % numColors]);\n        break;\n    case Qt::Key_4: // one solid particle stack\n        delete m_particleSystem;\n        m_particleSystem = new ParticleSystem(PARTICLE_RADIUS, GRID_SIZE, MAX_PARTICLES, make_int3(-50, 0, -50), make_int3(50, 200, 50), 5);\n        m_particleSystem->addParticleGrid(make_int3(-3, 0, -3), make_int3(3, 20, 3), 1.f, false);\n        break;\n    case Qt::Key_5: // three solid particle stacks\n        delete m_particleSystem;\n        m_particleSystem = new ParticleSystem(PARTICLE_RADIUS, GRID_SIZE, MAX_PARTICLES, make_int3(-50, 0, -50), make_int3(50, 200, 50), 5);\n        m_particleSystem->addParticleGrid(make_int3(-10, 0, -3), make_int3(-7, 10, 3), 1.f, false);\n        m_particleSystem->addParticleGrid(make_int3(-3, 0, -3), make_int3(3, 10, 3), 1.f, false);\n        m_particleSystem->addParticleGrid(make_int3(7, 0, -3), make_int3(10, 10, 3), 1.f, false);\n        break;\n    case Qt::Key_6: // particles on cloth\n        delete m_particleSystem;\n        m_particleSystem = new ParticleSystem(PARTICLE_RADIUS, GRID_SIZE, MAX_PARTICLES, make_int3(-50, 0, -50), make_int3(50, 200, 50), 5);\n        m_particleSystem->addHorizCloth(make_int2(-10, -10), make_int2(10, 10), make_float3(.3f, 5.5f, .3f), make_float2(.1f, .1f), 10.f, true);\n        m_particleSystem->addParticleGrid(make_int3(-3, 6, -3), make_int3(3, 15, 3), 1.f, false);\n        break;\n    case Qt::Key_7: // fluid blob\n        delete m_particleSystem;\n        m_particleSystem = new ParticleSystem(PARTICLE_RADIUS, GRID_SIZE, MAX_PARTICLES, make_int3(-50, 0, -50), make_int3(50, 200, 50), 5);\n        m_particleSystem->addFluid(make_int3(-7, 6, -7), make_int3(7, 13, 7), 1.f, 1.5f, colors[rand() % numColors]);\n        break;\n    case Qt::Key_8: // combo scene\n        delete m_particleSystem;\n        m_particleSystem = new ParticleSystem(PARTICLE_RADIUS, GRID_SIZE, MAX_PARTICLES, make_int3(-50, 0, -50), make_int3(50, 200, 50), 5);\n        m_particleSystem->addHorizCloth(make_int2(14, -4), make_int2(24, 6), make_float3(.3f, 2.5f, .3f), make_float2(.25f, .25f), 10.f, true);\n        m_particleSystem->addHorizCloth(make_int2(10, -10), make_int2(25, -5), make_float3(.3f, 15.5f, .3f), make_float2(.25f, .25f), 3.f, false);\n        m_particleSystem->addRope(make_float3(-17, 20, -17), make_float3(0, -.5, 0.001f), .4f, 30, 1.f, true);\n        m_particleSystem->addRope(make_float3(-16, 20, -17), make_float3(0, 0, .5f), .4f, 50, 1.f, true);\n        m_particleSystem->addRope(make_float3(-17, 20, -16), make_float3(0, -.5, 0.001f), .4f, 40, 1.f, true);\n        m_particleSystem->addParticleGrid(make_int3(17, 6, 0), make_int3(21, 11, 4), 1.f, false);\n        m_particleSystem->addParticleGrid(make_int3(-12, 0, -20), make_int3(0, 12, -17), 1.f, false);\n        m_particleSystem->addParticleGrid(make_int3(-18, 0, -15), make_int3(-16, 9, -12), 1.f, false);\n        m_particleSystem->addStaticSphere(make_int3(5, 5, -10), make_int3(10, 10, -5), .5f);\n        break;\n    case Qt::Key_9: // ropes on immovable sphere\n        delete m_particleSystem;\n        m_particleSystem = new ParticleSystem(PARTICLE_RADIUS, GRID_SIZE, MAX_PARTICLES, make_int3(-50, 0, -50), make_int3(50, 200, 50), 5);\n\n        h = make_float3(0, 10, 0);\n        for(int i = 0; i < 50; i++)\n        {\n            angle = M_PI * i * 0.02f;\n            vec = make_float3(cos(angle), sin(angle), 0.f);\n            m_particleSystem->addRope(vec*5.f + h, vec*.5f, .35f, 30, 1.f, true);\n        }\n        m_particleSystem->addStaticSphere(make_int3(-4, 7, -4), make_int3(4, 16, 4), .5f);\n\n        break;\n    case Qt::Key_0: // empty scene\n        delete m_particleSystem;\n        m_particleSystem = new ParticleSystem(PARTICLE_RADIUS, GRID_SIZE, MAX_PARTICLES, make_int3(-50, 0, -50), make_int3(50, 200, 50), 5);\n        break;\n    case Qt::Key_Space: // toggle fluids at origin\n        m_fluidEmmiterOn = !m_fluidEmmiterOn;\n        break;\n    default:\n        resetVbo = false;\n        m_renderer->keyReleased(e);\n        break;\n    }\n    if (resetVbo)\n    {\n        m_renderer->createVAO(m_particleSystem->getCurrentReadBuffer(),\n                              m_particleSystem->getParticleRadius());\n    }\n}\n\n\nvoid ParticleApp::resize(int w, int h)\n{\n    m_renderer->resize(w, h);\n}\n\n\n"
  },
  {
    "path": "gpu/src/particleapp.h",
    "content": "#ifndef PARTICLEAPP_H\n#define PARTICLEAPP_H\n\nclass QMouseEvent;\nclass QWheelEvent;\nclass QKeyEvent;\nclass ParticleSystem;\nclass Renderer;\n\nclass ParticleApp\n{\npublic:\n    ParticleApp();\n    ~ParticleApp();\n\n    void render();\n    void tick(float secs);\n\n    void mousePressed(QMouseEvent *e, float x, float y);\n    void mouseReleased(QMouseEvent *e, float x, float y);\n    void mouseMoved(QMouseEvent *e, float deltaX, float deltaY);\n    void mouseScrolled(QWheelEvent *e);\n\n    void keyPressed(QKeyEvent *e);\n    void keyReleased(QKeyEvent *e);\n\n    void resize(int w, int h);\n\nprivate:\n    void makeInitScene();\n\n    ParticleSystem *m_particleSystem;\n    Renderer *m_renderer;\n\n    bool m_mouseDownL;\n    bool m_mouseDownR;\n\n    bool m_fluidEmmiterOn;\n    float m_timer;\n};\n\n#endif // PARTICLEAPP_H\n"
  },
  {
    "path": "gpu/src/particlesystem.cpp",
    "content": "/*\n * This class contains the main particle simulation loop.\n * Calls are made to the GPU to initialize, update, and\n * eventually terminate the simulation.\n */\n\n#include <GL/glew.h>\n#include <string.h>\n#include <assert.h>\n#include <math.h>\n\n#include <cuda_runtime.h>\n#include <helper_cuda.h>\n#include <thrust/host_vector.h>\n\n#include \"particlesystem.h\"\n#include \"wrappers.cuh\"\n#include \"kernel.cuh\"\n#include \"util.cuh\"\n#include \"shared_variables.cuh\"\n#include \"helper_math.h\"\n\n/**\n * @brief ParticleSystem::ParticleSystem\n *\n *     Initializes variable and GPU memory needed\n *     for the particle simulation\n *\n * @param particleRadius\n * @param gridSize\n * @param maxParticles\n * @param minBounds\n * @param maxBounds\n * @param iterations\n */\nParticleSystem::ParticleSystem(float particleRadius, uint3 gridSize, uint maxParticles, int3 minBounds, int3 maxBounds, int iterations)\n    : m_initialized(false),\n      m_particleRadius(particleRadius),\n      m_maxParticles(maxParticles),\n      m_numParticles(0),\n//      m_dPos(0),\n      m_posVbo(0),\n      m_cuda_posvbo_resource(0),\n      m_gridSize(gridSize),\n      m_rigidIndex(0),\n      m_minBounds(minBounds),\n      m_maxBounds(maxBounds),\n      m_solverIterations(iterations)\n{\n    m_numGridCells = m_gridSize.x * m_gridSize.y * m_gridSize.z;\n\n    m_gridSortBits = 18;\n\n    // set simulation parameters\n    m_params.gridSize = m_gridSize;\n    m_params.numCells = m_numGridCells;\n    m_params.numBodies = m_numParticles;\n\n    m_params.particleRadius = m_particleRadius;\n\n    m_params.worldOrigin = make_float3(0.f, 0.f, 0.f);\n    float cellSize = m_params.particleRadius * 2.0f;  // cell size equal to particle diameter\n    m_params.cellSize = make_float3(cellSize);\n\n    m_params.gravity = make_float3(0.0f, -9.8f, 0.0f);\n    m_params.globalDamping = 1.0f;\n\n    _init(0, maxParticles);\n}\n\n\nParticleSystem::~ParticleSystem()\n{\n    _finalize();\n}\n\n\ninline float frand()\n{\n    return rand() / (float) RAND_MAX;\n}\n\n\nvoid ParticleSystem::_init(uint numParticles, uint maxParticles)\n{\n    m_maxParticles = maxParticles;\n    m_numParticles = numParticles;\n    initIntegration();\n\n    /*\n     *  allocate GPU data\n     */\n    uint memSize = sizeof(GLfloat) * 4 * m_maxParticles;\n\n    m_posVbo = createVBO(sizeof(GLfloat) * 4 * m_maxParticles);\n    registerGLBufferObject(m_posVbo, &m_cuda_posvbo_resource);\n\n    // grid and collisions\n    allocateArray((void **)&m_dSortedPos, memSize);\n    allocateArray((void **)&m_dSortedW, m_maxParticles*sizeof(float));\n    allocateArray((void **)&m_dSortedPhase, m_maxParticles*sizeof(int));\n\n    allocateArray((void **)&m_dGridParticleHash, m_maxParticles*sizeof(uint));\n    allocateArray((void **)&m_dGridParticleIndex, m_maxParticles*sizeof(uint));\n\n    allocateArray((void **)&m_dCellStart, m_numGridCells*sizeof(uint));\n    allocateArray((void **)&m_dCellEnd, m_numGridCells*sizeof(uint));\n\n    setParameters(&m_params);\n\n    m_initialized = true;\n}\n\n\nvoid ParticleSystem::_finalize()\n{\n    assert(m_initialized);\n\n    freeArray(m_dSortedPos);\n    freeArray(m_dSortedW);\n    freeArray(m_dSortedPhase);\n\n    freeArray(m_dGridParticleHash);\n    freeArray(m_dGridParticleIndex);\n    freeArray(m_dCellStart);\n    freeArray(m_dCellEnd);\n\n    unregisterGLBufferObject(m_cuda_posvbo_resource);\n    glDeleteBuffers(1, (const GLuint *)&m_posVbo);\n\n    freeIntegrationVectors();\n    freeSolverVectors();\n    freeSharedVectors();\n}\n\n/**\n * @brief ParticleSystem::update\n *\n *      A single step of the simulation loop.\n *      Makes calls to extern CUDA functions.\n *\n * @param deltaTime - the time (seconds) between this loop and the last one\n */\nvoid ParticleSystem::update(float deltaTime)\n{\n    assert(m_initialized);\n\n    // avoid large timesteps\n    deltaTime = std::min(deltaTime, .05f);\n\n    if (m_numParticles == 0)\n    {\n        addNewStuff();\n        return;\n    }\n\n    // get pointer to vbo of point positions\n    // note: this should be changed eventually so the vbo can be\n    // set to render things other than just points\n    float *dPos = (float *) mapGLBufferObject(&m_cuda_posvbo_resource);\n\n    // update constants\n    setParameters(&m_params);\n\n    // store current positions then guess\n    // new positions based on forces\n    integrateSystem(dPos,\n                    deltaTime,\n                    m_numParticles);\n\n    for (uint i = 0; i < m_solverIterations; i++)\n    {\n        // calculate grid hash\n        calcHash(   m_dGridParticleHash,\n                    m_dGridParticleIndex,\n                    dPos,\n                    m_numParticles);\n\n        // sort particles based on hash\n        sortParticles(m_dGridParticleHash,\n                      m_dGridParticleIndex,\n                      m_numParticles);\n\n        // reorder particle arrays into sorted order and\n        // find start and end of each cell\n        reorderDataAndFindCellStart(\n                    m_dCellStart,\n                    m_dCellEnd,\n                    m_dSortedPos,\n                    m_dSortedW,\n                    m_dSortedPhase,\n                    m_dGridParticleHash,\n                    m_dGridParticleIndex,\n                    dPos,\n                    m_numParticles,\n                    m_numGridCells);\n\n        // find particle neighbors and process collisions\n        collide(    dPos,\n                    m_dSortedPos,\n                    m_dSortedW,\n                    m_dSortedPhase,\n                    m_dGridParticleIndex,\n                    m_dCellStart,\n                    m_dCellEnd,\n                    m_numParticles,\n                    m_numGridCells);\n\n        // find neighbors within a specified radius of fluids\n        // and apply fluid constraints\n        solveFluids(m_dSortedPos,\n                    m_dSortedW,\n                    m_dSortedPhase,\n                    m_dGridParticleIndex,\n                    m_dCellStart,\n                    m_dCellEnd,\n                    dPos,\n                    m_numParticles,\n                    m_numGridCells);\n\n        // apply collision constraints for the world borders\n        collideWorld(dPos,\n                     m_dSortedPos,\n                     m_numParticles,\n                     m_minBounds,\n                     m_maxBounds);\n\n        // apply distance constraints\n        solveDistanceConstraints(dPos);\n\n        // apply point constraints\n        solvePointConstraints(dPos);\n    }\n\n    // determine the current position based on distance\n    // travelled during current timestep\n    calcVelocity(dPos,\n                 deltaTime,\n                 m_numParticles);\n\n    // unmap at end here to avoid unnecessary graphics/CUDA context switch\n    unmapGLBufferObject(m_cuda_posvbo_resource);\n\n    // add new particles to the scene\n    addNewStuff();\n}\n\n\nvoid ParticleSystem::addNewStuff()\n{\n    addParticles();\n    addFluids();\n}\n\n\nvoid ParticleSystem::addParticles()\n{\n    if (m_particlesToAdd.empty())\n        return;\n\n    uint size = m_particlesToAdd.size() / 2;\n    float4 pos, vel;\n    for (uint i = 0; i < size; i++)\n    {\n        pos = m_particlesToAdd.front();\n        m_particlesToAdd.pop_front();\n        vel = m_particlesToAdd.front();\n        m_particlesToAdd.pop_front();\n        addParticle(pos, make_float4(vel.x, vel.y, vel.z, 0), vel.w, 1.5f, SOLID);\n    }\n}\n\nvoid ParticleSystem::addFluids()\n{\n    if (m_fluidsToAdd.empty())\n        return;\n\n    uint start = m_numParticles;\n\n    uint size = m_fluidsToAdd.size() / 2;\n    float4 pos, color;\n    for (uint i = 0; i < size; i++)\n    {\n        pos = m_fluidsToAdd.front();\n        m_fluidsToAdd.pop_front();\n        color = m_fluidsToAdd.front();\n        m_fluidsToAdd.pop_front();\n        addParticle(make_float4(make_float3(pos), 1), make_float4(0,-1,0,0), pos.w, color.w, FLUID);\n    }\n\n    m_colorIndex.push_back(make_int2(start, m_numParticles));\n    m_colors.push_back(make_float4(make_float3(color), 1.f));\n}\n\n\nvoid ParticleSystem::setParticleToAdd(float3 pos, float3 vel, float mass)\n{\n    float jitter = m_particleRadius * 0.01f;\n    pos.x += (frand()*2.0f-1.0f) * jitter;\n    pos.y += (frand()*2.0f-1.0f) * jitter;\n    m_particlesToAdd.push_back(make_float4(pos, 1.f));\n    m_particlesToAdd.push_back(make_float4(vel, mass));\n\n    m_colorIndex.push_back(make_int2(m_numParticles, m_numParticles+1));\n    m_colors.push_back(make_float4(colors[rand() % numColors], 1.f));\n}\n\n\nvoid ParticleSystem::addParticle(float4 pos, float4 vel, float mass, float ro, int phase)\n{\n    if (m_numParticles == m_maxParticles)\n        return;\n\n    float *data = (float*)&pos;\n    unregisterGLBufferObject(m_cuda_posvbo_resource);\n    glBindBuffer(GL_ARRAY_BUFFER, m_posVbo);\n    glBufferSubData(GL_ARRAY_BUFFER, m_numParticles*4*sizeof(float), 4*sizeof(float), data);\n    glBindBuffer(GL_ARRAY_BUFFER, 0);\n    registerGLBufferObject(m_posVbo, &m_cuda_posvbo_resource);\n\n    float *hv = (float*)&vel;\n    float *hro = &ro;\n    int *hphase = &phase;\n    float w = 1.f / mass;\n    float *hw = &w;\n\n    appendIntegrationParticle(hv, hro, 1);\n    appendPhaseAndMass(hphase, hw, 1);\n    appendSolverParticle(1);\n    m_numParticles++;\n}\n\nvoid ParticleSystem::addParticleMultiple(float *pos, float *vel, float *mass, float *ro, int *phase, int numParticles)\n{\n    if (m_numParticles + numParticles >= m_maxParticles)\n        return;\n\n    unregisterGLBufferObject(m_cuda_posvbo_resource);\n    glBindBuffer(GL_ARRAY_BUFFER, m_posVbo);\n    glBufferSubData(GL_ARRAY_BUFFER, m_numParticles*4*sizeof(float), numParticles*4*sizeof(float), pos);\n    glBindBuffer(GL_ARRAY_BUFFER, 0);\n    registerGLBufferObject(m_posVbo, &m_cuda_posvbo_resource);\n\n    appendIntegrationParticle(vel, ro, numParticles);\n    appendPhaseAndMass(phase, mass, numParticles);\n    appendSolverParticle(numParticles);\n    m_numParticles += numParticles;\n}\n\nvoid ParticleSystem::setFluidToAdd(float3 pos, float3 color, float mass, float density)\n{\n    m_fluidsToAdd.push_back(make_float4(pos, mass));\n    m_fluidsToAdd.push_back(make_float4(color, density));\n}\n\n\nvoid ParticleSystem::addFluid(int3 ll, int3 ur, float mass, float density, float3 color)\n{\n    int start = m_numParticles;\n    float jitter = m_particleRadius * 0.01f;\n    float distance = m_particleRadius * 2.5f/*1.667 * density*/;\n\n    int3 count = make_int3((int)ceil(ur.x - ll.x) / distance, (int)ceil(ur.y - ll.y) / distance, (int)ceil(ur.z - ll.z) / distance);\n\n    int arraySize = count.x * count.y * count.z;\n    float pos[arraySize * 4];\n    float vel[arraySize * 4];\n    float w[arraySize];\n    float ro[arraySize];\n    int phase[arraySize];\n    int index = 0;\n\n#ifndef TWOD\n    for (int z = 0; z < count.z; z++)\n    {\n#endif\n        for (int y = 0; y < count.y; y++)\n        {\n            for (int x = 0; x < count.x; x++)\n            {\n                pos[index * 4] = ll.x + x * distance + (frand()*2.0f-1.0f)*jitter;\n                pos[index*4+1] = ll.y + y * distance + (frand()*2.0f-1.0f)*jitter;\n            #ifdef TWOD\n                pos[index*4+2] = ZPOS;\n            #else\n                pos[index*4+2] = ll.z + z * distance + (frand()*2.0f-1.0f)*jitter;\n            #endif\n                pos[index*4+3] = 1.f;\n\n                index++;\n            }\n        }\n#ifndef TWOD\n    }\n#endif\n    memset(vel, 0, arraySize * 4 * sizeof(float));\n    std::fill(w, w + arraySize, 1.f / mass);\n    std::fill(ro, ro + arraySize, density);\n    std::fill(phase, phase + arraySize, FLUID);\n\n    addParticleMultiple(pos, vel, w, ro, phase, arraySize);\n\n    m_colorIndex.push_back(make_int2(start, m_numParticles));\n    m_colors.push_back(make_float4(color, 1.f));\n}\n\n\nvoid ParticleSystem::addParticleGrid(int3 ll, int3 ur, float mass, bool addJitter)\n{\n    int start = m_numParticles;\n    float jitter = 0.f;\n    if (addJitter)\n        jitter = m_particleRadius * 0.01f;\n    float distance = m_particleRadius * 2.002f;\n\n    int3 count = make_int3((int)ceil(ur.x - ll.x) / distance, (int)ceil(ur.y - ll.y) / distance, (int)ceil(ur.z - ll.z) / distance);\n\n    int arraySize = count.x * count.y * count.z;\n    float pos[arraySize * 4];\n    float vel[arraySize * 4];\n    float w[arraySize];\n    float ro[arraySize];\n    int phase[arraySize];\n    int index = 0;\n\n#ifndef TWOD\n    for (int z = 0; z < count.z; z++)\n    {\n#endif\n        for (int y = 0; y < count.y; y++)\n        {\n            for (int x = 0; x < count.x; x++)\n            {\n                pos[index * 4] = ll.x + x * distance + (frand()*2.0f-1.0f)*jitter;\n                pos[index*4+1] = ll.y + y * distance + (frand()*2.0f-1.0f)*jitter;\n            #ifdef TWOD\n                pos[index*4+2] = ZPOS;\n            #else\n                pos[index*4+2] = ll.z + z * distance + (frand()*2.0f-1.0f)*jitter;\n            #endif\n                pos[index*4+3] = 1.f;\n\n                index++;\n            }\n        }\n#ifndef TWOD\n    }\n#endif\n    memset((void*)vel, 0, arraySize * 4 * sizeof(float));\n    std::fill(w, w + arraySize, 1.f / mass);\n    std::fill(ro, ro + arraySize, 1.f);\n    std::fill(phase, phase + arraySize, SOLID);\n\n    addParticleMultiple(pos, vel, w, ro, phase, arraySize);\n\n    m_colorIndex.push_back(make_int2(start, m_numParticles));\n    m_colors.push_back(make_float4(colors[rand() % numColors], 1.f));\n}\n\n\nvoid ParticleSystem::addHorizCloth(int2 ll, int2 ur, float3 spacing, float2 dist, float mass, bool holdEdges)\n{\n    int start = m_numParticles;\n\n    int2 count = make_int2((int)ceil(ur.x - ll.x) / spacing.x, (int)ceil(ur.y - ll.y) / spacing.z);\n\n    // particle setup\n    int arraySize = count.x * count.y;\n    float pos[arraySize * 4];\n    float vel[arraySize * 4];\n    float w[arraySize];\n    float ro[arraySize];\n    int phase[arraySize];\n    int index = 0;\n\n    // constraint setup\n    uint numDists = (count.x-1) * (count.y-1) + count.x * count.y - 1;\n    uint numPoints;\n    if (holdEdges)\n        numPoints = 2 * (count.x + count.y);\n    else\n        numPoints = count.y;\n\n    float points[numPoints * 3];\n    uint indicesP[numPoints];\n    int pi = 0, di = 0;\n\n    uint indicesD[numDists * 2];\n    float dists[numDists];\n\n#ifndef TWOD\n    for (int z = 0; z < count.y; z++)\n    {\n#endif\n        for (int x = 0; x < count.x; x++)\n        {\n            pos[index * 4] = ll.x + x * spacing.x,\n            pos[index*4+1] = spacing.y,\n        #ifdef TWOD\n            pos[index*4+2] = ZPOS,\n        #else\n            pos[index*4+2] = ll.y + z * spacing.z,\n        #endif\n            pos[index*4+3] = 1.f;\n\n//            addParticle(pos, make_float4(0.f), mass, 1.f, RIGID + m_rigidIndex);\n\n            uint particleIndex = start + z * count.x + x;\n            if (x > 0)\n            {\n                indicesD[di*2] = particleIndex - 1;\n                indicesD[di*2+1] = particleIndex;\n                dists[di] = dist.x;\n                di++;\n            }\n            else\n            {\n                indicesP[pi] = particleIndex;\n                memcpy(points+pi*3, pos+index * 4, 3*sizeof(float));\n//                points[pi*3] = pos.x; points[pi*3+1] = pos.y; points[pi*3+2] = pos.z;\n                pi++;\n            }\n            if (z > 0)\n            {\n                indicesD[di*2] = particleIndex - count.x;\n                indicesD[di*2+1] = particleIndex;\n                dists[di] = dist.y;\n                di++;\n            }\n            else if (holdEdges)\n            {\n                indicesP[pi] = particleIndex;\n                memcpy(points+pi*3, pos+index * 4, 3*sizeof(float));\n//                points[pi*3] = pos.x; points[pi*3+1] = pos.y; points[pi*3+2] = pos.z;\n                pi++;\n            }\n            if (x == count.x - 1 && holdEdges)\n            {\n                indicesP[pi] = particleIndex;\n                memcpy(points+pi*3, pos+index * 4, 3*sizeof(float));\n//                points[pi*3] = pos.x; points[pi*3+1] = pos.y; points[pi*3+2] = pos.z;\n                pi++;\n            }\n            if (z == count.y - 1 && holdEdges)\n            {\n                indicesP[pi] = particleIndex;\n                memcpy(points+pi*3, pos+index * 4, 3*sizeof(float));\n//                points[pi*3] = pos.x; points[pi*3+1] = pos.y; points[pi*3+2] = pos.z;\n                pi++;\n            }\n            index++;\n        }\n#ifndef TWOD\n    }\n#endif\n    memset((void*)vel, 0, arraySize * 4 * sizeof(float));\n    std::fill(w, w + arraySize, 1.f / mass);\n    std::fill(ro, ro + arraySize, 1.f);\n    std::fill(phase, phase + arraySize, RIGID + m_rigidIndex/*CLOTH*/);\n\n    addParticleMultiple(pos, vel, w, ro, phase, arraySize);\n    addPointConstraint(indicesP, points, numPoints);\n    addDistanceConstraint(indicesD, dists, numDists);\n\n    m_colorIndex.push_back(make_int2(start, m_numParticles));\n    m_colors.push_back(make_float4(colors[rand() % numColors], 1.f));\n    m_rigidIndex++;\n}\n\nvoid ParticleSystem::addRope(float3 start, float3 spacing, float dist, int numLinks, float mass, bool constrainStart)\n{\n    uint startI = m_numParticles;\n\n    // particle setup\n    int arraySize = numLinks+1;\n    float pos[arraySize * 4];\n    float vel[arraySize * 4];\n    float w[arraySize];\n    float ro[arraySize];\n    int phase[arraySize];\n\n    pos[0] = start.x; pos[1] = start.y; pos[2] = start.z; pos[3] = 1.f;\n\n    float4 pos4;\n\n    uint indicesD[numLinks * 2];\n    float dists[numLinks];\n    int di = 0;\n\n    int i;\n    for (i = 1; i <= numLinks; i++)\n    {\n        pos4 = make_float4(start + i * spacing, 1.f);\n        memcpy(pos+i*4, &pos4, 4*sizeof(float));\n//        pos[i*4] = pos4.x; pos[i*4+1] = pos4.y; pos[i*4+2] = pos4.z; pos[i*4+3] = pos4.w;\n\n        indicesD[di*2] = startI + i - 1;\n        indicesD[di*2+1] = startI + i;\n        dists[di] = dist;\n        di++;\n    }\n    memset((void*)vel, 0, arraySize * 4 * sizeof(float));\n    std::fill(w, w + arraySize, 1.f / mass);\n    std::fill(ro, ro + arraySize, 1.f);\n    std::fill(phase, phase + arraySize, RIGID + m_rigidIndex);\n\n    addParticleMultiple(pos, vel, w, ro, phase, arraySize);\n    addDistanceConstraint(indicesD, dists, numLinks);\n\n    if (constrainStart)\n        addPointConstraint(&startI, (float*)&start, 1);\n\n    m_colorIndex.push_back(make_int2(startI, m_numParticles));\n    m_colors.push_back(make_float4(colors[rand() % numColors], 1));\n    m_rigidIndex++;\n}\n\nvoid ParticleSystem::addStaticSphere(int3 ll, int3 ur, float spacing)\n{\n    uint startI = m_numParticles;\n    int3 count = make_int3((int)ceil(ur.x - ll.x) / spacing, (int)ceil(ur.y - ll.y) / spacing, (int)ceil(ur.z - ll.z) / spacing);\n    float4 pos;\n    float radius = (ur.x - ll.x) * .5f;\n    float3 center = make_float3(ll) + make_float3(radius);\n\n\n    // particle setup\n    std::vector<float> posV;\n    std::vector<uint> indices;\n    std::vector<float> points;\n    uint index = 0;\n\n#ifndef TWOD\n    for (int z = 0; z < count.z; z++)\n    {\n#endif\n        for (int y = 0; y < count.y; y++)\n        {\n            for (int x = 0; x < count.x; x++)\n            {\n\n                pos = make_float4(ll.x + x * spacing,\n                                  ll.y + y * spacing,\n            #ifdef TWOD\n                                  ZPOS,\n            #else\n                                  ll.z + z * spacing,\n            #endif\n                                  1.f);\n                if (length(make_float3(pos) - center) < radius)\n                {\n                    posV.push_back(pos.x);\n                    posV.push_back(pos.y);\n                    posV.push_back(pos.z);\n                    posV.push_back(pos.w);\n\n                    indices.push_back(startI + index++);\n\n                    points.push_back(pos.x);\n                    points.push_back(pos.y);\n                    points.push_back(pos.z);\n                }\n            }\n        }\n#ifndef TWOD\n    }\n#endif\n    int arraySize = indices.size();\n    float vel[arraySize * 4];\n    float w[arraySize];\n    float ro[arraySize];\n    int phase[arraySize];\n\n    memset((void*)vel, 0, arraySize * 4 * sizeof(float));\n    std::fill(w, w + arraySize, .01f);\n    std::fill(ro, ro + arraySize, 1.f);\n    std::fill(phase, phase + arraySize, RIGID + m_rigidIndex);\n\n    addParticleMultiple(posV.data(), vel, w, ro, phase, arraySize);\n    addPointConstraint(indices.data(), points.data(), indices.size());\n\n    m_colorIndex.push_back(make_int2(startI, m_numParticles));\n    m_colors.push_back(make_float4(colors[rand() % numColors], 1.f));\n    m_rigidIndex++;\n\n\n}\n\n\nvoid ParticleSystem::makePointConstraint(uint index, float3 point)\n{\n    addPointConstraint(&index, (float*)&point, 1);\n}\n\nvoid ParticleSystem::makeDistanceConstraint(uint2 index, float distance)\n{\n    addDistanceConstraint((uint*)&index, &distance, 1);\n}\n\n\nvoid ParticleSystem::setArray(bool isPosArray, const float *data, int start, int count)\n{\n    assert(m_initialized);\n\n    if (isPosArray)\n    {\n        unregisterGLBufferObject(m_cuda_posvbo_resource);\n        glBindBuffer(GL_ARRAY_BUFFER, m_posVbo);\n        glBufferSubData(GL_ARRAY_BUFFER, start*4*sizeof(float), count*4*sizeof(float), data);\n        glBindBuffer(GL_ARRAY_BUFFER, 0);\n        registerGLBufferObject(m_posVbo, &m_cuda_posvbo_resource);\n    }\n}\n\n\nGLuint ParticleSystem::createVBO(uint size)\n{\n    GLuint vbo;\n    glGenBuffers(1, &vbo);\n    glBindBuffer(GL_ARRAY_BUFFER, vbo);\n    glBufferData(GL_ARRAY_BUFFER, size, 0, GL_DYNAMIC_DRAW);\n    glBindBuffer(GL_ARRAY_BUFFER, 0);\n    return vbo;\n}\n\n"
  },
  {
    "path": "gpu/src/particlesystem.h",
    "content": "#ifndef PARTICLESYSTEM_H\n#define PARTICLESYSTEM_H\n\n#include \"kernel.cuh\"\n#include <deque>\n#include <vector>\n#include \"helper_math.h\"\n\ntypedef unsigned int GLuint;\ntypedef unsigned int uint;\n\nconst int numColors = 8;\nconst float3 colors[numColors] = {  make_float3(.722f, .141f, .447f),\n                                    make_float3(.886f, .455f, .173f),\n                                    make_float3(.110f, .569f, .478f),\n                                    make_float3(.588f, .824f, .161f),\n                                    make_float3(.722f, .267f, .506f),\n                                    make_float3(.831f, .345f, .031f),\n                                    make_float3(.020f, .533f, .431f),\n                                    make_float3(.506f, .773f, .027f)};\n\nclass ParticleSystem\n{\npublic:\n    ParticleSystem(float particleRadius, uint3 gridSize, uint maxParticles, int3 minBounds, int3 maxBounds, int iterations);\n    ~ParticleSystem();\n\n    void update(float deltaTime);\n    void resetGrid();\n\n    void addFluid(int3 ll, int3 ur, float mass, float density, float3 color);\n    void addParticleGrid(int3 ll, int3 ur, float mass, bool addJitter);\n    void addHorizCloth(int2 ll, int2 ur, float3 spacing, float2 dist, float mass, bool holdEdges);\n    void addRope(float3 start, float3 spacing, float dist, int numLinks, float mass, bool constrainStart);\n    void addStaticSphere(int3 ll, int3 ur, float spacing);\n\n    void setParticleToAdd(float3 pos, float3 vel, float mass);\n    void setFluidToAdd(float3 pos, float3 color, float mass, float density);\n\n    void makePointConstraint(uint index, float3 point);\n    void makeDistanceConstraint(uint2 index, float distance);\n\n    // getters\n    std::vector<int2> getColorIndex() { return m_colorIndex; }\n    std::vector<float4> getColors() { return m_colors; }\n\n    GLuint getCurrentReadBuffer() const { return m_posVbo; }\n    uint getNumParticles() const { return m_numParticles; }\n    float getParticleRadius() const { return m_particleRadius; }\n\n    int3 getMinBounds() { return m_minBounds; }\n    int3 getMaxBounds() { return m_maxBounds; }\n\n//    float4 mousePos;\n\nprivate:\n    void _init(uint numParticles, uint maxParticles);\n    void _finalize();\n\n    GLuint createVBO(uint size);\n    void setArray(bool isVboArray, const float *data, int start, int count);\n\n    void addParticle(float4 pos, float4 vel, float mass, float ro, int phase);\n    void addParticleMultiple(float *pos, float *vel, float *mass, float *ro, int *phase, int numParticles);\n    void addParticles();\n\n    void addFluids();\n\n    void addNewStuff();\n\n    bool m_initialized;\n\n    float m_particleRadius;\n\n    uint m_maxParticles;\n    uint m_numParticles;\n\n    // GPU data\n    float *m_dSortedPos;\n    float *m_dSortedW;\n    int   *m_dSortedPhase;\n\n    // grid data for sorting method\n    uint  *m_dGridParticleHash; // grid hash value for each particle\n    uint  *m_dGridParticleIndex;// particle index for each particle\n    uint  *m_dCellStart;        // index of start of each cell in sorted list\n    uint  *m_dCellEnd;          // index of end of cell\n\n    uint   m_gridSortBits;\n\n    // vertex buffer object for particle positions\n    GLuint   m_posVbo;\n\n    // handles OpenGL-CUDA exchange\n    struct cudaGraphicsResource *m_cuda_posvbo_resource;\n\n    // params\n    SimParams m_params;\n    uint3 m_gridSize;\n    uint m_numGridCells;\n\n    // phase number for rigid bodies\n    int m_rigidIndex;\n\n    // to store particles that need to be added\n    std::deque<float4> m_particlesToAdd;\n    std::deque<float4> m_fluidsToAdd;\n\n    // particle colors\n    std::vector<int2> m_colorIndex;\n    std::vector<float4> m_colors;\n\n    // scene boundaries\n    int3 m_minBounds;\n    int3 m_maxBounds;\n\n    uint m_solverIterations;\n};\n\n#endif // PARTICLESYSTEM_H\n"
  },
  {
    "path": "gpu/src/rendering/actioncamera.cpp",
    "content": "#include \"actioncamera.h\"\n\nActionCamera::ActionCamera()\n{\n    m_pos = glm::vec4();\n    m_offset = 0.f;\n    m_offsetHeight = 0.f;\n}\n\nActionCamera::~ActionCamera()\n{\n}\n\n\nfloat ActionCamera::getOffset()\n{\n    return m_offset;\n}\n\nvoid ActionCamera::setLook(glm::vec4 look)\n{\n    m_look = look;\n    glm::vec4 up = glm::vec4(0, 1, 0, 0);\n    orientLook(m_eye, m_look, up);\n}\n\nvoid ActionCamera::setCenter(glm::vec3 pos)\n{\n    m_pos = glm::vec4(pos, 1.f);\n    glm::vec4 eye = m_pos - m_look * m_offset + m_up * m_offsetHeight * m_offset;\n    orientLook(eye, m_look, m_up);\n}\n\n\nvoid ActionCamera::setOffsetHeight(float height)\n{\n    m_offsetHeight = height;\n    glm::vec4 eye = m_pos - m_look * m_offset + m_up * m_offsetHeight * m_offset;\n    orientLook(eye, m_look, m_up);\n}\n\nvoid ActionCamera::setOffset(float offset)\n{\n    m_offset = offset;\n    glm::vec4 eye = m_pos - m_look * m_offset + m_up * m_offsetHeight * m_offset;\n    orientLook(eye, m_look, m_up);\n}\n\n\nvoid ActionCamera::moveRelativeToLook(glm::vec3 dir)\n{\n    moveAlongU(dir.x);\n    moveAlongUp(dir.y);\n    moveAlongLook(dir.z);\n}\n"
  },
  {
    "path": "gpu/src/rendering/actioncamera.h",
    "content": "#ifndef ACTIONCAMERA_H\n#define ACTIONCAMERA_H\n\n#include \"camera.h\"\n\nclass ActionCamera : public Camera\n{\npublic:\n    ActionCamera();\n    ~ActionCamera();\n\n    float getOffset();\n\n    void setCenter(glm::vec3 pos);\n    void setOffset(float offset);\n    void setLook(glm::vec4 look);\n    void setOffsetHeight(float height);\n\n    void moveRelativeToLook(glm::vec3 dir);\n\nprivate:\n    glm::vec4 m_pos;//, m_offsetVec;\n    float m_offset;\n    float m_offsetHeight;\n};\n\n#endif // ACTIONCAMERA_H\n"
  },
  {
    "path": "gpu/src/rendering/camera.cpp",
    "content": "#include \"camera.h\"\n\n#define GLM_FORCE_RADIANS\n#include <gtx/rotate_vector.hpp>\n#include <gtx/vector_angle.hpp>\n\nCamera::Camera()\n{\n    glm::vec4 eye = glm::vec4(0, 0, 5, 0);\n    glm::vec4 look = -eye;\n    glm::vec4 up = glm::vec4(0, 1, 0, 0);\n    orientLook(eye, look, up);\n\n    // Projection Defaults\n    m_heightDegrees = 90.f;\n    m_aspectRatio = 1.0f;\n    m_near = 0.1f;\n    m_far = 1000.0f;\n    setProjectionMatrix();\n\n    m_thirdDist = 0.f;\n    setFrustumMatrix();\n}\n\nCamera::~Camera()\n{\n}\n\nglm::mat4 Camera::getProjectionViewMatrix()\n{\n    return m_proj * m_view;\n}\n\nglm::mat4 Camera::getProjectionMatrix()\n{\n    return m_proj;\n}\n\nglm::mat4 Camera::getViewMatrix()\n{\n    return m_view;\n}\n\nglm::mat4 Camera::getScaleMatrix()\n{\n    return m_scale;\n}\n\nglm::mat4 Camera::getFrustumMatrix()\n{\n    return m_frustum;\n}\n\nglm::vec4 Camera::getLook()\n{\n    return m_look;\n}\n\nglm::vec4 Camera::getUp()\n{\n    return m_up;\n}\n\nglm::vec4 Camera::getEye()\n{\n    return m_eye;\n}\n\nfloat Camera::getAspectRatio()\n{\n    return m_aspectRatio;\n}\n\nvoid Camera::setAspectRatio(float a)\n{\n    m_aspectRatio = a;\n    setProjectionMatrix();\n    setFrustumMatrix();\n}\n\nvoid Camera::orientLook(glm::vec4 &eye, glm::vec4 &look, glm::vec4 &up)\n{\n    // Camera vecs\n    m_eye = eye;\n    m_look = look;\n    m_up = up;\n\n    setCameraSpace();\n    setViewMatrix();\n    setFrustumMatrix();\n}\n\nvoid Camera::moveHorizontal(glm::vec2 dir)\n{\n    m_eye += glm::normalize(glm::vec4(m_look.x, 0.f, m_look.z, 0.f)) * dir.x;\n    m_eye += glm::normalize(glm::vec4(-m_look.z, 0.f, m_look.x, 0.f)) * dir.y;\n    setViewMatrix();\n    setFrustumMatrix();\n}\n\nvoid Camera::moveAlongU(float mag)\n{\n    m_eye += m_u * mag;\n    setViewMatrix();\n    setFrustumMatrix();\n}\n\nvoid Camera::moveAlongUp(float mag)\n{\n    m_eye += m_up * mag;\n    setViewMatrix();\n    setFrustumMatrix();\n}\n\nvoid Camera::moveAlongLook(float mag)\n{\n    m_eye += m_look * mag;\n    setViewMatrix();\n    setFrustumMatrix();\n}\n\nvoid Camera::pitch(float degrees)\n{\n    glm::vec4 oldLook = m_look;\n    m_look = glm::rotate(m_look, glm::radians(degrees), glm::cross(glm::vec3(m_up), glm::vec3(m_look)));\n    setCameraSpace();\n    if (m_up.y < 0)\n    {\n        m_look = oldLook;\n        setCameraSpace();\n    }\n    setViewMatrix();\n    setFrustumMatrix();\n}\n\nvoid Camera::yaw(float degrees)\n{\n    float radians = glm::radians(degrees);\n    glm::vec3 vec = glm::vec3(0.f, -1.f, 0.f);\n    m_look = glm::rotate(m_look, radians, vec);\n    m_up = glm::rotate(m_up, radians, vec);\n    setCameraSpace();\n    setViewMatrix();\n    setFrustumMatrix();\n}\n\nvoid Camera::roll(float degrees)\n{\n    m_up = glm::rotate(m_up, glm::radians(degrees), glm::vec3(m_look));\n    setCameraSpace();\n    setViewMatrix();\n    setFrustumMatrix();\n}\n\nvoid Camera::setCameraSpace()\n{\n    // Camera coordinate space\n    m_look = glm::normalize(m_look);\n    m_w = -m_look;\n    m_v = glm::normalize(m_up - (glm::dot(m_up, m_w) * m_w));\n    m_u = glm::vec4(\n                glm::normalize(\n                        glm::cross(glm::vec3(m_v.x, m_v.y, m_v.z),\n                                   glm::vec3(m_w.x, m_w.y, m_w.z))),\n                    0);\n    m_up = m_v;\n}\n\nvoid Camera::setViewMatrix()\n{\n    // View Matrices\n    glm::mat4 trans = glm::mat4();\n    trans[3][0] = -m_eye[0];\n    trans[3][1] = -m_eye[1];\n    trans[3][2] = -m_eye[2];\n\n    glm::mat4 rot = glm::mat4(m_u.x, m_u.y, m_u.z, 0.0,\n                              m_v.x, m_v.y, m_v.z, 0.0,\n                              m_w.x, m_w.y, m_w.z, 0.0,\n                               0.0,   0.0,   0.0,  1.0);\n    rot = glm::transpose(rot);\n    m_view = rot * trans;\n}\n\nvoid Camera::setProjectionMatrix()\n{\n    // Projection Matrices\n    float h = m_far * glm::tan(glm::radians(m_heightDegrees / 2.0));\n    float w = m_aspectRatio * h;\n\n    m_scale = glm::mat4(1.0 / (w / 2.0),       0.0,          0.0,     0.0,\n                                     0.0,        1.0 / (h / 2.0),    0.0,     0.0,\n                                     0.0,              0.0,       1.0 / m_far,  0.0,\n                                     0.0,              0.0,          0.0,     1.0);\n    m_scale = glm::transpose(m_scale);\n\n    float c = -m_near / m_far;\n    glm::mat4 perspective = glm::mat4(1.0,   0.0,      0.0,         0.0,\n                                      0.0,   1.0,      0.0,         0.0,\n                                      0.0,   0.0, -1.0/(1.0+c),  c/(1.0+c),\n                                      0.0,   0.0,     -1.0,         0.0);\n    perspective = glm::transpose(perspective);\n    m_proj = perspective * m_scale;\n}\n\nvoid Camera::setFrustumMatrix()\n{\n    m_frustum = glm::transpose(m_proj * m_view);\n}\n\n\n\n"
  },
  {
    "path": "gpu/src/rendering/camera.h",
    "content": "#ifndef CAMERA_H\n#define CAMERA_H\n\n#include <glm.hpp>\n\nclass Camera\n{\npublic:\n    Camera();\n    virtual ~Camera();\n\n    glm::mat4 getProjectionViewMatrix();\n    glm::mat4 getProjectionMatrix();\n    glm::mat4 getViewMatrix();\n    glm::mat4 getScaleMatrix();\n    glm::mat4 getFrustumMatrix();\n    glm::vec4 getLook();\n    glm::vec4 getUp();\n    glm::vec4 getEye();\n    float getAspectRatio();\n\n    void setAspectRatio(float a);\n    void orientLook(glm::vec4 &eye, glm::vec4 &look, glm::vec4 &up);\n\n    void moveHorizontal(glm::vec2 dir);\n    void moveAlongU(float mag);\n    void moveAlongUp(float mag);\n    void moveAlongLook(float mag);\n\n    void pitch(float degrees);\n    void yaw(float degrees);\n    void roll(float degrees);\n\nprotected:\n    void setCameraSpace();\n    void setViewMatrix();\n    void setProjectionMatrix();\n    void setFrustumMatrix();\n\n    glm::vec4 m_u, m_v, m_w;\n    glm::vec4 m_eye, m_look, m_up;\n\n    glm::mat4 m_view, m_proj, m_frustum;\n    glm::mat4 m_scale;\n\n    // View variables\n    float m_near, m_far, m_heightDegrees, m_aspectRatio;\n\n    float m_thirdDist;\n\n};\n\n#endif // CAMERA_H\n"
  },
  {
    "path": "gpu/src/rendering/orbitingcamera.cpp",
    "content": "/**\n * @file   OrbitingCamera.cpp\n *\n * (See the header file.) You don't need to be poking around in this file unless you're interested\n * in how an orbiting camera works.\n *\n * The way we have implemented this class is NOT how you should be implementing your Camtrans. This\n * camera is a DIFFERENT TYPE of camera which we're providing so you can easily view your Shapes\n * and to make sure your scene graph is working if your camera isn't.\n *\n * In the Camtrans lab, you'll be implementing your own perspective camera from scratch! This one\n * uses OpenGL.\n */\n\n#include \"orbitingcamera.h\"\n#include \"kernel.cuh\"\n\n#define GLM_FORCE_RADIANS\n//#include <gtc/matrix_transform.hpp>\n#include <gtx/transform.hpp>\n\n#include <float.h>\n#include <math.h>\n\n#define NEAR 0.01f\n#define FAR 1000.f\n#define FOV 90.f\n\nOrbitingCamera::OrbitingCamera()\n{\n    m_aspectRatio = 1;\n    m_angleX = m_angleY = 0;\n#ifdef TWOD\n    m_zoomZ = -20;\n    m_eyeHeight = 10.f;\n#else\n    m_eyeHeight = 5.f;\n    m_zoomZ = -20;\n    m_angleY = -45.f;\n#endif\n    m_eyePan = 0.f;\n\n    updateMatrices();\n}\n\nOrbitingCamera::~OrbitingCamera()\n{\n}\n\nvoid OrbitingCamera::setAspectRatio(float aspectRatio)\n{\n    m_aspectRatio = aspectRatio;\n\n    updateProjectionMatrix();\n}\n\nglm::mat4 OrbitingCamera::getProjectionMatrix() const\n{\n    return m_projectionMatrix;\n}\n\nglm::mat4 OrbitingCamera::getViewMatrix() const\n{\n    return m_viewMatrix;\n}\n\n\nglm::mat4 OrbitingCamera::getScaleMatrix() const\n{\n    float far = glm::max(FAR, NEAR + 100.f * FLT_EPSILON);\n    float h = far * glm::tan(glm::radians(FOV / 2.f));\n    float w = m_aspectRatio * h;\n\n    glm::mat4 scale = glm::mat4(1.0 / w,       0.0,          0.0,     0.0,\n                                    0.0,       1.0 / h,        0.0,     0.0,\n                                    0.0,         0.0,       1.0 / far,  0.0,\n                                    0.0,         0.0,          0.0,     1.0);\n    return glm::transpose(scale);\n}\n\nglm::mat4 OrbitingCamera::getProjectionViewMatrix() const\n{\n    return m_projView;\n}\n\nfloat OrbitingCamera::getFovY() const\n{\n    return /*glm::radians(*/FOV / m_aspectRatio;\n}\n\nvoid OrbitingCamera::mouseDown(int x, int y)\n{\n    m_oldX = x;\n    m_oldY = y;\n}\n\nvoid OrbitingCamera::mouseDragged(int x, int y)\n{\n    m_angleY += (x - m_oldX) * .5f;\n    m_angleX += (y - m_oldY) * .5f;\n\n#ifdef TWOD\n    m_eyeHeight += (y - m_oldY) * .05f;\n    m_eyePan += (x - m_oldX) * .05f;\n#else\n    if (m_angleX < -90) m_angleX = -90;\n    if (m_angleX > 90) m_angleX = 90;\n#endif\n\n    m_oldX = x;\n    m_oldY = y;\n\n    updateViewMatrix();\n}\n\nvoid OrbitingCamera::mouseScrolled(int delta)\n{\n    // Use an exponential factor so the zoom increments are small when we are\n    // close to the object and large when we are far away from the object\n    m_zoomZ *= powf(0.999f, delta);\n\n    updateViewMatrix();\n}\n\nvoid OrbitingCamera::updateMatrices()\n{\n    updateProjectionMatrix();\n    updateViewMatrix();\n//    updateScaleMatrix();\n}\n\nvoid OrbitingCamera::updateProjectionMatrix()\n{\n    // Make sure glm gets a far value that is greater than the near value.\n    // Thanks Windows for making far a keyword!\n    float farPlane = glm::max(FAR, NEAR + 100.f * FLT_EPSILON);\n\n    m_projectionMatrix = glm::perspective(\n            glm::radians(FOV), m_aspectRatio, NEAR, farPlane);\n\n    m_projView = m_projectionMatrix * m_viewMatrix;\n}\n\nvoid OrbitingCamera::updateViewMatrix()\n{\n\n#ifdef TWOD\n    m_viewMatrix = glm::translate(glm::mat4(), glm::vec3(m_eyePan, -m_eyeHeight, m_zoomZ));\n#else\n    m_viewMatrix =\n            glm::translate(glm::vec3(0.f, -m_eyeHeight, m_zoomZ)) *\n            glm::rotate(glm::radians(m_angleY), glm::vec3(0.f, 1.f, 0.f)) *\n            glm::rotate(glm::radians(m_angleX), glm::vec3(1.f, 0.f, 0.f));\n#endif\n\n    m_projView = m_projectionMatrix * m_viewMatrix;\n}\n"
  },
  {
    "path": "gpu/src/rendering/orbitingcamera.h",
    "content": "#ifndef ORBITINGCAMERA_H\n#define ORBITINGCAMERA_H\n\n#define GLM_FORCE_RADIANS\n#include <glm.hpp>\n\n/**\n * @class OrbitingCamera\n *\n * Camera that move in response to mouse interaction.\n *\n * You shouldn't need to work on this class. It's there for your convenience, really,\n * and the way this camera is implemented is NOT the way you should be implementing\n * your camera in the Camtrans lab. We hide the real implementation by using OpenGL to\n * perform the camera calculations.\n *\n */\nclass OrbitingCamera\n{\npublic:\n    OrbitingCamera();\n    virtual ~OrbitingCamera();\n\n    virtual void setAspectRatio(float aspectRatio);\n\n    virtual glm::mat4 getProjectionMatrix() const;\n    virtual glm::mat4 getViewMatrix() const;\n    virtual glm::mat4 getScaleMatrix() const;\n    virtual glm::mat4 getProjectionViewMatrix() const;\n\n    virtual float getFovY() const;\n\n    virtual void mouseDown(int x, int y);\n    virtual void mouseDragged(int x, int y);\n    virtual void mouseScrolled(int delta);\n\n    void updateMatrices();\n\nprivate:\n    void updateProjectionMatrix();\n    void updateViewMatrix();\n\n    glm::mat4 m_viewMatrix;\n    glm::mat4 m_projectionMatrix;\n    glm::mat4 m_scaleMatrix;\n    glm::mat4 m_projView;\n    float m_aspectRatio, m_angleX, m_angleY, m_zoomZ;\n    int m_oldX, m_oldY;\n    float m_eyeHeight;\n    float m_eyePan;\n};\n\n#endif // ORBITINGCAMERA_H\n"
  },
  {
    "path": "gpu/src/rendering/renderer.cpp",
    "content": "#include \"renderer.h\"\n#include <GL/glew.h>\n#include <QFile>\n#include <QTextStream>\n#include <QImage>\n#include <QDir>\n#include <QGLWidget>\n#include <QMouseEvent>\n#include <QWheelEvent>\n#include <string>\n#include <sstream>\n#include <vector>\n#include \"actioncamera.h\"\n#include \"helper_math.h\"\n#include \"kernel.cuh\"\n\n#define GLM_FORCE_RADIANS\n#include <gtc/type_ptr.hpp>\n#include <gtx/norm.hpp>\n\n//#include\"debugprinting.h\"\n\nRenderer::Renderer(int3 minBounds, int3 maxBounds)\n    : m_program(0),\n      m_vbo(0),\n      m_vao(0),\n      m_vboGrid(0),\n      m_vaoGrid(0),\n      m_numGridVerts(0),\n      m_camera(NULL),\n      m_particleRadius(0),\n      m_wsadeq(0)\n{\n    _initGL();\n    m_camera = new ActionCamera();\n    m_camera->setOffset(0.f);\n    m_camera->setOffsetHeight(0.f);\n    m_camera->setCenter(glm::vec3(0, 10, 25));\n\n    _buildGrid(minBounds, maxBounds);\n}\n\n\nRenderer::~Renderer()\n{\n    if (m_vbo)\n        glDeleteBuffers(1, &m_vbo);\n    if (m_vao)\n        glDeleteVertexArrays(1, &m_vao);\n\n    if (m_vboGrid)\n        glDeleteBuffers(1, &m_vboGrid);\n    if (m_vaoGrid)\n        glDeleteVertexArrays(1, &m_vaoGrid);\n\n    if (m_camera)\n        delete m_camera;\n}\n\n\nvoid Renderer::createVAO(GLuint vbo, float radius)\n{\n    if (m_vbo && m_vbo != vbo)\n        glDeleteBuffers(1, &m_vbo);\n    if (m_vao)\n        glDeleteVertexArrays(1, &m_vao);\n\n    m_vbo = vbo;\n    m_particleRadius = radius;\n\n    // Initialize the vertex array object.\n    glGenVertexArrays(1, &m_vao);\n    glBindVertexArray(m_vao);\n\n    // bind vertex buffer object.\n    glBindBuffer(GL_ARRAY_BUFFER, m_vbo);\n\n    GLuint position = glGetAttribLocation(m_program, \"position\");\n\n    glEnableVertexAttribArray(position);\n    glVertexAttribPointer(\n        position,\n        4,                   // Num coordinates per position\n        GL_FLOAT,            // Type\n        GL_FALSE,            // Normalized\n        sizeof(GLfloat) * 4, // Stride\n        (void*) 0            // Array buffer offset\n    );\n\n    // Unbind buffers.\n    glBindBuffer(GL_ARRAY_BUFFER, 0);\n    glBindVertexArray(0);\n}\n\n\nvoid Renderer::render(std::vector<int2> colorIndices, std::vector<float4> colors)\n{\n    glEnable(GL_BLEND); //Enable blending.\n    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);\n\n    glm::mat4 projView = m_camera->getProjectionViewMatrix();\n    glm::mat4 proj = m_camera->getProjectionMatrix();\n    glm::mat4 view = m_camera->getViewMatrix();\n\n    glUseProgram(m_program);\n\n    glUniformMatrix4fv(glGetUniformLocation(m_program, \"pv\"), 1, GL_FALSE, glm::value_ptr(projView));\n    glUniformMatrix4fv(glGetUniformLocation(m_program, \"projection\"), 1, GL_FALSE, glm::value_ptr(proj));\n    glUniformMatrix4fv(glGetUniformLocation(m_program, \"view\"), 1, GL_FALSE, glm::value_ptr(view));\n    glUniform1f(glGetUniformLocation(m_program, \"particleRadius\"), -1.f);\n    glUniform1i(glGetUniformLocation(m_program, \"screenHeight\"), m_screenSize.y);\n\n    GLuint colorLoc = glGetUniformLocation(m_program, \"color\");\n\n    // Draw floor\n    glBindVertexArray(m_vaoGrid);\n    glUniform4f(colorLoc, .1f, .1f, .1f, 1.f);\n    glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);\n\n    // Draw grid and walls\n    glUniform4f(colorLoc, .5f, .5f, .5f, 1.f);\n    glDrawArrays(GL_LINES, 4, m_numGridVerts);\n\n\n    // Draw points\n    glUniform1f(glGetUniformLocation(m_program, \"particleRadius\"), m_particleRadius);\n    glEnable(GL_PROGRAM_POINT_SIZE);\n\n    glBindVertexArray(m_vao);\n\n    int size = colors.size();\n    int2 index;\n    float4 color;\n    for (int i = 0; i < size; i++)\n    {\n        index = colorIndices.at(i);\n        color = colors.at(i);\n        glUniform4f(colorLoc, color.x, color.y, color.z, color.w);\n        glDrawArrays(GL_POINTS, index.x, index.y - index.x);\n    }\n    glBindVertexArray(0);\n\n    glDisable(GL_PROGRAM_POINT_SIZE);\n\n    glDisable(GL_BLEND); //Enable blending.\n    glUseProgram(0);\n}\n\n\nGLuint Renderer::_compileProgram(const char *vertex_file_path, const char *fragment_file_path)\n{\n    // NOTE: MUST INIT GLEW BEFORE USING THIS CODE\n\n    // Create the shaders\n    GLuint VertexShaderID = glCreateShader(GL_VERTEX_SHADER);\n    GLuint FragmentShaderID = glCreateShader(GL_FRAGMENT_SHADER);\n\n    // Read the Vertex Shader code from the file\n    std::string VertexShaderCode;\n    QString vertFilePath = QString(vertex_file_path);\n    QFile vertFile(vertFilePath);\n    if (vertFile.open(QIODevice::ReadOnly | QIODevice::Text)){\n        QTextStream vertStream(&vertFile);\n        VertexShaderCode = vertStream.readAll().toStdString();\n    }\n\n\n    // Read fragment shader code from file\n    std::string FragmentShaderCode;\n    QString fragFilePath = QString(fragment_file_path);\n    QFile fragFile(fragFilePath);\n    if (fragFile.open(QIODevice::ReadOnly | QIODevice::Text)){\n        QTextStream fragStream(&fragFile);\n        FragmentShaderCode = fragStream.readAll().toStdString();\n    }\n\n    GLint Result = GL_FALSE;\n    int InfoLogLength;\n\n    // Compile Vertex Shader\n    char const * VertexSourcePointer = VertexShaderCode.c_str();\n    glShaderSource(VertexShaderID, 1, &VertexSourcePointer , NULL);\n    glCompileShader(VertexShaderID);\n\n    // Check Vertex Shader\n    glGetShaderiv(VertexShaderID, GL_COMPILE_STATUS, &Result);\n    glGetShaderiv(VertexShaderID, GL_INFO_LOG_LENGTH, &InfoLogLength);\n    std::vector<char> VertexShaderErrorMessage(InfoLogLength);\n    glGetShaderInfoLog(VertexShaderID, InfoLogLength, NULL, &VertexShaderErrorMessage[0]);\n    if (!Result)\n        fprintf(stderr, \"Error compiling shader: %s\\n%s\\n\",\n                vertex_file_path, &VertexShaderErrorMessage[0]);\n\n    // Compile Fragment Shader\n    char const * FragmentSourcePointer = FragmentShaderCode.c_str();\n    glShaderSource(FragmentShaderID, 1, &FragmentSourcePointer , NULL);\n    glCompileShader(FragmentShaderID);\n\n    // Check Fragment Shader\n    glGetShaderiv(FragmentShaderID, GL_COMPILE_STATUS, &Result);\n    glGetShaderiv(FragmentShaderID, GL_INFO_LOG_LENGTH, &InfoLogLength);\n    std::vector<char> FragmentShaderErrorMessage(InfoLogLength);\n    glGetShaderInfoLog(FragmentShaderID, InfoLogLength, NULL, &FragmentShaderErrorMessage[0]);\n    if (!Result)\n        fprintf(stderr, \"Error compiling shader: %s\\n%s\\n\",\n                fragment_file_path, &FragmentShaderErrorMessage[0]);\n\n    // Link the program\n    GLuint programId = glCreateProgram();\n    glAttachShader(programId, VertexShaderID);\n    glAttachShader(programId, FragmentShaderID);\n    glLinkProgram(programId);\n\n    // Check the program\n    glGetProgramiv(programId, GL_LINK_STATUS, &Result);\n    glGetProgramiv(programId, GL_INFO_LOG_LENGTH, &InfoLogLength);\n    std::vector<char> ProgramErrorMessage( std::max(InfoLogLength, int(1)) );\n    glGetProgramInfoLog(programId, InfoLogLength, NULL, &ProgramErrorMessage[0]);\n    if (!Result)\n        fprintf(stderr, \"Error linking shader: %s\\n\", &ProgramErrorMessage[0]);\n\n    glDeleteShader(VertexShaderID);\n    glDeleteShader(FragmentShaderID);\n\n    return programId;\n}\n\n\nfloat4 Renderer::raycast2XYPlane(float x, float y)\n{\n    glm::mat4 ftw = glm::inverse(m_camera->getScaleMatrix() * m_camera->getViewMatrix());\n    glm::vec4 farWorld = ftw * glm::vec4(x, y, -1, 1);\n\n    glm::vec4 p = glm::inverse(m_camera->getViewMatrix()) * glm::vec4(0,0,0,1);\n    glm::vec4 d = glm::normalize(farWorld - p);\n\n#ifdef TWOD\n    float t = -ZPOS-p.z / d.z;\n#else\n    float t = -p.z / d.z;\n#endif\n    glm::vec4 point = p + d * t;\n    return make_float4(point.x, point.y, point.z, point.w);\n}\n\nfloat3 Renderer::getDir(float x, float y)\n{\n    glm::mat4 ftw = glm::inverse(m_camera->getScaleMatrix() * m_camera->getViewMatrix());\n    glm::vec4 farWorld = ftw * glm::vec4(x, y, -1, 1);\n\n    glm::vec4 p = glm::inverse(m_camera->getViewMatrix()) * glm::vec4(0,0,0,1);\n    glm::vec4 d = glm::normalize(farWorld - p);\n\n    return make_float3(d.x, d.y, d.z);\n}\n\nfloat3 Renderer::getEye()\n{\n    glm::vec4 p = glm::inverse(m_camera->getViewMatrix()) * glm::vec4(0,0,0,1);\n\n    return make_float3(p.x, p.y, p.z);\n}\n\nvoid Renderer::_initGL()\n{\n    m_program = _compileProgram(\":/shaders/default.vert\", \":/shaders/default.frag\");\n}\n\nvoid Renderer::mouseMoved(QMouseEvent *, float deltaX, float deltaY)\n{\n    m_camera->yaw(deltaX * 30.f);\n    m_camera->pitch(deltaY * 30.f);\n}\n\nvoid Renderer::keyPressed(QKeyEvent *e)\n{\n    switch (e->key())\n    {\n    case Qt::Key_W:\n        m_wsadeq |= 0b100000;\n        break;\n    case Qt::Key_S:\n        m_wsadeq |= 0b010000;\n        break;\n    case Qt::Key_A:\n        m_wsadeq |= 0b001000;\n        break;\n    case Qt::Key_D:\n        m_wsadeq |= 0b000100;\n        break;\n    case Qt::Key_E:\n        m_wsadeq |= 0b000010;\n        break;\n    case Qt::Key_Q:\n        m_wsadeq |= 0b000001;\n        break;\n    default:\n        break;\n    }\n}\n\n\nvoid Renderer::keyReleased(QKeyEvent *e)\n{\n    switch (e->key())\n    {\n    case Qt::Key_W:\n        m_wsadeq &= 0b011111;\n        break;\n    case Qt::Key_S:\n        m_wsadeq &= 0b101111;\n        break;\n    case Qt::Key_A:\n        m_wsadeq &= 0b110111;\n        break;\n    case Qt::Key_D:\n        m_wsadeq &= 0b111011;\n        break;\n    case Qt::Key_E:\n        m_wsadeq &= 0b111101;\n        break;\n    case Qt::Key_Q:\n        m_wsadeq &= 0b111110;\n        break;\n    default:\n        break;\n    }\n}\n\nvoid Renderer::update(float secs)\n{\n    float forceAmt = 8.f;\n    glm::vec3 force = glm::vec3();\n    if (m_wsadeq & 0b100000)\n        force.z += 1;\n    if (m_wsadeq & 0b010000)\n        force.z -= 1;\n    if (m_wsadeq & 0b001000)\n        force.x -= 1;\n    if (m_wsadeq & 0b000100)\n        force.x += 1;\n    if (m_wsadeq & 0b000010)\n        force.y += 1;\n    if (m_wsadeq & 0b000001)\n        force.y -= 1;\n\n    glm::vec4 look = m_camera->getLook();\n\n    glm::vec3 thrust = glm::normalize(glm::vec3(look.x, 0.f, look.z)) * force.z;\n    thrust += glm::normalize(glm::vec3(-look.z, 0.f, look.x)) * force.x;\n    if (glm::length2(thrust) > 0.00001)\n        thrust = glm::normalize(thrust) * forceAmt;\n    thrust.y = force.y * forceAmt;\n\n    glm::vec3 eye = glm::vec3(m_camera->getEye());\n    eye += thrust * secs;\n    m_camera->setCenter(eye);\n}\n\n\nvoid Renderer::resize(int w, int h)\n{\n    m_camera->setAspectRatio(w * 1.f / h);\n    m_screenSize = glm::ivec2(w, h);\n}\n\nvoid Renderer::_buildGrid(int3 minBounds, int3 maxBounds)\n{\n    int spacing = 4;\n    int maxDistX = maxBounds.x - minBounds.x;\n    int maxDistZ = maxBounds.z - minBounds.z;\n    int numX = maxDistX / spacing;\n    int numZ = maxDistZ / spacing;\n\n    if (maxDistX % spacing != 0)\n        numX++;\n    if (maxDistZ % spacing != 0)\n        numZ++;\n\n    numX = 2 * (numX + 1);\n    numZ = 2 * (numZ + 1);\n\n    m_numGridVerts =  numX + numZ + 16; // 16 for wall lines\n    int size = (m_numGridVerts + 4) * 3;\n    float *data = new float[size];\n\n    data[0] = maxBounds.x; data[1] = minBounds.y; data[2] = minBounds.z;\n    data[3] = minBounds.x; data[4] = minBounds.y; data[5] = minBounds.z;\n    data[6] = maxBounds.x; data[7] = minBounds.y; data[8] = maxBounds.z;\n    data[9] = minBounds.x; data[10] = minBounds.y; data[11] = maxBounds.z;\n\n    int index = 12;\n    int i;\n    bool flop = true;\n\n    // X\n    for (i = minBounds.x; i <= maxBounds.x; i+=spacing)\n    {\n        if (flop)\n        {\n            data[index++] = i; data[index++] = minBounds.y, data[index++] = minBounds.z;\n            data[index++] = i; data[index++] = minBounds.y, data[index++] = maxBounds.z;\n        }\n        else\n        {\n            data[index++] = i; data[index++] = minBounds.y, data[index++] = maxBounds.z;\n            data[index++] = i; data[index++] = minBounds.y, data[index++] = minBounds.z;\n        }\n        flop = !flop;\n    }\n    if (i-spacing != maxBounds.x)\n    {\n        if (flop)\n        {\n            data[index++] = maxBounds.x; data[index++] = minBounds.y, data[index++] = minBounds.z;\n            data[index++] = maxBounds.x; data[index++] = minBounds.y, data[index++] = maxBounds.z;\n        }\n        else\n        {\n            data[index++] = maxBounds.x; data[index++] = minBounds.y, data[index++] = maxBounds.z;\n            data[index++] = maxBounds.x; data[index++] = minBounds.y, data[index++] = minBounds.z;\n        }\n        flop = !flop;\n    }\n\n\n    // Z\n    flop = true;\n    for (i = minBounds.z; i <= maxBounds.z; i+=spacing)\n    {\n        if (flop)\n        {\n            data[index++] = minBounds.x; data[index++] = minBounds.y, data[index++] = i;\n            data[index++] = maxBounds.x; data[index++] = minBounds.y, data[index++] = i;\n        }\n        else\n        {\n            data[index++] = maxBounds.x; data[index++] = minBounds.y, data[index++] = i;\n            data[index++] = minBounds.x; data[index++] = minBounds.y, data[index++] = i;\n        }\n        flop = !flop;\n    }\n    if (i-spacing != maxBounds.z)\n    {\n        if (flop)\n        {\n            data[index++] = minBounds.x; data[index++] = minBounds.y, data[index++] = maxBounds.z;\n            data[index++] = maxBounds.x; data[index++] = minBounds.y, data[index++] = maxBounds.z;\n        }\n        else\n        {\n            data[index++] = maxBounds.x; data[index++] = minBounds.y, data[index++] = maxBounds.z;\n            data[index++] = minBounds.x; data[index++] = minBounds.y, data[index++] = maxBounds.z;\n        }\n        flop = !flop;\n    }\n\n\n    // Walls\n    data[index++] = minBounds.x; data[index++] = minBounds.y; data[index++] = minBounds.z;\n    data[index++] = minBounds.x; data[index++] = maxBounds.y; data[index++] = minBounds.z;\n    data[index++] = minBounds.x; data[index++] = maxBounds.y; data[index++] = minBounds.z;\n\n    data[index++] = maxBounds.x; data[index++] = maxBounds.y; data[index++] = minBounds.z;\n    data[index++] = maxBounds.x; data[index++] = minBounds.y; data[index++] = minBounds.z;\n    data[index++] = maxBounds.x; data[index++] = maxBounds.y; data[index++] = minBounds.z;\n    data[index++] = maxBounds.x; data[index++] = maxBounds.y; data[index++] = minBounds.z;\n\n    data[index++] = maxBounds.x; data[index++] = maxBounds.y; data[index++] = maxBounds.z;\n    data[index++] = maxBounds.x; data[index++] = minBounds.y; data[index++] = maxBounds.z;\n    data[index++] = maxBounds.x; data[index++] = maxBounds.y; data[index++] = maxBounds.z;\n    data[index++] = maxBounds.x; data[index++] = maxBounds.y; data[index++] = maxBounds.z;\n\n    data[index++] = minBounds.x; data[index++] = maxBounds.y; data[index++] = maxBounds.z;\n    data[index++] = minBounds.x; data[index++] = minBounds.y; data[index++] = maxBounds.z;\n    data[index++] = minBounds.x; data[index++] = maxBounds.y; data[index++] = maxBounds.z;\n    data[index++] = minBounds.x; data[index++] = maxBounds.y; data[index++] = maxBounds.z;\n\n    data[index++] = minBounds.x; data[index++] = maxBounds.y; data[index++] = minBounds.z;\n\n//    cout << index << \", \" << size << endl;\n\n//    m_numGridVerts = 0;\n//    size = 12;\n\n    _setGridBuffer(data, size * sizeof(float));\n\n    delete [] data;\n}\n\nvoid Renderer::_setGridBuffer(float *data, int memsize)\n{\n    if (m_vboGrid)\n        glDeleteBuffers(1, &m_vboGrid);\n    if (m_vaoGrid)\n        glDeleteVertexArrays(1, &m_vaoGrid);\n\n    // set and bind vertex buffer object.\n    glGenBuffers(1, &m_vboGrid);\n    glBindBuffer(GL_ARRAY_BUFFER, m_vboGrid);\n\n    // Initialize the vertex array object.\n    glGenVertexArrays(1, &m_vaoGrid);\n    glBindVertexArray(m_vaoGrid);\n\n    glBufferData(GL_ARRAY_BUFFER, memsize, data, GL_STATIC_DRAW);\n\n    GLuint position = glGetAttribLocation(m_program, \"position\");\n\n    glEnableVertexAttribArray(position);\n    glVertexAttribPointer(\n        position,\n        3,                   // Num coordinates per position\n        GL_FLOAT,            // Type\n        GL_FALSE,            // Normalized\n        sizeof(GLfloat) * 3, // Stride\n        (void*) 0            // Array buffer offset\n    );\n\n    // Unbind buffers.\n    glBindBuffer(GL_ARRAY_BUFFER, 0);\n    glBindVertexArray(0);\n}\n\n"
  },
  {
    "path": "gpu/src/rendering/renderer.h",
    "content": "#ifndef RENDERER_H\n#define RENDERER_H\n\n#include <glm/glm.hpp>\n#include <vector_types.h>\n#include <vector>\n\ntypedef unsigned int GLuint;\ntypedef unsigned int uint;\nclass ActionCamera;\nclass QMouseEvent;\nclass QKeyEvent;\n\nclass Renderer\n{\npublic:\n    Renderer(int3 minBounds, int3 maxBounds);\n    ~Renderer();\n\n    void createVAO(GLuint vbo, float radius);\n\n    void setVBO(GLuint vbo, uint numParticles);\n    void render(std::vector<int2> colorIndices, std::vector<float4> colors);\n\n    float4 raycast2XYPlane(float x, float y);\n    float3 getDir(float x, float y);\n    float3 getEye();\n\n//    void mousePressed(QMouseEvent *e);\n    void mouseMoved(QMouseEvent *, float deltaX, float deltaY);\n//    void mouseScrolled(QWheelEvent *e);\n\n    void keyPressed(QKeyEvent* e);\n    void keyReleased(QKeyEvent* e);\n\n    void update(float secs);\n\n    void resize(int w, int h);\n\nprivate:\n    void _initGL();\n    GLuint _compileProgram(const char *vertex_file_path, const char *fragment_file_path);\n\n    void _buildGrid(int3 minBounds, int3 maxBounds);\n    void _setGridBuffer(float *data, int memsize);\n\n\n    GLuint m_program;\n    GLuint m_vbo;\n    GLuint m_vao;\n\n    GLuint m_vboGrid;\n    GLuint m_vaoGrid;\n    int m_numGridVerts;\n\n    ActionCamera *m_camera;\n    glm::ivec2 m_screenSize;\n\n    float m_particleRadius;\n    int m_wsadeq;\n\n};\n\n#endif // RENDERER_H\n"
  },
  {
    "path": "gpu/src/ui/mainwindow.cpp",
    "content": "#include \"mainwindow.h\"\n#include \"ui_mainwindow.h\"\n#include \"view.h\"\n\nMainWindow::MainWindow(QWidget *parent) :\n    QMainWindow(parent),\n    ui(new Ui::MainWindow)\n{\n    QGLFormat qglFormat;\n    qglFormat.setVersion(3, 2);\n    qglFormat.setProfile(QGLFormat::CoreProfile);\n    qglFormat.setSampleBuffers(true);\n\n    ui->setupUi(this);\n\n    QGridLayout *gridLayout = new QGridLayout(ui->view);\n    View *view = new View(qglFormat, this);\n    gridLayout->addWidget(view, 0, 1);\n\n    connect(view, SIGNAL(changeTitle(const QString)), this, SLOT(changeTitle(const QString)));\n}\n\nMainWindow::~MainWindow()\n{\n    delete ui;\n}\n\n\nvoid MainWindow::changeTitle(const QString &title)\n{\n    this->setWindowTitle(title);\n}\n\n"
  },
  {
    "path": "gpu/src/ui/mainwindow.h",
    "content": "#ifndef MAINWINDOW_H\n#define MAINWINDOW_H\n\n#include <QMainWindow>\n\nclass View;\n\nnamespace Ui {\n    class MainWindow;\n}\n\nclass MainWindow : public QMainWindow\n{\n    Q_OBJECT\n\npublic:\n    explicit MainWindow(QWidget *parent = 0);\n    ~MainWindow();\n\nprivate:\n    Ui::MainWindow *ui;\n\nprivate slots:\n    void changeTitle(const QString &title);\n\n};\n\n#endif // MAINWINDOW_H\n\n"
  },
  {
    "path": "gpu/src/ui/mainwindow.ui",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<ui version=\"4.0\">\n <class>MainWindow</class>\n <widget class=\"QMainWindow\" name=\"MainWindow\">\n  <property name=\"geometry\">\n   <rect>\n    <x>0</x>\n    <y>0</y>\n    <width>800</width>\n    <height>600</height>\n   </rect>\n  </property>\n  <property name=\"windowTitle\">\n   <string>PARTICLE TEST</string>\n  </property>\n  <widget class=\"QWidget\" name=\"centralWidget\">\n   <layout class=\"QHBoxLayout\" name=\"horizontalLayout\">\n    <property name=\"leftMargin\">\n     <number>0</number>\n    </property>\n    <property name=\"topMargin\">\n     <number>0</number>\n    </property>\n    <property name=\"rightMargin\">\n     <number>0</number>\n    </property>\n    <property name=\"bottomMargin\">\n     <number>0</number>\n    </property>\n    <item>\n     <widget class=\"QWidget\" name=\"view\" native=\"true\"/>\n    </item>\n   </layout>\n  </widget>\n </widget>\n <layoutdefault spacing=\"6\" margin=\"11\"/>\n <resources/>\n <connections/>\n</ui>\n"
  },
  {
    "path": "gpu/src/ui/view.cpp",
    "content": "#include \"view.h\"\n#include <QMainWindow>\n#include <QApplication>\n#include <QKeyEvent>\n#include <iostream>\n#include \"particleapp.h\"\n\nView::View(QGLFormat format, QWidget *parent)\n    : QGLWidget(format, parent),\n      m_width(parent->width()),\n      m_height(parent->height())\n{\n    // View needs all mouse move events, not just mouse drag events\n    setMouseTracking(true);\n\n    // Hide the cursor since this is a fullscreen app\n    setCursor(Qt::BlankCursor);\n\n    // View needs keyboard focus\n    setFocusPolicy(Qt::StrongFocus);\n\n    // The game loop is implemented using a timer\n    connect(&timer, SIGNAL(timeout()), this, SLOT(tick()));\n\n    m_app = NULL;\n}\n\nView::~View()\n{\n    if (m_app)\n        delete m_app;\n}\n\nvoid View::initializeGL()\n{\n    // All OpenGL initialization *MUST* be done during or after this\n    // method. Before this method is called, there is no active OpenGL\n    // context and all OpenGL calls have no effect.\n\n    glewExperimental = GL_TRUE;\n    GLenum err = glewInit();\n    glGetError(); // Clear errors after call to glewInit\n    if (GLEW_OK != err)\n    {\n      // Problem: glewInit failed, something is seriously wrong.\n      fprintf(stderr, \"Error initializing glew: %s\\n\", glewGetErrorString(err));\n    }\n\n    // init the App object.\n    m_app = new ParticleApp();\n\n    // Enable depth testing, so that objects are occluded based on depth instead of drawing order.\n    glEnable(GL_DEPTH_TEST);\n\n    // Move the polygons back a bit so lines are still drawn even though they are coplanar with the\n    // polygons they came from, which will be drawn before them.\n    glEnable(GL_POLYGON_OFFSET_LINE);\n    glPolygonOffset(-1, -1);\n\n    // Enable back-face culling, meaning only the front side of every face is rendered.\n    glEnable(GL_CULL_FACE);\n    glCullFace(GL_BACK);\n\n    // Specify that the front face is represented by vertices in counterclockwise order (this is\n    // the default).\n    glFrontFace(GL_CCW);\n\n    // Start a timer that will try to get 60 frames per second (the actual\n    // frame rate depends on the operating system and other running programs)\n    time.start();\n    timer.start(1000 / 60);\n\n    // Center the mouse, which is explained more in mouseMoveEvent() below.\n    // This needs to be done here because the mouse may be initially outside\n    // the fullscreen window and will not automatically receive mouse move\n    // events. This occurs if there are two monitors and the mouse is on the\n    // secondary monitor.\n    QCursor::setPos(mapToGlobal(QPoint(width() / 2, height() / 2)));\n}\n\nvoid View::paintGL()\n{\n    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);\n    glClearColor(.3f, .3f, .3f, 1.f);\n\n    QString title = \"PARTICLES TEST      FPS: \" + QString::number((int) fps);\n    emit changeTitle(title);\n\n    m_app->render();\n}\n\nvoid View::resizeGL(int w, int h)\n{\n    glViewport(0, 0, w, h);\n\n    m_width = w;\n    m_height = h;\n\n    m_app->resize(w, h);\n}\n\nvoid View::mousePressEvent(QMouseEvent *e)\n{\n    float x = (e->x() * 2.f / m_width) - 1.f;\n    float y = 1.f - (e->y() * 2.f / m_height);\n    m_app->mousePressed(e, x, y);\n}\n\nvoid View::mouseMoveEvent(QMouseEvent *event)\n{\n    // This starter code implements mouse capture, which gives the change in\n    // mouse position since the last mouse movement. The mouse needs to be\n    // recentered after every movement because it might otherwise run into\n    // the edge of the screen, which would stop the user from moving further\n    // in that direction. Note that it is important to check that deltaX and\n    // deltaY are not zero before recentering the mouse, otherwise there will\n    // be an infinite loop of mouse move events.\n    int halfWidthI = width() / 2;\n    int halfHightI = height() / 2;\n\n    int deltaXI = event->x() - halfWidthI;\n    int deltaYI = event->y() - halfHightI;\n    if (!deltaXI && !deltaYI) return;\n\n    QCursor::setPos(mapToGlobal(QPoint(halfWidthI, halfHightI)));\n\n    // sets mouse deltas between -1 and 1\n    float halfWidth = width() * .5f;\n    float halfHeight = height() * .5f;\n\n    float deltaX = (event->x() - halfWidth) / halfWidth;\n    float deltaY = (event->y() - halfHeight) / halfHeight;\n\n    m_app->mouseMoved(event, deltaX, deltaY);\n}\n\nvoid View::mouseReleaseEvent(QMouseEvent *e)\n{\n    float x = (e->x() * 2.f / m_width) - 1.f;\n    float y = 1.f - (e->y() * 2.f / m_height);\n    m_app->mouseReleased(e, x, y);\n}\n\nvoid View::wheelEvent(QWheelEvent *e)\n{\n    m_app->mouseScrolled(e);\n}\n\nvoid View::keyPressEvent(QKeyEvent *event)\n{\n    if (event->key() == Qt::Key_Escape) QApplication::quit();\n\n    m_app->keyPressed(event);\n}\n\nvoid View::keyReleaseEvent(QKeyEvent *e)\n{\n    m_app->keyReleased(e);\n}\n\nvoid View::tick()\n{\n    // Get the number of seconds since the last tick (variable update rate)\n    float seconds = time.restart() * 0.001f;\n    fps = .02f / seconds + .98f * fps;\n\n    // update app\n    m_app->tick(seconds);\n\n    // don't show cursor\n    QApplication::setOverrideCursor(Qt::CrossCursor);\n\n    // Flag this view for repainting (Qt will call paintGL() soon after)\n    update();\n}\n"
  },
  {
    "path": "gpu/src/ui/view.h",
    "content": "#ifndef VIEW_H\n#define VIEW_H\n\n#include <GL/glew.h>\n#include <qgl.h>\n#include <QTime>\n#include <QTimer>\n\nclass ParticleApp;\n\nclass View : public QGLWidget\n{\n    Q_OBJECT\n\npublic:\n    View(QGLFormat format, QWidget *parent);\n    ~View();\n\nprivate:\n    ParticleApp *m_app;\n\n    QTime time;\n    QTimer timer;\n    float fps;\n    float fpsTimer;\n    float avgFps;\n    int fpsTicks;\n\n    void initializeGL();\n    void paintGL();\n    void resizeGL(int w, int h);\n\n    void mousePressEvent(QMouseEvent *event);\n    void mouseMoveEvent(QMouseEvent *event);\n    void mouseReleaseEvent(QMouseEvent *event);\n\n    void wheelEvent(QWheelEvent *event);\n\n    void keyPressEvent(QKeyEvent *event);\n    void keyReleaseEvent(QKeyEvent *event);\n\nprivate slots:\n    void tick();\n\nsignals:\n    void changeTitle(const QString);\n\nprivate:\n    int m_width;\n    int m_height;\n\n};\n\n#endif // VIEW_H\n\n"
  }
]