From 1205927b896b5937ea4c17815c815b777955e655 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Tue, 7 Jun 2011 11:48:54 +0100 Subject: [PATCH] Removed gtx extension namespace --- glm/gtx/color_cast.hpp | 6 +++--- glm/gtx/color_cast.inl | 3 --- glm/gtx/gradient_paint.inl | 8 ++++---- glm/gtx/matrix_operation.hpp | 2 -- glm/gtx/normalize_dot.inl | 8 ++++---- glm/gtx/perpendicular.inl | 6 +++--- glm/gtx/raw_data.hpp | 1 - glm/gtx/rotate_vector.inl | 6 +++--- glm/gtx/spline.hpp | 10 ++-------- glm/gtx/spline.inl | 12 +++++------- glm/gtx/std_based_type.hpp | 6 +----- glm/gtx/string_cast.hpp | 12 ++---------- glm/gtx/string_cast.inl | 6 ++---- glm/gtx/transform.hpp | 8 ++------ glm/gtx/transform.inl | 4 +--- glm/gtx/transform2.hpp | 10 ++-------- glm/gtx/transform2.inl | 4 +--- glm/gtx/ulp.hpp | 8 ++------ glm/gtx/ulp.inl | 5 ++--- glm/gtx/unsigned_int.hpp | 10 ++-------- glm/gtx/unsigned_int.inl | 2 -- glm/gtx/vec1.hpp | 32 +++++++++++++------------------- glm/gtx/vector_access.hpp | 8 ++------ glm/gtx/vector_access.inl | 2 -- glm/gtx/vector_angle.hpp | 13 +++---------- glm/gtx/vector_angle.inl | 4 +--- glm/gtx/vector_query.hpp | 8 ++------ glm/gtx/vector_query.inl | 4 +--- glm/gtx/verbose_operator.hpp | 8 ++------ glm/gtx/verbose_operator.inl | 2 -- glm/gtx/wrap.hpp | 8 ++------ glm/gtx/wrap.inl | 4 +--- 32 files changed, 68 insertions(+), 162 deletions(-) diff --git a/glm/gtx/color_cast.hpp b/glm/gtx/color_cast.hpp index 5cc202b7..b4ec3c94 100644 --- a/glm/gtx/color_cast.hpp +++ b/glm/gtx/color_cast.hpp @@ -56,7 +56,7 @@ namespace gtx template gtc::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::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::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::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::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) @@ -68,7 +68,7 @@ namespace gtx template gtc::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::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::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::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::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) @@ -80,7 +80,7 @@ namespace gtx template gtc::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::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::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::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::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) diff --git a/glm/gtx/color_cast.inl b/glm/gtx/color_cast.inl index f7d8e4fc..cda753d5 100644 --- a/glm/gtx/color_cast.inl +++ b/glm/gtx/color_cast.inl @@ -9,8 +9,6 @@ namespace glm{ namespace gtx{ -//! GLM_GTX_color_cast extension: Conversion between two color types -namespace color_cast{ template GLM_FUNC_QUALIFIER gtc::uint8 u8channel_cast(T a) @@ -734,6 +732,5 @@ GLM_FUNC_QUALIFIER detail::tvec4 f64_abgr_cast(uint64 color) return result; } -}//namespace color_space }//namespace gtx }//namespace glm diff --git a/glm/gtx/gradient_paint.inl b/glm/gtx/gradient_paint.inl index d79e2b52..8c72e69c 100644 --- a/glm/gtx/gradient_paint.inl +++ b/glm/gtx/gradient_paint.inl @@ -19,11 +19,11 @@ namespace gtx{ { glm::detail::tvec2 F = Focal - Center; glm::detail::tvec2 D = Position - Focal; - valType Radius2 = gtx::optimum_pow::pow2(Radius); - valType Fx2 = gtx::optimum_pow::pow2(F.x); - valType Fy2 = gtx::optimum_pow::pow2(F.y); + valType Radius2 = gtx::pow2(Radius); + valType Fx2 = gtx::pow2(F.x); + valType Fy2 = gtx::pow2(F.y); - valType Numerator = (D.x * F.x + D.y * F.y) + glm::sqrt(Radius2 * (gtx::optimum_pow::pow2(D.x) + gtx::optimum_pow::pow2(D.y)) - gtx::optimum_pow::pow2(D.x * F.y - D.y * F.x)); + valType Numerator = (D.x * F.x + D.y * F.y) + glm::sqrt(Radius2 * (gtx::pow2(D.x) + gtx::pow2(D.y)) - gtx::pow2(D.x * F.y - D.y * F.x)); valType Denominator = Radius2 - (Fx2 + Fy2); return Numerator / Denominator; } diff --git a/glm/gtx/matrix_operation.hpp b/glm/gtx/matrix_operation.hpp index ff208e20..7d8d7ff1 100644 --- a/glm/gtx/matrix_operation.hpp +++ b/glm/gtx/matrix_operation.hpp @@ -86,6 +86,4 @@ namespace gtx #include "matrix_operation.inl" -namespace glm{using namespace gtx::matrix_operation;} - #endif//glm_gtx_matrix_operation diff --git a/glm/gtx/normalize_dot.inl b/glm/gtx/normalize_dot.inl index 7a81ebdc..4653cf6f 100644 --- a/glm/gtx/normalize_dot.inl +++ b/glm/gtx/normalize_dot.inl @@ -71,7 +71,7 @@ GLM_FUNC_QUALIFIER genType fastNormalizeDot { return glm::dot(x, y) * - glm::gtx::fast_square_root::fastInverseSqrt(glm::dot(x, x) * + glm::gtx::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y)); } @@ -84,7 +84,7 @@ GLM_FUNC_QUALIFIER valType fastNormalizeDot { return glm::dot(x, y) * - glm::gtx::fast_square_root::fastInverseSqrt(glm::dot(x, x) * + glm::gtx::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y)); } @@ -97,7 +97,7 @@ GLM_FUNC_QUALIFIER valType fastNormalizeDot { return glm::dot(x, y) * - glm::gtx::fast_square_root::fastInverseSqrt(glm::dot(x, x) * + glm::gtx::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y)); } @@ -110,7 +110,7 @@ GLM_FUNC_QUALIFIER valType fastNormalizeDot { return glm::dot(x, y) * - glm::gtx::fast_square_root::fastInverseSqrt(glm::dot(x, x) * + glm::gtx::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y)); } diff --git a/glm/gtx/perpendicular.inl b/glm/gtx/perpendicular.inl index cff060db..cb1994f4 100644 --- a/glm/gtx/perpendicular.inl +++ b/glm/gtx/perpendicular.inl @@ -15,7 +15,7 @@ GLM_FUNC_QUALIFIER detail::tvec2 perp( detail::tvec2 const & x, detail::tvec2 const & Normal) { - return x - projection::proj(x, Normal); + return x - proj(x, Normal); } template @@ -23,7 +23,7 @@ GLM_FUNC_QUALIFIER detail::tvec3 perp( detail::tvec3 const & x, detail::tvec3 const & Normal) { - return x - projection::proj(x, Normal); + return x - proj(x, Normal); } template @@ -31,7 +31,7 @@ GLM_FUNC_QUALIFIER detail::tvec4 perp( detail::tvec4 const & x, detail::tvec4 const & Normal) { - return x - projection::proj(x, Normal); + return x - proj(x, Normal); } }//namespace gtx diff --git a/glm/gtx/raw_data.hpp b/glm/gtx/raw_data.hpp index bc369e38..574a3b83 100644 --- a/glm/gtx/raw_data.hpp +++ b/glm/gtx/raw_data.hpp @@ -44,7 +44,6 @@ namespace gtx typedef uint64 qword; /// @} -}// namespace raw_data }// namespace gtx }// namespace glm diff --git a/glm/gtx/rotate_vector.inl b/glm/gtx/rotate_vector.inl index e0911e00..5a73459b 100644 --- a/glm/gtx/rotate_vector.inl +++ b/glm/gtx/rotate_vector.inl @@ -29,7 +29,7 @@ namespace gtx{ T const & angle, const detail::tvec3 & normal) { - return detail::tmat3x3(glm::gtx::transform::rotate(angle, normal)) * v; + return detail::tmat3x3(glm::gtx::rotate(angle, normal)) * v; } /* template @@ -49,7 +49,7 @@ namespace gtx{ T const & angle, detail::tvec3 const & normal) { - return glm::gtx::transform::rotate(angle, normal) * v; + return glm::gtx::rotate(angle, normal) * v; } template @@ -140,7 +140,7 @@ namespace gtx{ detail::tvec3 RotationAxis = cross(Up, Normal); T Angle = degrees(acos(dot(Normal, Up))); - return glm::gtx::transform::rotate(Angle, RotationAxis); + return glm::gtx::rotate(Angle, RotationAxis); } }//namespace gtx diff --git a/glm/gtx/spline.hpp b/glm/gtx/spline.hpp index 961b76d6..86c4bbba 100644 --- a/glm/gtx/spline.hpp +++ b/glm/gtx/spline.hpp @@ -22,12 +22,9 @@ #endif namespace glm{ -namespace gtx{ -namespace spline ///< GLM_GTX_spline extension: Spline functions +namespace gtx { - using namespace gtx::optimum_pow; - - /// \addtogroup gtx_spline + /// @addtogroup gtx_spline /// @{ //! Return a point from a catmull rom curve. @@ -61,13 +58,10 @@ namespace spline ///< GLM_GTX_spline extension: Spline functions typename genType::value_type const & s); /// @} -}//namespace spline }//namespace gtx }//namespace glm #include "spline.inl" -namespace glm{using namespace gtx::spline;} - #endif//glm_gtx_spline diff --git a/glm/gtx/spline.inl b/glm/gtx/spline.inl index 3390715a..070031ff 100644 --- a/glm/gtx/spline.inl +++ b/glm/gtx/spline.inl @@ -8,8 +8,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////// namespace glm{ -namespace gtx{ -namespace spline +namespace gtx { template GLM_FUNC_QUALIFIER genType catmullRom @@ -22,8 +21,8 @@ namespace spline ) { typename genType::value_type s1 = s; - typename genType::value_type s2 = optimum_pow::pow2(s); - typename genType::value_type s3 = optimum_pow::pow3(s); + typename genType::value_type s2 = pow2(s); + typename genType::value_type s3 = pow3(s); typename genType::value_type f1 = -s3 + typename genType::value_type(2) * s2 - s; typename genType::value_type f2 = typename genType::value_type(3) * s3 - typename genType::value_type(5) * s2 + typename genType::value_type(2); @@ -45,8 +44,8 @@ namespace spline ) { typename genType::value_type s1 = s; - typename genType::value_type s2 = optimum_pow::pow2(s); - typename genType::value_type s3 = optimum_pow::pow3(s); + typename genType::value_type s2 = pow2(s); + typename genType::value_type s3 = pow3(s); typename genType::value_type f1 = typename genType::value_type(2) * s3 - typename genType::value_type(3) * s2 + typename genType::value_type(1); typename genType::value_type f2 = typename genType::value_type(-2) * s3 + typename genType::value_type(3) * s2; @@ -69,6 +68,5 @@ namespace spline return ((v1 * s + v2) * s + v3) * s + v4; } -}//namespace spline }//namespace gtx }//namespace glm diff --git a/glm/gtx/std_based_type.hpp b/glm/gtx/std_based_type.hpp index 889cd802..40d478f6 100644 --- a/glm/gtx/std_based_type.hpp +++ b/glm/gtx/std_based_type.hpp @@ -22,8 +22,7 @@ #endif 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 { typedef detail::tvec2 size2; typedef detail::tvec3 size3; @@ -61,12 +60,9 @@ namespace std_based_type ///< GLM_GTX_std_based_type extension: Add support vect typedef detail::tvec3 ulvec3; typedef detail::tvec4 ulvec4; -}//namespace std_based_type }//namespace gtx }//namespace glm #include "std_based_type.inl" -namespace glm{using namespace gtx::std_based_type;} - #endif//glm_gtx_std_based_type diff --git a/glm/gtx/string_cast.hpp b/glm/gtx/string_cast.hpp index ebde1283..d76f105b 100644 --- a/glm/gtx/string_cast.hpp +++ b/glm/gtx/string_cast.hpp @@ -29,14 +29,9 @@ #endif namespace glm{ -namespace gtx{ -namespace string_cast ///< GLM_GTX_string_cast extension: Setup strings for GLM type values +namespace gtx { - 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. @@ -45,12 +40,9 @@ namespace string_cast ///< GLM_GTX_string_cast extension: Setup strings for GLM std::string to_string(genType const & x); /// @} -}//namespace string_cast }//namespace gtx }//namespace glm #include "string_cast.inl" -namespace glm{using namespace gtx::string_cast;} - #endif//glm_gtx_string_cast diff --git a/glm/gtx/string_cast.inl b/glm/gtx/string_cast.inl index 031ea55e..51b6393f 100644 --- a/glm/gtx/string_cast.inl +++ b/glm/gtx/string_cast.inl @@ -34,8 +34,7 @@ namespace detail }//namespace detail namespace gtx{ -namespace string_cast -{ + //////////////////////////////// // Scalars @@ -592,6 +591,5 @@ namespace string_cast x[3][0], x[3][1], x[3][2], x[3][3]); } - }//namespace string_cast - }//namespace gtx +}//namespace gtx }//namespace glm diff --git a/glm/gtx/transform.hpp b/glm/gtx/transform.hpp index 9e3be55d..953fdf60 100644 --- a/glm/gtx/transform.hpp +++ b/glm/gtx/transform.hpp @@ -43,9 +43,8 @@ #endif namespace glm{ -namespace gtx{ -namespace transform ///< GLM_GTX_transform extension: Add transformation matrices - { +namespace gtx +{ /// @addtogroup gtx_transform /// @{ @@ -119,12 +118,9 @@ namespace transform ///< GLM_GTX_transform extension: Add transformation matrice detail::tvec3 const & v); /// @} -}// namespace transform }// namespace gtx }// namespace glm #include "transform.inl" -namespace glm{using namespace gtx::transform;} - #endif//glm_gtx_transform diff --git a/glm/gtx/transform.inl b/glm/gtx/transform.inl index 4e2ca43a..6f4d7a2c 100644 --- a/glm/gtx/transform.inl +++ b/glm/gtx/transform.inl @@ -8,8 +8,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////// namespace glm{ -namespace gtx{ -namespace transform +namespace gtx { template GLM_FUNC_QUALIFIER detail::tmat4x4 translate( @@ -89,6 +88,5 @@ namespace transform detail::tmat4x4(1.0f), v); } -}//namespace transform }//namespace gtx }//namespace glm diff --git a/glm/gtx/transform2.hpp b/glm/gtx/transform2.hpp index f62b6593..cbafd486 100644 --- a/glm/gtx/transform2.hpp +++ b/glm/gtx/transform2.hpp @@ -23,12 +23,9 @@ #endif namespace glm{ -namespace gtx{ -namespace transform2 ///< GLM_GTX_transform2 extension: Add extra transformation matrices +namespace gtx { - using namespace gtx::transform; - - /// \addtogroup gtx_transform2 + /// @addtogroup gtx_transform2 /// @{ //! Transforms a matrix with a shearing on X axis. @@ -107,12 +104,9 @@ namespace transform2 ///< GLM_GTX_transform2 extension: Add extra transformation valType bias); /// @} -}// namespace transform2 }// namespace gtx }// namespace glm #include "transform2.inl" -namespace glm{using namespace gtx::transform2;} - #endif//glm_gtx_transform2 diff --git a/glm/gtx/transform2.inl b/glm/gtx/transform2.inl index 37ee94ac..357baa7f 100644 --- a/glm/gtx/transform2.inl +++ b/glm/gtx/transform2.inl @@ -9,8 +9,7 @@ namespace glm{ namespace gtx{ -namespace transform2 -{ + template GLM_FUNC_QUALIFIER detail::tmat3x3 shearX2D( const detail::tmat3x3& m, @@ -153,7 +152,6 @@ namespace transform2 return m * scaleBias(scale, bias); } -}//namespace transform2 }//namespace gtx }//namespace glm diff --git a/glm/gtx/ulp.hpp b/glm/gtx/ulp.hpp index 02214ffe..1d5e2ac7 100644 --- a/glm/gtx/ulp.hpp +++ b/glm/gtx/ulp.hpp @@ -21,10 +21,9 @@ #endif namespace glm{ -namespace gtx{ -namespace ulp ///< GLM_GTX_ulp extension: Precision calculation functions +namespace gtx { - /// \addtogroup gtx_ulp + /// @addtogroup gtx_ulp /// @{ //! Return the next ULP value(s) after the input value(s). @@ -58,13 +57,10 @@ namespace ulp ///< GLM_GTX_ulp extension: Precision calculation functions vecType float_distance(vecType const & x, vecType const & y); ///@} -}// namespace ulp }// namespace gtx }// namespace glm #include "ulp.inl" -namespace glm{using namespace gtx::ulp;} - #endif//glm_gtx_ulp diff --git a/glm/gtx/ulp.inl b/glm/gtx/ulp.inl index 08d886a5..063b6a75 100644 --- a/glm/gtx/ulp.inl +++ b/glm/gtx/ulp.inl @@ -178,8 +178,7 @@ namespace detail namespace glm{ namespace gtx{ -namespace ulp -{ + GLM_FUNC_QUALIFIER float next_float(float const & x) { return GLM_NEXT_AFTER_FLT(x, std::numeric_limits::max()); @@ -391,6 +390,6 @@ namespace ulp return glm::max(glm::max(ulps[0], ulps[1]), glm::max(ulps[2], ulps[3])); } */ -}//namespace ulp + }//namespace gtx }//namespace glm diff --git a/glm/gtx/unsigned_int.hpp b/glm/gtx/unsigned_int.hpp index 2f840ffa..3951db0e 100644 --- a/glm/gtx/unsigned_int.hpp +++ b/glm/gtx/unsigned_int.hpp @@ -23,12 +23,9 @@ #endif namespace glm{ -namespace gtx{ -namespace unsigned_int ///< GLM_GTX_unsigned_int extension: Add support for unsigned integer for core functions +namespace gtx { - using namespace gtx::integer; - - /// \addtogroup gtx_unsigned_int + /// @addtogroup gtx_unsigned_int /// @{ //! 32bit signed integer. @@ -48,12 +45,9 @@ namespace unsigned_int ///< GLM_GTX_unsigned_int extension: Add support for unsi uint mod(uint x, uint y); /// @} -}//namespace unsigned_int }//namespace gtx }//namespace glm #include "unsigned_int.inl" -namespace glm{using namespace gtx::unsigned_int;} - #endif//glm_gtx_unsigned_int diff --git a/glm/gtx/unsigned_int.inl b/glm/gtx/unsigned_int.inl index 7141918b..13f7171d 100644 --- a/glm/gtx/unsigned_int.inl +++ b/glm/gtx/unsigned_int.inl @@ -9,7 +9,6 @@ namespace glm{ namespace gtx{ -namespace unsigned_int{ GLM_FUNC_QUALIFIER uint pow(uint x, uint y) { @@ -40,6 +39,5 @@ GLM_FUNC_QUALIFIER uint mod(uint x, uint y) return x - y * (x / y); } -}//namespace unsigned_int }//namespace gtx }//namespace glm diff --git a/glm/gtx/vec1.hpp b/glm/gtx/vec1.hpp index 1243b335..0188be6a 100644 --- a/glm/gtx/vec1.hpp +++ b/glm/gtx/vec1.hpp @@ -22,9 +22,7 @@ #endif namespace glm{ -namespace gtx{ -namespace vector1{ ///< GLM_GTX_vec1 extension: 1 component vector. -namespace precision +namespace gtx { //! 1 component vector of high precision floating-point numbers. //! There is no guarantee on the actual precision. @@ -64,7 +62,6 @@ namespace precision //! There is no guarantee on the actual precision. //! From GLM_GTX_vec1 extension. typedef detail::lowp_uvec1_t lowp_uvec1; -}//namespace precision ////////////////////////// // vec1 definition @@ -74,48 +71,45 @@ namespace precision typedef detail::tvec1 bvec1; #if(defined(GLM_PRECISION_HIGHP_FLOAT)) - typedef precision::highp_vec1 vec1; + typedef highp_vec1 vec1; #elif(defined(GLM_PRECISION_MEDIUMP_FLOAT)) - typedef precision::mediump_vec1 vec1; + typedef mediump_vec1 vec1; #elif(defined(GLM_PRECISION_LOWP_FLOAT)) - typedef precision::lowp_vec1 vec1; + typedef lowp_vec1 vec1; #else //! 1 component vector of floating-point numbers. //! From GLM_GTX_vec1 extension. - typedef precision::mediump_vec1 vec1; + typedef mediump_vec1 vec1; #endif//GLM_PRECISION #if(defined(GLM_PRECISION_HIGHP_INT)) - typedef precision::highp_ivec1 ivec1; + typedef highp_ivec1 ivec1; #elif(defined(GLM_PRECISION_MEDIUMP_INT)) - typedef precision::mediump_ivec1 ivec1; + typedef mediump_ivec1 ivec1; #elif(defined(GLM_PRECISION_LOWP_INT)) - typedef precision::lowp_ivec1 ivec1; + typedef lowp_ivec1 ivec1; #else //! 1 component vector of signed integer numbers. //! From GLM_GTX_vec1 extension. - typedef precision::mediump_ivec1 ivec1; + typedef mediump_ivec1 ivec1; #endif//GLM_PRECISION #if(defined(GLM_PRECISION_HIGHP_UINT)) - typedef precision::highp_uvec1 uvec1; + typedef highp_uvec1 uvec1; #elif(defined(GLM_PRECISION_MEDIUMP_UINT)) - typedef precision::mediump_uvec1 uvec1; + typedef mediump_uvec1 uvec1; #elif(defined(GLM_PRECISION_LOWP_UINT)) - typedef precision::lowp_uvec1 uvec1; + typedef lowp_uvec1 uvec1; #else //! 1 component vector of unsigned integer numbers. //! From GLM_GTX_vec1 extension. - typedef precision::mediump_uvec1 uvec1; + typedef mediump_uvec1 uvec1; #endif//GLM_PRECISION -}// namespace vec1 }// namespace gtx }// namespace glm #include "vec1.inl" -namespace glm{using namespace gtx::vector1;} - #endif//glm_gtx_vec1 diff --git a/glm/gtx/vector_access.hpp b/glm/gtx/vector_access.hpp index 1d40dfed..2688cb68 100644 --- a/glm/gtx/vector_access.hpp +++ b/glm/gtx/vector_access.hpp @@ -21,10 +21,9 @@ #endif namespace glm{ -namespace gtx{ -namespace vector_access ///< GLM_GTX_vector_access extension: Function to set values to vectors +namespace gtx { - /// \addtogroup gtx_vector_access + /// @addtogroup gtx_vector_access /// @{ //! Set values to a 2 components vector. @@ -55,12 +54,9 @@ namespace vector_access ///< GLM_GTX_vector_access extension: Function to set va valType const & w); /// @} -}//namespace vector_access }//namespace gtx }//namespace glm #include "vector_access.inl" -namespace glm{using namespace gtx::vector_access;} - #endif//glm_gtx_vector_access diff --git a/glm/gtx/vector_access.inl b/glm/gtx/vector_access.inl index cf86f58e..04b653bc 100644 --- a/glm/gtx/vector_access.inl +++ b/glm/gtx/vector_access.inl @@ -9,7 +9,6 @@ namespace glm{ namespace gtx{ -namespace vector_access{ template GLM_FUNC_QUALIFIER void set @@ -53,6 +52,5 @@ GLM_FUNC_QUALIFIER void set v.w = w; } -}//namespace vector_access }//namespace gtx }//namespace glm diff --git a/glm/gtx/vector_angle.hpp b/glm/gtx/vector_angle.hpp index 743b36db..89a40bf9 100644 --- a/glm/gtx/vector_angle.hpp +++ b/glm/gtx/vector_angle.hpp @@ -26,14 +26,10 @@ #endif namespace glm{ -namespace gtx{ -namespace vector_angle ///< GLM_GTX_vector_angle extension: Compute angle between vectors +namespace gtx { - using namespace quaternion; - using namespace epsilon; - - /// \addtogroup gtx_vector_angle - ///@{ + /// @addtogroup gtx_vector_angle + /// @{ //! Returns the absolute angle between two vectors //! Parameters need to be normalized. @@ -61,12 +57,9 @@ namespace vector_angle ///< GLM_GTX_vector_angle extension: Compute angle betwee detail::tvec3 const & ref); /// @} -}// namespace vector_angle }// namespace gtx }// namespace glm #include "vector_angle.inl" -namespace glm{using namespace gtx::vector_angle;} - #endif//glm_gtx_vector_angle diff --git a/glm/gtx/vector_angle.inl b/glm/gtx/vector_angle.inl index 05df114b..097d3443 100644 --- a/glm/gtx/vector_angle.inl +++ b/glm/gtx/vector_angle.inl @@ -9,7 +9,6 @@ namespace glm{ namespace gtx{ -namespace vector_angle{ template GLM_FUNC_QUALIFIER typename genType::value_type angle @@ -30,7 +29,7 @@ GLM_FUNC_QUALIFIER valType orientedAngle ) { valType Angle = glm::degrees(acos(dot(x, y))); - detail::tvec2 TransformedVector = glm::gtx::rotate_vector::rotate(x, Angle); + detail::tvec2 TransformedVector = glm::gtx::rotate(x, Angle); if(all(equalEpsilon(y, TransformedVector, valType(0.01)))) return Angle; else @@ -53,6 +52,5 @@ GLM_FUNC_QUALIFIER valType orientedAngle return Angle; } -}//namespace vector_angle }//namespace gtx }//namespace glm diff --git a/glm/gtx/vector_query.hpp b/glm/gtx/vector_query.hpp index 06d90979..9f3e10cf 100644 --- a/glm/gtx/vector_query.hpp +++ b/glm/gtx/vector_query.hpp @@ -23,10 +23,9 @@ #endif namespace glm{ -namespace gtx{ -namespace vector_query ///< GLM_GTX_vector_query extension: Query informations of vector types +namespace gtx { - /// \addtogroup gtx_vector_query + /// @addtogroup gtx_vector_query /// @{ //! Check if two vectors are collinears. @@ -84,12 +83,9 @@ namespace vector_query ///< GLM_GTX_vector_query extension: Query informations o typename genType::value_type const & epsilon = std::numeric_limits::epsilon()); /// @} -}// namespace vector_query }// namespace gtx }// namespace glm #include "vector_query.inl" -namespace glm{using namespace gtx::vector_query;} - #endif//glm_gtx_vector_query diff --git a/glm/gtx/vector_query.inl b/glm/gtx/vector_query.inl index 4745c087..fc5fb8c7 100644 --- a/glm/gtx/vector_query.inl +++ b/glm/gtx/vector_query.inl @@ -14,8 +14,7 @@ namespace glm{ namespace gtx{ -namespace vector_query -{ + template GLM_FUNC_QUALIFIER bool areCollinear ( @@ -169,6 +168,5 @@ namespace vector_query return similar; } -}//namespace vector_query }//namespace gtx }//namespace glm diff --git a/glm/gtx/verbose_operator.hpp b/glm/gtx/verbose_operator.hpp index ecd336e9..cf6b5bc1 100644 --- a/glm/gtx/verbose_operator.hpp +++ b/glm/gtx/verbose_operator.hpp @@ -21,10 +21,9 @@ #endif namespace glm{ -namespace gtx{ -namespace verbose_operator ///< GLM_GTX_verbose_operator extension: Use words to replace operators +namespace gtx { - /// \addtogroup gtx_verbose_operator + /// @addtogroup gtx_verbose_operator /// @{ //! Addition of two values @@ -53,12 +52,9 @@ namespace verbose_operator ///< GLM_GTX_verbose_operator extension: Use words to genTypeT mad(genTypeT const & a, genTypeU const & b, genTypeV const & c); /// @} -}// namespace verbose_operator }// namespace gtx }// namespace glm #include "verbose_operator.inl" -namespace glm{using namespace gtx::verbose_operator;} - #endif//glm_gtx_verbose_operator diff --git a/glm/gtx/verbose_operator.inl b/glm/gtx/verbose_operator.inl index e8064625..4557b40f 100644 --- a/glm/gtx/verbose_operator.inl +++ b/glm/gtx/verbose_operator.inl @@ -9,7 +9,6 @@ namespace glm{ namespace gtx{ -namespace verbose_operator{ template GLM_FUNC_QUALIFIER genType add(genType const & a, genType const & b) @@ -124,6 +123,5 @@ GLM_FUNC_QUALIFIER genTypeT mad(genTypeT const & a, genTypeU const & b, genTypeV return a * b + c; } -}//namespace verbose_operator }//namespace gtx }//namespace glm diff --git a/glm/gtx/wrap.hpp b/glm/gtx/wrap.hpp index e0d0e0fd..50a5d1da 100644 --- a/glm/gtx/wrap.hpp +++ b/glm/gtx/wrap.hpp @@ -21,10 +21,9 @@ #endif namespace glm{ -namespace gtx{ -namespace wrap ///< GLM_GTX_wrap: Wrapping mode using my texture samping. +namespace gtx { - /// \addtogroup gtx_wrap + /// @addtogroup gtx_wrap /// @{ //! Simulate GL_CLAMP OpenGL wrap mode @@ -43,12 +42,9 @@ namespace wrap ///< GLM_GTX_wrap: Wrapping mode using my texture samping. genType mirrorRepeat(genType const & Texcoord); /// @} -}// namespace wrap }// namespace gtx }// namespace glm #include "wrap.inl" -namespace glm{using namespace gtx::wrap;} - #endif//glm_img_wrap diff --git a/glm/gtx/wrap.inl b/glm/gtx/wrap.inl index 0aaa40ce..c18ea67f 100644 --- a/glm/gtx/wrap.inl +++ b/glm/gtx/wrap.inl @@ -11,8 +11,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////// namespace glm{ -namespace gtx{ -namespace wrap +namespace gtx { //////////////////////// // clamp @@ -168,6 +167,5 @@ namespace wrap return Result; } -}//namespace wrap }//namespace gtx }//namespace glm