From 320605174c6fac287ccd7a15999d40d3df4f7ac3 Mon Sep 17 00:00:00 2001
From: Sebastian Eibl <sebastian.eibl@fau.de>
Date: Mon, 18 Jun 2018 14:19:15 +0200
Subject: [PATCH] some cleanup

---
 src/pe/raytracing/Color.cpp           |  2 +-
 src/pe/raytracing/Color.h             |  9 ++++++---
 src/pe/raytracing/Intersects.h        |  8 +++++---
 src/pe/raytracing/Lighting.h          |  8 +++++---
 src/pe/raytracing/Ray.cpp             |  7 ++++---
 src/pe/raytracing/Ray.h               |  7 ++++---
 src/pe/raytracing/Raytracer.cpp       |  6 +++---
 src/pe/raytracing/Raytracer.h         | 10 ++++------
 src/pe/raytracing/ShadingFunctions.h  |  8 +++++---
 src/pe/raytracing/ShadingParameters.h |  8 +++++---
 10 files changed, 42 insertions(+), 31 deletions(-)

diff --git a/src/pe/raytracing/Color.cpp b/src/pe/raytracing/Color.cpp
index 29c7e6d34..4e9deab3f 100644
--- a/src/pe/raytracing/Color.cpp
+++ b/src/pe/raytracing/Color.cpp
@@ -13,7 +13,7 @@
 //  You should have received a copy of the GNU General Public License along
 //  with waLBerla (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
 //
-//! \file Color.cpp
+//! \file   Color.cpp
 //! \author Lukas Werner
 //
 //======================================================================================================================
diff --git a/src/pe/raytracing/Color.h b/src/pe/raytracing/Color.h
index 159c0ef13..cf5999304 100644
--- a/src/pe/raytracing/Color.h
+++ b/src/pe/raytracing/Color.h
@@ -13,6 +13,7 @@
 //  You should have received a copy of the GNU General Public License along
 //  with waLBerla (see COPYING.txt). If not, see <http://www.gnu.org/licenses/>.
 //
+//! \file   Color.h
 //! \author Lukas Werner
 //
 //======================================================================================================================
