From 9ecdd379e4630fb2f64a5a8ee919dd369c4a22af Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Wed, 18 May 2011 14:55:06 +0100 Subject: [PATCH 1/3] Removed old deprecated test function declarations --- glm/gtc/half_float.hpp | 6 +- glm/gtc/matrix_integer.hpp | 4 - glm/gtc/matrix_transform.hpp | 4 - glm/gtc/quaternion.hpp | 4 - glm/gtc/swizzle.hpp | 4 - glm/gtc/type_precision.hpp | 4 - glm/gtc/type_ptr.hpp | 4 - glm/gtx/associated_min_max.hpp | 4 - glm/gtx/bit.hpp | 4 - glm/gtx/closest_point.hpp | 4 - glm/gtx/color_cast.hpp | 4 - glm/gtx/color_space.hpp | 4 - glm/gtx/color_space_YCoCg.hpp | 4 - glm/gtx/compatibility.hpp | 4 - glm/gtx/component_wise.hpp | 4 - glm/gtx/epsilon.hpp | 4 - glm/gtx/extend.hpp | 4 - glm/gtx/extented_min_max.hpp | 4 - glm/gtx/fast_exponential.hpp | 4 - glm/gtx/fast_square_root.hpp | 4 - glm/gtx/fast_trigonometry.hpp | 4 - glm/gtx/gradient_paint.hpp | 4 - glm/gtx/intersect.hpp | 4 - glm/gtx/log_base.hpp | 4 - glm/gtx/matrix_cross_product.hpp | 4 - glm/gtx/matrix_interpolation.hpp | 4 - glm/gtx/matrix_operation.hpp | 4 - glm/gtx/matrix_query.hpp | 4 - glm/gtx/mixed_product.hpp | 4 - glm/gtx/multiple.hpp | 4 - glm/gtx/noise.hpp | 4 - glm/gtx/norm.hpp | 4 - glm/gtx/normal.hpp | 4 - glm/gtx/optimum_pow.hpp | 4 - glm/gtx/orthonormalize.hpp | 4 - glm/gtx/perpendicular.hpp | 4 - glm/gtx/projection.hpp | 4 - glm/gtx/reciprocal.hpp | 4 - glm/gtx/simplex.hpp | 73 ++++++++-------- glm/gtx/spline.hpp | 75 ++++++++--------- glm/gtx/std_based_type.hpp | 4 - glm/gtx/string_cast.hpp | 4 - glm/gtx/transform.hpp | 4 - glm/gtx/transform2.hpp | 4 - glm/gtx/ulp.hpp | 66 +++++++-------- glm/gtx/unsigned_int.hpp | 48 +++++------ glm/gtx/vec1.hpp | 139 +++++++++++++++---------------- glm/gtx/vector_access.hpp | 70 +++++++--------- glm/gtx/vector_angle.hpp | 3 +- glm/gtx/vector_query.hpp | 116 ++++++++++++-------------- glm/gtx/verbose_operator.hpp | 62 +++++++------- glm/gtx/wrap.hpp | 46 +++++----- 52 files changed, 329 insertions(+), 539 deletions(-) diff --git a/glm/gtc/half_float.hpp b/glm/gtc/half_float.hpp index 9c9d81e1..55e07da8 100644 --- a/glm/gtc/half_float.hpp +++ b/glm/gtc/half_float.hpp @@ -17,11 +17,7 @@ # pragma message("GLM: GLM_GTC_half_float extension included") #endif -namespace glm -{ - namespace test{ - bool main_gtc_half_float(); - }//namespace +namespace glm{ namespace detail { #ifndef _MSC_EXTENSIONS diff --git a/glm/gtc/matrix_integer.hpp b/glm/gtc/matrix_integer.hpp index cfd487b8..8536ae31 100644 --- a/glm/gtc/matrix_integer.hpp +++ b/glm/gtc/matrix_integer.hpp @@ -22,10 +22,6 @@ namespace glm { - namespace test{ - bool main_gtc_matrix_integer(); - }//namespace test - namespace gtc{ //! GLM_GTC_matrix_integer extension: Add integer matrices namespace matrix_integer diff --git a/glm/gtc/matrix_transform.hpp b/glm/gtc/matrix_transform.hpp index 241bb3ac..95cdb420 100644 --- a/glm/gtc/matrix_transform.hpp +++ b/glm/gtc/matrix_transform.hpp @@ -23,10 +23,6 @@ namespace glm { - namespace test{ - bool main_gtc_matrix_transform(); - }//namespace test - namespace gtc{ //! GLM_GTC_matrix_transform extension: Add transformation matrices namespace matrix_transform diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index bc4890fd..16be3d1f 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -28,10 +28,6 @@ namespace glm { - namespace test{ - bool main_gtc_quaternion(); - }//namespace test - namespace detail { //! \brief Template for quaternion. diff --git a/glm/gtc/swizzle.hpp b/glm/gtc/swizzle.hpp index a2bf601d..945b440e 100644 --- a/glm/gtc/swizzle.hpp +++ b/glm/gtc/swizzle.hpp @@ -23,10 +23,6 @@ namespace glm { - namespace test{ - void main_gtc_swizzle(); - }//namespace test - namespace gtc{ //! GLM_GTC_swizzle extension namespace swizzle diff --git a/glm/gtc/type_precision.hpp b/glm/gtc/type_precision.hpp index ab307277..b7ca27ff 100644 --- a/glm/gtc/type_precision.hpp +++ b/glm/gtc/type_precision.hpp @@ -26,10 +26,6 @@ namespace glm { - namespace test{ - bool main_gtc_type_precision(); - }//namespace test - namespace gtc{ //! GLM_GTC_type_precision extension: Defined types with specific size. namespace type_precision diff --git a/glm/gtc/type_ptr.hpp b/glm/gtc/type_ptr.hpp index e1612e80..3d55e8f2 100644 --- a/glm/gtc/type_ptr.hpp +++ b/glm/gtc/type_ptr.hpp @@ -23,10 +23,6 @@ namespace glm { - namespace test{ - void main_gtc_type_ptr(); - }//namespace test - namespace gtc{ //! GLM_GTC_type_ptr extension: Get access to vectors & matrices value type address. namespace type_ptr{ diff --git a/glm/gtx/associated_min_max.hpp b/glm/gtx/associated_min_max.hpp index 15c74c34..dfa0adf0 100644 --- a/glm/gtx/associated_min_max.hpp +++ b/glm/gtx/associated_min_max.hpp @@ -23,10 +23,6 @@ namespace glm { - namespace test{ - void main_gtx_associated_min_max(); - }//namespace test - namespace gtx { //! GLM_GTX_associated_min_max extension: Min and max functions that return associated values not the compared onces. diff --git a/glm/gtx/bit.hpp b/glm/gtx/bit.hpp index f6c689f2..6c94e0fb 100644 --- a/glm/gtx/bit.hpp +++ b/glm/gtx/bit.hpp @@ -24,10 +24,6 @@ namespace glm { - namespace test{ - void main_gtx_bit(); - }//namespace test - namespace gtx{ //! GLM_GTX_bit extension: Allow to perform bit operations on integer values namespace bit diff --git a/glm/gtx/closest_point.hpp b/glm/gtx/closest_point.hpp index 7e74927a..f739aa59 100644 --- a/glm/gtx/closest_point.hpp +++ b/glm/gtx/closest_point.hpp @@ -22,10 +22,6 @@ namespace glm { - namespace test{ - void main_gtx_closest_point(); - }//namespace test - namespace gtx{ //! GLM_GTX_closest_point extension: Find the point on a straight line which is the closet of a point. namespace closest_point{ diff --git a/glm/gtx/color_cast.hpp b/glm/gtx/color_cast.hpp index 0dc4e720..b88d3516 100644 --- a/glm/gtx/color_cast.hpp +++ b/glm/gtx/color_cast.hpp @@ -24,10 +24,6 @@ namespace glm { - namespace test{ - void main_ext_gtx_color_cast(); - }//namespace test - namespace gtx{ //! GLM_GTX_color_cast extension: Conversion between two color types namespace color_cast diff --git a/glm/gtx/color_space.hpp b/glm/gtx/color_space.hpp index b754d731..fdbe61b8 100644 --- a/glm/gtx/color_space.hpp +++ b/glm/gtx/color_space.hpp @@ -22,10 +22,6 @@ namespace glm { - namespace test{ - void main_gtx_color_space(); - }//namespace test - namespace gtx{ //! GLM_GTX_color_space extension: Related to RGB to HSV conversions and operations namespace color_space diff --git a/glm/gtx/color_space_YCoCg.hpp b/glm/gtx/color_space_YCoCg.hpp index ca93986d..efa2a006 100644 --- a/glm/gtx/color_space_YCoCg.hpp +++ b/glm/gtx/color_space_YCoCg.hpp @@ -22,10 +22,6 @@ namespace glm { - namespace test{ - void main_gtx_color_space_YCoCg(); - }//namespace test - namespace gtx{ //! GLM_GTX_color_space_YCoCg extension: RGB to YCoCg conversions and operations namespace color_space_YCoCg diff --git a/glm/gtx/compatibility.hpp b/glm/gtx/compatibility.hpp index 2537d240..124dc16b 100644 --- a/glm/gtx/compatibility.hpp +++ b/glm/gtx/compatibility.hpp @@ -30,10 +30,6 @@ namespace glm { - namespace test{ - void main_gtx_compatibility(); - }//namespace test - namespace gtx{ //! GLM_GTX_compatibility extension: Provide functions to increase the compatibility with Cg and HLSL languages namespace compatibility diff --git a/glm/gtx/component_wise.hpp b/glm/gtx/component_wise.hpp index f9cd362b..94b1375e 100644 --- a/glm/gtx/component_wise.hpp +++ b/glm/gtx/component_wise.hpp @@ -22,10 +22,6 @@ namespace glm { - namespace test{ - void main_gtx_component_wise(); - }//namespace test - namespace gtx{ //! GLM_GTX_component_wise extension: Operations between components of a type namespace component_wise diff --git a/glm/gtx/epsilon.hpp b/glm/gtx/epsilon.hpp index f362edc1..1461c1e6 100644 --- a/glm/gtx/epsilon.hpp +++ b/glm/gtx/epsilon.hpp @@ -24,10 +24,6 @@ namespace glm { - namespace test{ - void main_gtx_epsilon(); - }//namespace test - namespace gtx{ //! GLM_GTX_epsilon extension: Comparison functions for a user defined epsilon values. namespace epsilon diff --git a/glm/gtx/extend.hpp b/glm/gtx/extend.hpp index 9bda8cd1..cc457ea8 100644 --- a/glm/gtx/extend.hpp +++ b/glm/gtx/extend.hpp @@ -22,10 +22,6 @@ namespace glm { - namespace test{ - void main_gtx_extend(); - }//namespace test - namespace gtx{ //! GLM_GTX_extend extension: Extend a position from a source to a position at a defined length. namespace extend diff --git a/glm/gtx/extented_min_max.hpp b/glm/gtx/extented_min_max.hpp index bf496576..b84d8144 100644 --- a/glm/gtx/extented_min_max.hpp +++ b/glm/gtx/extented_min_max.hpp @@ -24,10 +24,6 @@ namespace glm { - namespace test{ - void main_ext_gtx_extented_min_max(); - }//namespace test - namespace gtx{ //! GLM_GTX_extented_min_max extension: Min and max functions for 3 to 4 parameters. namespace extented_min_max diff --git a/glm/gtx/fast_exponential.hpp b/glm/gtx/fast_exponential.hpp index cc4c75ca..23894f3c 100644 --- a/glm/gtx/fast_exponential.hpp +++ b/glm/gtx/fast_exponential.hpp @@ -24,10 +24,6 @@ namespace glm { - namespace test{ - void main_gtx_fast_exponential(); - }//namespace test - namespace gtx{ //! GLM_GTX_fast_exponential extension: Fast but less accurate implementations of exponential based functions. namespace fast_exponential diff --git a/glm/gtx/fast_square_root.hpp b/glm/gtx/fast_square_root.hpp index 863cb6b3..1a86ca56 100644 --- a/glm/gtx/fast_square_root.hpp +++ b/glm/gtx/fast_square_root.hpp @@ -26,10 +26,6 @@ namespace glm { - namespace test{ - void main_gtx_fast_square_root(); - }//namespace test - namespace gtx{ //! GLM_GTX_fast_square_root extension: Fast but less accurate implementations of square root based functions. namespace fast_square_root diff --git a/glm/gtx/fast_trigonometry.hpp b/glm/gtx/fast_trigonometry.hpp index 2b1228bb..eaa3d4bf 100644 --- a/glm/gtx/fast_trigonometry.hpp +++ b/glm/gtx/fast_trigonometry.hpp @@ -22,10 +22,6 @@ namespace glm { - namespace test{ - void main_gtx_fast_trigonometry(); - }//namespace test - namespace gtx{ //! GLM_GTX_fast_trigonometry extension: Fast but less accurate implementations of trigonometric functions. namespace fast_trigonometry diff --git a/glm/gtx/gradient_paint.hpp b/glm/gtx/gradient_paint.hpp index 5ada9760..aac89b89 100644 --- a/glm/gtx/gradient_paint.hpp +++ b/glm/gtx/gradient_paint.hpp @@ -23,10 +23,6 @@ namespace glm { - namespace test{ - void main_gtx_gradient_paint(); - }//namespace test - namespace gtx{ //! GLM_GTX_gradient_paint extension: Compute a radient gradient according section OpenVG 1.1 specifications, 9.3.2 Radial Gradients namespace gradient_paint diff --git a/glm/gtx/intersect.hpp b/glm/gtx/intersect.hpp index c473a83e..87e0400a 100644 --- a/glm/gtx/intersect.hpp +++ b/glm/gtx/intersect.hpp @@ -24,10 +24,6 @@ namespace glm { - namespace test{ - void main_gtx_intesect(); - }//namespace test - namespace gtx{ //! GLM_GTX_intersect extension: Add intersection functions namespace intersect diff --git a/glm/gtx/log_base.hpp b/glm/gtx/log_base.hpp index bf7b5eea..1335de41 100644 --- a/glm/gtx/log_base.hpp +++ b/glm/gtx/log_base.hpp @@ -22,10 +22,6 @@ namespace glm { - namespace test{ - void main_ext_gtx_log_base(); - }//namespace test - namespace gtx{ //! GLM_GTX_log_base extension: Logarithm for any base. base can be a vector or a scalar. namespace log_base diff --git a/glm/gtx/matrix_cross_product.hpp b/glm/gtx/matrix_cross_product.hpp index 2ccdd6b1..5e0bc5c4 100644 --- a/glm/gtx/matrix_cross_product.hpp +++ b/glm/gtx/matrix_cross_product.hpp @@ -22,10 +22,6 @@ namespace glm { - namespace test{ - void main_gtx_matrix_cross_product(); - }//namespace test - namespace gtx{ //! GLM_GTX_matrix_cross_product: Build cross product matrices namespace matrix_cross_product diff --git a/glm/gtx/matrix_interpolation.hpp b/glm/gtx/matrix_interpolation.hpp index 7d9d6135..84b6450b 100644 --- a/glm/gtx/matrix_interpolation.hpp +++ b/glm/gtx/matrix_interpolation.hpp @@ -25,10 +25,6 @@ namespace glm { - namespace test{ - void main_gtx_transform(); - }//namespace test - namespace gtx{ //! GLM_GTX_matrix_interpolation extension: Add transformation matrices namespace matrix_interpolation diff --git a/glm/gtx/matrix_operation.hpp b/glm/gtx/matrix_operation.hpp index c4834093..57b8c3d8 100644 --- a/glm/gtx/matrix_operation.hpp +++ b/glm/gtx/matrix_operation.hpp @@ -22,10 +22,6 @@ namespace glm { - namespace test{ - void main_gtx_matrix_operation(); - }//namespace test - namespace gtx{ //! GLM_GTX_matrix_operation: Build diagonal matrices namespace matrix_operation diff --git a/glm/gtx/matrix_query.hpp b/glm/gtx/matrix_query.hpp index 222f1f88..5db3f0e1 100644 --- a/glm/gtx/matrix_query.hpp +++ b/glm/gtx/matrix_query.hpp @@ -22,10 +22,6 @@ namespace glm { - namespace test{ - void main_gtx_matrix_query(); - }//namespace test - namespace gtx{ //! GLM_GTX_matrix_query: Query to evaluate matrix properties namespace matrix_query diff --git a/glm/gtx/mixed_product.hpp b/glm/gtx/mixed_product.hpp index cad47e9e..2701017a 100644 --- a/glm/gtx/mixed_product.hpp +++ b/glm/gtx/mixed_product.hpp @@ -22,10 +22,6 @@ namespace glm { - namespace test{ - void main_gtx_matrix_selection(); - }//namespace test - namespace gtx{ //! GLM_GTX_mixed_product extension: Mixed product of 3 vectors. namespace mixed_product diff --git a/glm/gtx/multiple.hpp b/glm/gtx/multiple.hpp index 5cf1e855..6c823d3d 100644 --- a/glm/gtx/multiple.hpp +++ b/glm/gtx/multiple.hpp @@ -22,10 +22,6 @@ namespace glm { - namespace test{ - bool main_img_multiple(); - }//namespace test - namespace gtx{ //! GLM_GTX_multiple: Find the closest number of a number multiple of other number. namespace multiple diff --git a/glm/gtx/noise.hpp b/glm/gtx/noise.hpp index 0e1a32e8..30552c20 100644 --- a/glm/gtx/noise.hpp +++ b/glm/gtx/noise.hpp @@ -27,10 +27,6 @@ namespace glm { - namespace test{ - void main_gtx_noise(); - }//namespace test - namespace gtx{ //! GLM_GTX_noise extension: Comparison functions for a user defined epsilon values. namespace noise diff --git a/glm/gtx/norm.hpp b/glm/gtx/norm.hpp index 599a3995..272c18dd 100644 --- a/glm/gtx/norm.hpp +++ b/glm/gtx/norm.hpp @@ -27,10 +27,6 @@ namespace glm { - namespace test{ - void main_gtx_norm(); - }//namespace test - namespace gtx{ //! GLM_GTX_norm extension: Various way to compute vector norms. namespace norm diff --git a/glm/gtx/normal.hpp b/glm/gtx/normal.hpp index 8c27798d..068d61a8 100644 --- a/glm/gtx/normal.hpp +++ b/glm/gtx/normal.hpp @@ -22,10 +22,6 @@ namespace glm { - namespace test{ - void main_gtx_normal(); - }//namespace test - namespace gtx{ //! GLM_GTX_normal extension: Compute the normal of a triangle. namespace normal diff --git a/glm/gtx/optimum_pow.hpp b/glm/gtx/optimum_pow.hpp index 90bd0966..36512786 100644 --- a/glm/gtx/optimum_pow.hpp +++ b/glm/gtx/optimum_pow.hpp @@ -22,10 +22,6 @@ namespace glm { - namespace test{ - void main_gtx_optimum_pow(); - }//namespace test - namespace gtx{ //! GLM_GTX_optimum_pow extension: Integer exponentiation of power functions. namespace optimum_pow diff --git a/glm/gtx/orthonormalize.hpp b/glm/gtx/orthonormalize.hpp index 73d8625c..9490efc3 100644 --- a/glm/gtx/orthonormalize.hpp +++ b/glm/gtx/orthonormalize.hpp @@ -22,10 +22,6 @@ namespace glm { - namespace test{ - void main_gtx_orthonormalize(); - }//namespace test - namespace gtx{ //! GLM_GTX_orthonormalize extension: Orthonormalize matrices. namespace orthonormalize diff --git a/glm/gtx/perpendicular.hpp b/glm/gtx/perpendicular.hpp index c9212e68..93c6e82c 100644 --- a/glm/gtx/perpendicular.hpp +++ b/glm/gtx/perpendicular.hpp @@ -24,10 +24,6 @@ namespace glm { - namespace test{ - void main_gtx_perpendicular(); - }//namespace test - namespace gtx{ //! GLM_GTX_perpendicular extension: Perpendicular of a vector from other one namespace perpendicular diff --git a/glm/gtx/projection.hpp b/glm/gtx/projection.hpp index 4f4f0dc5..a92ca3b5 100644 --- a/glm/gtx/projection.hpp +++ b/glm/gtx/projection.hpp @@ -22,10 +22,6 @@ namespace glm { - namespace test{ - void main_gtx_projection(); - }//namespace test - namespace gtx{ //! GLM_GTX_projection extension: Projection of a vector to other one namespace projection diff --git a/glm/gtx/reciprocal.hpp b/glm/gtx/reciprocal.hpp index 27763c22..eb8ea688 100644 --- a/glm/gtx/reciprocal.hpp +++ b/glm/gtx/reciprocal.hpp @@ -19,10 +19,6 @@ namespace glm { - namespace test{ - void main_gtx_reciprocal(); - }//namespace test - namespace gtx{ //! GLM_GTX_reciprocal extension: Define secant, cosecant and cotangent functions. namespace reciprocal diff --git a/glm/gtx/simplex.hpp b/glm/gtx/simplex.hpp index fd17deaa..4100cba2 100644 --- a/glm/gtx/simplex.hpp +++ b/glm/gtx/simplex.hpp @@ -20,49 +20,48 @@ # pragma message("GLM: GLM_GTX_simplex extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +//! GLM_GTX_simplex extension: Spline functions +namespace spline { - namespace gtx{ - //! GLM_GTX_simplex extension: Spline functions - namespace spline - { - /// \addtogroup gtx_spline - ///@{ + /// \addtogroup gtx_spline + ///@{ - //! Return a point from a catmull rom curve. - //! From GLM_GTX_spline extension. - template - genType catmullRom( - genType const & v1, - genType const & v2, - genType const & v3, - genType const & v4, - typename genType::value_type const & s); + //! Return a point from a catmull rom curve. + //! From GLM_GTX_spline extension. + template + genType catmullRom( + genType const & v1, + genType const & v2, + genType const & v3, + genType const & v4, + typename genType::value_type const & s); - //! Return a point from a hermite curve. - //! From GLM_GTX_spline extension. - template - genType hermite( - genType const & v1, - genType const & t1, - genType const & v2, - genType const & t2, - typename genType::value_type const & s); + //! Return a point from a hermite curve. + //! From GLM_GTX_spline extension. + template + genType hermite( + genType const & v1, + genType const & t1, + genType const & v2, + genType const & t2, + typename genType::value_type const & s); - //! Return a point from a cubic curve. - //! From GLM_GTX_spline extension. - template - genType cubic( - genType const & v1, - genType const & v2, - genType const & v3, - genType const & v4, - typename genType::value_type const & s); + //! Return a point from a cubic curve. + //! From GLM_GTX_spline extension. + template + genType cubic( + genType const & v1, + genType const & v2, + genType const & v3, + genType const & v4, + typename genType::value_type const & s); - ///@} + ///@} - }//namespace simplex - }//namespace gtx +}//namespace simplex +}//namespace gtx }//namespace glm #include "simplex.inl" diff --git a/glm/gtx/spline.hpp b/glm/gtx/spline.hpp index e791d1dc..fd57e15c 100644 --- a/glm/gtx/spline.hpp +++ b/glm/gtx/spline.hpp @@ -21,51 +21,50 @@ # pragma message("GLM: GLM_GTX_spline extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +//! GLM_GTX_spline extension: Spline functions +namespace spline { - namespace gtx{ - //! GLM_GTX_spline extension: Spline functions - namespace spline - { - using namespace gtx::optimum_pow; + using namespace gtx::optimum_pow; - /// \addtogroup gtx_spline - ///@{ + /// \addtogroup gtx_spline + ///@{ - //! Return a point from a catmull rom curve. - //! From GLM_GTX_spline extension. - template - genType catmullRom( - genType const & v1, - genType const & v2, - genType const & v3, - genType const & v4, - typename genType::value_type const & s); + //! Return a point from a catmull rom curve. + //! From GLM_GTX_spline extension. + template + genType catmullRom( + genType const & v1, + genType const & v2, + genType const & v3, + genType const & v4, + typename genType::value_type const & s); - //! Return a point from a hermite curve. - //! From GLM_GTX_spline extension. - template - genType hermite( - genType const & v1, - genType const & t1, - genType const & v2, - genType const & t2, - typename genType::value_type const & s); + //! Return a point from a hermite curve. + //! From GLM_GTX_spline extension. + template + genType hermite( + genType const & v1, + genType const & t1, + genType const & v2, + genType const & t2, + typename genType::value_type const & s); - //! Return a point from a cubic curve. - //! From GLM_GTX_spline extension. - template - genType cubic( - genType const & v1, - genType const & v2, - genType const & v3, - genType const & v4, - typename genType::value_type const & s); + //! Return a point from a cubic curve. + //! From GLM_GTX_spline extension. + template + genType cubic( + genType const & v1, + genType const & v2, + genType const & v3, + genType const & v4, + typename genType::value_type const & s); - ///@} + ///@} - }//namespace spline - }//namespace gtx +}//namespace spline +}//namespace gtx }//namespace glm #include "spline.inl" diff --git a/glm/gtx/std_based_type.hpp b/glm/gtx/std_based_type.hpp index b70ebbe2..b9f321ea 100644 --- a/glm/gtx/std_based_type.hpp +++ b/glm/gtx/std_based_type.hpp @@ -23,10 +23,6 @@ namespace glm { - namespace test{ - void main_gtx_std_based_type(); - }//namespace test - namespace gtx{ //! GLM_GTX_std_based_type extension: Add support vector types based on C++ standard type namespace std_based_type diff --git a/glm/gtx/string_cast.hpp b/glm/gtx/string_cast.hpp index 565268f6..b0c88df7 100644 --- a/glm/gtx/string_cast.hpp +++ b/glm/gtx/string_cast.hpp @@ -30,10 +30,6 @@ namespace glm { - namespace test{ - void main_gtx_string_cast(); - }//namespace test - namespace gtx{ //! GLM_GTX_string_cast extension: Setup strings for GLM type values namespace string_cast diff --git a/glm/gtx/transform.hpp b/glm/gtx/transform.hpp index adf18639..092cf3f0 100644 --- a/glm/gtx/transform.hpp +++ b/glm/gtx/transform.hpp @@ -24,10 +24,6 @@ namespace glm { - namespace test{ - void main_gtx_transform(); - }//namespace test - namespace gtx{ //! GLM_GTX_transform extension: Add transformation matrices namespace transform diff --git a/glm/gtx/transform2.hpp b/glm/gtx/transform2.hpp index 82c1151c..40c026d8 100644 --- a/glm/gtx/transform2.hpp +++ b/glm/gtx/transform2.hpp @@ -24,10 +24,6 @@ namespace glm { - namespace test{ - void main_gtx_transform2(); - }//namespace test - namespace gtx{ //! GLM_GTX_transform2 extension: Add extra transformation matrices namespace transform2 diff --git a/glm/gtx/ulp.hpp b/glm/gtx/ulp.hpp index 81f588db..39c51592 100644 --- a/glm/gtx/ulp.hpp +++ b/glm/gtx/ulp.hpp @@ -20,49 +20,47 @@ # pragma message("GLM: GLM_GTX_ulp extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace ulp ///< GLM_GTX_ulp extension: Precision calculation functions { - namespace gtx{ - //! GLM_GTX_ulp extension: Precision calculation functions - namespace ulp - { - /// \addtogroup gtx_ulp - ///@{ + /// \addtogroup gtx_ulp + ///@{ - //! Return the next ULP value(s) after the input value(s). - //! From GLM_GTX_ulp extension. - template - genType next_float(genType const & x); + //! Return the next ULP value(s) after the input value(s). + //! From GLM_GTX_ulp extension. + template + genType next_float(genType const & x); - //! Return the previous ULP value(s) before the input value(s). - //! From GLM_GTX_ulp extension. - template - genType prev_float(genType const & x); + //! Return the previous ULP value(s) before the input value(s). + //! From GLM_GTX_ulp extension. + template + genType prev_float(genType const & x); - //! Return the value(s) ULP distance after the input value(s). - //! From GLM_GTX_ulp extension. - template - genType next_float(genType const & x, uint const & Distance); + //! Return the value(s) ULP distance after the input value(s). + //! From GLM_GTX_ulp extension. + template + genType next_float(genType const & x, uint const & Distance); - //! Return the value(s) ULP distance before the input value(s). - //! From GLM_GTX_ulp extension. - template - genType prev_float(genType const & x, uint const & Distance); + //! Return the value(s) ULP distance before the input value(s). + //! From GLM_GTX_ulp extension. + template + genType prev_float(genType const & x, uint const & Distance); - //! Return the distance in the number of ULP between 2 scalars. - //! From GLM_GTX_ulp extension. - template - uint float_distance(T const & x, T const & y); + //! Return the distance in the number of ULP between 2 scalars. + //! From GLM_GTX_ulp extension. + template + uint float_distance(T const & x, T const & y); - //! Return the distance in the number of ULP between 2 vectors. - //! From GLM_GTX_ulp extension. - template class vecType> - vecType float_distance(vecType const & x, vecType const & y); + //! Return the distance in the number of ULP between 2 vectors. + //! From GLM_GTX_ulp extension. + template class vecType> + vecType float_distance(vecType const & x, vecType const & y); - ///@} + ///@} - }//namespace ulp - }//namespace gtx +}//namespace ulp +}//namespace gtx }//namespace glm #include "ulp.inl" diff --git a/glm/gtx/unsigned_int.hpp b/glm/gtx/unsigned_int.hpp index a8f210d0..77f11fa6 100644 --- a/glm/gtx/unsigned_int.hpp +++ b/glm/gtx/unsigned_int.hpp @@ -22,41 +22,35 @@ # pragma message("GLM: GLM_GTX_unsigned_int extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace unsigned_int ///< GLM_GTX_unsigned_int extension: Add support for unsigned integer for core functions { - namespace test{ - void main_gtx_unsigned_int(); - }//namespace test + using namespace gtx::integer; - namespace gtx{ - //! GLM_GTX_unsigned_int extension: Add support for unsigned integer for core functions - namespace unsigned_int - { - using namespace gtx::integer; + /// \addtogroup gtx_unsigned_int + ///@{ - /// \addtogroup gtx_unsigned_int - ///@{ + //! 32bit signed integer. + //! From GLM_GTX_unsigned_int extension. + typedef signed int sint; - //! 32bit signed integer. - //! From GLM_GTX_unsigned_int extension. - typedef signed int sint; + //! Returns x raised to the y power. + //! From GLM_GTX_unsigned_int extension. + uint pow(uint x, uint y); - //! Returns x raised to the y power. - //! From GLM_GTX_unsigned_int extension. - uint pow(uint x, uint y); + //! Returns the positive square root of x. + //! From GLM_GTX_unsigned_int extension. + uint sqrt(uint x); - //! Returns the positive square root of x. - //! From GLM_GTX_unsigned_int extension. - uint sqrt(uint x); + //! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y. + //! From GLM_GTX_unsigned_int extension. + uint mod(uint x, uint y); - //! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y. - //! From GLM_GTX_unsigned_int extension. - uint mod(uint x, uint y); + ///@} - ///@} - - }//namespace unsigned_int - }//namespace gtx +}//namespace unsigned_int +}//namespace gtx }//namespace glm #include "unsigned_int.inl" diff --git a/glm/gtx/vec1.hpp b/glm/gtx/vec1.hpp index df7fb1d4..552cce92 100644 --- a/glm/gtx/vec1.hpp +++ b/glm/gtx/vec1.hpp @@ -21,103 +21,96 @@ # pragma message("GLM: GLM_GTX_vec1 extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace vector1{ ///< GLM_GTX_vec1 extension: 1 component vector. +namespace precision { - namespace test{ - void main_gtx_vector1(); - }//namespace test + //! 1 component vector of high precision floating-point numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::highp_vec1_t highp_vec1; + //! 1 component vector of medium precision floating-point numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::mediump_vec1_t mediump_vec1; + //! 1 component vector of low precision floating-point numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::lowp_vec1_t lowp_vec1; - namespace gtx{ - //! GLM_GTX_vector1 extension: 1 component vector. - namespace vector1 - { - namespace precision - { - //! 1 component vector of high precision floating-point numbers. - //! There is no guarantee on the actual precision. - //! From GLM_GTX_vec1 extension. - typedef detail::highp_vec1_t highp_vec1; - //! 1 component vector of medium precision floating-point numbers. - //! There is no guarantee on the actual precision. - //! From GLM_GTX_vec1 extension. - typedef detail::mediump_vec1_t mediump_vec1; - //! 1 component vector of low precision floating-point numbers. - //! There is no guarantee on the actual precision. - //! From GLM_GTX_vec1 extension. - typedef detail::lowp_vec1_t lowp_vec1; + //! 1 component vector of high precision signed integer numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::highp_ivec1_t highp_ivec1; + //! 1 component vector of medium precision signed integer numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::mediump_ivec1_t mediump_ivec1; + //! 1 component vector of low precision signed integer numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::lowp_ivec1_t lowp_ivec1; - //! 1 component vector of high precision signed integer numbers. - //! There is no guarantee on the actual precision. - //! From GLM_GTX_vec1 extension. - typedef detail::highp_ivec1_t highp_ivec1; - //! 1 component vector of medium precision signed integer numbers. - //! There is no guarantee on the actual precision. - //! From GLM_GTX_vec1 extension. - typedef detail::mediump_ivec1_t mediump_ivec1; - //! 1 component vector of low precision signed integer numbers. - //! There is no guarantee on the actual precision. - //! From GLM_GTX_vec1 extension. - typedef detail::lowp_ivec1_t lowp_ivec1; + //! 1 component vector of high precision unsigned integer numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::highp_uvec1_t highp_uvec1; + //! 1 component vector of medium precision unsigned integer numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::mediump_uvec1_t mediump_uvec1; + //! 1 component vector of low precision unsigned integer numbers. + //! There is no guarantee on the actual precision. + //! From GLM_GTX_vec1 extension. + typedef detail::lowp_uvec1_t lowp_uvec1; +}//namespace precision - //! 1 component vector of high precision unsigned integer numbers. - //! There is no guarantee on the actual precision. - //! From GLM_GTX_vec1 extension. - typedef detail::highp_uvec1_t highp_uvec1; - //! 1 component vector of medium precision unsigned integer numbers. - //! There is no guarantee on the actual precision. - //! From GLM_GTX_vec1 extension. - typedef detail::mediump_uvec1_t mediump_uvec1; - //! 1 component vector of low precision unsigned integer numbers. - //! There is no guarantee on the actual precision. - //! From GLM_GTX_vec1 extension. - typedef detail::lowp_uvec1_t lowp_uvec1; - }//namespace precision + ////////////////////////// + // vec1 definition - ////////////////////////// - // vec1 definition - - //! 1 component vector of boolean. - //! From GLM_GTX_vec1 extension. - typedef detail::tvec1 bvec1; + //! 1 component vector of boolean. + //! From GLM_GTX_vec1 extension. + typedef detail::tvec1 bvec1; #if(defined(GLM_PRECISION_HIGHP_FLOAT)) - typedef precision::highp_vec1 vec1; + typedef precision::highp_vec1 vec1; #elif(defined(GLM_PRECISION_MEDIUMP_FLOAT)) - typedef precision::mediump_vec1 vec1; + typedef precision::mediump_vec1 vec1; #elif(defined(GLM_PRECISION_LOWP_FLOAT)) - typedef precision::lowp_vec1 vec1; + typedef precision::lowp_vec1 vec1; #else - //! 1 component vector of floating-point numbers. - //! From GLM_GTX_vec1 extension. - typedef precision::mediump_vec1 vec1; + //! 1 component vector of floating-point numbers. + //! From GLM_GTX_vec1 extension. + typedef precision::mediump_vec1 vec1; #endif//GLM_PRECISION #if(defined(GLM_PRECISION_HIGHP_INT)) - typedef precision::highp_ivec1 ivec1; + typedef precision::highp_ivec1 ivec1; #elif(defined(GLM_PRECISION_MEDIUMP_INT)) - typedef precision::mediump_ivec1 ivec1; + typedef precision::mediump_ivec1 ivec1; #elif(defined(GLM_PRECISION_LOWP_INT)) - typedef precision::lowp_ivec1 ivec1; + typedef precision::lowp_ivec1 ivec1; #else - //! 1 component vector of signed integer numbers. - //! From GLM_GTX_vec1 extension. - typedef precision::mediump_ivec1 ivec1; + //! 1 component vector of signed integer numbers. + //! From GLM_GTX_vec1 extension. + typedef precision::mediump_ivec1 ivec1; #endif//GLM_PRECISION #if(defined(GLM_PRECISION_HIGHP_UINT)) - typedef precision::highp_uvec1 uvec1; + typedef precision::highp_uvec1 uvec1; #elif(defined(GLM_PRECISION_MEDIUMP_UINT)) - typedef precision::mediump_uvec1 uvec1; + typedef precision::mediump_uvec1 uvec1; #elif(defined(GLM_PRECISION_LOWP_UINT)) - typedef precision::lowp_uvec1 uvec1; + typedef precision::lowp_uvec1 uvec1; #else - //! 1 component vector of unsigned integer numbers. - //! From GLM_GTX_vec1 extension. - typedef precision::mediump_uvec1 uvec1; + //! 1 component vector of unsigned integer numbers. + //! From GLM_GTX_vec1 extension. + typedef precision::mediump_uvec1 uvec1; #endif//GLM_PRECISION - }//namespace vec1 - }//namespace gtx +}//namespace vec1 +}//namespace gtx }//namespace glm #include "vec1.inl" diff --git a/glm/gtx/vector_access.hpp b/glm/gtx/vector_access.hpp index 1968d4f9..86ca1d97 100644 --- a/glm/gtx/vector_access.hpp +++ b/glm/gtx/vector_access.hpp @@ -20,50 +20,44 @@ # pragma message("GLM: GLM_GTX_vector_access extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace vector_access ///< GLM_GTX_vector_access extension: Function to set values to vectors { - namespace test{ - void main_gtx_vector_access(); - }//namespace test + /// \addtogroup gtx_vector_access + ///@{ - namespace gtx{ - //! GLM_GTX_vector_access extension: Function to set values to vectors - namespace vector_access - { - /// \addtogroup gtx_vector_access - ///@{ + //! Set values to a 2 components vector. + //! From GLM_GTX_vector_access extension. + template + void set( + detail::tvec2 & v, + valType const & x, + valType const & y); - //! Set values to a 2 components vector. - //! From GLM_GTX_vector_access extension. - template - void set( - detail::tvec2 & v, - valType const & x, - valType const & y); + //! Set values to a 3 components vector. + //! From GLM_GTX_vector_access extension. + template + void set( + detail::tvec3 & v, + valType const & x, + valType const & y, + valType const & z); - //! Set values to a 3 components vector. - //! From GLM_GTX_vector_access extension. - template - void set( - detail::tvec3 & v, - valType const & x, - valType const & y, - valType const & z); + //! Set values to a 4 components vector. + //! From GLM_GTX_vector_access extension. + template + void set( + detail::tvec4 & v, + valType const & x, + valType const & y, + valType const & z, + valType const & w); - //! Set values to a 4 components vector. - //! From GLM_GTX_vector_access extension. - template - void set( - detail::tvec4 & v, - valType const & x, - valType const & y, - valType const & z, - valType const & w); + ///@} - ///@} - - }//namespace vector_access - }//namespace gtx +}//namespace vector_access +}//namespace gtx }//namespace glm #include "vector_access.inl" diff --git a/glm/gtx/vector_angle.hpp b/glm/gtx/vector_angle.hpp index 0d1acbf5..ece7d358 100644 --- a/glm/gtx/vector_angle.hpp +++ b/glm/gtx/vector_angle.hpp @@ -27,8 +27,7 @@ namespace glm{ namespace gtx{ -//! GLM_GTX_vector_angle extension: Compute angle between vectors -namespace vector_angle +namespace vector_angle ///< GLM_GTX_vector_angle extension: Compute angle between vectors { using namespace quaternion; using namespace epsilon; diff --git a/glm/gtx/vector_query.hpp b/glm/gtx/vector_query.hpp index 47fac281..ae2879a0 100644 --- a/glm/gtx/vector_query.hpp +++ b/glm/gtx/vector_query.hpp @@ -22,77 +22,71 @@ # pragma message("GLM: GLM_GTX_vector_query extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace vector_query ///< GLM_GTX_vector_query extension: Query informations of vector types { - namespace test{ - void main_ext_gtx_vector_query(); - }//namespace test + /// \addtogroup gtx_vector_query + ///@{ - namespace gtx{ - //! GLM_GTX_vector_query extension: Query informations of vector types - namespace vector_query - { - /// \addtogroup gtx_vector_query - ///@{ - - //! Check if two vectors are collinears. - //! From GLM_GTX_vector_query extensions. - template - bool areCollinear( - genType const & v0, - genType const & v1, - typename genType::value_type const & epsilon = std::numeric_limits::epsilon()); + //! Check if two vectors are collinears. + //! From GLM_GTX_vector_query extensions. + template + bool areCollinear( + genType const & v0, + genType const & v1, + typename genType::value_type const & epsilon = std::numeric_limits::epsilon()); - //! Check if two vectors are opposites. - //! From GLM_GTX_vector_query extensions. - template - bool areOpposite( - genType const & v0, - genType const & v1, - typename genType::value_type const & epsilon = std::numeric_limits::epsilon()); + //! Check if two vectors are opposites. + //! From GLM_GTX_vector_query extensions. + template + bool areOpposite( + genType const & v0, + genType const & v1, + typename genType::value_type const & epsilon = std::numeric_limits::epsilon()); - //! Check if two vectors are orthogonals. - //! From GLM_GTX_vector_query extensions. - template - bool areOrthogonal( - genType const & v0, - genType const & v1, - typename genType::value_type const & epsilon = std::numeric_limits::epsilon()); + //! Check if two vectors are orthogonals. + //! From GLM_GTX_vector_query extensions. + template + bool areOrthogonal( + genType const & v0, + genType const & v1, + typename genType::value_type const & epsilon = std::numeric_limits::epsilon()); - //! Check if a vector is normalized. - //! From GLM_GTX_vector_query extensions. - template - bool isNormalized( - genType const & v, - typename genType::value_type const & epsilon = std::numeric_limits::epsilon()); + //! Check if a vector is normalized. + //! From GLM_GTX_vector_query extensions. + template + bool isNormalized( + genType const & v, + typename genType::value_type const & epsilon = std::numeric_limits::epsilon()); - //! Check if a vector is null. - //! From GLM_GTX_vector_query extensions. - template - bool isNull( - genType const & v, - typename genType::value_type const & epsilon = std::numeric_limits::epsilon()); + //! Check if a vector is null. + //! From GLM_GTX_vector_query extensions. + template + bool isNull( + genType const & v, + typename genType::value_type const & epsilon = std::numeric_limits::epsilon()); - //! Check if two vectors are orthonormal. - //! From GLM_GTX_vector_query extensions. - template - bool areOrthonormal( - genType const & v0, - genType const & v1, - typename genType::value_type const & epsilon = std::numeric_limits::epsilon()); + //! Check if two vectors are orthonormal. + //! From GLM_GTX_vector_query extensions. + template + bool areOrthonormal( + genType const & v0, + genType const & v1, + typename genType::value_type const & epsilon = std::numeric_limits::epsilon()); - //! Check if two vectors are similar. - //! From GLM_GTX_vector_query extensions. - template - bool areSimilar( - genType const & v0, - genType const & v1, - typename genType::value_type const & epsilon = std::numeric_limits::epsilon()); + //! Check if two vectors are similar. + //! From GLM_GTX_vector_query extensions. + template + bool areSimilar( + genType const & v0, + genType const & v1, + typename genType::value_type const & epsilon = std::numeric_limits::epsilon()); - ///@} + ///@} - }//namespace vector_query - }//namespace gtx +}//namespace vector_query +}//namespace gtx }//namespace glm #include "vector_query.inl" diff --git a/glm/gtx/verbose_operator.hpp b/glm/gtx/verbose_operator.hpp index 951ea47f..28fd1d20 100644 --- a/glm/gtx/verbose_operator.hpp +++ b/glm/gtx/verbose_operator.hpp @@ -20,47 +20,41 @@ # pragma message("GLM: GLM_GTX_verbose_operator extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace verbose_operator ///< GLM_GTX_verbose_operator extension: Use words to replace operators { - namespace test{ - void main_ext_gtx_verbose_operator(); - }//namespace test + /// \addtogroup gtx_verbose_operator + ///@{ - namespace gtx{ - //! GLM_GTX_verbose_operator extension: Use words to replace operators - namespace verbose_operator - { - /// \addtogroup gtx_verbose_operator - ///@{ + //! Addition of two values + //! From GLM_GTX_verbose_operator extension. + template + genTypeT add(genTypeT const & a, genTypeU const & b); - //! Addition of two values - //! From GLM_GTX_verbose_operator extension. - template - genTypeT add(genTypeT const & a, genTypeU const & b); + //! Substration of two values + //! From GLM_GTX_verbose_operator extension. + template + genTypeT sub(genTypeT const & a, genTypeU const & b); - //! Substration of two values - //! From GLM_GTX_verbose_operator extension. - template - genTypeT sub(genTypeT const & a, genTypeU const & b); + //! Multiplication of two values + //! From GLM_GTX_verbose_operator extension. + template + genTypeT mul(genTypeT const & a, genTypeU const & b); - //! Multiplication of two values - //! From GLM_GTX_verbose_operator extension. - template - genTypeT mul(genTypeT const & a, genTypeU const & b); + //! Division of two values + //! From GLM_GTX_verbose_operator extension. + template + genTypeT div(genTypeT const & a, genTypeU const & b); - //! Division of two values - //! From GLM_GTX_verbose_operator extension. - template - genTypeT div(genTypeT const & a, genTypeU const & b); + //! Multiplication and addition of three values + //! From GLM_GTX_verbose_operator extension. + template + genTypeT mad(genTypeT const & a, genTypeU const & b, genTypeV const & c); - //! Multiplication and addition of three values - //! From GLM_GTX_verbose_operator extension. - template - genTypeT mad(genTypeT const & a, genTypeU const & b, genTypeV const & c); - - ///@} - }//namespace verbose_operator - }//namespace gtx + ///@} +}//namespace verbose_operator +}//namespace gtx }//namespace glm #include "verbose_operator.inl" diff --git a/glm/gtx/wrap.hpp b/glm/gtx/wrap.hpp index caac013c..41f439c8 100644 --- a/glm/gtx/wrap.hpp +++ b/glm/gtx/wrap.hpp @@ -20,38 +20,32 @@ # pragma message("GLM: GLM_GTX_wrap extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace wrap ///< GLM_GTX_wrap: Wrapping mode using my texture samping. { - namespace test{ - bool main_gtx_wrap(); - }//namespace test + /// \addtogroup gtx_wrap + ///@{ - namespace gtx{ - //! GLM_GTX_wrap: Wrapping mode using my texture samping. - namespace wrap - { - /// \addtogroup gtx_wrap - ///@{ + //! Simulate GL_CLAMP OpenGL wrap mode + //! From GLM_GTX_wrap extension. + template + genType clamp(genType const & Texcoord); - //! Simulate GL_CLAMP OpenGL wrap mode - //! From GLM_GTX_wrap extension. - template - genType clamp(genType const & Texcoord); + //! Simulate GL_REPEAT OpenGL wrap mode + //! From GLM_GTX_wrap extension. + template + genType repeat(genType const & Texcoord); - //! Simulate GL_REPEAT OpenGL wrap mode - //! From GLM_GTX_wrap extension. - template - genType repeat(genType const & Texcoord); + //! Simulate GL_MIRROR_REPEAT OpenGL wrap mode + //! From GLM_GTX_wrap extension. + template + genType mirrorRepeat(genType const & Texcoord); - //! Simulate GL_MIRROR_REPEAT OpenGL wrap mode - //! From GLM_GTX_wrap extension. - template - genType mirrorRepeat(genType const & Texcoord); + ///@} - ///@} - - }//namespace wrap - }//namespace gtx +}//namespace wrap +}//namespace gtx }//namespace glm #include "wrap.inl" From 14760e9770dadea9daa9009b2579ac13cab138ca Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Wed, 18 May 2011 15:38:03 +0100 Subject: [PATCH 2/3] Updated header files formatting --- glm/gtx/associated_min_max.hpp | 95 ++- glm/gtx/bit.hpp | 125 ++-- glm/gtx/closest_point.hpp | 22 +- glm/gtx/color_cast.hpp | 118 ++-- glm/gtx/color_space.hpp | 83 ++- glm/gtx/color_space_YCoCg.hpp | 62 +- glm/gtx/compatibility.hpp | 213 ++++--- glm/gtx/component_wise.hpp | 59 +- glm/gtx/epsilon.hpp | 47 +- glm/gtx/euler_angles.hpp | 180 +++--- glm/gtx/extend.hpp | 33 +- glm/gtx/extented_min_max.hpp | 263 +++++---- glm/gtx/fast_exponential.hpp | 85 ++- glm/gtx/fast_square_root.hpp | 61 +- glm/gtx/fast_trigonometry.hpp | 89 ++- glm/gtx/gradient_paint.hpp | 42 +- glm/gtx/handed_coordinate_space.hpp | 49 +- glm/gtx/inertia.hpp | 117 ++-- glm/gtx/int_10_10_10_2.hpp | 26 +- glm/gtx/integer.hpp | 45 +- glm/gtx/intersect.hpp | 73 ++- glm/gtx/log_base.hpp | 30 +- glm/gtx/matrix_cross_product.hpp | 39 +- glm/gtx/matrix_interpolation.hpp | 61 +- glm/gtx/matrix_major_storage.hpp | 163 +++--- glm/gtx/matrix_operation.hpp | 109 ++-- glm/gtx/matrix_query.hpp | 114 ++-- glm/gtx/mixed_product.hpp | 32 +- glm/gtx/multiple.hpp | 43 +- glm/gtx/noise.hpp | 51 +- glm/gtx/norm.hpp | 187 +++--- glm/gtx/normal.hpp | 33 +- glm/gtx/normalize_dot.hpp | 49 +- glm/gtx/number_precision.hpp | 7 +- glm/gtx/ocl_type.hpp | 8 +- glm/gtx/optimum_pow.hpp | 67 +-- glm/gtx/orthonormalize.hpp | 41 +- glm/gtx/perpendicular.hpp | 56 +- glm/gtx/polar_coordinates.hpp | 35 +- glm/gtx/projection.hpp | 55 +- glm/gtx/quaternion.hpp | 313 +++++----- glm/gtx/random.hpp | 5 +- glm/gtx/raw_data.hpp | 44 +- glm/gtx/reciprocal.hpp | 121 ++-- glm/gtx/rotate_vector.hpp | 136 +++-- glm/gtx/simd_mat4.hpp | 242 ++++---- glm/gtx/simd_vec4.hpp | 873 ++++++++++++++-------------- glm/gtx/simplex.hpp | 12 +- glm/gtx/spline.hpp | 8 +- glm/gtx/std_based_type.hpp | 66 +-- glm/gtx/string_cast.hpp | 35 +- glm/gtx/transform.hpp | 123 ++-- glm/gtx/transform2.hpp | 151 +++-- glm/gtx/ulp.hpp | 9 +- glm/gtx/unsigned_int.hpp | 5 +- glm/gtx/vec1.hpp | 6 +- glm/gtx/vector_access.hpp | 5 +- glm/gtx/vector_angle.hpp | 8 +- glm/gtx/vector_query.hpp | 11 +- glm/gtx/verbose_operator.hpp | 10 +- glm/gtx/wrap.hpp | 11 +- 61 files changed, 2558 insertions(+), 2703 deletions(-) diff --git a/glm/gtx/associated_min_max.hpp b/glm/gtx/associated_min_max.hpp index dfa0adf0..7b8eafc9 100644 --- a/glm/gtx/associated_min_max.hpp +++ b/glm/gtx/associated_min_max.hpp @@ -21,64 +21,59 @@ # pragma message("GLM: GLM_GTX_associated_min_max extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace associated_min_max ///< GLM_GTX_associated_min_max extension: Min and max functions that return associated values not the compared onces. { - namespace gtx - { - //! GLM_GTX_associated_min_max extension: Min and max functions that return associated values not the compared onces. - namespace associated_min_max - { - /// \addtogroup gtx_associated_min_max - ///@{ + /// \addtogroup gtx_associated_min_max + ///@{ - //! \brief Min comparison between 2 variables - template - genTypeU associatedMin( - const genTypeT& x, const genTypeU& a, - const genTypeT& y, const genTypeU& b); + //! \brief Min comparison between 2 variables + template + genTypeU associatedMin( + const genTypeT& x, const genTypeU& a, + const genTypeT& y, const genTypeU& b); - //! \brief Min comparison between 3 variables - template - genTypeU associatedMin( - const genTypeT& x, const genTypeU& a, - const genTypeT& y, const genTypeU& b, - const genTypeT& z, const genTypeU& c); + //! \brief Min comparison between 3 variables + template + genTypeU associatedMin( + const genTypeT& x, const genTypeU& a, + const genTypeT& y, const genTypeU& b, + const genTypeT& z, const genTypeU& c); - //! \brief Min comparison between 4 variables - template - genTypeU associatedMin( - const genTypeT& x, const genTypeU& a, - const genTypeT& y, const genTypeU& b, - const genTypeT& z, const genTypeU& c, - const genTypeT& w, const genTypeU& d); + //! \brief Min comparison between 4 variables + template + genTypeU associatedMin( + const genTypeT& x, const genTypeU& a, + const genTypeT& y, const genTypeU& b, + const genTypeT& z, const genTypeU& c, + const genTypeT& w, const genTypeU& d); - //! \brief Max comparison between 2 variables - template - genTypeU associatedMax( - const genTypeT& x, const genTypeU& a, - const genTypeT& y, const genTypeU& b); + //! \brief Max comparison between 2 variables + template + genTypeU associatedMax( + const genTypeT& x, const genTypeU& a, + const genTypeT& y, const genTypeU& b); - //! \brief Max comparison between 3 variables - template - genTypeU associatedMax( - const genTypeT& x, const genTypeU& a, - const genTypeT& y, const genTypeU& b, - const genTypeT& z, const genTypeU& c); + //! \brief Max comparison between 3 variables + template + genTypeU associatedMax( + const genTypeT& x, const genTypeU& a, + const genTypeT& y, const genTypeU& b, + const genTypeT& z, const genTypeU& c); - //! \brief Max comparison between 4 variables - template - genTypeU associatedMax( - const genTypeT& x, const genTypeU& a, - const genTypeT& y, const genTypeU& b, - const genTypeT& z, const genTypeU& c, - const genTypeT& w, const genTypeU& d); - ///@} + //! \brief Max comparison between 4 variables + template + genTypeU associatedMax( + const genTypeT& x, const genTypeU& a, + const genTypeT& y, const genTypeU& b, + const genTypeT& z, const genTypeU& c, + const genTypeT& w, const genTypeU& d); - }//namespace associated_min_max - - bool test(); - }//namespace gtx -}//namespace glm + ///@} +} //namespace associated_min_max +} //namespace gtx +} //namespace glm #include "associated_min_max.inl" diff --git a/glm/gtx/bit.hpp b/glm/gtx/bit.hpp index 6c94e0fb..c84efa7d 100644 --- a/glm/gtx/bit.hpp +++ b/glm/gtx/bit.hpp @@ -22,85 +22,82 @@ # pragma message("GLM: GLM_GTX_bit extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace bit ///< GLM_GTX_bit extension: Allow to perform bit operations on integer values { - namespace gtx{ - //! GLM_GTX_bit extension: Allow to perform bit operations on integer values - namespace bit - { - using namespace gtc::half_float; + using namespace gtc::half_float; - /// \addtogroup gtx_bit - ///@{ + /// \addtogroup gtx_bit + ///@{ - //! Build a mask of 'count' bits - //! From GLM_GTX_bit extension. - template - genIType mask(genIType const & count); + //! Build a mask of 'count' bits + //! From GLM_GTX_bit extension. + template + genIType mask(genIType const & count); - //! Component wise extraction of bit fields. - //! genType and genIType could be a scalar or a vector. - //! From GLM_GTX_bit extension. - template - genIUType extractField( - genIUType const & v, - sizeType const & first, - sizeType const & count); + //! Component wise extraction of bit fields. + //! genType and genIType could be a scalar or a vector. + //! From GLM_GTX_bit extension. + template + genIUType extractField( + genIUType const & v, + sizeType const & first, + sizeType const & count); - //! Find the lowest bit set to 1 in a integer variable. - //! From GLM_GTX_bit extension. - template - int lowestBit(genType const & value); + //! Find the lowest bit set to 1 in a integer variable. + //! From GLM_GTX_bit extension. + template + int lowestBit(genType const & value); - //! Find the highest bit set to 1 in a integer variable. - //! From GLM_GTX_bit extension. - template - int highestBit(genType const & value); + //! Find the highest bit set to 1 in a integer variable. + //! From GLM_GTX_bit extension. + template + int highestBit(genType const & value); - //! Find the highest bit set to 1 in a integer variable and return its value. - //! From GLM_GTX_bit extension. - template - genType highestBitValue(genType const & value); + //! Find the highest bit set to 1 in a integer variable and return its value. + //! From GLM_GTX_bit extension. + template + genType highestBitValue(genType const & value); - //! Return true if the value is a power of two number. - //! From GLM_GTX_bit extension. - template - bool isPowerOfTwo(genType const & value); + //! Return true if the value is a power of two number. + //! From GLM_GTX_bit extension. + template + bool isPowerOfTwo(genType const & value); - //! Return the power of two number which value is just higher the input value. - //! From GLM_GTX_bit extension. - template - genType powerOfTwoAbove(genType const & value); + //! Return the power of two number which value is just higher the input value. + //! From GLM_GTX_bit extension. + template + genType powerOfTwoAbove(genType const & value); - //! Return the power of two number which value is just lower the input value. - //! From GLM_GTX_bit extension. - template - genType powerOfTwoBelow(genType const & value); + //! Return the power of two number which value is just lower the input value. + //! From GLM_GTX_bit extension. + template + genType powerOfTwoBelow(genType const & value); - //! Return the power of two number which value is the closet to the input value. - //! From GLM_GTX_bit extension. - template - genType powerOfTwoNearest(genType const & value); + //! Return the power of two number which value is the closet to the input value. + //! From GLM_GTX_bit extension. + template + genType powerOfTwoNearest(genType const & value); - //! Revert all bits of any integer based type. - //! From GLM_GTX_bit extension. - template - genType bitRevert(genType const & value); + //! Revert all bits of any integer based type. + //! From GLM_GTX_bit extension. + template + genType bitRevert(genType const & value); - //! Rotate all bits to the right. - //! From GLM_GTX_bit extension. - template - genType bitRotateRight(genType const & In, std::size_t Shift); + //! Rotate all bits to the right. + //! From GLM_GTX_bit extension. + template + genType bitRotateRight(genType const & In, std::size_t Shift); - //! Rotate all bits to the left. - //! From GLM_GTX_bit extension. - template - genType bitRotateLeft(genType const & In, std::size_t Shift); + //! Rotate all bits to the left. + //! From GLM_GTX_bit extension. + template + genType bitRotateLeft(genType const & In, std::size_t Shift); - ///@} - - }//namespace bit - }//namespace gtx + ///@} +}//namespace bit +}//namespace gtx }//namespace glm #include "bit.inl" diff --git a/glm/gtx/closest_point.hpp b/glm/gtx/closest_point.hpp index f739aa59..7c9d5130 100644 --- a/glm/gtx/closest_point.hpp +++ b/glm/gtx/closest_point.hpp @@ -20,27 +20,25 @@ # pragma message("GLM: GLM_GTX_closest_point extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace closest_point ///< GLM_GTX_closest_point extension: Find the point on a straight line which is the closet of a point. { - namespace gtx{ - //! GLM_GTX_closest_point extension: Find the point on a straight line which is the closet of a point. - namespace closest_point{ - /// \addtogroup gtx_closest_point - ///@{ + /// @{ - //! Find the point on a straight line which is the closet of a point. - //! From GLM_GTX_closest_point extension. + /// Find the point on a straight line which is the closet of a point. + /// From GLM_GTX_closest_point extension. template detail::tvec3 closestPointOnLine( detail::tvec3 const & point, detail::tvec3 const & a, detail::tvec3 const & b); - ///@} - }//namespace closest_point - }//namespace gtx -}//namespace glm + /// @} +}// namespace closest_point +}// namespace gtx +}// namespace glm #include "closest_point.inl" diff --git a/glm/gtx/color_cast.hpp b/glm/gtx/color_cast.hpp index b88d3516..b50bc96c 100644 --- a/glm/gtx/color_cast.hpp +++ b/glm/gtx/color_cast.hpp @@ -22,84 +22,82 @@ # pragma message("GLM: GLM_GTX_color_cast extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace color_cast ///< GLM_GTX_color_cast extension: Conversion between two color types { - namespace gtx{ - //! GLM_GTX_color_cast extension: Conversion between two color types - namespace color_cast - { - using namespace gtx::number_precision; + using namespace gtx::number_precision; - /// \addtogroup gtx_color_cast - ///@{ + /// \addtogroup gtx_color_cast + ///@{ - //! Conversion of a floating value into a 8bit unsigned int value. - //! From GLM_GTX_color_cast extension. - template gtc::type_precision::uint8 u8channel_cast(valType a); + //! Conversion of a floating value into a 8bit unsigned int value. + //! From GLM_GTX_color_cast extension. + template gtc::type_precision::uint8 u8channel_cast(valType a); - //! Conversion of a floating value into a 16bit unsigned int value. - //! From GLM_GTX_color_cast extension. - template gtc::type_precision::uint16 u16channel_cast(valType a); + //! Conversion of a floating value into a 16bit unsigned int value. + //! From GLM_GTX_color_cast extension. + template gtc::type_precision::uint16 u16channel_cast(valType a); - template gtc::type_precision::uint32 u32_rgbx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template gtc::type_precision::uint32 u32_xrgb_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template gtc::type_precision::uint32 u32_bgrx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template gtc::type_precision::uint32 u32_xbgr_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template gtc::type_precision::uint32 u32_rgbx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template gtc::type_precision::uint32 u32_xrgb_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template gtc::type_precision::uint32 u32_bgrx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template gtc::type_precision::uint32 u32_xbgr_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template gtc::type_precision::uint32 u32_rgba_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template gtc::type_precision::uint32 u32_argb_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template gtc::type_precision::uint32 u32_bgra_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template gtc::type_precision::uint32 u32_abgr_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template gtc::type_precision::uint32 u32_rgba_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template gtc::type_precision::uint32 u32_argb_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template gtc::type_precision::uint32 u32_bgra_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) + template gtc::type_precision::uint32 u32_abgr_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 32bit unsigned int value. (From GLM_GTX_color_cast extension) - template gtc::type_precision::uint64 u64_rgbx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template gtc::type_precision::uint64 u64_xrgb_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template gtc::type_precision::uint64 u64_bgrx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template gtc::type_precision::uint64 u64_xbgr_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template gtc::type_precision::uint64 u64_rgbx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template gtc::type_precision::uint64 u64_xrgb_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template gtc::type_precision::uint64 u64_bgrx_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template gtc::type_precision::uint64 u64_xbgr_cast(const detail::tvec3& c); //!< \brief Conversion of a 3 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template gtc::type_precision::uint64 u64_rgba_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template gtc::type_precision::uint64 u64_argb_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template gtc::type_precision::uint64 u64_bgra_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template gtc::type_precision::uint64 u64_abgr_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template gtc::type_precision::uint64 u64_rgba_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template gtc::type_precision::uint64 u64_argb_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template gtc::type_precision::uint64 u64_bgra_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) + template gtc::type_precision::uint64 u64_abgr_cast(const detail::tvec4& c); //!< \brief Conversion of a 4 components color into an 64bit unsigned int value. (From GLM_GTX_color_cast extension) - template gtx::number_precision::f16vec1 f16_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension) + template gtx::number_precision::f16vec1 f16_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f16vec3 f16_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f16vec3 f16_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f16vec3 f16_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f16vec3 f16_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f16vec3 f16_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f16vec3 f16_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f16vec3 f16_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f16vec3 f16_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f16vec4 f16_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f16vec4 f16_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f16vec4 f16_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f16vec4 f16_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f16vec4 f16_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f16vec4 f16_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f16vec4 f16_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f16vec4 f16_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template gtx::number_precision::f32vec1 f32_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension) + template gtx::number_precision::f32vec1 f32_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f32vec3 f32_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f32vec3 f32_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f32vec3 f32_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f32vec3 f32_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f32vec3 f32_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f32vec3 f32_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f32vec3 f32_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f32vec3 f32_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f32vec4 f32_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f32vec4 f32_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f32vec4 f32_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f32vec4 f32_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f32vec4 f32_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f32vec4 f32_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f32vec4 f32_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f32vec4 f32_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template gtx::number_precision::f64vec1 f64_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension) + template gtx::number_precision::f64vec1 f64_channel_cast(T a); //!< \brief Conversion of a u8 or u16 value to a single channel floating value. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f64vec3 f64_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f64vec3 f64_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f64vec3 f64_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f64vec3 f64_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f64vec3 f64_rgbx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f64vec3 f64_xrgb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f64vec3 f64_bgrx_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f64vec3 f64_xbgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 3 components floating color. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f64vec4 f64_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f64vec4 f64_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f64vec4 f64_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - template gtc::type_precision::f64vec4 f64_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f64vec4 f64_rgba_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f64vec4 f64_argb_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f64vec4 f64_bgra_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) + template gtc::type_precision::f64vec4 f64_abgr_cast(T c); //!< \brief Conversion of a u32 or u64 color into 4 components floating color. (From GLM_GTX_color_cast extension) - ///@} - }//namespace color_space - }//namespace gtx + ///@} +}//namespace color_space +}//namespace gtx }//namespace glm #include "color_cast.inl" diff --git a/glm/gtx/color_space.hpp b/glm/gtx/color_space.hpp index fdbe61b8..3b762363 100644 --- a/glm/gtx/color_space.hpp +++ b/glm/gtx/color_space.hpp @@ -20,57 +20,54 @@ # pragma message("GLM: GLM_GTX_color_space extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace color_space ///< GLM_GTX_color_space extension: Related to RGB to HSV conversions and operations { - namespace gtx{ - //! GLM_GTX_color_space extension: Related to RGB to HSV conversions and operations - namespace color_space - { - /// \addtogroup gtx_color_space - ///@{ + /// \addtogroup gtx_color_space + /// @{ - //! Converts a color from HSV color space to its color in RGB color space. - //! From GLM_GTX_color_space extension. - template - detail::tvec3 rgbColor( - detail::tvec3 const & hsvValue); + //! Converts a color from HSV color space to its color in RGB color space. + //! From GLM_GTX_color_space extension. + template + detail::tvec3 rgbColor( + detail::tvec3 const & hsvValue); - //! Converts a color from RGB color space to its color in HSV color space. - //! From GLM_GTX_color_space extension. - template - detail::tvec3 hsvColor( - detail::tvec3 const & rgbValue); + //! Converts a color from RGB color space to its color in HSV color space. + //! From GLM_GTX_color_space extension. + template + detail::tvec3 hsvColor( + detail::tvec3 const & rgbValue); - //! Build a saturation matrix. - //! From GLM_GTX_color_space extension - template - detail::tmat4x4 saturation( - valType const s); + //! Build a saturation matrix. + //! From GLM_GTX_color_space extension + template + detail::tmat4x4 saturation( + valType const s); - //! Modify the saturation of a color. - //! From GLM_GTX_color_space extension. - template - detail::tvec3 saturation( - valType const s, - detail::tvec3 const & color); + //! Modify the saturation of a color. + //! From GLM_GTX_color_space extension. + template + detail::tvec3 saturation( + valType const s, + detail::tvec3 const & color); - //! Modify the saturation of a color. - //! From GLM_GTX_color_space extension. - template - detail::tvec4 saturation( - valType const s, - detail::tvec4 const & color); + //! Modify the saturation of a color. + //! From GLM_GTX_color_space extension. + template + detail::tvec4 saturation( + valType const s, + detail::tvec4 const & color); - //! Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals. - //! From GLM_GTX_color_space extension. - template - valType luminosity( - detail::tvec3 const & color); + //! Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals. + //! From GLM_GTX_color_space extension. + template + valType luminosity( + detail::tvec3 const & color); - ///@} - - }//namespace color_space - }//namespace gtx + /// @} +}//namespace color_space +}//namespace gtx }//namespace glm #include "color_space.inl" diff --git a/glm/gtx/color_space_YCoCg.hpp b/glm/gtx/color_space_YCoCg.hpp index efa2a006..272e3c88 100644 --- a/glm/gtx/color_space_YCoCg.hpp +++ b/glm/gtx/color_space_YCoCg.hpp @@ -20,44 +20,42 @@ # pragma message("GLM: GLM_GTX_color_space_YCoCg extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace color_space_YCoCg ///< GLM_GTX_color_space_YCoCg extension: RGB to YCoCg conversions and operations { - namespace gtx{ - //! GLM_GTX_color_space_YCoCg extension: RGB to YCoCg conversions and operations - namespace color_space_YCoCg - { - /// \addtogroup gtx_color_space_YCoCg - ///@{ + /// \addtogroup gtx_color_space_YCoCg + ///@{ - //! Convert a color from RGB color space to YCoCg color space. - //! From GLM_GTX_color_space_YCoCg extension. - template - detail::tvec3 rgb2YCoCg( - detail::tvec3 const & rgbColor); + //! Convert a color from RGB color space to YCoCg color space. + //! From GLM_GTX_color_space_YCoCg extension. + template + detail::tvec3 rgb2YCoCg( + detail::tvec3 const & rgbColor); - //! Convert a color from YCoCg color space to RGB color space. - //! From GLM_GTX_color_space_YCoCg extension. - template - detail::tvec3 YCoCg2rgb( - detail::tvec3 const & YCoCgColor); + //! Convert a color from YCoCg color space to RGB color space. + //! From GLM_GTX_color_space_YCoCg extension. + template + detail::tvec3 YCoCg2rgb( + detail::tvec3 const & YCoCgColor); - //! Convert a color from RGB color space to YCoCgR color space. - //! \see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range" - //! From GLM_GTX_color_space_YCoCg extension. - template - detail::tvec3 rgb2YCoCgR( - detail::tvec3 const & rgbColor); + //! Convert a color from RGB color space to YCoCgR color space. + //! \see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range" + //! From GLM_GTX_color_space_YCoCg extension. + template + detail::tvec3 rgb2YCoCgR( + detail::tvec3 const & rgbColor); - //! Convert a color from YCoCgR color space to RGB color space. - //! \see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range" - //! From GLM_GTX_color_space_YCoCg extension. - template - detail::tvec3 YCoCgR2rgb( - detail::tvec3 const & YCoCgColor); + //! Convert a color from YCoCgR color space to RGB color space. + //! \see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range" + //! From GLM_GTX_color_space_YCoCg extension. + template + detail::tvec3 YCoCgR2rgb( + detail::tvec3 const & YCoCgColor); - ///@} - }//namespace color_space_YCoCg - }//namespace gtx + /// @} +}//namespace color_space_YCoCg +}//namespace gtx }//namespace glm #include "color_space_YCoCg.inl" diff --git a/glm/gtx/compatibility.hpp b/glm/gtx/compatibility.hpp index 124dc16b..637addd0 100644 --- a/glm/gtx/compatibility.hpp +++ b/glm/gtx/compatibility.hpp @@ -28,132 +28,129 @@ #include #endif//GLM_COMPILER -namespace glm +namespace glm{ +namespace gtx{ +namespace compatibility ///< GLM_GTX_compatibility extension: Provide functions to increase the compatibility with Cg and HLSL languages { - namespace gtx{ - //! GLM_GTX_compatibility extension: Provide functions to increase the compatibility with Cg and HLSL languages - namespace compatibility - { - /// \addtogroup gtx_compatibility - ///@{ + /// \addtogroup gtx_compatibility + ///@{ - template GLM_FUNC_QUALIFIER T lerp(T x, T y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec2 lerp(const detail::tvec2& x, const detail::tvec2& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec3 lerp(const detail::tvec3& x, const detail::tvec3& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec4 lerp(const detail::tvec4& x, const detail::tvec4& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec2 lerp(const detail::tvec2& x, const detail::tvec2& y, const detail::tvec2& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec3 lerp(const detail::tvec3& x, const detail::tvec3& y, const detail::tvec3& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec4 lerp(const detail::tvec4& x, const detail::tvec4& y, const detail::tvec4& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER T lerp(T x, T y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec2 lerp(const detail::tvec2& x, const detail::tvec2& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec3 lerp(const detail::tvec3& x, const detail::tvec3& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec4 lerp(const detail::tvec4& x, const detail::tvec4& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec2 lerp(const detail::tvec2& x, const detail::tvec2& y, const detail::tvec2& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec3 lerp(const detail::tvec3& x, const detail::tvec3& y, const detail::tvec3& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec4 lerp(const detail::tvec4& x, const detail::tvec4& y, const detail::tvec4& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER T saturate(T x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec2 saturate(const detail::tvec2& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec3 saturate(const detail::tvec3& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec4 saturate(const detail::tvec4& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER T saturate(T x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec2 saturate(const detail::tvec2& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec3 saturate(const detail::tvec3& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec4 saturate(const detail::tvec4& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER T atan2(T x, T y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec2 atan2(const detail::tvec2& x, const detail::tvec2& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec3 atan2(const detail::tvec3& x, const detail::tvec3& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec4 atan2(const detail::tvec4& x, const detail::tvec4& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER T atan2(T x, T y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec2 atan2(const detail::tvec2& x, const detail::tvec2& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec3 atan2(const detail::tvec3& x, const detail::tvec3& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec4 atan2(const detail::tvec4& x, const detail::tvec4& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) - template bool isfinite(genType const & x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) - template detail::tvec2 isfinite(const detail::tvec2& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) - template detail::tvec3 isfinite(const detail::tvec3& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) - template detail::tvec4 isfinite(const detail::tvec4& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template bool isfinite(genType const & x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template detail::tvec2 isfinite(const detail::tvec2& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template detail::tvec3 isfinite(const detail::tvec3& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template detail::tvec4 isfinite(const detail::tvec4& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) - template bool isinf(genType const & x); //!< \brief Determines whether the given floating-point value is infinite. (From GLM_GTX_compatibility extension) - template detail::tvec2 isinf(const detail::tvec2& x); //!< \brief Determines whether the given floating-point value is infinite. (From GLM_GTX_compatibility extension) - template detail::tvec3 isinf(const detail::tvec3& x); //!< \brief Determines whether the given floating-point value is infinite. (From GLM_GTX_compatibility extension) - template detail::tvec4 isinf(const detail::tvec4& x); //!< \brief Determines whether the given floating-point value is infinite. (From GLM_GTX_compatibility extension) + template bool isinf(genType const & x); //!< \brief Determines whether the given floating-point value is infinite. (From GLM_GTX_compatibility extension) + template detail::tvec2 isinf(const detail::tvec2& x); //!< \brief Determines whether the given floating-point value is infinite. (From GLM_GTX_compatibility extension) + template detail::tvec3 isinf(const detail::tvec3& x); //!< \brief Determines whether the given floating-point value is infinite. (From GLM_GTX_compatibility extension) + template detail::tvec4 isinf(const detail::tvec4& x); //!< \brief Determines whether the given floating-point value is infinite. (From GLM_GTX_compatibility extension) - template bool isnan(genType const & x); //!< \brief Checks given floating-point value for not a number (NAN) (From GLM_GTX_compatibility extension) - template detail::tvec2 isnan(const detail::tvec2& x); //!< \brief Checks given floating-point value for not a number (NAN) (From GLM_GTX_compatibility extension) - template detail::tvec3 isnan(const detail::tvec3& x); //!< \brief Checks given floating-point value for not a number (NAN) (From GLM_GTX_compatibility extension) - template detail::tvec4 isnan(const detail::tvec4& x); //!< \brief Checks given floating-point value for not a number (NAN) (From GLM_GTX_compatibility extension) + template bool isnan(genType const & x); //!< \brief Checks given floating-point value for not a number (NAN) (From GLM_GTX_compatibility extension) + template detail::tvec2 isnan(const detail::tvec2& x); //!< \brief Checks given floating-point value for not a number (NAN) (From GLM_GTX_compatibility extension) + template detail::tvec3 isnan(const detail::tvec3& x); //!< \brief Checks given floating-point value for not a number (NAN) (From GLM_GTX_compatibility extension) + template detail::tvec4 isnan(const detail::tvec4& x); //!< \brief Checks given floating-point value for not a number (NAN) (From GLM_GTX_compatibility extension) - typedef bool bool1; //!< \brief boolean type with 1 component. (From GLM_GTX_compatibility extension) - typedef detail::tvec2 bool2; //!< \brief boolean type with 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tvec3 bool3; //!< \brief boolean type with 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tvec4 bool4; //!< \brief boolean type with 4 components. (From GLM_GTX_compatibility extension) + typedef bool bool1; //!< \brief boolean type with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tvec2 bool2; //!< \brief boolean type with 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec3 bool3; //!< \brief boolean type with 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec4 bool4; //!< \brief boolean type with 4 components. (From GLM_GTX_compatibility extension) - typedef bool bool1x1; //!< \brief boolean matrix with 1 x 1 component. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x2 bool2x2; //!< \brief boolean matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x3 bool2x3; //!< \brief boolean matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x4 bool2x4; //!< \brief boolean matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x2 bool3x2; //!< \brief boolean matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x3 bool3x3; //!< \brief boolean matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x4 bool3x4; //!< \brief boolean matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x2 bool4x2; //!< \brief boolean matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x3 bool4x3; //!< \brief boolean matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x4 bool4x4; //!< \brief boolean matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) + typedef bool bool1x1; //!< \brief boolean matrix with 1 x 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x2 bool2x2; //!< \brief boolean matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x3 bool2x3; //!< \brief boolean matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x4 bool2x4; //!< \brief boolean matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x2 bool3x2; //!< \brief boolean matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x3 bool3x3; //!< \brief boolean matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x4 bool3x4; //!< \brief boolean matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x2 bool4x2; //!< \brief boolean matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x3 bool4x3; //!< \brief boolean matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x4 bool4x4; //!< \brief boolean matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) - typedef int int1; //!< \brief integer vector with 1 component. (From GLM_GTX_compatibility extension) - typedef detail::tvec2 int2; //!< \brief integer vector with 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tvec3 int3; //!< \brief integer vector with 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tvec4 int4; //!< \brief integer vector with 4 components. (From GLM_GTX_compatibility extension) + typedef int int1; //!< \brief integer vector with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tvec2 int2; //!< \brief integer vector with 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec3 int3; //!< \brief integer vector with 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec4 int4; //!< \brief integer vector with 4 components. (From GLM_GTX_compatibility extension) - typedef int int1x1; //!< \brief integer matrix with 1 component. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x2 int2x2; //!< \brief integer matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x3 int2x3; //!< \brief integer matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x4 int2x4; //!< \brief integer matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x2 int3x2; //!< \brief integer matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x3 int3x3; //!< \brief integer matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x4 int3x4; //!< \brief integer matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x2 int4x2; //!< \brief integer matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x3 int4x3; //!< \brief integer matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x4 int4x4; //!< \brief integer matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) + typedef int int1x1; //!< \brief integer matrix with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x2 int2x2; //!< \brief integer matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x3 int2x3; //!< \brief integer matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x4 int2x4; //!< \brief integer matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x2 int3x2; //!< \brief integer matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x3 int3x3; //!< \brief integer matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x4 int3x4; //!< \brief integer matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x2 int4x2; //!< \brief integer matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x3 int4x3; //!< \brief integer matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x4 int4x4; //!< \brief integer matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) - typedef gtc::half_float::half half1; //!< \brief half-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension) - typedef detail::tvec2 half2; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tvec3 half3; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tvec4 half4; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) + typedef gtc::half_float::half half1; //!< \brief half-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tvec2 half2; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec3 half3; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec4 half4; //!< \brief half-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) - typedef gtc::half_float::half half1x1; //!< \brief half-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x2 half2x2; //!< \brief half-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x3 half2x3; //!< \brief half-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x4 half2x4; //!< \brief half-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x2 half3x2; //!< \brief half-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x3 half3x3; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x4 half3x4; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x2 half4x2; //!< \brief half-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x3 half4x3; //!< \brief half-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x4 half4x4; //!< \brief half-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) + typedef gtc::half_float::half half1x1; //!< \brief half-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x2 half2x2; //!< \brief half-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x3 half2x3; //!< \brief half-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x4 half2x4; //!< \brief half-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x2 half3x2; //!< \brief half-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x3 half3x3; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x4 half3x4; //!< \brief half-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x2 half4x2; //!< \brief half-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x3 half4x3; //!< \brief half-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x4 half4x4; //!< \brief half-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) - typedef float float1; //!< \brief single-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension) - typedef detail::tvec2 float2; //!< \brief single-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tvec3 float3; //!< \brief single-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tvec4 float4; //!< \brief single-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension) + typedef float float1; //!< \brief single-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tvec2 float2; //!< \brief single-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec3 float3; //!< \brief single-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec4 float4; //!< \brief single-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension) - typedef float float1x1; //!< \brief single-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x2 float2x2; //!< \brief single-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x3 float2x3; //!< \brief single-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x4 float2x4; //!< \brief single-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x2 float3x2; //!< \brief single-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x3 float3x3; //!< \brief single-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x4 float3x4; //!< \brief single-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x2 float4x2; //!< \brief single-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x3 float4x3; //!< \brief single-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x4 float4x4; //!< \brief single-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) + typedef float float1x1; //!< \brief single-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x2 float2x2; //!< \brief single-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x3 float2x3; //!< \brief single-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x4 float2x4; //!< \brief single-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x2 float3x2; //!< \brief single-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x3 float3x3; //!< \brief single-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x4 float3x4; //!< \brief single-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x2 float4x2; //!< \brief single-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x3 float4x3; //!< \brief single-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x4 float4x4; //!< \brief single-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) - typedef double double1; //!< \brief double-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension) - typedef detail::tvec2 double2; //!< \brief double-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tvec3 double3; //!< \brief double-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tvec4 double4; //!< \brief double-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension) + typedef double double1; //!< \brief double-precision floating-point vector with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tvec2 double2; //!< \brief double-precision floating-point vector with 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec3 double3; //!< \brief double-precision floating-point vector with 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tvec4 double4; //!< \brief double-precision floating-point vector with 4 components. (From GLM_GTX_compatibility extension) - typedef double double1x1; //!< \brief double-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x2 double2x2; //!< \brief double-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x3 double2x3; //!< \brief double-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat2x4 double2x4; //!< \brief double-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x2 double3x2; //!< \brief double-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x3 double3x3; //!< \brief double-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat3x4 double3x4; //!< \brief double-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x2 double4x2; //!< \brief double-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x3 double4x3; //!< \brief double-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) - typedef detail::tmat4x4 double4x4; //!< \brief double-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) + typedef double double1x1; //!< \brief double-precision floating-point matrix with 1 component. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x2 double2x2; //!< \brief double-precision floating-point matrix with 2 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x3 double2x3; //!< \brief double-precision floating-point matrix with 2 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat2x4 double2x4; //!< \brief double-precision floating-point matrix with 2 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x2 double3x2; //!< \brief double-precision floating-point matrix with 3 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x3 double3x3; //!< \brief double-precision floating-point matrix with 3 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat3x4 double3x4; //!< \brief double-precision floating-point matrix with 3 x 4 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x2 double4x2; //!< \brief double-precision floating-point matrix with 4 x 2 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x3 double4x3; //!< \brief double-precision floating-point matrix with 4 x 3 components. (From GLM_GTX_compatibility extension) + typedef detail::tmat4x4 double4x4; //!< \brief double-precision floating-point matrix with 4 x 4 components. (From GLM_GTX_compatibility extension) - ///@} - - }//namespace compatibility - }//namespace gtx + /// @} +}//namespace compatibility +}//namespace gtx }//namespace glm #include "compatibility.inl" diff --git a/glm/gtx/component_wise.hpp b/glm/gtx/component_wise.hpp index 94b1375e..ab65a404 100644 --- a/glm/gtx/component_wise.hpp +++ b/glm/gtx/component_wise.hpp @@ -20,43 +20,40 @@ # pragma message("GLM: GLM_GTX_component_wise extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace component_wise ///< GLM_GTX_component_wise extension: Operations between components of a type { - namespace gtx{ - //! GLM_GTX_component_wise extension: Operations between components of a type - namespace component_wise - { - /// \addtogroup gtx_component_wise - ///@{ + /// \addtogroup gtx_component_wise + /// @{ - //! Add all vector components together. - //! From GLM_GTX_component_wise extension. - template - typename genType::value_type compAdd( - genType const & v); + //! Add all vector components together. + //! From GLM_GTX_component_wise extension. + template + typename genType::value_type compAdd( + genType const & v); - //! Multiply all vector components together. - //! From GLM_GTX_component_wise extension. - template - typename genType::value_type compMul( - genType const & v); + //! Multiply all vector components together. + //! From GLM_GTX_component_wise extension. + template + typename genType::value_type compMul( + genType const & v); - //! Find the minimum value between single vector components. - //! From GLM_GTX_component_wise extension. - template - typename genType::value_type compMin( - genType const & v); + //! Find the minimum value between single vector components. + //! From GLM_GTX_component_wise extension. + template + typename genType::value_type compMin( + genType const & v); - //! Find the maximum value between single vector components. - //! From GLM_GTX_component_wise extension. - template - typename genType::value_type compMax( - genType const & v); + //! Find the maximum value between single vector components. + //! From GLM_GTX_component_wise extension. + template + typename genType::value_type compMax( + genType const & v); - ///@} - - }//namespace component_wise - }//namespace gtx + /// @} +}//namespace component_wise +}//namespace gtx }//namespace glm #include "component_wise.inl" diff --git a/glm/gtx/epsilon.hpp b/glm/gtx/epsilon.hpp index 1461c1e6..7df2cb7d 100644 --- a/glm/gtx/epsilon.hpp +++ b/glm/gtx/epsilon.hpp @@ -22,35 +22,32 @@ # pragma message("GLM: GLM_GTX_epsilon extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace epsilon ///< GLM_GTX_epsilon extension: Comparison functions for a user defined epsilon values. { - namespace gtx{ - //! GLM_GTX_epsilon extension: Comparison functions for a user defined epsilon values. - namespace epsilon - { - /// \addtogroup gtx_epsilon - ///@{ + /// \addtogroup gtx_epsilon + ///@{ - //! Returns the component-wise compare of |x - y| < epsilon. - //! From GLM_GTX_epsilon extension. - template - bool equalEpsilon( - genTypeT const & x, - genTypeT const & y, - genTypeU const & epsilon); + //! Returns the component-wise compare of |x - y| < epsilon. + //! From GLM_GTX_epsilon extension. + template + bool equalEpsilon( + genTypeT const & x, + genTypeT const & y, + genTypeU const & epsilon); - //! Returns the component-wise compare of |x - y| >= epsilon. - //! From GLM_GTX_epsilon extension. - template - bool notEqualEpsilon( - genTypeT const & x, - genTypeT const & y, - genTypeU const & epsilon); + //! Returns the component-wise compare of |x - y| >= epsilon. + //! From GLM_GTX_epsilon extension. + template + bool notEqualEpsilon( + genTypeT const & x, + genTypeT const & y, + genTypeU const & epsilon); - ///@} - - }//namespace epsilon - }//namespace gtx + ///@} +}//namespace epsilon +}//namespace gtx }//namespace glm #include "epsilon.inl" diff --git a/glm/gtx/euler_angles.hpp b/glm/gtx/euler_angles.hpp index d16ba5e6..fd73ee04 100644 --- a/glm/gtx/euler_angles.hpp +++ b/glm/gtx/euler_angles.hpp @@ -26,114 +26,112 @@ # pragma message("GLM: GLM_GTX_euler_angles extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace euler_angles ///< GLM_GTX_euler_angles extension: Build matrices from Euler angles. { - namespace gtx{ - //! GLM_GTX_euler_angles extension: Build matrices from Euler angles. - namespace euler_angles - { - /// \addtogroup gtx_euler_angles - ///@{ + /// \addtogroup gtx_euler_angles + /// @{ - //! Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X. - //! From GLM_GTX_euler_angles extension. - template - detail::tmat4x4 eulerAngleX( - valType const & angleX); + //! Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle X. + //! From GLM_GTX_euler_angles extension. + template + detail::tmat4x4 eulerAngleX( + valType const & angleX); - //! Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y. - //! From GLM_GTX_euler_angles extension. - template - detail::tmat4x4 eulerAngleY( - valType const & angleY); + //! Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Y. + //! From GLM_GTX_euler_angles extension. + template + detail::tmat4x4 eulerAngleY( + valType const & angleY); - //! Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z. - //! From GLM_GTX_euler_angles extension. - template - detail::tmat4x4 eulerAngleZ( - valType const & angleZ); + //! Creates a 3D 4 * 4 homogeneous rotation matrix from an euler angle Z. + //! From GLM_GTX_euler_angles extension. + template + detail::tmat4x4 eulerAngleZ( + valType const & angleZ); - //! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y). - //! From GLM_GTX_euler_angles extension. - template - detail::tmat4x4 eulerAngleXY( - valType const & angleX, - valType const & angleY); + //! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Y). + //! From GLM_GTX_euler_angles extension. + template + detail::tmat4x4 eulerAngleXY( + valType const & angleX, + valType const & angleY); - //! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X). - //! From GLM_GTX_euler_angles extension. - template - detail::tmat4x4 eulerAngleYX( - valType const & angleY, - valType const & angleX); + //! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X). + //! From GLM_GTX_euler_angles extension. + template + detail::tmat4x4 eulerAngleYX( + valType const & angleY, + valType const & angleX); - //! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z). - //! From GLM_GTX_euler_angles extension. - template - detail::tmat4x4 eulerAngleXZ( - valType const & angleX, - valType const & angleZ); + //! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (X * Z). + //! From GLM_GTX_euler_angles extension. + template + detail::tmat4x4 eulerAngleXZ( + valType const & angleX, + valType const & angleZ); - //! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X). - //! From GLM_GTX_euler_angles extension. - template - detail::tmat4x4 eulerAngleZX( - valType const & angleZ, - valType const & angleX); + //! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * X). + //! From GLM_GTX_euler_angles extension. + template + detail::tmat4x4 eulerAngleZX( + valType const & angleZ, + valType const & angleX); - //! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z). - //! From GLM_GTX_euler_angles extension. - template - detail::tmat4x4 eulerAngleYZ( - valType const & angleY, - valType const & angleZ); + //! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * Z). + //! From GLM_GTX_euler_angles extension. + template + detail::tmat4x4 eulerAngleYZ( + valType const & angleY, + valType const & angleZ); - //! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y). - //! From GLM_GTX_euler_angles extension. - template - detail::tmat4x4 eulerAngleZY( - valType const & angleZ, - valType const & angleY); + //! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Z * Y). + //! From GLM_GTX_euler_angles extension. + template + detail::tmat4x4 eulerAngleZY( + valType const & angleZ, + valType const & angleY); - //! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). - //! From GLM_GTX_euler_angles extension. - template - detail::tmat4x4 eulerAngleYXZ( - valType const & yaw, - valType const & pitch, - valType const & roll); + //! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). + //! From GLM_GTX_euler_angles extension. + template + detail::tmat4x4 eulerAngleYXZ( + valType const & yaw, + valType const & pitch, + valType const & roll); - //! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). - //! From GLM_GTX_euler_angles extension. - template - detail::tmat4x4 yawPitchRoll( - valType const & yaw, - valType const & pitch, - valType const & roll); + //! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). + //! From GLM_GTX_euler_angles extension. + template + detail::tmat4x4 yawPitchRoll( + valType const & yaw, + valType const & pitch, + valType const & roll); - //! Creates a 2D 2 * 2 rotation matrix from an euler angle. - //! From GLM_GTX_euler_angles extension. - template - detail::tmat2x2 orientate2(T const & angle); + //! Creates a 2D 2 * 2 rotation matrix from an euler angle. + //! From GLM_GTX_euler_angles extension. + template + detail::tmat2x2 orientate2(T const & angle); - //! Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle. - //! From GLM_GTX_euler_angles extension. - template - detail::tmat3x3 orientate3(T const & angle); + //! Creates a 2D 4 * 4 homogeneous rotation matrix from an euler angle. + //! From GLM_GTX_euler_angles extension. + template + detail::tmat3x3 orientate3(T const & angle); - //! Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z). - //! From GLM_GTX_euler_angles extension. - template - detail::tmat3x3 orientate3(detail::tvec3 const & angles); + //! Creates a 3D 3 * 3 rotation matrix from euler angles (Y * X * Z). + //! From GLM_GTX_euler_angles extension. + template + detail::tmat3x3 orientate3(detail::tvec3 const & angles); - //! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). - //! From GLM_GTX_euler_angles extension. - template - detail::tmat4x4 orientate4(detail::tvec3 const & angles); + //! Creates a 3D 4 * 4 homogeneous rotation matrix from euler angles (Y * X * Z). + //! From GLM_GTX_euler_angles extension. + template + detail::tmat4x4 orientate4(detail::tvec3 const & angles); - ///@} - }//namespace euler_angles - }//namespace gtx + /// @} +}//namespace euler_angles +}//namespace gtx }//namespace glm #include "euler_angles.inl" diff --git a/glm/gtx/extend.hpp b/glm/gtx/extend.hpp index cc457ea8..9b38b613 100644 --- a/glm/gtx/extend.hpp +++ b/glm/gtx/extend.hpp @@ -20,27 +20,24 @@ # pragma message("GLM: GLM_GTX_extend extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace extend ///< GLM_GTX_extend extension: Extend a position from a source to a position at a defined length. { - namespace gtx{ - //! GLM_GTX_extend extension: Extend a position from a source to a position at a defined length. - namespace extend - { - /// \addtogroup gtx_extend - ///@{ + /// \addtogroup gtx_extend + /// @{ - //! Extends of Length the Origin position using the (Source - Origin) direction. - //! From GLM_GTX_extend extension. - template - genType extend( - genType const & Origin, - genType const & Source, - typename genType::value_type const Length); + //! Extends of Length the Origin position using the (Source - Origin) direction. + //! From GLM_GTX_extend extension. + template + genType extend( + genType const & Origin, + genType const & Source, + typename genType::value_type const Length); - ///@} - - }//namespace extend - }//namespace gtx + /// @} +}//namespace extend +}//namespace gtx }//namespace glm #include "extend.inl" diff --git a/glm/gtx/extented_min_max.hpp b/glm/gtx/extented_min_max.hpp index b84d8144..2ace7028 100644 --- a/glm/gtx/extented_min_max.hpp +++ b/glm/gtx/extented_min_max.hpp @@ -22,153 +22,150 @@ # pragma message("GLM: GLM_GTX_extented_min_max extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace extented_min_max ///< GLM_GTX_extented_min_max extension: Min and max functions for 3 to 4 parameters. { - namespace gtx{ - //! GLM_GTX_extented_min_max extension: Min and max functions for 3 to 4 parameters. - namespace extented_min_max - { - /// \addtogroup gtx_extented_min_max - ///@{ + /// \addtogroup gtx_extented_min_max + ///@{ - //< Return the minimum component-wise values of 3 inputs - //< From GLM_GTX_extented_min_max extension - template - T min( - T const & x, - T const & y, - T const & z); + //< Return the minimum component-wise values of 3 inputs + //< From GLM_GTX_extented_min_max extension + template + T min( + T const & x, + T const & y, + T const & z); - //< Return the minimum component-wise values of 3 inputs - //< From GLM_GTX_extented_min_max extension - template - < - typename T, - template class C - > - C min( - C const & x, - typename C::value_type const & y, - typename C::value_type const & z); + //< Return the minimum component-wise values of 3 inputs + //< From GLM_GTX_extented_min_max extension + template + < + typename T, + template class C + > + C min( + C const & x, + typename C::value_type const & y, + typename C::value_type const & z); - //< Return the minimum component-wise values of 3 inputs - //< From GLM_GTX_extented_min_max extension - template - < - typename T, - template class C - > - C min( - C const & x, - C const & y, - C const & z); + //< Return the minimum component-wise values of 3 inputs + //< From GLM_GTX_extented_min_max extension + template + < + typename T, + template class C + > + C min( + C const & x, + C const & y, + C const & z); - //< Return the minimum component-wise values of 4 inputs - //< From GLM_GTX_extented_min_max extension - template - T min( - T const & x, - T const & y, - T const & z, - T const & w); + //< Return the minimum component-wise values of 4 inputs + //< From GLM_GTX_extented_min_max extension + template + T min( + T const & x, + T const & y, + T const & z, + T const & w); - //< Return the minimum component-wise values of 4 inputs - //< From GLM_GTX_extented_min_max extension - template - < - typename T, - template class C - > - C min( - C const & x, - typename C::value_type const & y, - typename C::value_type const & z, - typename C::value_type const & w); + //< Return the minimum component-wise values of 4 inputs + //< From GLM_GTX_extented_min_max extension + template + < + typename T, + template class C + > + C min( + C const & x, + typename C::value_type const & y, + typename C::value_type const & z, + typename C::value_type const & w); - //< Return the minimum component-wise values of 4 inputs - //< From GLM_GTX_extented_min_max extension - template - < - typename T, - template class C - > - C min( - C const & x, - C const & y, - C const & z, - C const & w); + //< Return the minimum component-wise values of 4 inputs + //< From GLM_GTX_extented_min_max extension + template + < + typename T, + template class C + > + C min( + C const & x, + C const & y, + C const & z, + C const & w); - //< Return the maximum component-wise values of 3 inputs - //< From GLM_GTX_extented_min_max extension - template - T max( - T const & x, - T const & y, - T const & z); + //< Return the maximum component-wise values of 3 inputs + //< From GLM_GTX_extented_min_max extension + template + T max( + T const & x, + T const & y, + T const & z); - //< Return the maximum component-wise values of 3 inputs - //< From GLM_GTX_extented_min_max extension - template - < - typename T, - template class C - > - C max( - C const & x, - typename C::value_type const & y, - typename C::value_type const & z); + //< Return the maximum component-wise values of 3 inputs + //< From GLM_GTX_extented_min_max extension + template + < + typename T, + template class C + > + C max( + C const & x, + typename C::value_type const & y, + typename C::value_type const & z); - //< Return the maximum component-wise values of 3 inputs - //< From GLM_GTX_extented_min_max extension - template - < - typename T, - template class C - > - C max( - C const & x, - C const & y, - C const & z); + //< Return the maximum component-wise values of 3 inputs + //< From GLM_GTX_extented_min_max extension + template + < + typename T, + template class C + > + C max( + C const & x, + C const & y, + C const & z); - //< Return the maximum component-wise values of 4 inputs - //< From GLM_GTX_extented_min_max extension - template - T max( - T const & x, - T const & y, - T const & z, - T const & w); + //< Return the maximum component-wise values of 4 inputs + //< From GLM_GTX_extented_min_max extension + template + T max( + T const & x, + T const & y, + T const & z, + T const & w); - //< Return the maximum component-wise values of 4 inputs - //< From GLM_GTX_extented_min_max extension - template - < - typename T, - template class C - > - C max( - C const & x, - typename C::value_type const & y, - typename C::value_type const & z, - typename C::value_type const & w); + //< Return the maximum component-wise values of 4 inputs + //< From GLM_GTX_extented_min_max extension + template + < + typename T, + template class C + > + C max( + C const & x, + typename C::value_type const & y, + typename C::value_type const & z, + typename C::value_type const & w); - //< Return the maximum component-wise values of 4 inputs - //< From GLM_GTX_extented_min_max extension - template - < - typename T, - template class C - > - C max( - C const & x, - C const & y, - C const & z, - C const & w); + //< Return the maximum component-wise values of 4 inputs + //< From GLM_GTX_extented_min_max extension + template + < + typename T, + template class C + > + C max( + C const & x, + C const & y, + C const & z, + C const & w); - ///@} - - }//namespace extented_min_max - }//namespace gtx + /// @} +}//namespace extented_min_max +}//namespace gtx }//namespace glm #include "extented_min_max.inl" diff --git a/glm/gtx/fast_exponential.hpp b/glm/gtx/fast_exponential.hpp index 23894f3c..739fc5ba 100644 --- a/glm/gtx/fast_exponential.hpp +++ b/glm/gtx/fast_exponential.hpp @@ -22,59 +22,56 @@ # pragma message("GLM: GLM_GTX_fast_exponential extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace fast_exponential ///< GLM_GTX_fast_exponential extension: Fast but less accurate implementations of exponential based functions. { - namespace gtx{ - //! GLM_GTX_fast_exponential extension: Fast but less accurate implementations of exponential based functions. - namespace fast_exponential - { - using namespace gtc::half_float; - /// \addtogroup gtx_fast_exponential - ///@{ + using namespace gtc::half_float; + /// \addtogroup gtx_fast_exponential + /// @{ - //! Faster than the common pow function but less accurate. - //! From GLM_GTX_fast_exponential extension. - template - valType fastPow( - valType const & x, - valType const & y); + //! Faster than the common pow function but less accurate. + //! From GLM_GTX_fast_exponential extension. + template + valType fastPow( + valType const & x, + valType const & y); - //! Faster than the common pow function but less accurate. - //! From GLM_GTX_fast_exponential extension. - template - T fastPow( - const T& x, - const U& y); + //! Faster than the common pow function but less accurate. + //! From GLM_GTX_fast_exponential extension. + template + T fastPow( + const T& x, + const U& y); - //! Faster than the common exp function but less accurate. - //! From GLM_GTX_fast_exponential extension. - template - T fastExp(const T& x); + //! Faster than the common exp function but less accurate. + //! From GLM_GTX_fast_exponential extension. + template + T fastExp(const T& x); - //! Faster than the common log function but less accurate. - //! From GLM_GTX_fast_exponential extension. - template - T fastLog(const T& x); + //! Faster than the common log function but less accurate. + //! From GLM_GTX_fast_exponential extension. + template + T fastLog(const T& x); - //! Faster than the common exp2 function but less accurate. - //! From GLM_GTX_fast_exponential extension. - template - T fastExp2(const T& x); + //! Faster than the common exp2 function but less accurate. + //! From GLM_GTX_fast_exponential extension. + template + T fastExp2(const T& x); - //! Faster than the common log2 function but less accurate. - //! From GLM_GTX_fast_exponential extension. - template - T fastLog2(const T& x); + //! Faster than the common log2 function but less accurate. + //! From GLM_GTX_fast_exponential extension. + template + T fastLog2(const T& x); - //! Faster than the common ln function but less accurate. - //! From GLM_GTX_fast_exponential extension. - template - T fastLn(const T& x); + //! Faster than the common ln function but less accurate. + //! From GLM_GTX_fast_exponential extension. + template + T fastLn(const T& x); - ///@} - - }//namespace fast_exponential - }//namespace gtx + /// @} +}//namespace fast_exponential +}//namespace gtx }//namespace glm #include "fast_exponential.inl" diff --git a/glm/gtx/fast_square_root.hpp b/glm/gtx/fast_square_root.hpp index 1a86ca56..333ac302 100644 --- a/glm/gtx/fast_square_root.hpp +++ b/glm/gtx/fast_square_root.hpp @@ -24,45 +24,42 @@ # pragma message("GLM: GLM_GTX_fast_square_root extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace fast_square_root ///< GLM_GTX_fast_square_root extension: Fast but less accurate implementations of square root based functions. { - namespace gtx{ - //! GLM_GTX_fast_square_root extension: Fast but less accurate implementations of square root based functions. - namespace fast_square_root - { - /// \addtogroup gtx_fast_square_root - ///@{ + /// \addtogroup gtx_fast_square_root + /// @{ - //! Faster than the common sqrt function but less accurate. - //! From GLM_GTX_fast_square_root extension. - template - genType fastSqrt(genType const & x); + //! Faster than the common sqrt function but less accurate. + //! From GLM_GTX_fast_square_root extension. + template + genType fastSqrt(genType const & x); - //! Faster than the common inversesqrt function but less accurate. - //! From GLM_GTX_fast_square_root extension. - template - genType fastInverseSqrt(genType const & x); + //! Faster than the common inversesqrt function but less accurate. + //! From GLM_GTX_fast_square_root extension. + template + genType fastInverseSqrt(genType const & x); - //! Faster than the common length function but less accurate. - //! From GLM_GTX_fast_square_root extension. - template - typename genType::value_type fastLength(genType const & x); + //! Faster than the common length function but less accurate. + //! From GLM_GTX_fast_square_root extension. + template + typename genType::value_type fastLength(genType const & x); - //! Faster than the common distance function but less accurate. - //! From GLM_GTX_fast_square_root extension. - template - typename genType::value_type fastDistance(genType const & x, genType const & y); + //! Faster than the common distance function but less accurate. + //! From GLM_GTX_fast_square_root extension. + template + typename genType::value_type fastDistance(genType const & x, genType const & y); - //! Faster than the common normalize function but less accurate. - //! From GLM_GTX_fast_square_root extension. - template - genType fastNormalize(genType const & x); + //! Faster than the common normalize function but less accurate. + //! From GLM_GTX_fast_square_root extension. + template + genType fastNormalize(genType const & x); - ///@} - - }//namespace fast_square_root - }// namespace gtx -}//namespace glm + /// @} +}// namespace fast_square_root +}// namespace gtx +}// namespace glm #include "fast_square_root.inl" diff --git a/glm/gtx/fast_trigonometry.hpp b/glm/gtx/fast_trigonometry.hpp index eaa3d4bf..daa8487c 100644 --- a/glm/gtx/fast_trigonometry.hpp +++ b/glm/gtx/fast_trigonometry.hpp @@ -20,61 +20,58 @@ # pragma message("GLM: GLM_GTX_fast_trigonometry extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace fast_trigonometry ///< GLM_GTX_fast_trigonometry extension: Fast but less accurate implementations of trigonometric functions. { - namespace gtx{ - //! GLM_GTX_fast_trigonometry extension: Fast but less accurate implementations of trigonometric functions. - namespace fast_trigonometry - { - /// \addtogroup gtx_fast_trigonometry - ///@{ + /// \addtogroup gtx_fast_trigonometry + /// @{ - //! Faster than the common sin function but less accurate. - //! Defined between -2pi and 2pi. - //! From GLM_GTX_fast_trigonometry extension. - template - T fastSin(const T& angle); + //! Faster than the common sin function but less accurate. + //! Defined between -2pi and 2pi. + //! From GLM_GTX_fast_trigonometry extension. + template + T fastSin(const T& angle); - //! Faster than the common cos function but less accurate. - //! Defined between -2pi and 2pi. - //! From GLM_GTX_fast_trigonometry extension. - template - T fastCos(const T& angle); + //! Faster than the common cos function but less accurate. + //! Defined between -2pi and 2pi. + //! From GLM_GTX_fast_trigonometry extension. + template + T fastCos(const T& angle); - //! Faster than the common tan function but less accurate. - //! Defined between -2pi and 2pi. - //! From GLM_GTX_fast_trigonometry extension. - template - T fastTan(const T& angle); + //! Faster than the common tan function but less accurate. + //! Defined between -2pi and 2pi. + //! From GLM_GTX_fast_trigonometry extension. + template + T fastTan(const T& angle); - //! Faster than the common asin function but less accurate. - //! Defined between -2pi and 2pi. - //! From GLM_GTX_fast_trigonometry extension. - template - T fastAsin(const T& angle); + //! Faster than the common asin function but less accurate. + //! Defined between -2pi and 2pi. + //! From GLM_GTX_fast_trigonometry extension. + template + T fastAsin(const T& angle); - //! Faster than the common acos function but less accurate. - //! Defined between -2pi and 2pi. - //! From GLM_GTX_fast_trigonometry extension. - template - T fastAcos(const T& angle); + //! Faster than the common acos function but less accurate. + //! Defined between -2pi and 2pi. + //! From GLM_GTX_fast_trigonometry extension. + template + T fastAcos(const T& angle); - //! Faster than the common atan function but less accurate. - //! Defined between -2pi and 2pi. - //! From GLM_GTX_fast_trigonometry extension. - template - T fastAtan(const T& y, const T& x); + //! Faster than the common atan function but less accurate. + //! Defined between -2pi and 2pi. + //! From GLM_GTX_fast_trigonometry extension. + template + T fastAtan(const T& y, const T& x); - //! Faster than the common atan function but less accurate. - //! Defined between -2pi and 2pi. - //! From GLM_GTX_fast_trigonometry extension. - template - T fastAtan(const T& angle); + //! Faster than the common atan function but less accurate. + //! Defined between -2pi and 2pi. + //! From GLM_GTX_fast_trigonometry extension. + template + T fastAtan(const T& angle); - ///@} - - }//namespace fast_trigonometry - }//namespace gtx + /// @} +}//namespace fast_trigonometry +}//namespace gtx }//namespace glm #include "fast_trigonometry.inl" diff --git a/glm/gtx/gradient_paint.hpp b/glm/gtx/gradient_paint.hpp index aac89b89..ea0bd0ab 100644 --- a/glm/gtx/gradient_paint.hpp +++ b/glm/gtx/gradient_paint.hpp @@ -21,30 +21,32 @@ # pragma message("GLM: GLM_GTX_gradient_paint extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace gradient_paint ///< GLM_GTX_gradient_paint extension: Compute a radient gradient according section OpenVG 1.1 specifications, 9.3.2 Radial Gradients { - namespace gtx{ - //! GLM_GTX_gradient_paint extension: Compute a radient gradient according section OpenVG 1.1 specifications, 9.3.2 Radial Gradients - namespace gradient_paint - { - using namespace gtx::optimum_pow; + using namespace gtx::optimum_pow; - template - valType radialGradient( - glm::detail::tvec2 const & Center, - valType const & Radius, - glm::detail::tvec2 const & Focal, - glm::detail::tvec2 const & Position); + /// \addtogroup gtx_gradient_paint + /// @{ - template - valType linearGradient( - glm::detail::tvec2 const & Point0, - glm::detail::tvec2 const & Point1, - glm::detail::tvec2 const & Position); + template + valType radialGradient( + glm::detail::tvec2 const & Center, + valType const & Radius, + glm::detail::tvec2 const & Focal, + glm::detail::tvec2 const & Position); - }//namespace gradient_paint - }//namespace gtx -}//namespace glm + template + valType linearGradient( + glm::detail::tvec2 const & Point0, + glm::detail::tvec2 const & Point1, + glm::detail::tvec2 const & Position); + + /// @} +}// namespace gradient_paint +}// namespace gtx +}// namespace glm #include "gradient_paint.inl" diff --git a/glm/gtx/handed_coordinate_space.hpp b/glm/gtx/handed_coordinate_space.hpp index e159b13f..ca68bc91 100644 --- a/glm/gtx/handed_coordinate_space.hpp +++ b/glm/gtx/handed_coordinate_space.hpp @@ -20,36 +20,33 @@ # pragma message("GLM: GLM_GTX_handed_coordinate_space extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace handed_coordinate_space ///< GLM_GTX_handed_coordinate_space extension: To know if a set of three basis vectors defines a right or left-handed coordinate system. { - namespace gtx{ - //! GLM_GTX_handed_coordinate_space extension: To know if a set of three basis vectors defines a right or left-handed coordinate system. - namespace handed_coordinate_space - { - /// \addtogroup gtx_handed_coordinate_space - ///@{ + /// \addtogroup gtx_handed_coordinate_space + /// @{ - //! Return if a trihedron right handed or not. - //! From GLM_GTX_handed_coordinate_space extension. - template - bool rightHanded( - detail::tvec3 const & tangent, - detail::tvec3 const & binormal, - detail::tvec3 const & normal); + //! Return if a trihedron right handed or not. + //! From GLM_GTX_handed_coordinate_space extension. + template + bool rightHanded( + detail::tvec3 const & tangent, + detail::tvec3 const & binormal, + detail::tvec3 const & normal); - //! Return if a trihedron left handed or not. - //! From GLM_GTX_handed_coordinate_space extension. - template - bool leftHanded( - detail::tvec3 const & tangent, - detail::tvec3 const & binormal, - detail::tvec3 const & normal); + //! Return if a trihedron left handed or not. + //! From GLM_GTX_handed_coordinate_space extension. + template + bool leftHanded( + detail::tvec3 const & tangent, + detail::tvec3 const & binormal, + detail::tvec3 const & normal); - ///@} - - }//namespace handed_coordinate_space - }//namespace gtx -}//namespace glm + /// @} +}// namespace handed_coordinate_space +}// namespace gtx +}// namespace glm #include "handed_coordinate_space.inl" diff --git a/glm/gtx/inertia.hpp b/glm/gtx/inertia.hpp index 69a81d31..18a06537 100644 --- a/glm/gtx/inertia.hpp +++ b/glm/gtx/inertia.hpp @@ -20,76 +20,73 @@ # pragma message("GLM: GLM_GTX_inertia extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace inertia ///< GLM_GTX_inertia extension: Create inertia matrices { - namespace gtx{ - //! GLM_GTX_inertia extension: Create inertia matrices - namespace inertia - { - /// \addtogroup gtx_inertia - ///@{ + /// \addtogroup gtx_inertia + /// @{ - //! Build an inertia matrix for a box. - //! From GLM_GTX_inertia extension. - template - detail::tmat3x3 boxInertia3( - const T Mass, - const detail::tvec3& Scale); + //! Build an inertia matrix for a box. + //! From GLM_GTX_inertia extension. + template + detail::tmat3x3 boxInertia3( + const T Mass, + const detail::tvec3& Scale); - //! Build an inertia matrix for a box. - //! From GLM_GTX_inertia extension. - template - detail::tmat4x4 boxInertia4( - const T Mass, - const detail::tvec3& Scale); + //! Build an inertia matrix for a box. + //! From GLM_GTX_inertia extension. + template + detail::tmat4x4 boxInertia4( + const T Mass, + const detail::tvec3& Scale); - //! Build an inertia matrix for a disk. - //! From GLM_GTX_inertia extension. - template - detail::tmat3x3 diskInertia3( - const T Mass, - const T Radius); + //! Build an inertia matrix for a disk. + //! From GLM_GTX_inertia extension. + template + detail::tmat3x3 diskInertia3( + const T Mass, + const T Radius); - //! Build an inertia matrix for a disk. - //! From GLM_GTX_inertia extension. - template - detail::tmat4x4 diskInertia4( - const T Mass, - const T Radius); + //! Build an inertia matrix for a disk. + //! From GLM_GTX_inertia extension. + template + detail::tmat4x4 diskInertia4( + const T Mass, + const T Radius); - //! Build an inertia matrix for a ball. - //! From GLM_GTX_inertia extension. - template - detail::tmat3x3 ballInertia3( - const T Mass, - const T Radius); + //! Build an inertia matrix for a ball. + //! From GLM_GTX_inertia extension. + template + detail::tmat3x3 ballInertia3( + const T Mass, + const T Radius); - //! Build an inertia matrix for a ball. - //! From GLM_GTX_inertia extension. - template - detail::tmat4x4 ballInertia4( - const T Mass, - const T Radius); + //! Build an inertia matrix for a ball. + //! From GLM_GTX_inertia extension. + template + detail::tmat4x4 ballInertia4( + const T Mass, + const T Radius); - //! Build an inertia matrix for a sphere. - //! From GLM_GTX_inertia extension. - template - detail::tmat3x3 sphereInertia3( - const T Mass, - const T Radius); + //! Build an inertia matrix for a sphere. + //! From GLM_GTX_inertia extension. + template + detail::tmat3x3 sphereInertia3( + const T Mass, + const T Radius); - //! Build an inertia matrix for a sphere. - //! From GLM_GTX_inertia extension. - template - detail::tmat4x4 sphereInertia4( - const T Mass, - const T Radius); + //! Build an inertia matrix for a sphere. + //! From GLM_GTX_inertia extension. + template + detail::tmat4x4 sphereInertia4( + const T Mass, + const T Radius); - ///@} - - }//namespace inertia - }//namespace gtx -}//namespace glm + /// @} +}// namespace inertia +}// namespace gtx +}// namespace glm #include "inertia.inl" diff --git a/glm/gtx/int_10_10_10_2.hpp b/glm/gtx/int_10_10_10_2.hpp index ca1e50b4..1dddd206 100644 --- a/glm/gtx/int_10_10_10_2.hpp +++ b/glm/gtx/int_10_10_10_2.hpp @@ -21,25 +21,23 @@ # pragma message("GLM: GLM_GTX_int_10_10_10_2 extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace int_10_10_10_2 ///< GLM_GTX_int_10_10_10_2 extension: Add support for integer for core functions { - namespace gtx{ - //! GLM_GTX_int_10_10_10_2 extension: Add support for integer for core functions - namespace int_10_10_10_2 - { - using namespace gtx::raw_data; + using namespace gtx::raw_data; - /// \addtogroup gtx_int_10_10_10_2 - ///@{ + /// \addtogroup gtx_int_10_10_10_2 + ///@{ - //! From GLM_GTX_int_10_10_10_2 extension. - //! Cast a vec4 to an u_10_10_10_2. - dword uint10_10_10_2_cast(glm::vec4 const & v); + //! From GLM_GTX_int_10_10_10_2 extension. + //! Cast a vec4 to an u_10_10_10_2. + dword uint10_10_10_2_cast(glm::vec4 const & v); - ///@} + ///@} - }//namespace integer - }//namespace gtx +}//namespace integer +}//namespace gtx }//namespace glm #include "int_10_10_10_2.inl" diff --git a/glm/gtx/integer.hpp b/glm/gtx/integer.hpp index e60b936c..19651e27 100644 --- a/glm/gtx/integer.hpp +++ b/glm/gtx/integer.hpp @@ -20,36 +20,33 @@ # pragma message("GLM: GLM_GTX_integer extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace integer ///< GLM_GTX_integer extension: Add support for integer for core functions { - namespace gtx{ - //! GLM_GTX_integer extension: Add support for integer for core functions - namespace integer - { - /// \addtogroup gtx_integer - ///@{ + /// \addtogroup gtx_integer + /// @{ - //! Returns x raised to the y power. - //! From GLM_GTX_integer extension. - int pow(int x, int y); + //! Returns x raised to the y power. + //! From GLM_GTX_integer extension. + int pow(int x, int y); - //! Returns the positive square root of x. - //! From GLM_GTX_integer extension. - int sqrt(int x); + //! Returns the positive square root of x. + //! From GLM_GTX_integer extension. + int sqrt(int x); - //! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y. - //! From GLM_GTX_integer extension. - int mod(int x, int y); + //! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y. + //! From GLM_GTX_integer extension. + int mod(int x, int y); - //! Return the factorial value of a number (!12 max, integer only) - //! From GLM_GTX_integer extension. - template - genType factorial(genType const & x); + //! Return the factorial value of a number (!12 max, integer only) + //! From GLM_GTX_integer extension. + template + genType factorial(genType const & x); - ///@} - - }//namespace integer - }//namespace gtx + /// @} +}//namespace integer +}//namespace gtx }//namespace glm #include "integer.inl" diff --git a/glm/gtx/intersect.hpp b/glm/gtx/intersect.hpp index 87e0400a..3dec2988 100644 --- a/glm/gtx/intersect.hpp +++ b/glm/gtx/intersect.hpp @@ -22,50 +22,47 @@ # pragma message("GLM: GLM_GTX_closest_point extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace intersect ///< GLM_GTX_intersect extension: Add intersection functions { - namespace gtx{ - //! GLM_GTX_intersect extension: Add intersection functions - namespace intersect - { - /// \addtogroup gtx_intersect - ///@{ + /// \addtogroup gtx_intersect + /// @{ - //! Compute the intersection of a ray and a triangle. - //! From GLM_GTX_intersect extension. - template - bool intersectRayTriangle( - genType const & orig, genType const & dir, - genType const & vert0, genType const & vert1, genType const & vert2, - genType & baryPosition); + //! Compute the intersection of a ray and a triangle. + //! From GLM_GTX_intersect extension. + template + bool intersectRayTriangle( + genType const & orig, genType const & dir, + genType const & vert0, genType const & vert1, genType const & vert2, + genType & baryPosition); - //! Compute the intersection of a line and a triangle. - //! From GLM_GTX_intersect extension. - template - bool intersectLineTriangle( - genType const & orig, genType const & dir, - genType const & vert0, genType const & vert1, genType const & vert2, - genType & position); + //! Compute the intersection of a line and a triangle. + //! From GLM_GTX_intersect extension. + template + bool intersectLineTriangle( + genType const & orig, genType const & dir, + genType const & vert0, genType const & vert1, genType const & vert2, + genType & position); - //! Compute the intersection of a ray and a sphere. - //! From GLM_GTX_intersect extension. - template - bool intersectRaySphere( - genType const & orig, genType const & dir, - genType const & center, typename genType::value_type radius, - genType & position, genType & normal); + //! Compute the intersection of a ray and a sphere. + //! From GLM_GTX_intersect extension. + template + bool intersectRaySphere( + genType const & orig, genType const & dir, + genType const & center, typename genType::value_type radius, + genType & position, genType & normal); - //! Compute the intersection of a line and a sphere. - //! From GLM_GTX_intersect extension - template - bool intersectLineSphere( - genType const & point0, genType const & point1, - genType const & center, typename genType::value_type radius, - genType & position, genType & normal); + //! Compute the intersection of a line and a sphere. + //! From GLM_GTX_intersect extension + template + bool intersectLineSphere( + genType const & point0, genType const & point1, + genType const & center, typename genType::value_type radius, + genType & position, genType & normal); - ///@} - - }//namespace intersect + /// @} +}//namespace intersect }//namespace gtx }//namespace glm diff --git a/glm/gtx/log_base.hpp b/glm/gtx/log_base.hpp index 1335de41..edef8f64 100644 --- a/glm/gtx/log_base.hpp +++ b/glm/gtx/log_base.hpp @@ -20,26 +20,24 @@ # pragma message("GLM: GLM_GTX_log_base extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace log_base ///< GLM_GTX_log_base extension: Logarithm for any base. base can be a vector or a scalar. { - namespace gtx{ - //! GLM_GTX_log_base extension: Logarithm for any base. base can be a vector or a scalar. - namespace log_base - { - /// \addtogroup gtx_log_base - ///@{ + /// \addtogroup gtx_log_base + /// @{ - //! Logarithm for any base. - //! From GLM_GTX_log_base. - template - genType log( - genType const & x, - genType const & base); + //! Logarithm for any base. + //! From GLM_GTX_log_base. + template + genType log( + genType const & x, + genType const & base); - ///@} + /// @} - }//namespace extend - }//namespace gtx +}//namespace extend +}//namespace gtx }//namespace glm #include "log_base.inl" diff --git a/glm/gtx/matrix_cross_product.hpp b/glm/gtx/matrix_cross_product.hpp index 5e0bc5c4..b74b64a7 100644 --- a/glm/gtx/matrix_cross_product.hpp +++ b/glm/gtx/matrix_cross_product.hpp @@ -20,31 +20,28 @@ # pragma message("GLM: GLM_GTX_matrix_cross_product extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace matrix_cross_product ///< GLM_GTX_matrix_cross_product: Build cross product matrices { - namespace gtx{ - //! GLM_GTX_matrix_cross_product: Build cross product matrices - namespace matrix_cross_product - { - /// \addtogroup gtx_matrix_cross_product - ///@{ + /// \addtogroup gtx_matrix_cross_product + /// @{ - //! Build a cross product matrix. - //! From GLM_GTX_matrix_cross_product extension. - template - detail::tmat3x3 matrixCross3( - detail::tvec3 const & x); + //! Build a cross product matrix. + //! From GLM_GTX_matrix_cross_product extension. + template + detail::tmat3x3 matrixCross3( + detail::tvec3 const & x); - //! Build a cross product matrix. - //! From GLM_GTX_matrix_cross_product extension. - template - detail::tmat4x4 matrixCross4( - detail::tvec3 const & x); + //! Build a cross product matrix. + //! From GLM_GTX_matrix_cross_product extension. + template + detail::tmat4x4 matrixCross4( + detail::tvec3 const & x); - ///@} - - }//namespace matrix_cross_product - }//namespace gtx + /// @} +}//namespace matrix_cross_product +}//namespace gtx }//namespace glm #include "matrix_cross_product.inl" diff --git a/glm/gtx/matrix_interpolation.hpp b/glm/gtx/matrix_interpolation.hpp index 84b6450b..98c43177 100644 --- a/glm/gtx/matrix_interpolation.hpp +++ b/glm/gtx/matrix_interpolation.hpp @@ -23,43 +23,40 @@ # pragma message("GLM: GLM_GTX_matrix_interpolation extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace matrix_interpolation ///< GLM_GTX_matrix_interpolation extension: Add transformation matrices { - namespace gtx{ - //! GLM_GTX_matrix_interpolation extension: Add transformation matrices - namespace matrix_interpolation - { - /// \addtogroup gtx_matrix_interpolation - ///@{ + /// \addtogroup gtx_matrix_interpolation + /// @{ - //! Get the axis and angle of the rotation from a matrix. - //! From GLM_GTX_matrix_interpolation extension. - template - void axisAngle( - detail::tmat4x4 const & mat, - detail::tvec3 & axis, - T & angle); + //! Get the axis and angle of the rotation from a matrix. + //! From GLM_GTX_matrix_interpolation extension. + template + void axisAngle( + detail::tmat4x4 const & mat, + detail::tvec3 & axis, + T & angle); - //! Build a matrix from axis and angle. - //! From GLM_GTX_matrix_interpolation extension. - template - detail::tmat4x4 axisAngleMatrix( - detail::tvec3 const & axis, - T const angle); + //! Build a matrix from axis and angle. + //! From GLM_GTX_matrix_interpolation extension. + template + detail::tmat4x4 axisAngleMatrix( + detail::tvec3 const & axis, + T const angle); - //! Build a interpolation of 4 * 4 matrixes. - //! From GLM_GTX_matrix_interpolation extension. - //! Warning! works only with rotation and/or translation matrixes, scale will generate unexpected results. - template - detail::tmat4x4 interpolate( - detail::tmat4x4 const & m1, - detail::tmat4x4 const & m2, - T const delta); + //! Build a interpolation of 4 * 4 matrixes. + //! From GLM_GTX_matrix_interpolation extension. + //! Warning! works only with rotation and/or translation matrixes, scale will generate unexpected results. + template + detail::tmat4x4 interpolate( + detail::tmat4x4 const & m1, + detail::tmat4x4 const & m2, + T const delta); - ///@} - - }//namespace matrix_interpolation - }//namespace gtx + /// @} +}//namespace matrix_interpolation +}//namespace gtx }//namespace glm #include "matrix_interpolation.inl" diff --git a/glm/gtx/matrix_major_storage.hpp b/glm/gtx/matrix_major_storage.hpp index 9746e771..751aac80 100644 --- a/glm/gtx/matrix_major_storage.hpp +++ b/glm/gtx/matrix_major_storage.hpp @@ -20,103 +20,100 @@ # pragma message("GLM: GLM_GTX_matrix_major_storage extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace matrix_major_storage ///< GLM_GTX_matrix_major_storage: Build matrices with specific matrix order, row or column { - namespace gtx{ - //! GLM_GTX_matrix_major_storage: Build matrices with specific matrix order, row or column - namespace matrix_major_storage - { - /// \addtogroup gtx_matrix_major_storage - ///@{ + /// \addtogroup gtx_matrix_major_storage + /// @{ - //! Build a row major matrix from row vectors. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat2x2 rowMajor2( - const detail::tvec2& v1, - const detail::tvec2& v2); + //! Build a row major matrix from row vectors. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat2x2 rowMajor2( + const detail::tvec2& v1, + const detail::tvec2& v2); - //! Build a row major matrix from other matrix. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat2x2 rowMajor2( - const detail::tmat2x2& m); + //! Build a row major matrix from other matrix. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat2x2 rowMajor2( + const detail::tmat2x2& m); - //! Build a row major matrix from row vectors. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat3x3 rowMajor3( - const detail::tvec3& v1, - const detail::tvec3& v2, - const detail::tvec3& v3); + //! Build a row major matrix from row vectors. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat3x3 rowMajor3( + const detail::tvec3& v1, + const detail::tvec3& v2, + const detail::tvec3& v3); - //! Build a row major matrix from other matrix. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat3x3 rowMajor3( - const detail::tmat3x3& m); + //! Build a row major matrix from other matrix. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat3x3 rowMajor3( + const detail::tmat3x3& m); - //! Build a row major matrix from row vectors. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat4x4 rowMajor4( - const detail::tvec4& v1, - const detail::tvec4& v2, - const detail::tvec4& v3, - const detail::tvec4& v4); + //! Build a row major matrix from row vectors. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat4x4 rowMajor4( + const detail::tvec4& v1, + const detail::tvec4& v2, + const detail::tvec4& v3, + const detail::tvec4& v4); - //! Build a row major matrix from other matrix. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat4x4 rowMajor4( - const detail::tmat4x4& m); + //! Build a row major matrix from other matrix. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat4x4 rowMajor4( + const detail::tmat4x4& m); - //! Build a column major matrix from column vectors. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat2x2 colMajor2( - const detail::tvec2& v1, - const detail::tvec2& v2); + //! Build a column major matrix from column vectors. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat2x2 colMajor2( + const detail::tvec2& v1, + const detail::tvec2& v2); - //! Build a column major matrix from other matrix. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat2x2 colMajor2( - const detail::tmat2x2& m); + //! Build a column major matrix from other matrix. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat2x2 colMajor2( + const detail::tmat2x2& m); - //! Build a column major matrix from column vectors. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat3x3 colMajor3( - const detail::tvec3& v1, - const detail::tvec3& v2, - const detail::tvec3& v3); + //! Build a column major matrix from column vectors. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat3x3 colMajor3( + const detail::tvec3& v1, + const detail::tvec3& v2, + const detail::tvec3& v3); - //! Build a column major matrix from other matrix. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat3x3 colMajor3( - const detail::tmat3x3& m); + //! Build a column major matrix from other matrix. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat3x3 colMajor3( + const detail::tmat3x3& m); - //! Build a column major matrix from column vectors. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat4x4 colMajor4( - const detail::tvec4& v1, - const detail::tvec4& v2, - const detail::tvec4& v3, - const detail::tvec4& v4); + //! Build a column major matrix from column vectors. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat4x4 colMajor4( + const detail::tvec4& v1, + const detail::tvec4& v2, + const detail::tvec4& v3, + const detail::tvec4& v4); - //! Build a column major matrix from other matrix. - //! From GLM_GTX_matrix_major_storage extension. - template - detail::tmat4x4 colMajor4( - const detail::tmat4x4& m); + //! Build a column major matrix from other matrix. + //! From GLM_GTX_matrix_major_storage extension. + template + detail::tmat4x4 colMajor4( + const detail::tmat4x4& m); - ///@} - - }//namespace matrix_major_storage - }//namespace gtx + /// @} +}//namespace matrix_major_storage +}//namespace gtx }//namespace glm #include "matrix_major_storage.inl" diff --git a/glm/gtx/matrix_operation.hpp b/glm/gtx/matrix_operation.hpp index 57b8c3d8..3cf2cff0 100644 --- a/glm/gtx/matrix_operation.hpp +++ b/glm/gtx/matrix_operation.hpp @@ -20,73 +20,70 @@ # pragma message("GLM: GLM_GTX_matrix_operation extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace matrix_operation ///< GLM_GTX_matrix_operation: Build diagonal matrices { - namespace gtx{ - //! GLM_GTX_matrix_operation: Build diagonal matrices - namespace matrix_operation - { - /// \addtogroup gtx_matrix_operation - ///@{ + /// \addtogroup gtx_matrix_operation + /// @{ - //! Build a diagonal matrix. - //! From GLM_GTX_matrix_operation extension. - template - detail::tmat2x2 diagonal2x2( - detail::tvec2 const & v); + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat2x2 diagonal2x2( + detail::tvec2 const & v); - //! Build a diagonal matrix. - //! From GLM_GTX_matrix_operation extension. - template - detail::tmat2x3 diagonal2x3( - detail::tvec2 const & v); + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat2x3 diagonal2x3( + detail::tvec2 const & v); - //! Build a diagonal matrix. - //! From GLM_GTX_matrix_operation extension. - template - detail::tmat2x4 diagonal2x4( - detail::tvec2 const & v); + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat2x4 diagonal2x4( + detail::tvec2 const & v); - //! Build a diagonal matrix. - //! From GLM_GTX_matrix_operation extension. - template - detail::tmat3x2 diagonal3x2( - detail::tvec2 const & v); + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat3x2 diagonal3x2( + detail::tvec2 const & v); - //! Build a diagonal matrix. - //! From GLM_GTX_matrix_operation extension. - template - detail::tmat3x3 diagonal3x3( - detail::tvec3 const & v); + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat3x3 diagonal3x3( + detail::tvec3 const & v); - //! Build a diagonal matrix. - //! From GLM_GTX_matrix_operation extension. - template - detail::tmat3x4 diagonal3x4( - detail::tvec3 const & v); + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat3x4 diagonal3x4( + detail::tvec3 const & v); - //! Build a diagonal matrix. - //! From GLM_GTX_matrix_operation extension. - template - detail::tmat4x2 diagonal4x2( - detail::tvec2 const & v); + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat4x2 diagonal4x2( + detail::tvec2 const & v); - //! Build a diagonal matrix. - //! From GLM_GTX_matrix_operation extension. - template - detail::tmat4x3 diagonal4x3( - detail::tvec3 const & v); + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat4x3 diagonal4x3( + detail::tvec3 const & v); - //! Build a diagonal matrix. - //! From GLM_GTX_matrix_operation extension. - template - detail::tmat4x4 diagonal4x4( - detail::tvec4 const & v); + //! Build a diagonal matrix. + //! From GLM_GTX_matrix_operation extension. + template + detail::tmat4x4 diagonal4x4( + detail::tvec4 const & v); - ///@} - - }//namespace matrix_operation - }//namespace gtx + /// @} +}//namespace matrix_operation +}//namespace gtx }//namespace glm #include "matrix_operation.inl" diff --git a/glm/gtx/matrix_query.hpp b/glm/gtx/matrix_query.hpp index 5db3f0e1..b71b1af0 100644 --- a/glm/gtx/matrix_query.hpp +++ b/glm/gtx/matrix_query.hpp @@ -20,74 +20,72 @@ # pragma message("GLM: GLM_GTX_matrix_query extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace matrix_query ///< GLM_GTX_matrix_query: Query to evaluate matrix properties { - namespace gtx{ - //! GLM_GTX_matrix_query: Query to evaluate matrix properties - namespace matrix_query - { - /// \addtogroup gtx_matrix_query - ///@{ + /// \addtogroup gtx_matrix_query + /// @{ - //! Return if a matrix a null matrix. - //! From GLM_GTX_matrix_query extension. - template - bool isNull( - const detail::tmat2x2& m, - const T epsilon = std::numeric_limits::epsilon()); + //! Return if a matrix a null matrix. + //! From GLM_GTX_matrix_query extension. + template + bool isNull( + const detail::tmat2x2& m, + const T epsilon = std::numeric_limits::epsilon()); - //! Return if a matrix a null matrix. - //! From GLM_GTX_matrix_query extension. - template - bool isNull( - const detail::tmat3x3& m, - const T epsilon = std::numeric_limits::epsilon()); + //! Return if a matrix a null matrix. + //! From GLM_GTX_matrix_query extension. + template + bool isNull( + const detail::tmat3x3& m, + const T epsilon = std::numeric_limits::epsilon()); - //! Return if a matrix a null matrix. - //! From GLM_GTX_matrix_query extension. - template - bool isNull( - const detail::tmat4x4& m, - const T epsilon = std::numeric_limits::epsilon()); + //! Return if a matrix a null matrix. + //! From GLM_GTX_matrix_query extension. + template + bool isNull( + const detail::tmat4x4& m, + const T epsilon = std::numeric_limits::epsilon()); - //! Return if a matrix an identity matrix. - //! From GLM_GTX_matrix_query extension. - template - bool isIdentity( - const genType& m, - const typename genType::value_type epsilon = std::numeric_limits::epsilon()); + //! Return if a matrix an identity matrix. + //! From GLM_GTX_matrix_query extension. + template + bool isIdentity( + const genType& m, + const typename genType::value_type epsilon = std::numeric_limits::epsilon()); - //! Return if a matrix a normalized matrix. - //! From GLM_GTX_matrix_query extension. - template - bool isNormalized( - const detail::tmat2x2& m, - const T epsilon = std::numeric_limits::epsilon()); + //! Return if a matrix a normalized matrix. + //! From GLM_GTX_matrix_query extension. + template + bool isNormalized( + const detail::tmat2x2& m, + const T epsilon = std::numeric_limits::epsilon()); - //! Return if a matrix a normalized matrix. - //! From GLM_GTX_matrix_query extension. - template - bool isNormalized( - const detail::tmat3x3& m, - const T epsilon = std::numeric_limits::epsilon()); + //! Return if a matrix a normalized matrix. + //! From GLM_GTX_matrix_query extension. + template + bool isNormalized( + const detail::tmat3x3& m, + const T epsilon = std::numeric_limits::epsilon()); - //! Return if a matrix a normalized matrix. - //! From GLM_GTX_matrix_query extension. - template - bool isNormalized( - const detail::tmat4x4& m, - const T epsilon = std::numeric_limits::epsilon()); + //! Return if a matrix a normalized matrix. + //! From GLM_GTX_matrix_query extension. + template + bool isNormalized( + const detail::tmat4x4& m, + const T epsilon = std::numeric_limits::epsilon()); - //! Return if a matrix an orthonormalized matrix. - //! From GLM_GTX_matrix_query extension. - template - bool isOrthogonal( - const genType& m, - const typename genType::value_type epsilon = std::numeric_limits::epsilon()); + //! Return if a matrix an orthonormalized matrix. + //! From GLM_GTX_matrix_query extension. + template + bool isOrthogonal( + const genType& m, + const typename genType::value_type epsilon = std::numeric_limits::epsilon()); - ///@} - }//namespace matrix_query - }//namespace gtx + /// @} +}//namespace matrix_query +}//namespace gtx }//namespace glm #include "matrix_query.inl" diff --git a/glm/gtx/mixed_product.hpp b/glm/gtx/mixed_product.hpp index 2701017a..5ce5430f 100644 --- a/glm/gtx/mixed_product.hpp +++ b/glm/gtx/mixed_product.hpp @@ -20,26 +20,24 @@ # pragma message("GLM: GLM_GTX_mixed_product extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace mixed_product ///< GLM_GTX_mixed_product extension: Mixed product of 3 vectors. { - namespace gtx{ - //! GLM_GTX_mixed_product extension: Mixed product of 3 vectors. - namespace mixed_product - { - /// \addtogroup gtx_mixed_product - ///@{ + /// \addtogroup gtx_mixed_product + /// @{ - //! \brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension) - template - valType mixedProduct( - detail::tvec3 const & v1, - detail::tvec3 const & v2, - detail::tvec3 const & v3); + //! \brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension) + template + valType mixedProduct( + detail::tvec3 const & v1, + detail::tvec3 const & v2, + detail::tvec3 const & v3); - ///@} - }//namespace mixed_product - }//namespace gtx -}//namespace glm + /// @} +}// namespace mixed_product +}// namespace gtx +}// namespace glm #include "mixed_product.inl" diff --git a/glm/gtx/multiple.hpp b/glm/gtx/multiple.hpp index 6c823d3d..189320c9 100644 --- a/glm/gtx/multiple.hpp +++ b/glm/gtx/multiple.hpp @@ -20,33 +20,30 @@ # pragma message("GLM: GLM_GTX_multiple extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace multiple ///< GLM_GTX_multiple: Find the closest number of a number multiple of other number. { - namespace gtx{ - //! GLM_GTX_multiple: Find the closest number of a number multiple of other number. - namespace multiple - { - /// \addtogroup gtx_multiple - ///@{ + /// \addtogroup gtx_multiple + /// @{ - //! Higher Multiple number of Source. - //! From GLM_GTX_multiple extension. - template - genType higherMultiple( - genType const & Source, - genType const & Multiple); + //! Higher Multiple number of Source. + //! From GLM_GTX_multiple extension. + template + genType higherMultiple( + genType const & Source, + genType const & Multiple); - //! Lower Multiple number of Source. - //! From GLM_GTX_multiple extension. - template - genType lowerMultiple( - genType const & Source, - genType const & Multiple); + //! Lower Multiple number of Source. + //! From GLM_GTX_multiple extension. + template + genType lowerMultiple( + genType const & Source, + genType const & Multiple); - ///@} - - }//namespace multiple - }//namespace gtx + /// @} +}//namespace multiple +}//namespace gtx }//namespace glm #include "multiple.inl" diff --git a/glm/gtx/noise.hpp b/glm/gtx/noise.hpp index 30552c20..735791d4 100644 --- a/glm/gtx/noise.hpp +++ b/glm/gtx/noise.hpp @@ -25,38 +25,35 @@ # pragma message("GLM: GLM_GTX_noise extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace noise ///< GLM_GTX_noise extension: Comparison functions for a user defined epsilon values. { - namespace gtx{ - //! GLM_GTX_noise extension: Comparison functions for a user defined epsilon values. - namespace noise - { - /// \addtogroup gtx_noise - ///@{ + /// \addtogroup gtx_noise + /// @{ - //! Classic perlin noise. - //! From GLM_GTX_noise extension. - template class vecType> - T perlin( - vecType const & p); + //! Classic perlin noise. + //! From GLM_GTX_noise extension. + template class vecType> + T perlin( + vecType const & p); - //! Periodic perlin noise. - //! From GLM_GTX_noise extension. - template class vecType> - T perlin( - vecType const & p, - vecType const & rep); + //! Periodic perlin noise. + //! From GLM_GTX_noise extension. + template class vecType> + T perlin( + vecType const & p, + vecType const & rep); - //! Simplex noise. - //! From GLM_GTX_noise extension. - template class vecType> - T simplex( - vecType const & p); + //! Simplex noise. + //! From GLM_GTX_noise extension. + template class vecType> + T simplex( + vecType const & p); - ///@} - - }//namespace noise - }//namespace gtx + /// @} +}//namespace noise +}//namespace gtx }//namespace glm #include "noise.inl" diff --git a/glm/gtx/norm.hpp b/glm/gtx/norm.hpp index 272c18dd..34c2e985 100644 --- a/glm/gtx/norm.hpp +++ b/glm/gtx/norm.hpp @@ -25,118 +25,115 @@ # pragma message("GLM: GLM_GTX_norm extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace norm ///< GLM_GTX_norm extension: Various way to compute vector norms. { - namespace gtx{ - //! GLM_GTX_norm extension: Various way to compute vector norms. - namespace norm - { - /// \addtogroup gtx_norm - ///@{ + /// \addtogroup gtx_norm + /// @{ - //! Returns the squared length of x. - //! From GLM_GTX_norm extension. - template - T length2( - const T x); + //! Returns the squared length of x. + //! From GLM_GTX_norm extension. + template + T length2( + const T x); - //! Returns the squared length of x. - //! From GLM_GTX_norm extension. - template - T length2( - const detail::tvec2 & x); + //! Returns the squared length of x. + //! From GLM_GTX_norm extension. + template + T length2( + const detail::tvec2 & x); - //! Returns the squared length of x. - //! From GLM_GTX_norm extension. - template - T length2( - const detail::tvec3& x); + //! Returns the squared length of x. + //! From GLM_GTX_norm extension. + template + T length2( + const detail::tvec3& x); - //! Returns the squared length of x. - //! From GLM_GTX_norm extension. - template - T length2( - const detail::tvec4& x); + //! Returns the squared length of x. + //! From GLM_GTX_norm extension. + template + T length2( + const detail::tvec4& x); - //! Returns the squared length of x. - //! From GLM_GTX_norm extension. - template - T length2( - const detail::tquat& q); + //! Returns the squared length of x. + //! From GLM_GTX_norm extension. + template + T length2( + const detail::tquat& q); - //! Returns the squared distance between p0 and p1, i.e., length(p0 - p1). - //! From GLM_GTX_norm extension. - template - T distance2( - const T p0, - const T p1); + //! Returns the squared distance between p0 and p1, i.e., length(p0 - p1). + //! From GLM_GTX_norm extension. + template + T distance2( + const T p0, + const T p1); - //! Returns the squared distance between p0 and p1, i.e., length(p0 - p1). - //! From GLM_GTX_norm extension. - template - T distance2( - const detail::tvec2& p0, - const detail::tvec2& p1); + //! Returns the squared distance between p0 and p1, i.e., length(p0 - p1). + //! From GLM_GTX_norm extension. + template + T distance2( + const detail::tvec2& p0, + const detail::tvec2& p1); - //! Returns the squared distance between p0 and p1, i.e., length(p0 - p1). - //! From GLM_GTX_norm extension. - template - T distance2( - const detail::tvec3& p0, - const detail::tvec3& p1); + //! Returns the squared distance between p0 and p1, i.e., length(p0 - p1). + //! From GLM_GTX_norm extension. + template + T distance2( + const detail::tvec3& p0, + const detail::tvec3& p1); - //! Returns the squared distance between p0 and p1, i.e., length(p0 - p1). - //! From GLM_GTX_norm extension. - template - T distance2( - const detail::tvec4& p0, - const detail::tvec4& p1); + //! Returns the squared distance between p0 and p1, i.e., length(p0 - p1). + //! From GLM_GTX_norm extension. + template + T distance2( + const detail::tvec4& p0, + const detail::tvec4& p1); - //! Returns the L1 norm between x and y. - //! From GLM_GTX_norm extension. - template - T l1Norm( - const detail::tvec3& x, - const detail::tvec3& y); + //! Returns the L1 norm between x and y. + //! From GLM_GTX_norm extension. + template + T l1Norm( + const detail::tvec3& x, + const detail::tvec3& y); - //! Returns the L1 norm of v. - //! From GLM_GTX_norm extension. - template - T l1Norm( - const detail::tvec3& v); + //! Returns the L1 norm of v. + //! From GLM_GTX_norm extension. + template + T l1Norm( + const detail::tvec3& v); - //! Returns the L2 norm between x and y. - //! From GLM_GTX_norm extension. - template - T l2Norm( - const detail::tvec3& x, - const detail::tvec3& y); + //! Returns the L2 norm between x and y. + //! From GLM_GTX_norm extension. + template + T l2Norm( + const detail::tvec3& x, + const detail::tvec3& y); - //! Returns the L2 norm of v. - //! From GLM_GTX_norm extension. - template - T l2Norm( - const detail::tvec3& x); + //! Returns the L2 norm of v. + //! From GLM_GTX_norm extension. + template + T l2Norm( + const detail::tvec3& x); - //! Returns the L norm between x and y. - //! From GLM_GTX_norm extension. - template - T lxNorm( - const detail::tvec3& x, - const detail::tvec3& y, - unsigned int Depth); + //! Returns the L norm between x and y. + //! From GLM_GTX_norm extension. + template + T lxNorm( + const detail::tvec3& x, + const detail::tvec3& y, + unsigned int Depth); - //! Returns the L norm of v. - //! From GLM_GTX_norm extension. - template - T lxNorm( - const detail::tvec3& x, - unsigned int Depth); + //! Returns the L norm of v. + //! From GLM_GTX_norm extension. + template + T lxNorm( + const detail::tvec3& x, + unsigned int Depth); - ///@} - - }//namespace norm - }//namespace gtx + /// @} +}//namespace norm +}//namespace gtx }//namespace glm #include "norm.inl" diff --git a/glm/gtx/normal.hpp b/glm/gtx/normal.hpp index 068d61a8..9d598e92 100644 --- a/glm/gtx/normal.hpp +++ b/glm/gtx/normal.hpp @@ -20,27 +20,24 @@ # pragma message("GLM: GLM_GTX_normal extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace normal ///< GLM_GTX_normal extension: Compute the normal of a triangle. { - namespace gtx{ - //! GLM_GTX_normal extension: Compute the normal of a triangle. - namespace normal - { - /// \addtogroup gtx_normal - ///@{ + /// \addtogroup gtx_normal + /// @{ - //! Computes triangle normal from triangle points. - //! From GLM_GTX_normal extension. - template - detail::tvec3 triangleNormal( - detail::tvec3 const & p1, - detail::tvec3 const & p2, - detail::tvec3 const & p3); + //! Computes triangle normal from triangle points. + //! From GLM_GTX_normal extension. + template + detail::tvec3 triangleNormal( + detail::tvec3 const & p1, + detail::tvec3 const & p2, + detail::tvec3 const & p3); - ///@} - - }//namespace normal - }//namespace gtx + /// @} +}//namespace normal +}//namespace gtx }//namespace glm #include "normal.inl" diff --git a/glm/gtx/normalize_dot.hpp b/glm/gtx/normalize_dot.hpp index 4f519698..df83eec4 100644 --- a/glm/gtx/normalize_dot.hpp +++ b/glm/gtx/normalize_dot.hpp @@ -22,37 +22,34 @@ # pragma message("GLM: GLM_GTX_normalize_dot extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace normalize_dot ///< GLM_GTX_normalize_dot extension: Dot product of vectors that need to be normalize with a single square root. { - namespace gtx{ - //! GLM_GTX_normalize_dot extension: Dot product of vectors that need to be normalize with a single square root. - namespace normalize_dot - { - using namespace gtx::fast_square_root; + using namespace gtx::fast_square_root; - /// \addtogroup gtx_normalize_dot - ///@{ + /// \addtogroup gtx_normalize_dot + /// @{ - //! Normalize parameters and returns the dot product of x and y. - //! It's faster that dot(normalize(x), normalize(y)). - //! From GLM_GTX_normalize_dot extension. - template - typename genType::value_type normalizeDot( - genType const & x, - genType const & y); + //! Normalize parameters and returns the dot product of x and y. + //! It's faster that dot(normalize(x), normalize(y)). + //! From GLM_GTX_normalize_dot extension. + template + typename genType::value_type normalizeDot( + genType const & x, + genType const & y); - //! Normalize parameters and returns the dot product of x and y. - //! Faster that dot(fastNormalize(x), fastNormalize(y)). - //! From GLM_GTX_normalize_dot extension. - template - typename genType::value_type fastNormalizeDot( - genType const & x, - genType const & y); + //! Normalize parameters and returns the dot product of x and y. + //! Faster that dot(fastNormalize(x), fastNormalize(y)). + //! From GLM_GTX_normalize_dot extension. + template + typename genType::value_type fastNormalizeDot( + genType const & x, + genType const & y); - ///@} - - }//namespace normalize_dot - }//namespace gtx + /// @} +}//namespace normalize_dot +}//namespace gtx }//namespace glm #include "normalize_dot.inl" diff --git a/glm/gtx/number_precision.hpp b/glm/gtx/number_precision.hpp index 4a4b68cb..7a086ce2 100644 --- a/glm/gtx/number_precision.hpp +++ b/glm/gtx/number_precision.hpp @@ -25,8 +25,7 @@ namespace glm{ namespace gtx{ -//! GLM_GTX_number_precision extension: Defined size types. -namespace number_precision +namespace number_precision ///< GLM_GTX_number_precision extension: Defined size types. { using namespace gtc::type_precision; @@ -34,7 +33,7 @@ namespace number_precision // Unsigned int vector types /// \addtogroup gtx_number_precision - ///@{ + /// @{ typedef u8 u8vec1; //!< \brief 8bit unsigned integer scalar. (from GLM_GTX_number_precision extension) typedef u16 u16vec1; //!< \brief 16bit unsigned integer scalar. (from GLM_GTX_number_precision extension) @@ -58,7 +57,7 @@ namespace number_precision typedef f64 f64mat1; //!< \brief Double-precision floating-point scalar. (from GLM_GTX_number_precision extension) typedef f64 f64mat1x1; //!< \brief Double-precision floating-point scalar. (from GLM_GTX_number_precision extension) - ///@} + /// @} }//namespace number_precision }//namespace gtx }//namespace glm diff --git a/glm/gtx/ocl_type.hpp b/glm/gtx/ocl_type.hpp index 8ab15952..bc1bf90f 100644 --- a/glm/gtx/ocl_type.hpp +++ b/glm/gtx/ocl_type.hpp @@ -22,14 +22,13 @@ namespace glm{ namespace gtx{ -//! GLM_GTX_ocl_type extension: OpenCL types. -namespace ocl_type +namespace ocl_type ///< GLM_GTX_ocl_type extension: OpenCL types. { /////////////////////////// // Scalar types /// \addtogroup gtx_ocl_type - ///@{ + /// @{ typedef detail::int8 cl_char; //!< \brief 8bit signed integer. (from GLM_GTX_ocl_type extension) typedef detail::int16 cl_short; //!< \brief 16bit signed integer. (from GLM_GTX_ocl_type extension) @@ -99,8 +98,7 @@ namespace ocl_type //typedef detail::tvec4 cl_half4; //!< \brief Half-precision floating-point scalar. (from GLM_GTX_ocl_type extension) typedef detail::tvec4 cl_float4; //!< \brief Single-precision floating-point scalar. (from GLM_GTX_ocl_type extension) - ///@} - + /// @} }//namespace ocl_type }//namespace gtx }//namespace glm diff --git a/glm/gtx/optimum_pow.hpp b/glm/gtx/optimum_pow.hpp index 36512786..05ad4263 100644 --- a/glm/gtx/optimum_pow.hpp +++ b/glm/gtx/optimum_pow.hpp @@ -20,50 +20,47 @@ # pragma message("GLM: GLM_GTX_optimum_pow extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace optimum_pow ///< GLM_GTX_optimum_pow extension: Integer exponentiation of power functions. { - namespace gtx{ - //! GLM_GTX_optimum_pow extension: Integer exponentiation of power functions. - namespace optimum_pow - { - /// \addtogroup gtx_optimum_pow - ///@{ + /// \addtogroup gtx_optimum_pow + /// @{ - //! Returns x raised to the power of 2. - //! From GLM_GTX_optimum_pow extension. - template - genType pow2(const genType& x); + //! Returns x raised to the power of 2. + //! From GLM_GTX_optimum_pow extension. + template + genType pow2(const genType& x); - //! Returns x raised to the power of 3. - //! From GLM_GTX_optimum_pow extension. - template - genType pow3(const genType& x); + //! Returns x raised to the power of 3. + //! From GLM_GTX_optimum_pow extension. + template + genType pow3(const genType& x); - //! Returns x raised to the power of 4. - //! From GLM_GTX_optimum_pow extension. - template - genType pow4(const genType& x); + //! Returns x raised to the power of 4. + //! From GLM_GTX_optimum_pow extension. + template + genType pow4(const genType& x); - //! Checks if the parameter is a power of 2 number. - //! From GLM_GTX_optimum_pow extension. - bool powOfTwo(int num); + //! Checks if the parameter is a power of 2 number. + //! From GLM_GTX_optimum_pow extension. + bool powOfTwo(int num); - //! Checks to determine if the parameter component are power of 2 numbers. - //! From GLM_GTX_optimum_pow extension. - detail::tvec2 powOfTwo(const detail::tvec2& x); + //! Checks to determine if the parameter component are power of 2 numbers. + //! From GLM_GTX_optimum_pow extension. + detail::tvec2 powOfTwo(const detail::tvec2& x); - //! Checks to determine if the parameter component are power of 2 numbers. - //! From GLM_GTX_optimum_pow extension. - detail::tvec3 powOfTwo(const detail::tvec3& x); + //! Checks to determine if the parameter component are power of 2 numbers. + //! From GLM_GTX_optimum_pow extension. + detail::tvec3 powOfTwo(const detail::tvec3& x); - //! Checks to determine if the parameter component are power of 2 numbers. - //! From GLM_GTX_optimum_pow extension. - detail::tvec4 powOfTwo(const detail::tvec4& x); + //! Checks to determine if the parameter component are power of 2 numbers. + //! From GLM_GTX_optimum_pow extension. + detail::tvec4 powOfTwo(const detail::tvec4& x); - ///@} - - }//namespace optimum_pow - }//namespace gtx + /// @} +}//namespace optimum_pow +}//namespace gtx }//namespace glm #include "optimum_pow.inl" diff --git a/glm/gtx/orthonormalize.hpp b/glm/gtx/orthonormalize.hpp index 9490efc3..38049bac 100644 --- a/glm/gtx/orthonormalize.hpp +++ b/glm/gtx/orthonormalize.hpp @@ -20,32 +20,29 @@ # pragma message("GLM: GLM_GTX_orthonormalize extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace orthonormalize ///< GLM_GTX_orthonormalize extension: Orthonormalize matrices. { - namespace gtx{ - //! GLM_GTX_orthonormalize extension: Orthonormalize matrices. - namespace orthonormalize - { - /// \addtogroup gtx_orthonormalize - ///@{ + /// \addtogroup gtx_orthonormalize + /// @{ - //! Returns the orthonormalized matrix of m. - //! From GLM_GTX_orthonormalize extension. - template - detail::tmat3x3 orthonormalize( - const detail::tmat3x3& m); + //! Returns the orthonormalized matrix of m. + //! From GLM_GTX_orthonormalize extension. + template + detail::tmat3x3 orthonormalize( + const detail::tmat3x3& m); - //! Orthonormalizes x according y. - //! From GLM_GTX_orthonormalize extension. - template - detail::tvec3 orthonormalize( - const detail::tvec3& x, - const detail::tvec3& y); + //! Orthonormalizes x according y. + //! From GLM_GTX_orthonormalize extension. + template + detail::tvec3 orthonormalize( + const detail::tvec3& x, + const detail::tvec3& y); - ///@} - - }//namespace orthonormalize - }//namespace gtx + /// @} +}//namespace orthonormalize +}//namespace gtx }//namespace glm #include "orthonormalize.inl" diff --git a/glm/gtx/perpendicular.hpp b/glm/gtx/perpendicular.hpp index 93c6e82c..a4d16bfb 100644 --- a/glm/gtx/perpendicular.hpp +++ b/glm/gtx/perpendicular.hpp @@ -22,41 +22,37 @@ # pragma message("GLM: GLM_GTX_perpendicular extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace perpendicular ///< GLM_GTX_perpendicular extension: Perpendicular of a vector from other one { - namespace gtx{ - //! GLM_GTX_perpendicular extension: Perpendicular of a vector from other one - namespace perpendicular - { - /// \addtogroup gtx_perpendicular - ///@{ + /// \addtogroup gtx_perpendicular + /// @{ - //! Projects x a perpendicular axis of Normal. - //! From GLM_GTX_perpendicular extension. - template - detail::tvec2 perp( - detail::tvec2 const & x, - detail::tvec2 const & Normal); + //! Projects x a perpendicular axis of Normal. + //! From GLM_GTX_perpendicular extension. + template + detail::tvec2 perp( + detail::tvec2 const & x, + detail::tvec2 const & Normal); - //! Projects x a perpendicular axis of Normal. - //! From GLM_GTX_perpendicular extension. - template - detail::tvec3 perp( - detail::tvec3 const & x, - detail::tvec3 const & Normal); + //! Projects x a perpendicular axis of Normal. + //! From GLM_GTX_perpendicular extension. + template + detail::tvec3 perp( + detail::tvec3 const & x, + detail::tvec3 const & Normal); - //! Projects x a perpendicular axis of Normal. - //! From GLM_GTX_perpendicular extension. - template - detail::tvec4 perp( - detail::tvec4 const & x, - detail::tvec4 const & Normal); + //! Projects x a perpendicular axis of Normal. + //! From GLM_GTX_perpendicular extension. + template + detail::tvec4 perp( + detail::tvec4 const & x, + detail::tvec4 const & Normal); - - ///@} - - }//namespace perpendicular - }//namespace gtx + /// @} +}//namespace perpendicular +}//namespace gtx }//namespace glm #include "perpendicular.inl" diff --git a/glm/gtx/polar_coordinates.hpp b/glm/gtx/polar_coordinates.hpp index 2387ce66..f4d5bf75 100644 --- a/glm/gtx/polar_coordinates.hpp +++ b/glm/gtx/polar_coordinates.hpp @@ -20,29 +20,26 @@ # pragma message("GLM: GLM_GTX_polar_coordinates extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace polar_coordinates ///< GLM_GTX_polar_coordinates extension: Conversion from Euclidean space to polar space and revert. { - namespace gtx{ - //! GLM_GTX_polar_coordinates extension: Conversion from Euclidean space to polar space and revert. - namespace polar_coordinates - { - /// \addtogroup gtx_polar_coordinates - ///@{ + /// \addtogroup gtx_polar_coordinates + /// @{ - //! Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude. - //! From GLM_GTX_polar_coordinates extension. - template - detail::tvec3 polar(const detail::tvec3& euclidean); + //! Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude. + //! From GLM_GTX_polar_coordinates extension. + template + detail::tvec3 polar(const detail::tvec3& euclidean); - //! Convert Polar to Euclidean coordinates. - //! From GLM_GTX_polar_coordinates extension. - template - detail::tvec3 euclidean(const detail::tvec3& polar); + //! Convert Polar to Euclidean coordinates. + //! From GLM_GTX_polar_coordinates extension. + template + detail::tvec3 euclidean(const detail::tvec3& polar); - ///@} - - }//namespace polar_coordinates - }//namespace gtx + /// @} +}//namespace polar_coordinates +}//namespace gtx }//namespace glm #include "polar_coordinates.inl" diff --git a/glm/gtx/projection.hpp b/glm/gtx/projection.hpp index a92ca3b5..47e8eb66 100644 --- a/glm/gtx/projection.hpp +++ b/glm/gtx/projection.hpp @@ -20,40 +20,37 @@ # pragma message("GLM: GLM_GTX_projection extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace projection ///< GLM_GTX_projection extension: Projection of a vector to other one { - namespace gtx{ - //! GLM_GTX_projection extension: Projection of a vector to other one - namespace projection - { - /// \addtogroup gtx_projection - ///@{ + /// \addtogroup gtx_projection + /// @{ - //! Projects x on Normal. - //! From GLM_GTX_projection extension. - template - detail::tvec2 proj( - detail::tvec2 const & x, - detail::tvec2 const & Normal); + //! Projects x on Normal. + //! From GLM_GTX_projection extension. + template + detail::tvec2 proj( + detail::tvec2 const & x, + detail::tvec2 const & Normal); - //! Projects x on Normal. - //! From GLM_GTX_projection extension. - template - detail::tvec3 proj( - detail::tvec3 const & x, - detail::tvec3 const & Normal); + //! Projects x on Normal. + //! From GLM_GTX_projection extension. + template + detail::tvec3 proj( + detail::tvec3 const & x, + detail::tvec3 const & Normal); - //! Projects x on Normal. - //! From GLM_GTX_projection extension. - template - detail::tvec4 proj( - detail::tvec4 const & x, - detail::tvec4 const & Normal); + //! Projects x on Normal. + //! From GLM_GTX_projection extension. + template + detail::tvec4 proj( + detail::tvec4 const & x, + detail::tvec4 const & Normal); - ///@} - - }//namespace projection - }//namespace gtx + /// @} +}//namespace projection +}//namespace gtx }//namespace glm #include "projection.inl" diff --git a/glm/gtx/quaternion.hpp b/glm/gtx/quaternion.hpp index dcc43e88..91a09300 100644 --- a/glm/gtx/quaternion.hpp +++ b/glm/gtx/quaternion.hpp @@ -25,192 +25,189 @@ # pragma message("GLM: GLM_GTX_quaternion extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace quaternion ///< GLM_GTX_quaternion extension: Quaternion types and functions { - namespace gtx{ - //! GLM_GTX_quaternion extension: Quaternion types and functions - namespace quaternion - { - using namespace gtc::quaternion; + using namespace gtc::quaternion; - /// \addtogroup gtx_quaternion - ///@{ + /// \addtogroup gtx_quaternion + ///@{ - //! Compute a cross product between a quaternion and a vector. - //! From GLM_GTX_quaternion extension. - template - detail::tvec3 cross( - detail::tquat const & q, - detail::tvec3 const & v); + //! Compute a cross product between a quaternion and a vector. + //! From GLM_GTX_quaternion extension. + template + detail::tvec3 cross( + detail::tquat const & q, + detail::tvec3 const & v); - //! Compute a cross product between a vector and a quaternion. - //! From GLM_GTX_quaternion extension. - template - detail::tvec3 cross( - detail::tvec3 const & v, - detail::tquat const & q); + //! Compute a cross product between a vector and a quaternion. + //! From GLM_GTX_quaternion extension. + template + detail::tvec3 cross( + detail::tvec3 const & v, + detail::tquat const & q); - //! Compute a point on a path according squad equation. - //! q1 and q2 are control points; s1 and s2 are intermediate control points. - //! From GLM_GTX_quaternion extension. - template - detail::tquat squad( - detail::tquat const & q1, - detail::tquat const & q2, - detail::tquat const & s1, - detail::tquat const & s2, - valType const & h); + //! Compute a point on a path according squad equation. + //! q1 and q2 are control points; s1 and s2 are intermediate control points. + //! From GLM_GTX_quaternion extension. + template + detail::tquat squad( + detail::tquat const & q1, + detail::tquat const & q2, + detail::tquat const & s1, + detail::tquat const & s2, + valType const & h); - //! Returns an intermediate control point for squad interpolation. - //! From GLM_GTX_quaternion extension. - template - detail::tquat intermediate( - detail::tquat const & prev, - detail::tquat const & curr, - detail::tquat const & next); + //! Returns an intermediate control point for squad interpolation. + //! From GLM_GTX_quaternion extension. + template + detail::tquat intermediate( + detail::tquat const & prev, + detail::tquat const & curr, + detail::tquat const & next); - //! Returns a exp of a quaternion. - //! From GLM_GTX_quaternion extension. - template - detail::tquat exp( - detail::tquat const & q, - valType const & exponent); + //! Returns a exp of a quaternion. + //! From GLM_GTX_quaternion extension. + template + detail::tquat exp( + detail::tquat const & q, + valType const & exponent); - //! Returns a log of a quaternion. - //! From GLM_GTX_quaternion extension. - template - detail::tquat log( - detail::tquat const & q); + //! Returns a log of a quaternion. + //! From GLM_GTX_quaternion extension. + template + detail::tquat log( + detail::tquat const & q); - //! Returns x raised to the y power. - //! From GLM_GTX_quaternion extension. - template - detail::tquat pow( - detail::tquat const & x, - valType const & y); + //! Returns x raised to the y power. + //! From GLM_GTX_quaternion extension. + template + detail::tquat pow( + detail::tquat const & x, + valType const & y); - //! Returns quarternion square root. - //! From GLM_GTX_quaternion extension. - //template - //detail::tquat sqrt( - // detail::tquat const & q); + //! Returns quarternion square root. + //! From GLM_GTX_quaternion extension. + //template + //detail::tquat sqrt( + // detail::tquat const & q); - //! Rotates a 3 components vector by a quaternion. - //! From GLM_GTX_transform extension. - template - detail::tvec3 rotate( - detail::tquat const & q, - detail::tvec3 const & v); + //! Rotates a 3 components vector by a quaternion. + //! From GLM_GTX_transform extension. + template + detail::tvec3 rotate( + detail::tquat const & q, + detail::tvec3 const & v); - //! Rotates a 4 components vector by a quaternion. - //! From GLM_GTX_transform extension. - template - detail::tvec4 rotate( - detail::tquat const & q, - detail::tvec4 const & v); + //! Rotates a 4 components vector by a quaternion. + //! From GLM_GTX_transform extension. + template + detail::tvec4 rotate( + detail::tquat const & q, + detail::tvec4 const & v); - //! Returns the quaternion rotation angle. - //! From GLM_GTX_quaternion extension. - template - valType angle( - detail::tquat const & x); + //! Returns the quaternion rotation angle. + //! From GLM_GTX_quaternion extension. + template + valType angle( + detail::tquat const & x); - //! Returns the q rotation axis. - //! From GLM_GTX_quaternion extension. - template - detail::tvec3 axis( - detail::tquat const & x); + //! Returns the q rotation axis. + //! From GLM_GTX_quaternion extension. + template + detail::tvec3 axis( + detail::tquat const & x); - //! Build a quaternion from an angle and a normalized axis. - //! From GLM_GTX_quaternion extension. - template - detail::tquat angleAxis( - valType const & angle, - valType const & x, - valType const & y, - valType const & z); + //! Build a quaternion from an angle and a normalized axis. + //! From GLM_GTX_quaternion extension. + template + detail::tquat angleAxis( + valType const & angle, + valType const & x, + valType const & y, + valType const & z); - //! Build a quaternion from an angle and a normalized axis. - //! From GLM_GTX_quaternion extension. - template - detail::tquat angleAxis( - valType const & angle, - detail::tvec3 const & axis); + //! Build a quaternion from an angle and a normalized axis. + //! From GLM_GTX_quaternion extension. + template + detail::tquat angleAxis( + valType const & angle, + detail::tvec3 const & axis); - //! Extract the real component of a quaternion. - //! From GLM_GTX_quaternion extension. - template - valType extractRealComponent( - detail::tquat const & q); + //! Extract the real component of a quaternion. + //! From GLM_GTX_quaternion extension. + template + valType extractRealComponent( + detail::tquat const & q); - //! Returns roll value of euler angles. - //! From GLM_GTX_quaternion extension. - template - valType roll( - detail::tquat const & x); + //! Returns roll value of euler angles. + //! From GLM_GTX_quaternion extension. + template + valType roll( + detail::tquat const & x); - //! Returns pitch value of euler angles. - //! From GLM_GTX_quaternion extension. - template - valType pitch( - detail::tquat const & x); + //! Returns pitch value of euler angles. + //! From GLM_GTX_quaternion extension. + template + valType pitch( + detail::tquat const & x); - //! Returns yaw value of euler angles. - //! From GLM_GTX_quaternion extension. - template - valType yaw( - detail::tquat const & x); + //! Returns yaw value of euler angles. + //! From GLM_GTX_quaternion extension. + template + valType yaw( + detail::tquat const & x); - //! Returns euler angles, yitch as x, yaw as y, roll as z. - //! From GLM_GTX_quaternion extension. - template - detail::tvec3 eularAngles( - detail::tquat const & x); + //! Returns euler angles, yitch as x, yaw as y, roll as z. + //! From GLM_GTX_quaternion extension. + template + detail::tvec3 eularAngles( + detail::tquat const & x); - //! Converts a quaternion to a 3 * 3 matrix. - //! From GLM_GTX_quaternion extension. - template - detail::tmat3x3 toMat3( - detail::tquat const & x){return gtc::quaternion::mat3_cast(x);} + //! Converts a quaternion to a 3 * 3 matrix. + //! From GLM_GTX_quaternion extension. + template + detail::tmat3x3 toMat3( + detail::tquat const & x){return gtc::quaternion::mat3_cast(x);} - //! Converts a quaternion to a 4 * 4 matrix. - //! From GLM_GTX_quaternion extension. - template - detail::tmat4x4 toMat4( - detail::tquat const & x){return gtc::quaternion::mat4_cast(x);} + //! Converts a quaternion to a 4 * 4 matrix. + //! From GLM_GTX_quaternion extension. + template + detail::tmat4x4 toMat4( + detail::tquat const & x){return gtc::quaternion::mat4_cast(x);} - //! Converts a 3 * 3 matrix to a quaternion. - //! From GLM_GTX_quaternion extension. - template - detail::tquat toQuat( - detail::tmat3x3 const & x){return gtc::quaternion::quat_cast(x);} + //! Converts a 3 * 3 matrix to a quaternion. + //! From GLM_GTX_quaternion extension. + template + detail::tquat toQuat( + detail::tmat3x3 const & x){return gtc::quaternion::quat_cast(x);} - //! Converts a 4 * 4 matrix to a quaternion. - //! From GLM_GTX_quaternion extension. - template - detail::tquat toQuat( - detail::tmat4x4 const & x){return gtc::quaternion::quat_cast(x);} + //! Converts a 4 * 4 matrix to a quaternion. + //! From GLM_GTX_quaternion extension. + template + detail::tquat toQuat( + detail::tmat4x4 const & x){return gtc::quaternion::quat_cast(x);} - //! Quaternion interpolation using the rotation short path. - //! From GLM_GTX_quaternion extension. - template - detail::tquat shortMix( - detail::tquat const & x, - detail::tquat const & y, - T const & a); + //! Quaternion interpolation using the rotation short path. + //! From GLM_GTX_quaternion extension. + template + detail::tquat shortMix( + detail::tquat const & x, + detail::tquat const & y, + T const & a); - //! Quaternion normalized linear interpolation. - //! From GLM_GTX_quaternion extension. - template - detail::tquat fastMix( - detail::tquat const & x, - detail::tquat const & y, - T const & a); + //! Quaternion normalized linear interpolation. + //! From GLM_GTX_quaternion extension. + template + detail::tquat fastMix( + detail::tquat const & x, + detail::tquat const & y, + T const & a); - ///@} - - }//namespace quaternion - }//namespace gtx + /// @} +}//namespace quaternion +}//namespace gtx } //namespace glm #include "quaternion.inl" diff --git a/glm/gtx/random.hpp b/glm/gtx/random.hpp index dad34ddd..fabc192a 100644 --- a/glm/gtx/random.hpp +++ b/glm/gtx/random.hpp @@ -25,11 +25,10 @@ namespace glm{ namespace gtx{ -//! GLM_GTX_random extension: Generate random number from various distribution methods -namespace random +namespace random ///< GLM_GTX_random extension: Generate random number from various distribution methods { /// \addtogroup gtx_random - ///@{ + /// @{ //! Generate a random number in the interval [-1, 1], according a linear distribution. //! From GLM_GTX_random extension. diff --git a/glm/gtx/raw_data.hpp b/glm/gtx/raw_data.hpp index d0e11757..b66dc5ae 100644 --- a/glm/gtx/raw_data.hpp +++ b/glm/gtx/raw_data.hpp @@ -22,36 +22,34 @@ #endif namespace glm{ -namespace gtx +namespace gtx{ +namespace raw_data ///< GLM_GTX_raw_data extension: Projection of a vector to other one { - //! GLM_GTX_raw_data extension: Projection of a vector to other one - namespace raw_data - { - using namespace gtc::type_precision; + using namespace gtc::type_precision; - /// \addtogroup gtx_raw_data - ///@{ + /// \addtogroup gtx_raw_data + ///@{ - //! Type for byte numbers. - //! From GLM_GTX_raw_data extension. - typedef uint8 byte; + //! Type for byte numbers. + //! From GLM_GTX_raw_data extension. + typedef uint8 byte; - //! Type for word numbers. - //! From GLM_GTX_raw_data extension. - typedef uint16 word; + //! Type for word numbers. + //! From GLM_GTX_raw_data extension. + typedef uint16 word; - //! Type for dword numbers. - //! From GLM_GTX_raw_data extension. - typedef uint32 dword; + //! Type for dword numbers. + //! From GLM_GTX_raw_data extension. + typedef uint32 dword; - //! Type for qword numbers. - //! From GLM_GTX_raw_data extension. - typedef uint64 qword; + //! Type for qword numbers. + //! From GLM_GTX_raw_data extension. + typedef uint64 qword; - ///@} - } -}//namespace gtx -}//namespace glm + ///@} +}// namespace raw_data +}// namespace gtx +}// namespace glm #include "raw_data.inl" diff --git a/glm/gtx/reciprocal.hpp b/glm/gtx/reciprocal.hpp index eb8ea688..aac6cf76 100644 --- a/glm/gtx/reciprocal.hpp +++ b/glm/gtx/reciprocal.hpp @@ -17,82 +17,79 @@ # pragma message("GLM: GLM_GTX_reciprocal extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace reciprocal ///< GLM_GTX_reciprocal extension: Define secant, cosecant and cotangent functions. { - namespace gtx{ - //! GLM_GTX_reciprocal extension: Define secant, cosecant and cotangent functions. - namespace reciprocal - { - /// \addtogroup gtx_reciprocal - ///@{ + /// \addtogroup gtx_reciprocal + /// @{ - //! Secant function. - //! hypotenuse / adjacent or 1 / cos(x) - //! From GLM_GTX_reciprocal extension. - template - genType sec(genType const & angle); + //! Secant function. + //! hypotenuse / adjacent or 1 / cos(x) + //! From GLM_GTX_reciprocal extension. + template + genType sec(genType const & angle); - //! Cosecant function. - //! hypotenuse / opposite or 1 / sin(x) - //! From GLM_GTX_reciprocal extension. - template - genType csc(genType const & angle); + //! Cosecant function. + //! hypotenuse / opposite or 1 / sin(x) + //! From GLM_GTX_reciprocal extension. + template + genType csc(genType const & angle); - //! Cotangent function. - //! adjacent / opposite or 1 / tan(x) - //! From GLM_GTX_reciprocal extension. - template - genType cot(genType const & angle); + //! Cotangent function. + //! adjacent / opposite or 1 / tan(x) + //! From GLM_GTX_reciprocal extension. + template + genType cot(genType const & angle); - //! Inverse secant function. - //! From GLM_GTX_reciprocal extension. - template - genType asec(genType const & x); + //! Inverse secant function. + //! From GLM_GTX_reciprocal extension. + template + genType asec(genType const & x); - //! Inverse cosecant function. - //! From GLM_GTX_reciprocal extension. - template - genType acsc(genType const & x); + //! Inverse cosecant function. + //! From GLM_GTX_reciprocal extension. + template + genType acsc(genType const & x); - //! Inverse cotangent function. - //! From GLM_GTX_reciprocal extension. - template - genType acot(genType const & x); + //! Inverse cotangent function. + //! From GLM_GTX_reciprocal extension. + template + genType acot(genType const & x); - //! Secant hyperbolic function. - //! From GLM_GTX_reciprocal extension. - template - genType sech(genType const & angle); + //! Secant hyperbolic function. + //! From GLM_GTX_reciprocal extension. + template + genType sech(genType const & angle); - //! Cosecant hyperbolic function. - //! From GLM_GTX_reciprocal extension. - template - genType csch(genType const & angle); + //! Cosecant hyperbolic function. + //! From GLM_GTX_reciprocal extension. + template + genType csch(genType const & angle); - //! Cotangent hyperbolic function. - //! From GLM_GTX_reciprocal extension. - template - genType coth(genType const & angle); + //! Cotangent hyperbolic function. + //! From GLM_GTX_reciprocal extension. + template + genType coth(genType const & angle); - //! Inverse secant hyperbolic function. - //! From GLM_GTX_reciprocal extension. - template - genType asech(genType const & x); + //! Inverse secant hyperbolic function. + //! From GLM_GTX_reciprocal extension. + template + genType asech(genType const & x); - //! Inverse cosecant hyperbolic function. - //! From GLM_GTX_reciprocal extension. - template - genType acsch(genType const & x); + //! Inverse cosecant hyperbolic function. + //! From GLM_GTX_reciprocal extension. + template + genType acsch(genType const & x); - //! Inverse cotangent hyperbolic function. - //! From GLM_GTX_reciprocal extension. - template - genType acoth(genType const & x); + //! Inverse cotangent hyperbolic function. + //! From GLM_GTX_reciprocal extension. + template + genType acoth(genType const & x); - ///@} - - }//namespace reciprocal - }//namespace gtx + /// @} +}//namespace reciprocal +}//namespace gtx }//namespace glm #include "reciprocal.inl" diff --git a/glm/gtx/rotate_vector.hpp b/glm/gtx/rotate_vector.hpp index ebf0c2a0..1eaec829 100644 --- a/glm/gtx/rotate_vector.hpp +++ b/glm/gtx/rotate_vector.hpp @@ -23,88 +23,86 @@ namespace glm{ namespace gtx{ -//! GLM_GTX_rotate_vector extension: Function to directly rotate a vector -namespace rotate_vector +namespace rotate_vector ///< GLM_GTX_rotate_vector extension: Function to directly rotate a vector { - using namespace transform; + using namespace transform; - /// \addtogroup gtx_rotate_vector - ///@{ + /// \addtogroup gtx_rotate_vector + /// @{ - //! Rotate a two dimensional vector. - //! From GLM_GTX_rotate_vector extension. - template - detail::tvec2 rotate( - detail::tvec2 const & v, - T const & angle); + //! Rotate a two dimensional vector. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec2 rotate( + detail::tvec2 const & v, + T const & angle); - //! Rotate a three dimensional vector around an axis. - //! From GLM_GTX_rotate_vector extension. - template - detail::tvec3 rotate( - detail::tvec3 const & v, - T const & angle, - detail::tvec3 const & normal); + //! Rotate a three dimensional vector around an axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec3 rotate( + detail::tvec3 const & v, + T const & angle, + detail::tvec3 const & normal); - //! Rotate a four dimensional vector around an axis. - //! From GLM_GTX_rotate_vector extension. - template - detail::tvec4 rotate( - detail::tvec4 const & v, - T const & angle, - detail::tvec3 const & normal); + //! Rotate a four dimensional vector around an axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec4 rotate( + detail::tvec4 const & v, + T const & angle, + detail::tvec3 const & normal); - //! Rotate a three dimensional vector around the X axis. - //! From GLM_GTX_rotate_vector extension. - template - detail::tvec3 rotateX( - detail::tvec3 const & v, - T const & angle); + //! Rotate a three dimensional vector around the X axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec3 rotateX( + detail::tvec3 const & v, + T const & angle); - //! Rotate a three dimensional vector around the Y axis. - //! From GLM_GTX_rotate_vector extension. - template - detail::tvec3 rotateY( - detail::tvec3 const & v, - T const & angle); + //! Rotate a three dimensional vector around the Y axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec3 rotateY( + detail::tvec3 const & v, + T const & angle); - //! Rotate a three dimensional vector around the Z axis. - //! From GLM_GTX_rotate_vector extension. - template - detail::tvec3 rotateZ( - detail::tvec3 const & v, - T const & angle); + //! Rotate a three dimensional vector around the Z axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec3 rotateZ( + detail::tvec3 const & v, + T const & angle); - //! Rotate a four dimentionnals vector around the X axis. - //! From GLM_GTX_rotate_vector extension. - template - detail::tvec4 rotateX( - detail::tvec4 const & v, - T const & angle); + //! Rotate a four dimentionnals vector around the X axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec4 rotateX( + detail::tvec4 const & v, + T const & angle); - //! Rotate a four dimensional vector around the X axis. - //! From GLM_GTX_rotate_vector extension. - template - detail::tvec4 rotateY( - detail::tvec4 const & v, - T const & angle); + //! Rotate a four dimensional vector around the X axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec4 rotateY( + detail::tvec4 const & v, + T const & angle); - //! Rotate a four dimensional vector around the X axis. - //! From GLM_GTX_rotate_vector extension. - template - detail::tvec4 rotateZ( - detail::tvec4 const & v, - T const & angle); + //! Rotate a four dimensional vector around the X axis. + //! From GLM_GTX_rotate_vector extension. + template + detail::tvec4 rotateZ( + detail::tvec4 const & v, + T const & angle); - //! Build a rotation matrix from a normal and a up vector. - //! From GLM_GTX_rotate_vector extension. - template - detail::tmat4x4 orientation( - detail::tvec3 const & Normal, - detail::tvec3 const & Up); + //! Build a rotation matrix from a normal and a up vector. + //! From GLM_GTX_rotate_vector extension. + template + detail::tmat4x4 orientation( + detail::tvec3 const & Normal, + detail::tvec3 const & Up); - ///@} - + /// @} }//namespace rotate_vector }//namespace gtx }//namespace glm diff --git a/glm/gtx/simd_mat4.hpp b/glm/gtx/simd_mat4.hpp index 07ef9cf5..614cf593 100644 --- a/glm/gtx/simd_mat4.hpp +++ b/glm/gtx/simd_mat4.hpp @@ -28,157 +28,153 @@ # pragma message("GLM: GLM_GTX_simd_mat4 extension included") #endif -namespace glm +namespace glm{ +namespace detail { - namespace detail + /// 4x4 Matrix implemented using SIMD SEE intrinsics. + /// \ingroup gtx_simd_mat4 + GLM_ALIGNED_STRUCT(16) fmat4x4SIMD { - /// 4x4 Matrix implemented using SIMD SEE intrinsics. - /// \ingroup gtx_simd_mat4 - GLM_ALIGNED_STRUCT(16) fmat4x4SIMD - { - enum ctor{null}; + enum ctor{null}; - typedef float value_type; - typedef fvec4SIMD col_type; - typedef fvec4SIMD row_type; - typedef std::size_t size_type; - static size_type value_size(); - static size_type col_size(); - static size_type row_size(); - static bool is_matrix(); + typedef float value_type; + typedef fvec4SIMD col_type; + typedef fvec4SIMD row_type; + typedef std::size_t size_type; + static size_type value_size(); + static size_type col_size(); + static size_type row_size(); + static bool is_matrix(); - fvec4SIMD Data[4]; + fvec4SIMD Data[4]; - ////////////////////////////////////// - // Constructors + ////////////////////////////////////// + // Constructors - fmat4x4SIMD(); - explicit fmat4x4SIMD(float const & s); - explicit fmat4x4SIMD( - float const & x0, float const & y0, float const & z0, float const & w0, - float const & x1, float const & y1, float const & z1, float const & w1, - float const & x2, float const & y2, float const & z2, float const & w2, - float const & x3, float const & y3, float const & z3, float const & w3); - explicit fmat4x4SIMD( - fvec4SIMD const & v0, - fvec4SIMD const & v1, - fvec4SIMD const & v2, - fvec4SIMD const & v3); - explicit fmat4x4SIMD( - tmat4x4 const & m); + fmat4x4SIMD(); + explicit fmat4x4SIMD(float const & s); + explicit fmat4x4SIMD( + float const & x0, float const & y0, float const & z0, float const & w0, + float const & x1, float const & y1, float const & z1, float const & w1, + float const & x2, float const & y2, float const & z2, float const & w2, + float const & x3, float const & y3, float const & z3, float const & w3); + explicit fmat4x4SIMD( + fvec4SIMD const & v0, + fvec4SIMD const & v1, + fvec4SIMD const & v2, + fvec4SIMD const & v3); + explicit fmat4x4SIMD( + tmat4x4 const & m); - // Conversions - //template - //explicit tmat4x4(tmat4x4 const & m); + // Conversions + //template + //explicit tmat4x4(tmat4x4 const & m); - //explicit tmat4x4(tmat2x2 const & x); - //explicit tmat4x4(tmat3x3 const & x); - //explicit tmat4x4(tmat2x3 const & x); - //explicit tmat4x4(tmat3x2 const & x); - //explicit tmat4x4(tmat2x4 const & x); - //explicit tmat4x4(tmat4x2 const & x); - //explicit tmat4x4(tmat3x4 const & x); - //explicit tmat4x4(tmat4x3 const & x); + //explicit tmat4x4(tmat2x2 const & x); + //explicit tmat4x4(tmat3x3 const & x); + //explicit tmat4x4(tmat2x3 const & x); + //explicit tmat4x4(tmat3x2 const & x); + //explicit tmat4x4(tmat2x4 const & x); + //explicit tmat4x4(tmat4x2 const & x); + //explicit tmat4x4(tmat3x4 const & x); + //explicit tmat4x4(tmat4x3 const & x); - // Accesses - fvec4SIMD & operator[](size_type i); - fvec4SIMD const & operator[](size_type i) const; + // Accesses + fvec4SIMD & operator[](size_type i); + fvec4SIMD const & operator[](size_type i) const; - // Unary updatable operators - fmat4x4SIMD & operator= (fmat4x4SIMD const & m); - fmat4x4SIMD & operator+= (float const & s); - fmat4x4SIMD & operator+= (fmat4x4SIMD const & m); - fmat4x4SIMD & operator-= (float const & s); - fmat4x4SIMD & operator-= (fmat4x4SIMD const & m); - fmat4x4SIMD & operator*= (float const & s); - fmat4x4SIMD & operator*= (fmat4x4SIMD const & m); - fmat4x4SIMD & operator/= (float const & s); - fmat4x4SIMD & operator/= (fmat4x4SIMD const & m); - fmat4x4SIMD & operator++ (); - fmat4x4SIMD & operator-- (); - }; + // Unary updatable operators + fmat4x4SIMD & operator= (fmat4x4SIMD const & m); + fmat4x4SIMD & operator+= (float const & s); + fmat4x4SIMD & operator+= (fmat4x4SIMD const & m); + fmat4x4SIMD & operator-= (float const & s); + fmat4x4SIMD & operator-= (fmat4x4SIMD const & m); + fmat4x4SIMD & operator*= (float const & s); + fmat4x4SIMD & operator*= (fmat4x4SIMD const & m); + fmat4x4SIMD & operator/= (float const & s); + fmat4x4SIMD & operator/= (fmat4x4SIMD const & m); + fmat4x4SIMD & operator++ (); + fmat4x4SIMD & operator-- (); + }; - // Binary operators - fmat4x4SIMD operator+ (fmat4x4SIMD const & m, float const & s); - fmat4x4SIMD operator+ (float const & s, fmat4x4SIMD const & m); - fmat4x4SIMD operator+ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); + // Binary operators + fmat4x4SIMD operator+ (fmat4x4SIMD const & m, float const & s); + fmat4x4SIMD operator+ (float const & s, fmat4x4SIMD const & m); + fmat4x4SIMD operator+ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); - fmat4x4SIMD operator- (fmat4x4SIMD const & m, float const & s); - fmat4x4SIMD operator- (float const & s, fmat4x4SIMD const & m); - fmat4x4SIMD operator- (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); + fmat4x4SIMD operator- (fmat4x4SIMD const & m, float const & s); + fmat4x4SIMD operator- (float const & s, fmat4x4SIMD const & m); + fmat4x4SIMD operator- (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); - fmat4x4SIMD operator* (fmat4x4SIMD const & m, float const & s); - fmat4x4SIMD operator* (float const & s, fmat4x4SIMD const & m); + fmat4x4SIMD operator* (fmat4x4SIMD const & m, float const & s); + fmat4x4SIMD operator* (float const & s, fmat4x4SIMD const & m); - fvec4SIMD operator* (fmat4x4SIMD const & m, fvec4SIMD const & v); - fvec4SIMD operator* (fvec4SIMD const & v, fmat4x4SIMD const & m); + fvec4SIMD operator* (fmat4x4SIMD const & m, fvec4SIMD const & v); + fvec4SIMD operator* (fvec4SIMD const & v, fmat4x4SIMD const & m); - fmat4x4SIMD operator* (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); + fmat4x4SIMD operator* (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); - fmat4x4SIMD operator/ (fmat4x4SIMD const & m, float const & s); - fmat4x4SIMD operator/ (float const & s, fmat4x4SIMD const & m); + fmat4x4SIMD operator/ (fmat4x4SIMD const & m, float const & s); + fmat4x4SIMD operator/ (float const & s, fmat4x4SIMD const & m); - fvec4SIMD operator/ (fmat4x4SIMD const & m, fvec4SIMD const & v); - fvec4SIMD operator/ (fvec4SIMD const & v, fmat4x4SIMD const & m); + fvec4SIMD operator/ (fmat4x4SIMD const & m, fvec4SIMD const & v); + fvec4SIMD operator/ (fvec4SIMD const & v, fmat4x4SIMD const & m); - fmat4x4SIMD operator/ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); + fmat4x4SIMD operator/ (fmat4x4SIMD const & m1, fmat4x4SIMD const & m2); - // Unary constant operators - fmat4x4SIMD const operator- (fmat4x4SIMD const & m); - fmat4x4SIMD const operator-- (fmat4x4SIMD const & m, int); - fmat4x4SIMD const operator++ (fmat4x4SIMD const & m, int); + // Unary constant operators + fmat4x4SIMD const operator- (fmat4x4SIMD const & m); + fmat4x4SIMD const operator-- (fmat4x4SIMD const & m, int); + fmat4x4SIMD const operator++ (fmat4x4SIMD const & m, int); +}//namespace detail - }//namespace detail +namespace gtx{ +namespace simd_mat4 ///< GLM_GTX_simd_mat4 extension: SIMD implementation of mat4 type. +{ + typedef detail::fmat4x4SIMD simdMat4; - namespace gtx{ - //! GLM_GTX_simd_mat4 extension: SIMD implementation of mat4 type. - namespace simd_mat4 - { - typedef detail::fmat4x4SIMD simdMat4; + /// \addtogroup gtx_simd_mat4 + ///@{ - /// \addtogroup gtx_simd_mat4 - ///@{ + //! Convert a simdMat4 to a mat4. + //! (From GLM_GTX_simd_mat4 extension) + detail::tmat4x4 mat4_cast( + detail::fmat4x4SIMD const & x); - //! Convert a simdMat4 to a mat4. - //! (From GLM_GTX_simd_mat4 extension) - detail::tmat4x4 mat4_cast( - detail::fmat4x4SIMD const & x); + //! Multiply matrix x by matrix y component-wise, i.e., + //! result[i][j] is the scalar product of x[i][j] and y[i][j]. + //! (From GLM_GTX_simd_mat4 extension). + detail::fmat4x4SIMD matrixCompMult( + detail::fmat4x4SIMD const & x, + detail::fmat4x4SIMD const & y); - //! Multiply matrix x by matrix y component-wise, i.e., - //! result[i][j] is the scalar product of x[i][j] and y[i][j]. - //! (From GLM_GTX_simd_mat4 extension). - detail::fmat4x4SIMD matrixCompMult( - detail::fmat4x4SIMD const & x, - detail::fmat4x4SIMD const & y); + //! Treats the first parameter c as a column vector + //! and the second parameter r as a row vector + //! and does a linear algebraic matrix multiply c * r. + //! (From GLM_GTX_simd_mat4 extension). + detail::fmat4x4SIMD outerProduct( + detail::fvec4SIMD const & c, + detail::fvec4SIMD const & r); - //! Treats the first parameter c as a column vector - //! and the second parameter r as a row vector - //! and does a linear algebraic matrix multiply c * r. - //! (From GLM_GTX_simd_mat4 extension). - detail::fmat4x4SIMD outerProduct( - detail::fvec4SIMD const & c, - detail::fvec4SIMD const & r); + //! Returns the transposed matrix of x + //! (From GLM_GTX_simd_mat4 extension). + detail::fmat4x4SIMD transpose( + detail::fmat4x4SIMD const & x); - //! Returns the transposed matrix of x - //! (From GLM_GTX_simd_mat4 extension). - detail::fmat4x4SIMD transpose( - detail::fmat4x4SIMD const & x); + //! Return the determinant of a mat4 matrix. + //! (From GLM_GTX_simd_mat4 extension). + float determinant( + detail::fmat4x4SIMD const & m); - //! Return the determinant of a mat4 matrix. - //! (From GLM_GTX_simd_mat4 extension). - float determinant( - detail::fmat4x4SIMD const & m); + //! Return the inverse of a mat4 matrix. + //! (From GLM_GTX_simd_mat4 extension). + detail::fmat4x4SIMD inverse( + detail::fmat4x4SIMD const & m); - //! Return the inverse of a mat4 matrix. - //! (From GLM_GTX_simd_mat4 extension). - detail::fmat4x4SIMD inverse( - detail::fmat4x4SIMD const & m); - - ///@} - - }//namespace simd_mat4 - }//namespace gtx -}//namespace glm + /// @} +}// namespace simd_mat4 +}// namespace gtx +}// namespace glm #include "simd_mat4.inl" diff --git a/glm/gtx/simd_vec4.hpp b/glm/gtx/simd_vec4.hpp index 83bba03b..3384e9e1 100644 --- a/glm/gtx/simd_vec4.hpp +++ b/glm/gtx/simd_vec4.hpp @@ -28,446 +28,443 @@ # pragma message("GLM: GLM_GTX_simd_vec4 extension included") #endif -namespace glm +namespace glm{ +namespace detail { - namespace detail + /// 4-dimensional vector implemented using SIMD SEE intrinsics. + /// \ingroup gtx_simd_vec4 + GLM_ALIGNED_STRUCT(4) fvec4SIMD { - /// 4-dimensional vector implemented using SIMD SEE intrinsics. - /// \ingroup gtx_simd_vec4 - GLM_ALIGNED_STRUCT(4) fvec4SIMD - { - enum ctor{null}; - typedef __m128 value_type; - typedef std::size_t size_type; - static size_type value_size(); - - typedef fvec4SIMD type; - typedef tvec4 bool_type; - - __m128 Data; - - ////////////////////////////////////// - // Implicit basic constructors - - fvec4SIMD(); - fvec4SIMD(__m128 const & Data); - fvec4SIMD(fvec4SIMD const & v); - - ////////////////////////////////////// - // Explicit basic constructors - - explicit fvec4SIMD( - ctor); - explicit fvec4SIMD( - float const & s); - explicit fvec4SIMD( - float const & x, - float const & y, - float const & z, - float const & w); - explicit fvec4SIMD( - tvec4 const & v); - - //////////////////////////////////////// - //// Convertion vector constructors - - fvec4SIMD(vec2 const & v, float const & s1, float const & s2); - fvec4SIMD(float const & s1, vec2 const & v, float const & s2); - fvec4SIMD(float const & s1, float const & s2, vec2 const & v); - fvec4SIMD(vec3 const & v, float const & s); - fvec4SIMD(float const & s, vec3 const & v); - fvec4SIMD(vec2 const & v1, vec2 const & v2); - //fvec4SIMD(ivec4SIMD const & v); - - ////////////////////////////////////// - // Unary arithmetic operators - - fvec4SIMD& operator= (fvec4SIMD const & v); - fvec4SIMD& operator+=(fvec4SIMD const & v); - fvec4SIMD& operator-=(fvec4SIMD const & v); - fvec4SIMD& operator*=(fvec4SIMD const & v); - fvec4SIMD& operator/=(fvec4SIMD const & v); - - fvec4SIMD& operator+=(float const & s); - fvec4SIMD& operator-=(float const & s); - fvec4SIMD& operator*=(float const & s); - fvec4SIMD& operator/=(float const & s); - - fvec4SIMD& operator++(); - fvec4SIMD& operator--(); - - ////////////////////////////////////// - // Swizzle operators - - template - fvec4SIMD& swizzle(); - template - fvec4SIMD swizzle() const; - template - fvec4SIMD swizzle() const; - template - fvec4SIMD swizzle() const; - template - fvec4SIMD swizzle() const; - }; - - }//namespace detail - - namespace gtx{ - //! GLM_GTX_simd_vec4 extension: SIMD implementation of vec4 type. - namespace simd_vec4 - { - typedef detail::fvec4SIMD simdVec4; - - /// \addtogroup gtx_simd_vec4 - ///@{ - - //! Convert a simdVec4 to a vec4. - //! (From GLM_GTX_simd_vec4 extension) - detail::tvec4 vec4_cast( - detail::fvec4SIMD const & x); - - //! Returns x if x >= 0; otherwise, it returns -x. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD abs(detail::fvec4SIMD const & x); - - //! Returns 1.0 if x > 0, 0.0 if x = 0, or -1.0 if x < 0. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD sign(detail::fvec4SIMD const & x); - - //! Returns a value equal to the nearest integer that is less then or equal to x. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD floor(detail::fvec4SIMD const & x); - - //! Returns a value equal to the nearest integer to x - //! whose absolute value is not larger than the absolute value of x. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD trunc(detail::fvec4SIMD const & x); - - //! Returns a value equal to the nearest integer to x. - //! The fraction 0.5 will round in a direction chosen by the - //! implementation, presumably the direction that is fastest. - //! This includes the possibility that round(x) returns the - //! same value as roundEven(x) for all values of x. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD round(detail::fvec4SIMD const & x); - - //! Returns a value equal to the nearest integer to x. - //! A fractional part of 0.5 will round toward the nearest even - //! integer. (Both 3.5 and 4.5 for x will return 4.0.) - //! (From GLM_GTX_simd_vec4 extension, common function) - //detail::fvec4SIMD roundEven(detail::fvec4SIMD const & x); - - //! Returns a value equal to the nearest integer - //! that is greater than or equal to x. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD ceil(detail::fvec4SIMD const & x); - - //! Return x - floor(x). - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD fract(detail::fvec4SIMD const & x); - - //! Modulus. Returns x - y * floor(x / y) - //! for each component in x using the floating point value y. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD mod( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y); - - //! Modulus. Returns x - y * floor(x / y) - //! for each component in x using the floating point value y. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD mod( - detail::fvec4SIMD const & x, - float const & y); - - //! Returns the fractional part of x and sets i to the integer - //! part (as a whole number floating point value). Both the - //! return value and the output parameter will have the same - //! sign as x. - //! (From GLM_GTX_simd_vec4 extension, common function) - //detail::fvec4SIMD modf( - // detail::fvec4SIMD const & x, - // detail::fvec4SIMD & i); - - //! Returns y if y < x; otherwise, it returns x. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD min( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y); - - detail::fvec4SIMD min( - detail::fvec4SIMD const & x, - float const & y); - - //! Returns y if x < y; otherwise, it returns x. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD max( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y); - - detail::fvec4SIMD max( - detail::fvec4SIMD const & x, - float const & y); - - //! Returns min(max(x, minVal), maxVal) for each component in x - //! using the floating-point values minVal and maxVal. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD clamp( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & minVal, - detail::fvec4SIMD const & maxVal); - - detail::fvec4SIMD clamp( - detail::fvec4SIMD const & x, - float const & minVal, - float const & maxVal); - - //! \return If genTypeU is a floating scalar or vector: - //! Returns x * (1.0 - a) + y * a, i.e., the linear blend of - //! x and y using the floating-point value a. - //! The value for a is not restricted to the range [0, 1]. - //! - //! \return If genTypeU is a boolean scalar or vector: - //! Selects which vector each returned component comes - //! from. For a component of a that is false, the - //! corresponding component of x is returned. For a - //! component of a that is true, the corresponding - //! component of y is returned. Components of x and y that - //! are not selected are allowed to be invalid floating point - //! values and will have no effect on the results. Thus, this - //! provides different functionality than - //! genType mix(genType x, genType y, genType(a)) - //! where a is a Boolean vector. - //! - //! From GLSL 1.30.08 specification, section 8.3 - //! - //! \param[in] x Floating point scalar or vector. - //! \param[in] y Floating point scalar or vector. - //! \param[in] a Floating point or boolean scalar or vector. - //! - // \todo Test when 'a' is a boolean. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD mix( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y, - detail::fvec4SIMD const & a); - - //! Returns 0.0 if x < edge, otherwise it returns 1.0. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD step( - detail::fvec4SIMD const & edge, - detail::fvec4SIMD const & x); - - detail::fvec4SIMD step( - float const & edge, - detail::fvec4SIMD const & x); - - //! Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and - //! performs smooth Hermite interpolation between 0 and 1 - //! when edge0 < x < edge1. This is useful in cases where - //! you would want a threshold function with a smooth - //! transition. This is equivalent to: - //! genType t; - //! t = clamp ((x – edge0) / (edge1 – edge0), 0, 1); - //! return t * t * (3 – 2 * t); - //! Results are undefined if edge0 >= edge1. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD smoothstep( - detail::fvec4SIMD const & edge0, - detail::fvec4SIMD const & edge1, - detail::fvec4SIMD const & x); - - detail::fvec4SIMD smoothstep( - float const & edge0, - float const & edge1, - detail::fvec4SIMD const & x); - - //! Returns true if x holds a NaN (not a number) - //! representation in the underlying implementation's set of - //! floating point representations. Returns false otherwise, - //! including for implementations with no NaN - //! representations. - //! (From GLM_GTX_simd_vec4 extension, common function) - //bvec4 isnan(detail::fvec4SIMD const & x); - - //! Returns true if x holds a positive infinity or negative - //! infinity representation in the underlying implementation's - //! set of floating point representations. Returns false - //! otherwise, including for implementations with no infinity - //! representations. - //! (From GLM_GTX_simd_vec4 extension, common function) - //bvec4 isinf(detail::fvec4SIMD const & x); - - //! Returns a signed or unsigned integer value representing - //! the encoding of a floating-point value. The floatingpoint - //! value's bit-level representation is preserved. - //! (From GLM_GTX_simd_vec4 extension, common function) - //detail::ivec4SIMD floatBitsToInt(detail::fvec4SIMD const & value); - - //! Returns a floating-point value corresponding to a signed - //! or unsigned integer encoding of a floating-point value. - //! If an inf or NaN is passed in, it will not signal, and the - //! resulting floating point value is unspecified. Otherwise, - //! the bit-level representation is preserved. - //! (From GLM_GTX_simd_vec4 extension, common function) - //detail::fvec4SIMD intBitsToFloat(detail::ivec4SIMD const & value); - - //! Computes and returns a * b + c. - //! (From GLM_GTX_simd_vec4 extension, common function) - detail::fvec4SIMD fma( - detail::fvec4SIMD const & a, - detail::fvec4SIMD const & b, - detail::fvec4SIMD const & c); - - //! Splits x into a floating-point significand in the range - //! [0.5, 1.0) and an integral exponent of two, such that: - //! x = significand * exp(2, exponent) - //! The significand is returned by the function and the - //! exponent is returned in the parameter exp. For a - //! floating-point value of zero, the significant and exponent - //! are both zero. For a floating-point value that is an - //! infinity or is not a number, the results are undefined. - //! (From GLM_GTX_simd_vec4 extension, common function) - //detail::fvec4SIMD frexp(detail::fvec4SIMD const & x, detail::ivec4SIMD & exp); - - //! Builds a floating-point number from x and the - //! corresponding integral exponent of two in exp, returning: - //! significand * exp(2, exponent) - //! If this product is too large to be represented in the - //! floating-point type, the result is undefined. - //! (From GLM_GTX_simd_vec4 extension, common function) - //detail::fvec4SIMD ldexp(detail::fvec4SIMD const & x, detail::ivec4SIMD const & exp); - - //! Returns the length of x, i.e., sqrt(x * x). - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - float length( - detail::fvec4SIMD const & x); - - //! Returns the length of x, i.e., sqrt(x * x). - //! Less accurate but much faster than simdLength. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - float fastLength( - detail::fvec4SIMD const & x); - - //! Returns the length of x, i.e., sqrt(x * x). - //! Slightly more accurate but much slower than simdLength. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - float niceLength( - detail::fvec4SIMD const & x); - - //! Returns the length of x, i.e., sqrt(x * x). - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - detail::fvec4SIMD length4( - detail::fvec4SIMD const & x); - - //! Returns the length of x, i.e., sqrt(x * x). - //! Less accurate but much faster than simdLength4. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - detail::fvec4SIMD fastLength4( - detail::fvec4SIMD const & x); - - //! Returns the length of x, i.e., sqrt(x * x). - //! Slightly more accurate but much slower than simdLength4. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - detail::fvec4SIMD niceLength4( - detail::fvec4SIMD const & x); - - //! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - float distance( - detail::fvec4SIMD const & p0, - detail::fvec4SIMD const & p1); - - //! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - detail::fvec4SIMD distance4( - detail::fvec4SIMD const & p0, - detail::fvec4SIMD const & p1); - - //! Returns the dot product of x and y, i.e., result = x * y. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - float simdDot( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y); - - //! Returns the dot product of x and y, i.e., result = x * y. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - detail::fvec4SIMD dot4( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y); - - //! Returns the cross product of x and y. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - detail::fvec4SIMD cross( - detail::fvec4SIMD const & x, - detail::fvec4SIMD const & y); - - //! Returns a vector in the same direction as x but with length of 1. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - detail::fvec4SIMD normalize( - detail::fvec4SIMD const & x); - - //! Returns a vector in the same direction as x but with length of 1. - //! Less accurate but much faster than simdNormalize. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - detail::fvec4SIMD fastNormalize( - detail::fvec4SIMD const & x); - - //! If dot(Nref, I) < 0.0, return N, otherwise, return -N. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - detail::fvec4SIMD simdFaceforward( - detail::fvec4SIMD const & N, - detail::fvec4SIMD const & I, - detail::fvec4SIMD const & Nref); - - //! For the incident vector I and surface orientation N, - //! returns the reflection direction : result = I - 2.0 * dot(N, I) * N. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - detail::fvec4SIMD reflect( - detail::fvec4SIMD const & I, - detail::fvec4SIMD const & N); - - //! For the incident vector I and surface normal N, - //! and the ratio of indices of refraction eta, - //! return the refraction vector. - //! (From GLM_GTX_simd_vec4 extension, geometry functions) - detail::fvec4SIMD refract( - detail::fvec4SIMD const & I, - detail::fvec4SIMD const & N, - float const & eta); - - //! Returns the positive square root of x. - //! (From GLM_GTX_simd_vec4 extension, exponential function) - detail::fvec4SIMD sqrt( - detail::fvec4SIMD const & x); - - //! Returns the positive square root of x with the nicest quality but very slow. - //! Slightly more accurate but much slower than simdSqrt. - //! (From GLM_GTX_simd_vec4 extension, exponential function) - detail::fvec4SIMD niceSqrt( - detail::fvec4SIMD const & x); - - //! Returns the positive square root of x - //! Less accurate but much faster than sqrt. - //! (From GLM_GTX_simd_vec4 extension, exponential function) - detail::fvec4SIMD fastSqrt( - detail::fvec4SIMD const & x); - - //! Returns the reciprocal of the positive square root of x. - //! (From GLM_GTX_simd_vec4 extension, exponential function) - detail::fvec4SIMD inversesqrt( - detail::fvec4SIMD const & x); - - //! Returns the reciprocal of the positive square root of x. - //! Faster than inversesqrt but less accurate. - //! (From GLM_GTX_simd_vec4 extension, exponential function) - detail::fvec4SIMD fastInversesqrt( - detail::fvec4SIMD const & x); - - ///@} - }//namespace simd_vec4 - }//namespace gtx + enum ctor{null}; + typedef __m128 value_type; + typedef std::size_t size_type; + static size_type value_size(); + + typedef fvec4SIMD type; + typedef tvec4 bool_type; + + __m128 Data; + + ////////////////////////////////////// + // Implicit basic constructors + + fvec4SIMD(); + fvec4SIMD(__m128 const & Data); + fvec4SIMD(fvec4SIMD const & v); + + ////////////////////////////////////// + // Explicit basic constructors + + explicit fvec4SIMD( + ctor); + explicit fvec4SIMD( + float const & s); + explicit fvec4SIMD( + float const & x, + float const & y, + float const & z, + float const & w); + explicit fvec4SIMD( + tvec4 const & v); + + //////////////////////////////////////// + //// Convertion vector constructors + + fvec4SIMD(vec2 const & v, float const & s1, float const & s2); + fvec4SIMD(float const & s1, vec2 const & v, float const & s2); + fvec4SIMD(float const & s1, float const & s2, vec2 const & v); + fvec4SIMD(vec3 const & v, float const & s); + fvec4SIMD(float const & s, vec3 const & v); + fvec4SIMD(vec2 const & v1, vec2 const & v2); + //fvec4SIMD(ivec4SIMD const & v); + + ////////////////////////////////////// + // Unary arithmetic operators + + fvec4SIMD& operator= (fvec4SIMD const & v); + fvec4SIMD& operator+=(fvec4SIMD const & v); + fvec4SIMD& operator-=(fvec4SIMD const & v); + fvec4SIMD& operator*=(fvec4SIMD const & v); + fvec4SIMD& operator/=(fvec4SIMD const & v); + + fvec4SIMD& operator+=(float const & s); + fvec4SIMD& operator-=(float const & s); + fvec4SIMD& operator*=(float const & s); + fvec4SIMD& operator/=(float const & s); + + fvec4SIMD& operator++(); + fvec4SIMD& operator--(); + + ////////////////////////////////////// + // Swizzle operators + + template + fvec4SIMD& swizzle(); + template + fvec4SIMD swizzle() const; + template + fvec4SIMD swizzle() const; + template + fvec4SIMD swizzle() const; + template + fvec4SIMD swizzle() const; + }; +}//namespace detail + +namespace gtx{ +namespace simd_vec4 ///< GLM_GTX_simd_vec4 extension: SIMD implementation of vec4 type. +{ + typedef detail::fvec4SIMD simdVec4; + + /// \addtogroup gtx_simd_vec4 + ///@{ + + //! Convert a simdVec4 to a vec4. + //! (From GLM_GTX_simd_vec4 extension) + detail::tvec4 vec4_cast( + detail::fvec4SIMD const & x); + + //! Returns x if x >= 0; otherwise, it returns -x. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD abs(detail::fvec4SIMD const & x); + + //! Returns 1.0 if x > 0, 0.0 if x = 0, or -1.0 if x < 0. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD sign(detail::fvec4SIMD const & x); + + //! Returns a value equal to the nearest integer that is less then or equal to x. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD floor(detail::fvec4SIMD const & x); + + //! Returns a value equal to the nearest integer to x + //! whose absolute value is not larger than the absolute value of x. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD trunc(detail::fvec4SIMD const & x); + + //! Returns a value equal to the nearest integer to x. + //! The fraction 0.5 will round in a direction chosen by the + //! implementation, presumably the direction that is fastest. + //! This includes the possibility that round(x) returns the + //! same value as roundEven(x) for all values of x. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD round(detail::fvec4SIMD const & x); + + //! Returns a value equal to the nearest integer to x. + //! A fractional part of 0.5 will round toward the nearest even + //! integer. (Both 3.5 and 4.5 for x will return 4.0.) + //! (From GLM_GTX_simd_vec4 extension, common function) + //detail::fvec4SIMD roundEven(detail::fvec4SIMD const & x); + + //! Returns a value equal to the nearest integer + //! that is greater than or equal to x. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD ceil(detail::fvec4SIMD const & x); + + //! Return x - floor(x). + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD fract(detail::fvec4SIMD const & x); + + //! Modulus. Returns x - y * floor(x / y) + //! for each component in x using the floating point value y. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD mod( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y); + + //! Modulus. Returns x - y * floor(x / y) + //! for each component in x using the floating point value y. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD mod( + detail::fvec4SIMD const & x, + float const & y); + + //! Returns the fractional part of x and sets i to the integer + //! part (as a whole number floating point value). Both the + //! return value and the output parameter will have the same + //! sign as x. + //! (From GLM_GTX_simd_vec4 extension, common function) + //detail::fvec4SIMD modf( + // detail::fvec4SIMD const & x, + // detail::fvec4SIMD & i); + + //! Returns y if y < x; otherwise, it returns x. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD min( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y); + + detail::fvec4SIMD min( + detail::fvec4SIMD const & x, + float const & y); + + //! Returns y if x < y; otherwise, it returns x. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD max( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y); + + detail::fvec4SIMD max( + detail::fvec4SIMD const & x, + float const & y); + + //! Returns min(max(x, minVal), maxVal) for each component in x + //! using the floating-point values minVal and maxVal. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD clamp( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & minVal, + detail::fvec4SIMD const & maxVal); + + detail::fvec4SIMD clamp( + detail::fvec4SIMD const & x, + float const & minVal, + float const & maxVal); + + //! \return If genTypeU is a floating scalar or vector: + //! Returns x * (1.0 - a) + y * a, i.e., the linear blend of + //! x and y using the floating-point value a. + //! The value for a is not restricted to the range [0, 1]. + //! + //! \return If genTypeU is a boolean scalar or vector: + //! Selects which vector each returned component comes + //! from. For a component of a that is false, the + //! corresponding component of x is returned. For a + //! component of a that is true, the corresponding + //! component of y is returned. Components of x and y that + //! are not selected are allowed to be invalid floating point + //! values and will have no effect on the results. Thus, this + //! provides different functionality than + //! genType mix(genType x, genType y, genType(a)) + //! where a is a Boolean vector. + //! + //! From GLSL 1.30.08 specification, section 8.3 + //! + //! \param[in] x Floating point scalar or vector. + //! \param[in] y Floating point scalar or vector. + //! \param[in] a Floating point or boolean scalar or vector. + //! + // \todo Test when 'a' is a boolean. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD mix( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y, + detail::fvec4SIMD const & a); + + //! Returns 0.0 if x < edge, otherwise it returns 1.0. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD step( + detail::fvec4SIMD const & edge, + detail::fvec4SIMD const & x); + + detail::fvec4SIMD step( + float const & edge, + detail::fvec4SIMD const & x); + + //! Returns 0.0 if x <= edge0 and 1.0 if x >= edge1 and + //! performs smooth Hermite interpolation between 0 and 1 + //! when edge0 < x < edge1. This is useful in cases where + //! you would want a threshold function with a smooth + //! transition. This is equivalent to: + //! genType t; + //! t = clamp ((x – edge0) / (edge1 – edge0), 0, 1); + //! return t * t * (3 – 2 * t); + //! Results are undefined if edge0 >= edge1. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD smoothstep( + detail::fvec4SIMD const & edge0, + detail::fvec4SIMD const & edge1, + detail::fvec4SIMD const & x); + + detail::fvec4SIMD smoothstep( + float const & edge0, + float const & edge1, + detail::fvec4SIMD const & x); + + //! Returns true if x holds a NaN (not a number) + //! representation in the underlying implementation's set of + //! floating point representations. Returns false otherwise, + //! including for implementations with no NaN + //! representations. + //! (From GLM_GTX_simd_vec4 extension, common function) + //bvec4 isnan(detail::fvec4SIMD const & x); + + //! Returns true if x holds a positive infinity or negative + //! infinity representation in the underlying implementation's + //! set of floating point representations. Returns false + //! otherwise, including for implementations with no infinity + //! representations. + //! (From GLM_GTX_simd_vec4 extension, common function) + //bvec4 isinf(detail::fvec4SIMD const & x); + + //! Returns a signed or unsigned integer value representing + //! the encoding of a floating-point value. The floatingpoint + //! value's bit-level representation is preserved. + //! (From GLM_GTX_simd_vec4 extension, common function) + //detail::ivec4SIMD floatBitsToInt(detail::fvec4SIMD const & value); + + //! Returns a floating-point value corresponding to a signed + //! or unsigned integer encoding of a floating-point value. + //! If an inf or NaN is passed in, it will not signal, and the + //! resulting floating point value is unspecified. Otherwise, + //! the bit-level representation is preserved. + //! (From GLM_GTX_simd_vec4 extension, common function) + //detail::fvec4SIMD intBitsToFloat(detail::ivec4SIMD const & value); + + //! Computes and returns a * b + c. + //! (From GLM_GTX_simd_vec4 extension, common function) + detail::fvec4SIMD fma( + detail::fvec4SIMD const & a, + detail::fvec4SIMD const & b, + detail::fvec4SIMD const & c); + + //! Splits x into a floating-point significand in the range + //! [0.5, 1.0) and an integral exponent of two, such that: + //! x = significand * exp(2, exponent) + //! The significand is returned by the function and the + //! exponent is returned in the parameter exp. For a + //! floating-point value of zero, the significant and exponent + //! are both zero. For a floating-point value that is an + //! infinity or is not a number, the results are undefined. + //! (From GLM_GTX_simd_vec4 extension, common function) + //detail::fvec4SIMD frexp(detail::fvec4SIMD const & x, detail::ivec4SIMD & exp); + + //! Builds a floating-point number from x and the + //! corresponding integral exponent of two in exp, returning: + //! significand * exp(2, exponent) + //! If this product is too large to be represented in the + //! floating-point type, the result is undefined. + //! (From GLM_GTX_simd_vec4 extension, common function) + //detail::fvec4SIMD ldexp(detail::fvec4SIMD const & x, detail::ivec4SIMD const & exp); + + //! Returns the length of x, i.e., sqrt(x * x). + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + float length( + detail::fvec4SIMD const & x); + + //! Returns the length of x, i.e., sqrt(x * x). + //! Less accurate but much faster than simdLength. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + float fastLength( + detail::fvec4SIMD const & x); + + //! Returns the length of x, i.e., sqrt(x * x). + //! Slightly more accurate but much slower than simdLength. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + float niceLength( + detail::fvec4SIMD const & x); + + //! Returns the length of x, i.e., sqrt(x * x). + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD length4( + detail::fvec4SIMD const & x); + + //! Returns the length of x, i.e., sqrt(x * x). + //! Less accurate but much faster than simdLength4. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD fastLength4( + detail::fvec4SIMD const & x); + + //! Returns the length of x, i.e., sqrt(x * x). + //! Slightly more accurate but much slower than simdLength4. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD niceLength4( + detail::fvec4SIMD const & x); + + //! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + float distance( + detail::fvec4SIMD const & p0, + detail::fvec4SIMD const & p1); + + //! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD distance4( + detail::fvec4SIMD const & p0, + detail::fvec4SIMD const & p1); + + //! Returns the dot product of x and y, i.e., result = x * y. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + float simdDot( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y); + + //! Returns the dot product of x and y, i.e., result = x * y. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD dot4( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y); + + //! Returns the cross product of x and y. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD cross( + detail::fvec4SIMD const & x, + detail::fvec4SIMD const & y); + + //! Returns a vector in the same direction as x but with length of 1. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD normalize( + detail::fvec4SIMD const & x); + + //! Returns a vector in the same direction as x but with length of 1. + //! Less accurate but much faster than simdNormalize. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD fastNormalize( + detail::fvec4SIMD const & x); + + //! If dot(Nref, I) < 0.0, return N, otherwise, return -N. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD simdFaceforward( + detail::fvec4SIMD const & N, + detail::fvec4SIMD const & I, + detail::fvec4SIMD const & Nref); + + //! For the incident vector I and surface orientation N, + //! returns the reflection direction : result = I - 2.0 * dot(N, I) * N. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD reflect( + detail::fvec4SIMD const & I, + detail::fvec4SIMD const & N); + + //! For the incident vector I and surface normal N, + //! and the ratio of indices of refraction eta, + //! return the refraction vector. + //! (From GLM_GTX_simd_vec4 extension, geometry functions) + detail::fvec4SIMD refract( + detail::fvec4SIMD const & I, + detail::fvec4SIMD const & N, + float const & eta); + + //! Returns the positive square root of x. + //! (From GLM_GTX_simd_vec4 extension, exponential function) + detail::fvec4SIMD sqrt( + detail::fvec4SIMD const & x); + + //! Returns the positive square root of x with the nicest quality but very slow. + //! Slightly more accurate but much slower than simdSqrt. + //! (From GLM_GTX_simd_vec4 extension, exponential function) + detail::fvec4SIMD niceSqrt( + detail::fvec4SIMD const & x); + + //! Returns the positive square root of x + //! Less accurate but much faster than sqrt. + //! (From GLM_GTX_simd_vec4 extension, exponential function) + detail::fvec4SIMD fastSqrt( + detail::fvec4SIMD const & x); + + //! Returns the reciprocal of the positive square root of x. + //! (From GLM_GTX_simd_vec4 extension, exponential function) + detail::fvec4SIMD inversesqrt( + detail::fvec4SIMD const & x); + + //! Returns the reciprocal of the positive square root of x. + //! Faster than inversesqrt but less accurate. + //! (From GLM_GTX_simd_vec4 extension, exponential function) + detail::fvec4SIMD fastInversesqrt( + detail::fvec4SIMD const & x); + + /// @} +}//namespace simd_vec4 +}//namespace gtx }//namespace glm #include "simd_vec4.inl" diff --git a/glm/gtx/simplex.hpp b/glm/gtx/simplex.hpp index 4100cba2..390a641e 100644 --- a/glm/gtx/simplex.hpp +++ b/glm/gtx/simplex.hpp @@ -22,8 +22,7 @@ namespace glm{ namespace gtx{ -//! GLM_GTX_simplex extension: Spline functions -namespace spline +namespace spline ///< GLM_GTX_simplex extension: Spline functions { /// \addtogroup gtx_spline ///@{ @@ -58,11 +57,10 @@ namespace spline genType const & v4, typename genType::value_type const & s); - ///@} - -}//namespace simplex -}//namespace gtx -}//namespace glm + /// @} +}// namespace simplex +}// namespace gtx +}// namespace glm #include "simplex.inl" diff --git a/glm/gtx/spline.hpp b/glm/gtx/spline.hpp index fd57e15c..961b76d6 100644 --- a/glm/gtx/spline.hpp +++ b/glm/gtx/spline.hpp @@ -23,13 +23,12 @@ namespace glm{ namespace gtx{ -//! GLM_GTX_spline extension: Spline functions -namespace spline +namespace spline ///< GLM_GTX_spline extension: Spline functions { using namespace gtx::optimum_pow; /// \addtogroup gtx_spline - ///@{ + /// @{ //! Return a point from a catmull rom curve. //! From GLM_GTX_spline extension. @@ -61,8 +60,7 @@ namespace spline genType const & v4, typename genType::value_type const & s); - ///@} - + /// @} }//namespace spline }//namespace gtx }//namespace glm diff --git a/glm/gtx/std_based_type.hpp b/glm/gtx/std_based_type.hpp index b9f321ea..889cd802 100644 --- a/glm/gtx/std_based_type.hpp +++ b/glm/gtx/std_based_type.hpp @@ -21,50 +21,48 @@ # pragma message("GLM: GLM_GTX_std_based_type extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace std_based_type ///< GLM_GTX_std_based_type extension: Add support vector types based on C++ standard type { - namespace gtx{ - //! GLM_GTX_std_based_type extension: Add support vector types based on C++ standard type - namespace std_based_type - { - typedef detail::tvec2 size2; - typedef detail::tvec3 size3; - typedef detail::tvec4 size4; + typedef detail::tvec2 size2; + typedef detail::tvec3 size3; + typedef detail::tvec4 size4; - typedef detail::tvec2 scvec2; - typedef detail::tvec3 scvec3; - typedef detail::tvec4 scvec4; + typedef detail::tvec2 scvec2; + typedef detail::tvec3 scvec3; + typedef detail::tvec4 scvec4; - typedef detail::tvec2 ucvec2; - typedef detail::tvec3 ucvec3; - typedef detail::tvec4 ucvec4; + typedef detail::tvec2 ucvec2; + typedef detail::tvec3 ucvec3; + typedef detail::tvec4 ucvec4; - typedef detail::tvec2 ssvec2; - typedef detail::tvec3 ssvec3; - typedef detail::tvec4 ssvec4; + typedef detail::tvec2 ssvec2; + typedef detail::tvec3 ssvec3; + typedef detail::tvec4 ssvec4; - typedef detail::tvec2 usvec2; - typedef detail::tvec3 usvec3; - typedef detail::tvec4 usvec4; + typedef detail::tvec2 usvec2; + typedef detail::tvec3 usvec3; + typedef detail::tvec4 usvec4; - typedef detail::tvec2 sivec2; - typedef detail::tvec3 sivec3; - typedef detail::tvec4 sivec4; + typedef detail::tvec2 sivec2; + typedef detail::tvec3 sivec3; + typedef detail::tvec4 sivec4; - typedef detail::tvec2 uivec2; - typedef detail::tvec3 uivec3; - typedef detail::tvec4 uivec4; + typedef detail::tvec2 uivec2; + typedef detail::tvec3 uivec3; + typedef detail::tvec4 uivec4; - typedef detail::tvec2 slvec2; - typedef detail::tvec3 slvec3; - typedef detail::tvec4 slvec4; + typedef detail::tvec2 slvec2; + typedef detail::tvec3 slvec3; + typedef detail::tvec4 slvec4; - typedef detail::tvec2 ulvec2; - typedef detail::tvec3 ulvec3; - typedef detail::tvec4 ulvec4; + typedef detail::tvec2 ulvec2; + typedef detail::tvec3 ulvec3; + typedef detail::tvec4 ulvec4; - }//namespace std_based_type - }//namespace gtx +}//namespace std_based_type +}//namespace gtx }//namespace glm #include "std_based_type.inl" diff --git a/glm/gtx/string_cast.hpp b/glm/gtx/string_cast.hpp index b0c88df7..1c050b6c 100644 --- a/glm/gtx/string_cast.hpp +++ b/glm/gtx/string_cast.hpp @@ -28,29 +28,26 @@ # pragma message("GLM: GLM_GTX_string_cast extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace string_cast ///< GLM_GTX_string_cast extension: Setup strings for GLM type values { - namespace gtx{ - //! GLM_GTX_string_cast extension: Setup strings for GLM type values - namespace string_cast - { - using namespace gtc::half_float; - using namespace gtx::integer; - using namespace gtx::unsigned_int; - using namespace gtx::quaternion; + using namespace gtc::half_float; + using namespace gtx::integer; + using namespace gtx::unsigned_int; + using namespace gtx::quaternion; - /// \addtogroup gtx_string_cast - ///@{ + /// \addtogroup gtx_string_cast + /// @{ - //! Create a string from a GLM type value. - //! From GLM_GTX_string_cast extension. - template - std::string to_string(genType const & x); + //! Create a string from a GLM type value. + //! From GLM_GTX_string_cast extension. + template + std::string to_string(genType const & x); - ///@} - - }//namespace string_cast - }//namespace gtx + /// @} +}//namespace string_cast +}//namespace gtx }//namespace glm #include "string_cast.inl" diff --git a/glm/gtx/transform.hpp b/glm/gtx/transform.hpp index 092cf3f0..ac050b0a 100644 --- a/glm/gtx/transform.hpp +++ b/glm/gtx/transform.hpp @@ -22,81 +22,78 @@ # pragma message("GLM: GLM_GTX_transform extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace transform ///< GLM_GTX_transform extension: Add transformation matrices { - namespace gtx{ - //! GLM_GTX_transform extension: Add transformation matrices - namespace transform - { - using namespace gtc::matrix_transform; + using namespace gtc::matrix_transform; - /// \addtogroup gtx_transform - ///@{ + /// \addtogroup gtx_transform + /// @{ - //! Builds a translation 4 * 4 matrix created from 3 scalars. - //! From GLM_GTX_transform extension. - template - detail::tmat4x4 translate( - T x, T y, T z); + //! Builds a translation 4 * 4 matrix created from 3 scalars. + //! From GLM_GTX_transform extension. + template + detail::tmat4x4 translate( + T x, T y, T z); - //! Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars. - //! From GLM_GTX_transform extension. - template - detail::tmat4x4 translate( - detail::tmat4x4 const & m, - T x, T y, T z); + //! Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars. + //! From GLM_GTX_transform extension. + template + detail::tmat4x4 translate( + detail::tmat4x4 const & m, + T x, T y, T z); - //! Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars. - //! From GLM_GTX_transform extension. - template - detail::tmat4x4 translate( - detail::tvec3 const & v); + //! Transforms a matrix with a translation 4 * 4 matrix created from 3 scalars. + //! From GLM_GTX_transform extension. + template + detail::tmat4x4 translate( + detail::tvec3 const & v); - //! Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. - //! From GLM_GTX_transform extension. - template - detail::tmat4x4 rotate( - T angle, - T x, T y, T z); + //! Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. + //! From GLM_GTX_transform extension. + template + detail::tmat4x4 rotate( + T angle, + T x, T y, T z); - //! Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. - //! From GLM_GTX_transform extension. - template - detail::tmat4x4 rotate( - T angle, - detail::tvec3 const & v); + //! Builds a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. + //! From GLM_GTX_transform extension. + template + detail::tmat4x4 rotate( + T angle, + detail::tvec3 const & v); - //! Transforms a matrix with a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. - //! From GLM_GTX_transform extension. - template - detail::tmat4x4 rotate( - detail::tmat4x4 const & m, - T angle, - T x, T y, T z); + //! Transforms a matrix with a rotation 4 * 4 matrix created from an axis of 3 scalars and an angle expressed in degrees. + //! From GLM_GTX_transform extension. + template + detail::tmat4x4 rotate( + detail::tmat4x4 const & m, + T angle, + T x, T y, T z); - //! Builds a scale 4 * 4 matrix created from 3 scalars. - //! From GLM_GTX_transform extension. - template - detail::tmat4x4 scale( - T x, T y, T z); + //! Builds a scale 4 * 4 matrix created from 3 scalars. + //! From GLM_GTX_transform extension. + template + detail::tmat4x4 scale( + T x, T y, T z); - //! Transforms a matrix with a scale 4 * 4 matrix created from 3 scalars. - //! From GLM_GTX_transform extension. - template - detail::tmat4x4 scale( - detail::tmat4x4 const & m, - T x, T y, T z); + //! Transforms a matrix with a scale 4 * 4 matrix created from 3 scalars. + //! From GLM_GTX_transform extension. + template + detail::tmat4x4 scale( + detail::tmat4x4 const & m, + T x, T y, T z); - //! Transforms a matrix with a scale 4 * 4 matrix created from a vector of 3 components. - //! From GLM_GTX_transform extension. - template - detail::tmat4x4 scale( - detail::tvec3 const & v); + //! Transforms a matrix with a scale 4 * 4 matrix created from a vector of 3 components. + //! From GLM_GTX_transform extension. + template + detail::tmat4x4 scale( + detail::tvec3 const & v); - ///@} - - }//namespace transform - }//namespace gtx + /// @} +}//namespace transform +}//namespace gtx }//namespace glm #include "transform.inl" diff --git a/glm/gtx/transform2.hpp b/glm/gtx/transform2.hpp index 40c026d8..f62b6593 100644 --- a/glm/gtx/transform2.hpp +++ b/glm/gtx/transform2.hpp @@ -22,97 +22,94 @@ # pragma message("GLM: GLM_GTX_transform2 extension included") #endif -namespace glm +namespace glm{ +namespace gtx{ +namespace transform2 ///< GLM_GTX_transform2 extension: Add extra transformation matrices { - namespace gtx{ - //! GLM_GTX_transform2 extension: Add extra transformation matrices - namespace transform2 - { - using namespace gtx::transform; + using namespace gtx::transform; - /// \addtogroup gtx_transform2 - ///@{ + /// \addtogroup gtx_transform2 + /// @{ - //! Transforms a matrix with a shearing on X axis. - //! From GLM_GTX_transform2 extension. - template - detail::tmat3x3 shearX2D( - detail::tmat3x3 const & m, - T y); + //! Transforms a matrix with a shearing on X axis. + //! From GLM_GTX_transform2 extension. + template + detail::tmat3x3 shearX2D( + detail::tmat3x3 const & m, + T y); - //! Transforms a matrix with a shearing on Y axis. - //! From GLM_GTX_transform2 extension. - template - detail::tmat3x3 shearY2D( - detail::tmat3x3 const & m, - T x); + //! Transforms a matrix with a shearing on Y axis. + //! From GLM_GTX_transform2 extension. + template + detail::tmat3x3 shearY2D( + detail::tmat3x3 const & m, + T x); - //! Transforms a matrix with a shearing on X axis - //! From GLM_GTX_transform2 extension. - template - detail::tmat4x4 shearX3D( - const detail::tmat4x4 & m, - T y, - T z); + //! Transforms a matrix with a shearing on X axis + //! From GLM_GTX_transform2 extension. + template + detail::tmat4x4 shearX3D( + const detail::tmat4x4 & m, + T y, + T z); - //! Transforms a matrix with a shearing on Y axis. - //! From GLM_GTX_transform2 extension. - template - detail::tmat4x4 shearY3D( - const detail::tmat4x4 & m, - T x, - T z); + //! Transforms a matrix with a shearing on Y axis. + //! From GLM_GTX_transform2 extension. + template + detail::tmat4x4 shearY3D( + const detail::tmat4x4 & m, + T x, + T z); - //! Transforms a matrix with a shearing on Z axis. - //! From GLM_GTX_transform2 extension. - template - detail::tmat4x4 shearZ3D( - const detail::tmat4x4 & m, - T x, - T y); + //! Transforms a matrix with a shearing on Z axis. + //! From GLM_GTX_transform2 extension. + template + detail::tmat4x4 shearZ3D( + const detail::tmat4x4 & m, + T x, + T y); - //template GLM_FUNC_QUALIFIER detail::tmat4x4 shear(const detail::tmat4x4 & m, shearPlane, planePoint, angle) - // Identity + tan(angle) * cross(Normal, OnPlaneVector) 0 - // - dot(PointOnPlane, normal) * OnPlaneVector 1 + //template GLM_FUNC_QUALIFIER detail::tmat4x4 shear(const detail::tmat4x4 & m, shearPlane, planePoint, angle) + // Identity + tan(angle) * cross(Normal, OnPlaneVector) 0 + // - dot(PointOnPlane, normal) * OnPlaneVector 1 - // Reflect functions seem to don't work - //template detail::tmat3x3 reflect2D(const detail::tmat3x3 & m, const detail::tvec3& normal){return reflect2DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension) - //template detail::tmat4x4 reflect3D(const detail::tmat4x4 & m, const detail::tvec3& normal){return reflect3DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension) + // Reflect functions seem to don't work + //template detail::tmat3x3 reflect2D(const detail::tmat3x3 & m, const detail::tvec3& normal){return reflect2DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension) + //template detail::tmat4x4 reflect3D(const detail::tmat4x4 & m, const detail::tvec3& normal){return reflect3DGTX(m, normal);} //!< \brief Build a reflection matrix (from GLM_GTX_transform2 extension) - //! Build planar projection matrix along normal axis. - //! From GLM_GTX_transform2 extension. - template - detail::tmat3x3 proj2D( - const detail::tmat3x3 & m, - const detail::tvec3& normal); + //! Build planar projection matrix along normal axis. + //! From GLM_GTX_transform2 extension. + template + detail::tmat3x3 proj2D( + const detail::tmat3x3 & m, + const detail::tvec3& normal); - //! Build planar projection matrix along normal axis. - //! From GLM_GTX_transform2 extension. - template - detail::tmat4x4 proj3D( - const detail::tmat4x4 & m, - const detail::tvec3& normal); + //! Build planar projection matrix along normal axis. + //! From GLM_GTX_transform2 extension. + template + detail::tmat4x4 proj3D( + const detail::tmat4x4 & m, + const detail::tvec3& normal); - //! Build a scale bias matrix. - //! From GLM_GTX_transform2 extension. - template - detail::tmat4x4 scaleBias( - valType scale, - valType bias); + //! Build a scale bias matrix. + //! From GLM_GTX_transform2 extension. + template + detail::tmat4x4 scaleBias( + valType scale, + valType bias); - //! Build a scale bias matrix. - //! From GLM_GTX_transform2 extension. - template - detail::tmat4x4 scaleBias( - detail::tmat4x4 const & m, - valType scale, - valType bias); + //! Build a scale bias matrix. + //! From GLM_GTX_transform2 extension. + template + detail::tmat4x4 scaleBias( + detail::tmat4x4 const & m, + valType scale, + valType bias); - ///@} - - }//namespace transform2 - }//namespace gtx -}//namespace glm + /// @} +}// namespace transform2 +}// namespace gtx +}// namespace glm #include "transform2.inl" diff --git a/glm/gtx/ulp.hpp b/glm/gtx/ulp.hpp index 39c51592..02214ffe 100644 --- a/glm/gtx/ulp.hpp +++ b/glm/gtx/ulp.hpp @@ -25,7 +25,7 @@ namespace gtx{ namespace ulp ///< GLM_GTX_ulp extension: Precision calculation functions { /// \addtogroup gtx_ulp - ///@{ + /// @{ //! Return the next ULP value(s) after the input value(s). //! From GLM_GTX_ulp extension. @@ -58,10 +58,9 @@ namespace ulp ///< GLM_GTX_ulp extension: Precision calculation functions vecType float_distance(vecType const & x, vecType const & y); ///@} - -}//namespace ulp -}//namespace gtx -}//namespace glm +}// namespace ulp +}// namespace gtx +}// namespace glm #include "ulp.inl" diff --git a/glm/gtx/unsigned_int.hpp b/glm/gtx/unsigned_int.hpp index 77f11fa6..2f840ffa 100644 --- a/glm/gtx/unsigned_int.hpp +++ b/glm/gtx/unsigned_int.hpp @@ -29,7 +29,7 @@ namespace unsigned_int ///< GLM_GTX_unsigned_int extension: Add support for unsi using namespace gtx::integer; /// \addtogroup gtx_unsigned_int - ///@{ + /// @{ //! 32bit signed integer. //! From GLM_GTX_unsigned_int extension. @@ -47,8 +47,7 @@ namespace unsigned_int ///< GLM_GTX_unsigned_int extension: Add support for unsi //! From GLM_GTX_unsigned_int extension. uint mod(uint x, uint y); - ///@} - + /// @} }//namespace unsigned_int }//namespace gtx }//namespace glm diff --git a/glm/gtx/vec1.hpp b/glm/gtx/vec1.hpp index 552cce92..1243b335 100644 --- a/glm/gtx/vec1.hpp +++ b/glm/gtx/vec1.hpp @@ -109,9 +109,9 @@ namespace precision typedef precision::mediump_uvec1 uvec1; #endif//GLM_PRECISION -}//namespace vec1 -}//namespace gtx -}//namespace glm +}// namespace vec1 +}// namespace gtx +}// namespace glm #include "vec1.inl" diff --git a/glm/gtx/vector_access.hpp b/glm/gtx/vector_access.hpp index 86ca1d97..1d40dfed 100644 --- a/glm/gtx/vector_access.hpp +++ b/glm/gtx/vector_access.hpp @@ -25,7 +25,7 @@ namespace gtx{ namespace vector_access ///< GLM_GTX_vector_access extension: Function to set values to vectors { /// \addtogroup gtx_vector_access - ///@{ + /// @{ //! Set values to a 2 components vector. //! From GLM_GTX_vector_access extension. @@ -54,8 +54,7 @@ namespace vector_access ///< GLM_GTX_vector_access extension: Function to set va valType const & z, valType const & w); - ///@} - + /// @} }//namespace vector_access }//namespace gtx }//namespace glm diff --git a/glm/gtx/vector_angle.hpp b/glm/gtx/vector_angle.hpp index ece7d358..743b36db 100644 --- a/glm/gtx/vector_angle.hpp +++ b/glm/gtx/vector_angle.hpp @@ -60,10 +60,10 @@ namespace vector_angle ///< GLM_GTX_vector_angle extension: Compute angle betwee detail::tvec3 const & y, detail::tvec3 const & ref); - ///@} -}//namespace vector_angle -}//namespace gtx -}//namespace glm + /// @} +}// namespace vector_angle +}// namespace gtx +}// namespace glm #include "vector_angle.inl" diff --git a/glm/gtx/vector_query.hpp b/glm/gtx/vector_query.hpp index ae2879a0..06d90979 100644 --- a/glm/gtx/vector_query.hpp +++ b/glm/gtx/vector_query.hpp @@ -27,7 +27,7 @@ namespace gtx{ namespace vector_query ///< GLM_GTX_vector_query extension: Query informations of vector types { /// \addtogroup gtx_vector_query - ///@{ + /// @{ //! Check if two vectors are collinears. //! From GLM_GTX_vector_query extensions. @@ -83,11 +83,10 @@ namespace vector_query ///< GLM_GTX_vector_query extension: Query informations o genType const & v1, typename genType::value_type const & epsilon = std::numeric_limits::epsilon()); - ///@} - -}//namespace vector_query -}//namespace gtx -}//namespace glm + /// @} +}// namespace vector_query +}// namespace gtx +}// namespace glm #include "vector_query.inl" diff --git a/glm/gtx/verbose_operator.hpp b/glm/gtx/verbose_operator.hpp index 28fd1d20..ecd336e9 100644 --- a/glm/gtx/verbose_operator.hpp +++ b/glm/gtx/verbose_operator.hpp @@ -25,7 +25,7 @@ namespace gtx{ namespace verbose_operator ///< GLM_GTX_verbose_operator extension: Use words to replace operators { /// \addtogroup gtx_verbose_operator - ///@{ + /// @{ //! Addition of two values //! From GLM_GTX_verbose_operator extension. @@ -52,10 +52,10 @@ namespace verbose_operator ///< GLM_GTX_verbose_operator extension: Use words to template genTypeT mad(genTypeT const & a, genTypeU const & b, genTypeV const & c); - ///@} -}//namespace verbose_operator -}//namespace gtx -}//namespace glm + /// @} +}// namespace verbose_operator +}// namespace gtx +}// namespace glm #include "verbose_operator.inl" diff --git a/glm/gtx/wrap.hpp b/glm/gtx/wrap.hpp index 41f439c8..e0d0e0fd 100644 --- a/glm/gtx/wrap.hpp +++ b/glm/gtx/wrap.hpp @@ -25,7 +25,7 @@ namespace gtx{ namespace wrap ///< GLM_GTX_wrap: Wrapping mode using my texture samping. { /// \addtogroup gtx_wrap - ///@{ + /// @{ //! Simulate GL_CLAMP OpenGL wrap mode //! From GLM_GTX_wrap extension. @@ -42,11 +42,10 @@ namespace wrap ///< GLM_GTX_wrap: Wrapping mode using my texture samping. template genType mirrorRepeat(genType const & Texcoord); - ///@} - -}//namespace wrap -}//namespace gtx -}//namespace glm + /// @} +}// namespace wrap +}// namespace gtx +}// namespace glm #include "wrap.inl" From d7510204c1e7b79d01f402f770b86e711e8ae5c8 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Wed, 18 May 2011 15:38:26 +0100 Subject: [PATCH 3/3] Updated header files formatting --- glm/gtc/half_float.hpp | 657 +++++++++++++++--------------- glm/gtc/matrix_access.hpp | 3 +- glm/gtc/matrix_integer.hpp | 306 +++++++------- glm/gtc/matrix_inverse.hpp | 3 +- glm/gtc/matrix_transform.hpp | 226 ++++++----- glm/gtc/quaternion.hpp | 318 ++++++++------- glm/gtc/swizzle.hpp | 542 +++++++++++++------------ glm/gtc/type_precision.hpp | 302 +++++++------- glm/gtc/type_ptr.hpp | 751 +++++++++++++++++------------------ 9 files changed, 1547 insertions(+), 1561 deletions(-) diff --git a/glm/gtc/half_float.hpp b/glm/gtc/half_float.hpp index 55e07da8..ab3a1daa 100644 --- a/glm/gtc/half_float.hpp +++ b/glm/gtc/half_float.hpp @@ -18,346 +18,345 @@ #endif namespace glm{ - namespace detail - { +namespace detail +{ #ifndef _MSC_EXTENSIONS - template <> - struct tvec2 - { - enum ctor{null}; - typedef thalf value_type; - typedef std::size_t size_type; - static size_type value_size(); - - typedef tvec2 type; - typedef tvec2 bool_type; - - ////////////////////////////////////// - // Data - - thalf x, y; - - ////////////////////////////////////// - // Accesses - - thalf & operator[](size_type i); - thalf const & operator[](size_type i) const; - - ////////////////////////////////////// - // Implicit basic constructors - - tvec2(); - tvec2(tvec2 const & v); - - ////////////////////////////////////// - // Explicit basic constructors - - explicit tvec2(ctor); - explicit tvec2( - thalf const & s); - explicit tvec2( - thalf const & s1, - thalf const & s2); - - ////////////////////////////////////// - // Swizzle constructors - - tvec2(tref2 const & r); - - ////////////////////////////////////// - // Convertion scalar constructors - - //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec2(U const & x); - //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec2(U const & x, V const & y); - - ////////////////////////////////////// - // Convertion vector constructors - - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec2(tvec2 const & v); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec2(tvec3 const & v); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec2(tvec4 const & v); - - ////////////////////////////////////// - // Unary arithmetic operators - - tvec2& operator= (tvec2 const & v); - - tvec2& operator+=(thalf const & s); - tvec2& operator+=(tvec2 const & v); - tvec2& operator-=(thalf const & s); - tvec2& operator-=(tvec2 const & v); - tvec2& operator*=(thalf const & s); - tvec2& operator*=(tvec2 const & v); - tvec2& operator/=(thalf const & s); - tvec2& operator/=(tvec2 const & v); - tvec2& operator++(); - tvec2& operator--(); - - ////////////////////////////////////// - // Swizzle operators - - thalf swizzle(comp X) const; - tvec2 swizzle(comp X, comp Y) const; - tvec3 swizzle(comp X, comp Y, comp Z) const; - tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; - tref2 swizzle(comp X, comp Y); - }; - - template <> - struct tvec3 - { - enum ctor{null}; - typedef thalf value_type; - typedef std::size_t size_type; - static size_type value_size(); - - typedef tvec3 type; - typedef tvec3 bool_type; - - ////////////////////////////////////// - // Data - - thalf x, y, z; - - ////////////////////////////////////// - // Accesses - - thalf & operator[](size_type i); - thalf const & operator[](size_type i) const; - - ////////////////////////////////////// - // Implicit basic constructors - - tvec3(); - tvec3(tvec3 const & v); - - ////////////////////////////////////// - // Explicit basic constructors - - explicit tvec3(ctor); - explicit tvec3( - thalf const & s); - explicit tvec3( - thalf const & s1, - thalf const & s2, - thalf const & s3); - - ////////////////////////////////////// - // Swizzle constructors - - tvec3(tref3 const & r); - - ////////////////////////////////////// - // Convertion scalar constructors - - //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec3(U const & x); - //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec3(U const & x, V const & y, W const & z); - - ////////////////////////////////////// - // Convertion vector constructors - - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec3(tvec2 const & v, B const & s); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec3(A const & s, tvec2 const & v); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec3(tvec3 const & v); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec3(tvec4 const & v); - - ////////////////////////////////////// - // Unary arithmetic operators - - tvec3& operator= (tvec3 const & v); - - tvec3& operator+=(thalf const & s); - tvec3& operator+=(tvec3 const & v); - tvec3& operator-=(thalf const & s); - tvec3& operator-=(tvec3 const & v); - tvec3& operator*=(thalf const & s); - tvec3& operator*=(tvec3 const & v); - tvec3& operator/=(thalf const & s); - tvec3& operator/=(tvec3 const & v); - tvec3& operator++(); - tvec3& operator--(); - - ////////////////////////////////////// - // Swizzle operators - - thalf swizzle(comp X) const; - tvec2 swizzle(comp X, comp Y) const; - tvec3 swizzle(comp X, comp Y, comp Z) const; - tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; - tref3 swizzle(comp X, comp Y, comp Z); - }; - - template <> - struct tvec4 - { - enum ctor{null}; - typedef thalf value_type; - typedef std::size_t size_type; - static size_type value_size(); - - typedef tvec4 type; - typedef tvec4 bool_type; - - ////////////////////////////////////// - // Data - - thalf x, y, z, w; - - ////////////////////////////////////// - // Accesses - - thalf & operator[](size_type i); - thalf const & operator[](size_type i) const; - - ////////////////////////////////////// - // Implicit basic constructors - - tvec4(); - tvec4(tvec4 const & v); - - ////////////////////////////////////// - // Explicit basic constructors - - explicit tvec4(ctor); - explicit tvec4( - thalf const & s); - explicit tvec4( - thalf const & s0, - thalf const & s1, - thalf const & s2, - thalf const & s3); - - ////////////////////////////////////// - // Swizzle constructors - - tvec4(tref4 const & r); - - ////////////////////////////////////// - // Convertion scalar constructors - - //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec4(U const & x); - //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec4(A const & x, B const & y, C const & z, D const & w); - - ////////////////////////////////////// - // Convertion vector constructors - - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec4(tvec2 const & v, B const & s1, C const & s2); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec4(A const & s1, tvec2 const & v, C const & s2); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec4(A const & s1, B const & s2, tvec2 const & v); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec4(tvec3 const & v, B const & s); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec4(A const & s, tvec3 const & v); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec4(tvec2 const & v1, tvec2 const & v2); - //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) - template - explicit tvec4(tvec4 const & v); - - ////////////////////////////////////// - // Unary arithmetic operators - - tvec4& operator= (tvec4 const & v); - - tvec4& operator+=(thalf const & s); - tvec4& operator+=(tvec4 const & v); - tvec4& operator-=(thalf const & s); - tvec4& operator-=(tvec4 const & v); - tvec4& operator*=(thalf const & s); - tvec4& operator*=(tvec4 const & v); - tvec4& operator/=(thalf const & s); - tvec4& operator/=(tvec4 const & v); - tvec4& operator++(); - tvec4& operator--(); - - ////////////////////////////////////// - // Swizzle operators - - thalf swizzle(comp X) const; - tvec2 swizzle(comp X, comp Y) const; - tvec3 swizzle(comp X, comp Y, comp Z) const; - tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; - tref4 swizzle(comp X, comp Y, comp Z, comp W); - }; -#endif//_MSC_EXTENSIONS - } - //namespace detail - - namespace gtc{ - //! GLM_GTC_half_float extension: Add support for half precision floating-point types - namespace half_float + template <> + struct tvec2 { - /// \addtogroup gtc_half_float - ///@{ + enum ctor{null}; + typedef thalf value_type; + typedef std::size_t size_type; + static size_type value_size(); - //! Type for half-precision floating-point numbers. - //! From GLM_GTC_half_float extension. - typedef detail::thalf half; + typedef tvec2 type; + typedef tvec2 bool_type; - //! Vector of 2 half-precision floating-point numbers. - //! From GLM_GTC_half_float extension. - typedef detail::tvec2 hvec2; + ////////////////////////////////////// + // Data - //! Vector of 3 half-precision floating-point numbers. - //! From GLM_GTC_half_float extension. - typedef detail::tvec3 hvec3; + thalf x, y; - //! Vector of 4 half-precision floating-point numbers. - //! From GLM_GTC_half_float extension. - typedef detail::tvec4 hvec4; + ////////////////////////////////////// + // Accesses - //! 2 * 2 matrix of half-precision floating-point numbers. - //! From GLM_GTC_half_float extension. - typedef detail::tmat2x2 hmat2; + thalf & operator[](size_type i); + thalf const & operator[](size_type i) const; - //! 3 * 3 matrix of half-precision floating-point numbers. - //! From GLM_GTC_half_float extension. - typedef detail::tmat3x3 hmat3; + ////////////////////////////////////// + // Implicit basic constructors - //! 4 * 4 matrix of half-precision floating-point numbers. - //! From GLM_GTC_half_float extension. - typedef detail::tmat4x4 hmat4; + tvec2(); + tvec2(tvec2 const & v); - ///@} + ////////////////////////////////////// + // Explicit basic constructors - }//namespace half_float - }//namespace gtc -}//namespace glm + explicit tvec2(ctor); + explicit tvec2( + thalf const & s); + explicit tvec2( + thalf const & s1, + thalf const & s2); + + ////////////////////////////////////// + // Swizzle constructors + + tvec2(tref2 const & r); + + ////////////////////////////////////// + // Convertion scalar constructors + + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec2(U const & x); + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec2(U const & x, V const & y); + + ////////////////////////////////////// + // Convertion vector constructors + + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec2(tvec2 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec2(tvec3 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec2(tvec4 const & v); + + ////////////////////////////////////// + // Unary arithmetic operators + + tvec2& operator= (tvec2 const & v); + + tvec2& operator+=(thalf const & s); + tvec2& operator+=(tvec2 const & v); + tvec2& operator-=(thalf const & s); + tvec2& operator-=(tvec2 const & v); + tvec2& operator*=(thalf const & s); + tvec2& operator*=(tvec2 const & v); + tvec2& operator/=(thalf const & s); + tvec2& operator/=(tvec2 const & v); + tvec2& operator++(); + tvec2& operator--(); + + ////////////////////////////////////// + // Swizzle operators + + thalf swizzle(comp X) const; + tvec2 swizzle(comp X, comp Y) const; + tvec3 swizzle(comp X, comp Y, comp Z) const; + tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + tref2 swizzle(comp X, comp Y); + }; + + template <> + struct tvec3 + { + enum ctor{null}; + typedef thalf value_type; + typedef std::size_t size_type; + static size_type value_size(); + + typedef tvec3 type; + typedef tvec3 bool_type; + + ////////////////////////////////////// + // Data + + thalf x, y, z; + + ////////////////////////////////////// + // Accesses + + thalf & operator[](size_type i); + thalf const & operator[](size_type i) const; + + ////////////////////////////////////// + // Implicit basic constructors + + tvec3(); + tvec3(tvec3 const & v); + + ////////////////////////////////////// + // Explicit basic constructors + + explicit tvec3(ctor); + explicit tvec3( + thalf const & s); + explicit tvec3( + thalf const & s1, + thalf const & s2, + thalf const & s3); + + ////////////////////////////////////// + // Swizzle constructors + + tvec3(tref3 const & r); + + ////////////////////////////////////// + // Convertion scalar constructors + + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec3(U const & x); + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec3(U const & x, V const & y, W const & z); + + ////////////////////////////////////// + // Convertion vector constructors + + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec3(tvec2 const & v, B const & s); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec3(A const & s, tvec2 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec3(tvec3 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec3(tvec4 const & v); + + ////////////////////////////////////// + // Unary arithmetic operators + + tvec3& operator= (tvec3 const & v); + + tvec3& operator+=(thalf const & s); + tvec3& operator+=(tvec3 const & v); + tvec3& operator-=(thalf const & s); + tvec3& operator-=(tvec3 const & v); + tvec3& operator*=(thalf const & s); + tvec3& operator*=(tvec3 const & v); + tvec3& operator/=(thalf const & s); + tvec3& operator/=(tvec3 const & v); + tvec3& operator++(); + tvec3& operator--(); + + ////////////////////////////////////// + // Swizzle operators + + thalf swizzle(comp X) const; + tvec2 swizzle(comp X, comp Y) const; + tvec3 swizzle(comp X, comp Y, comp Z) const; + tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + tref3 swizzle(comp X, comp Y, comp Z); + }; + + template <> + struct tvec4 + { + enum ctor{null}; + typedef thalf value_type; + typedef std::size_t size_type; + static size_type value_size(); + + typedef tvec4 type; + typedef tvec4 bool_type; + + ////////////////////////////////////// + // Data + + thalf x, y, z, w; + + ////////////////////////////////////// + // Accesses + + thalf & operator[](size_type i); + thalf const & operator[](size_type i) const; + + ////////////////////////////////////// + // Implicit basic constructors + + tvec4(); + tvec4(tvec4 const & v); + + ////////////////////////////////////// + // Explicit basic constructors + + explicit tvec4(ctor); + explicit tvec4( + thalf const & s); + explicit tvec4( + thalf const & s0, + thalf const & s1, + thalf const & s2, + thalf const & s3); + + ////////////////////////////////////// + // Swizzle constructors + + tvec4(tref4 const & r); + + ////////////////////////////////////// + // Convertion scalar constructors + + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(U const & x); + //! Explicit converions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(A const & x, B const & y, C const & z, D const & w); + + ////////////////////////////////////// + // Convertion vector constructors + + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(tvec2 const & v, B const & s1, C const & s2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(A const & s1, tvec2 const & v, C const & s2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(A const & s1, B const & s2, tvec2 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(tvec3 const & v, B const & s); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(A const & s, tvec3 const & v); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(tvec2 const & v1, tvec2 const & v2); + //! Explicit conversions (From section 5.4.1 Conversion and scalar constructors of GLSL 1.30.08 specification) + template + explicit tvec4(tvec4 const & v); + + ////////////////////////////////////// + // Unary arithmetic operators + + tvec4& operator= (tvec4 const & v); + + tvec4& operator+=(thalf const & s); + tvec4& operator+=(tvec4 const & v); + tvec4& operator-=(thalf const & s); + tvec4& operator-=(tvec4 const & v); + tvec4& operator*=(thalf const & s); + tvec4& operator*=(tvec4 const & v); + tvec4& operator/=(thalf const & s); + tvec4& operator/=(tvec4 const & v); + tvec4& operator++(); + tvec4& operator--(); + + ////////////////////////////////////// + // Swizzle operators + + thalf swizzle(comp X) const; + tvec2 swizzle(comp X, comp Y) const; + tvec3 swizzle(comp X, comp Y, comp Z) const; + tvec4 swizzle(comp X, comp Y, comp Z, comp W) const; + tref4 swizzle(comp X, comp Y, comp Z, comp W); + }; +#endif//_MSC_EXTENSIONS +} +//namespace detail + +namespace gtc{ +namespace half_float ///< GLM_GTC_half_float extension: Add support for half precision floating-point types +{ + /// \addtogroup gtc_half_float + ///@{ + + /// Type for half-precision floating-point numbers. + /// From GLM_GTC_half_float extension. + typedef detail::thalf half; + + /// Vector of 2 half-precision floating-point numbers. + /// From GLM_GTC_half_float extension. + typedef detail::tvec2 hvec2; + + /// Vector of 3 half-precision floating-point numbers. + /// From GLM_GTC_half_float extension. + typedef detail::tvec3 hvec3; + + /// Vector of 4 half-precision floating-point numbers. + /// From GLM_GTC_half_float extension. + typedef detail::tvec4 hvec4; + + /// 2 * 2 matrix of half-precision floating-point numbers. + /// From GLM_GTC_half_float extension. + typedef detail::tmat2x2 hmat2; + + /// 3 * 3 matrix of half-precision floating-point numbers. + /// From GLM_GTC_half_float extension. + typedef detail::tmat3x3 hmat3; + + /// 4 * 4 matrix of half-precision floating-point numbers. + /// From GLM_GTC_half_float extension. + typedef detail::tmat4x4 hmat4; + + /// @} + +}// namespace half_float +}// namespace gtc +}// namespace glm #include "half_float.inl" diff --git a/glm/gtc/matrix_access.hpp b/glm/gtc/matrix_access.hpp index d5c54655..670fa909 100644 --- a/glm/gtc/matrix_access.hpp +++ b/glm/gtc/matrix_access.hpp @@ -22,8 +22,7 @@ namespace glm{ namespace gtc{ -//! GLM_GTC_matrix_access extension: Set a column or a row of a matrix -namespace matrix_access +namespace matrix_access ///< GLM_GTC_matrix_access extension: Set a column or a row of a matrix { /// \addtogroup gtc_matrix_access ///@{ diff --git a/glm/gtc/matrix_integer.hpp b/glm/gtc/matrix_integer.hpp index 8536ae31..63fb6d2a 100644 --- a/glm/gtc/matrix_integer.hpp +++ b/glm/gtc/matrix_integer.hpp @@ -20,185 +20,183 @@ # pragma message("GLM: GLM_GTC_matrix_integer extension included") #endif -namespace glm +namespace glm{ +namespace gtc{ +namespace matrix_integer ///< GLM_GTC_matrix_integer extension: Add integer matrices { - namespace gtc{ - //! GLM_GTC_matrix_integer extension: Add integer matrices - namespace matrix_integer - { - /// \addtogroup gtc_matrix_integer - ///@{ + /// \addtogroup gtc_matrix_integer + ///@{ - typedef detail::tmat2x2 highp_imat2; //!< \brief High-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x3 highp_imat3; //!< \brief High-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x4 highp_imat4; //!< \brief High-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x2 highp_imat2; //!< \brief High-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x3 highp_imat3; //!< \brief High-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x4 highp_imat4; //!< \brief High-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x2 highp_imat2x2; //!< \brief High-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x3 highp_imat2x3; //!< \brief High-precision signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x4 highp_imat2x4; //!< \brief High-precision signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x2 highp_imat3x2; //!< \brief High-precision signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x3 highp_imat3x3; //!< \brief High-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x4 highp_imat3x4; //!< \brief High-precision signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x2 highp_imat4x2; //!< \brief High-precision signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x3 highp_imat4x3; //!< \brief High-precision signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x4 highp_imat4x4; //!< \brief High-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x2 highp_imat2x2; //!< \brief High-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x3 highp_imat2x3; //!< \brief High-precision signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x4 highp_imat2x4; //!< \brief High-precision signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x2 highp_imat3x2; //!< \brief High-precision signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x3 highp_imat3x3; //!< \brief High-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x4 highp_imat3x4; //!< \brief High-precision signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x2 highp_imat4x2; //!< \brief High-precision signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x3 highp_imat4x3; //!< \brief High-precision signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x4 highp_imat4x4; //!< \brief High-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x2 mediump_imat2; //!< \brief Medium-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x3 mediump_imat3; //!< \brief Medium-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x4 mediump_imat4; //!< \brief Medium-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x2 mediump_imat2; //!< \brief Medium-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x3 mediump_imat3; //!< \brief Medium-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x4 mediump_imat4; //!< \brief Medium-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x2 mediump_imat2x2; //!< \brief Medium-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x3 mediump_imat2x3; //!< \brief Medium-precision signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x4 mediump_imat2x4; //!< \brief Medium-precision signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x2 mediump_imat3x2; //!< \brief Medium-precision signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x3 mediump_imat3x3; //!< \brief Medium-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x4 mediump_imat3x4; //!< \brief Medium-precision signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x2 mediump_imat4x2; //!< \brief Medium-precision signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x3 mediump_imat4x3; //!< \brief Medium-precision signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x4 mediump_imat4x4; //!< \brief Medium-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x2 mediump_imat2x2; //!< \brief Medium-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x3 mediump_imat2x3; //!< \brief Medium-precision signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x4 mediump_imat2x4; //!< \brief Medium-precision signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x2 mediump_imat3x2; //!< \brief Medium-precision signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x3 mediump_imat3x3; //!< \brief Medium-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x4 mediump_imat3x4; //!< \brief Medium-precision signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x2 mediump_imat4x2; //!< \brief Medium-precision signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x3 mediump_imat4x3; //!< \brief Medium-precision signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x4 mediump_imat4x4; //!< \brief Medium-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x2 lowp_imat2; //!< \brief Low-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x3 lowp_imat3; //!< \brief Low-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x4 lowp_imat4; //!< \brief Low-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x2 lowp_imat2; //!< \brief Low-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x3 lowp_imat3; //!< \brief Low-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x4 lowp_imat4; //!< \brief Low-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x2 lowp_imat2x2; //!< \brief Low-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x3 lowp_imat2x3; //!< \brief Low-precision signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x4 lowp_imat2x4; //!< \brief Low-precision signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x2 lowp_imat3x2; //!< \brief Low-precision signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x3 lowp_imat3x3; //!< \brief Low-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x4 lowp_imat3x4; //!< \brief Low-precision signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x2 lowp_imat4x2; //!< \brief Low-precision signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x3 lowp_imat4x3; //!< \brief Low-precision signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x4 lowp_imat4x4; //!< \brief Low-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x2 lowp_imat2x2; //!< \brief Low-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x3 lowp_imat2x3; //!< \brief Low-precision signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x4 lowp_imat2x4; //!< \brief Low-precision signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x2 lowp_imat3x2; //!< \brief Low-precision signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x3 lowp_imat3x3; //!< \brief Low-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x4 lowp_imat3x4; //!< \brief Low-precision signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x2 lowp_imat4x2; //!< \brief Low-precision signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x3 lowp_imat4x3; //!< \brief Low-precision signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x4 lowp_imat4x4; //!< \brief Low-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x2 highp_umat2; //!< \brief High-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x3 highp_umat3; //!< \brief High-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x4 highp_umat4; //!< \brief High-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x2 highp_umat2; //!< \brief High-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x3 highp_umat3; //!< \brief High-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x4 highp_umat4; //!< \brief High-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x2 highp_umat2x2; //!< \brief High-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x3 highp_umat2x3; //!< \brief High-precision signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x4 highp_umat2x4; //!< \brief High-precision signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x2 highp_umat3x2; //!< \brief High-precision signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x3 highp_umat3x3; //!< \brief High-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x4 highp_umat3x4; //!< \brief High-precision signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x2 highp_umat4x2; //!< \brief High-precision signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x3 highp_umat4x3; //!< \brief High-precision signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x4 highp_umat4x4; //!< \brief High-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x2 highp_umat2x2; //!< \brief High-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x3 highp_umat2x3; //!< \brief High-precision signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x4 highp_umat2x4; //!< \brief High-precision signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x2 highp_umat3x2; //!< \brief High-precision signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x3 highp_umat3x3; //!< \brief High-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x4 highp_umat3x4; //!< \brief High-precision signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x2 highp_umat4x2; //!< \brief High-precision signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x3 highp_umat4x3; //!< \brief High-precision signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x4 highp_umat4x4; //!< \brief High-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x2 mediump_umat2; //!< \brief Medium-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x3 mediump_umat3; //!< \brief Medium-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x4 mediump_umat4; //!< \brief Medium-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x2 mediump_umat2; //!< \brief Medium-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x3 mediump_umat3; //!< \brief Medium-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x4 mediump_umat4; //!< \brief Medium-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x2 mediump_umat2x2; //!< \brief Medium-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x3 mediump_umat2x3; //!< \brief Medium-precision signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x4 mediump_umat2x4; //!< \brief Medium-precision signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x2 mediump_umat3x2; //!< \brief Medium-precision signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x3 mediump_umat3x3; //!< \brief Medium-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x4 mediump_umat3x4; //!< \brief Medium-precision signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x2 mediump_umat4x2; //!< \brief Medium-precision signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x3 mediump_umat4x3; //!< \brief Medium-precision signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x4 mediump_umat4x4; //!< \brief Medium-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x2 mediump_umat2x2; //!< \brief Medium-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x3 mediump_umat2x3; //!< \brief Medium-precision signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x4 mediump_umat2x4; //!< \brief Medium-precision signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x2 mediump_umat3x2; //!< \brief Medium-precision signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x3 mediump_umat3x3; //!< \brief Medium-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x4 mediump_umat3x4; //!< \brief Medium-precision signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x2 mediump_umat4x2; //!< \brief Medium-precision signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x3 mediump_umat4x3; //!< \brief Medium-precision signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x4 mediump_umat4x4; //!< \brief Medium-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x2 lowp_umat2; //!< \brief Low-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x3 lowp_umat3; //!< \brief Low-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x4 lowp_umat4; //!< \brief Low-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x2 lowp_umat2; //!< \brief Low-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x3 lowp_umat3; //!< \brief Low-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x4 lowp_umat4; //!< \brief Low-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x2 lowp_umat2x2; //!< \brief Low-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x3 lowp_umat2x3; //!< \brief Low-precision signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat2x4 lowp_umat2x4; //!< \brief Low-precision signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x2 lowp_umat3x2; //!< \brief Low-precision signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x3 lowp_umat3x3; //!< \brief Low-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat3x4 lowp_umat3x4; //!< \brief Low-precision signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x2 lowp_umat4x2; //!< \brief Low-precision signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x3 lowp_umat4x3; //!< \brief Low-precision signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef detail::tmat4x4 lowp_umat4x4; //!< \brief Low-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x2 lowp_umat2x2; //!< \brief Low-precision signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x3 lowp_umat2x3; //!< \brief Low-precision signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat2x4 lowp_umat2x4; //!< \brief Low-precision signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x2 lowp_umat3x2; //!< \brief Low-precision signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x3 lowp_umat3x3; //!< \brief Low-precision signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat3x4 lowp_umat3x4; //!< \brief Low-precision signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x2 lowp_umat4x2; //!< \brief Low-precision signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x3 lowp_umat4x3; //!< \brief Low-precision signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef detail::tmat4x4 lowp_umat4x4; //!< \brief Low-precision signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) #if(defined(GLM_PRECISION_HIGHP_INT)) - typedef highp_imat2 imat2; //!< \brief Signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef highp_imat3 imat3; //!< \brief Signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef highp_imat4 imat4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef highp_imat2x2 imat2x2; //!< \brief Signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef highp_imat2x3 imat2x3; //!< \brief Signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef highp_imat2x4 imat2x4; //!< \brief Signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef highp_imat3x2 imat3x2; //!< \brief Signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef highp_imat3x3 imat3x3; //!< \brief Signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef highp_imat3x4 imat3x4; //!< \brief Signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef highp_imat4x2 imat4x2; //!< \brief Signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef highp_imat4x3 imat4x3; //!< \brief Signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef highp_imat4x4 imat4x4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_imat2 imat2; //!< \brief Signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_imat3 imat3; //!< \brief Signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_imat4 imat4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_imat2x2 imat2x2; //!< \brief Signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_imat2x3 imat2x3; //!< \brief Signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_imat2x4 imat2x4; //!< \brief Signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_imat3x2 imat3x2; //!< \brief Signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_imat3x3 imat3x3; //!< \brief Signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_imat3x4 imat3x4; //!< \brief Signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_imat4x2 imat4x2; //!< \brief Signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_imat4x3 imat4x3; //!< \brief Signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_imat4x4 imat4x4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) #elif(defined(GLM_PRECISION_LOWP_INT)) - typedef lowp_imat2 imat2; //!< \brief Signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef lowp_imat3 imat3; //!< \brief Signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef lowp_imat4 imat4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef lowp_imat2x2 imat2x2; //!< \brief Signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef lowp_imat2x3 imat2x3; //!< \brief Signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef lowp_imat2x4 imat2x4; //!< \brief Signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef lowp_imat3x2 imat3x2; //!< \brief Signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef lowp_imat3x3 imat3x3; //!< \brief Signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef lowp_imat3x4 imat3x4; //!< \brief Signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef lowp_imat4x2 imat4x2; //!< \brief Signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef lowp_imat4x3 imat4x3; //!< \brief Signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef lowp_imat4x4 imat4x4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_imat2 imat2; //!< \brief Signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_imat3 imat3; //!< \brief Signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_imat4 imat4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_imat2x2 imat2x2; //!< \brief Signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_imat2x3 imat2x3; //!< \brief Signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_imat2x4 imat2x4; //!< \brief Signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_imat3x2 imat3x2; //!< \brief Signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_imat3x3 imat3x3; //!< \brief Signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_imat3x4 imat3x4; //!< \brief Signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_imat4x2 imat4x2; //!< \brief Signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_imat4x3 imat4x3; //!< \brief Signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_imat4x4 imat4x4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) #else //if(defined(GLM_PRECISION_MEDIUMP_INT)) - typedef mediump_imat2 imat2; //!< \brief Signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef mediump_imat3 imat3; //!< \brief Signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef mediump_imat4 imat4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef mediump_imat2x2 imat2x2; //!< \brief Signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef mediump_imat2x3 imat2x3; //!< \brief Signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef mediump_imat2x4 imat2x4; //!< \brief Signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef mediump_imat3x2 imat3x2; //!< \brief Signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef mediump_imat3x3 imat3x3; //!< \brief Signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef mediump_imat3x4 imat3x4; //!< \brief Signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef mediump_imat4x2 imat4x2; //!< \brief Signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef mediump_imat4x3 imat4x3; //!< \brief Signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef mediump_imat4x4 imat4x4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_imat2 imat2; //!< \brief Signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_imat3 imat3; //!< \brief Signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_imat4 imat4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_imat2x2 imat2x2; //!< \brief Signed integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_imat2x3 imat2x3; //!< \brief Signed integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_imat2x4 imat2x4; //!< \brief Signed integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_imat3x2 imat3x2; //!< \brief Signed integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_imat3x3 imat3x3; //!< \brief Signed integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_imat3x4 imat3x4; //!< \brief Signed integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_imat4x2 imat4x2; //!< \brief Signed integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_imat4x3 imat4x3; //!< \brief Signed integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_imat4x4 imat4x4; //!< \brief Signed integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) #endif//GLM_PRECISION #if(defined(GLM_PRECISION_HIGHP_UINT)) - typedef highp_umat2 umat2; //!< \brief Unsigned integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef highp_umat3 umat3; //!< \brief Unsigned integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef highp_umat4 umat4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef highp_umat2x2 umat2x2; //!< \brief Unsigned integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef highp_umat2x3 umat2x3; //!< \brief Unsigned integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef highp_umat2x4 umat2x4; //!< \brief Unsigned integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef highp_umat3x2 umat3x2; //!< \brief Unsigned integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef highp_umat3x3 umat3x3; //!< \brief Unsigned integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef highp_umat3x4 umat3x4; //!< \brief Unsigned integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef highp_umat4x2 umat4x2; //!< \brief Unsigned integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef highp_umat4x3 umat4x3; //!< \brief Unsigned integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef highp_umat4x4 umat4x4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_umat2 umat2; //!< \brief Unsigned integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_umat3 umat3; //!< \brief Unsigned integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_umat4 umat4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_umat2x2 umat2x2; //!< \brief Unsigned integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_umat2x3 umat2x3; //!< \brief Unsigned integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_umat2x4 umat2x4; //!< \brief Unsigned integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_umat3x2 umat3x2; //!< \brief Unsigned integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_umat3x3 umat3x3; //!< \brief Unsigned integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_umat3x4 umat3x4; //!< \brief Unsigned integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_umat4x2 umat4x2; //!< \brief Unsigned integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_umat4x3 umat4x3; //!< \brief Unsigned integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef highp_umat4x4 umat4x4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) #elif(defined(GLM_PRECISION_LOWP_UINT)) - typedef lowp_umat2 umat2; //!< \brief Unsigned integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef lowp_umat3 umat3; //!< \brief Unsigned integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef lowp_umat4 umat4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef lowp_umat2x2 umat2x2; //!< \brief Unsigned integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef lowp_umat2x3 umat2x3; //!< \brief Unsigned integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef lowp_umat2x4 umat2x4; //!< \brief Unsigned integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef lowp_umat3x2 umat3x2; //!< \brief Unsigned integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef lowp_umat3x3 umat3x3; //!< \brief Unsigned integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef lowp_umat3x4 umat3x4; //!< \brief Unsigned integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef lowp_umat4x2 umat4x2; //!< \brief Unsigned integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef lowp_umat4x3 umat4x3; //!< \brief Unsigned integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef lowp_umat4x4 umat4x4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_umat2 umat2; //!< \brief Unsigned integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_umat3 umat3; //!< \brief Unsigned integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_umat4 umat4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_umat2x2 umat2x2; //!< \brief Unsigned integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_umat2x3 umat2x3; //!< \brief Unsigned integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_umat2x4 umat2x4; //!< \brief Unsigned integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_umat3x2 umat3x2; //!< \brief Unsigned integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_umat3x3 umat3x3; //!< \brief Unsigned integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_umat3x4 umat3x4; //!< \brief Unsigned integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_umat4x2 umat4x2; //!< \brief Unsigned integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_umat4x3 umat4x3; //!< \brief Unsigned integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef lowp_umat4x4 umat4x4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) #else //if(defined(GLM_PRECISION_MEDIUMP_UINT)) - typedef mediump_umat2 umat2; //!< \brief Unsigned integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef mediump_umat3 umat3; //!< \brief Unsigned integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef mediump_umat4 umat4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef mediump_umat2x2 umat2x2; //!< \brief Unsigned integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef mediump_umat2x3 umat2x3; //!< \brief Unsigned integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef mediump_umat2x4 umat2x4; //!< \brief Unsigned integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef mediump_umat3x2 umat3x2; //!< \brief Unsigned integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef mediump_umat3x3 umat3x3; //!< \brief Unsigned integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef mediump_umat3x4 umat3x4; //!< \brief Unsigned integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) - typedef mediump_umat4x2 umat4x2; //!< \brief Unsigned integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) - typedef mediump_umat4x3 umat4x3; //!< \brief Unsigned integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) - typedef mediump_umat4x4 umat4x4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_umat2 umat2; //!< \brief Unsigned integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_umat3 umat3; //!< \brief Unsigned integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_umat4 umat4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_umat2x2 umat2x2; //!< \brief Unsigned integer 2x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_umat2x3 umat2x3; //!< \brief Unsigned integer 2x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_umat2x4 umat2x4; //!< \brief Unsigned integer 2x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_umat3x2 umat3x2; //!< \brief Unsigned integer 3x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_umat3x3 umat3x3; //!< \brief Unsigned integer 3x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_umat3x4 umat3x4; //!< \brief Unsigned integer 3x4 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_umat4x2 umat4x2; //!< \brief Unsigned integer 4x2 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_umat4x3 umat4x3; //!< \brief Unsigned integer 4x3 matrix. (from GLM_GTC_matrix_integer extension) + typedef mediump_umat4x4 umat4x4; //!< \brief Unsigned integer 4x4 matrix. (from GLM_GTC_matrix_integer extension) #endif//GLM_PRECISION - ///@} + ///@} - }//namespace matrix_integer - }//namespace gtc +}//namespace matrix_integer +}//namespace gtc }//namespace glm namespace glm{using namespace gtc::matrix_integer;} diff --git a/glm/gtc/matrix_inverse.hpp b/glm/gtc/matrix_inverse.hpp index b02cf319..ac776975 100644 --- a/glm/gtc/matrix_inverse.hpp +++ b/glm/gtc/matrix_inverse.hpp @@ -22,8 +22,7 @@ namespace glm{ namespace gtc{ -//! GLM_GTC_matrix_inverse extension: Inverse matrix functions -namespace matrix_inverse +namespace matrix_inverse ///< GLM_GTC_matrix_inverse extension: Inverse matrix functions { /// \addtogroup gtc_matrix_inverse ///@{ diff --git a/glm/gtc/matrix_transform.hpp b/glm/gtc/matrix_transform.hpp index 95cdb420..ae3aae8a 100644 --- a/glm/gtc/matrix_transform.hpp +++ b/glm/gtc/matrix_transform.hpp @@ -21,136 +21,134 @@ # pragma message("GLM: GLM_GTC_matrix_transform extension included") #endif -namespace glm +namespace glm{ +namespace gtc{ +namespace matrix_transform ///< GLM_GTC_matrix_transform extension: Add transformation matrices { - namespace gtc{ - //! GLM_GTC_matrix_transform extension: Add transformation matrices - namespace matrix_transform - { - /// \addtogroup gtc_matrix_transform - ///@{ + /// \addtogroup gtc_matrix_transform + ///@{ - //! Builds a translation 4 * 4 matrix created from a vector of 3 components. - //! From GLM_GTC_matrix_transform extension. - template - detail::tmat4x4 translate( - detail::tmat4x4 const & m, - detail::tvec3 const & v); + //! Builds a translation 4 * 4 matrix created from a vector of 3 components. + //! From GLM_GTC_matrix_transform extension. + template + detail::tmat4x4 translate( + detail::tmat4x4 const & m, + detail::tvec3 const & v); - //! Builds a rotation 4 * 4 matrix created from an axis vector and an angle expressed in degrees. - //! From GLM_GTC_matrix_transform extension. - template - detail::tmat4x4 rotate( - detail::tmat4x4 const & m, - T const & angle, - detail::tvec3 const & v); + //! Builds a rotation 4 * 4 matrix created from an axis vector and an angle expressed in degrees. + //! From GLM_GTC_matrix_transform extension. + template + detail::tmat4x4 rotate( + detail::tmat4x4 const & m, + T const & angle, + detail::tvec3 const & v); - //! Builds a scale 4 * 4 matrix created from 3 scalars. - //! From GLM_GTC_matrix_transform extension. - template - detail::tmat4x4 scale( - detail::tmat4x4 const & m, - detail::tvec3 const & v); + //! Builds a scale 4 * 4 matrix created from 3 scalars. + //! From GLM_GTC_matrix_transform extension. + template + detail::tmat4x4 scale( + detail::tmat4x4 const & m, + detail::tvec3 const & v); - //! Creates a matrix for an orthographic parallel viewing volume. - //! From GLM_GTC_matrix_transform extension. - template - detail::tmat4x4 ortho( - T const & left, - T const & right, - T const & bottom, - T const & top, - T const & zNear, - T const & zFar); + //! Creates a matrix for an orthographic parallel viewing volume. + //! From GLM_GTC_matrix_transform extension. + template + detail::tmat4x4 ortho( + T const & left, + T const & right, + T const & bottom, + T const & top, + T const & zNear, + T const & zFar); - //! Creates a matrix for projecting two-dimensional coordinates onto the screen. - //! From GLM_GTC_matrix_transform extension. - template - detail::tmat4x4 ortho( - T const & left, - T const & right, - T const & bottom, - T const & top); + //! Creates a matrix for projecting two-dimensional coordinates onto the screen. + //! From GLM_GTC_matrix_transform extension. + template + detail::tmat4x4 ortho( + T const & left, + T const & right, + T const & bottom, + T const & top); - //! Creates a frustum matrix. - //! From GLM_GTC_matrix_transform extension. - template - detail::tmat4x4 frustum( - T const & left, - T const & right, - T const & bottom, - T const & top, - T const & nearVal, - T const & farVal); + //! Creates a frustum matrix. + //! From GLM_GTC_matrix_transform extension. + template + detail::tmat4x4 frustum( + T const & left, + T const & right, + T const & bottom, + T const & top, + T const & nearVal, + T const & farVal); - //! Creates a matrix for a symetric perspective-view frustum. - //! From GLM_GTC_matrix_transform extension. - template - detail::tmat4x4 perspective( - T const & fovy, - T const & aspect, - T const & zNear, - T const & zFar); + //! Creates a matrix for a symetric perspective-view frustum. + //! From GLM_GTC_matrix_transform extension. + template + detail::tmat4x4 perspective( + T const & fovy, + T const & aspect, + T const & zNear, + T const & zFar); - //! Builds a perspective projection matrix based on a field of view - //! From GLM_GTC_matrix_transform extension. - template - detail::tmat4x4 perspectiveFov( - valType const & fov, - valType const & width, - valType const & height, - valType const & zNear, - valType const & zFar); + //! Builds a perspective projection matrix based on a field of view + //! From GLM_GTC_matrix_transform extension. + template + detail::tmat4x4 perspectiveFov( + valType const & fov, + valType const & width, + valType const & height, + valType const & zNear, + valType const & zFar); - //! Creates a matrix for a symmetric perspective-view frustum with far plane at infinite . - //! From GLM_GTC_matrix_transform extension. - template - detail::tmat4x4 infinitePerspective( - T fovy, T aspect, T zNear); + //! Creates a matrix for a symmetric perspective-view frustum with far plane at infinite . + //! From GLM_GTC_matrix_transform extension. + template + detail::tmat4x4 infinitePerspective( + T fovy, T aspect, T zNear); - //! Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping. - //! From GLM_GTC_matrix_transform extension. - template - detail::tmat4x4 tweakedInfinitePerspective( - T fovy, T aspect, T zNear); + //! Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping. + //! From GLM_GTC_matrix_transform extension. + template + detail::tmat4x4 tweakedInfinitePerspective( + T fovy, T aspect, T zNear); - //! Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates. - //! From GLM_GTC_matrix_transform extension. - template - detail::tvec3 project( - detail::tvec3 const & obj, - detail::tmat4x4 const & model, - detail::tmat4x4 const & proj, - detail::tvec4 const & viewport); + //! Map the specified object coordinates (obj.x, obj.y, obj.z) into window coordinates. + //! From GLM_GTC_matrix_transform extension. + template + detail::tvec3 project( + detail::tvec3 const & obj, + detail::tmat4x4 const & model, + detail::tmat4x4 const & proj, + detail::tvec4 const & viewport); - //! Map the specified window coordinates (win.x, win.y, win.z) into object coordinates. - //! From GLM_GTC_matrix_transform extension. - template - detail::tvec3 unProject( - detail::tvec3 const & win, - detail::tmat4x4 const & model, - detail::tmat4x4 const & proj, - detail::tvec4 const & viewport); + //! Map the specified window coordinates (win.x, win.y, win.z) into object coordinates. + //! From GLM_GTC_matrix_transform extension. + template + detail::tvec3 unProject( + detail::tvec3 const & win, + detail::tmat4x4 const & model, + detail::tmat4x4 const & proj, + detail::tvec4 const & viewport); - //! Define a picking region - //! From GLM_GTC_matrix_transform extension. - template - detail::tmat4x4 pickMatrix( - detail::tvec2 const & center, - detail::tvec2 const & delta, - detail::tvec4 const & viewport); + //! Define a picking region + //! From GLM_GTC_matrix_transform extension. + template + detail::tmat4x4 pickMatrix( + detail::tvec2 const & center, + detail::tvec2 const & delta, + detail::tvec4 const & viewport); - //! Build a look at view matrix. - //! From GLM_GTC_matrix_transform extension. - template - detail::tmat4x4 lookAt( - detail::tvec3 const & eye, - detail::tvec3 const & center, - detail::tvec3 const & up); + //! Build a look at view matrix. + //! From GLM_GTC_matrix_transform extension. + template + detail::tmat4x4 lookAt( + detail::tvec3 const & eye, + detail::tvec3 const & center, + detail::tvec3 const & up); - ///@} - }//namespace matrix_transform - }//namespace gtc + ///@} +}//namespace matrix_transform +}//namespace gtc }//namespace glm #include "matrix_transform.inl" diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index 16be3d1f..a859eede 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -26,202 +26,200 @@ # pragma message("GLM: GLM_GTC_quaternion extension included") #endif -namespace glm +namespace glm{ +namespace detail { - namespace detail + //! \brief Template for quaternion. + //! From GLM_GTC_quaternion extension. + /// \ingroup gtc_quaternion + template + struct tquat// : public genType { - //! \brief Template for quaternion. - //! From GLM_GTC_quaternion extension. - /// \ingroup gtc_quaternion - template - struct tquat// : public genType - { - typedef T value_type; + typedef T value_type; - public: - value_type x, y, z, w; + public: + value_type x, y, z, w; - // Constructors - tquat(); - explicit tquat( - value_type const & s, - tvec3 const & v); - explicit tquat( - value_type const & w, - value_type const & x, - value_type const & y, - value_type const & z); + // Constructors + tquat(); + explicit tquat( + value_type const & s, + tvec3 const & v); + explicit tquat( + value_type const & w, + value_type const & x, + value_type const & y, + value_type const & z); - // Convertions - //explicit tquat(valType const & pitch, valType const & yaw, valType const & roll); - //! pitch, yaw, roll - explicit tquat( - tvec3 const & eulerAngles); - explicit tquat( - tmat3x3 const & m); - explicit tquat( - tmat4x4 const & m); + // Convertions + //explicit tquat(valType const & pitch, valType const & yaw, valType const & roll); + //! pitch, yaw, roll + explicit tquat( + tvec3 const & eulerAngles); + explicit tquat( + tmat3x3 const & m); + explicit tquat( + tmat4x4 const & m); - // Accesses - value_type & operator[](int i); - value_type const & operator[](int i) const; + // Accesses + value_type & operator[](int i); + value_type const & operator[](int i) const; - // Operators - tquat & operator*=(value_type const & s); - tquat & operator/=(value_type const & s); - }; + // Operators + tquat & operator*=(value_type const & s); + tquat & operator/=(value_type const & s); + }; - template - detail::tquat operator- ( - detail::tquat const & q); + template + detail::tquat operator- ( + detail::tquat const & q); - template - detail::tquat operator* ( - detail::tquat const & q, - detail::tquat const & p); + template + detail::tquat operator* ( + detail::tquat const & q, + detail::tquat const & p); - template - detail::tvec3 operator* ( - detail::tquat const & q, - detail::tvec3 const & v); + template + detail::tvec3 operator* ( + detail::tquat const & q, + detail::tvec3 const & v); - template - detail::tvec3 operator* ( - detail::tvec3 const & v, - detail::tquat const & q); + template + detail::tvec3 operator* ( + detail::tvec3 const & v, + detail::tquat const & q); - template - detail::tvec4 operator* ( - detail::tquat const & q, - detail::tvec4 const & v); + template + detail::tvec4 operator* ( + detail::tquat const & q, + detail::tvec4 const & v); - template - detail::tvec4 operator* ( - detail::tvec4 const & v, - detail::tquat const & q); + template + detail::tvec4 operator* ( + detail::tvec4 const & v, + detail::tquat const & q); - template - detail::tquat operator* ( - detail::tquat const & q, - typename detail::tquat::value_type const & s); + template + detail::tquat operator* ( + detail::tquat const & q, + typename detail::tquat::value_type const & s); - template - detail::tquat operator* ( - typename detail::tquat::value_type const & s, - detail::tquat const & q); + template + detail::tquat operator* ( + typename detail::tquat::value_type const & s, + detail::tquat const & q); - template - detail::tquat operator/ ( - detail::tquat const & q, - typename detail::tquat::value_type const & s); + template + detail::tquat operator/ ( + detail::tquat const & q, + typename detail::tquat::value_type const & s); - } //namespace detail +} //namespace detail - namespace gtc{ - //! GLM_GTC_quaternion extension: Quaternion types and functions - namespace quaternion - { - /// \addtogroup gtc_quaternion - ///@{ +namespace gtc{ +namespace quaternion ///< GLM_GTC_quaternion extension: Quaternion types and functions +{ + /// \addtogroup gtc_quaternion + ///@{ - //! Returns the length of the quaternion x. - //! From GLM_GTC_quaternion extension. - template - typename detail::tquat::value_type length( - detail::tquat const & q); + //! Returns the length of the quaternion x. + //! From GLM_GTC_quaternion extension. + template + typename detail::tquat::value_type length( + detail::tquat const & q); - //! Returns the normalized quaternion of from x. - //! From GLM_GTC_quaternion extension. - template - detail::tquat normalize( - detail::tquat const & q); + //! Returns the normalized quaternion of from x. + //! From GLM_GTC_quaternion extension. + template + detail::tquat normalize( + detail::tquat const & q); - //! Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ... - //! From GLM_GTC_quaternion extension. - template - typename detail::tquat::value_type dot( - detail::tquat const & q1, - detail::tquat const & q2); + //! Returns dot product of q1 and q2, i.e., q1[0] * q2[0] + q1[1] * q2[1] + ... + //! From GLM_GTC_quaternion extension. + template + typename detail::tquat::value_type dot( + detail::tquat const & q1, + detail::tquat const & q2); - //! Returns the cross product of q1 and q2. - //! From GLM_GTC_quaternion extension. - template - GLM_DEPRECATED detail::tquat cross( - detail::tquat const & q1, - detail::tquat const & q2); + //! Returns the cross product of q1 and q2. + //! From GLM_GTC_quaternion extension. + template + GLM_DEPRECATED detail::tquat cross( + detail::tquat const & q1, + detail::tquat const & q2); - //! Returns a SLERP interpolated quaternion of x and y according a. - //! From GLM_GTC_quaternion extension. - template - detail::tquat mix( - detail::tquat const & x, - detail::tquat const & y, - typename detail::tquat::value_type const & a); + //! Returns a SLERP interpolated quaternion of x and y according a. + //! From GLM_GTC_quaternion extension. + template + detail::tquat mix( + detail::tquat const & x, + detail::tquat const & y, + typename detail::tquat::value_type const & a); - //! Returns the q conjugate. - //! From GLM_GTC_quaternion extension. - template - detail::tquat conjugate( - detail::tquat const & q); + //! Returns the q conjugate. + //! From GLM_GTC_quaternion extension. + template + detail::tquat conjugate( + detail::tquat const & q); - //! Returns the q inverse. - //! From GLM_GTC_quaternion extension. - template - detail::tquat inverse( - detail::tquat const & q); + //! Returns the q inverse. + //! From GLM_GTC_quaternion extension. + template + detail::tquat inverse( + detail::tquat const & q); - //! Rotates a quaternion from an vector of 3 components axis and an angle expressed in degrees. - //! From GLM_GTC_quaternion extension. - template - detail::tquat rotate( - detail::tquat const & q, - typename detail::tquat::value_type const & angle, - detail::tvec3 const & v); + //! Rotates a quaternion from an vector of 3 components axis and an angle expressed in degrees. + //! From GLM_GTC_quaternion extension. + template + detail::tquat rotate( + detail::tquat const & q, + typename detail::tquat::value_type const & angle, + detail::tvec3 const & v); - //! Converts a quaternion to a 3 * 3 matrix. - //! From GLM_GTC_quaternion extension. - template - detail::tmat3x3 mat3_cast( - detail::tquat const & x); + //! Converts a quaternion to a 3 * 3 matrix. + //! From GLM_GTC_quaternion extension. + template + detail::tmat3x3 mat3_cast( + detail::tquat const & x); - //! Converts a quaternion to a 4 * 4 matrix. - //! From GLM_GTC_quaternion extension. - template - detail::tmat4x4 mat4_cast( - detail::tquat const & x); + //! Converts a quaternion to a 4 * 4 matrix. + //! From GLM_GTC_quaternion extension. + template + detail::tmat4x4 mat4_cast( + detail::tquat const & x); - //! Converts a 3 * 3 matrix to a quaternion. - //! From GLM_GTC_quaternion extension. - template - detail::tquat quat_cast( - detail::tmat3x3 const & x); + //! Converts a 3 * 3 matrix to a quaternion. + //! From GLM_GTC_quaternion extension. + template + detail::tquat quat_cast( + detail::tmat3x3 const & x); - //! Converts a 4 * 4 matrix to a quaternion. - //! From GLM_GTC_quaternion extension. - template - detail::tquat quat_cast( - detail::tmat4x4 const & x); + //! Converts a 4 * 4 matrix to a quaternion. + //! From GLM_GTC_quaternion extension. + template + detail::tquat quat_cast( + detail::tmat4x4 const & x); - //! Quaternion of floating-point numbers. - //! From GLM_GTC_quaternion extension. - typedef detail::tquat quat; + //! Quaternion of floating-point numbers. + //! From GLM_GTC_quaternion extension. + typedef detail::tquat quat; - //! Quaternion of half-precision floating-point numbers. - //! From GLM_GTC_quaternion extension. - typedef detail::tquat hquat; + //! Quaternion of half-precision floating-point numbers. + //! From GLM_GTC_quaternion extension. + typedef detail::tquat hquat; - //! Quaternion of single-precision floating-point numbers. - //! From GLM_GTC_quaternion extension. - typedef detail::tquat fquat; + //! Quaternion of single-precision floating-point numbers. + //! From GLM_GTC_quaternion extension. + typedef detail::tquat fquat; - //! Quaternion of double-precision floating-point numbers. - //! From GLM_GTC_quaternion extension. - typedef detail::tquat dquat; + //! Quaternion of double-precision floating-point numbers. + //! From GLM_GTC_quaternion extension. + typedef detail::tquat dquat; - ///@} + ///@} - }//namespace quaternion - }//namespace gtc +} //namespace quaternion +} //namespace gtc } //namespace glm #include "quaternion.inl" diff --git a/glm/gtc/swizzle.hpp b/glm/gtc/swizzle.hpp index 945b440e..b3441326 100644 --- a/glm/gtc/swizzle.hpp +++ b/glm/gtc/swizzle.hpp @@ -21,329 +21,327 @@ # pragma message("GLM: GLM_GTC_swizzle extension included") #endif -namespace glm +namespace glm{ +namespace gtc{ +namespace swizzle ///< GLM_GTC_swizzle extension { - namespace gtc{ - //! GLM_GTC_swizzle extension - namespace swizzle - { - using namespace gtc::half_float; + using namespace gtc::half_float; - template class vecType> - T const & swizzle( - vecType const & v, - comp x); + template class vecType> + T const & swizzle( + vecType const & v, + comp x); - template class vecType> - detail::tvec2 const & swizzle( - vecType const & v, - comp x, comp y); + template class vecType> + detail::tvec2 const & swizzle( + vecType const & v, + comp x, comp y); - template class vecType> - detail::tvec3 const & swizzle( - vecType const & v, - comp x, comp y, comp z); + template class vecType> + detail::tvec3 const & swizzle( + vecType const & v, + comp x, comp y, comp z); - template class vecType> - detail::tvec4 const & swizzle( - vecType const & v, - comp x, comp y, comp z, comp w); + template class vecType> + detail::tvec4 const & swizzle( + vecType const & v, + comp x, comp y, comp z, comp w); - template class vecType> - T & swizzle( - vecType & v, - comp x); + template class vecType> + T & swizzle( + vecType & v, + comp x); - template class vecType> - detail::tref2 swizzle( - vecType & v, - comp x, comp y); + template class vecType> + detail::tref2 swizzle( + vecType & v, + comp x, comp y); - template class vecType> - detail::tref3 swizzle( - vecType & v, - comp x, comp y, comp z); + template class vecType> + detail::tref3 swizzle( + vecType & v, + comp x, comp y, comp z); - template class vecType> - detail::tref4 swizzle( - vecType & v, - comp x, comp y, comp z, comp w); + template class vecType> + detail::tref4 swizzle( + vecType & v, + comp x, comp y, comp z, comp w); # define static_swizzle1(TYPE, SIZE) \ - template \ - GLM_FUNC_QUALIFIER TYPE swizzle(detail::tvec##SIZE const & v) \ - {return v[x];} \ - \ - template \ - GLM_FUNC_QUALIFIER TYPE& swizzle(detail::tvec##SIZE & v) \ - {return v[x];} + template \ + GLM_FUNC_QUALIFIER TYPE swizzle(detail::tvec##SIZE const & v) \ + {return v[x];} \ + \ + template \ + GLM_FUNC_QUALIFIER TYPE& swizzle(detail::tvec##SIZE & v) \ + {return v[x];} - static_swizzle1(detail::float16, 2) - static_swizzle1(detail::float16, 3) - static_swizzle1(detail::float16, 4) - static_swizzle1(detail::float32, 2) - static_swizzle1(detail::float32, 3) - static_swizzle1(detail::float32, 4) - static_swizzle1(detail::float64, 2) - static_swizzle1(detail::float64, 3) - static_swizzle1(detail::float64, 4) + static_swizzle1(detail::float16, 2) + static_swizzle1(detail::float16, 3) + static_swizzle1(detail::float16, 4) + static_swizzle1(detail::float32, 2) + static_swizzle1(detail::float32, 3) + static_swizzle1(detail::float32, 4) + static_swizzle1(detail::float64, 2) + static_swizzle1(detail::float64, 3) + static_swizzle1(detail::float64, 4) - static_swizzle1(detail::int8, 2) - static_swizzle1(detail::int8, 3) - static_swizzle1(detail::int8, 4) - static_swizzle1(detail::int16, 2) - static_swizzle1(detail::int16, 3) - static_swizzle1(detail::int16, 4) - static_swizzle1(detail::int32, 2) - static_swizzle1(detail::int32, 3) - static_swizzle1(detail::int32, 4) - static_swizzle1(detail::int64, 2) - static_swizzle1(detail::int64, 3) - static_swizzle1(detail::int64, 4) + static_swizzle1(detail::int8, 2) + static_swizzle1(detail::int8, 3) + static_swizzle1(detail::int8, 4) + static_swizzle1(detail::int16, 2) + static_swizzle1(detail::int16, 3) + static_swizzle1(detail::int16, 4) + static_swizzle1(detail::int32, 2) + static_swizzle1(detail::int32, 3) + static_swizzle1(detail::int32, 4) + static_swizzle1(detail::int64, 2) + static_swizzle1(detail::int64, 3) + static_swizzle1(detail::int64, 4) - static_swizzle1(detail::uint8, 2) - static_swizzle1(detail::uint8, 3) - static_swizzle1(detail::uint8, 4) - static_swizzle1(detail::uint16, 2) - static_swizzle1(detail::uint16, 3) - static_swizzle1(detail::uint16, 4) - static_swizzle1(detail::uint32, 2) - static_swizzle1(detail::uint32, 3) - static_swizzle1(detail::uint32, 4) - static_swizzle1(detail::uint64, 2) - static_swizzle1(detail::uint64, 3) - static_swizzle1(detail::uint64, 4) + static_swizzle1(detail::uint8, 2) + static_swizzle1(detail::uint8, 3) + static_swizzle1(detail::uint8, 4) + static_swizzle1(detail::uint16, 2) + static_swizzle1(detail::uint16, 3) + static_swizzle1(detail::uint16, 4) + static_swizzle1(detail::uint32, 2) + static_swizzle1(detail::uint32, 3) + static_swizzle1(detail::uint32, 4) + static_swizzle1(detail::uint64, 2) + static_swizzle1(detail::uint64, 3) + static_swizzle1(detail::uint64, 4) # define static_swizzle2_const(TYPE) \ - template \ - GLM_FUNC_QUALIFIER TYPE swizzle(TYPE const & v) \ - {return TYPE(v[x], v[y]);} + template \ + GLM_FUNC_QUALIFIER TYPE swizzle(TYPE const & v) \ + {return TYPE(v[x], v[y]);} # define static_swizzle3_const(TYPE) \ - template \ - GLM_FUNC_QUALIFIER TYPE swizzle(TYPE const & v) \ - {return TYPE(v[x], v[y], v[z]);} + template \ + GLM_FUNC_QUALIFIER TYPE swizzle(TYPE const & v) \ + {return TYPE(v[x], v[y], v[z]);} # define static_swizzle4_const(TYPE) \ - template \ - GLM_FUNC_QUALIFIER TYPE swizzle(TYPE const & v) \ - {return TYPE(v[x], v[y], v[z], v[w]);} + template \ + GLM_FUNC_QUALIFIER TYPE swizzle(TYPE const & v) \ + {return TYPE(v[x], v[y], v[z], v[w]);} /* # define static_swizzle2_const(TYPE, SIZE) \ - template \ - GLM_FUNC_QUALIFIER detail::tvec2 swizzle(detail::tvec##SIZE const & v) \ - {return detail::tvec2(v[x], v[y]);} + template \ + GLM_FUNC_QUALIFIER detail::tvec2 swizzle(detail::tvec##SIZE const & v) \ + {return detail::tvec2(v[x], v[y]);} # define static_swizzle3_const(TYPE, SIZE) \ - template \ - GLM_FUNC_QUALIFIER detail::tvec3 swizzle(detail::tvec##SIZE const & v) \ - {return detail::tvec3(v[x], v[y], v[z]);} + template \ + GLM_FUNC_QUALIFIER detail::tvec3 swizzle(detail::tvec##SIZE const & v) \ + {return detail::tvec3(v[x], v[y], v[z]);} # define static_swizzle4_const(TYPE, SIZE) \ - template \ - GLM_FUNC_QUALIFIER detail::tvec4 swizzle(detail::tvec##SIZE const & v) \ - {return detail::tvec4(v[x], v[y], v[z], v[w]);} + template \ + GLM_FUNC_QUALIFIER detail::tvec4 swizzle(detail::tvec##SIZE const & v) \ + {return detail::tvec4(v[x], v[y], v[z], v[w]);} */ - static_swizzle2_const(glm::f16vec2) - static_swizzle2_const(glm::f16vec3) - static_swizzle2_const(glm::f16vec4) - static_swizzle2_const(glm::f32vec2) - static_swizzle2_const(glm::f32vec3) - static_swizzle2_const(glm::f32vec4) - static_swizzle2_const(glm::f64vec2) - static_swizzle2_const(glm::f64vec3) - static_swizzle2_const(glm::f64vec4) + static_swizzle2_const(glm::f16vec2) + static_swizzle2_const(glm::f16vec3) + static_swizzle2_const(glm::f16vec4) + static_swizzle2_const(glm::f32vec2) + static_swizzle2_const(glm::f32vec3) + static_swizzle2_const(glm::f32vec4) + static_swizzle2_const(glm::f64vec2) + static_swizzle2_const(glm::f64vec3) + static_swizzle2_const(glm::f64vec4) - static_swizzle2_const(glm::i8vec2) - static_swizzle2_const(glm::i8vec3) - static_swizzle2_const(glm::i8vec4) - static_swizzle2_const(glm::i16vec2) - static_swizzle2_const(glm::i16vec3) - static_swizzle2_const(glm::i16vec4) - static_swizzle2_const(glm::i32vec2) - static_swizzle2_const(glm::i32vec3) - static_swizzle2_const(glm::i32vec4) - static_swizzle2_const(glm::i64vec2) - static_swizzle2_const(glm::i64vec3) - static_swizzle2_const(glm::i64vec4) + static_swizzle2_const(glm::i8vec2) + static_swizzle2_const(glm::i8vec3) + static_swizzle2_const(glm::i8vec4) + static_swizzle2_const(glm::i16vec2) + static_swizzle2_const(glm::i16vec3) + static_swizzle2_const(glm::i16vec4) + static_swizzle2_const(glm::i32vec2) + static_swizzle2_const(glm::i32vec3) + static_swizzle2_const(glm::i32vec4) + static_swizzle2_const(glm::i64vec2) + static_swizzle2_const(glm::i64vec3) + static_swizzle2_const(glm::i64vec4) - static_swizzle2_const(glm::u8vec2) - static_swizzle2_const(glm::u8vec3) - static_swizzle2_const(glm::u8vec4) - static_swizzle2_const(glm::u16vec2) - static_swizzle2_const(glm::u16vec3) - static_swizzle2_const(glm::u16vec4) - static_swizzle2_const(glm::u32vec2) - static_swizzle2_const(glm::u32vec3) - static_swizzle2_const(glm::u32vec4) - static_swizzle2_const(glm::u64vec2) - static_swizzle2_const(glm::u64vec3) - static_swizzle2_const(glm::u64vec4) + static_swizzle2_const(glm::u8vec2) + static_swizzle2_const(glm::u8vec3) + static_swizzle2_const(glm::u8vec4) + static_swizzle2_const(glm::u16vec2) + static_swizzle2_const(glm::u16vec3) + static_swizzle2_const(glm::u16vec4) + static_swizzle2_const(glm::u32vec2) + static_swizzle2_const(glm::u32vec3) + static_swizzle2_const(glm::u32vec4) + static_swizzle2_const(glm::u64vec2) + static_swizzle2_const(glm::u64vec3) + static_swizzle2_const(glm::u64vec4) - static_swizzle3_const(glm::f16vec2) - static_swizzle3_const(glm::f16vec3) - static_swizzle3_const(glm::f16vec4) - static_swizzle3_const(glm::f32vec2) - static_swizzle3_const(glm::f32vec3) - static_swizzle3_const(glm::f32vec4) - static_swizzle3_const(glm::f64vec2) - static_swizzle3_const(glm::f64vec3) - static_swizzle3_const(glm::f64vec4) + static_swizzle3_const(glm::f16vec2) + static_swizzle3_const(glm::f16vec3) + static_swizzle3_const(glm::f16vec4) + static_swizzle3_const(glm::f32vec2) + static_swizzle3_const(glm::f32vec3) + static_swizzle3_const(glm::f32vec4) + static_swizzle3_const(glm::f64vec2) + static_swizzle3_const(glm::f64vec3) + static_swizzle3_const(glm::f64vec4) - static_swizzle3_const(glm::i8vec2) - static_swizzle3_const(glm::i8vec3) - static_swizzle3_const(glm::i8vec4) - static_swizzle3_const(glm::i16vec2) - static_swizzle3_const(glm::i16vec3) - static_swizzle3_const(glm::i16vec4) - static_swizzle3_const(glm::i32vec2) - static_swizzle3_const(glm::i32vec3) - static_swizzle3_const(glm::i32vec4) - static_swizzle3_const(glm::i64vec2) - static_swizzle3_const(glm::i64vec3) - static_swizzle3_const(glm::i64vec4) + static_swizzle3_const(glm::i8vec2) + static_swizzle3_const(glm::i8vec3) + static_swizzle3_const(glm::i8vec4) + static_swizzle3_const(glm::i16vec2) + static_swizzle3_const(glm::i16vec3) + static_swizzle3_const(glm::i16vec4) + static_swizzle3_const(glm::i32vec2) + static_swizzle3_const(glm::i32vec3) + static_swizzle3_const(glm::i32vec4) + static_swizzle3_const(glm::i64vec2) + static_swizzle3_const(glm::i64vec3) + static_swizzle3_const(glm::i64vec4) - static_swizzle3_const(glm::u8vec2) - static_swizzle3_const(glm::u8vec3) - static_swizzle3_const(glm::u8vec4) - static_swizzle3_const(glm::u16vec2) - static_swizzle3_const(glm::u16vec3) - static_swizzle3_const(glm::u16vec4) - static_swizzle3_const(glm::u32vec2) - static_swizzle3_const(glm::u32vec3) - static_swizzle3_const(glm::u32vec4) - static_swizzle3_const(glm::u64vec2) - static_swizzle3_const(glm::u64vec3) - static_swizzle3_const(glm::u64vec4) + static_swizzle3_const(glm::u8vec2) + static_swizzle3_const(glm::u8vec3) + static_swizzle3_const(glm::u8vec4) + static_swizzle3_const(glm::u16vec2) + static_swizzle3_const(glm::u16vec3) + static_swizzle3_const(glm::u16vec4) + static_swizzle3_const(glm::u32vec2) + static_swizzle3_const(glm::u32vec3) + static_swizzle3_const(glm::u32vec4) + static_swizzle3_const(glm::u64vec2) + static_swizzle3_const(glm::u64vec3) + static_swizzle3_const(glm::u64vec4) - static_swizzle4_const(glm::f16vec2) - static_swizzle4_const(glm::f16vec3) - static_swizzle4_const(glm::f16vec4) - static_swizzle4_const(glm::f32vec2) - static_swizzle4_const(glm::f32vec3) - static_swizzle4_const(glm::f32vec4) - static_swizzle4_const(glm::f64vec2) - static_swizzle4_const(glm::f64vec3) - static_swizzle4_const(glm::f64vec4) + static_swizzle4_const(glm::f16vec2) + static_swizzle4_const(glm::f16vec3) + static_swizzle4_const(glm::f16vec4) + static_swizzle4_const(glm::f32vec2) + static_swizzle4_const(glm::f32vec3) + static_swizzle4_const(glm::f32vec4) + static_swizzle4_const(glm::f64vec2) + static_swizzle4_const(glm::f64vec3) + static_swizzle4_const(glm::f64vec4) - static_swizzle4_const(glm::i8vec2) - static_swizzle4_const(glm::i8vec3) - static_swizzle4_const(glm::i8vec4) - static_swizzle4_const(glm::i16vec2) - static_swizzle4_const(glm::i16vec3) - static_swizzle4_const(glm::i16vec4) - static_swizzle4_const(glm::i32vec2) - static_swizzle4_const(glm::i32vec3) - static_swizzle4_const(glm::i32vec4) - static_swizzle4_const(glm::i64vec2) - static_swizzle4_const(glm::i64vec3) - static_swizzle4_const(glm::i64vec4) + static_swizzle4_const(glm::i8vec2) + static_swizzle4_const(glm::i8vec3) + static_swizzle4_const(glm::i8vec4) + static_swizzle4_const(glm::i16vec2) + static_swizzle4_const(glm::i16vec3) + static_swizzle4_const(glm::i16vec4) + static_swizzle4_const(glm::i32vec2) + static_swizzle4_const(glm::i32vec3) + static_swizzle4_const(glm::i32vec4) + static_swizzle4_const(glm::i64vec2) + static_swizzle4_const(glm::i64vec3) + static_swizzle4_const(glm::i64vec4) - static_swizzle4_const(glm::u8vec2) - static_swizzle4_const(glm::u8vec3) - static_swizzle4_const(glm::u8vec4) - static_swizzle4_const(glm::u16vec2) - static_swizzle4_const(glm::u16vec3) - static_swizzle4_const(glm::u16vec4) - static_swizzle4_const(glm::u32vec2) - static_swizzle4_const(glm::u32vec3) - static_swizzle4_const(glm::u32vec4) - static_swizzle4_const(glm::u64vec2) - static_swizzle4_const(glm::u64vec3) - static_swizzle4_const(glm::u64vec4) + static_swizzle4_const(glm::u8vec2) + static_swizzle4_const(glm::u8vec3) + static_swizzle4_const(glm::u8vec4) + static_swizzle4_const(glm::u16vec2) + static_swizzle4_const(glm::u16vec3) + static_swizzle4_const(glm::u16vec4) + static_swizzle4_const(glm::u32vec2) + static_swizzle4_const(glm::u32vec3) + static_swizzle4_const(glm::u32vec4) + static_swizzle4_const(glm::u64vec2) + static_swizzle4_const(glm::u64vec3) + static_swizzle4_const(glm::u64vec4) # define static_swizzle2_ref(TYPE) \ - template \ - GLM_FUNC_QUALIFIER glm::detail::tref2 swizzle(TYPE & v) \ - {return glm::detail::tref2(v[x], v[y]);} + template \ + GLM_FUNC_QUALIFIER glm::detail::tref2 swizzle(TYPE & v) \ + {return glm::detail::tref2(v[x], v[y]);} # define static_swizzle3_ref(TYPE) \ - template \ - GLM_FUNC_QUALIFIER glm::detail::tref3 swizzle(TYPE & v) \ - {return glm::detail::tref3(v[x], v[y], v[z]);} + template \ + GLM_FUNC_QUALIFIER glm::detail::tref3 swizzle(TYPE & v) \ + {return glm::detail::tref3(v[x], v[y], v[z]);} # define static_swizzle4_ref(TYPE) \ - template \ - GLM_FUNC_QUALIFIER glm::detail::tref4 swizzle(TYPE & v) \ - {return glm::detail::tref4(v[x], v[y], v[z], v[w]);} + template \ + GLM_FUNC_QUALIFIER glm::detail::tref4 swizzle(TYPE & v) \ + {return glm::detail::tref4(v[x], v[y], v[z], v[w]);} - static_swizzle2_ref(glm::f16vec2) - static_swizzle2_ref(glm::f16vec3) - static_swizzle2_ref(glm::f16vec4) - static_swizzle2_ref(glm::f32vec2) - static_swizzle2_ref(glm::f32vec3) - static_swizzle2_ref(glm::f32vec4) - static_swizzle2_ref(glm::f64vec2) - static_swizzle2_ref(glm::f64vec3) - static_swizzle2_ref(glm::f64vec4) + static_swizzle2_ref(glm::f16vec2) + static_swizzle2_ref(glm::f16vec3) + static_swizzle2_ref(glm::f16vec4) + static_swizzle2_ref(glm::f32vec2) + static_swizzle2_ref(glm::f32vec3) + static_swizzle2_ref(glm::f32vec4) + static_swizzle2_ref(glm::f64vec2) + static_swizzle2_ref(glm::f64vec3) + static_swizzle2_ref(glm::f64vec4) - static_swizzle2_ref(glm::i8vec2) - static_swizzle2_ref(glm::i8vec3) - static_swizzle2_ref(glm::i8vec4) - static_swizzle2_ref(glm::i16vec2) - static_swizzle2_ref(glm::i16vec3) - static_swizzle2_ref(glm::i16vec4) - static_swizzle2_ref(glm::i32vec2) - static_swizzle2_ref(glm::i32vec3) - static_swizzle2_ref(glm::i32vec4) - static_swizzle2_ref(glm::i64vec2) - static_swizzle2_ref(glm::i64vec3) - static_swizzle2_ref(glm::i64vec4) + static_swizzle2_ref(glm::i8vec2) + static_swizzle2_ref(glm::i8vec3) + static_swizzle2_ref(glm::i8vec4) + static_swizzle2_ref(glm::i16vec2) + static_swizzle2_ref(glm::i16vec3) + static_swizzle2_ref(glm::i16vec4) + static_swizzle2_ref(glm::i32vec2) + static_swizzle2_ref(glm::i32vec3) + static_swizzle2_ref(glm::i32vec4) + static_swizzle2_ref(glm::i64vec2) + static_swizzle2_ref(glm::i64vec3) + static_swizzle2_ref(glm::i64vec4) - static_swizzle2_ref(glm::u8vec2) - static_swizzle2_ref(glm::u8vec3) - static_swizzle2_ref(glm::u8vec4) - static_swizzle2_ref(glm::u16vec2) - static_swizzle2_ref(glm::u16vec3) - static_swizzle2_ref(glm::u16vec4) - static_swizzle2_ref(glm::u32vec2) - static_swizzle2_ref(glm::u32vec3) - static_swizzle2_ref(glm::u32vec4) - static_swizzle2_ref(glm::u64vec2) - static_swizzle2_ref(glm::u64vec3) - static_swizzle2_ref(glm::u64vec4) + static_swizzle2_ref(glm::u8vec2) + static_swizzle2_ref(glm::u8vec3) + static_swizzle2_ref(glm::u8vec4) + static_swizzle2_ref(glm::u16vec2) + static_swizzle2_ref(glm::u16vec3) + static_swizzle2_ref(glm::u16vec4) + static_swizzle2_ref(glm::u32vec2) + static_swizzle2_ref(glm::u32vec3) + static_swizzle2_ref(glm::u32vec4) + static_swizzle2_ref(glm::u64vec2) + static_swizzle2_ref(glm::u64vec3) + static_swizzle2_ref(glm::u64vec4) - static_swizzle3_ref(glm::f16vec3) - static_swizzle3_ref(glm::f16vec4) - static_swizzle3_ref(glm::f32vec3) - static_swizzle3_ref(glm::f32vec4) - static_swizzle3_ref(glm::f64vec3) - static_swizzle3_ref(glm::f64vec4) + static_swizzle3_ref(glm::f16vec3) + static_swizzle3_ref(glm::f16vec4) + static_swizzle3_ref(glm::f32vec3) + static_swizzle3_ref(glm::f32vec4) + static_swizzle3_ref(glm::f64vec3) + static_swizzle3_ref(glm::f64vec4) - static_swizzle3_ref(glm::i8vec3) - static_swizzle3_ref(glm::i8vec4) - static_swizzle3_ref(glm::i16vec3) - static_swizzle3_ref(glm::i16vec4) - static_swizzle3_ref(glm::i32vec3) - static_swizzle3_ref(glm::i32vec4) - static_swizzle3_ref(glm::i64vec3) - static_swizzle3_ref(glm::i64vec4) + static_swizzle3_ref(glm::i8vec3) + static_swizzle3_ref(glm::i8vec4) + static_swizzle3_ref(glm::i16vec3) + static_swizzle3_ref(glm::i16vec4) + static_swizzle3_ref(glm::i32vec3) + static_swizzle3_ref(glm::i32vec4) + static_swizzle3_ref(glm::i64vec3) + static_swizzle3_ref(glm::i64vec4) - static_swizzle3_ref(glm::u8vec3) - static_swizzle3_ref(glm::u8vec4) - static_swizzle3_ref(glm::u16vec3) - static_swizzle3_ref(glm::u16vec4) - static_swizzle3_ref(glm::u32vec3) - static_swizzle3_ref(glm::u32vec4) - static_swizzle3_ref(glm::u64vec3) - static_swizzle3_ref(glm::u64vec4) + static_swizzle3_ref(glm::u8vec3) + static_swizzle3_ref(glm::u8vec4) + static_swizzle3_ref(glm::u16vec3) + static_swizzle3_ref(glm::u16vec4) + static_swizzle3_ref(glm::u32vec3) + static_swizzle3_ref(glm::u32vec4) + static_swizzle3_ref(glm::u64vec3) + static_swizzle3_ref(glm::u64vec4) - static_swizzle4_ref(glm::f16vec4) - static_swizzle4_ref(glm::f32vec4) - static_swizzle4_ref(glm::f64vec4) + static_swizzle4_ref(glm::f16vec4) + static_swizzle4_ref(glm::f32vec4) + static_swizzle4_ref(glm::f64vec4) - static_swizzle4_ref(glm::i8vec4) - static_swizzle4_ref(glm::i16vec4) - static_swizzle4_ref(glm::i32vec4) - static_swizzle4_ref(glm::i64vec4) + static_swizzle4_ref(glm::i8vec4) + static_swizzle4_ref(glm::i16vec4) + static_swizzle4_ref(glm::i32vec4) + static_swizzle4_ref(glm::i64vec4) - static_swizzle4_ref(glm::u8vec4) - static_swizzle4_ref(glm::u16vec4) - static_swizzle4_ref(glm::u32vec4) - static_swizzle4_ref(glm::u64vec4) + static_swizzle4_ref(glm::u8vec4) + static_swizzle4_ref(glm::u16vec4) + static_swizzle4_ref(glm::u32vec4) + static_swizzle4_ref(glm::u64vec4) - }//namespace swizzle - }//namespace gtc +}//namespace swizzle +}//namespace gtc }//namespace glm #include "swizzle.inl" diff --git a/glm/gtc/type_precision.hpp b/glm/gtc/type_precision.hpp index b7ca27ff..a817ed53 100644 --- a/glm/gtc/type_precision.hpp +++ b/glm/gtc/type_precision.hpp @@ -24,195 +24,193 @@ # pragma message("GLM: GLM_GTC_type_precision extension included") #endif -namespace glm +namespace glm{ +namespace gtc{ +namespace type_precision ///< GLM_GTC_type_precision extension: Defined types with specific size. { - namespace gtc{ - //! GLM_GTC_type_precision extension: Defined types with specific size. - namespace type_precision - { - /////////////////////////// - // Dependences + /////////////////////////// + // Dependences - using namespace gtc::half_float; - using namespace gtc::quaternion; + using namespace gtc::half_float; + using namespace gtc::quaternion; - /////////////////////////// - // Signed int vector types + /////////////////////////// + // Signed int vector types - /// \addtogroup gtc_type_precision - ///@{ + /// \addtogroup gtc_type_precision + ///@{ - typedef detail::int8 int8; //!< \brief 8bit signed integer. (from GLM_GTC_type_precision extension) - typedef detail::int16 int16; //!< \brief 16bit signed integer. (from GLM_GTC_type_precision extension) - typedef detail::int32 int32; //!< \brief 32bit signed integer. (from GLM_GTC_type_precision extension) - typedef detail::int64 int64; //!< \brief 64bit signed integer. (from GLM_GTC_type_precision extension) + typedef detail::int8 int8; //!< \brief 8bit signed integer. (from GLM_GTC_type_precision extension) + typedef detail::int16 int16; //!< \brief 16bit signed integer. (from GLM_GTC_type_precision extension) + typedef detail::int32 int32; //!< \brief 32bit signed integer. (from GLM_GTC_type_precision extension) + typedef detail::int64 int64; //!< \brief 64bit signed integer. (from GLM_GTC_type_precision extension) - typedef int8 i8; //!< \brief 8bit signed integer. (from GLM_GTC_type_precision extension) - typedef int16 i16; //!< \brief 16bit signed integer. (from GLM_GTC_type_precision extension) - typedef int32 i32; //!< \brief 32bit signed integer. (from GLM_GTC_type_precision extension) - typedef int64 i64; //!< \brief 64bit signed integer. (from GLM_GTC_type_precision extension) + typedef int8 i8; //!< \brief 8bit signed integer. (from GLM_GTC_type_precision extension) + typedef int16 i16; //!< \brief 16bit signed integer. (from GLM_GTC_type_precision extension) + typedef int32 i32; //!< \brief 32bit signed integer. (from GLM_GTC_type_precision extension) + typedef int64 i64; //!< \brief 64bit signed integer. (from GLM_GTC_type_precision extension) - //typedef i8 i8vec1; //!< \brief 8bit signed integer scalar. (from GLM_GTC_type_precision extension) - typedef detail::tvec2 i8vec2; //!< \brief 8bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension) - typedef detail::tvec3 i8vec3; //!< \brief 8bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension) - typedef detail::tvec4 i8vec4; //!< \brief 8bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension) + //typedef i8 i8vec1; //!< \brief 8bit signed integer scalar. (from GLM_GTC_type_precision extension) + typedef detail::tvec2 i8vec2; //!< \brief 8bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension) + typedef detail::tvec3 i8vec3; //!< \brief 8bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension) + typedef detail::tvec4 i8vec4; //!< \brief 8bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension) - //typedef i16 i16vec1; //!< \brief 16bit signed integer scalar. (from GLM_GTC_type_precision extension) - typedef detail::tvec2 i16vec2; //!< \brief 16bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension) - typedef detail::tvec3 i16vec3; //!< \brief 16bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension) - typedef detail::tvec4 i16vec4; //!< \brief 16bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension) + //typedef i16 i16vec1; //!< \brief 16bit signed integer scalar. (from GLM_GTC_type_precision extension) + typedef detail::tvec2 i16vec2; //!< \brief 16bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension) + typedef detail::tvec3 i16vec3; //!< \brief 16bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension) + typedef detail::tvec4 i16vec4; //!< \brief 16bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension) - //typedef i32 i32vec1; //!< \brief 32bit signed integer scalar. (from GLM_GTC_type_precision extension) - typedef detail::tvec2 i32vec2; //!< \brief 32bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension) - typedef detail::tvec3 i32vec3; //!< \brief 32bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension) - typedef detail::tvec4 i32vec4; //!< \brief 32bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension) + //typedef i32 i32vec1; //!< \brief 32bit signed integer scalar. (from GLM_GTC_type_precision extension) + typedef detail::tvec2 i32vec2; //!< \brief 32bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension) + typedef detail::tvec3 i32vec3; //!< \brief 32bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension) + typedef detail::tvec4 i32vec4; //!< \brief 32bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension) - //typedef i64 i64vec1; //!< \brief 32bit signed integer scalar. (from GLM_GTC_type_precision extension) - typedef detail::tvec2 i64vec2; //!< \brief 64bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension) - typedef detail::tvec3 i64vec3; //!< \brief 64bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension) - typedef detail::tvec4 i64vec4; //!< \brief 64bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension) + //typedef i64 i64vec1; //!< \brief 32bit signed integer scalar. (from GLM_GTC_type_precision extension) + typedef detail::tvec2 i64vec2; //!< \brief 64bit signed integer vector of 2 components. (from GLM_GTC_type_precision extension) + typedef detail::tvec3 i64vec3; //!< \brief 64bit signed integer vector of 3 components. (from GLM_GTC_type_precision extension) + typedef detail::tvec4 i64vec4; //!< \brief 64bit signed integer vector of 4 components. (from GLM_GTC_type_precision extension) - ///////////////////////////// - // Unsigned int vector types + ///////////////////////////// + // Unsigned int vector types - typedef detail::uint8 uint8; //!< \brief 8bit unsigned integer. (from GLM_GTC_type_precision extension) - typedef detail::uint16 uint16; //!< \brief 16bit unsigned integer. (from GLM_GTC_type_precision extension) - typedef detail::uint32 uint32; //!< \brief 32bit unsigned integer. (from GLM_GTC_type_precision extension) - typedef detail::uint64 uint64; //!< \brief 64bit unsigned integer. (from GLM_GTC_type_precision extension) + typedef detail::uint8 uint8; //!< \brief 8bit unsigned integer. (from GLM_GTC_type_precision extension) + typedef detail::uint16 uint16; //!< \brief 16bit unsigned integer. (from GLM_GTC_type_precision extension) + typedef detail::uint32 uint32; //!< \brief 32bit unsigned integer. (from GLM_GTC_type_precision extension) + typedef detail::uint64 uint64; //!< \brief 64bit unsigned integer. (from GLM_GTC_type_precision extension) - typedef uint8 u8; //!< \brief 8bit unsigned integer. (from GLM_GTC_type_precision extension) - typedef uint16 u16; //!< \brief 16bit unsigned integer. (from GLM_GTC_type_precision extension) - typedef uint32 u32; //!< \brief 32bit unsigned integer. (from GLM_GTC_type_precision extension) - typedef uint64 u64; //!< \brief 64bit unsigned integer. (from GLM_GTC_type_precision extension) + typedef uint8 u8; //!< \brief 8bit unsigned integer. (from GLM_GTC_type_precision extension) + typedef uint16 u16; //!< \brief 16bit unsigned integer. (from GLM_GTC_type_precision extension) + typedef uint32 u32; //!< \brief 32bit unsigned integer. (from GLM_GTC_type_precision extension) + typedef uint64 u64; //!< \brief 64bit unsigned integer. (from GLM_GTC_type_precision extension) - //typedef u8 u8vec1; //!< \brief 8bit unsigned integer scalar. (from GLM_GTC_type_precision extension) - typedef detail::tvec2 u8vec2; //!< \brief 8bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension) - typedef detail::tvec3 u8vec3; //!< \brief 8bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension) - typedef detail::tvec4 u8vec4; //!< \brief 8bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension) + //typedef u8 u8vec1; //!< \brief 8bit unsigned integer scalar. (from GLM_GTC_type_precision extension) + typedef detail::tvec2 u8vec2; //!< \brief 8bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension) + typedef detail::tvec3 u8vec3; //!< \brief 8bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension) + typedef detail::tvec4 u8vec4; //!< \brief 8bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension) - //typedef u16 u16vec1; //!< \brief 16bit unsigned integer scalar. (from GLM_GTC_type_precision extension) - typedef detail::tvec2 u16vec2; //!< \brief 16bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension) - typedef detail::tvec3 u16vec3; //!< \brief 16bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension) - typedef detail::tvec4 u16vec4; //!< \brief 16bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension) + //typedef u16 u16vec1; //!< \brief 16bit unsigned integer scalar. (from GLM_GTC_type_precision extension) + typedef detail::tvec2 u16vec2; //!< \brief 16bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension) + typedef detail::tvec3 u16vec3; //!< \brief 16bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension) + typedef detail::tvec4 u16vec4; //!< \brief 16bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension) - //typedef u32 u32vec1; //!< \brief 32bit unsigned integer scalar. (from GLM_GTC_type_precision extension) - typedef detail::tvec2 u32vec2; //!< \brief 32bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension) - typedef detail::tvec3 u32vec3; //!< \brief 32bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension) - typedef detail::tvec4 u32vec4; //!< \brief 32bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension) + //typedef u32 u32vec1; //!< \brief 32bit unsigned integer scalar. (from GLM_GTC_type_precision extension) + typedef detail::tvec2 u32vec2; //!< \brief 32bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension) + typedef detail::tvec3 u32vec3; //!< \brief 32bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension) + typedef detail::tvec4 u32vec4; //!< \brief 32bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension) - //typedef u64 u64vec1; //!< \brief 64bit unsigned integer scalar. (from GLM_GTC_type_precision extension) - typedef detail::tvec2 u64vec2; //!< \brief 64bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension) - typedef detail::tvec3 u64vec3; //!< \brief 64bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension) - typedef detail::tvec4 u64vec4; //!< \brief 64bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension) + //typedef u64 u64vec1; //!< \brief 64bit unsigned integer scalar. (from GLM_GTC_type_precision extension) + typedef detail::tvec2 u64vec2; //!< \brief 64bit unsigned integer vector of 2 components. (from GLM_GTC_type_precision extension) + typedef detail::tvec3 u64vec3; //!< \brief 64bit unsigned integer vector of 3 components. (from GLM_GTC_type_precision extension) + typedef detail::tvec4 u64vec4; //!< \brief 64bit unsigned integer vector of 4 components. (from GLM_GTC_type_precision extension) - ////////////////////// - // Float vector types + ////////////////////// + // Float vector types - typedef detail::float16 float16; //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension) - typedef detail::float32 float32; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension) - typedef detail::float64 float64; //!< \brief Double-precision floating-point scalar. (from GLM_GTC_type_precision extension) + typedef detail::float16 float16; //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension) + typedef detail::float32 float32; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension) + typedef detail::float64 float64; //!< \brief Double-precision floating-point scalar. (from GLM_GTC_type_precision extension) - typedef float16 f16; //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension) - typedef float32 f32; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension) - typedef float64 f64; //!< \brief Double-precision floating-point scalar. (from GLM_GTC_type_precision extension) + typedef float16 f16; //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension) + typedef float32 f32; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension) + typedef float64 f64; //!< \brief Double-precision floating-point scalar. (from GLM_GTC_type_precision extension) - typedef detail::tvec2 fvec2; //!< Vector of 2 single-precision floating-point numbers. (from GLM_GTC_type_precision extension) - typedef detail::tvec3 fvec3; //!< Vector of 3 single-precision floating-point numbers. (from GLM_GTC_type_precision extension) - typedef detail::tvec4 fvec4; //!< Vector of 4 single-precision floating-point numbers. (from GLM_GTC_type_precision extension) + typedef detail::tvec2 fvec2; //!< Vector of 2 single-precision floating-point numbers. (from GLM_GTC_type_precision extension) + typedef detail::tvec3 fvec3; //!< Vector of 3 single-precision floating-point numbers. (from GLM_GTC_type_precision extension) + typedef detail::tvec4 fvec4; //!< Vector of 4 single-precision floating-point numbers. (from GLM_GTC_type_precision extension) - //typedef f16 f16vec1; //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension) - typedef detail::tvec2 f16vec2; //!< \brief Half-precision floating-point vector of 2 components. (from GLM_GTC_type_precision extension) - typedef detail::tvec3 f16vec3; //!< \brief Half-precision floating-point vector of 3 components. (from GLM_GTC_type_precision extension) - typedef detail::tvec4 f16vec4; //!< \brief Half-precision floating-point vector of 4 components. (from GLM_GTC_type_precision extension) + //typedef f16 f16vec1; //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension) + typedef detail::tvec2 f16vec2; //!< \brief Half-precision floating-point vector of 2 components. (from GLM_GTC_type_precision extension) + typedef detail::tvec3 f16vec3; //!< \brief Half-precision floating-point vector of 3 components. (from GLM_GTC_type_precision extension) + typedef detail::tvec4 f16vec4; //!< \brief Half-precision floating-point vector of 4 components. (from GLM_GTC_type_precision extension) - //typedef f32 f32vec1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension) - typedef detail::tvec2 f32vec2; //!< \brief Single-precision floating-point vector of 2 components. (from GLM_GTC_type_precision extension) - typedef detail::tvec3 f32vec3; //!< \brief Single-precision floating-point vector of 3 components. (from GLM_GTC_type_precision extension) - typedef detail::tvec4 f32vec4; //!< \brief Single-precision floating-point vector of 4 components. (from GLM_GTC_type_precision extension) + //typedef f32 f32vec1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension) + typedef detail::tvec2 f32vec2; //!< \brief Single-precision floating-point vector of 2 components. (from GLM_GTC_type_precision extension) + typedef detail::tvec3 f32vec3; //!< \brief Single-precision floating-point vector of 3 components. (from GLM_GTC_type_precision extension) + typedef detail::tvec4 f32vec4; //!< \brief Single-precision floating-point vector of 4 components. (from GLM_GTC_type_precision extension) - //typedef f64 f64vec1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension) - typedef detail::tvec2 f64vec2; //!< \brief Double-precision floating-point vector of 2 components. (from GLM_GTC_type_precision extension) - typedef detail::tvec3 f64vec3; //!< \brief Double-precision floating-point vector of 3 components. (from GLM_GTC_type_precision extension) - typedef detail::tvec4 f64vec4; //!< \brief Double-precision floating-point vector of 4 components. (from GLM_GTC_type_precision extension) + //typedef f64 f64vec1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension) + typedef detail::tvec2 f64vec2; //!< \brief Double-precision floating-point vector of 2 components. (from GLM_GTC_type_precision extension) + typedef detail::tvec3 f64vec3; //!< \brief Double-precision floating-point vector of 3 components. (from GLM_GTC_type_precision extension) + typedef detail::tvec4 f64vec4; //!< \brief Double-precision floating-point vector of 4 components. (from GLM_GTC_type_precision extension) - ////////////////////// - // Float matrix types + ////////////////////// + // Float matrix types - //typedef f32 fmat1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension) - typedef detail::tmat2x2 fmat2; //!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat3x3 fmat3; //!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat4x4 fmat4; //!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) + //typedef f32 fmat1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension) + typedef detail::tmat2x2 fmat2; //!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat3x3 fmat3; //!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat4x4 fmat4; //!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) - //typedef f32 fmat1x1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension) - typedef detail::tmat2x2 fmat2x2; //!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat2x3 fmat2x3; //!< \brief Single-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat2x4 fmat2x4; //!< \brief Single-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat3x2 fmat3x2; //!< \brief Single-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat3x3 fmat3x3; //!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat3x4 fmat3x4; //!< \brief Single-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat4x2 fmat4x2; //!< \brief Single-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat4x3 fmat4x3; //!< \brief Single-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat4x4 fmat4x4; //!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) + //typedef f32 fmat1x1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension) + typedef detail::tmat2x2 fmat2x2; //!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat2x3 fmat2x3; //!< \brief Single-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat2x4 fmat2x4; //!< \brief Single-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat3x2 fmat3x2; //!< \brief Single-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat3x3 fmat3x3; //!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat3x4 fmat3x4; //!< \brief Single-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat4x2 fmat4x2; //!< \brief Single-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat4x3 fmat4x3; //!< \brief Single-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat4x4 fmat4x4; //!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) - //typedef f16 f16mat1; //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension) - typedef detail::tmat2x2 f16mat2; //!< \brief Half-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat3x3 f16mat3; //!< \brief Half-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat4x4 f16mat4; //!< \brief Half-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) + //typedef f16 f16mat1; //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension) + typedef detail::tmat2x2 f16mat2; //!< \brief Half-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat3x3 f16mat3; //!< \brief Half-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat4x4 f16mat4; //!< \brief Half-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) - //typedef f16 f16mat1x1; //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension) - typedef detail::tmat2x2 f16mat2x2; //!< \brief Half-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat2x3 f16mat2x3; //!< \brief Half-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat2x4 f16mat2x4; //!< \brief Half-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat3x2 f16mat3x2; //!< \brief Half-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat3x3 f16mat3x3; //!< \brief Half-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat3x4 f16mat3x4; //!< \brief Half-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat4x2 f16mat4x2; //!< \brief Half-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat4x3 f16mat4x3; //!< \brief Half-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat4x4 f16mat4x4; //!< \brief Half-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) + //typedef f16 f16mat1x1; //!< \brief Half-precision floating-point scalar. (from GLM_GTC_type_precision extension) + typedef detail::tmat2x2 f16mat2x2; //!< \brief Half-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat2x3 f16mat2x3; //!< \brief Half-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat2x4 f16mat2x4; //!< \brief Half-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat3x2 f16mat3x2; //!< \brief Half-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat3x3 f16mat3x3; //!< \brief Half-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat3x4 f16mat3x4; //!< \brief Half-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat4x2 f16mat4x2; //!< \brief Half-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat4x3 f16mat4x3; //!< \brief Half-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat4x4 f16mat4x4; //!< \brief Half-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) - //typedef f32 f32mat1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension) - typedef detail::tmat2x2 f32mat2; //!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat3x3 f32mat3; //!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat4x4 f32mat4; //!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) + //typedef f32 f32mat1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension) + typedef detail::tmat2x2 f32mat2; //!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat3x3 f32mat3; //!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat4x4 f32mat4; //!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) - //typedef f32 f32mat1x1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension) - typedef detail::tmat2x2 f32mat2x2; //!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat2x3 f32mat2x3; //!< \brief Single-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat2x4 f32mat2x4; //!< \brief Single-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat3x2 f32mat3x2; //!< \brief Single-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat3x3 f32mat3x3; //!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat3x4 f32mat3x4; //!< \brief Single-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat4x2 f32mat4x2; //!< \brief Single-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat4x3 f32mat4x3; //!< \brief Single-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat4x4 f32mat4x4; //!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) + //typedef f32 f32mat1x1; //!< \brief Single-precision floating-point scalar. (from GLM_GTC_type_precision extension) + typedef detail::tmat2x2 f32mat2x2; //!< \brief Single-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat2x3 f32mat2x3; //!< \brief Single-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat2x4 f32mat2x4; //!< \brief Single-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat3x2 f32mat3x2; //!< \brief Single-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat3x3 f32mat3x3; //!< \brief Single-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat3x4 f32mat3x4; //!< \brief Single-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat4x2 f32mat4x2; //!< \brief Single-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat4x3 f32mat4x3; //!< \brief Single-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat4x4 f32mat4x4; //!< \brief Single-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) - //typedef f64 f64mat1; //!< \brief Double-precision floating-point scalar. (from GLM_GTC_type_precision extension) - typedef detail::tmat2x2 f64mat2; //!< \brief Double-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat3x3 f64mat3; //!< \brief Double-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat4x4 f64mat4; //!< \brief Double-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) + //typedef f64 f64mat1; //!< \brief Double-precision floating-point scalar. (from GLM_GTC_type_precision extension) + typedef detail::tmat2x2 f64mat2; //!< \brief Double-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat3x3 f64mat3; //!< \brief Double-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat4x4 f64mat4; //!< \brief Double-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) - //typedef f64 f64mat1x1; //!< \brief Double-precision floating-point scalar. (from GLM_GTC_type_precision extension) - typedef detail::tmat2x2 f64mat2x2; //!< \brief Double-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat2x3 f64mat2x3; //!< \brief Double-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat2x4 f64mat2x4; //!< \brief Double-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat3x2 f64mat3x2; //!< \brief Double-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat3x3 f64mat3x3; //!< \brief Double-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat3x4 f64mat3x4; //!< \brief Double-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat4x2 f64mat4x2; //!< \brief Double-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat4x3 f64mat4x3; //!< \brief Double-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension) - typedef detail::tmat4x4 f64mat4x4; //!< \brief Double-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) + //typedef f64 f64mat1x1; //!< \brief Double-precision floating-point scalar. (from GLM_GTC_type_precision extension) + typedef detail::tmat2x2 f64mat2x2; //!< \brief Double-precision floating-point 2x2 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat2x3 f64mat2x3; //!< \brief Double-precision floating-point 2x3 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat2x4 f64mat2x4; //!< \brief Double-precision floating-point 2x4 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat3x2 f64mat3x2; //!< \brief Double-precision floating-point 3x2 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat3x3 f64mat3x3; //!< \brief Double-precision floating-point 3x3 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat3x4 f64mat3x4; //!< \brief Double-precision floating-point 3x4 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat4x2 f64mat4x2; //!< \brief Double-precision floating-point 4x2 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat4x3 f64mat4x3; //!< \brief Double-precision floating-point 4x3 matrix. (from GLM_GTC_type_precision extension) + typedef detail::tmat4x4 f64mat4x4; //!< \brief Double-precision floating-point 4x4 matrix. (from GLM_GTC_type_precision extension) - ////////////////////////// - // Float quaternion types + ////////////////////////// + // Float quaternion types - typedef detail::tquat f16quat; //!< \brief Half-precision floating-point quaternion. (from GLM_GTC_type_precision extension) - typedef detail::tquat f32quat; //!< \brief Single-precision floating-point quaternion. (from GLM_GTC_type_precision extension) - typedef detail::tquat f64quat; //!< \brief Double-precision floating-point quaternion. (from GLM_GTC_type_precision extension) + typedef detail::tquat f16quat; //!< \brief Half-precision floating-point quaternion. (from GLM_GTC_type_precision extension) + typedef detail::tquat f32quat; //!< \brief Single-precision floating-point quaternion. (from GLM_GTC_type_precision extension) + typedef detail::tquat f64quat; //!< \brief Double-precision floating-point quaternion. (from GLM_GTC_type_precision extension) - ///@} + ///@} - }//namespace type_precision - }//namespace gtc +}//namespace type_precision +}//namespace gtc }//namespace glm #include "type_precision.inl" diff --git a/glm/gtc/type_ptr.hpp b/glm/gtc/type_ptr.hpp index 3d55e8f2..85f18f36 100644 --- a/glm/gtc/type_ptr.hpp +++ b/glm/gtc/type_ptr.hpp @@ -21,425 +21,424 @@ # pragma message("GLM: GLM_GTC_type_ptr extension included") #endif -namespace glm -{ - namespace gtc{ - //! GLM_GTC_type_ptr extension: Get access to vectors & matrices value type address. - namespace type_ptr{ +namespace glm{ +namespace gtc{ +namespace type_ptr ///< GLM_GTC_type_ptr extension: Get access to vectors & matrices value type address. +{ - /// \addtogroup gtc_type_ptr - ///@{ + /// \addtogroup gtc_type_ptr + ///@{ - //! Get the const address of the vector content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tvec2 const & vec - ) - { - return &(vec.x); - } + //! Get the const address of the vector content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tvec2 const & vec + ) + { + return &(vec.x); + } - //! Get the address of the vector content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tvec2 & vec - ) - { - return &(vec.x); - } + //! Get the address of the vector content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tvec2 & vec + ) + { + return &(vec.x); + } - //! Get the const address of the vector content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tvec3 const & vec - ) - { - return &(vec.x); - } + //! Get the const address of the vector content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tvec3 const & vec + ) + { + return &(vec.x); + } - //! Get the address of the vector content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tvec3 & vec - ) - { - return &(vec.x); - } + //! Get the address of the vector content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tvec3 & vec + ) + { + return &(vec.x); + } - //! Get the const address of the vector content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tvec4 const & vec - ) - { - return &(vec.x); - } + //! Get the const address of the vector content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tvec4 const & vec + ) + { + return &(vec.x); + } - //! Get the address of the vector content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tvec4 & vec - ) - { - return &(vec.x); - } + //! Get the address of the vector content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tvec4 & vec + ) + { + return &(vec.x); + } - //! Get the const address of the matrix content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tmat2x2 const & mat - ) - { - return &(mat[0].x); - } + //! Get the const address of the matrix content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat2x2 const & mat + ) + { + return &(mat[0].x); + } - //! Get the address of the matrix content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tmat2x2 & mat - ) - { - return &(mat[0].x); - } + //! Get the address of the matrix content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat2x2 & mat + ) + { + return &(mat[0].x); + } - //! Get the const address of the matrix content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tmat3x3 const & mat - ) - { - return &(mat[0].x); - } + //! Get the const address of the matrix content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat3x3 const & mat + ) + { + return &(mat[0].x); + } - //! Get the address of the matrix content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tmat3x3 & mat - ) - { - return &(mat[0].x); - } + //! Get the address of the matrix content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat3x3 & mat + ) + { + return &(mat[0].x); + } - //! Get the const address of the matrix content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tmat4x4 const & mat - ) - { - return &(mat[0].x); - } + //! Get the const address of the matrix content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat4x4 const & mat + ) + { + return &(mat[0].x); + } - //! Get the address of the matrix content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tmat4x4 & mat - ) - { - return &(mat[0].x); - } + //! Get the address of the matrix content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat4x4 & mat + ) + { + return &(mat[0].x); + } - //! Get the const address of the matrix content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tmat2x3 const & mat - ) - { - return &(mat[0].x); - } + //! Get the const address of the matrix content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat2x3 const & mat + ) + { + return &(mat[0].x); + } - //! Get the address of the matrix content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tmat2x3 & mat - ) - { - return &(mat[0].x); - } + //! Get the address of the matrix content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat2x3 & mat + ) + { + return &(mat[0].x); + } - //! Get the const address of the matrix content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tmat3x2 const & mat - ) - { - return &(mat[0].x); - } + //! Get the const address of the matrix content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat3x2 const & mat + ) + { + return &(mat[0].x); + } - //! Get the address of the matrix content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tmat3x2 & mat - ) - { - return &(mat[0].x); - } + //! Get the address of the matrix content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat3x2 & mat + ) + { + return &(mat[0].x); + } - //! Get the const address of the matrix content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tmat2x4 const & mat - ) - { - return &(mat[0].x); - } + //! Get the const address of the matrix content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat2x4 const & mat + ) + { + return &(mat[0].x); + } - //! Get the address of the matrix content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tmat2x4 & mat - ) - { - return &(mat[0].x); - } + //! Get the address of the matrix content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat2x4 & mat + ) + { + return &(mat[0].x); + } - //! Get the const address of the matrix content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tmat4x2 const & mat - ) - { - return &(mat[0].x); - } + //! Get the const address of the matrix content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat4x2 const & mat + ) + { + return &(mat[0].x); + } - //! Get the address of the matrix content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tmat4x2 & mat - ) - { - return &(mat[0].x); - } + //! Get the address of the matrix content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat4x2 & mat + ) + { + return &(mat[0].x); + } - //! Get the const address of the matrix content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tmat3x4 const & mat - ) - { - return &(mat[0].x); - } + //! Get the const address of the matrix content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat3x4 const & mat + ) + { + return &(mat[0].x); + } - //! Get the address of the matrix content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T * value_ptr - ( - detail::tmat3x4 & mat - ) - { - return &(mat[0].x); - } + //! Get the address of the matrix content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T * value_ptr + ( + detail::tmat3x4 & mat + ) + { + return &(mat[0].x); + } - //! Get the const address of the matrix content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T const * value_ptr - ( - detail::tmat4x3 const & mat - ) - { - return &(mat[0].x); - } + //! Get the const address of the matrix content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T const * value_ptr + ( + detail::tmat4x3 const & mat + ) + { + return &(mat[0].x); + } - //! Get the address of the matrix content. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER T * value_ptr(detail::tmat4x3 & mat) - { - return &(mat[0].x); - } + //! Get the address of the matrix content. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER T * value_ptr(detail::tmat4x3 & mat) + { + return &(mat[0].x); + } - //! Build a vector from a pointer. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER detail::tvec2 make_vec2(T const * const ptr) - { - detail::tvec2 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tvec2)); - return Result; - } + //! Build a vector from a pointer. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER detail::tvec2 make_vec2(T const * const ptr) + { + detail::tvec2 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tvec2)); + return Result; + } - //! Build a vector from a pointer. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER detail::tvec3 make_vec3(T const * const ptr) - { - detail::tvec3 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tvec3)); - return Result; - } + //! Build a vector from a pointer. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER detail::tvec3 make_vec3(T const * const ptr) + { + detail::tvec3 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tvec3)); + return Result; + } - //! Build a vector from a pointer. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER detail::tvec4 make_vec4(T const * const ptr) - { - detail::tvec4 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tvec4)); - return Result; - } + //! Build a vector from a pointer. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER detail::tvec4 make_vec4(T const * const ptr) + { + detail::tvec4 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tvec4)); + return Result; + } - //! Build a matrix from a pointer. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER detail::tmat2x2 make_mat2x2(T const * const ptr) - { - detail::tmat2x2 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x2)); - return Result; - } + //! Build a matrix from a pointer. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER detail::tmat2x2 make_mat2x2(T const * const ptr) + { + detail::tmat2x2 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x2)); + return Result; + } - //! Build a matrix from a pointer. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER detail::tmat2x3 make_mat2x3(T const * const ptr) - { - detail::tmat2x3 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x3)); - return Result; - } + //! Build a matrix from a pointer. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER detail::tmat2x3 make_mat2x3(T const * const ptr) + { + detail::tmat2x3 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x3)); + return Result; + } - //! Build a matrix from a pointer. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER detail::tmat2x4 make_mat2x4(T const * const ptr) - { - detail::tmat2x4 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x4)); - return Result; - } + //! Build a matrix from a pointer. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER detail::tmat2x4 make_mat2x4(T const * const ptr) + { + detail::tmat2x4 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat2x4)); + return Result; + } - //! Build a matrix from a pointer. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER detail::tmat3x2 make_mat3x2(T const * const ptr) - { - detail::tmat3x2 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x2)); - return Result; - } + //! Build a matrix from a pointer. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER detail::tmat3x2 make_mat3x2(T const * const ptr) + { + detail::tmat3x2 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x2)); + return Result; + } - //! Build a matrix from a pointer. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER detail::tmat3x3 make_mat3x3(T const * const ptr) - { - detail::tmat3x3 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x3)); - return Result; - } + //! Build a matrix from a pointer. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER detail::tmat3x3 make_mat3x3(T const * const ptr) + { + detail::tmat3x3 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x3)); + return Result; + } - //! Build a matrix from a pointer. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER detail::tmat3x4 make_mat3x4(T const * const ptr) - { - detail::tmat3x4 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x4)); - return Result; - } + //! Build a matrix from a pointer. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER detail::tmat3x4 make_mat3x4(T const * const ptr) + { + detail::tmat3x4 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat3x4)); + return Result; + } - //! Build a matrix from a pointer. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER detail::tmat4x2 make_mat4x2(T const * const ptr) - { - detail::tmat4x2 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x2)); - return Result; - } + //! Build a matrix from a pointer. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER detail::tmat4x2 make_mat4x2(T const * const ptr) + { + detail::tmat4x2 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x2)); + return Result; + } - //! Build a matrix from a pointer. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER detail::tmat4x3 make_mat4x3(T const * const ptr) - { - detail::tmat4x3 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x3)); - return Result; - } + //! Build a matrix from a pointer. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER detail::tmat4x3 make_mat4x3(T const * const ptr) + { + detail::tmat4x3 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x3)); + return Result; + } - //! Build a matrix from a pointer. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER detail::tmat4x4 make_mat4x4(T const * const ptr) - { - detail::tmat4x4 Result; - memcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x4)); - return Result; - } + //! Build a matrix from a pointer. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER detail::tmat4x4 make_mat4x4(T const * const ptr) + { + detail::tmat4x4 Result; + memcpy(value_ptr(Result), ptr, sizeof(detail::tmat4x4)); + return Result; + } - //! Build a matrix from a pointer. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER detail::tmat2x2 make_mat2(T const * const ptr) - { - return make_mat2x2(ptr); - } + //! Build a matrix from a pointer. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER detail::tmat2x2 make_mat2(T const * const ptr) + { + return make_mat2x2(ptr); + } - //! Build a matrix from a pointer. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER detail::tmat3x3 make_mat3(T const * const ptr) - { - return make_mat3x3(ptr); - } + //! Build a matrix from a pointer. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER detail::tmat3x3 make_mat3(T const * const ptr) + { + return make_mat3x3(ptr); + } - //! Build a matrix from a pointer. - //! From GLM_GTC_type_ptr extension. - template - GLM_FUNC_QUALIFIER detail::tmat4x4 make_mat4(T const * const ptr) - { - return make_mat4x4(ptr); - } + //! Build a matrix from a pointer. + //! From GLM_GTC_type_ptr extension. + template + GLM_FUNC_QUALIFIER detail::tmat4x4 make_mat4(T const * const ptr) + { + return make_mat4x4(ptr); + } - ///@} + ///@} - }//namespace type_ptr - }//namespace gtc +}//namespace type_ptr +}//namespace gtc }//namespace glm #include "type_ptr.inl"