Browse Source

Fixed namespace issues

Christophe Riccio 14 years ago
parent
commit
5acf2d84a0

+ 3 - 1
glm/core/func_common.hpp

@@ -31,7 +31,8 @@
 
 #include "_fixes.hpp"
 
-namespace glm
+namespace glm{
+namespace core
 {
 	/// @addtogroup core_funcs
 	/// @{
@@ -366,6 +367,7 @@ namespace glm
 	genType ldexp(genType const & x, genIType const & exp);
 
 	/// @}
+}//namespace core
 }//namespace glm
 
 #include "func_common.inl"

+ 4 - 0
glm/core/func_common.inl

@@ -38,6 +38,8 @@ namespace detail
     };
 }//namespace detail
 
+namespace core
+{
 	// abs
 	template <typename genFIType>
     GLM_FUNC_QUALIFIER genFIType abs(
@@ -1563,4 +1565,6 @@ namespace detail
 	{
 		return std::frexp(x, exp);
 	}
+
+}//namespace core
 }//namespace glm

+ 3 - 1
glm/core/func_exponential.hpp

@@ -10,7 +10,8 @@
 #ifndef glm_core_func_exponential
 #define glm_core_func_exponential
 
-namespace glm
+namespace glm{
+namespace core
 {
 	/// \addtogroup core_funcs
 	/// @{
@@ -68,6 +69,7 @@ namespace glm
 	genType inversesqrt(genType const & x);
 
 	/// @}
+}//namespace core
 }//namespace glm
 
 #include "func_exponential.inl"

+ 3 - 1
glm/core/func_exponential.inl

@@ -7,7 +7,8 @@
 // File    : glm/core/func_exponential.inl
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-namespace glm
+namespace glm{
+namespace core
 {
     // pow
     template <typename genType>
@@ -348,4 +349,5 @@ namespace glm
             inversesqrt(x.w));
     }
 
+}//namespace core
 }//namespace glm

+ 6 - 4
glm/core/func_geometric.hpp

@@ -10,7 +10,8 @@
 #ifndef glm_core_func_geometric
 #define glm_core_func_geometric
 
-namespace glm
+namespace glm{
+namespace core
 {
 	/// \addtogroup core_funcs
 	/// @{
@@ -19,9 +20,9 @@ namespace glm
     //! 
     //! \li <a href="http://www.opengl.org/sdk/docs/manglsl/xhtml/length.xml">GLSL length man page</a>
     //! \li GLSL 1.30.08 specification, section 8.4
-	//template <typename genType> 
-	//typename genType::value_type length(
-	//	genType const & x); 
+	template <typename genType> 
+        typename genType::value_type length(
+		genType const & x); 
 
 	//! Returns the distance betwwen p0 and p1, i.e., length(p0 - p1).
     //! 
@@ -91,6 +92,7 @@ namespace glm
 		typename genType::value_type const & eta);
 
 	/// @}
+}//namespace core
 }//namespace glm
 
 #include "func_geometric.inl"

+ 3 - 1
glm/core/func_geometric.inl

@@ -7,7 +7,8 @@
 // File    : glm/core/func_geometric.inl
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-namespace glm
+namespace glm{
+namespace core
 {
     // length
     template <typename genType>
@@ -280,4 +281,5 @@ namespace glm
             return eta * I - (eta * dotValue + sqrt(k)) * N;
     }
 
+}//namespace core
 }//namespace glm

+ 3 - 1
glm/core/func_integer.hpp

@@ -10,7 +10,8 @@
 #ifndef glm_core_func_integer
 #define glm_core_func_integer
 
-namespace glm
+namespace glm{
+namespace core
 {
 	/// \addtogroup core_funcs
 	/// @{
@@ -139,6 +140,7 @@ namespace glm
 	typename C<T>::signed_type findMSB(C<T> const & Value);
 
 	/// @}
+}//namespace core
 }//namespace glm
 
 #include "func_integer.inl"

+ 4 - 1
glm/core/func_integer.inl

@@ -7,7 +7,8 @@
 // File    : glm/core/func_integer.inl
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-namespace glm
+namespace glm{
+namespace core
 {
 		// uaddCarry
 		template <typename genUType>
@@ -581,4 +582,6 @@ namespace glm
 				findMSB(value[2]),
 				findMSB(value[3]));
 		}
+
+}//namespace core
 }//namespace glm

+ 3 - 1
glm/core/func_matrix.hpp

@@ -10,7 +10,8 @@
 #ifndef glm_core_func_matrix
 #define glm_core_func_matrix
 
-namespace glm
+namespace glm{
+namespace core
 {
 	/// \addtogroup core_funcs
 	/// @{
@@ -93,6 +94,7 @@ namespace glm
 		detail::tmat4x4<T> const & m);
 
 	/// @}
+}//namespace core
 }//namespace glm
 
 #include "func_matrix.inl"

+ 3 - 1
glm/core/func_matrix.inl

@@ -8,7 +8,8 @@
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 namespace glm{
-
+namespace core
+{
     // matrixCompMult
     template <typename matType>
     GLM_FUNC_QUALIFIER matType matrixCompMult
@@ -561,4 +562,5 @@ namespace glm{
 		return Inverse;
 	}
 
+}//namespace core
 }//namespace glm