@@ -25,6 +26,7 @@
 namespace walberla {
 namespace pe {
 namespace raytracing {
+
 class Color: public Vector3<real_t> {
 public:
    /*!\name Constructors */
@@ -75,6 +77,7 @@ public:
    
    static Color colorFromHSV(real_t hue, real_t saturation, real_t value);
 };
-}
-}
-}
+
+} //namespace raytracing
+} //namespace pe
+} //namespace walberla
diff --git a/src/pe/raytracing/Intersects.h b/src/pe/raytracing/Intersects.h
index 37ee6f68c..2934ba177 100644
--- a/src/pe/raytracing/Intersects.h
+++ b/src/pe/raytracing/Intersects.h
@@ -37,6 +37,7 @@
 namespace walberla {
 namespace pe {
 namespace raytracing {
+
 inline bool intersects(const SphereID sphere, const Ray& ray, real_t& t, Vec3& n);
 inline bool intersects(const PlaneID plane, const Ray& ray, real_t& t, Vec3& n);
 inline bool intersects(const BoxID box, const Ray& ray, real_t& t, Vec3& n);
@@ -461,6 +462,7 @@ inline bool intersects(const AABB& aabb, const Ray& ray, real_t& t, real_t paddi
    t = t_;
    return true;
 }
-}
-}
-}
+
+} //namespace raytracing
+} //namespace pe
+} //namespace walberla
diff --git a/src/pe/raytracing/Lighting.h b/src/pe/raytracing/Lighting.h
index ce2778c34..451cfe335 100644
--- a/src/pe/raytracing/Lighting.h
+++ b/src/pe/raytracing/Lighting.h
@@ -28,6 +28,7 @@
 namespace walberla {
 namespace pe {
 namespace raytracing {
+
 /*!\brief The Lighting struct defines the properties of a point light in the scene.
  */
 struct Lighting {
@@ -71,6 +72,7 @@ struct Lighting {
       ambientColor = config.getParameter<Color>("ambientColor", Color(0.5,0.5,0.5));
    }
 };
-}
-}
-}
+
+} //namespace raytracing
+} //namespace pe
+} //namespace walberla
diff --git a/src/pe/raytracing/Ray.cpp b/src/pe/raytracing/Ray.cpp
index 3fbcd3070..c3f0a9776 100644
--- a/src/pe/raytracing/Ray.cpp
+++ b/src/pe/raytracing/Ray.cpp
@@ -23,6 +23,7 @@
 namespace walberla {
 namespace pe {
 namespace raytracing {
+
 /*!\brief Global output operator for rays.
  *
  * \param os Reference to the output stream.
@@ -35,6 +36,6 @@ std::ostream& operator<<(std::ostream& os, const Ray& ray) {
    << ", c: (" << ray.getImageX() << "/" << ray.getImageY() << ")>";
 }
 
-}
-}
-}
+} //namespace raytracing
+} //namespace pe
+} //namespace walberla
diff --git a/src/pe/raytracing/Ray.h b/src/pe/raytracing/Ray.h
index 6fed295fc..052ee87bf 100644
--- a/src/pe/raytracing/Ray.h
+++ b/src/pe/raytracing/Ray.h
@@ -219,6 +219,7 @@ public:
    }
    //@}
 };
-}
-}
-}
+
+} //namespace raytracing
+} //namespace pe
+} //namespace walberla
diff --git a/src/pe/raytracing/Raytracer.cpp b/src/pe/raytracing/Raytracer.cpp
index b3793fae2..59320cc4a 100644
--- a/src/pe/raytracing/Raytracer.cpp
+++ b/src/pe/raytracing/Raytracer.cpp
@@ -421,6 +421,6 @@ void Raytracer::output(const std::vector<BodyIntersectionInfo>& intersectionsBuf
    if (tt != NULL) tt->stop("Output");
 }
 
-}
-}
-}
+} //namespace raytracing
+} //namespace pe
+} //namespace walberla
diff --git a/src/pe/raytracing/Raytracer.h b/src/pe/raytracing/Raytracer.h
index f15fb763b..aa1707970 100644
--- a/src/pe/raytracing/Raytracer.h
+++ b/src/pe/raytracing/Raytracer.h
@@ -37,9 +37,6 @@
 
 #include <stddef.h>
 
-using namespace walberla::pe;
-using namespace walberla::timing;
-
 namespace walberla {
 namespace pe {
 namespace raytracing {
@@ -706,6 +703,7 @@ inline Color Raytracer::getColor(const BodyID body, const Ray& ray, real_t t, co
 
    return color;
 }
-}
-}
-}
+
+} //namespace raytracing
+} //namespace pe
+} //namespace walberla
diff --git a/src/pe/raytracing/ShadingFunctions.h b/src/pe/raytracing/ShadingFunctions.h
index 20f1f9f1f..65675bb21 100644
--- a/src/pe/raytracing/ShadingFunctions.h
+++ b/src/pe/raytracing/ShadingFunctions.h
@@ -30,6 +30,7 @@
 namespace walberla {
 namespace pe {
 namespace raytracing {
+
 inline ShadingParameters defaultBodyTypeDependentShadingParams (const BodyID body);
 inline ShadingParameters processRankDependentShadingParams (const BodyID body);
 inline ShadingParameters defaultShadingParams (const BodyID body);
@@ -169,6 +170,7 @@ inline ShadingParameters violetShadingParams (const BodyID body) {
                        real_t(0));
    return s;
 }
-}
-}
-}
+
+} //namespace raytracing
+} //namespace pe
+} //namespace walberla
diff --git a/src/pe/raytracing/ShadingParameters.h b/src/pe/raytracing/ShadingParameters.h
index 7d0930379..7e476527d 100644
--- a/src/pe/raytracing/ShadingParameters.h
+++ b/src/pe/raytracing/ShadingParameters.h
@@ -27,6 +27,7 @@
 namespace walberla {
 namespace pe {
 namespace raytracing {
+
 struct ShadingParameters {
    Color diffuseColor;  //!< Primary color of the material.
    Color ambientColor;  //!< Color the material has even when its not directly lit.
@@ -80,7 +81,8 @@ struct ShadingParameters {
       return *this;
    }
 };
-}
-}
-}
+
+} //namespace raytracing
+} //namespace pe
+} //namespace walberla
 
-- 
GitLab