Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r324 - trunk/Core/Geometry


Chronological Thread 
  • From: sparker@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r324 - trunk/Core/Geometry
  • Date: Sun, 15 May 2005 16:57:30 -0600 (MDT)

Author: sparker
Date: Sun May 15 16:57:29 2005
New Revision: 324

Modified:
   trunk/Core/Geometry/PointVector.cc
Log:
Put ostream operators in Manta namespace


Modified: trunk/Core/Geometry/PointVector.cc
==============================================================================
--- trunk/Core/Geometry/PointVector.cc  (original)
+++ trunk/Core/Geometry/PointVector.cc  Sun May 15 16:57:29 2005
@@ -2,27 +2,27 @@
 #include <Core/Geometry/PointVector.h>
 #include <iostream>
 
-using namespace Manta;
+namespace Manta {
+  template<typename T, int Dim>
+  inline std::ostream &operator<< (std::ostream &os, const VectorT<T,Dim> 
&v) {
+    for (int i=0;i<Dim;++i)
+      os << v[i] << " ";
+    return os;
+  }
 
-template<typename T, int Dim>
-inline std::ostream &operator<< (std::ostream &os, const VectorT<T,Dim> &v) {
-  for (int i=0;i<Dim;++i)
-    os << v[i] << " ";
-  return os;
+  template<typename T, int Dim>
+  inline std::ostream &operator<< (std::ostream &os, const PointT<T,Dim> &v) 
{
+    for (int i=0;i<Dim;++i)
+      os << v[i] << " ";
+    return os;
+  }
+  
+  // Explicit instantiations for ostream operators
+  template std::ostream& operator<<(std::ostream& os, const VectorT<double, 
3>&);
+  template std::ostream& operator<<(std::ostream& os, const VectorT<float, 
3>&);
+  template std::ostream& operator<<(std::ostream& os, const VectorT<int, 
3>&);
+  
+  template std::ostream& operator<<(std::ostream& os, const PointT<double, 
3>&);
+  template std::ostream& operator<<(std::ostream& os, const PointT<float, 
3>&);
+  template std::ostream& operator<<(std::ostream& os, const PointT<int, 3>&);
 }
-
-template<typename T, int Dim>
-inline std::ostream &operator<< (std::ostream &os, const PointT<T,Dim> &v) {
-  for (int i=0;i<Dim;++i)
-    os << v[i] << " ";
-  return os;
-}
-
-// Explicit instantiations for ostream operators
-template std::ostream& operator<<(std::ostream& os, const VectorT<double, 
3>&);
-template std::ostream& operator<<(std::ostream& os, const VectorT<float, 
3>&);
-template std::ostream& operator<<(std::ostream& os, const VectorT<int, 3>&);
-
-template std::ostream& operator<<(std::ostream& os, const PointT<double, 
3>&);
-template std::ostream& operator<<(std::ostream& os, const PointT<float, 3>&);
-template std::ostream& operator<<(std::ostream& os, const PointT<int, 3>&);




  • [MANTA] r324 - trunk/Core/Geometry, sparker, 05/15/2005

Archive powered by MHonArc 2.6.16.

Top of page