+ 3 - 1
glm/core/func_noise.hpp

@@ -10,7 +10,8 @@
 #ifndef glm_core_func_noise
 #define glm_core_func_noise
 
-namespace glm
+namespace glm{
+namespace core
 {
 	/// \addtogroup core_funcs
 	/// @{
@@ -44,6 +45,7 @@ namespace glm
 	detail::tvec4<typename genType::value_type> noise4(genType const & x);
 
 	/// @}
+}//namespace core
 }//namespace glm
 
 #include "func_noise.inl"

+ 3 - 1
glm/core/func_packing.hpp

@@ -10,7 +10,8 @@
 #ifndef glm_core_func_packing
 #define glm_core_func_packing
 
-namespace glm
+namespace glm{
+namespace core
 {
 	/// \addtogroup core_funcs
 	///@{
@@ -113,6 +114,7 @@ namespace glm
 	detail::tvec2<detail::uint32> unpackDouble2x32(double const & v);
 
 	/// @}
+}//namespace core
 }//namespace glm
 
 #include "func_packing.inl"

+ 3 - 1
glm/core/func_packing.inl

@@ -7,7 +7,8 @@
 // File    : glm/core/func_packing.inl
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-namespace glm
+namespace glm{
+namespace core
 {
 		GLM_FUNC_QUALIFIER detail::uint32 packUnorm2x16(detail::tvec2<detail::float32> const & v)
 		{
@@ -79,4 +80,5 @@ namespace glm
 			return *(detail::tvec2<detail::uint32>*)&v;
 		}
 
+}//namespace core
 }//namespace glm

+ 3 - 1
glm/core/func_trigonometric.hpp

@@ -10,7 +10,8 @@
 #ifndef glm_core_func_trigonometric
 #define glm_core_func_trigonometric
 
-namespace glm
+namespace glm{
+namespace core
 {
 	/// \addtogroup core_funcs
 	/// @{
@@ -134,6 +135,7 @@ namespace glm
 	genType atanh(genType const & x);
 
 	/// @}
+}//namespace core
 }//namespace glm
 
 #include "func_trigonometric.inl"

+ 3 - 1
glm/core/func_trigonometric.inl

@@ -7,7 +7,8 @@
 // File    : glm/core/func_trigonometric.inl
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-namespace glm
+namespace glm{
+namespace core
 {
     // radians
     template <typename genType>
@@ -735,4 +736,5 @@ namespace glm
             atanh(x.w));
     }
 
+}//namespace core
 }//namespace glm

+ 3 - 1
glm/core/func_vector_relational.hpp

@@ -12,7 +12,8 @@
 
 #include "_detail.hpp"
 
-namespace glm
+namespace glm{
+namespace core
 {
 	/// \addtogroup core_funcs
 	/// @{
@@ -196,6 +197,7 @@ namespace glm
 	}
 
 	/// @}
+}//namespace core
 }//namespace glm
 
 #include "func_vector_relational.inl"

+ 3 - 0
glm/glm.hpp

@@ -73,9 +73,12 @@ namespace glm
 	//! VIRTREV extensions.
 	namespace virtrev{}
 
+    using namespace core;
 	using namespace core::type;
 	using namespace core::type::precision;
 	using namespace core::function;
+    using namespace gtc;
+    using namespace gtx;
 }//namespace glm
 
 #include "./core/_detail.hpp"

+ 2 - 5
glm/gtc/swizzle.hpp

@@ -40,8 +40,7 @@
 #endif
 
 namespace glm{
-namespace gtc{
-namespace swizzle ///< GLM_GTC_swizzle extension
+namespace gtc
 {
 	using namespace gtc::half_float;
 
@@ -361,12 +360,10 @@ namespace swizzle ///< GLM_GTC_swizzle extension
 	static_swizzle4_ref(glm::u32, 4)
 	static_swizzle4_ref(glm::u64, 4)
 
-}//namespace swizzle
+
 }//namespace gtc
 }//namespace glm
 
 #include "swizzle.inl"
 
-namespace glm{using namespace gtc::swizzle;}
-
 #endif//glm_gtc_swizzle

+ 1 - 2
glm/gtc/swizzle.inl

@@ -12,7 +12,6 @@
 
 namespace glm{
 namespace gtc{
-namespace swizzle{
 
 template <typename T, template <typename> class vecType>
 GLM_FUNC_QUALIFIER T swizzle
@@ -172,6 +171,6 @@ GLM_FUNC_QUALIFIER detail::tref4<int> swizzle
 	return detail::tref4<int>(v[x], v[y],	v[z], v[w]);
 }
 */
-}//namespace swizzle
+
 }//namespace gtc
 }//namespace glm

+ 1 - 0
test/gtx/gtx_quaternion.cpp

@@ -8,6 +8,7 @@
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 #include <glm/glm.hpp>
+#include <glm/gtc/quaternion.hpp>
 #include <glm/gtx/quaternion.hpp>
 #include <glm/gtx/epsilon.hpp>