├── src
└── glm
│ ├── gtx
│ ├── vec1.inl
│ ├── ocl_type.inl
│ ├── simd_vec4.hpp
│ ├── std_based_type.inl
│ ├── number_precision.inl
│ ├── unsigned_int.inl
│ ├── raw_data.inl
│ ├── perpendicular.inl
│ ├── projection.inl
│ ├── int_10_10_10_2.inl
│ ├── normal.inl
│ ├── mixed_product.inl
│ ├── log_base.inl
│ ├── noise.inl
│ ├── handed_coordinate_space.inl
│ ├── orthonormalize.inl
│ ├── matrix_cross_product.inl
│ ├── vector_access.inl
│ ├── closest_point.inl
│ ├── polar_coordinates.inl
│ ├── unsigned_int.hpp
│ ├── extend.inl
│ ├── gradient_paint.inl
│ ├── optimum_pow.inl
│ ├── vector_angle.inl
│ ├── component_wise.inl
│ ├── compatibility.inl
│ ├── color_space_YCoCg.inl
│ ├── log_base.hpp
│ ├── projection.hpp
│ ├── extend.hpp
│ ├── int_10_10_10_2.hpp
│ ├── normal.hpp
│ ├── spline.inl
│ ├── transform.inl
│ ├── mixed_product.hpp
│ ├── perpendicular.hpp
│ ├── closest_point.hpp
│ ├── fast_trigonometry.inl
│ ├── noise.hpp
│ ├── string_cast.hpp
│ ├── raw_data.hpp
│ ├── wrap.hpp
│ ├── multiple.hpp
│ ├── orthonormalize.hpp
│ ├── matrix_cross_product.hpp
│ ├── polar_coordinates.hpp
│ ├── epsilon.hpp
│ ├── normalize_dot.inl
│ ├── gradient_paint.hpp
│ ├── handed_coordinate_space.hpp
│ ├── normalize_dot.hpp
│ ├── vector_access.hpp
│ ├── verbose_operator.inl
│ ├── component_wise.hpp
│ ├── spline.hpp
│ ├── inertia.inl
│ ├── std_based_type.hpp
│ ├── multiple.inl
│ ├── matrix_interpolation.hpp
│ ├── verbose_operator.hpp
│ ├── vector_angle.hpp
│ ├── color_space_YCoCg.hpp
│ ├── matrix_operation.inl
│ ├── norm.inl
│ ├── optimum_pow.hpp
│ ├── fast_square_root.hpp
│ ├── color_space.hpp
│ ├── ulp.hpp
│ ├── fast_square_root.inl
│ └── intersect.hpp
│ ├── core
│ ├── func_common.hpp
│ ├── func_common.inl
│ ├── type_half.inl
│ ├── func_integer.hpp
│ ├── type_mat.inl
│ ├── type_vec.inl
│ ├── intrinsic_exponential.inl
│ ├── intrinsic_trigonometric.inl
│ ├── type_vec.hpp
│ ├── hint.hpp
│ ├── dummy.cpp
│ ├── type_size.hpp
│ ├── _fixes.hpp
│ ├── intrinsic_trigonometric.hpp
│ ├── intrinsic_vector_relational.hpp
│ ├── intrinsic_geometric.hpp
│ ├── intrinsic_matrix.hpp
│ ├── type_mat.hpp
│ ├── intrinsic_common.hpp
│ └── intrinsic_exponential.hpp
│ ├── gtc
│ ├── type_precision.inl
│ ├── matrix_access.inl
│ ├── noise.hpp
│ ├── matrix_inverse.hpp
│ ├── matrix_access.hpp
│ └── swizzle.inl
│ └── CMakeLists.txt
├── README.md
├── bin
├── osx
│ └── strain_based_dynamics
└── win32
│ └── strain_based_dynamics.exe
├── project
├── osx
│ └── strain_based_dynamics.xcodeproj
│ │ └── project.xcworkspace
│ │ └── contents.xcworkspacedata
└── win32
│ └── strain_based_dynamics.sln
└── .gitignore
/src/glm/gtx/vec1.inl:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/glm/gtx/ocl_type.inl:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # strain_based_dynamics
2 | An implementation of "Strain based dynamics", SCA (2014)
3 |
--------------------------------------------------------------------------------
/src/glm/gtx/simd_vec4.hpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nobuo-nakagawa/strain_based_dynamics/HEAD/src/glm/gtx/simd_vec4.hpp
--------------------------------------------------------------------------------
/src/glm/core/func_common.hpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nobuo-nakagawa/strain_based_dynamics/HEAD/src/glm/core/func_common.hpp
--------------------------------------------------------------------------------
/src/glm/core/func_common.inl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nobuo-nakagawa/strain_based_dynamics/HEAD/src/glm/core/func_common.inl
--------------------------------------------------------------------------------
/src/glm/core/type_half.inl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nobuo-nakagawa/strain_based_dynamics/HEAD/src/glm/core/type_half.inl
--------------------------------------------------------------------------------
/bin/osx/strain_based_dynamics:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nobuo-nakagawa/strain_based_dynamics/HEAD/bin/osx/strain_based_dynamics
--------------------------------------------------------------------------------
/src/glm/core/func_integer.hpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nobuo-nakagawa/strain_based_dynamics/HEAD/src/glm/core/func_integer.hpp
--------------------------------------------------------------------------------
/bin/win32/strain_based_dynamics.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nobuo-nakagawa/strain_based_dynamics/HEAD/bin/win32/strain_based_dynamics.exe
--------------------------------------------------------------------------------
/project/osx/strain_based_dynamics.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #OS junk files
2 | [Tt]humbs.db
3 | *.DS_Store
4 |
5 | #Visual Studio files
6 | *.[Oo]bj
7 | *.user
8 | *.aps
9 | *.pch
10 | *.vspscc
11 | *.vssscc
12 | *_i.c
13 | *_p.c
14 | *.ncb
15 | *.suo
16 | *.tlb
17 | *.tlh
18 | *.bak
19 | *.[Cc]ache
20 | *.ilk
21 | *.log
22 | *.lib
23 | *.sbr
24 | *.sdf
25 | *.opensdf
26 | *.unsuccessfulbuild
27 | ipch/
28 | obj/
29 | #[Bb]in
30 | [Dd]ebug*/
31 | [Rr]elease*/
32 | !strain_based_dynamics.exe
33 | *.dll
34 |
35 | #Xcode files
36 | xcuserdata
37 | *.xccheckout
38 |
39 | #emacs
40 | *~
41 |
42 |
--------------------------------------------------------------------------------
/src/glm/gtx/std_based_type.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/number_precision.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/unsigned_int.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/raw_data.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/perpendicular.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/projection.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/int_10_10_10_2.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
3 | ///////////////////////////////////////////////////////////////////////////////////////////////////
4 | // Created : 2010-07-07
5 | // Updated : 2010-07-07
6 | // Licence : This source is under MIT License
7 | // File : glm/gtx/int_10_10_10_2.inl
8 | ///////////////////////////////////////////////////////////////////////////////////////////////////
9 |
10 | namespace glm
11 | {
12 | GLM_FUNC_QUALIFIER dword uint10_10_10_2_cast
13 | (
14 | glm::vec4 const & v
15 | )
16 | {
17 | 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);
18 | }
19 | }//namespace glm
20 |
--------------------------------------------------------------------------------
/src/glm/gtx/normal.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/mixed_product.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 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 valType 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/log_base.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 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 | #include "../core/_vectorize.hpp"
11 |
12 | namespace glm
13 | {
14 | template
15 | GLM_FUNC_QUALIFIER genType log(
16 | genType const & x,
17 | genType const & base)
18 | {
19 | assert(x != genType(0));
20 |
21 | return glm::log(x) / glm::log(base);
22 | }
23 |
24 | VECTORIZE_VEC_SCA(log)
25 | VECTORIZE_VEC_VEC(log)
26 | }//namespace glm
27 |
--------------------------------------------------------------------------------
/project/win32/strain_based_dynamics.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "strain_based_dynamics", "strain_based_dynamics.vcxproj", "{8A9F06AF-E707-4E86-B579-A44070219646}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Win32 = Debug|Win32
9 | Release|Win32 = Release|Win32
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {8A9F06AF-E707-4E86-B579-A44070219646}.Debug|Win32.ActiveCfg = Debug|Win32
13 | {8A9F06AF-E707-4E86-B579-A44070219646}.Debug|Win32.Build.0 = Debug|Win32
14 | {8A9F06AF-E707-4E86-B579-A44070219646}.Release|Win32.ActiveCfg = Release|Win32
15 | {8A9F06AF-E707-4E86-B579-A44070219646}.Release|Win32.Build.0 = Release|Win32
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/src/glm/gtx/noise.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
3 | ///////////////////////////////////////////////////////////////////////////////////////////////////
4 | // Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise":
5 | // https://github.com/ashima/webgl-noise
6 | // Following Stefan Gustavson's paper "Simplex noise demystified":
7 | // http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
8 | ///////////////////////////////////////////////////////////////////////////////////////////////////
9 | // Created : 2011-04-21
10 | // Updated : 2011-04-21
11 | // Licence : This source is under MIT License
12 | // File : glm/gtx/noise.inl
13 | ///////////////////////////////////////////////////////////////////////////////////////////////////
14 | // Dependency:
15 | // - GLM core
16 | ///////////////////////////////////////////////////////////////////////////////////////////////////
17 |
18 | namespace glm{
19 |
20 | }//namespace glm
21 |
--------------------------------------------------------------------------------
/src/glm/gtx/handed_coordinate_space.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/orthonormalize.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/matrix_cross_product.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/vector_access.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
3 | ///////////////////////////////////////////////////////////////////////////////////////////////////
4 | // Created : 2006-01-16
5 | // Updated : 2008-10-07
6 | // Licence : This source is under MIT License
7 | // File : glm/gtx/vector_access.inl
8 | ///////////////////////////////////////////////////////////////////////////////////////////////////
9 |
10 | namespace glm
11 | {
12 | template
13 | GLM_FUNC_QUALIFIER void set
14 | (
15 | detail::tvec2& v,
16 | valType const & x,
17 | valType const & y
18 | )
19 | {
20 | v.x = x;
21 | v.y = y;
22 | }
23 |
24 | template
25 | GLM_FUNC_QUALIFIER void set
26 | (
27 | detail::tvec3& v,
28 | valType const & x,
29 | valType const & y,
30 | valType const & z
31 | )
32 | {
33 | v.x = x;
34 | v.y = y;
35 | v.z = z;
36 | }
37 |
38 | template
39 | GLM_FUNC_QUALIFIER void set
40 | (
41 | detail::tvec4& v,
42 | valType const & x,
43 | valType const & y,
44 | valType const & z,
45 | valType const & w
46 | )
47 | {
48 | v.x = x;
49 | v.y = y;
50 | v.z = z;
51 | v.w = w;
52 | }
53 | }//namespace glm
54 |
--------------------------------------------------------------------------------
/src/glm/gtx/closest_point.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 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 | valType 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 | valType Distance = dot(Vector, LineDirection);
29 |
30 | if(Distance <= valType(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 |
--------------------------------------------------------------------------------
/src/glm/gtx/polar_coordinates.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 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 length = length(euclidean);
19 | detail::tvec3 tmp = euclidean / length;
20 | T xz_dist = sqrt(tmp.x * tmp.x + tmp.z * tmp.z);
21 |
22 | return detail::tvec3(
23 | degrees(atan(xz_dist, tmp.y)), // latitude
24 | degrees(atan(tmp.x, tmp.z)), // longitude
25 | xz_dist); // xz distance
26 | }
27 |
28 | template
29 | GLM_FUNC_QUALIFIER detail::tvec3 euclidean
30 | (
31 | detail::tvec3 const & polar
32 | )
33 | {
34 | T latitude = radians(polar.x);
35 | T longitude = radians(polar.y);
36 | return detail::tvec3(
37 | cos(latitude) * sin(longitude),
38 | sin(latitude),
39 | cos(latitude) * cos(longitude));
40 | }
41 |
42 | }//namespace glm
43 |
--------------------------------------------------------------------------------
/src/glm/core/type_mat.inl:
--------------------------------------------------------------------------------
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/type_mat.inl
25 | /// @date 2011-06-15 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
--------------------------------------------------------------------------------
/src/glm/core/type_vec.inl:
--------------------------------------------------------------------------------
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/type_vec.inl
25 | /// @date 2011-06-15 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
--------------------------------------------------------------------------------
/src/glm/gtx/unsigned_int.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 |
24 | #if(defined(GLM_MESSAGES))
25 | # pragma message("GLM: GLM_GTX_unsigned_int extension is deprecated, include GLM_GTX_integer instead")
26 | #endif
27 |
--------------------------------------------------------------------------------
/src/glm/core/intrinsic_exponential.inl:
--------------------------------------------------------------------------------
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_exponential.inl
25 | /// @date 2011-06-15 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
--------------------------------------------------------------------------------
/src/glm/core/intrinsic_trigonometric.inl:
--------------------------------------------------------------------------------
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_trigonometric.inl
25 | /// @date 2011-06-15 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
--------------------------------------------------------------------------------
/src/glm/gtc/type_precision.inl:
--------------------------------------------------------------------------------
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 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/extend.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 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 | 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 | detail::tvec2 extend
25 | (
26 | detail::tvec2 const & Origin,
27 | detail::tvec2 const & Source,
28 | valType const & Distance
29 | )
30 | {
31 | return Origin + (Source - Origin) * Distance;
32 | }
33 |
34 | template
35 | detail::tvec3 extend
36 | (
37 | detail::tvec3 const & Origin,
38 | detail::tvec3 const & Source,
39 | valType const & Distance
40 | )
41 | {
42 | return Origin + (Source - Origin) * Distance;
43 | }
44 |
45 | template
46 | detail::tvec4 extend
47 | (
48 | detail::tvec4 const & Origin,
49 | detail::tvec4 const & Source,
50 | valType const & Distance
51 | )
52 | {
53 | return Origin + (Source - Origin) * Distance;
54 | }
55 | }//namespace glm
56 |
--------------------------------------------------------------------------------
/src/glm/gtx/gradient_paint.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
3 | ///////////////////////////////////////////////////////////////////////////////////////////////////
4 | // Created : 2009-03-06
5 | // Updated : 2009-03-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 | valType radialGradient
14 | (
15 | detail::tvec2 const & Center,
16 | valType 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 | valType Radius2 = pow2(Radius);
24 | valType Fx2 = pow2(F.x);
25 | valType Fy2 = pow2(F.y);
26 |
27 | valType 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 | valType Denominator = Radius2 - (Fx2 + Fy2);
29 | return Numerator / Denominator;
30 | }
31 |
32 | template
33 | valType 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/optimum_pow.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 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(const genType& x)
14 | {
15 | return x * x;
16 | }
17 |
18 | template
19 | GLM_FUNC_QUALIFIER genType pow3(const genType& x)
20 | {
21 | return x * x * x;
22 | }
23 |
24 | template
25 | GLM_FUNC_QUALIFIER genType pow4(const genType& 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 | GLM_FUNC_QUALIFIER detail::tvec2 powOfTwo(const detail::tvec2& x)
36 | {
37 | return detail::tvec2(
38 | powOfTwo(x.x),
39 | powOfTwo(x.y));
40 | }
41 |
42 | GLM_FUNC_QUALIFIER detail::tvec3 powOfTwo(const detail::tvec3& x)
43 | {
44 | return detail::tvec3(
45 | powOfTwo(x.x),
46 | powOfTwo(x.y),
47 | powOfTwo(x.z));
48 | }
49 |
50 | GLM_FUNC_QUALIFIER detail::tvec4 powOfTwo(const detail::tvec4& x)
51 | {
52 | return detail::tvec4(
53 | powOfTwo(x.x),
54 | powOfTwo(x.y),
55 | powOfTwo(x.z),
56 | powOfTwo(x.w));
57 | }
58 | }//namespace glm
59 |
--------------------------------------------------------------------------------
/src/glm/gtx/vector_angle.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net)
3 | ///////////////////////////////////////////////////////////////////////////////////////////////////
4 | // Created : 2005-12-30
5 | // Updated : 2008-09-29
6 | // Licence : This source is under MIT License
7 | // File : glm/gtx/vector_angle.inl
8 | ///////////////////////////////////////////////////////////////////////////////////////////////////
9 |
10 | namespace glm
11 | {
12 | template
13 | GLM_FUNC_QUALIFIER typename genType::value_type angle
14 | (
15 | genType const & x,
16 | genType const & y
17 | )
18 | {
19 | return degrees(acos(dot(x, y)));
20 | }
21 |
22 | //! \todo epsilon is hard coded to 0.01
23 | template
24 | GLM_FUNC_QUALIFIER valType orientedAngle
25 | (
26 | detail::tvec2 const & x,
27 | detail::tvec2 const & y
28 | )
29 | {
30 | valType Angle = glm::degrees(acos(dot(x, y)));
31 | detail::tvec2 TransformedVector = glm::rotate(x, Angle);
32 | if(all(equalEpsilon(y, TransformedVector, valType(0.01))))
33 | return Angle;
34 | else
35 | return -Angle;
36 | }
37 |
38 | template
39 | GLM_FUNC_QUALIFIER valType orientedAngle
40 | (
41 | detail::tvec3 const & x,
42 | detail::tvec3 const & y,
43 | detail::tvec3 const & ref
44 | )
45 | {
46 | valType Angle = glm::degrees(glm::acos(glm::dot(x, y)));
47 |
48 | if(glm::dot(ref, glm::cross(x, y)) < valType(0))
49 | return -Angle;
50 | else
51 | return Angle;
52 | }
53 | }//namespace glm
54 |
--------------------------------------------------------------------------------
/src/glm/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set(NAME glm)
2 |
3 | file(GLOB ROOT_SOURCE *.cpp)
4 | file(GLOB ROOT_INLINE *.inl)
5 | file(GLOB ROOT_HEADER *.hpp)
6 |
7 | file(GLOB_RECURSE CORE_SOURCE ./core/*.cpp)
8 | file(GLOB_RECURSE CORE_INLINE ./core/*.inl)
9 | file(GLOB_RECURSE CORE_HEADER ./core/*.hpp)
10 |
11 | file(GLOB_RECURSE GTC_SOURCE ./gtc/*.cpp)
12 | file(GLOB_RECURSE GTC_INLINE ./gtc/*.inl)
13 | file(GLOB_RECURSE GTC_HEADER ./gtc/*.hpp)
14 |
15 | file(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp)
16 | file(GLOB_RECURSE GTX_INLINE ./gtx/*.inl)
17 | file(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp)
18 |
19 | file(GLOB_RECURSE VIRTREV_SOURCE ./virtrev/*.cpp)
20 | file(GLOB_RECURSE VIRTREV_INLINE ./virtrev/*.inl)
21 | file(GLOB_RECURSE VIRTREV_HEADER ./virtrev/*.hpp)
22 |
23 | source_group("Core Files" FILES ${CORE_SOURCE})
24 | source_group("Core Files" FILES ${CORE_INLINE})
25 | source_group("Core Files" FILES ${CORE_HEADER})
26 | source_group("GTC Files" FILES ${GTC_SOURCE})
27 | source_group("GTC Files" FILES ${GTC_INLINE})
28 | source_group("GTC Files" FILES ${GTC_HEADER})
29 | source_group("GTX Files" FILES ${GTX_SOURCE})
30 | source_group("GTX Files" FILES ${GTX_INLINE})
31 | source_group("GTX Files" FILES ${GTX_HEADER})
32 | source_group("VIRTREV Files" FILES ${VIRTREV_SOURCE})
33 | source_group("VIRTREV Files" FILES ${VIRTREV_INLINE})
34 | source_group("VIRTREV Files" FILES ${VIRTREV_HEADER})
35 |
36 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
37 |
38 | add_executable(${NAME}
39 | ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER}
40 | ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER}
41 | ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER}
42 | ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER}
43 | ${VIRTREV_SOURCE} ${VIRTREV_INLINE} ${VIRTREV_HEADER})
44 |
--------------------------------------------------------------------------------
/src/glm/core/type_vec.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/type_vec.hpp
25 | /// @date 2010-01-26 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
29 | #ifndef glm_core_type_vec
30 | #define glm_core_type_vec
31 |
32 | #include "type_gentype.hpp"
33 |
34 | namespace glm{
35 | namespace detail
36 | {
37 |
38 | }//namespace detail
39 | }//namespace glm
40 |
41 | #endif//glm_core_type_vec
42 |
--------------------------------------------------------------------------------
/src/glm/core/hint.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/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 |
--------------------------------------------------------------------------------
/src/glm/core/dummy.cpp:
--------------------------------------------------------------------------------
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/dummy.cpp
25 | /// @date 2011-01-19 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///
28 | /// GLM is a header only library. There is nothing to compile.
29 | /// dummy.cpp exist only a wordaround for CMake file.
30 | ///////////////////////////////////////////////////////////////////////////////////
31 |
32 | #define GLM_MESSAGES
33 | #include "../glm.hpp"
34 | #include "../ext.hpp"
35 |
36 | //#error "GLM is a header only library"
37 |
38 | int main()
39 | {
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/src/glm/core/type_size.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/type_size.hpp
25 | /// @date 2008-10-05 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
29 | #ifndef glm_core_type_size
30 | #define glm_core_type_size
31 |
32 | #include
33 |
34 | namespace glm{
35 | namespace detail
36 | {
37 | //typedef std::size_t size_t;
38 | typedef int sizeType;
39 |
40 | }//namespace detail
41 | }//namespace glm
42 |
43 | #endif//glm_core_type_size
44 |
--------------------------------------------------------------------------------
/src/glm/gtx/component_wise.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 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
13 | GLM_FUNC_QUALIFIER typename genType::value_type compAdd(genType const & v)
14 | {
15 | typename genType::size_type result = typename genType::value_type(0);
16 | for(typename genType::size_type i = 0; i < v.length(); ++i)
17 | result += v[i];
18 | return result;
19 | }
20 |
21 | template
22 | GLM_FUNC_QUALIFIER typename genType::value_type compMul(genType const & v)
23 | {
24 | typename genType::value_type result = typename genType::value_type(1);
25 | for(typename genType::size_type i = 0; i < v.length(); ++i)
26 | result *= v[i];
27 | return result;
28 | }
29 |
30 | template
31 | GLM_FUNC_QUALIFIER typename genType::value_type compMin(genType const & v)
32 | {
33 | typename genType::value_type result = typename genType::value_type(v[0]);
34 | for(typename genType::size_type i = 1; i < v.length(); ++i)
35 | result = min(result, v[i]);
36 | return result;
37 | }
38 |
39 | template
40 | GLM_FUNC_QUALIFIER typename genType::value_type compMax(genType const & v)
41 | {
42 | typename genType::value_type result = typename genType::value_type(v[0]);
43 | for(typename genType::size_type i = 1; i < v.length(); ++i)
44 | result = max(result, v[i]);
45 | return result;
46 | }
47 | }//namespace glm
48 |
--------------------------------------------------------------------------------
/src/glm/gtx/compatibility.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 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_COMPILER & GLM_COMPILER_VC)
18 | return _finite(x);
19 | # elif(GLM_COMPILER & GLM_COMPILER_GCC)
20 | # if(GLM_PLATFORM & GLM_PLATFORM_ANDROID)
21 | return _isfinite(x) != 0;
22 | # else
23 | return std::isfinite(x) != 0;
24 | # endif
25 | # else
26 | return std::isfinite(x) != 0;
27 | # endif
28 |
29 | }
30 |
31 | template
32 | GLM_FUNC_QUALIFIER detail::tvec2 isfinite(
33 | detail::tvec2 const & x)
34 | {
35 | return detail::tvec2(
36 | isfinite(x.x),
37 | isfinite(x.y));
38 | }
39 |
40 | template
41 | GLM_FUNC_QUALIFIER detail::tvec3 isfinite(
42 | detail::tvec3 const & x)
43 | {
44 | return detail::tvec3(
45 | isfinite(x.x),
46 | isfinite(x.y),
47 | isfinite(x.z));
48 | }
49 |
50 | template
51 | GLM_FUNC_QUALIFIER detail::tvec4 isfinite(
52 | detail::tvec4 const & x)
53 | {
54 | return detail::tvec4(
55 | isfinite(x.x),
56 | isfinite(x.y),
57 | isfinite(x.z),
58 | isfinite(x.w));
59 | }
60 |
61 | }//namespace glm
62 |
--------------------------------------------------------------------------------
/src/glm/core/_fixes.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/_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 |
--------------------------------------------------------------------------------
/src/glm/core/intrinsic_trigonometric.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_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) != 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 |
--------------------------------------------------------------------------------
/src/glm/core/intrinsic_vector_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 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) != 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/color_space_YCoCg.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 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 / valType(4) + rgbColor.g / valType(2) + rgbColor.b / valType(4);
20 | result.y/*Co*/ = rgbColor.r / valType(2) + rgbColor.g * valType(0) - rgbColor.b / valType(2);
21 | result.z/*Cg*/ = - rgbColor.r / valType(4) + rgbColor.g / valType(2) - rgbColor.b / valType(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 / valType(2) + (rgbColor.r + rgbColor.b) / valType(4);
33 | result.y/*Co*/ = rgbColor.r - rgbColor.b;
34 | result.z/*Cg*/ = rgbColor.g - (rgbColor.r + rgbColor.b) / valType(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 | valType tmp = YCoCgRColor.x - (YCoCgRColor.z / valType(2));
59 | result.g = YCoCgRColor.z + tmp;
60 | result.b = tmp - (YCoCgRColor.y / valType(2));
61 | result.r = result.b + YCoCgRColor.y;
62 | return result;
63 | }
64 | }//namespace glm
65 |
--------------------------------------------------------------------------------
/src/glm/gtx/log_base.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_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: Log with 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 GLM_VERSION
40 |
41 | // Dependency:
42 | #include "../glm.hpp"
43 |
44 | #if(defined(GLM_MESSAGES) && !defined(glm_ext))
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 | 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/projection.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_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: 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 GLM_VERSION
40 |
41 | // Dependency:
42 | #include "../glm.hpp"
43 |
44 | #if(defined(GLM_MESSAGES) && !defined(glm_ext))
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 | 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/extend.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_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: Position extending
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 GLM_VERSION
40 |
41 | // Dependency:
42 | #include "../glm.hpp"
43 |
44 | #if(defined(GLM_MESSAGES) && !defined(glm_ext))
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 | 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/int_10_10_10_2.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_int_10_10_10_2
24 | /// @file glm/gtx/int_10_10_10_2.hpp
25 | /// @date 2010-07-07 / 2011-06-07
26 | /// @author Christophe Riccio
27 | ///
28 | /// @see core (dependence)
29 | /// @see gtx_raw_data (dependence)
30 | ///
31 | /// @defgroup gtx_int_10_10_10_2 GLM_GTX_int_10_10_10_2: Packed integer
32 | /// @ingroup gtx
33 | ///
34 | /// @brief Pack vector to 1010102 integers. Storage only.
35 | ///
36 | /// need to be included to use these functionalities.
37 | ///////////////////////////////////////////////////////////////////////////////////
38 |
39 | #ifndef GLM_GTX_int_10_10_10_2
40 | #define GLM_GTX_int_10_10_10_2 GLM_VERSION
41 |
42 | // Dependency:
43 | #include "../glm.hpp"
44 | #include "../gtx/raw_data.hpp"
45 |
46 | #if(defined(GLM_MESSAGES) && !defined(glm_ext))
47 | # pragma message("GLM: GLM_GTX_int_10_10_10_2 extension included")
48 | #endif
49 |
50 | namespace glm
51 | {
52 | /// @addtogroup gtx_int_10_10_10_2
53 | /// @{
54 |
55 | //! From GLM_GTX_int_10_10_10_2 extension.
56 | //! Cast a vec4 to an u_10_10_10_2.
57 | dword uint10_10_10_2_cast(glm::vec4 const & v);
58 |
59 | /// @}
60 | }//namespace glm
61 |
62 | #include "int_10_10_10_2.inl"
63 |
64 | #endif//GLM_GTX_int_10_10_10_2
65 |
--------------------------------------------------------------------------------
/src/glm/gtx/normal.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_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: Compute normals
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 GLM_VERSION
41 |
42 | // Dependency:
43 | #include "../glm.hpp"
44 |
45 | #if(defined(GLM_MESSAGES) && !defined(glm_ext))
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 | 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/spline.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/transform.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 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 | T x, T y, T z)
15 | {
16 | return translate(
17 | detail::tmat4x4(1.0f),
18 | detail::tvec3(x, y , z));
19 | }
20 |
21 | template
22 | GLM_FUNC_QUALIFIER detail::tmat4x4 translate(
23 | detail::tmat4x4 const & m,
24 | T x, T y, T z)
25 | {
26 | return translate(
27 | m, detail::tvec3(x, y , z));
28 | }
29 |
30 | template
31 | GLM_FUNC_QUALIFIER detail::tmat4x4 translate(
32 | detail::tvec3 const & v)
33 | {
34 | return translate(
35 | detail::tmat4x4(1.0f), v);
36 | }
37 |
38 | template
39 | GLM_FUNC_QUALIFIER detail::tmat4x4 rotate(
40 | T angle,
41 | T x, T y, T z)
42 | {
43 | return rotate(
44 | detail::tmat4x4(1), angle, detail::tvec3(x, y, z));
45 | }
46 |
47 | template
48 | GLM_FUNC_QUALIFIER detail::tmat4x4 rotate(
49 | T angle,
50 | detail::tvec3 const & v)
51 | {
52 | return rotate(
53 | detail::tmat4x4(1), angle, v);
54 | }
55 |
56 | template
57 | GLM_FUNC_QUALIFIER detail::tmat4x4 rotate(
58 | detail::tmat4x4 const & m,
59 | T angle,
60 | T x, T y, T z)
61 | {
62 | return rotate(
63 | m, angle, detail::tvec3(x, y, z));
64 | }
65 |
66 | template
67 | GLM_FUNC_QUALIFIER detail::tmat4x4 scale(T x, T y, T z)
68 | {
69 | return scale(
70 | detail::tmat4x4(1), detail::tvec3(x, y, z));
71 | }
72 |
73 | template
74 | GLM_FUNC_QUALIFIER detail::tmat4x4 scale(
75 | detail::tmat4x4 const & m,
76 | T x, T y, T z)
77 | {
78 | return scale(
79 | m, detail::tvec3(x, y, z));
80 | }
81 |
82 | template
83 | GLM_FUNC_QUALIFIER detail::tmat4x4 scale(
84 | detail::tvec3 const & v)
85 | {
86 | return scale(
87 | detail::tmat4x4(1.0f), v);
88 | }
89 |
90 | }//namespace glm
91 |
--------------------------------------------------------------------------------
/src/glm/gtx/mixed_product.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_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: Mixed product
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 GLM_VERSION
40 |
41 | // Dependency:
42 | #include "../glm.hpp"
43 |
44 | #if(defined(GLM_MESSAGES) && !defined(glm_ext))
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 | valType 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/perpendicular.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_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: 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 GLM_VERSION
41 |
42 | // Dependency:
43 | #include "../glm.hpp"
44 | #include "../gtx/projection.hpp"
45 |
46 | #if(defined(GLM_MESSAGES) && !defined(glm_ext))
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 | 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/closest_point.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_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: Find 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 GLM_VERSION
40 |
41 | // Dependency:
42 | #include "../glm.hpp"
43 |
44 | #if(defined(GLM_MESSAGES) && !defined(glm_ext))
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 | 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/fast_trigonometry.inl:
--------------------------------------------------------------------------------
1 | ///////////////////////////////////////////////////////////////////////////////////////////////////
2 | // OpenGL Mathematics Copyright (c) 2005 - 2012 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 | #include "../core/_vectorize.hpp"
11 |
12 | namespace glm
13 | {
14 | // sin
15 | template
16 | GLM_FUNC_QUALIFIER T fastSin(T const & x)
17 | {
18 | return x - ((x * x * x) / T(6)) + ((x * x * x * x * x) / T(120)) - ((x * x * x * x * x * x * x) / T(5040));
19 | }
20 |
21 | VECTORIZE_VEC(fastSin)
22 |
23 | // cos
24 | template
25 | GLM_FUNC_QUALIFIER T fastCos(T const & x)
26 | {
27 | return T(1) - (x * x * T(0.5)) + (x * x * x * x * T(0.041666666666)) - (x * x * x * x * x * x * T(0.00138888888888));
28 | }
29 |
30 | VECTORIZE_VEC(fastCos)
31 |
32 | // tan
33 | template
34 | GLM_FUNC_QUALIFIER T fastTan(T const & x)
35 | {
36 | 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));
37 | }
38 |
39 | VECTORIZE_VEC(fastTan)
40 |
41 | // asin
42 | template
43 | GLM_FUNC_QUALIFIER T fastAsin(T const & x)
44 | {
45 | 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));
46 | }
47 |
48 | VECTORIZE_VEC(fastAsin)
49 |
50 | // acos
51 | template
52 | GLM_FUNC_QUALIFIER T fastAcos(T const & x)
53 | {
54 | return T(1.5707963267948966192313216916398) - fastAsin(x); //(PI / 2)
55 | }
56 |
57 | VECTORIZE_VEC(fastAcos)
58 |
59 | // atan
60 | template
61 | GLM_FUNC_QUALIFIER T fastAtan(T const & y, T const & x)
62 | {
63 | T sgn = sign(y) * sign(x);
64 | return abs(fastAtan(y / x)) * sgn;
65 | }
66 |
67 | VECTORIZE_VEC_VEC(fastAtan)
68 |
69 | template
70 | GLM_FUNC_QUALIFIER T fastAtan(T const & x)
71 | {
72 | 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));
73 | }
74 |
75 | VECTORIZE_VEC(fastAtan)
76 |
77 | }//namespace glm
78 |
--------------------------------------------------------------------------------
/src/glm/gtx/noise.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_noise
24 | /// @file glm/gtx/noise.hpp
25 | /// @date 2011-04-21 / 2011-06-07
26 | /// @author Christophe Riccio
27 | ///
28 | /// @see core (dependence)
29 | ///
30 | /// @defgroup gtx_noise GLM_GTX_noise: Procedural noise functions
31 | /// @ingroup gtx
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 | /// Defines the half-precision floating-point type, along with various typedefs for vectors and matrices.
39 | /// need to be included to use these functionalities.
40 | ///////////////////////////////////////////////////////////////////////////////////
41 |
42 | #ifndef GLM_GTX_noise
43 | #define GLM_GTX_noise GLM_VERSION
44 |
45 | // Dependency:
46 | #include "../glm.hpp"
47 | #include "../gtc/noise.hpp"
48 |
49 | #if(defined(GLM_MESSAGES) && !defined(glm_ext))
50 | # pragma message("GLM: GLM_GTX_noise extension included")
51 | #endif
52 |
53 | namespace glm
54 | {
55 | /// @addtogroup gtx_noise
56 | /// @{
57 |
58 | /// @}
59 | }//namespace glm
60 |
61 | #include "noise.inl"
62 |
63 | #endif//glm_gtx_noise
64 |
--------------------------------------------------------------------------------
/src/glm/core/intrinsic_geometric.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_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) != 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 |
--------------------------------------------------------------------------------
/src/glm/core/intrinsic_matrix.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_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) != 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 |
--------------------------------------------------------------------------------
/src/glm/core/type_mat.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/type_mat.hpp
25 | /// @date 2010-01-26 / 2011-06-15
26 | /// @author Christophe Riccio
27 | ///////////////////////////////////////////////////////////////////////////////////
28 |
29 | #ifndef glm_core_type_mat
30 | #define glm_core_type_mat
31 |
32 | #include "type_gentype.hpp"
33 |
34 | namespace glm{
35 | namespace detail
36 | {
37 | //template
38 | //<
39 | // typename T,
40 | // template class C,
41 | // template class R
42 | //>
43 | //struct matType
44 | //{
45 | // enum ctor{null};
46 | // typedef T value_type;
47 | // typedef std::size_t size_type;
48 | // typedef C col_type;
49 | // typedef R row_type;
50 | // static size_type const col_size;
51 | // static size_type const row_size;
52 | //};
53 |
54 | //template
55 | //<
56 | // typename T,
57 | // template class C,
58 | // template class R
59 | //>
60 | //typename matType::size_type const
61 | //matType::col_size = matType::col_type::value_size;
62 |
63 | //template
64 | //<
65 | // typename T,
66 | // template class C,
67 | // template class R
68 | //>
69 | //typename matType::size_type const
70 | //matType::row_size = matType::row_type::value_size;
71 |
72 | }//namespace detail
73 | }//namespace glm
74 |
75 | #endif//glm_core_type_mat
76 |
--------------------------------------------------------------------------------
/src/glm/gtx/string_cast.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_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: 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 | ///////////////////////////////////////////////////////////////////////////////////
40 |
41 | #ifndef GLM_GTX_string_cast
42 | #define GLM_GTX_string_cast GLM_VERSION
43 |
44 | // Dependency:
45 | #include "../glm.hpp"
46 | #include "../gtc/half_float.hpp"
47 | #include "../gtx/integer.hpp"
48 | #include "../gtx/quaternion.hpp"
49 | #include
50 |
51 | #if(defined(GLM_MESSAGES) && !defined(glm_ext))
52 | # pragma message("GLM: GLM_GTX_string_cast extension included")
53 | #endif
54 |
55 | namespace glm
56 | {
57 | /// @addtogroup gtx_string_cast
58 | /// @{
59 |
60 | /// Create a string from a GLM type value.
61 | /// From GLM_GTX_string_cast extension.
62 | template
63 | std::string to_string(genType const & x);
64 |
65 | /// @}
66 | }//namespace glm
67 |
68 | #include "string_cast.inl"
69 |
70 | #endif//GLM_GTX_string_cast
71 |
--------------------------------------------------------------------------------
/src/glm/gtx/raw_data.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_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: 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 GLM_VERSION
40 |
41 | // Dependency:
42 | #include "../glm.hpp"
43 | #include "../gtc/type_precision.hpp"
44 |
45 | #if(defined(GLM_MESSAGES) && !defined(glm_ext))
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 uint8 byte;
57 |
58 | //! Type for word numbers.
59 | //! From GLM_GTX_raw_data extension.
60 | typedef uint16 word;
61 |
62 | //! Type for dword numbers.
63 | //! From GLM_GTX_raw_data extension.
64 | typedef uint32 dword;
65 |
66 | //! Type for qword numbers.
67 | //! From GLM_GTX_raw_data extension.
68 | typedef uint64 qword;
69 |
70 | /// @}
71 | }// namespace glm
72 |
73 | #include "raw_data.inl"
74 |
75 | #endif//GLM_GTX_raw_data
76 |
--------------------------------------------------------------------------------
/src/glm/gtc/matrix_access.inl:
--------------------------------------------------------------------------------
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 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 | int index,
36 | typename genType::row_type const & x
37 | )
38 | {
39 | genType Result = m;
40 | for(typename genType::size_type i = 0; i < genType::row_size(); ++i)
41 | Result[i][index] = x[i];
42 | return Result;
43 | }
44 |
45 | template
46 | GLM_FUNC_QUALIFIER typename genType::row_type row
47 | (
48 | genType const & m,
49 | int index
50 | )
51 | {
52 | typename genType::row_type Result;
53 | for(typename genType::size_type i = 0; i < genType::row_size(); ++i)
54 | Result[i] = m[i][index];
55 | return Result;
56 | }
57 |
58 | template
59 | GLM_FUNC_QUALIFIER genType column
60 | (
61 | genType const & m,
62 | int index,
63 | typename genType::col_type const & x
64 | )
65 | {
66 | genType Result = m;
67 | Result[index] = x;
68 | return Result;
69 | }
70 |
71 | template
72 | GLM_FUNC_QUALIFIER typename genType::col_type column
73 | (
74 | genType const & m,
75 | int index
76 | )
77 | {
78 | return m[index];
79 | }
80 | }//namespace glm
81 |
--------------------------------------------------------------------------------
/src/glm/gtx/wrap.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_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: Texture coordinate wrap modes
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 GLM_VERSION
40 |
41 | // Dependency:
42 | #include "../glm.hpp"
43 |
44 | #if(defined(GLM_MESSAGES) && !defined(glm_ext))
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 | //! From GLM_GTX_wrap extension.
55 | template
56 | genType clamp(genType const & Texcoord);
57 |
58 | //! Simulate GL_REPEAT OpenGL wrap mode
59 | //! From GLM_GTX_wrap extension.
60 | template
61 | genType repeat(genType const & Texcoord);
62 |
63 | //! Simulate GL_MIRROR_REPEAT OpenGL wrap mode
64 | //! From GLM_GTX_wrap extension.
65 | template
66 | genType mirrorRepeat(genType const & Texcoord);
67 |
68 | /// @}
69 | }// namespace glm
70 |
71 | #include "wrap.inl"
72 |
73 | #endif//GLM_GTX_wrap
74 |
--------------------------------------------------------------------------------
/src/glm/gtx/multiple.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_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: Multiples
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 GLM_VERSION
41 |
42 | // Dependency:
43 | #include "../glm.hpp"
44 |
45 | #if(defined(GLM_MESSAGES) && !defined(glm_ext))
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 | //! From GLM_GTX_multiple extension.
56 | template
57 | genType higherMultiple(
58 | genType const & Source,
59 | genType const & Multiple);
60 |
61 | //! Lower Multiple number of Source.
62 | //! From GLM_GTX_multiple extension.
63 | template
64 | genType lowerMultiple(
65 | genType const & Source,
66 | genType const & Multiple);
67 |
68 | /// @}
69 | }//namespace glm
70 |
71 | #include "multiple.inl"
72 |
73 | #endif//GLM_GTX_multiple
74 |
--------------------------------------------------------------------------------
/src/glm/gtx/orthonormalize.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_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: 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 GLM_VERSION
41 |
42 | // Dependency:
43 | #include "../glm.hpp"
44 |
45 | #if(defined(GLM_MESSAGES) && !defined(glm_ext))
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 | detail::tmat3x3 orthonormalize(
58 | const detail::tmat3x3& m);
59 |
60 | //! Orthonormalizes x according y.
61 | //! From GLM_GTX_orthonormalize extension.
62 | template
63 | 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 |
--------------------------------------------------------------------------------
/src/glm/gtx/matrix_cross_product.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_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: Cross product matrix form
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 GLM_VERSION
41 |
42 | // Dependency:
43 | #include "../glm.hpp"
44 |
45 | #if(defined(GLM_MESSAGES) && !defined(glm_ext))
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 | 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 | detail::tmat4x4 matrixCross4(
64 | detail::tvec3