├── .gitignore ├── CMakeLists.txt ├── README.md ├── external ├── bin │ ├── freeglut.dll │ ├── glew32.dll │ └── glut32.dll ├── include │ ├── GL │ │ ├── Copying.txt │ │ ├── LICENSE.txt │ │ ├── Readme.txt │ │ ├── freeglut.h │ │ ├── freeglut_ext.h │ │ ├── freeglut_std.h │ │ ├── glew.h │ │ ├── glut.h │ │ ├── glxew.h │ │ └── wglew.h │ ├── GLFW │ │ ├── COPYING.txt │ │ ├── glfw3.h │ │ └── glfw3native.h │ ├── glm │ │ ├── CMakeLists.txt │ │ ├── common.hpp │ │ ├── detail │ │ │ ├── _features.hpp │ │ │ ├── _fixes.hpp │ │ │ ├── _literals.hpp │ │ │ ├── _noise.hpp │ │ │ ├── _swizzle.hpp │ │ │ ├── _swizzle_func.hpp │ │ │ ├── _vectorize.hpp │ │ │ ├── dummy.cpp │ │ │ ├── func_common.hpp │ │ │ ├── func_common.inl │ │ │ ├── func_exponential.hpp │ │ │ ├── func_exponential.inl │ │ │ ├── func_geometric.hpp │ │ │ ├── func_geometric.inl │ │ │ ├── func_integer.hpp │ │ │ ├── func_integer.inl │ │ │ ├── func_matrix.hpp │ │ │ ├── func_matrix.inl │ │ │ ├── func_noise.hpp │ │ │ ├── func_noise.inl │ │ │ ├── func_packing.hpp │ │ │ ├── func_packing.inl │ │ │ ├── func_trigonometric.hpp │ │ │ ├── func_trigonometric.inl │ │ │ ├── func_vector_relational.hpp │ │ │ ├── func_vector_relational.inl │ │ │ ├── glm.cpp │ │ │ ├── hint.hpp │ │ │ ├── intrinsic_common.hpp │ │ │ ├── intrinsic_common.inl │ │ │ ├── intrinsic_exponential.hpp │ │ │ ├── intrinsic_exponential.inl │ │ │ ├── intrinsic_geometric.hpp │ │ │ ├── intrinsic_geometric.inl │ │ │ ├── intrinsic_integer.hpp │ │ │ ├── intrinsic_integer.inl │ │ │ ├── intrinsic_matrix.hpp │ │ │ ├── intrinsic_matrix.inl │ │ │ ├── intrinsic_trigonometric.hpp │ │ │ ├── intrinsic_trigonometric.inl │ │ │ ├── intrinsic_vector_relational.hpp │ │ │ ├── intrinsic_vector_relational.inl │ │ │ ├── precision.hpp │ │ │ ├── precision.inl │ │ │ ├── setup.hpp │ │ │ ├── type_float.hpp │ │ │ ├── type_gentype.hpp │ │ │ ├── type_gentype.inl │ │ │ ├── type_half.hpp │ │ │ ├── type_half.inl │ │ │ ├── type_int.hpp │ │ │ ├── type_mat.hpp │ │ │ ├── type_mat.inl │ │ │ ├── type_mat2x2.hpp │ │ │ ├── type_mat2x2.inl │ │ │ ├── type_mat2x3.hpp │ │ │ ├── type_mat2x3.inl │ │ │ ├── type_mat2x4.hpp │ │ │ ├── type_mat2x4.inl │ │ │ ├── type_mat3x2.hpp │ │ │ ├── type_mat3x2.inl │ │ │ ├── type_mat3x3.hpp │ │ │ ├── type_mat3x3.inl │ │ │ ├── type_mat3x4.hpp │ │ │ ├── type_mat3x4.inl │ │ │ ├── type_mat4x2.hpp │ │ │ ├── type_mat4x2.inl │ │ │ ├── type_mat4x3.hpp │ │ │ ├── type_mat4x3.inl │ │ │ ├── type_mat4x4.hpp │ │ │ ├── type_mat4x4.inl │ │ │ ├── type_vec.hpp │ │ │ ├── type_vec.inl │ │ │ ├── type_vec1.hpp │ │ │ ├── type_vec1.inl │ │ │ ├── type_vec2.hpp │ │ │ ├── type_vec2.inl │ │ │ ├── type_vec3.hpp │ │ │ ├── type_vec3.inl │ │ │ ├── type_vec4.hpp │ │ │ └── type_vec4.inl │ │ ├── exponential.hpp │ │ ├── ext.hpp │ │ ├── fwd.hpp │ │ ├── geometric.hpp │ │ ├── glm.hpp │ │ ├── gtc │ │ │ ├── constants.hpp │ │ │ ├── constants.inl │ │ │ ├── epsilon.hpp │ │ │ ├── epsilon.inl │ │ │ ├── matrix_access.hpp │ │ │ ├── matrix_access.inl │ │ │ ├── matrix_integer.hpp │ │ │ ├── matrix_inverse.hpp │ │ │ ├── matrix_inverse.inl │ │ │ ├── matrix_transform.hpp │ │ │ ├── matrix_transform.inl │ │ │ ├── noise.hpp │ │ │ ├── noise.inl │ │ │ ├── packing.hpp │ │ │ ├── packing.inl │ │ │ ├── quaternion.hpp │ │ │ ├── quaternion.inl │ │ │ ├── random.hpp │ │ │ ├── random.inl │ │ │ ├── reciprocal.hpp │ │ │ ├── reciprocal.inl │ │ │ ├── type_precision.hpp │ │ │ ├── type_precision.inl │ │ │ ├── type_ptr.hpp │ │ │ ├── type_ptr.inl │ │ │ ├── ulp.hpp │ │ │ └── ulp.inl │ │ ├── gtx │ │ │ ├── associated_min_max.hpp │ │ │ ├── associated_min_max.inl │ │ │ ├── bit.hpp │ │ │ ├── bit.inl │ │ │ ├── closest_point.hpp │ │ │ ├── closest_point.inl │ │ │ ├── color_space.hpp │ │ │ ├── color_space.inl │ │ │ ├── color_space_YCoCg.hpp │ │ │ ├── color_space_YCoCg.inl │ │ │ ├── compatibility.hpp │ │ │ ├── compatibility.inl │ │ │ ├── component_wise.hpp │ │ │ ├── component_wise.inl │ │ │ ├── constants.hpp │ │ │ ├── dual_quaternion.hpp │ │ │ ├── dual_quaternion.inl │ │ │ ├── epsilon.hpp │ │ │ ├── euler_angles.hpp │ │ │ ├── euler_angles.inl │ │ │ ├── extend.hpp │ │ │ ├── extend.inl │ │ │ ├── extented_min_max.hpp │ │ │ ├── extented_min_max.inl │ │ │ ├── fast_exponential.hpp │ │ │ ├── fast_exponential.inl │ │ │ ├── fast_square_root.hpp │ │ │ ├── fast_square_root.inl │ │ │ ├── fast_trigonometry.hpp │ │ │ ├── fast_trigonometry.inl │ │ │ ├── gradient_paint.hpp │ │ │ ├── gradient_paint.inl │ │ │ ├── handed_coordinate_space.hpp │ │ │ ├── handed_coordinate_space.inl │ │ │ ├── inertia.hpp │ │ │ ├── inertia.inl │ │ │ ├── int_10_10_10_2.hpp │ │ │ ├── int_10_10_10_2.inl │ │ │ ├── integer.hpp │ │ │ ├── integer.inl │ │ │ ├── intersect.hpp │ │ │ ├── intersect.inl │ │ │ ├── io.hpp │ │ │ ├── io.inl │ │ │ ├── log_base.hpp │ │ │ ├── log_base.inl │ │ │ ├── matrix_cross_product.hpp │ │ │ ├── matrix_cross_product.inl │ │ │ ├── matrix_interpolation.hpp │ │ │ ├── matrix_interpolation.inl │ │ │ ├── matrix_major_storage.hpp │ │ │ ├── matrix_major_storage.inl │ │ │ ├── matrix_operation.hpp │ │ │ ├── matrix_operation.inl │ │ │ ├── matrix_query.hpp │ │ │ ├── matrix_query.inl │ │ │ ├── matrix_transform_2d.hpp │ │ │ ├── matrix_transform_2d.inl │ │ │ ├── mixed_product.hpp │ │ │ ├── mixed_product.inl │ │ │ ├── multiple.hpp │ │ │ ├── multiple.inl │ │ │ ├── noise.hpp │ │ │ ├── norm.hpp │ │ │ ├── norm.inl │ │ │ ├── normal.hpp │ │ │ ├── normal.inl │ │ │ ├── normalize_dot.hpp │ │ │ ├── normalize_dot.inl │ │ │ ├── number_precision.hpp │ │ │ ├── number_precision.inl │ │ │ ├── optimum_pow.hpp │ │ │ ├── optimum_pow.inl │ │ │ ├── orthonormalize.hpp │ │ │ ├── orthonormalize.inl │ │ │ ├── perpendicular.hpp │ │ │ ├── perpendicular.inl │ │ │ ├── polar_coordinates.hpp │ │ │ ├── polar_coordinates.inl │ │ │ ├── projection.hpp │ │ │ ├── projection.inl │ │ │ ├── quaternion.hpp │ │ │ ├── quaternion.inl │ │ │ ├── random.hpp │ │ │ ├── raw_data.hpp │ │ │ ├── raw_data.inl │ │ │ ├── reciprocal.hpp │ │ │ ├── rotate_normalized_axis.hpp │ │ │ ├── rotate_normalized_axis.inl │ │ │ ├── rotate_vector.hpp │ │ │ ├── rotate_vector.inl │ │ │ ├── scalar_relational.hpp │ │ │ ├── scalar_relational.inl │ │ │ ├── simd_mat4.hpp │ │ │ ├── simd_mat4.inl │ │ │ ├── simd_quat.hpp │ │ │ ├── simd_quat.inl │ │ │ ├── simd_vec4.hpp │ │ │ ├── simd_vec4.inl │ │ │ ├── spline.hpp │ │ │ ├── spline.inl │ │ │ ├── std_based_type.hpp │ │ │ ├── std_based_type.inl │ │ │ ├── string_cast.hpp │ │ │ ├── string_cast.inl │ │ │ ├── transform.hpp │ │ │ ├── transform.inl │ │ │ ├── transform2.hpp │ │ │ ├── transform2.inl │ │ │ ├── ulp.hpp │ │ │ ├── unsigned_int.hpp │ │ │ ├── unsigned_int.inl │ │ │ ├── vec1.hpp │ │ │ ├── vec1.inl │ │ │ ├── vector_angle.hpp │ │ │ ├── vector_angle.inl │ │ │ ├── vector_query.hpp │ │ │ ├── vector_query.inl │ │ │ ├── wrap.hpp │ │ │ └── wrap.inl │ │ ├── integer.hpp │ │ ├── mat2x2.hpp │ │ ├── mat2x3.hpp │ │ ├── mat2x4.hpp │ │ ├── mat3x2.hpp │ │ ├── mat3x3.hpp │ │ ├── mat3x4.hpp │ │ ├── mat4x2.hpp │ │ ├── mat4x3.hpp │ │ ├── mat4x4.hpp │ │ ├── matrix.hpp │ │ ├── packing.hpp │ │ ├── readme.txt │ │ ├── trigonometric.hpp │ │ ├── vec2.hpp │ │ ├── vec3.hpp │ │ ├── vec4.hpp │ │ └── vector_relational.hpp │ ├── glslUtil │ │ └── glslUtility.hpp │ ├── objUtil │ │ ├── obj.h │ │ └── objloader.h │ └── stb_image │ │ ├── stb_image.h │ │ └── stb_image_write.h ├── lib │ ├── linux │ │ ├── libGLEW.a │ │ └── libglfw3.a │ ├── osx │ │ ├── libGLEW.a │ │ └── libglfw3.a │ └── win │ │ ├── GL │ │ ├── freeglut.lib │ │ ├── glew32.lib │ │ ├── glew32s.lib │ │ └── glut32.lib │ │ └── GLFW │ │ ├── glfw3.lib │ │ ├── glfw3dll.lib │ │ ├── msvc110 │ │ ├── glfw3.lib │ │ └── glfw3dll.lib │ │ └── msvc120 │ │ ├── glfw3.lib │ │ └── glfw3dll.lib └── src │ ├── glslUtil │ └── glslUtility.cpp │ ├── objUtil │ ├── obj.cpp │ └── objloader.cpp │ └── stb_image │ ├── stb_image.c │ └── stb_image_write.c ├── objs ├── cow.obj ├── cube.obj └── tri.obj ├── renders └── cow_zdepth.png ├── src ├── cudaMat4.h ├── main.cpp ├── main.h ├── rasterizeKernels.cu ├── rasterizeKernels.h ├── rasterizeTools.h ├── utilities.cpp └── utilities.h └── windows └── PROJ4_Rasterizer ├── PROJ4_Rasterizer.sln └── PROJ4_Rasterizer ├── PROJ4_Rasterizer.vcxproj └── PROJ4_Rasterizer.vcxproj.filters /.gitignore: -------------------------------------------------------------------------------- 1 | # General 2 | builds/ 3 | 4 | # Compiled objects 5 | *.o 6 | *.obj 7 | 8 | # Compiled dynamic libraries 9 | *.so 10 | 11 | # Windows specific 12 | [Rr]elease/ 13 | [Dd]ebug/ 14 | *.suo 15 | *.pdb 16 | *.sdf 17 | *.opensdf 18 | *.user 19 | *.deps 20 | *.ipch 21 | 22 | # CUDA built deps 23 | windows/src/ 24 | 25 | # OSX specific 26 | .DS_Store 27 | */.DS_Store 28 | 29 | # VIM swap files 30 | *.swp 31 | 32 | # Exceptions 33 | !external/lib/*/*.lib 34 | !external/bin/* 35 | -------------------------------------------------------------------------------- /external/bin/freeglut.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CIS565-Fall-2014/Project4-Rasterizer/5792d3de20d53f586248720244dea1307f1f2cce/external/bin/freeglut.dll -------------------------------------------------------------------------------- /external/bin/glew32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CIS565-Fall-2014/Project4-Rasterizer/5792d3de20d53f586248720244dea1307f1f2cce/external/bin/glew32.dll -------------------------------------------------------------------------------- /external/bin/glut32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CIS565-Fall-2014/Project4-Rasterizer/5792d3de20d53f586248720244dea1307f1f2cce/external/bin/glut32.dll -------------------------------------------------------------------------------- /external/include/GL/Copying.txt: -------------------------------------------------------------------------------- 1 | 2 | Freeglut Copyright 3 | ------------------ 4 | 5 | Freeglut code without an explicit copyright is covered by the following 6 | copyright: 7 | 8 | Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved. 9 | Permission is hereby granted, free of charge, to any person obtaining a copy 10 | of this software and associated documentation files (the "Software"), to deal 11 | in the Software without restriction, including without limitation the rights 12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | copies or substantial portions of the Software. 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 21 | PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 22 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 23 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | 25 | Except as contained in this notice, the name of Pawel W. Olszta shall not be 26 | used in advertising or otherwise to promote the sale, use or other dealings 27 | in this Software without prior written authorization from Pawel W. Olszta. 28 | -------------------------------------------------------------------------------- /external/include/GL/Readme.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CIS565-Fall-2014/Project4-Rasterizer/5792d3de20d53f586248720244dea1307f1f2cce/external/include/GL/Readme.txt -------------------------------------------------------------------------------- /external/include/GL/freeglut.h: -------------------------------------------------------------------------------- 1 | #ifndef __FREEGLUT_H__ 2 | #define __FREEGLUT_H__ 3 | 4 | /* 5 | * freeglut.h 6 | * 7 | * The freeglut library include file 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 10 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 11 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 12 | * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | */ 16 | 17 | #include "freeglut_std.h" 18 | #include "freeglut_ext.h" 19 | 20 | /*** END OF FILE ***/ 21 | 22 | #endif /* __FREEGLUT_H__ */ 23 | -------------------------------------------------------------------------------- /external/include/GL/glut.h: -------------------------------------------------------------------------------- 1 | #ifndef __GLUT_H__ 2 | #define __GLUT_H__ 3 | 4 | /* 5 | * glut.h 6 | * 7 | * The freeglut library include file 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 10 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 11 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 12 | * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 13 | * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 14 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 | */ 16 | 17 | #include "freeglut_std.h" 18 | 19 | /*** END OF FILE ***/ 20 | 21 | #endif /* __GLUT_H__ */ 22 | -------------------------------------------------------------------------------- /external/include/GLFW/COPYING.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2002-2006 Marcus Geelnard 2 | Copyright (c) 2006-2010 Camilla Berglund 3 | 4 | This software is provided 'as-is', without any express or implied 5 | warranty. In no event will the authors be held liable for any damages 6 | arising from the use of this software. 7 | 8 | Permission is granted to anyone to use this software for any purpose, 9 | including commercial applications, and to alter it and redistribute it 10 | freely, subject to the following restrictions: 11 | 12 | 1. The origin of this software must not be misrepresented; you must not 13 | claim that you wrote the original software. If you use this software 14 | in a product, an acknowledgment in the product documentation would 15 | be appreciated but is not required. 16 | 17 | 2. Altered source versions must be plainly marked as such, and must not 18 | be misrepresented as being the original software. 19 | 20 | 3. This notice may not be removed or altered from any source 21 | distribution. 22 | 23 | -------------------------------------------------------------------------------- /external/include/glm/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(NAME glm_dummy) 2 | 3 | file(GLOB ROOT_SOURCE *.cpp) 4 | file(GLOB ROOT_INLINE *.inl) 5 | file(GLOB ROOT_HEADER *.hpp) 6 | file(GLOB ROOT_TEXT ../*.txt) 7 | 8 | file(GLOB_RECURSE CORE_SOURCE ./detail/*.cpp) 9 | file(GLOB_RECURSE CORE_INLINE ./detail/*.inl) 10 | file(GLOB_RECURSE CORE_HEADER ./detail/*.hpp) 11 | 12 | file(GLOB_RECURSE GTC_SOURCE ./gtc/*.cpp) 13 | file(GLOB_RECURSE GTC_INLINE ./gtc/*.inl) 14 | file(GLOB_RECURSE GTC_HEADER ./gtc/*.hpp) 15 | 16 | file(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp) 17 | file(GLOB_RECURSE GTX_INLINE ./gtx/*.inl) 18 | file(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp) 19 | 20 | source_group("Text Files" FILES ${ROOT_TEXT}) 21 | source_group("Core Files" FILES ${CORE_SOURCE}) 22 | source_group("Core Files" FILES ${CORE_INLINE}) 23 | source_group("Core Files" FILES ${CORE_HEADER}) 24 | source_group("GTC Files" FILES ${GTC_SOURCE}) 25 | source_group("GTC Files" FILES ${GTC_INLINE}) 26 | source_group("GTC Files" FILES ${GTC_HEADER}) 27 | source_group("GTX Files" FILES ${GTX_SOURCE}) 28 | source_group("GTX Files" FILES ${GTX_INLINE}) 29 | source_group("GTX Files" FILES ${GTX_HEADER}) 30 | 31 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) 32 | 33 | if(GLM_TEST_ENABLE) 34 | add_executable(${NAME} ${ROOT_TEXT} 35 | ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} 36 | ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} 37 | ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER} 38 | ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER}) 39 | endif(GLM_TEST_ENABLE) 40 | 41 | #add_library(glm STATIC glm.cpp) 42 | #add_library(glm_shared SHARED glm.cpp) 43 | -------------------------------------------------------------------------------- /external/include/glm/common.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/common.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_COMMON_INCLUDED 30 | #define GLM_COMMON_INCLUDED 31 | 32 | #include "detail/func_common.hpp" 33 | 34 | #endif//GLM_COMMON_INCLUDED 35 | -------------------------------------------------------------------------------- /external/include/glm/detail/_fixes.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/_fixes.hpp 25 | /// @date 2011-02-21 / 2011-11-22 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #include 30 | 31 | //! Workaround for compatibility with other libraries 32 | #ifdef max 33 | #undef max 34 | #endif 35 | 36 | //! Workaround for compatibility with other libraries 37 | #ifdef min 38 | #undef min 39 | #endif 40 | 41 | //! Workaround for Android 42 | #ifdef isnan 43 | #undef isnan 44 | #endif 45 | 46 | //! Workaround for Android 47 | #ifdef isinf 48 | #undef isinf 49 | #endif 50 | 51 | //! Workaround for Chrone Native Client 52 | #ifdef log2 53 | #undef log2 54 | #endif 55 | 56 | -------------------------------------------------------------------------------- /external/include/glm/detail/_literals.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/_literals.hpp 25 | /// @date 2013-05-06 / 2013-05-06 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef glm_core_literals 30 | #define glm_core_literals 31 | 32 | namespace glm 33 | { 34 | #define GLM_CXX11_USER_LITERALS 35 | #ifdef GLM_CXX11_USER_LITERALS 36 | /* 37 | GLM_FUNC_QUALIFIER detail::half operator "" _h(long double const s) 38 | { 39 | return detail::half(s); 40 | } 41 | 42 | GLM_FUNC_QUALIFIER float operator "" _f(long double const s) 43 | { 44 | return static_cast(s); 45 | } 46 | */ 47 | #endif//GLM_CXX11_USER_LITERALS 48 | 49 | }//namespace glm 50 | 51 | #endif//glm_core_literals 52 | -------------------------------------------------------------------------------- /external/include/glm/detail/hint.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/hint.hpp 25 | /// @date 2008-08-14 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef glm_core_type 30 | #define glm_core_type 31 | 32 | namespace glm 33 | { 34 | // Use dont_care, nicest and fastest to optimize implementations. 35 | class dont_care {}; 36 | class nicest {}; 37 | class fastest {}; 38 | }//namespace glm 39 | 40 | #endif//glm_core_type 41 | -------------------------------------------------------------------------------- /external/include/glm/detail/intrinsic_common.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/intrinsic_common.hpp 25 | /// @date 2009-05-11 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef glm_detail_intrinsic_common 30 | #define glm_detail_intrinsic_common 31 | 32 | #include "setup.hpp" 33 | 34 | #if(!(GLM_ARCH & GLM_ARCH_SSE2)) 35 | # error "SSE2 instructions not supported or enabled" 36 | #else 37 | 38 | namespace glm{ 39 | namespace detail 40 | { 41 | __m128 sse_abs_ps(__m128 x); 42 | 43 | __m128 sse_sgn_ps(__m128 x); 44 | 45 | //floor 46 | __m128 sse_flr_ps(__m128 v); 47 | 48 | //trunc 49 | __m128 sse_trc_ps(__m128 v); 50 | 51 | //round 52 | __m128 sse_nd_ps(__m128 v); 53 | 54 | //roundEven 55 | __m128 sse_rde_ps(__m128 v); 56 | 57 | __m128 sse_rnd_ps(__m128 x); 58 | 59 | __m128 sse_ceil_ps(__m128 v); 60 | 61 | __m128 sse_frc_ps(__m128 x); 62 | 63 | __m128 sse_mod_ps(__m128 x, __m128 y); 64 | 65 | __m128 sse_modf_ps(__m128 x, __m128i & i); 66 | 67 | //GLM_FUNC_QUALIFIER __m128 sse_min_ps(__m128 x, __m128 y) 68 | 69 | //GLM_FUNC_QUALIFIER __m128 sse_max_ps(__m128 x, __m128 y) 70 | 71 | __m128 sse_clp_ps(__m128 v, __m128 minVal, __m128 maxVal); 72 | 73 | __m128 sse_mix_ps(__m128 v1, __m128 v2, __m128 a); 74 | 75 | __m128 sse_stp_ps(__m128 edge, __m128 x); 76 | 77 | __m128 sse_ssp_ps(__m128 edge0, __m128 edge1, __m128 x); 78 | 79 | __m128 sse_nan_ps(__m128 x); 80 | 81 | __m128 sse_inf_ps(__m128 x); 82 | 83 | }//namespace detail 84 | }//namespace glm 85 | 86 | #include "intrinsic_common.inl" 87 | 88 | #endif//GLM_ARCH 89 | #endif//glm_detail_intrinsic_common 90 | -------------------------------------------------------------------------------- /external/include/glm/detail/intrinsic_exponential.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/intrinsic_exponential.inl 25 | /// @date 2011-06-15 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | -------------------------------------------------------------------------------- /external/include/glm/detail/intrinsic_geometric.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/intrinsic_geometric.hpp 25 | /// @date 2009-05-08 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef glm_core_intrinsic_geometric 30 | #define glm_core_intrinsic_geometric 31 | 32 | #include "setup.hpp" 33 | 34 | #if(!(GLM_ARCH & GLM_ARCH_SSE2)) 35 | # error "SSE2 instructions not supported or enabled" 36 | #else 37 | 38 | #include "intrinsic_common.hpp" 39 | 40 | namespace glm{ 41 | namespace detail 42 | { 43 | //length 44 | __m128 sse_len_ps(__m128 x); 45 | 46 | //distance 47 | __m128 sse_dst_ps(__m128 p0, __m128 p1); 48 | 49 | //dot 50 | __m128 sse_dot_ps(__m128 v1, __m128 v2); 51 | 52 | // SSE1 53 | __m128 sse_dot_ss(__m128 v1, __m128 v2); 54 | 55 | //cross 56 | __m128 sse_xpd_ps(__m128 v1, __m128 v2); 57 | 58 | //normalize 59 | __m128 sse_nrm_ps(__m128 v); 60 | 61 | //faceforward 62 | __m128 sse_ffd_ps(__m128 N, __m128 I, __m128 Nref); 63 | 64 | //reflect 65 | __m128 sse_rfe_ps(__m128 I, __m128 N); 66 | 67 | //refract 68 | __m128 sse_rfa_ps(__m128 I, __m128 N, __m128 eta); 69 | 70 | }//namespace detail 71 | }//namespace glm 72 | 73 | #include "intrinsic_geometric.inl" 74 | 75 | #endif//GLM_ARCH 76 | #endif//glm_core_intrinsic_geometric 77 | -------------------------------------------------------------------------------- /external/include/glm/detail/intrinsic_integer.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/intrinsic_integer.hpp 25 | /// @date 2009-05-11 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef glm_detail_intrinsic_integer 30 | #define glm_detail_intrinsic_integer 31 | 32 | #include "glm/glm.hpp" 33 | 34 | #if(!(GLM_ARCH & GLM_ARCH_SSE2)) 35 | # error "SSE2 instructions not supported or enabled" 36 | #else 37 | 38 | namespace glm{ 39 | namespace detail 40 | { 41 | __m128i _mm_bit_interleave_si128(__m128i x); 42 | __m128i _mm_bit_interleave_si128(__m128i x, __m128i y); 43 | 44 | }//namespace detail 45 | }//namespace glm 46 | 47 | #include "intrinsic_integer.inl" 48 | 49 | #endif//GLM_ARCH 50 | #endif//glm_detail_intrinsic_integer 51 | -------------------------------------------------------------------------------- /external/include/glm/detail/intrinsic_matrix.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/intrinsic_common.hpp 25 | /// @date 2009-06-05 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef glm_detail_intrinsic_matrix 30 | #define glm_detail_intrinsic_matrix 31 | 32 | #include "setup.hpp" 33 | 34 | #if(!(GLM_ARCH & GLM_ARCH_SSE2)) 35 | # error "SSE2 instructions not supported or enabled" 36 | #else 37 | 38 | #include "intrinsic_geometric.hpp" 39 | 40 | namespace glm{ 41 | namespace detail 42 | { 43 | void sse_add_ps(__m128 in1[4], __m128 in2[4], __m128 out[4]); 44 | 45 | void sse_sub_ps(__m128 in1[4], __m128 in2[4], __m128 out[4]); 46 | 47 | __m128 sse_mul_ps(__m128 m[4], __m128 v); 48 | 49 | __m128 sse_mul_ps(__m128 v, __m128 m[4]); 50 | 51 | void sse_mul_ps(__m128 const in1[4], __m128 const in2[4], __m128 out[4]); 52 | 53 | void sse_transpose_ps(__m128 const in[4], __m128 out[4]); 54 | 55 | void sse_inverse_ps(__m128 const in[4], __m128 out[4]); 56 | 57 | void sse_rotate_ps(__m128 const in[4], float Angle, float const v[3], __m128 out[4]); 58 | 59 | __m128 sse_det_ps(__m128 const m[4]); 60 | 61 | __m128 sse_slow_det_ps(__m128 const m[4]); 62 | 63 | }//namespace detail 64 | }//namespace glm 65 | 66 | #include "intrinsic_matrix.inl" 67 | 68 | #endif//GLM_ARCH 69 | #endif//glm_detail_intrinsic_matrix 70 | -------------------------------------------------------------------------------- /external/include/glm/detail/intrinsic_trigonometric.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/intrinsic_trigonometric.hpp 25 | /// @date 2009-06-09 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef glm_detail_intrinsic_trigonometric 30 | #define glm_detail_intrinsic_trigonometric 31 | 32 | #include "setup.hpp" 33 | 34 | #if(!(GLM_ARCH & GLM_ARCH_SSE2)) 35 | # error "SSE2 instructions not supported or enabled" 36 | #else 37 | 38 | namespace glm{ 39 | namespace detail 40 | { 41 | 42 | }//namespace detail 43 | }//namespace glm 44 | 45 | #include "intrinsic_trigonometric.inl" 46 | 47 | #endif//GLM_ARCH 48 | #endif//glm_detail_intrinsic_trigonometric 49 | -------------------------------------------------------------------------------- /external/include/glm/detail/intrinsic_trigonometric.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/intrinsic_trigonometric.inl 25 | /// @date 2011-06-15 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | -------------------------------------------------------------------------------- /external/include/glm/detail/intrinsic_vector_relational.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/intrinsic_vector_relational.hpp 25 | /// @date 2009-06-09 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef glm_detail_intrinsic_vector_relational 30 | #define glm_detail_intrinsic_vector_relational 31 | 32 | #include "setup.hpp" 33 | 34 | #if(!(GLM_ARCH & GLM_ARCH_SSE2)) 35 | # error "SSE2 instructions not supported or enabled" 36 | #else 37 | 38 | namespace glm{ 39 | namespace detail 40 | { 41 | 42 | }//namespace detail 43 | }//namespace glm 44 | 45 | #include "intrinsic_vector_relational.inl" 46 | 47 | #endif//GLM_ARCH 48 | #endif//glm_detail_intrinsic_vector_relational 49 | -------------------------------------------------------------------------------- /external/include/glm/detail/precision.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/precision.hpp 25 | /// @date 2013-04-01 / 2013-04-01 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_CORE_PRECISION_INCLUDED 30 | #define GLM_CORE_PRECISION_INCLUDED 31 | 32 | namespace glm 33 | { 34 | enum precision 35 | { 36 | highp, 37 | mediump, 38 | lowp, 39 | defaultp = highp 40 | }; 41 | }//namespace glm 42 | 43 | #endif//GLM_CORE_PRECISION_INCLUDED 44 | -------------------------------------------------------------------------------- /external/include/glm/detail/precision.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CIS565-Fall-2014/Project4-Rasterizer/5792d3de20d53f586248720244dea1307f1f2cce/external/include/glm/detail/precision.inl -------------------------------------------------------------------------------- /external/include/glm/detail/type_half.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/type_half.hpp 25 | /// @date 2008-08-17 / 2011-09-20 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef glm_core_type_half 30 | #define glm_core_type_half 31 | 32 | #include "setup.hpp" 33 | 34 | namespace glm{ 35 | namespace detail 36 | { 37 | typedef short hdata; 38 | 39 | GLM_FUNC_DECL float toFloat32(hdata value); 40 | GLM_FUNC_DECL hdata toFloat16(float const & value); 41 | 42 | }//namespace detail 43 | 44 | /// half-precision floating-point numbers. 45 | //typedef detail::hdata half; 46 | 47 | }//namespace glm 48 | 49 | #include "type_half.inl" 50 | 51 | #endif//glm_core_type_half 52 | -------------------------------------------------------------------------------- /external/include/glm/detail/type_mat.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/type_mat.inl 25 | /// @date 2011-06-15 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | -------------------------------------------------------------------------------- /external/include/glm/detail/type_vec.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/core/type_vec.inl 25 | /// @date 2011-06-15 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | -------------------------------------------------------------------------------- /external/include/glm/exponential.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/exponential.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_EXPONENTIAL_INCLUDED 30 | #define GLM_EXPONENTIAL_INCLUDED 31 | 32 | #include "detail/func_exponential.hpp" 33 | 34 | #endif//GLM_EXPONENTIAL_INCLUDED 35 | -------------------------------------------------------------------------------- /external/include/glm/geometric.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/geometric.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_GEOMETRIC_INCLUDED 30 | #define GLM_GEOMETRIC_INCLUDED 31 | 32 | #include "detail/func_geometric.hpp" 33 | 34 | #endif//GLM_GEOMETRIC_INCLUDED 35 | -------------------------------------------------------------------------------- /external/include/glm/gtc/matrix_access.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtc_matrix_access 24 | /// @file glm/gtc/matrix_access.hpp 25 | /// @date 2005-12-27 / 2011-05-16 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// 30 | /// @defgroup gtc_matrix_access GLM_GTC_matrix_access 31 | /// @ingroup gtc 32 | /// 33 | /// Defines functions to access rows or columns of a matrix easily. 34 | /// need to be included to use these functionalities. 35 | /////////////////////////////////////////////////////////////////////////////////// 36 | 37 | #ifndef GLM_GTC_matrix_access 38 | #define GLM_GTC_matrix_access 39 | 40 | // Dependency: 41 | #include "../detail/setup.hpp" 42 | 43 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 44 | # pragma message("GLM: GLM_GTC_matrix_access extension included") 45 | #endif 46 | 47 | namespace glm 48 | { 49 | /// @addtogroup gtc_matrix_access 50 | /// @{ 51 | 52 | /// Get a specific row of a matrix. 53 | /// @see gtc_matrix_access 54 | template 55 | GLM_FUNC_DECL typename genType::row_type row( 56 | genType const & m, 57 | length_t const & index); 58 | 59 | /// Set a specific row to a matrix. 60 | /// @see gtc_matrix_access 61 | template 62 | GLM_FUNC_DECL genType row( 63 | genType const & m, 64 | length_t const & index, 65 | typename genType::row_type const & x); 66 | 67 | /// Get a specific column of a matrix. 68 | /// @see gtc_matrix_access 69 | template 70 | GLM_FUNC_DECL typename genType::col_type column( 71 | genType const & m, 72 | length_t const & index); 73 | 74 | /// Set a specific column to a matrix. 75 | /// @see gtc_matrix_access 76 | template 77 | GLM_FUNC_DECL genType column( 78 | genType const & m, 79 | length_t const & index, 80 | typename genType::col_type const & x); 81 | 82 | /// @} 83 | }//namespace glm 84 | 85 | #include "matrix_access.inl" 86 | 87 | #endif//GLM_GTC_matrix_access 88 | -------------------------------------------------------------------------------- /external/include/glm/gtc/matrix_access.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtc_matrix_access 24 | /// @file glm/gtc/matrix_access.inl 25 | /// @date 2005-12-27 / 2011-06-05 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | namespace glm 30 | { 31 | template 32 | GLM_FUNC_QUALIFIER genType row 33 | ( 34 | genType const & m, 35 | length_t const & index, 36 | typename genType::row_type const & x 37 | ) 38 | { 39 | assert(index >= 0 && index < m[0].length()); 40 | 41 | genType Result = m; 42 | for(length_t i = 0; i < m.length(); ++i) 43 | Result[i][index] = x[i]; 44 | return Result; 45 | } 46 | 47 | template 48 | GLM_FUNC_QUALIFIER typename genType::row_type row 49 | ( 50 | genType const & m, 51 | length_t const & index 52 | ) 53 | { 54 | assert(index >= 0 && index < m[0].length()); 55 | 56 | typename genType::row_type Result; 57 | for(length_t i = 0; i < m.length(); ++i) 58 | Result[i] = m[i][index]; 59 | return Result; 60 | } 61 | 62 | template 63 | GLM_FUNC_QUALIFIER genType column 64 | ( 65 | genType const & m, 66 | length_t const & index, 67 | typename genType::col_type const & x 68 | ) 69 | { 70 | assert(index >= 0 && index < m.length()); 71 | 72 | genType Result = m; 73 | Result[index] = x; 74 | return Result; 75 | } 76 | 77 | template 78 | GLM_FUNC_QUALIFIER typename genType::col_type column 79 | ( 80 | genType const & m, 81 | length_t const & index 82 | ) 83 | { 84 | assert(index >= 0 && index < m.length()); 85 | 86 | return m[index]; 87 | } 88 | }//namespace glm 89 | -------------------------------------------------------------------------------- /external/include/glm/gtc/matrix_inverse.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtc_matrix_inverse 24 | /// @file glm/gtc/matrix_inverse.hpp 25 | /// @date 2005-12-21 / 2011-06-05 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// 30 | /// @defgroup gtc_matrix_inverse GLM_GTC_matrix_inverse 31 | /// @ingroup gtc 32 | /// 33 | /// Defines additional matrix inverting functions. 34 | /// need to be included to use these functionalities. 35 | /////////////////////////////////////////////////////////////////////////////////// 36 | 37 | #ifndef GLM_GTC_matrix_inverse 38 | #define GLM_GTC_matrix_inverse 39 | 40 | // Dependencies 41 | #include "../detail/setup.hpp" 42 | 43 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 44 | # pragma message("GLM: GLM_GTC_matrix_inverse extension included") 45 | #endif 46 | 47 | namespace glm 48 | { 49 | /// @addtogroup gtc_matrix_inverse 50 | /// @{ 51 | 52 | /// Fast matrix inverse for affine matrix. 53 | /// 54 | /// @param m Input matrix to invert. 55 | /// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-precision floating point value is highly innacurate. 56 | /// @see gtc_matrix_inverse 57 | template 58 | GLM_FUNC_DECL genType affineInverse(genType const & m); 59 | 60 | /// Compute the inverse transpose of a matrix. 61 | /// 62 | /// @param m Input matrix to invert transpose. 63 | /// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-precision floating point value is highly innacurate. 64 | /// @see gtc_matrix_inverse 65 | template 66 | GLM_FUNC_DECL typename genType::value_type inverseTranspose( 67 | genType const & m); 68 | 69 | /// @} 70 | }//namespace glm 71 | 72 | #include "matrix_inverse.inl" 73 | 74 | #endif//GLM_GTC_matrix_inverse 75 | -------------------------------------------------------------------------------- /external/include/glm/gtc/noise.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtc_noise 24 | /// @file glm/gtc/noise.hpp 25 | /// @date 2011-04-21 / 2011-09-27 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// 30 | /// @defgroup gtc_noise GLM_GTC_noise 31 | /// @ingroup gtc 32 | /// 33 | /// Defines 2D, 3D and 4D procedural noise functions 34 | /// Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise": 35 | /// https://github.com/ashima/webgl-noise 36 | /// Following Stefan Gustavson's paper "Simplex noise demystified": 37 | /// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf 38 | /// need to be included to use these functionalities. 39 | /////////////////////////////////////////////////////////////////////////////////// 40 | 41 | #ifndef GLM_GTC_noise 42 | #define GLM_GTC_noise 43 | 44 | // Dependencies 45 | #include "../detail/setup.hpp" 46 | #include "../detail/precision.hpp" 47 | 48 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 49 | # pragma message("GLM: GLM_GTC_noise extension included") 50 | #endif 51 | 52 | namespace glm 53 | { 54 | /// @addtogroup gtc_noise 55 | /// @{ 56 | 57 | /// Classic perlin noise. 58 | /// @see gtc_noise 59 | template class vecType> 60 | GLM_FUNC_DECL T perlin( 61 | vecType const & p); 62 | 63 | /// Periodic perlin noise. 64 | /// @see gtc_noise 65 | template class vecType> 66 | GLM_FUNC_DECL T perlin( 67 | vecType const & p, 68 | vecType const & rep); 69 | 70 | /// Simplex noise. 71 | /// @see gtc_noise 72 | template class vecType> 73 | GLM_FUNC_DECL T simplex( 74 | vecType const & p); 75 | 76 | /// @} 77 | }//namespace glm 78 | 79 | #include "noise.inl" 80 | 81 | #endif//GLM_GTC_noise 82 | -------------------------------------------------------------------------------- /external/include/glm/gtc/type_precision.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtc_swizzle 24 | /// @file glm/gtc/swizzle.inl 25 | /// @date 2009-06-14 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | namespace glm 30 | { 31 | 32 | } 33 | -------------------------------------------------------------------------------- /external/include/glm/gtx/closest_point.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtx_bit 24 | /// @file glm/gtx/bit.hpp 25 | /// @date 2005-12-30 / 2011-06-07 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// 30 | /// @defgroup gtx_closest_point GLM_GTX_closest_point 31 | /// @ingroup gtx 32 | /// 33 | /// @brief Find the point on a straight line which is the closet of a point. 34 | /// 35 | /// need to be included to use these functionalities. 36 | /////////////////////////////////////////////////////////////////////////////////// 37 | 38 | #ifndef GLM_GTX_closest_point 39 | #define GLM_GTX_closest_point 40 | 41 | // Dependency: 42 | #include "../glm.hpp" 43 | 44 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 45 | # pragma message("GLM: GLM_GTX_closest_point extension included") 46 | #endif 47 | 48 | namespace glm 49 | { 50 | /// @addtogroup gtx_closest_point 51 | /// @{ 52 | 53 | /// Find the point on a straight line which is the closet of a point. 54 | /// @see gtx_closest_point 55 | template 56 | GLM_FUNC_DECL detail::tvec3 closestPointOnLine( 57 | detail::tvec3 const & point, 58 | detail::tvec3 const & a, 59 | detail::tvec3 const & b); 60 | 61 | /// @} 62 | }// namespace glm 63 | 64 | #include "closest_point.inl" 65 | 66 | #endif//GLM_GTX_closest_point 67 | -------------------------------------------------------------------------------- /external/include/glm/gtx/closest_point.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-30 5 | // Updated : 2008-10-05 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/closest_point.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | #ifndef glm_gtx_closest_point 11 | #define glm_gtx_closest_point 12 | 13 | namespace glm 14 | { 15 | template 16 | GLM_FUNC_QUALIFIER detail::tvec3 closestPointOnLine 17 | ( 18 | detail::tvec3 const & point, 19 | detail::tvec3 const & a, 20 | detail::tvec3 const & b 21 | ) 22 | { 23 | T LineLength = distance(a, b); 24 | detail::tvec3 Vector = point - a; 25 | detail::tvec3 LineDirection = (b - a) / LineLength; 26 | 27 | // Project Vector to LineDirection to get the distance of point from a 28 | T Distance = dot(Vector, LineDirection); 29 | 30 | if(Distance <= T(0)) return a; 31 | if(Distance >= LineLength) return b; 32 | return a + LineDirection * Distance; 33 | } 34 | }//namespace glm 35 | 36 | #endif//glm_gtx_closest_point 37 | -------------------------------------------------------------------------------- /external/include/glm/gtx/color_space_YCoCg.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-10-28 5 | // Updated : 2008-10-28 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/color_space_YCoCg.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER detail::tvec3 rgb2YCoCg 14 | ( 15 | detail::tvec3 const & rgbColor 16 | ) 17 | { 18 | detail::tvec3 result; 19 | result.x/*Y */ = rgbColor.r / T(4) + rgbColor.g / T(2) + rgbColor.b / T(4); 20 | result.y/*Co*/ = rgbColor.r / T(2) + rgbColor.g * T(0) - rgbColor.b / T(2); 21 | result.z/*Cg*/ = - rgbColor.r / T(4) + rgbColor.g / T(2) - rgbColor.b / T(4); 22 | return result; 23 | } 24 | 25 | template 26 | GLM_FUNC_QUALIFIER detail::tvec3 rgb2YCoCgR 27 | ( 28 | detail::tvec3 const & rgbColor 29 | ) 30 | { 31 | detail::tvec3 result; 32 | result.x/*Y */ = rgbColor.g / T(2) + (rgbColor.r + rgbColor.b) / T(4); 33 | result.y/*Co*/ = rgbColor.r - rgbColor.b; 34 | result.z/*Cg*/ = rgbColor.g - (rgbColor.r + rgbColor.b) / T(2); 35 | return result; 36 | } 37 | 38 | template 39 | GLM_FUNC_QUALIFIER detail::tvec3 YCoCg2rgb 40 | ( 41 | detail::tvec3 const & YCoCgColor 42 | ) 43 | { 44 | detail::tvec3 result; 45 | result.r = YCoCgColor.x + YCoCgColor.y - YCoCgColor.z; 46 | result.g = YCoCgColor.x + YCoCgColor.z; 47 | result.b = YCoCgColor.x - YCoCgColor.y - YCoCgColor.z; 48 | return result; 49 | } 50 | 51 | template 52 | GLM_FUNC_QUALIFIER detail::tvec3 YCoCgR2rgb 53 | ( 54 | detail::tvec3 const & YCoCgRColor 55 | ) 56 | { 57 | detail::tvec3 result; 58 | T tmp = YCoCgRColor.x - (YCoCgRColor.z / T(2)); 59 | result.g = YCoCgRColor.z + tmp; 60 | result.b = tmp - (YCoCgRColor.y / T(2)); 61 | result.r = result.b + YCoCgRColor.y; 62 | return result; 63 | } 64 | }//namespace glm 65 | -------------------------------------------------------------------------------- /external/include/glm/gtx/compatibility.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2007-03-16 5 | // Updated : 2008-10-24 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/compatibility.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | // isfinite 13 | template 14 | GLM_FUNC_QUALIFIER bool isfinite( 15 | genType const & x) 16 | { 17 | # if(GLM_LANG & GLM_LANG_CXX11_FLAG) 18 | return std::isfinite(x) != 0; 19 | # elif(GLM_COMPILER & GLM_COMPILER_VC) 20 | return _finite(x); 21 | # elif(GLM_COMPILER & GLM_COMPILER_GCC && GLM_PLATFORM & GLM_PLATFORM_ANDROID) 22 | return _isfinite(x) != 0; 23 | # else 24 | return isfinite(x) != 0; 25 | # endif 26 | } 27 | 28 | template 29 | GLM_FUNC_QUALIFIER detail::tvec2 isfinite( 30 | detail::tvec2 const & x) 31 | { 32 | return detail::tvec2( 33 | isfinite(x.x), 34 | isfinite(x.y)); 35 | } 36 | 37 | template 38 | GLM_FUNC_QUALIFIER detail::tvec3 isfinite( 39 | detail::tvec3 const & x) 40 | { 41 | return detail::tvec3( 42 | isfinite(x.x), 43 | isfinite(x.y), 44 | isfinite(x.z)); 45 | } 46 | 47 | template 48 | GLM_FUNC_QUALIFIER detail::tvec4 isfinite( 49 | detail::tvec4 const & x) 50 | { 51 | return detail::tvec4( 52 | isfinite(x.x), 53 | isfinite(x.y), 54 | isfinite(x.z), 55 | isfinite(x.w)); 56 | } 57 | 58 | }//namespace glm 59 | -------------------------------------------------------------------------------- /external/include/glm/gtx/component_wise.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtx_component_wise 24 | /// @file glm/gtx/component_wise.hpp 25 | /// @date 2007-05-21 / 2011-06-07 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// 30 | /// @defgroup gtx_component_wise GLM_GTX_component_wise 31 | /// @ingroup gtx 32 | /// 33 | /// @brief Operations between components of a type 34 | /// 35 | /// need to be included to use these functionalities. 36 | /////////////////////////////////////////////////////////////////////////////////// 37 | 38 | #ifndef GLM_GTX_component_wise 39 | #define GLM_GTX_component_wise 40 | 41 | // Dependencies 42 | #include "../detail/setup.hpp" 43 | 44 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 45 | # pragma message("GLM: GLM_GTX_component_wise extension included") 46 | #endif 47 | 48 | namespace glm 49 | { 50 | /// @addtogroup gtx_component_wise 51 | /// @{ 52 | 53 | /// Add all vector components together. 54 | /// @see gtx_component_wise 55 | template 56 | GLM_FUNC_DECL typename genType::value_type compAdd( 57 | genType const & v); 58 | 59 | /// Multiply all vector components together. 60 | /// @see gtx_component_wise 61 | template 62 | GLM_FUNC_DECL typename genType::value_type compMul( 63 | genType const & v); 64 | 65 | /// Find the minimum value between single vector components. 66 | /// @see gtx_component_wise 67 | template 68 | GLM_FUNC_DECL typename genType::value_type compMin( 69 | genType const & v); 70 | 71 | /// Find the maximum value between single vector components. 72 | /// @see gtx_component_wise 73 | template 74 | GLM_FUNC_DECL typename genType::value_type compMax( 75 | genType const & v); 76 | 77 | /// @} 78 | }//namespace glm 79 | 80 | #include "component_wise.inl" 81 | 82 | #endif//GLM_GTX_component_wise 83 | -------------------------------------------------------------------------------- /external/include/glm/gtx/component_wise.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2007-05-21 5 | // Updated : 2010-02-12 6 | // Licence : This source is under MIT License 7 | // File : gtx_component_wise.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template class vecType> 13 | GLM_FUNC_QUALIFIER T compAdd(vecType const & v) 14 | { 15 | T result(0); 16 | for(length_t i = 0; i < v.length(); ++i) 17 | result += v[i]; 18 | return result; 19 | } 20 | 21 | template class vecType> 22 | GLM_FUNC_QUALIFIER T compMul(vecType const & v) 23 | { 24 | T result(1); 25 | for(length_t i = 0; i < v.length(); ++i) 26 | result *= v[i]; 27 | return result; 28 | } 29 | 30 | template class vecType> 31 | GLM_FUNC_QUALIFIER T compMin(vecType const & v) 32 | { 33 | T result(v[0]); 34 | for(length_t i = 1; i < v.length(); ++i) 35 | result = min(result, v[i]); 36 | return result; 37 | } 38 | 39 | template class vecType> 40 | GLM_FUNC_QUALIFIER T compMax(vecType const & v) 41 | { 42 | T result(v[0]); 43 | for(length_t i = 1; i < v.length(); ++i) 44 | result = max(result, v[i]); 45 | return result; 46 | } 47 | }//namespace glm 48 | -------------------------------------------------------------------------------- /external/include/glm/gtx/constants.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /////////////////////////////////////////////////////////////////////////////////// 23 | 24 | #ifndef GLM_GTX_constants 25 | #define GLM_GTX_constants 26 | 27 | #include "../gtc/constants.hpp" 28 | 29 | #if(defined(GLM_MESSAGES)) 30 | # pragma message("GLM: GLM_GTX_constants extension is deprecated, include GLM_GTC_constants (glm/gtc/constants.hpp) instead") 31 | #endif 32 | 33 | #endif//GLM_GTX_constants 34 | -------------------------------------------------------------------------------- /external/include/glm/gtx/epsilon.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /////////////////////////////////////////////////////////////////////////////////// 23 | 24 | #if(defined(GLM_MESSAGES)) 25 | # pragma message("GLM: GLM_GTX_epsilon extension is deprecated, include GLM_GTC_epsilon (glm/gtc/epsilon) instead") 26 | #endif 27 | 28 | // Promoted: 29 | #include "../gtc/epsilon.hpp" 30 | -------------------------------------------------------------------------------- /external/include/glm/gtx/extend.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtx_extend 24 | /// @file glm/gtx/extend.hpp 25 | /// @date 2006-01-07 / 2011-06-07 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// 30 | /// @defgroup gtx_extend GLM_GTX_extend 31 | /// @ingroup gtx 32 | /// 33 | /// @brief Extend a position from a source to a position at a defined length. 34 | /// 35 | /// need to be included to use these functionalities. 36 | /////////////////////////////////////////////////////////////////////////////////// 37 | 38 | #ifndef GLM_GTX_extend 39 | #define GLM_GTX_extend 40 | 41 | // Dependency: 42 | #include "../glm.hpp" 43 | 44 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 45 | # pragma message("GLM: GLM_GTX_extend extension included") 46 | #endif 47 | 48 | namespace glm 49 | { 50 | /// @addtogroup gtx_extend 51 | /// @{ 52 | 53 | /// Extends of Length the Origin position using the (Source - Origin) direction. 54 | /// @see gtx_extend 55 | template 56 | GLM_FUNC_DECL genType extend( 57 | genType const & Origin, 58 | genType const & Source, 59 | typename genType::value_type const Length); 60 | 61 | /// @} 62 | }//namespace glm 63 | 64 | #include "extend.inl" 65 | 66 | #endif//GLM_GTX_extend 67 | -------------------------------------------------------------------------------- /external/include/glm/gtx/extend.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2006-01-07 5 | // Updated : 2008-10-05 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/extend.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER genType extend 14 | ( 15 | genType const & Origin, 16 | genType const & Source, 17 | genType const & Distance 18 | ) 19 | { 20 | return Origin + (Source - Origin) * Distance; 21 | } 22 | 23 | template 24 | GLM_FUNC_QUALIFIER detail::tvec2 extend 25 | ( 26 | detail::tvec2 const & Origin, 27 | detail::tvec2 const & Source, 28 | T const & Distance 29 | ) 30 | { 31 | return Origin + (Source - Origin) * Distance; 32 | } 33 | 34 | template 35 | GLM_FUNC_QUALIFIER detail::tvec3 extend 36 | ( 37 | detail::tvec3 const & Origin, 38 | detail::tvec3 const & Source, 39 | T const & Distance 40 | ) 41 | { 42 | return Origin + (Source - Origin) * Distance; 43 | } 44 | 45 | template 46 | GLM_FUNC_QUALIFIER detail::tvec4 extend 47 | ( 48 | detail::tvec4 const & Origin, 49 | detail::tvec4 const & Source, 50 | T const & Distance 51 | ) 52 | { 53 | return Origin + (Source - Origin) * Distance; 54 | } 55 | }//namespace glm 56 | -------------------------------------------------------------------------------- /external/include/glm/gtx/fast_trigonometry.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2006-01-08 5 | // Updated : 2011-10-14 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/fast_trigonometry.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | // sin 13 | template 14 | GLM_FUNC_QUALIFIER T fastSin(T const & x) 15 | { 16 | return x - ((x * x * x) / T(6)) + ((x * x * x * x * x) / T(120)) - ((x * x * x * x * x * x * x) / T(5040)); 17 | } 18 | 19 | VECTORIZE_VEC(fastSin) 20 | 21 | // cos 22 | template 23 | GLM_FUNC_QUALIFIER T fastCos(T const & x) 24 | { 25 | return T(1) - (x * x * T(0.5)) + (x * x * x * x * T(0.041666666666)) - (x * x * x * x * x * x * T(0.00138888888888)); 26 | } 27 | 28 | VECTORIZE_VEC(fastCos) 29 | 30 | // tan 31 | template 32 | GLM_FUNC_QUALIFIER T fastTan(T const & x) 33 | { 34 | return 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)); 35 | } 36 | 37 | VECTORIZE_VEC(fastTan) 38 | 39 | // asin 40 | template 41 | GLM_FUNC_QUALIFIER T fastAsin(T const & x) 42 | { 43 | return 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)); 44 | } 45 | 46 | VECTORIZE_VEC(fastAsin) 47 | 48 | // acos 49 | template 50 | GLM_FUNC_QUALIFIER T fastAcos(T const & x) 51 | { 52 | return T(1.5707963267948966192313216916398) - fastAsin(x); //(PI / 2) 53 | } 54 | 55 | VECTORIZE_VEC(fastAcos) 56 | 57 | // atan 58 | template 59 | GLM_FUNC_QUALIFIER T fastAtan(T const & y, T const & x) 60 | { 61 | T sgn = sign(y) * sign(x); 62 | return abs(fastAtan(y / x)) * sgn; 63 | } 64 | 65 | VECTORIZE_VEC_VEC(fastAtan) 66 | 67 | template 68 | GLM_FUNC_QUALIFIER T fastAtan(T const & x) 69 | { 70 | return 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)); 71 | } 72 | 73 | VECTORIZE_VEC(fastAtan) 74 | 75 | }//namespace glm 76 | -------------------------------------------------------------------------------- /external/include/glm/gtx/gradient_paint.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtx_gradient_paint 24 | /// @file glm/gtx/gradient_paint.hpp 25 | /// @date 2009-03-06 / 2011-06-07 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// @see gtx_optimum_pow (dependence) 30 | /// 31 | /// @defgroup gtx_gradient_paint GLM_GTX_gradient_paint 32 | /// @ingroup gtx 33 | /// 34 | /// @brief Functions that return the color of procedural gradient for specific coordinates. 35 | /// need to be included to use these functionalities. 36 | /////////////////////////////////////////////////////////////////////////////////// 37 | 38 | #ifndef GLM_GTX_gradient_paint 39 | #define GLM_GTX_gradient_paint 40 | 41 | // Dependency: 42 | #include "../glm.hpp" 43 | #include "../gtx/optimum_pow.hpp" 44 | 45 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 46 | # pragma message("GLM: GLM_GTX_gradient_paint extension included") 47 | #endif 48 | 49 | namespace glm 50 | { 51 | /// @addtogroup gtx_gradient_paint 52 | /// @{ 53 | 54 | /// Return a color from a radial gradient. 55 | /// @see - gtx_gradient_paint 56 | template 57 | GLM_FUNC_DECL T radialGradient( 58 | detail::tvec2 const & Center, 59 | T const & Radius, 60 | detail::tvec2 const & Focal, 61 | detail::tvec2 const & Position); 62 | 63 | /// Return a color from a linear gradient. 64 | /// @see - gtx_gradient_paint 65 | template 66 | GLM_FUNC_DECL T linearGradient( 67 | detail::tvec2 const & Point0, 68 | detail::tvec2 const & Point1, 69 | detail::tvec2 const & Position); 70 | 71 | /// @} 72 | }// namespace glm 73 | 74 | #include "gradient_paint.inl" 75 | 76 | #endif//GLM_GTX_gradient_paint 77 | -------------------------------------------------------------------------------- /external/include/glm/gtx/gradient_paint.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2009-03-06 5 | // Updated : 2013-04-09 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/gradient_paint.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER T radialGradient 14 | ( 15 | detail::tvec2 const & Center, 16 | T const & Radius, 17 | detail::tvec2 const & Focal, 18 | detail::tvec2 const & Position 19 | ) 20 | { 21 | detail::tvec2 F = Focal - Center; 22 | detail::tvec2 D = Position - Focal; 23 | T Radius2 = pow2(Radius); 24 | T Fx2 = pow2(F.x); 25 | T Fy2 = pow2(F.y); 26 | 27 | T 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)); 28 | T Denominator = Radius2 - (Fx2 + Fy2); 29 | return Numerator / Denominator; 30 | } 31 | 32 | template 33 | GLM_FUNC_QUALIFIER T linearGradient 34 | ( 35 | detail::tvec2 const & Point0, 36 | detail::tvec2 const & Point1, 37 | detail::tvec2 const & Position 38 | ) 39 | { 40 | detail::tvec2 Dist = Point1 - Point0; 41 | return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist); 42 | } 43 | }//namespace glm 44 | -------------------------------------------------------------------------------- /external/include/glm/gtx/handed_coordinate_space.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtx_handed_coordinate_space 24 | /// @file glm/gtx/handed_coordinate_space.hpp 25 | /// @date 2005-12-21 / 2011-06-07 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// 30 | /// @defgroup gtx_handed_coordinate_space GLM_GTX_handed_coordinate_space 31 | /// @ingroup gtx 32 | /// 33 | /// @brief To know if a set of three basis vectors defines a right or left-handed coordinate system. 34 | /// 35 | /// need to be included to use these functionalities. 36 | /////////////////////////////////////////////////////////////////////////////////// 37 | 38 | #ifndef GLM_GTX_handed_coordinate_space 39 | #define GLM_GTX_handed_coordinate_space 40 | 41 | // Dependency: 42 | #include "../glm.hpp" 43 | 44 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 45 | # pragma message("GLM: GLM_GTX_handed_coordinate_space extension included") 46 | #endif 47 | 48 | namespace glm 49 | { 50 | /// @addtogroup gtx_handed_coordinate_space 51 | /// @{ 52 | 53 | //! Return if a trihedron right handed or not. 54 | //! From GLM_GTX_handed_coordinate_space extension. 55 | template 56 | GLM_FUNC_DECL bool rightHanded( 57 | detail::tvec3 const & tangent, 58 | detail::tvec3 const & binormal, 59 | detail::tvec3 const & normal); 60 | 61 | //! Return if a trihedron left handed or not. 62 | //! From GLM_GTX_handed_coordinate_space extension. 63 | template 64 | GLM_FUNC_DECL bool leftHanded( 65 | detail::tvec3 const & tangent, 66 | detail::tvec3 const & binormal, 67 | detail::tvec3 const & normal); 68 | 69 | /// @} 70 | }// namespace glm 71 | 72 | #include "handed_coordinate_space.inl" 73 | 74 | #endif//GLM_GTX_handed_coordinate_space 75 | -------------------------------------------------------------------------------- /external/include/glm/gtx/handed_coordinate_space.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2009-02-19 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/handed_coordinate_space.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER bool rightHanded 14 | ( 15 | detail::tvec3 const & tangent, 16 | detail::tvec3 const & binormal, 17 | detail::tvec3 const & normal 18 | ) 19 | { 20 | return dot(cross(normal, tangent), binormal) > T(0); 21 | } 22 | 23 | template 24 | GLM_FUNC_QUALIFIER bool leftHanded 25 | ( 26 | detail::tvec3 const & tangent, 27 | detail::tvec3 const & binormal, 28 | detail::tvec3 const & normal 29 | ) 30 | { 31 | return dot(cross(normal, tangent), binormal) < T(0); 32 | } 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /external/include/glm/gtx/int_10_10_10_2.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /////////////////////////////////////////////////////////////////////////////////// 23 | 24 | #ifndef GLM_GTX_int_10_10_10_2 25 | #define GLM_GTX_int_10_10_10_2 26 | 27 | // Dependency: 28 | #include "../glm.hpp" 29 | #include "../gtx/raw_data.hpp" 30 | 31 | #if(defined(GLM_MESSAGES)) 32 | # pragma message("GLM: GLM_GTX_int_10_10_10_2 extension is deprecated, include GLM_GTC_packing (glm/gtc/packing.hpp) instead") 33 | #endif 34 | 35 | namespace glm 36 | { 37 | //! Deprecated, use packUnorm3x10_1x2 instead. 38 | GLM_DEPRECATED GLM_FUNC_DECL dword uint10_10_10_2_cast(glm::vec4 const & v); 39 | 40 | }//namespace glm 41 | 42 | #include "int_10_10_10_2.inl" 43 | 44 | #endif//GLM_GTX_int_10_10_10_2 45 | -------------------------------------------------------------------------------- /external/include/glm/gtx/int_10_10_10_2.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /////////////////////////////////////////////////////////////////////////////////// 23 | 24 | namespace glm 25 | { 26 | GLM_FUNC_QUALIFIER dword uint10_10_10_2_cast 27 | ( 28 | glm::vec4 const & v 29 | ) 30 | { 31 | return 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); 32 | } 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /external/include/glm/gtx/log_base.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtx_log_base 24 | /// @file glm/gtx/log_base.hpp 25 | /// @date 2008-10-24 / 2011-06-07 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// 30 | /// @defgroup gtx_log_base GLM_GTX_log_base 31 | /// @ingroup gtx 32 | /// 33 | /// @brief Logarithm for any base. base can be a vector or a scalar. 34 | /// 35 | /// need to be included to use these functionalities. 36 | /////////////////////////////////////////////////////////////////////////////////// 37 | 38 | #ifndef GLM_GTX_log_base 39 | #define GLM_GTX_log_base 40 | 41 | // Dependency: 42 | #include "../glm.hpp" 43 | 44 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 45 | # pragma message("GLM: GLM_GTX_log_base extension included") 46 | #endif 47 | 48 | namespace glm 49 | { 50 | /// @addtogroup gtx_log_base 51 | /// @{ 52 | 53 | //! Logarithm for any base. 54 | //! From GLM_GTX_log_base. 55 | template 56 | GLM_FUNC_DECL genType log( 57 | genType const & x, 58 | genType const & base); 59 | 60 | /// @} 61 | }//namespace glm 62 | 63 | #include "log_base.inl" 64 | 65 | #endif//GLM_GTX_log_base 66 | -------------------------------------------------------------------------------- /external/include/glm/gtx/log_base.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-10-24 5 | // Updated : 2008-10-24 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/log_base.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER genType log( 14 | genType const & x, 15 | genType const & base) 16 | { 17 | assert(x != genType(0)); 18 | 19 | return glm::log(x) / glm::log(base); 20 | } 21 | 22 | VECTORIZE_VEC_SCA(log) 23 | VECTORIZE_VEC_VEC(log) 24 | }//namespace glm 25 | -------------------------------------------------------------------------------- /external/include/glm/gtx/matrix_cross_product.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtx_matrix_cross_product 24 | /// @file glm/gtx/matrix_cross_product.hpp 25 | /// @date 2005-12-21 / 2011-06-07 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// @see gtx_extented_min_max (dependence) 30 | /// 31 | /// @defgroup gtx_matrix_cross_product GLM_GTX_matrix_cross_product 32 | /// @ingroup gtx 33 | /// 34 | /// @brief Build cross product matrices 35 | /// 36 | /// need to be included to use these functionalities. 37 | /////////////////////////////////////////////////////////////////////////////////// 38 | 39 | #ifndef GLM_GTX_matrix_cross_product 40 | #define GLM_GTX_matrix_cross_product 41 | 42 | // Dependency: 43 | #include "../glm.hpp" 44 | 45 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 46 | # pragma message("GLM: GLM_GTX_matrix_cross_product extension included") 47 | #endif 48 | 49 | namespace glm 50 | { 51 | /// @addtogroup gtx_matrix_cross_product 52 | /// @{ 53 | 54 | //! Build a cross product matrix. 55 | //! From GLM_GTX_matrix_cross_product extension. 56 | template 57 | GLM_FUNC_DECL detail::tmat3x3 matrixCross3( 58 | detail::tvec3 const & x); 59 | 60 | //! Build a cross product matrix. 61 | //! From GLM_GTX_matrix_cross_product extension. 62 | template 63 | GLM_FUNC_DECL detail::tmat4x4 matrixCross4( 64 | detail::tvec3 const & x); 65 | 66 | /// @} 67 | }//namespace glm 68 | 69 | #include "matrix_cross_product.inl" 70 | 71 | #endif//GLM_GTX_matrix_cross_product 72 | -------------------------------------------------------------------------------- /external/include/glm/gtx/matrix_cross_product.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2005-12-21 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/matrix_cross_product.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER detail::tmat3x3 matrixCross3 14 | ( 15 | detail::tvec3 const & x 16 | ) 17 | { 18 | detail::tmat3x3 Result(T(0)); 19 | Result[0][1] = x.z; 20 | Result[1][0] = -x.z; 21 | Result[0][2] = -x.y; 22 | Result[2][0] = x.y; 23 | Result[1][2] = x.x; 24 | Result[2][1] = -x.x; 25 | return Result; 26 | } 27 | 28 | template 29 | GLM_FUNC_QUALIFIER detail::tmat4x4 matrixCross4 30 | ( 31 | detail::tvec3 const & x 32 | ) 33 | { 34 | detail::tmat4x4 Result(T(0)); 35 | Result[0][1] = x.z; 36 | Result[1][0] = -x.z; 37 | Result[0][2] = -x.y; 38 | Result[2][0] = x.y; 39 | Result[1][2] = x.x; 40 | Result[2][1] = -x.x; 41 | return Result; 42 | } 43 | 44 | }//namespace glm 45 | -------------------------------------------------------------------------------- /external/include/glm/gtx/mixed_product.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtx_mixed_product 24 | /// @file glm/gtx/mixed_product.hpp 25 | /// @date 2007-04-03 / 2011-06-07 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// 30 | /// @defgroup gtx_mixed_product GLM_GTX_mixed_producte 31 | /// @ingroup gtx 32 | /// 33 | /// @brief Mixed product of 3 vectors. 34 | /// 35 | /// need to be included to use these functionalities. 36 | /////////////////////////////////////////////////////////////////////////////////// 37 | 38 | #ifndef GLM_GTX_mixed_product 39 | #define GLM_GTX_mixed_product 40 | 41 | // Dependency: 42 | #include "../glm.hpp" 43 | 44 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 45 | # pragma message("GLM: GLM_GTX_mixed_product extension included") 46 | #endif 47 | 48 | namespace glm 49 | { 50 | /// @addtogroup gtx_mixed_product 51 | /// @{ 52 | 53 | /// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension) 54 | template 55 | GLM_FUNC_DECL T mixedProduct( 56 | detail::tvec3 const & v1, 57 | detail::tvec3 const & v2, 58 | detail::tvec3 const & v3); 59 | 60 | /// @} 61 | }// namespace glm 62 | 63 | #include "mixed_product.inl" 64 | 65 | #endif//GLM_GTX_mixed_product 66 | -------------------------------------------------------------------------------- /external/include/glm/gtx/mixed_product.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2007-04-03 5 | // Updated : 2008-09-17 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/mixed_product.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER T mixedProduct 14 | ( 15 | detail::tvec3 const & v1, 16 | detail::tvec3 const & v2, 17 | detail::tvec3 const & v3 18 | ) 19 | { 20 | return dot(cross(v1, v2), v3); 21 | } 22 | }//namespace glm 23 | -------------------------------------------------------------------------------- /external/include/glm/gtx/multiple.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtx_multiple 24 | /// @file glm/gtx/multiple.hpp 25 | /// @date 2009-10-26 / 2011-06-07 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// @see gtx_extented_min_max (dependence) 30 | /// 31 | /// @defgroup gtx_multiple GLM_GTX_multiple 32 | /// @ingroup gtx 33 | /// 34 | /// @brief Find the closest number of a number multiple of other number. 35 | /// 36 | /// need to be included to use these functionalities. 37 | /////////////////////////////////////////////////////////////////////////////////// 38 | 39 | #ifndef GLM_GTX_multiple 40 | #define GLM_GTX_multiple 41 | 42 | // Dependency: 43 | #include "../glm.hpp" 44 | 45 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 46 | # pragma message("GLM: GLM_GTX_multiple extension included") 47 | #endif 48 | 49 | namespace glm 50 | { 51 | /// @addtogroup gtx_multiple 52 | /// @{ 53 | 54 | /// Higher multiple number of Source. 55 | /// 56 | /// @tparam genType Floating-point or integer scalar or vector types. 57 | /// @param Source 58 | /// @param Multiple Must be a null or positive value 59 | /// 60 | /// @see gtx_multiple 61 | template 62 | GLM_FUNC_DECL genType higherMultiple( 63 | genType const & Source, 64 | genType const & Multiple); 65 | 66 | /// Lower multiple number of Source. 67 | /// 68 | /// @tparam genType Floating-point or integer scalar or vector types. 69 | /// @param Source 70 | /// @param Multiple Must be a null or positive value 71 | /// 72 | /// @see gtx_multiple 73 | template 74 | GLM_FUNC_DECL genType lowerMultiple( 75 | genType const & Source, 76 | genType const & Multiple); 77 | 78 | /// @} 79 | }//namespace glm 80 | 81 | #include "multiple.inl" 82 | 83 | #endif//GLM_GTX_multiple 84 | -------------------------------------------------------------------------------- /external/include/glm/gtx/noise.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /////////////////////////////////////////////////////////////////////////////////// 23 | 24 | #if(defined(GLM_MESSAGES)) 25 | # pragma message("GLM: GLM_GTX_random extension is deprecated, include GLM_GTC_random (glm/gtc/noise.hpp) instead") 26 | #endif 27 | 28 | // Promoted: 29 | #include "../gtc/noise.hpp" 30 | -------------------------------------------------------------------------------- /external/include/glm/gtx/normal.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtx_normal 24 | /// @file glm/gtx/normal.hpp 25 | /// @date 2005-12-21 / 2011-06-07 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// @see gtx_extented_min_max (dependence) 30 | /// 31 | /// @defgroup gtx_normal GLM_GTX_normal 32 | /// @ingroup gtx 33 | /// 34 | /// @brief Compute the normal of a triangle. 35 | /// 36 | /// need to be included to use these functionalities. 37 | /////////////////////////////////////////////////////////////////////////////////// 38 | 39 | #ifndef GLM_GTX_normal 40 | #define GLM_GTX_normal 41 | 42 | // Dependency: 43 | #include "../glm.hpp" 44 | 45 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 46 | # pragma message("GLM: GLM_GTX_normal extension included") 47 | #endif 48 | 49 | namespace glm 50 | { 51 | /// @addtogroup gtx_normal 52 | /// @{ 53 | 54 | //! Computes triangle normal from triangle points. 55 | //! From GLM_GTX_normal extension. 56 | template 57 | GLM_FUNC_DECL detail::tvec3 triangleNormal( 58 | detail::tvec3 const & p1, 59 | detail::tvec3 const & p2, 60 | detail::tvec3 const & p3); 61 | 62 | /// @} 63 | }//namespace glm 64 | 65 | #include "normal.inl" 66 | 67 | #endif//GLM_GTX_normal 68 | -------------------------------------------------------------------------------- /external/include/glm/gtx/normal.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2011-06-07 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/normal.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER detail::tvec3 triangleNormal 14 | ( 15 | detail::tvec3 const & p1, 16 | detail::tvec3 const & p2, 17 | detail::tvec3 const & p3 18 | ) 19 | { 20 | return normalize(cross(p1 - p2, p1 - p3)); 21 | } 22 | }//namespace glm 23 | -------------------------------------------------------------------------------- /external/include/glm/gtx/normalize_dot.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtx_normalize_dot 24 | /// @file glm/gtx/normalize_dot.hpp 25 | /// @date 2007-09-28 / 2011-06-07 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// @see gtx_fast_square_root (dependence) 30 | /// 31 | /// @defgroup gtx_normalize_dot GLM_GTX_normalize_dot 32 | /// @ingroup gtx 33 | /// 34 | /// @brief Dot product of vectors that need to be normalize with a single square root. 35 | /// 36 | /// need to be included to use these functionalities. 37 | /////////////////////////////////////////////////////////////////////////////////// 38 | 39 | #ifndef GLM_GTX_normalize_dot 40 | #define GLM_GTX_normalize_dot 41 | 42 | // Dependency: 43 | #include "../glm.hpp" 44 | #include "../gtx/fast_square_root.hpp" 45 | 46 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 47 | # pragma message("GLM: GLM_GTX_normalize_dot extension included") 48 | #endif 49 | 50 | namespace glm 51 | { 52 | /// @addtogroup gtx_normalize_dot 53 | /// @{ 54 | 55 | //! Normalize parameters and returns the dot product of x and y. 56 | //! It's faster that dot(normalize(x), normalize(y)). 57 | //! From GLM_GTX_normalize_dot extension. 58 | template 59 | GLM_FUNC_DECL typename genType::value_type normalizeDot( 60 | genType const & x, 61 | genType const & y); 62 | 63 | //! Normalize parameters and returns the dot product of x and y. 64 | //! Faster that dot(fastNormalize(x), fastNormalize(y)). 65 | //! From GLM_GTX_normalize_dot extension. 66 | template 67 | GLM_FUNC_DECL typename genType::value_type fastNormalizeDot( 68 | genType const & x, 69 | genType const & y); 70 | 71 | /// @} 72 | }//namespace glm 73 | 74 | #include "normalize_dot.inl" 75 | 76 | #endif//GLM_GTX_normalize_dot 77 | -------------------------------------------------------------------------------- /external/include/glm/gtx/normalize_dot.inl: -------------------------------------------------------------------------------- 1 | ////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | ////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2007-09-28 5 | // Updated : 2008-10-07 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/normalize_dot.inl 8 | ////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER genType normalizeDot 14 | ( 15 | genType const & x, 16 | genType const & y 17 | ) 18 | { 19 | return 20 | glm::dot(x, y) * 21 | glm::inversesqrt(glm::dot(x, x) * 22 | glm::dot(y, y)); 23 | } 24 | 25 | template 26 | GLM_FUNC_QUALIFIER T normalizeDot 27 | ( 28 | detail::tvec2 const & x, 29 | detail::tvec2 const & y 30 | ) 31 | { 32 | return 33 | glm::dot(x, y) * 34 | glm::inversesqrt(glm::dot(x, x) * 35 | glm::dot(y, y)); 36 | } 37 | 38 | template 39 | GLM_FUNC_QUALIFIER T normalizeDot 40 | ( 41 | detail::tvec3 const & x, 42 | detail::tvec3 const & y 43 | ) 44 | { 45 | return 46 | glm::dot(x, y) * 47 | glm::inversesqrt(glm::dot(x, x) * 48 | glm::dot(y, y)); 49 | } 50 | 51 | template 52 | GLM_FUNC_QUALIFIER T normalizeDot 53 | ( 54 | detail::tvec4 const & x, 55 | detail::tvec4 const & y 56 | ) 57 | { 58 | return 59 | glm::dot(x, y) * 60 | glm::inversesqrt(glm::dot(x, x) * 61 | glm::dot(y, y)); 62 | } 63 | 64 | template 65 | GLM_FUNC_QUALIFIER genType fastNormalizeDot 66 | ( 67 | genType const & x, 68 | genType const & y 69 | ) 70 | { 71 | return 72 | glm::dot(x, y) * 73 | fastInverseSqrt(glm::dot(x, x) * 74 | glm::dot(y, y)); 75 | } 76 | 77 | template 78 | GLM_FUNC_QUALIFIER T fastNormalizeDot 79 | ( 80 | detail::tvec2 const & x, 81 | detail::tvec2 const & y 82 | ) 83 | { 84 | return 85 | glm::dot(x, y) * 86 | fastInverseSqrt(glm::dot(x, x) * 87 | glm::dot(y, y)); 88 | } 89 | 90 | template 91 | GLM_FUNC_QUALIFIER T fastNormalizeDot 92 | ( 93 | detail::tvec3 const & x, 94 | detail::tvec3 const & y 95 | ) 96 | { 97 | return 98 | glm::dot(x, y) * 99 | fastInverseSqrt(glm::dot(x, x) * 100 | glm::dot(y, y)); 101 | } 102 | 103 | template 104 | GLM_FUNC_QUALIFIER T fastNormalizeDot 105 | ( 106 | detail::tvec4 const & x, 107 | detail::tvec4 const & y 108 | ) 109 | { 110 | return 111 | glm::dot(x, y) * 112 | fastInverseSqrt(glm::dot(x, x) * 113 | glm::dot(y, y)); 114 | } 115 | }//namespace glm 116 | -------------------------------------------------------------------------------- /external/include/glm/gtx/number_precision.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2007-05-10 5 | // Updated : 2007-05-10 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/number_precision.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /external/include/glm/gtx/optimum_pow.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2005-12-27 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/optimum_pow.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER genType pow2(genType const & x) 14 | { 15 | return x * x; 16 | } 17 | 18 | template 19 | GLM_FUNC_QUALIFIER genType pow3(genType const & x) 20 | { 21 | return x * x * x; 22 | } 23 | 24 | template 25 | GLM_FUNC_QUALIFIER genType pow4(genType const & x) 26 | { 27 | return (x * x) * (x * x); 28 | } 29 | 30 | GLM_FUNC_QUALIFIER bool powOfTwo(int x) 31 | { 32 | return !(x & (x - 1)); 33 | } 34 | 35 | template 36 | GLM_FUNC_QUALIFIER detail::tvec2 powOfTwo(detail::tvec2 const & x) 37 | { 38 | return detail::tvec2( 39 | powOfTwo(x.x), 40 | powOfTwo(x.y)); 41 | } 42 | 43 | template 44 | GLM_FUNC_QUALIFIER detail::tvec3 powOfTwo(detail::tvec3 const & x) 45 | { 46 | return detail::tvec3( 47 | powOfTwo(x.x), 48 | powOfTwo(x.y), 49 | powOfTwo(x.z)); 50 | } 51 | 52 | template 53 | GLM_FUNC_QUALIFIER detail::tvec4 powOfTwo(detail::tvec4 const & x) 54 | { 55 | return detail::tvec4( 56 | powOfTwo(x.x), 57 | powOfTwo(x.y), 58 | powOfTwo(x.z), 59 | powOfTwo(x.w)); 60 | } 61 | }//namespace glm 62 | -------------------------------------------------------------------------------- /external/include/glm/gtx/orthonormalize.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtx_orthonormalize 24 | /// @file glm/gtx/orthonormalize.hpp 25 | /// @date 2005-12-21 / 2011-06-07 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// @see gtx_extented_min_max (dependence) 30 | /// 31 | /// @defgroup gtx_orthonormalize GLM_GTX_orthonormalize 32 | /// @ingroup gtx 33 | /// 34 | /// @brief Orthonormalize matrices. 35 | /// 36 | /// need to be included to use these functionalities. 37 | /////////////////////////////////////////////////////////////////////////////////// 38 | 39 | #ifndef GLM_GTX_orthonormalize 40 | #define GLM_GTX_orthonormalize 41 | 42 | // Dependency: 43 | #include "../glm.hpp" 44 | 45 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 46 | # pragma message("GLM: GLM_GTX_orthonormalize extension included") 47 | #endif 48 | 49 | namespace glm 50 | { 51 | /// @addtogroup gtx_orthonormalize 52 | /// @{ 53 | 54 | //! Returns the orthonormalized matrix of m. 55 | //! From GLM_GTX_orthonormalize extension. 56 | template 57 | GLM_FUNC_DECL detail::tmat3x3 orthonormalize( 58 | const detail::tmat3x3& m); 59 | 60 | //! Orthonormalizes x according y. 61 | //! From GLM_GTX_orthonormalize extension. 62 | template 63 | GLM_FUNC_DECL detail::tvec3 orthonormalize( 64 | const detail::tvec3& x, 65 | const detail::tvec3& y); 66 | 67 | /// @} 68 | }//namespace glm 69 | 70 | #include "orthonormalize.inl" 71 | 72 | #endif//GLM_GTX_orthonormalize 73 | -------------------------------------------------------------------------------- /external/include/glm/gtx/orthonormalize.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2005-12-21 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/orthonormalize.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER detail::tmat3x3 orthonormalize 14 | ( 15 | const detail::tmat3x3& m 16 | ) 17 | { 18 | detail::tmat3x3 r = m; 19 | 20 | r[0] = normalize(r[0]); 21 | 22 | float d0 = dot(r[0], r[1]); 23 | r[1] -= r[0] * d0; 24 | r[1] = normalize(r[1]); 25 | 26 | float d1 = dot(r[1], r[2]); 27 | d0 = dot(r[0], r[2]); 28 | r[2] -= r[0] * d0 + r[1] * d1; 29 | r[2] = normalize(r[2]); 30 | 31 | return r; 32 | } 33 | 34 | template 35 | GLM_FUNC_QUALIFIER detail::tvec3 orthonormalize 36 | ( 37 | const detail::tvec3& x, 38 | const detail::tvec3& y 39 | ) 40 | { 41 | return normalize(x - y * dot(y, x)); 42 | } 43 | }//namespace glm 44 | -------------------------------------------------------------------------------- /external/include/glm/gtx/perpendicular.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtx_perpendicular 24 | /// @file glm/gtx/perpendicular.hpp 25 | /// @date 2005-12-21 / 2011-06-07 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// @see gtx_projection (dependence) 30 | /// 31 | /// @defgroup gtx_perpendicular GLM_GTX_perpendicular 32 | /// @ingroup gtx 33 | /// 34 | /// @brief Perpendicular of a vector from other one 35 | /// 36 | /// need to be included to use these functionalities. 37 | /////////////////////////////////////////////////////////////////////////////////// 38 | 39 | #ifndef GLM_GTX_perpendicular 40 | #define GLM_GTX_perpendicular 41 | 42 | // Dependency: 43 | #include "../glm.hpp" 44 | #include "../gtx/projection.hpp" 45 | 46 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 47 | # pragma message("GLM: GLM_GTX_perpendicular extension included") 48 | #endif 49 | 50 | namespace glm 51 | { 52 | /// @addtogroup gtx_perpendicular 53 | /// @{ 54 | 55 | //! Projects x a perpendicular axis of Normal. 56 | //! From GLM_GTX_perpendicular extension. 57 | template 58 | GLM_FUNC_DECL vecType perp( 59 | vecType const & x, 60 | vecType const & Normal); 61 | 62 | /// @} 63 | }//namespace glm 64 | 65 | #include "perpendicular.inl" 66 | 67 | #endif//GLM_GTX_perpendicular 68 | -------------------------------------------------------------------------------- /external/include/glm/gtx/perpendicular.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2009-03-06 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/perpendicular.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER vecType perp 14 | ( 15 | vecType const & x, 16 | vecType const & Normal 17 | ) 18 | { 19 | return x - proj(x, Normal); 20 | } 21 | }//namespace glm 22 | -------------------------------------------------------------------------------- /external/include/glm/gtx/polar_coordinates.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtx_polar_coordinates 24 | /// @file glm/gtx/polar_coordinates.hpp 25 | /// @date 2007-03-06 / 2011-06-07 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// 30 | /// @defgroup gtx_polar_coordinates GLM_GTX_polar_coordinates 31 | /// @ingroup gtx 32 | /// 33 | /// @brief Conversion from Euclidean space to polar space and revert. 34 | /// 35 | /// need to be included to use these functionalities. 36 | /////////////////////////////////////////////////////////////////////////////////// 37 | 38 | #ifndef GLM_GTX_polar_coordinates 39 | #define GLM_GTX_polar_coordinates 40 | 41 | // Dependency: 42 | #include "../glm.hpp" 43 | 44 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 45 | # pragma message("GLM: GLM_GTX_polar_coordinates extension included") 46 | #endif 47 | 48 | namespace glm 49 | { 50 | /// @addtogroup gtx_polar_coordinates 51 | /// @{ 52 | 53 | /// Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude. 54 | /// 55 | /// @see gtx_polar_coordinates 56 | template 57 | GLM_FUNC_DECL detail::tvec3 polar( 58 | detail::tvec3 const & euclidean); 59 | 60 | /// Convert Polar to Euclidean coordinates. 61 | /// 62 | /// @see gtx_polar_coordinates 63 | template 64 | GLM_FUNC_DECL detail::tvec3 euclidean( 65 | detail::tvec2 const & polar); 66 | 67 | /// @} 68 | }//namespace glm 69 | 70 | #include "polar_coordinates.inl" 71 | 72 | #endif//GLM_GTX_polar_coordinates 73 | -------------------------------------------------------------------------------- /external/include/glm/gtx/polar_coordinates.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2007-03-06 5 | // Updated : 2009-05-01 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/polar_coordinates.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER detail::tvec3 polar 14 | ( 15 | detail::tvec3 const & euclidean 16 | ) 17 | { 18 | T const Length(length(euclidean)); 19 | detail::tvec3 const tmp(euclidean / Length); 20 | T const xz_dist(sqrt(tmp.x * tmp.x + tmp.z * tmp.z)); 21 | 22 | #ifdef GLM_FORCE_RADIANS 23 | return detail::tvec3( 24 | atan(xz_dist, tmp.y), // latitude 25 | atan(tmp.x, tmp.z), // longitude 26 | xz_dist); // xz distance 27 | #else 28 | # pragma message("GLM: polar function returning degrees is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.") 29 | return detail::tvec3( 30 | degrees(atan(xz_dist, tmp.y)), // latitude 31 | degrees(atan(tmp.x, tmp.z)), // longitude 32 | xz_dist); // xz distance 33 | #endif 34 | } 35 | 36 | template 37 | GLM_FUNC_QUALIFIER detail::tvec3 euclidean 38 | ( 39 | detail::tvec2 const & polar 40 | ) 41 | { 42 | #ifdef GLM_FORCE_RADIANS 43 | T const latitude(polar.x); 44 | T const longitude(polar.y); 45 | #else 46 | # pragma message("GLM: euclidean function taking degrees as parameters is deprecated. #define GLM_FORCE_RADIANS before including GLM headers to remove this message.") 47 | T const latitude(radians(polar.x)); 48 | T const longitude(radians(polar.y)); 49 | #endif 50 | 51 | return detail::tvec3( 52 | cos(latitude) * sin(longitude), 53 | sin(latitude), 54 | cos(latitude) * cos(longitude)); 55 | } 56 | 57 | }//namespace glm 58 | -------------------------------------------------------------------------------- /external/include/glm/gtx/projection.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtx_projection 24 | /// @file glm/gtx/projection.hpp 25 | /// @date 2005-12-21 / 2011-06-07 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// 30 | /// @defgroup gtx_projection GLM_GTX_projection 31 | /// @ingroup gtx 32 | /// 33 | /// @brief Projection of a vector to other one 34 | /// 35 | /// need to be included to use these functionalities. 36 | /////////////////////////////////////////////////////////////////////////////////// 37 | 38 | #ifndef GLM_GTX_projection 39 | #define GLM_GTX_projection 40 | 41 | // Dependency: 42 | #include "../glm.hpp" 43 | 44 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 45 | # pragma message("GLM: GLM_GTX_projection extension included") 46 | #endif 47 | 48 | namespace glm 49 | { 50 | /// @addtogroup gtx_projection 51 | /// @{ 52 | 53 | //! Projects x on Normal. 54 | //! From GLM_GTX_projection extension. 55 | template 56 | GLM_FUNC_DECL vecType proj( 57 | vecType const & x, 58 | vecType const & Normal); 59 | 60 | /// @} 61 | }//namespace glm 62 | 63 | #include "projection.inl" 64 | 65 | #endif//GLM_GTX_projection 66 | -------------------------------------------------------------------------------- /external/include/glm/gtx/projection.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2009-03-06 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/projection.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER vecType proj 14 | ( 15 | vecType const & x, 16 | vecType const & Normal 17 | ) 18 | { 19 | return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; 20 | } 21 | }//namespace glm 22 | -------------------------------------------------------------------------------- /external/include/glm/gtx/random.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /////////////////////////////////////////////////////////////////////////////////// 23 | 24 | #if(defined(GLM_MESSAGES)) 25 | # pragma message("GLM: GLM_GTX_random extension is deprecated, include GLM_GTC_random instead") 26 | #endif 27 | 28 | // Promoted: 29 | #include "../gtc/random.hpp" 30 | -------------------------------------------------------------------------------- /external/include/glm/gtx/raw_data.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtx_raw_data 24 | /// @file glm/gtx/raw_data.hpp 25 | /// @date 2008-11-19 / 2011-06-07 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// 30 | /// @defgroup gtx_raw_data GLM_GTX_raw_data 31 | /// @ingroup gtx 32 | /// 33 | /// @brief Projection of a vector to other one 34 | /// 35 | /// need to be included to use these functionalities. 36 | /////////////////////////////////////////////////////////////////////////////////// 37 | 38 | #ifndef GLM_GTX_raw_data 39 | #define GLM_GTX_raw_data 40 | 41 | // Dependencies 42 | #include "../detail/setup.hpp" 43 | #include "../detail/type_int.hpp" 44 | 45 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 46 | # pragma message("GLM: GLM_GTX_raw_data extension included") 47 | #endif 48 | 49 | namespace glm 50 | { 51 | /// @addtogroup gtx_raw_data 52 | /// @{ 53 | 54 | //! Type for byte numbers. 55 | //! From GLM_GTX_raw_data extension. 56 | typedef detail::uint8 byte; 57 | 58 | //! Type for word numbers. 59 | //! From GLM_GTX_raw_data extension. 60 | typedef detail::uint16 word; 61 | 62 | //! Type for dword numbers. 63 | //! From GLM_GTX_raw_data extension. 64 | typedef detail::uint32 dword; 65 | 66 | //! Type for qword numbers. 67 | //! From GLM_GTX_raw_data extension. 68 | typedef detail::uint64 qword; 69 | 70 | /// @} 71 | }// namespace glm 72 | 73 | #include "raw_data.inl" 74 | 75 | #endif//GLM_GTX_raw_data 76 | -------------------------------------------------------------------------------- /external/include/glm/gtx/raw_data.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-11-19 5 | // Updated : 2008-11-19 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/raw_data.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | // Dependency: 10 | // - GLM core 11 | /////////////////////////////////////////////////////////////////////////////////////////////////// 12 | -------------------------------------------------------------------------------- /external/include/glm/gtx/reciprocal.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /////////////////////////////////////////////////////////////////////////////////// 23 | 24 | #if(defined(GLM_MESSAGES)) 25 | # pragma message("GLM: GLM_GTX_reciprocal extension is deprecated, include GLM_GTC_reciprocal instead") 26 | #endif 27 | -------------------------------------------------------------------------------- /external/include/glm/gtx/scalar_relational.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtx_scalar_relational 24 | /// @file glm/gtx/scalar_relational.hpp 25 | /// @date 2013-02-04 / 2013-02-04 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// 30 | /// @defgroup gtx_extend GLM_GTX_scalar_relational 31 | /// @ingroup gtx 32 | /// 33 | /// @brief Extend a position from a source to a position at a defined length. 34 | /// 35 | /// need to be included to use these functionalities. 36 | /////////////////////////////////////////////////////////////////////////////////// 37 | 38 | #ifndef GLM_GTX_scalar_relational 39 | #define GLM_GTX_scalar_relational 40 | 41 | // Dependency: 42 | #include "../glm.hpp" 43 | 44 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 45 | # pragma message("GLM: GLM_GTX_extend extension included") 46 | #endif 47 | 48 | namespace glm 49 | { 50 | /// @addtogroup gtx_scalar_relational 51 | /// @{ 52 | 53 | 54 | 55 | /// @} 56 | }//namespace glm 57 | 58 | #include "scalar_relational.inl" 59 | 60 | #endif//GLM_GTX_scalar_relational 61 | -------------------------------------------------------------------------------- /external/include/glm/gtx/scalar_relational.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2013-02-04 5 | // Updated : 2013-02-04 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/scalar_relational.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER bool lessThan 14 | ( 15 | T const & x, 16 | T const & y 17 | ) 18 | { 19 | return x < y; 20 | } 21 | 22 | template 23 | GLM_FUNC_QUALIFIER bool lessThanEqual 24 | ( 25 | T const & x, 26 | T const & y 27 | ) 28 | { 29 | return x <= y; 30 | } 31 | 32 | template 33 | GLM_FUNC_QUALIFIER bool greaterThan 34 | ( 35 | T const & x, 36 | T const & y 37 | ) 38 | { 39 | return x > y; 40 | } 41 | 42 | template 43 | GLM_FUNC_QUALIFIER bool greaterThanEqual 44 | ( 45 | T const & x, 46 | T const & y 47 | ) 48 | { 49 | return x >= y; 50 | } 51 | 52 | template 53 | GLM_FUNC_QUALIFIER bool equal 54 | ( 55 | T const & x, 56 | T const & y 57 | ) 58 | { 59 | return x == y; 60 | } 61 | 62 | template 63 | GLM_FUNC_QUALIFIER bool notEqual 64 | ( 65 | T const & x, 66 | T const & y 67 | ) 68 | { 69 | return x != y; 70 | } 71 | 72 | GLM_FUNC_QUALIFIER bool any 73 | ( 74 | bool const & x 75 | ) 76 | { 77 | return x; 78 | } 79 | 80 | GLM_FUNC_QUALIFIER bool all 81 | ( 82 | bool const & x 83 | ) 84 | { 85 | return x; 86 | } 87 | 88 | GLM_FUNC_QUALIFIER bool not_ 89 | ( 90 | bool const & x 91 | ) 92 | { 93 | return !x; 94 | } 95 | }//namespace glm 96 | -------------------------------------------------------------------------------- /external/include/glm/gtx/spline.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtx_spline 24 | /// @file glm/gtx/spline.hpp 25 | /// @date 2007-01-25 / 2011-06-07 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// 30 | /// @defgroup gtx_spline GLM_GTX_spline 31 | /// @ingroup gtx 32 | /// 33 | /// @brief Spline functions 34 | /// 35 | /// need to be included to use these functionalities. 36 | /////////////////////////////////////////////////////////////////////////////////// 37 | 38 | #ifndef GLM_GTX_spline 39 | #define GLM_GTX_spline 40 | 41 | // Dependency: 42 | #include "../glm.hpp" 43 | #include "../gtx/optimum_pow.hpp" 44 | 45 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 46 | # pragma message("GLM: GLM_GTX_spline extension included") 47 | #endif 48 | 49 | namespace glm 50 | { 51 | /// @addtogroup gtx_spline 52 | /// @{ 53 | 54 | //! Return a point from a catmull rom curve. 55 | /// @see gtx_spline extension. 56 | template 57 | GLM_FUNC_DECL genType catmullRom( 58 | genType const & v1, 59 | genType const & v2, 60 | genType const & v3, 61 | genType const & v4, 62 | typename genType::value_type const & s); 63 | 64 | //! Return a point from a hermite curve. 65 | /// @see gtx_spline extension. 66 | template 67 | GLM_FUNC_DECL genType hermite( 68 | genType const & v1, 69 | genType const & t1, 70 | genType const & v2, 71 | genType const & t2, 72 | typename genType::value_type const & s); 73 | 74 | //! Return a point from a cubic curve. 75 | /// @see gtx_spline extension. 76 | template 77 | GLM_FUNC_DECL genType cubic( 78 | genType const & v1, 79 | genType const & v2, 80 | genType const & v3, 81 | genType const & v4, 82 | typename genType::value_type const & s); 83 | 84 | /// @} 85 | }//namespace glm 86 | 87 | #include "spline.inl" 88 | 89 | #endif//GLM_GTX_spline 90 | 91 | -------------------------------------------------------------------------------- /external/include/glm/gtx/spline.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2007-01-25 5 | // Updated : 2009-02-19 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/spline.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm{ 11 | 12 | template 13 | GLM_FUNC_QUALIFIER genType catmullRom 14 | ( 15 | genType const & v1, 16 | genType const & v2, 17 | genType const & v3, 18 | genType const & v4, 19 | typename genType::value_type const & s 20 | ) 21 | { 22 | typename genType::value_type s1 = s; 23 | typename genType::value_type s2 = pow2(s); 24 | typename genType::value_type s3 = pow3(s); 25 | 26 | typename genType::value_type f1 = -s3 + typename genType::value_type(2) * s2 - s; 27 | typename genType::value_type f2 = typename genType::value_type(3) * s3 - typename genType::value_type(5) * s2 + typename genType::value_type(2); 28 | typename genType::value_type f3 = typename genType::value_type(-3) * s3 + typename genType::value_type(4) * s2 + s; 29 | typename genType::value_type f4 = s3 - s2; 30 | 31 | return (f1 * v1 + f2 * v2 + f3 * v3 + f4 * v4) / typename genType::value_type(2); 32 | 33 | } 34 | 35 | template 36 | GLM_FUNC_QUALIFIER genType hermite 37 | ( 38 | genType const & v1, 39 | genType const & t1, 40 | genType const & v2, 41 | genType const & t2, 42 | typename genType::value_type const & s 43 | ) 44 | { 45 | typename genType::value_type s1 = s; 46 | typename genType::value_type s2 = pow2(s); 47 | typename genType::value_type s3 = pow3(s); 48 | 49 | typename genType::value_type f1 = typename genType::value_type(2) * s3 - typename genType::value_type(3) * s2 + typename genType::value_type(1); 50 | typename genType::value_type f2 = typename genType::value_type(-2) * s3 + typename genType::value_type(3) * s2; 51 | typename genType::value_type f3 = s3 - typename genType::value_type(2) * s2 + s; 52 | typename genType::value_type f4 = s3 - s2; 53 | 54 | return f1 * v1 + f2 * v2 + f3 * t1 + f4 * t2; 55 | } 56 | 57 | template 58 | GLM_FUNC_QUALIFIER genType cubic 59 | ( 60 | genType const & v1, 61 | genType const & v2, 62 | genType const & v3, 63 | genType const & v4, 64 | typename genType::value_type const & s 65 | ) 66 | { 67 | return ((v1 * s + v2) * s + v3) * s + v4; 68 | } 69 | 70 | }//namespace glm 71 | -------------------------------------------------------------------------------- /external/include/glm/gtx/std_based_type.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2008-06-08 5 | // Updated : 2008-06-08 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/std_based_type.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | 13 | } 14 | -------------------------------------------------------------------------------- /external/include/glm/gtx/string_cast.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtx_string_cast 24 | /// @file glm/gtx/string_cast.hpp 25 | /// @date 2008-04-26 / 2011-06-07 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// @see gtc_half_float (dependence) 30 | /// @see gtx_integer (dependence) 31 | /// @see gtx_quaternion (dependence) 32 | /// 33 | /// @defgroup gtx_string_cast GLM_GTX_string_cast 34 | /// @ingroup gtx 35 | /// 36 | /// @brief Setup strings for GLM type values 37 | /// 38 | /// need to be included to use these functionalities. 39 | /// This extension is not supported with CUDA 40 | /////////////////////////////////////////////////////////////////////////////////// 41 | 42 | #ifndef GLM_GTX_string_cast 43 | #define GLM_GTX_string_cast 44 | 45 | // Dependency: 46 | #include "../glm.hpp" 47 | #include "../gtx/integer.hpp" 48 | #include "../gtx/quaternion.hpp" 49 | #include 50 | 51 | #if(GLM_COMPILER & GLM_COMPILER_CUDA) 52 | # error "GLM_GTX_string_cast is not supported on CUDA compiler" 53 | #endif 54 | 55 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 56 | # pragma message("GLM: GLM_GTX_string_cast extension included") 57 | #endif 58 | 59 | namespace glm 60 | { 61 | /// @addtogroup gtx_string_cast 62 | /// @{ 63 | 64 | /// Create a string from a GLM type value. 65 | /// @see gtx_string_cast extension. 66 | template 67 | GLM_FUNC_DECL std::string to_string(genType const & x); 68 | 69 | /// @} 70 | }//namespace glm 71 | 72 | #include "string_cast.inl" 73 | 74 | #endif//GLM_GTX_string_cast 75 | -------------------------------------------------------------------------------- /external/include/glm/gtx/transform.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-21 5 | // Updated : 2009-04-29 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/transform.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | template 13 | GLM_FUNC_QUALIFIER detail::tmat4x4 translate( 14 | detail::tvec3 const & v) 15 | { 16 | return translate( 17 | detail::tmat4x4(1.0f), v); 18 | } 19 | 20 | template 21 | GLM_FUNC_QUALIFIER detail::tmat4x4 rotate( 22 | T angle, 23 | detail::tvec3 const & v) 24 | { 25 | return rotate( 26 | detail::tmat4x4(1), angle, v); 27 | } 28 | 29 | template 30 | GLM_FUNC_QUALIFIER detail::tmat4x4 scale( 31 | detail::tvec3 const & v) 32 | { 33 | return scale( 34 | detail::tmat4x4(1.0f), v); 35 | } 36 | 37 | }//namespace glm 38 | -------------------------------------------------------------------------------- /external/include/glm/gtx/ulp.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /////////////////////////////////////////////////////////////////////////////////// 23 | 24 | #if(defined(GLM_MESSAGES)) 25 | # pragma message("GLM: GLM_GTX_ulp extension is deprecated, include GLM_GTC_ulp (glm/gtc/ulp.hpp) instead") 26 | #endif 27 | 28 | // Promoted: 29 | #include "../gtc/ulp.hpp" 30 | -------------------------------------------------------------------------------- /external/include/glm/gtx/unsigned_int.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /////////////////////////////////////////////////////////////////////////////////// 23 | 24 | #if(defined(GLM_MESSAGES)) 25 | # pragma message("GLM: GLM_GTX_unsigned_int extension is deprecated, include GLM_GTX_integer instead") 26 | #endif 27 | -------------------------------------------------------------------------------- /external/include/glm/gtx/unsigned_int.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// 4 | // Created : 2005-12-24 5 | // Updated : 2008-10-07 6 | // Licence : This source is under MIT License 7 | // File : glm/gtx/unsigned_int.inl 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// 9 | 10 | namespace glm 11 | { 12 | 13 | }//namespace glm 14 | -------------------------------------------------------------------------------- /external/include/glm/gtx/vec1.inl: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtx_vec1 24 | /// @file glm/gtx/vec1.inl 25 | /// @date 2013-03-16 / 2013-03-16 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | -------------------------------------------------------------------------------- /external/include/glm/gtx/wrap.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref gtx_wrap 24 | /// @file glm/gtx/wrap.hpp 25 | /// @date 2009-11-25 / 2011-06-07 26 | /// @author Christophe Riccio 27 | /// 28 | /// @see core (dependence) 29 | /// 30 | /// @defgroup gtx_wrap GLM_GTX_wrap 31 | /// @ingroup gtx 32 | /// 33 | /// @brief Wrapping mode of texture coordinates. 34 | /// 35 | /// need to be included to use these functionalities. 36 | /////////////////////////////////////////////////////////////////////////////////// 37 | 38 | #ifndef GLM_GTX_wrap 39 | #define GLM_GTX_wrap 40 | 41 | // Dependency: 42 | #include "../glm.hpp" 43 | 44 | #if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED)) 45 | # pragma message("GLM: GLM_GTX_wrap extension included") 46 | #endif 47 | 48 | namespace glm 49 | { 50 | /// @addtogroup gtx_wrap 51 | /// @{ 52 | 53 | /// Simulate GL_CLAMP OpenGL wrap mode 54 | /// @see gtx_wrap extension. 55 | template 56 | GLM_FUNC_DECL genType clamp(genType const & Texcoord); 57 | 58 | /// Simulate GL_REPEAT OpenGL wrap mode 59 | /// @see gtx_wrap extension. 60 | template 61 | GLM_FUNC_DECL genType repeat(genType const & Texcoord); 62 | 63 | /// Simulate GL_MIRROR_REPEAT OpenGL wrap mode 64 | /// @see gtx_wrap extension. 65 | template 66 | GLM_FUNC_DECL genType mirrorRepeat(genType const & Texcoord); 67 | 68 | /// @} 69 | }// namespace glm 70 | 71 | #include "wrap.inl" 72 | 73 | #endif//GLM_GTX_wrap 74 | -------------------------------------------------------------------------------- /external/include/glm/integer.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/integer.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_INTEGER_INCLUDED 30 | #define GLM_INTEGER_INCLUDED 31 | 32 | #include "detail/func_integer.hpp" 33 | 34 | #endif//GLM_INTEGER_INCLUDED 35 | -------------------------------------------------------------------------------- /external/include/glm/mat2x3.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/mat2x3.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_MAT2X3_INCLUDED 30 | #define GLM_MAT2X3_INCLUDED 31 | 32 | #include "detail/type_mat2x3.hpp" 33 | 34 | namespace glm 35 | { 36 | /// 2 columns of 3 components matrix of low precision floating-point numbers. 37 | /// There is no guarantee on the actual precision. 38 | /// 39 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 40 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 41 | typedef detail::tmat2x3 lowp_mat2x3; 42 | 43 | /// 2 columns of 3 components matrix of medium precision floating-point numbers. 44 | /// There is no guarantee on the actual precision. 45 | /// 46 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 47 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 48 | typedef detail::tmat2x3 mediump_mat2x3; 49 | 50 | /// 2 columns of 3 components matrix of high precision floating-point numbers. 51 | /// There is no guarantee on the actual precision. 52 | /// 53 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 54 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 55 | typedef detail::tmat2x3 highp_mat2x3; 56 | 57 | }//namespace glm 58 | 59 | #endif//GLM_MAT2X3_INCLUDED 60 | -------------------------------------------------------------------------------- /external/include/glm/mat2x4.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/mat2x4.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_MAT2X4_INCLUDED 30 | #define GLM_MAT2X4_INCLUDED 31 | 32 | #include "detail/type_mat2x4.hpp" 33 | 34 | namespace glm 35 | { 36 | /// 2 columns of 4 components matrix of low precision floating-point numbers. 37 | /// There is no guarantee on the actual precision. 38 | /// 39 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 40 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 41 | typedef detail::tmat2x4 lowp_mat2x4; 42 | 43 | /// 2 columns of 4 components matrix of medium precision floating-point numbers. 44 | /// There is no guarantee on the actual precision. 45 | /// 46 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 47 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 48 | typedef detail::tmat2x4 mediump_mat2x4; 49 | 50 | /// 2 columns of 4 components matrix of high precision floating-point numbers. 51 | /// There is no guarantee on the actual precision. 52 | /// 53 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 54 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 55 | typedef detail::tmat2x4 highp_mat2x4; 56 | 57 | }//namespace glm 58 | 59 | #endif//GLM_MAT2X4_INCLUDED 60 | -------------------------------------------------------------------------------- /external/include/glm/mat3x2.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/mat3x2.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_MAT3X2_INCLUDED 30 | #define GLM_MAT3X2_INCLUDED 31 | 32 | #include "detail/type_mat3x2.hpp" 33 | 34 | namespace glm 35 | { 36 | /// 3 columns of 2 components matrix of low precision floating-point numbers. 37 | /// There is no guarantee on the actual precision. 38 | /// 39 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 40 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 41 | typedef detail::tmat3x2 lowp_mat3x2; 42 | 43 | /// 3 columns of 2 components matrix of medium precision floating-point numbers. 44 | /// There is no guarantee on the actual precision. 45 | /// 46 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 47 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 48 | typedef detail::tmat3x2 mediump_mat3x2; 49 | 50 | /// 3 columns of 2 components matrix of high precision floating-point numbers. 51 | /// There is no guarantee on the actual precision. 52 | /// 53 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 54 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 55 | typedef detail::tmat3x2 highp_mat3x2; 56 | 57 | }//namespace 58 | 59 | #endif//GLM_MAT3X2_INCLUDED 60 | -------------------------------------------------------------------------------- /external/include/glm/mat3x4.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/mat3x4.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_MAT3X4_INCLUDED 30 | #define GLM_MAT3X4_INCLUDED 31 | 32 | #include "detail/type_mat3x4.hpp" 33 | 34 | namespace glm 35 | { 36 | /// 3 columns of 4 components matrix of low precision floating-point numbers. 37 | /// There is no guarantee on the actual precision. 38 | /// 39 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 40 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 41 | typedef detail::tmat3x4 lowp_mat3x4; 42 | 43 | /// 3 columns of 4 components matrix of medium precision floating-point numbers. 44 | /// There is no guarantee on the actual precision. 45 | /// 46 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 47 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 48 | typedef detail::tmat3x4 mediump_mat3x4; 49 | 50 | /// 3 columns of 4 components matrix of high precision floating-point numbers. 51 | /// There is no guarantee on the actual precision. 52 | /// 53 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 54 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 55 | typedef detail::tmat3x4 highp_mat3x4; 56 | 57 | }//namespace glm 58 | 59 | #endif//GLM_MAT3X4_INCLUDED 60 | -------------------------------------------------------------------------------- /external/include/glm/mat4x2.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/mat4x2.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_MAT4X2_INCLUDED 30 | #define GLM_MAT4X2_INCLUDED 31 | 32 | #include "detail/type_mat4x2.hpp" 33 | 34 | namespace glm 35 | { 36 | /// 4 columns of 2 components matrix of low precision floating-point numbers. 37 | /// There is no guarantee on the actual precision. 38 | /// 39 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 40 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 41 | typedef detail::tmat4x2 lowp_mat4x2; 42 | 43 | /// 4 columns of 2 components matrix of medium precision floating-point numbers. 44 | /// There is no guarantee on the actual precision. 45 | /// 46 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 47 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 48 | typedef detail::tmat4x2 mediump_mat4x2; 49 | 50 | /// 4 columns of 2 components matrix of high precision floating-point numbers. 51 | /// There is no guarantee on the actual precision. 52 | /// 53 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 54 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 55 | typedef detail::tmat4x2 highp_mat4x2; 56 | 57 | }//namespace glm 58 | 59 | #endif//GLM_MAT4X2_INCLUDED 60 | -------------------------------------------------------------------------------- /external/include/glm/mat4x3.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/mat4x4.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_MAT4X3_INCLUDED 30 | #define GLM_MAT4X3_INCLUDED 31 | 32 | #include "detail/type_mat4x3.hpp" 33 | 34 | namespace glm 35 | { 36 | /// 4 columns of 3 components matrix of low precision floating-point numbers. 37 | /// There is no guarantee on the actual precision. 38 | /// 39 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 40 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 41 | typedef detail::tmat4x3 lowp_mat4x3; 42 | 43 | /// 4 columns of 3 components matrix of medium precision floating-point numbers. 44 | /// There is no guarantee on the actual precision. 45 | /// 46 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 47 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 48 | typedef detail::tmat4x3 mediump_mat4x3; 49 | 50 | /// 4 columns of 3 components matrix of high precision floating-point numbers. 51 | /// There is no guarantee on the actual precision. 52 | /// 53 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 54 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 55 | typedef detail::tmat4x3 highp_mat4x3; 56 | 57 | }//namespace glm 58 | 59 | #endif//GLM_MAT4X3_INCLUDED 60 | -------------------------------------------------------------------------------- /external/include/glm/matrix.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/matrix.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_MATRIX_INCLUDED 30 | #define GLM_MATRIX_INCLUDED 31 | 32 | #include "detail/func_matrix.hpp" 33 | 34 | #endif//GLM_MATRIX_INCLUDED 35 | -------------------------------------------------------------------------------- /external/include/glm/packing.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/packing.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_PACKING_INCLUDED 30 | #define GLM_PACKING_INCLUDED 31 | 32 | #include "detail/func_packing.hpp" 33 | 34 | #endif//GLM_PACKING_INCLUDED 35 | -------------------------------------------------------------------------------- /external/include/glm/trigonometric.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/trigonometric.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_TRIGONOMETRIC_INCLUDED 30 | #define GLM_TRIGONOMETRIC_INCLUDED 31 | 32 | #include "detail/func_trigonometric.hpp" 33 | 34 | #endif//GLM_TRIGONOMETRIC_INCLUDED 35 | -------------------------------------------------------------------------------- /external/include/glm/vec2.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/vec2.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_VEC2_INCLUDED 30 | #define GLM_VEC2_INCLUDED 31 | 32 | #include "detail/type_vec2.hpp" 33 | 34 | #endif//GLM_VEC2_INCLUDED 35 | -------------------------------------------------------------------------------- /external/include/glm/vec3.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/vec3.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_VEC3_INCLUDED 30 | #define GLM_VEC3_INCLUDED 31 | 32 | #include "detail/type_vec3.hpp" 33 | 34 | #endif//GLM_VEC3_INCLUDED 35 | -------------------------------------------------------------------------------- /external/include/glm/vec4.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/vec4.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_VEC4_INCLUDED 30 | #define GLM_VEC4_INCLUDED 31 | 32 | #include "detail/type_vec4.hpp" 33 | 34 | #endif//GLM_VEC4_INCLUDED 35 | -------------------------------------------------------------------------------- /external/include/glm/vector_relational.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////////// 2 | /// OpenGL Mathematics (glm.g-truc.net) 3 | /// 4 | /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) 5 | /// Permission is hereby granted, free of charge, to any person obtaining a copy 6 | /// of this software and associated documentation files (the "Software"), to deal 7 | /// in the Software without restriction, including without limitation the rights 8 | /// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | /// copies of the Software, and to permit persons to whom the Software is 10 | /// furnished to do so, subject to the following conditions: 11 | /// 12 | /// The above copyright notice and this permission notice shall be included in 13 | /// all copies or substantial portions of the Software. 14 | /// 15 | /// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | /// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | /// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | /// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | /// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | /// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | /// THE SOFTWARE. 22 | /// 23 | /// @ref core 24 | /// @file glm/vector_relational.hpp 25 | /// @date 2013-12-24 / 2013-12-24 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef GLM_VECTOR_RELATIONAL_INCLUDED 30 | #define GLM_VECTOR_RELATIONAL_INCLUDED 31 | 32 | #include "detail/func_vector_relational.hpp" 33 | 34 | #endif//GLM_VECTOR_RELATIONAL_INCLUDED 35 | -------------------------------------------------------------------------------- /external/include/glslUtil/glslUtility.hpp: -------------------------------------------------------------------------------- 1 | // GLSL Utility: A utility class for loading GLSL shaders 2 | // Written by Varun Sampath, Patrick Cozzi, and Karl Li. 3 | // Copyright (c) 2012 University of Pennsylvania 4 | 5 | #ifndef GLSLUTILITY_HPP 6 | #define GLSLUTILITY_HPP 7 | 8 | #include 9 | 10 | namespace glslUtility{ 11 | 12 | GLuint createDefaultProgram(const char *attributeLocations[], GLuint numberOfLocations); 13 | GLuint createProgram(const char *attributeLocations[], GLuint numberOfLocations, 14 | const char *vertexShaderPath, const char *fragmentShaderPath, 15 | const char *geometryShaderPath = 0); 16 | } 17 | 18 | #endif -------------------------------------------------------------------------------- /external/include/objUtil/obj.h: -------------------------------------------------------------------------------- 1 | //OBJCORE- A Obj Mesh Library by Yining Karl Li 2 | //This file is part of OBJCORE, Coyright (c) 2012 Yining Karl Li 3 | 4 | #ifndef OBJ 5 | #define OBJ 6 | 7 | #include "../glm/glm.hpp" 8 | #include 9 | #include 10 | 11 | using namespace std; 12 | 13 | class obj{ 14 | private: 15 | vector points; 16 | vector > faces; 17 | vector > facenormals; 18 | vector > facetextures; 19 | vector faceboxes; //bounding boxes for each face are stored in vbo-format! 20 | vector normals; 21 | vector texturecoords; 22 | int vbosize; 23 | int nbosize; 24 | int cbosize; 25 | int ibosize; 26 | float* vbo; 27 | float* nbo; 28 | float* cbo; 29 | int* ibo; 30 | float* boundingbox; 31 | float top; 32 | glm::vec3 defaultColor; 33 | float xmax; float xmin; float ymax; float ymin; float zmax; float zmin; 34 | bool maxminSet; 35 | public: 36 | obj(); 37 | ~obj(); 38 | 39 | //------------------------------- 40 | //-------Mesh Operations--------- 41 | //------------------------------- 42 | void buildVBOs(); 43 | void addPoint(glm::vec3); 44 | void addFace(vector); 45 | void addNormal(glm::vec3); 46 | void addTextureCoord(glm::vec3); 47 | void addFaceNormal(vector); 48 | void addFaceTexture(vector); 49 | void compareMaxMin(float, float, float); 50 | bool isConvex(vector); 51 | void recenter(); 52 | 53 | //------------------------------- 54 | //-------Get/Set Operations------ 55 | //------------------------------- 56 | float* getBoundingBox(); //returns vbo-formatted bounding box 57 | float getTop(); 58 | void setColor(glm::vec3); 59 | glm::vec3 getColor(); 60 | float* getVBO(); 61 | float* getCBO(); 62 | float* getNBO(); 63 | int* getIBO(); 64 | int getVBOsize(); 65 | int getNBOsize(); 66 | int getIBOsize(); 67 | int getCBOsize(); 68 | vector* getPoints(); 69 | vector >* getFaces(); 70 | vector >* getFaceNormals(); 71 | vector >* getFaceTextures(); 72 | vector* getNormals(); 73 | vector* getTextureCoords(); 74 | vector* getFaceBoxes(); 75 | }; 76 | 77 | #endif -------------------------------------------------------------------------------- /external/include/objUtil/objloader.h: -------------------------------------------------------------------------------- 1 | //OBJCORE- A Obj Mesh Library by Yining Karl Li 2 | //This file is part of OBJCORE, Coyright (c) 2012 Yining Karl Li 3 | 4 | #ifndef OBJLOADER 5 | #define OBJLOADER 6 | 7 | #include 8 | #include "obj.h" 9 | 10 | using namespace std; 11 | 12 | class objLoader{ 13 | private: 14 | obj* geomesh; 15 | public: 16 | objLoader(string, obj*); 17 | ~objLoader(); 18 | 19 | //------------------------ 20 | //-------GETTERS---------- 21 | //------------------------ 22 | 23 | obj* getMesh(); 24 | }; 25 | 26 | #endif -------------------------------------------------------------------------------- /external/include/stb_image/stb_image.h: -------------------------------------------------------------------------------- 1 | #ifndef STB_IMAGE_H 2 | #define STB_IMAGE_H 3 | 4 | #define STBI_HEADER_FILE_ONLY 5 | #include "stb_image.c" 6 | 7 | #endif // STB_IMAGE_H -------------------------------------------------------------------------------- /external/lib/linux/libGLEW.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CIS565-Fall-2014/Project4-Rasterizer/5792d3de20d53f586248720244dea1307f1f2cce/external/lib/linux/libGLEW.a -------------------------------------------------------------------------------- /external/lib/linux/libglfw3.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CIS565-Fall-2014/Project4-Rasterizer/5792d3de20d53f586248720244dea1307f1f2cce/external/lib/linux/libglfw3.a -------------------------------------------------------------------------------- /external/lib/osx/libGLEW.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CIS565-Fall-2014/Project4-Rasterizer/5792d3de20d53f586248720244dea1307f1f2cce/external/lib/osx/libGLEW.a -------------------------------------------------------------------------------- /external/lib/osx/libglfw3.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CIS565-Fall-2014/Project4-Rasterizer/5792d3de20d53f586248720244dea1307f1f2cce/external/lib/osx/libglfw3.a -------------------------------------------------------------------------------- /external/lib/win/GL/freeglut.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CIS565-Fall-2014/Project4-Rasterizer/5792d3de20d53f586248720244dea1307f1f2cce/external/lib/win/GL/freeglut.lib -------------------------------------------------------------------------------- /external/lib/win/GL/glew32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CIS565-Fall-2014/Project4-Rasterizer/5792d3de20d53f586248720244dea1307f1f2cce/external/lib/win/GL/glew32.lib -------------------------------------------------------------------------------- /external/lib/win/GL/glew32s.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CIS565-Fall-2014/Project4-Rasterizer/5792d3de20d53f586248720244dea1307f1f2cce/external/lib/win/GL/glew32s.lib -------------------------------------------------------------------------------- /external/lib/win/GL/glut32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CIS565-Fall-2014/Project4-Rasterizer/5792d3de20d53f586248720244dea1307f1f2cce/external/lib/win/GL/glut32.lib -------------------------------------------------------------------------------- /external/lib/win/GLFW/glfw3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CIS565-Fall-2014/Project4-Rasterizer/5792d3de20d53f586248720244dea1307f1f2cce/external/lib/win/GLFW/glfw3.lib -------------------------------------------------------------------------------- /external/lib/win/GLFW/glfw3dll.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CIS565-Fall-2014/Project4-Rasterizer/5792d3de20d53f586248720244dea1307f1f2cce/external/lib/win/GLFW/glfw3dll.lib -------------------------------------------------------------------------------- /external/lib/win/GLFW/msvc110/glfw3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CIS565-Fall-2014/Project4-Rasterizer/5792d3de20d53f586248720244dea1307f1f2cce/external/lib/win/GLFW/msvc110/glfw3.lib -------------------------------------------------------------------------------- /external/lib/win/GLFW/msvc110/glfw3dll.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CIS565-Fall-2014/Project4-Rasterizer/5792d3de20d53f586248720244dea1307f1f2cce/external/lib/win/GLFW/msvc110/glfw3dll.lib -------------------------------------------------------------------------------- /external/lib/win/GLFW/msvc120/glfw3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CIS565-Fall-2014/Project4-Rasterizer/5792d3de20d53f586248720244dea1307f1f2cce/external/lib/win/GLFW/msvc120/glfw3.lib -------------------------------------------------------------------------------- /external/lib/win/GLFW/msvc120/glfw3dll.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CIS565-Fall-2014/Project4-Rasterizer/5792d3de20d53f586248720244dea1307f1f2cce/external/lib/win/GLFW/msvc120/glfw3dll.lib -------------------------------------------------------------------------------- /external/src/stb_image/stb_image_write.c: -------------------------------------------------------------------------------- 1 | #define STB_IMAGE_WRITE_IMPLEMENTATION 2 | #include 3 | -------------------------------------------------------------------------------- /objs/cube.obj: -------------------------------------------------------------------------------- 1 | v -0.1 -0.1 -0.1 2 | v -0.1 -0.1 0.1 3 | v -0.1 0.1 0.1 4 | v -0.1 0.1 -0.1 5 | v 0.1 0.1 -0.1 6 | v 0.1 0.1 0.1 7 | v 0.1 -0.1 0.1 8 | v 0.1 -0.1 -0.1 9 | 10 | vn 1 0 0 11 | vn 0 1 0 12 | vn 0 0 1 13 | vn -1 0 0 14 | vn 0 -1 0 15 | vn 0 0 -1 16 | 17 | f 1//4 2//4 4//4 18 | f 4//4 2//4 3//4 19 | f 8//6 1//6 5//6 20 | f 5//6 1//6 4//6 21 | f 4//2 3//2 5//2 22 | f 5//2 3//2 6//2 23 | f 5//1 6//1 8//1 24 | f 8//1 6//1 7//1 25 | f 2//3 7//3 3//3 26 | f 3//3 7//3 6//3 27 | f 8//5 7//5 1//5 28 | f 1//5 7//5 2//5 -------------------------------------------------------------------------------- /objs/tri.obj: -------------------------------------------------------------------------------- 1 | v 0 0 0 2 | v 0.1 0 0 3 | v 0 0.1 0 4 | 5 | vn 0 0 1 6 | 7 | f 1//1 2//1 3//1 -------------------------------------------------------------------------------- /renders/cow_zdepth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CIS565-Fall-2014/Project4-Rasterizer/5792d3de20d53f586248720244dea1307f1f2cce/renders/cow_zdepth.png -------------------------------------------------------------------------------- /src/cudaMat4.h: -------------------------------------------------------------------------------- 1 | // CIS565 CUDA Rasterizer: A simple rasterization pipeline for Patrick Cozzi's CIS565: GPU Computing at the University of Pennsylvania 2 | // Written by Yining Karl Li, Copyright (c) 2012 University of Pennsylvania 3 | 4 | #ifndef CUDAMAT4_H 5 | #define CUDAMAT4_H 6 | 7 | #include "glm/glm.hpp" 8 | #include 9 | 10 | struct cudaMat3{ 11 | glm::vec3 x; 12 | glm::vec3 y; 13 | glm::vec3 z; 14 | }; 15 | 16 | struct cudaMat4{ 17 | glm::vec4 x; 18 | glm::vec4 y; 19 | glm::vec4 z; 20 | glm::vec4 w; 21 | }; 22 | 23 | #endif -------------------------------------------------------------------------------- /src/main.h: -------------------------------------------------------------------------------- 1 | // CIS565 CUDA Rasterizer: A simple rasterization pipeline for Patrick Cozzi's CIS565: GPU Computing at the University of Pennsylvania 2 | // Written by Yining Karl Li, Copyright (c) 2012 University of Pennsylvania 3 | 4 | #ifndef MAIN_H 5 | #define MAIN_H 6 | 7 | #include 8 | #include 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | 22 | 23 | #include "rasterizeKernels.h" 24 | #include "utilities.h" 25 | 26 | using namespace std; 27 | 28 | //------------------------------- 29 | //------------GL STUFF----------- 30 | //------------------------------- 31 | int frame; 32 | int fpstracker; 33 | double seconds; 34 | int fps = 0; 35 | GLuint positionLocation = 0; 36 | GLuint texcoordsLocation = 1; 37 | const char *attributeLocations[] = { "Position", "Tex" }; 38 | GLuint pbo = (GLuint)NULL; 39 | GLuint displayImage; 40 | uchar4 *dptr; 41 | 42 | GLFWwindow *window; 43 | 44 | obj* mesh; 45 | 46 | float* vbo; 47 | int vbosize; 48 | float* cbo; 49 | int cbosize; 50 | int* ibo; 51 | int ibosize; 52 | 53 | //------------------------------- 54 | //----------CUDA STUFF----------- 55 | //------------------------------- 56 | 57 | int width = 800; int height = 800; 58 | 59 | //------------------------------- 60 | //-------------MAIN-------------- 61 | //------------------------------- 62 | 63 | int main(int argc, char** argv); 64 | 65 | //------------------------------- 66 | //---------RUNTIME STUFF--------- 67 | //------------------------------- 68 | 69 | void runCuda(); 70 | 71 | #ifdef __APPLE__ 72 | void display(); 73 | #else 74 | void display(); 75 | void keyboard(unsigned char key, int x, int y); 76 | #endif 77 | 78 | //------------------------------- 79 | //----------SETUP STUFF---------- 80 | //------------------------------- 81 | bool init(int argc, char* argv[]); 82 | void initPBO(); 83 | void initCuda(); 84 | void initTextures(); 85 | void initVAO(); 86 | GLuint initShader(); 87 | 88 | //------------------------------- 89 | //---------CLEANUP STUFF--------- 90 | //------------------------------- 91 | 92 | void cleanupCuda(); 93 | void deletePBO(GLuint* pbo); 94 | void deleteTexture(GLuint* tex); 95 | 96 | //------------------------------ 97 | //-------GLFW CALLBACKS--------- 98 | //------------------------------ 99 | void mainLoop(); 100 | void errorCallback(int error, const char *description); 101 | void keyCallback(GLFWwindow *window, int key, int scancode, int action, int mods); 102 | 103 | #endif -------------------------------------------------------------------------------- /src/rasterizeKernels.h: -------------------------------------------------------------------------------- 1 | // CIS565 CUDA Rasterizer: A simple rasterization pipeline for Patrick Cozzi's CIS565: GPU Computing at the University of Pennsylvania 2 | // Written by Yining Karl Li, Copyright (c) 2012 University of Pennsylvania 3 | 4 | #ifndef RASTERIZEKERNEL_H 5 | #define RASTERIZEKERNEL_H 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include "glm/glm.hpp" 12 | 13 | void kernelCleanup(); 14 | void cudaRasterizeCore(uchar4* pos, glm::vec2 resolution, float frame, float* vbo, int vbosize, float* cbo, int cbosize, int* ibo, int ibosize); 15 | 16 | #endif //RASTERIZEKERNEL_H 17 | -------------------------------------------------------------------------------- /src/utilities.h: -------------------------------------------------------------------------------- 1 | //UTILITYCORE- A Utility Library by Yining Karl Li 2 | //This file is part of UTILITYCORE, Coyright (c) 2012 Yining Karl Li 3 | 4 | #ifndef Pathtracer_utilities_h 5 | #define Pathtracer_utilities_h 6 | 7 | #include "glm/glm.hpp" 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include "cudaMat4.h" 16 | 17 | const float PI =3.1415926535897932384626422832795028841971; 18 | const float TWO_PI =6.2831853071795864769252867665590057683943; 19 | const float SQRT_OF_ONE_THIRD =0.5773502691896257645091487805019574556476; 20 | const float E =2.7182818284590452353602874713526624977572; 21 | const float EPSILON =.000000001; 22 | const float ZERO_ABSORPTION_EPSILON =0.00001; 23 | const float RAY_BIAS_AMOUNT =0.0002; 24 | 25 | namespace utilityCore { 26 | extern float clamp(float f, float min, float max); 27 | extern bool replaceString(std::string& str, const std::string& from, const std::string& to); 28 | extern glm::vec3 clampRGB(glm::vec3 color); 29 | extern bool epsilonCheck(float a, float b); 30 | extern std::vector tokenizeString(std::string str); 31 | extern cudaMat4 glmMat4ToCudaMat4(glm::mat4 a); 32 | extern glm::mat4 cudaMat4ToGlmMat4(cudaMat4 a); 33 | extern glm::mat4 buildTransformationMatrix(glm::vec3 translation, glm::vec3 rotation, glm::vec3 scale); 34 | extern void printCudaMat4(cudaMat4 m); 35 | extern std::string convertIntToString(int number); 36 | 37 | //----------------------------- 38 | //-------GLM Printers---------- 39 | //----------------------------- 40 | extern void printMat4(glm::mat4); 41 | extern void printVec4(glm::vec4); 42 | extern void printVec3(glm::vec3); 43 | } 44 | #endif 45 | -------------------------------------------------------------------------------- /windows/PROJ4_Rasterizer/PROJ4_Rasterizer.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 11.00 3 | # Visual Studio 2010 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PROJ4_Rasterizer", "PROJ4_Rasterizer\PROJ4_Rasterizer.vcxproj", "{6F351C80-6834-4F35-9CB3-C70F56161CBC}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {6F351C80-6834-4F35-9CB3-C70F56161CBC}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {6F351C80-6834-4F35-9CB3-C70F56161CBC}.Debug|Win32.Build.0 = Debug|Win32 14 | {6F351C80-6834-4F35-9CB3-C70F56161CBC}.Release|Win32.ActiveCfg = Release|Win32 15 | {6F351C80-6834-4F35-9CB3-C70F56161CBC}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /windows/PROJ4_Rasterizer/PROJ4_Rasterizer/PROJ4_Rasterizer.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | Header Files 32 | 33 | 34 | 35 | 36 | Source Files 37 | 38 | 39 | Source Files 40 | 41 | 42 | Source Files 43 | 44 | 45 | Source Files 46 | 47 | 48 | Source Files 49 | 50 | 51 | 52 | 53 | Source Files 54 | 55 | 56 | --------------------------------------------------------------------------------