├── .gitignore ├── LICENSE ├── README.md ├── bin ├── Debug │ ├── RealtimeWater.exe │ └── glew32.dll └── Release │ └── RealtimeWater ├── compile.sh ├── content ├── shaders │ ├── combine.frag │ ├── combine.vert │ ├── ground.frag │ ├── ground.vert │ ├── normals.frag │ ├── normals.geom │ ├── normals.vert │ ├── simplewater.frag │ ├── simplewater.vert │ ├── sky.frag │ ├── sky.vert │ ├── texture.frag │ ├── texture.vert │ ├── water.frag │ ├── water.vert │ └── watersimulation.comp └── textures │ ├── causticTexture.png │ ├── debugTexture1.png │ ├── noiseNormalTexture.jpg │ ├── noiseTexture.png │ ├── sky_negx.jpg │ ├── sky_negy.jpg │ ├── sky_negz.jpg │ ├── sky_posx.jpg │ ├── sky_posy.jpg │ └── sky_posz.jpg ├── docs ├── Fast Water Simulation for Games Using Height Fields - Matthias Müller-Fischer.pdf └── images │ ├── 1.jpg │ ├── 2.jpg │ ├── 3.jpg │ ├── 4.jpg │ ├── 5.jpg │ ├── 6.jpg │ ├── attenuation.png │ ├── background.png │ ├── backgroundandwater.png │ ├── backgroundbuffer.jpg │ ├── projections.ai │ ├── water.png │ ├── waterbuffer.jpg │ └── watermap.png ├── libs ├── glew │ ├── bin │ │ ├── glew32.dll │ │ └── glew32.lib │ └── includes │ │ ├── glew.h │ │ ├── glxew.h │ │ └── wglew.h ├── glfw │ ├── bin │ │ └── glfw3.lib │ └── includes │ │ ├── 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 │ ├── trigonometric.hpp │ ├── vec2.hpp │ ├── vec3.hpp │ ├── vec4.hpp │ └── vector_relational.hpp └── stb_image.h ├── src └── main.cpp └── visual studio ├── RealtimeWater.sln └── RealtimeWater └── RealtimeWater.vcxproj /.gitignore: -------------------------------------------------------------------------------- 1 | *.sdf 2 | *.suo 3 | *.opensdf 4 | *.user 5 | *.ilk 6 | 7 | bin/Debug/* 8 | !Debug/RealtimeWater.exe 9 | !Debug/glew32.dll 10 | 11 | visual studio/RealtimeWater/Debug -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Henrik Patjens 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /bin/Debug/RealtimeWater.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/bin/Debug/RealtimeWater.exe -------------------------------------------------------------------------------- /bin/Debug/glew32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/bin/Debug/glew32.dll -------------------------------------------------------------------------------- /bin/Release/RealtimeWater: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/bin/Release/RealtimeWater -------------------------------------------------------------------------------- /compile.sh: -------------------------------------------------------------------------------- 1 | g++ -std=c++11 -Ilibs -Ilibs/glm src/main.cpp -o bin/Release/RealtimeWater -lm -lGL -lGLEW -lglfw 2 | -------------------------------------------------------------------------------- /content/shaders/combine.frag: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | in vec2 fTexCoord; 4 | 5 | out vec4 FragColor; 6 | 7 | layout(binding = 0) uniform sampler2D BackgroundColorTexture; 8 | layout(binding = 1) uniform sampler2D BackgroundDepthTexture; 9 | layout(binding = 2) uniform sampler2D WaterColorTexture; 10 | layout(binding = 3) uniform sampler2D WaterDepthTexture; 11 | 12 | void main() { 13 | float waterDepth = texture2D(WaterDepthTexture, fTexCoord).r; 14 | float backgroundDepth = texture2D(BackgroundDepthTexture, fTexCoord).r; 15 | 16 | if (waterDepth < backgroundDepth) { 17 | FragColor = texture2D(WaterColorTexture, fTexCoord); 18 | } else { 19 | FragColor = texture2D(BackgroundColorTexture, fTexCoord); 20 | } 21 | } 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /content/shaders/combine.vert: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | layout (location = 0) in vec4 vPosition; 4 | layout (location = 2) in vec2 vTexCoord; 5 | 6 | out vec2 fTexCoord; 7 | 8 | void main() { 9 | fTexCoord = vTexCoord; 10 | gl_Position = vPosition; 11 | } -------------------------------------------------------------------------------- /content/shaders/ground.vert: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | layout (location = 0) in vec4 vPosition; 4 | layout (location = 1) in vec3 vNormal; 5 | layout (location = 2) in vec2 vTexCoord; 6 | 7 | out vec4 fModelPosition; 8 | out vec4 fWorldPosition; 9 | out vec3 fNormal; 10 | out vec2 fTexCoord; 11 | 12 | layout(location = 0) uniform mat4 WorldMatrix; 13 | layout(location = 1) uniform mat4 ViewMatrix; 14 | layout(location = 2) uniform mat4 ProjectionMatrix; 15 | layout(location = 3) uniform mat3 NormalMatrix; 16 | 17 | void main() { 18 | fModelPosition = vPosition; 19 | fTexCoord = vTexCoord; 20 | fNormal = NormalMatrix * vNormal; 21 | fWorldPosition = WorldMatrix * vPosition; 22 | gl_Position = ProjectionMatrix * ViewMatrix * fWorldPosition; 23 | } -------------------------------------------------------------------------------- /content/shaders/normals.frag: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | out vec4 FragColor; 4 | 5 | layout(location = 5) uniform vec4 NormalColor; 6 | 7 | void main() { 8 | FragColor = NormalColor; 9 | } 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /content/shaders/normals.geom: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | layout (triangles) in; 4 | layout (line_strip, max_vertices = 2) out; 5 | 6 | in vec4 gPosition[]; 7 | in vec3 gNormal[]; 8 | 9 | layout(location = 0) uniform mat4 WorldMatrix; 10 | layout(location = 1) uniform mat4 ViewMatrix; 11 | layout(location = 2) uniform mat4 ProjectionMatrix; 12 | layout(location = 3) uniform mat3 NormalMatrix; 13 | layout(location = 4) uniform float NormalLength; 14 | 15 | void main() { 16 | for (int i = 0; i < gl_in.length(); ++i) { 17 | vec3 normal = gNormal[i] * 0.01; 18 | vec3 worldNormal = NormalMatrix * normal; 19 | 20 | vec4 worldPosition1 = WorldMatrix * gPosition[i]; 21 | vec4 worldPosition2 = WorldMatrix * (gPosition[i] + vec4(worldNormal, 0)); 22 | 23 | gl_Position = ProjectionMatrix * ViewMatrix * worldPosition1; 24 | EmitVertex(); 25 | 26 | gl_Position = ProjectionMatrix * ViewMatrix * worldPosition2; 27 | EmitVertex(); 28 | 29 | EndPrimitive(); 30 | } 31 | } -------------------------------------------------------------------------------- /content/shaders/normals.vert: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | layout (location = 0) in vec4 vPosition; 4 | layout (location = 1) in vec3 vNormal; 5 | 6 | out vec4 gPosition; 7 | out vec3 gNormal; 8 | 9 | void main() { 10 | gNormal = vNormal; 11 | gPosition = vPosition; 12 | gl_Position = vPosition; 13 | } -------------------------------------------------------------------------------- /content/shaders/simplewater.frag: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | in vec3 fNormal; 4 | 5 | out vec4 FragColor; 6 | 7 | vec3 encodeNormal(vec3 normal) { 8 | return (normalize(normal) + 1.0) * 0.5; 9 | } 10 | 11 | void main() { 12 | FragColor = vec4(encodeNormal(fNormal), 1); 13 | } -------------------------------------------------------------------------------- /content/shaders/simplewater.vert: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | layout (location = 0) in vec4 vPosition; 4 | layout (location = 1) in vec3 vNormal; 5 | layout (location = 2) in vec2 vTexCoord; 6 | 7 | out vec3 fNormal; 8 | 9 | layout(location = 0) uniform mat4 WorldMatrix; 10 | layout(location = 1) uniform mat4 ViewMatrix; 11 | layout(location = 2) uniform mat4 ProjectionMatrix; 12 | layout(location = 3) uniform mat3 NormalMatrix; 13 | 14 | void main() { 15 | fNormal = NormalMatrix * vNormal; 16 | gl_Position = ProjectionMatrix * ViewMatrix * WorldMatrix * vPosition; 17 | } -------------------------------------------------------------------------------- /content/shaders/sky.frag: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | in vec4 fPosition; 4 | in vec4 fTexCoord; 5 | 6 | out vec4 FragColor; 7 | 8 | uniform mat4 WorldMatrix; 9 | uniform mat4 ViewMatrix; 10 | uniform mat4 ProjectionMatrix; 11 | layout(location = 3) uniform mat4 InverseViewProjectionMatrix; 12 | 13 | layout(binding = 0) uniform samplerCube SkyCubemap; 14 | 15 | void main() { 16 | vec4 viewRayFront = vec4(fTexCoord.xy * 2.0 - 1.0, -1.0, 1.0); 17 | vec4 viewRayBack = vec4(fTexCoord.xy * 2.0 - 1.0, 1.0, 1.0); 18 | 19 | vec4 viewRayFrontWorld = InverseViewProjectionMatrix * viewRayFront; 20 | vec4 viewRayBackWorld = InverseViewProjectionMatrix * viewRayBack; 21 | 22 | vec3 viewRayFrontWorldWDiv = viewRayFrontWorld.xyz / viewRayFrontWorld.w; 23 | vec3 viewRayBackWorldWDiv = viewRayBackWorld.xyz / viewRayBackWorld.w; 24 | 25 | vec3 viewRayWorld = -normalize(viewRayFrontWorldWDiv - viewRayBackWorldWDiv); 26 | 27 | FragColor = texture(SkyCubemap, viewRayWorld); 28 | } -------------------------------------------------------------------------------- /content/shaders/sky.vert: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | layout (location = 0) in vec4 vPosition; 4 | layout (location = 2) in vec4 vTexCoord; 5 | 6 | out vec4 fPosition; 7 | out vec4 fTexCoord; 8 | 9 | layout(location = 0) uniform mat4 WorldMatrix; 10 | layout(location = 1) uniform mat4 ViewMatrix; 11 | layout(location = 2) uniform mat4 ProjectionMatrix; 12 | 13 | void main() { 14 | fTexCoord = vTexCoord; 15 | fPosition = vPosition; 16 | gl_Position = fPosition; 17 | } -------------------------------------------------------------------------------- /content/shaders/texture.frag: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | in vec2 fTexCoord; 4 | 5 | out vec4 FragColor; 6 | 7 | layout(binding = 0) uniform sampler2D Texture; 8 | 9 | void main() { 10 | FragColor = texture2D(Texture, fTexCoord); 11 | } 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /content/shaders/texture.vert: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | layout (location = 0) in vec4 vPosition; 4 | layout (location = 2) in vec2 vTexCoord; 5 | 6 | out vec3 fNormal; 7 | out vec2 fTexCoord; 8 | 9 | layout(location = 0) uniform mat4 WorldMatrix; 10 | layout(location = 1) uniform mat4 ViewMatrix; 11 | layout(location = 2) uniform mat4 ProjectionMatrix; 12 | 13 | void main() { 14 | fTexCoord = vTexCoord; 15 | gl_Position = ProjectionMatrix * ViewMatrix * WorldMatrix * vPosition; 16 | } -------------------------------------------------------------------------------- /content/shaders/water.vert: -------------------------------------------------------------------------------- 1 | #version 430 core 2 | 3 | layout(location = 0) in vec4 vPosition; 4 | layout(location = 1) in vec3 vNormal; 5 | layout(location = 2) in vec2 vTexCoord; 6 | layout(location = 3) in ivec2 vVertexPosition; 7 | 8 | out vec4 fWorldPosition; 9 | out vec3 fNdc; 10 | out vec3 fNormal; 11 | out vec2 fTexCoord; 12 | out float fVelocity; 13 | 14 | layout(location = 0) uniform mat4 WorldMatrix; 15 | layout(location = 1) uniform mat4 ViewMatrix; 16 | layout(location = 2) uniform mat4 ProjectionMatrix; 17 | layout(location = 3) uniform mat3 NormalMatrix; 18 | 19 | void main() { 20 | fTexCoord = vTexCoord; 21 | fNormal = NormalMatrix * vNormal; 22 | fWorldPosition = WorldMatrix * vPosition; 23 | fVelocity = vPosition.w; 24 | vec4 dc = ProjectionMatrix * ViewMatrix * fWorldPosition; 25 | fNdc = dc.xyz / dc.w; 26 | gl_Position = dc; 27 | } -------------------------------------------------------------------------------- /content/textures/causticTexture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/content/textures/causticTexture.png -------------------------------------------------------------------------------- /content/textures/debugTexture1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/content/textures/debugTexture1.png -------------------------------------------------------------------------------- /content/textures/noiseNormalTexture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/content/textures/noiseNormalTexture.jpg -------------------------------------------------------------------------------- /content/textures/noiseTexture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/content/textures/noiseTexture.png -------------------------------------------------------------------------------- /content/textures/sky_negx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/content/textures/sky_negx.jpg -------------------------------------------------------------------------------- /content/textures/sky_negy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/content/textures/sky_negy.jpg -------------------------------------------------------------------------------- /content/textures/sky_negz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/content/textures/sky_negz.jpg -------------------------------------------------------------------------------- /content/textures/sky_posx.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/content/textures/sky_posx.jpg -------------------------------------------------------------------------------- /content/textures/sky_posy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/content/textures/sky_posy.jpg -------------------------------------------------------------------------------- /content/textures/sky_posz.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/content/textures/sky_posz.jpg -------------------------------------------------------------------------------- /docs/Fast Water Simulation for Games Using Height Fields - Matthias Müller-Fischer.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/docs/Fast Water Simulation for Games Using Height Fields - Matthias Müller-Fischer.pdf -------------------------------------------------------------------------------- /docs/images/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/docs/images/1.jpg -------------------------------------------------------------------------------- /docs/images/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/docs/images/2.jpg -------------------------------------------------------------------------------- /docs/images/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/docs/images/3.jpg -------------------------------------------------------------------------------- /docs/images/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/docs/images/4.jpg -------------------------------------------------------------------------------- /docs/images/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/docs/images/5.jpg -------------------------------------------------------------------------------- /docs/images/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/docs/images/6.jpg -------------------------------------------------------------------------------- /docs/images/attenuation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/docs/images/attenuation.png -------------------------------------------------------------------------------- /docs/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/docs/images/background.png -------------------------------------------------------------------------------- /docs/images/backgroundandwater.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/docs/images/backgroundandwater.png -------------------------------------------------------------------------------- /docs/images/backgroundbuffer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/docs/images/backgroundbuffer.jpg -------------------------------------------------------------------------------- /docs/images/projections.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/docs/images/projections.ai -------------------------------------------------------------------------------- /docs/images/water.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/docs/images/water.png -------------------------------------------------------------------------------- /docs/images/waterbuffer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/docs/images/waterbuffer.jpg -------------------------------------------------------------------------------- /docs/images/watermap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/docs/images/watermap.png -------------------------------------------------------------------------------- /libs/glew/bin/glew32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/libs/glew/bin/glew32.dll -------------------------------------------------------------------------------- /libs/glew/bin/glew32.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/libs/glew/bin/glew32.lib -------------------------------------------------------------------------------- /libs/glfw/bin/glfw3.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/libs/glfw/bin/glfw3.lib -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/glm/detail/intrinsic_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/core/intrinsic_exponential.hpp 25 | /// @date 2009-05-11 / 2011-06-15 26 | /// @author Christophe Riccio 27 | /////////////////////////////////////////////////////////////////////////////////// 28 | 29 | #ifndef glm_detail_intrinsic_exponential 30 | #define glm_detail_intrinsic_exponential 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 | GLM_FUNC_QUALIFIER __m128 sse_rsqrt_nr_ss(__m128 const x) 43 | { 44 | __m128 recip = _mm_rsqrt_ss( x ); // "estimate" opcode 45 | const static __m128 three = { 3, 3, 3, 3 }; // aligned consts for fast load 46 | const static __m128 half = { 0.5,0.5,0.5,0.5 }; 47 | __m128 halfrecip = _mm_mul_ss( half, recip ); 48 | __m128 threeminus_xrr = _mm_sub_ss( three, _mm_mul_ss( x, _mm_mul_ss ( recip, recip ) ) ); 49 | return _mm_mul_ss( halfrecip, threeminus_xrr ); 50 | } 51 | 52 | GLM_FUNC_QUALIFIER __m128 sse_normalize_fast_ps( float * RESTRICT vOut, float * RESTRICT vIn ) 53 | { 54 | __m128 x = _mm_load_ss(&vIn[0]); 55 | __m128 y = _mm_load_ss(&vIn[1]); 56 | __m128 z = _mm_load_ss(&vIn[2]); 57 | 58 | const __m128 l = // compute x*x + y*y + z*z 59 | _mm_add_ss( 60 | _mm_add_ss( _mm_mul_ss(x,x), 61 | _mm_mul_ss(y,y) 62 | ), 63 | _mm_mul_ss( z, z ) 64 | ); 65 | 66 | 67 | const __m128 rsqt = _mm_rsqrt_nr_ss( l ); 68 | _mm_store_ss( &vOut[0] , _mm_mul_ss( rsqt, x ) ); 69 | _mm_store_ss( &vOut[1] , _mm_mul_ss( rsqt, y ) ); 70 | _mm_store_ss( &vOut[2] , _mm_mul_ss( rsqt, z ) ); 71 | 72 | return _mm_mul_ss( l , rsqt ); 73 | } 74 | */ 75 | }//namespace detail 76 | }//namespace glm 77 | 78 | #endif//GLM_ARCH 79 | #endif//glm_detail_intrinsic_exponential 80 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/glm/detail/precision.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hpatjens/RealtimeWater/2df0b2370b8093b54219ac63ff049de804301e94/libs/glm/detail/precision.inl -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /libs/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 | -------------------------------------------------------------------------------- /visual studio/RealtimeWater.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.21005.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RealtimeWater", "RealtimeWater\RealtimeWater.vcxproj", "{11F7DE41-B33A-4D35-9E4F-242B99B37FFB}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Win32 = Debug|Win32 11 | Release|Win32 = Release|Win32 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {11F7DE41-B33A-4D35-9E4F-242B99B37FFB}.Debug|Win32.ActiveCfg = Debug|Win32 15 | {11F7DE41-B33A-4D35-9E4F-242B99B37FFB}.Debug|Win32.Build.0 = Debug|Win32 16 | {11F7DE41-B33A-4D35-9E4F-242B99B37FFB}.Release|Win32.ActiveCfg = Release|Win32 17 | {11F7DE41-B33A-4D35-9E4F-242B99B37FFB}.Release|Win32.Build.0 = Release|Win32 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | --------------------------------------------------------------------------------