From 9d6a9e1130c5ceef9cea4c9707700a65d72557d9 Mon Sep 17 00:00:00 2001
From: Lucile Remigy <lucile.remigy@epitech.eu>
Date: Mon, 14 Oct 2019 14:49:21 +0200
Subject: [PATCH] DOC, group of class, internal file

---
 include/hpp/fcl/BV/AABB.h                |   4 +
 include/hpp/fcl/BV/BV_node.h             |   4 +
 include/hpp/fcl/BV/OBB.h                 |   3 +
 include/hpp/fcl/BV/OBBRSS.h              |   3 +
 include/hpp/fcl/BV/RSS.h                 |   3 +
 include/hpp/fcl/BV/kDOP.h                |   3 +
 include/hpp/fcl/BV/kIOS.h                |   5 +-
 include/hpp/fcl/BVH/BVH_model.h          |   6 +-
 include/hpp/fcl/collision_object.h       |   3 +
 include/hpp/fcl/distance.h               |   2 +-
 include/hpp/fcl/shape/geometric_shapes.h |   4 +
 src/collision_node.h                     |  11 +-
 src/distance_func_matrix.h               |  11 +-
 src/intersect.h                          |   7 +-
 src/traversal/details/traversal.h        |   5 +-
 src/traversal/traversal_node_base.h      |  22 ++-
 src/traversal/traversal_node_bvh_shape.h |  27 ++--
 src/traversal/traversal_node_bvhs.h      |  26 +--
 src/traversal/traversal_node_octree.h    | 193 ++++++++++++-----------
 src/traversal/traversal_node_setup.h     |   8 +-
 src/traversal/traversal_node_shapes.h    |  19 ++-
 src/traversal/traversal_recurse.h        |  14 +-
 22 files changed, 231 insertions(+), 152 deletions(-)

diff --git a/include/hpp/fcl/BV/AABB.h b/include/hpp/fcl/BV/AABB.h
index 72954a64..55a5e4ad 100644
--- a/include/hpp/fcl/BV/AABB.h
+++ b/include/hpp/fcl/BV/AABB.h
@@ -46,6 +46,10 @@ namespace hpp
 namespace fcl
 {
   class CollisionRequest;
+/// @defgroup Bounding_Volume 
+/// regroup class of differents types of bounding volume.
+/// @{
+
 /// @brief A class describing the AABB collision structure, which is a box in 3D space determined by two diagonal points
 class AABB
 {
diff --git a/include/hpp/fcl/BV/BV_node.h b/include/hpp/fcl/BV/BV_node.h
index e7fc6374..86e858f2 100644
--- a/include/hpp/fcl/BV/BV_node.h
+++ b/include/hpp/fcl/BV/BV_node.h
@@ -49,6 +49,10 @@ namespace hpp
 namespace fcl
 {
 
+/// @defgroup Construction_Of_BVH 
+/// regroup class which are used to build BVH (Bounding Volume Hierarchy)
+/// @{
+
 /// @brief BVNodeBase encodes the tree structure for BVH
 struct BVNodeBase
 {
diff --git a/include/hpp/fcl/BV/OBB.h b/include/hpp/fcl/BV/OBB.h
index 80cf45ed..32468de6 100644
--- a/include/hpp/fcl/BV/OBB.h
+++ b/include/hpp/fcl/BV/OBB.h
@@ -46,6 +46,9 @@ namespace fcl
 {
   class CollisionRequest;
 
+/// @addtogroup Bounding_Volume
+/// @{
+
 /// @brief Oriented bounding box class
 class OBB
 {
diff --git a/include/hpp/fcl/BV/OBBRSS.h b/include/hpp/fcl/BV/OBBRSS.h
index 78a32390..def7ce67 100644
--- a/include/hpp/fcl/BV/OBBRSS.h
+++ b/include/hpp/fcl/BV/OBBRSS.h
@@ -48,6 +48,9 @@ namespace fcl
 {
   class CollisionRequest;
 
+/// @addtogroup Bounding_Volume
+/// @{
+
 /// @brief Class merging the OBB and RSS, can handle collision and distance simultaneously
 class OBBRSS
 {
diff --git a/include/hpp/fcl/BV/RSS.h b/include/hpp/fcl/BV/RSS.h
index b626e27e..a380de68 100644
--- a/include/hpp/fcl/BV/RSS.h
+++ b/include/hpp/fcl/BV/RSS.h
@@ -48,6 +48,9 @@ namespace fcl
 {
 
   class CollisionRequest;
+/// @addtogroup Bounding_Volume
+/// @{
+
 /// @brief A class for rectangle sphere-swept bounding volume
 class RSS
 {
diff --git a/include/hpp/fcl/BV/kDOP.h b/include/hpp/fcl/BV/kDOP.h
index 61e43d90..6a5c6aab 100644
--- a/include/hpp/fcl/BV/kDOP.h
+++ b/include/hpp/fcl/BV/kDOP.h
@@ -48,6 +48,9 @@ namespace fcl
 
   class CollisionRequest;
 
+  /// @addtogroup Bounding_Volume
+  /// @{
+
 /// @brief KDOP class describes the KDOP collision structures. K is set as the template parameter, which should be 16, 18, or 24
 ///  The KDOP structure is defined by some pairs of parallel planes defined by some axes. 
 /// For K = 16, the planes are 6 AABB planes and 10 diagonal planes that cut off some space of the edges:
diff --git a/include/hpp/fcl/BV/kIOS.h b/include/hpp/fcl/BV/kIOS.h
index 2227c975..be1a4f0b 100644
--- a/include/hpp/fcl/BV/kIOS.h
+++ b/include/hpp/fcl/BV/kIOS.h
@@ -46,7 +46,10 @@ namespace hpp
 namespace fcl
 {
   class CollisionRequest;
- 
+
+/// @addtogroup Bounding_Volume
+/// @{
+
 /// @brief A class describing the kIOS collision structure, which is a set of spheres.
 class kIOS
 {
diff --git a/include/hpp/fcl/BVH/BVH_model.h b/include/hpp/fcl/BVH/BVH_model.h
index d6d20033..095ff21c 100644
--- a/include/hpp/fcl/BVH/BVH_model.h
+++ b/include/hpp/fcl/BVH/BVH_model.h
@@ -50,6 +50,9 @@ namespace hpp
 namespace fcl
 {
 
+/// @addtogroup Construction_Of_BVH
+/// @{
+
 class ConvexBase;
 
 template <typename BV> class BVFitter;
@@ -338,7 +341,7 @@ private:
   /// @brief Recursive kernel for bottomup refitting 
   int recursiveRefitTree_bottomup(int bv_id);
 
-  /// @recursively compute each bv's transform related to its parent. For default BV, only the translation works. 
+  /// @ recursively compute each bv's transform related to its parent. For default BV, only the translation works. 
   /// For oriented BV (OBB, RSS, OBBRSS), special implementation is provided.
   void makeParentRelativeRecurse(int bv_id, Matrix3f& parent_axes, const Vec3f& parent_c)
   {
@@ -353,6 +356,7 @@ private:
   }
 };
 
+/// @}
 
 template<>
 void BVHModel<OBB>::makeParentRelativeRecurse(int bv_id, Matrix3f& parent_axes, const Vec3f& parent_c);
diff --git a/include/hpp/fcl/collision_object.h b/include/hpp/fcl/collision_object.h
index 9af086f5..1e743dbd 100644
--- a/include/hpp/fcl/collision_object.h
+++ b/include/hpp/fcl/collision_object.h
@@ -56,6 +56,9 @@ enum OBJECT_TYPE {OT_UNKNOWN, OT_BVH, OT_GEOM, OT_OCTREE, OT_COUNT};
 enum NODE_TYPE {BV_UNKNOWN, BV_AABB, BV_OBB, BV_RSS, BV_kIOS, BV_OBBRSS, BV_KDOP16, BV_KDOP18, BV_KDOP24,
                 GEOM_BOX, GEOM_SPHERE, GEOM_CAPSULE, GEOM_CONE, GEOM_CYLINDER, GEOM_CONVEX, GEOM_PLANE, GEOM_HALFSPACE, GEOM_TRIANGLE, GEOM_OCTREE, NODE_COUNT};
 
+/// @addtogroup Construction_Of_BVH
+/// @{
+
 /// @brief The geometry for the object for collision or distance computation
 class CollisionGeometry
 {
diff --git a/include/hpp/fcl/distance.h b/include/hpp/fcl/distance.h
index d04d2c82..45bbcbd7 100644
--- a/include/hpp/fcl/distance.h
+++ b/include/hpp/fcl/distance.h
@@ -33,7 +33,7 @@
  *  POSSIBILITY OF SUCH DAMAGE.
  */
 
-/** \author Jia Pan */
+/** @author Jia Pan */
 
 #ifndef HPP_FCL_DISTANCE_H
 #define HPP_FCL_DISTANCE_H
diff --git a/include/hpp/fcl/shape/geometric_shapes.h b/include/hpp/fcl/shape/geometric_shapes.h
index 557f7c18..68c5cf07 100644
--- a/include/hpp/fcl/shape/geometric_shapes.h
+++ b/include/hpp/fcl/shape/geometric_shapes.h
@@ -62,6 +62,10 @@ public:
   OBJECT_TYPE getObjectType() const { return OT_GEOM; }
 };
 
+/// @defgroup Geometric_Shapes
+/// regroup class of differents types of geometric shapes.
+/// @{
+
 /// @brief Triangle stores the points instead of only indices of points
 class TriangleP : public ShapeBase
 {
diff --git a/src/collision_node.h b/src/collision_node.h
index 961e3faa..7f2ffbd2 100644
--- a/src/collision_node.h
+++ b/src/collision_node.h
@@ -35,15 +35,14 @@
 
 /** \author Jia Pan */
 
-
 #ifndef HPP_FCL_COLLISION_NODE_H
 #define HPP_FCL_COLLISION_NODE_H
 
+/// @cond INTERNAL
+
+#include <hpp/fcl/BVH/BVH_front.h>
 #include "traversal/traversal_node_base.h"
 #include "traversal/traversal_node_bvhs.h"
-#include <hpp/fcl/BVH/BVH_front.h>
-
-
 
 /// @brief collision and distance function on traversal nodes. these functions provide a higher level abstraction for collision functions provided in collision_func_matrix
 namespace hpp
@@ -59,16 +58,16 @@ namespace fcl
 ///         do not collide.
 /// @param front_list list of nodes visited by the query, can be used to
 ///        accelerate computation
-/// @internal collide, private function.
 void collide(CollisionTraversalNodeBase* node, const CollisionRequest& request,
              CollisionResult& result, BVHFrontList* front_list = NULL,
              bool recursive = true);
 
 /// @brief distance computation on distance traversal node; can use front list to accelerate
-/// @internal distance, private function.
 void distance(DistanceTraversalNodeBase* node, BVHFrontList* front_list = NULL, int qsize = 2);
 }
 
 } // namespace hpp
 
+/// @endcond
+
 #endif
diff --git a/src/distance_func_matrix.h b/src/distance_func_matrix.h
index 401accac..3a142614 100644
--- a/src/distance_func_matrix.h
+++ b/src/distance_func_matrix.h
@@ -34,6 +34,11 @@
 
 /** \author Florent Lamiraux */
 
+#ifndef HPP_FCL_DISTANCE_FUNC_MATRIX_H
+#define HPP_FCL_DISTANCE_FUNC_MATRIX_H
+
+/// @cond INTERNAL
+
 #include <hpp/fcl/collision_data.h>
 #include <hpp/fcl/narrowphase/narrowphase.h>
 
@@ -41,7 +46,6 @@ namespace hpp
 {
 namespace fcl
 {
-  /// @internal ShapeShapeDistance, private function.
   template<typename T_SH1, typename T_SH2>
     FCL_REAL ShapeShapeDistance
     (const CollisionGeometry* o1, const Transform3f& tf1,
@@ -49,7 +53,6 @@ namespace fcl
      const GJKSolver* nsolver, const DistanceRequest& request,
      DistanceResult& result);
 
-  /// @internal ShapeShapeCollide, private function.
   template<typename T_SH1, typename T_SH2>
     std::size_t ShapeShapeCollide
     (const CollisionGeometry* o1, const Transform3f& tf1,
@@ -59,3 +62,7 @@ namespace fcl
 }
 
 } // namespace hpp
+
+/// @endcond
+
+#endif
\ No newline at end of file
diff --git a/src/intersect.h b/src/intersect.h
index 5e519c7a..b0b397a3 100644
--- a/src/intersect.h
+++ b/src/intersect.h
@@ -38,6 +38,8 @@
 #ifndef HPP_FCL_INTERSECT_H
 #define HPP_FCL_INTERSECT_H
 
+/// @cond INTERNAL
+
 #include <hpp/fcl/math/transform.h>
 #include <boost/math/special_functions/erf.hpp>
 
@@ -47,7 +49,6 @@ namespace fcl
 {
 
 /// @brief CCD intersect kernel among primitives
-/// @internal Intersect, private class.
 class Intersect
 {
 public:
@@ -56,7 +57,6 @@ public:
 }; // class Intersect
 
 /// @brief Project functions
-/// @internal Project, private class.
 class Project
 {
 public:
@@ -96,7 +96,6 @@ public:
 };
 
 /// @brief Triangle distance functions
-/// @internal TriangleDistance, private class.
 class TriangleDistance
 {
 public:
@@ -193,4 +192,6 @@ public:
 
 } // namespace hpp
 
+/// @endcond
+
 #endif
diff --git a/src/traversal/details/traversal.h b/src/traversal/details/traversal.h
index 2979a601..82553dcd 100644
--- a/src/traversal/details/traversal.h
+++ b/src/traversal/details/traversal.h
@@ -34,10 +34,11 @@
 
 /** \author Joseph Mirabel */
 
-
 #ifndef HPP_FCL_TRAVERSAL_DETAILS_TRAVERSAL_H
 #define HPP_FCL_TRAVERSAL_DETAILS_TRAVERSAL_H
 
+/// @cond INTERNAL
+
 namespace hpp
 {
 namespace fcl
@@ -73,4 +74,6 @@ namespace details
 
 } // namespace hpp
 
+/// @endcond
+
 #endif
diff --git a/src/traversal/traversal_node_base.h b/src/traversal/traversal_node_base.h
index e583cdfd..6f6c41e3 100644
--- a/src/traversal/traversal_node_base.h
+++ b/src/traversal/traversal_node_base.h
@@ -38,6 +38,8 @@
 #ifndef HPP_FCL_TRAVERSAL_NODE_BASE_H
 #define HPP_FCL_TRAVERSAL_NODE_BASE_H
 
+/// @cond INTERNAL
+
 #include <hpp/fcl/data_types.h>
 #include <hpp/fcl/math/transform.h>
 #include <hpp/fcl/collision_data.h>
@@ -47,9 +49,7 @@ namespace hpp
 namespace fcl
 {
 
-
 /// @brief Node structure encoding the information required for traversal.
-/// @internal TraversalNodeBase, private class.
 
 class TraversalNodeBase
 {
@@ -91,9 +91,11 @@ public:
   Transform3f tf2;
 };
 
+/// @defgroup Traversal_For_Collision
+/// regroup class about traversal for distance.
+/// @{
 
 /// @brief Node structure encoding the information required for collision traversal.
-/// @internal CollisionTraversalNodeBase, private class.
 class CollisionTraversalNodeBase : public TraversalNodeBase
 {
 public:
@@ -133,8 +135,13 @@ public:
   bool enable_statistics;
 };
 
+/// @}
+
+/// @defgroup Traversal_For_Distance
+/// regroup class about traversal for distance.
+/// @{
+
 /// @brief Node structure encoding the information required for distance traversal.
-/// @internal DistanceTraversalNodeBase, private class.
 class DistanceTraversalNodeBase : public TraversalNodeBase
 {
 public:
@@ -165,8 +172,13 @@ public:
   /// @brief Whether stores statistics 
   bool enable_statistics;
 };
+
+///@}
+
 }
 
 } // namespace hpp
 
-#endif
+/// @endcond
+
+#endif
\ No newline at end of file
diff --git a/src/traversal/traversal_node_bvh_shape.h b/src/traversal/traversal_node_bvh_shape.h
index 1fbccff9..0fb53f78 100644
--- a/src/traversal/traversal_node_bvh_shape.h
+++ b/src/traversal/traversal_node_bvh_shape.h
@@ -39,6 +39,8 @@
 #ifndef HPP_FCL_TRAVERSAL_NODE_MESH_SHAPE_H
 #define HPP_FCL_TRAVERSAL_NODE_MESH_SHAPE_H
 
+/// @cond INTERNAL
+
 #include <hpp/fcl/collision_data.h>
 #include <hpp/fcl/shape/geometric_shapes.h>
 #include "../src/shape/geometric_shapes_utility.h"
@@ -52,8 +54,10 @@ namespace hpp
 namespace fcl
 {
 
+/// @addtogroup Traversal_For_Collision
+/// @{
+
 /// @brief Traversal node for collision between BVH and shape
-/// @internal BVHShapeCollisionTraversalNode, private class.
 template<typename BV, typename S>
 class BVHShapeCollisionTraversalNode : public CollisionTraversalNodeBase
 {
@@ -97,7 +101,6 @@ public:
 };
 
 /// @brief Traversal node for collision between shape and BVH
-/// @internal ShapeBVHCollisionTraversalNode, private class.
 template<typename S, typename BV>
 class ShapeBVHCollisionTraversalNode : public CollisionTraversalNodeBase
 {
@@ -148,7 +151,6 @@ public:
 
 
 /// @brief Traversal node for collision between mesh and shape
-/// @internal MeshShapeCollisionTraversalNode, private class.
 template<typename BV, typename S,
   int _Options = RelativeTransformationIsIdentity>
 class MeshShapeCollisionTraversalNode : public BVHShapeCollisionTraversalNode<BV, S>
@@ -263,7 +265,6 @@ public:
 };
 
 /// @brief Traversal node for mesh and shape, when mesh BVH is one of the oriented node (OBB, RSS, OBBRSS, kIOS)
-/// @internal MeshShapeCollisionTraversalNodeOBB/RSS/kIOS/OBBRSS, private class.
 template<typename S>
 class MeshShapeCollisionTraversalNodeOBB : public MeshShapeCollisionTraversalNode<OBB, S, 0>
 {
@@ -311,7 +312,6 @@ public:
 
 
 /// @brief Traversal node for collision between shape and mesh
-/// @internalShapeMeshCollisionTraversalNode, private class.
 template<typename S, typename BV,
   int _Options = RelativeTransformationIsIdentity>
 class ShapeMeshCollisionTraversalNode : public ShapeBVHCollisionTraversalNode<S, BV>
@@ -425,7 +425,6 @@ public:
 };
 
 /// @brief Traversal node for shape and mesh, when mesh BVH is one of the oriented node (OBB, RSS, OBBRSS, kIOS)
-/// @internal ShapeMeshCollisionTraversalNodeOBB/RSS/kIOS/OBBRSS, private class.
 template<typename S>
 class ShapeMeshCollisionTraversalNodeOBB : public ShapeMeshCollisionTraversalNode<S, OBB, 0>
 {
@@ -465,8 +464,12 @@ public:
   }
 };
 
+/// @}
+
+/// @addtogroup Traversal_For_Distance
+/// @{
+
 /// @brief Traversal node for distance computation between BVH and shape
-/// @internal BVHShapeDistanceTraversalNode, private class.
 template<typename BV, typename S>
 class BVHShapeDistanceTraversalNode : public DistanceTraversalNodeBase
 {
@@ -515,7 +518,6 @@ public:
 };
 
 /// @brief Traversal node for distance computation between shape and BVH
-/// @internal ShapeBVHShapeDistanceTraversalNode, private class.
 template<typename S, typename BV>
 class ShapeBVHDistanceTraversalNode : public DistanceTraversalNodeBase
 {
@@ -565,7 +567,6 @@ public:
                                   
 
 /// @brief Traversal node for distance between mesh and shape
-/// @internal MeshShapeDistanceTraversalNode, private class.
 template<typename BV, typename S>
 class MeshShapeDistanceTraversalNode : public BVHShapeDistanceTraversalNode<BV, S>
 { 
@@ -691,7 +692,6 @@ static inline void distancePreprocessOrientedNode(const BVHModel<BV>* model1,
 
 
 /// @brief Traversal node for distance between mesh and shape, when mesh BVH is one of the oriented node (RSS, kIOS, OBBRSS)
-/// @internal MeshShapeDistanceTraversalNodeRSS/kIOS/OBBRSS, private class.
 template<typename S>
 class MeshShapeDistanceTraversalNodeRSS : public MeshShapeDistanceTraversalNode<RSS, S>
 {
@@ -790,7 +790,6 @@ public:
 };
 
 /// @brief Traversal node for distance between shape and mesh
-/// @internal ShapeMeshDistanceTraversalNode, private class.
 template<typename S, typename BV>
 class ShapeMeshDistanceTraversalNode : public ShapeBVHDistanceTraversalNode<S, BV>
 { 
@@ -850,7 +849,6 @@ public:
 };
 
 /// @brief Traversal node for distance between shape and mesh, when mesh BVH is one of the oriented node (RSS, kIOS, OBBRSS)
-/// @internal ShapeMeshDistanceTraversalNodeRSS/kIOS/OBBRSS, private class.
 template<typename S>
 class ShapeMeshDistanceTraversalNodeRSS : public ShapeMeshDistanceTraversalNode<S, RSS>
 {
@@ -946,8 +944,13 @@ public:
   }
   
 };
+
+/// @}
+
 }
 
 } // namespace hpp
 
+/// @endcond
+
 #endif
diff --git a/src/traversal/traversal_node_bvhs.h b/src/traversal/traversal_node_bvhs.h
index 603dcec2..13d63f74 100644
--- a/src/traversal/traversal_node_bvhs.h
+++ b/src/traversal/traversal_node_bvhs.h
@@ -35,10 +35,11 @@
 
 /** \author Jia Pan */
 
-
 #ifndef HPP_FCL_TRAVERSAL_NODE_MESHES_H
 #define HPP_FCL_TRAVERSAL_NODE_MESHES_H
 
+/// @cond INTERNAL
+
 #include <hpp/fcl/collision_data.h>
 #include "traversal_node_base.h"
 #include <hpp/fcl/BV/BV_node.h>
@@ -55,13 +56,15 @@
 #include <vector>
 #include <cassert>
 
-
 namespace hpp
 {
 namespace fcl
 {
+
+/// @addtogroup Traversal_For_Collision
+/// @{
+
 /// @brief Traversal node for collision between BVH models
-/// @internal BVHCollisionTraversalNode, private class.
 template<typename BV>
 class BVHCollisionTraversalNode : public CollisionTraversalNodeBase
 {
@@ -139,7 +142,6 @@ public:
 };
 
 /// @brief Traversal node for collision between two meshes
-/// @internal MeshCollisionTraversalNode, private class.
 template<typename BV, int _Options = RelativeTransformationIsIdentity>
 class MeshCollisionTraversalNode : public BVHCollisionTraversalNode<BV>
 {
@@ -174,7 +176,7 @@ public:
   /// @retval sqrDistLowerBound square of a lower bound of the minimal
   ///         distance between bounding volumes.
   bool BVDisjoints(int b1, int b2, FCL_REAL& sqrDistLowerBound) const
-  {/// @internal MeshCollisionTraversalNode, private class.
+  {
     if(this->enable_statistics) this->num_bv_tests++;
     if (RTIsIdentity)
       return !this->model1->getBV(b1).overlap(this->model2->getBV(b2),
@@ -266,12 +268,13 @@ public:
 };
 
 /// @brief Traversal node for collision between two meshes if their underlying BVH node is oriented node (OBB, RSS, OBBRSS, kIOS)
-/// @internal MeshCollisionTraversalNode (OBB, RSS, OBBRSS, kIOS), private class.
 typedef MeshCollisionTraversalNode<OBB   , 0> MeshCollisionTraversalNodeOBB   ;
 typedef MeshCollisionTraversalNode<RSS   , 0> MeshCollisionTraversalNodeRSS   ;
 typedef MeshCollisionTraversalNode<kIOS  , 0> MeshCollisionTraversalNodekIOS  ;
 typedef MeshCollisionTraversalNode<OBBRSS, 0> MeshCollisionTraversalNodeOBBRSS;
 
+/// @}
+
 namespace details
 {
   template<typename BV> struct DistanceTraversalBVDistanceLowerBound_impl
@@ -298,8 +301,10 @@ namespace details
   };
 } // namespace details
 
+/// @addtogroup Traversal_For_Distance
+/// @{
+
 /// @brief Traversal node for distance computation between BVH models
-/// @internal BVHDistanceTraversalNode, private class.
 template<typename BV>
 class BVHDistanceTraversalNode : public DistanceTraversalNodeBase
 {
@@ -385,7 +390,6 @@ public:
 
 
 /// @brief Traversal node for distance computation between two meshes
-/// @internal MeshDistanceTraversalNode, private class.
 template<typename BV>
 class MeshDistanceTraversalNode : public BVHDistanceTraversalNode<BV>
 {
@@ -453,7 +457,6 @@ public:
 };
 
 /// @brief Traversal node for distance computation between two meshes if their underlying BVH node is oriented node (RSS, OBBRSS, kIOS)
-/// @internal MeshDistanceTraversalNodeRSS/kIOS/OBBRSS, private class.
 class MeshDistanceTraversalNodeRSS : public MeshDistanceTraversalNode<RSS>
 {
 public:
@@ -508,6 +511,8 @@ public:
   Vec3f T;
 };
 
+/// @}
+
 /// @brief for OBB and RSS, there is local coordinate of BV, so normal need to be transformed
 namespace details
 {
@@ -524,11 +529,12 @@ inline const Matrix3f& getBVAxes<OBBRSS>(const OBBRSS& bv)
   return bv.obb.axes;
 }
 
-
 }
 
 }
 
 } // namespace hpp
 
+/// @endcond
+
 #endif
diff --git a/src/traversal/traversal_node_octree.h b/src/traversal/traversal_node_octree.h
index 1590c99b..3042d43b 100644
--- a/src/traversal/traversal_node_octree.h
+++ b/src/traversal/traversal_node_octree.h
@@ -38,6 +38,8 @@
 #ifndef HPP_FCL_TRAVERSAL_NODE_OCTREE_H
 #define HPP_FCL_TRAVERSAL_NODE_OCTREE_H
 
+/// @cond INTERNAL
+
 #include <hpp/fcl/collision_data.h>
 #include "traversal_node_base.h"
 #include <hpp/fcl/narrowphase/narrowphase.h>
@@ -51,7 +53,6 @@ namespace fcl
 {
 
 /// @brief Algorithms for collision related with octree
-/// @internal OcTreeSolver, private class.
 class OcTreeSolver
 {
 private:
@@ -886,11 +887,10 @@ private:
   }
 };
 
-
-
+/// @addtogroup Traversal_For_Collision
+/// @{
 
 /// @brief Traversal node for octree collision
-/// @internal OcTreeCollisionTraversalNode, private class.
 class OcTreeCollisionTraversalNode : public CollisionTraversalNodeBase
 {
 public:
@@ -926,43 +926,7 @@ public:
   const OcTreeSolver* otsolver;
 };
 
-/// @brief Traversal node for octree distance
-/// @internal OcTreeDistanceTraversalNode, private class.
-class OcTreeDistanceTraversalNode : public DistanceTraversalNodeBase
-{
-public:
-  OcTreeDistanceTraversalNode()
-  {
-    model1 = NULL;
-    model2 = NULL;
-
-    otsolver = NULL;
-  }
-
-
-  FCL_REAL BVDistanceLowerBound(int, int) const
-  {
-    return -1;
-  }
-
-  bool BVDistanceLowerBound(int, int, FCL_REAL&) const
-  {
-    return false;
-  }
-
-  void leafComputeDistance(int, int) const
-  {
-    otsolver->OcTreeDistance(model1, model2, tf1, tf2, request, *result);
-  }
-
-  const OcTree* model1;
-  const OcTree* model2;
-
-  const OcTreeSolver* otsolver;
-};
-
 /// @brief Traversal node for shape-octree collision
-/// @internal ShapeOcTreeCollisionTraversalNode, private class.
 template<typename S>
 class ShapeOcTreeCollisionTraversalNode : public CollisionTraversalNodeBase
 {
@@ -1000,7 +964,7 @@ public:
 };
 
 /// @brief Traversal node for octree-shape collision
-/// @internal OcTreeShapeCollisionTraversalNode, private class.
+
 template<typename S>
 class OcTreeShapeCollisionTraversalNode : public CollisionTraversalNodeBase
 {
@@ -1037,74 +1001,90 @@ public:
   const OcTreeSolver* otsolver;  
 };
 
-/// @brief Traversal node for shape-octree distance
-/// @internal ShapeOcTreeCollisionTraversalNode, private class.
-template<typename S>
-class ShapeOcTreeDistanceTraversalNode : public DistanceTraversalNodeBase
+/// @brief Traversal node for mesh-octree collision
+template<typename BV>
+class MeshOcTreeCollisionTraversalNode : public CollisionTraversalNodeBase
 {
 public:
-  ShapeOcTreeDistanceTraversalNode()
+ MeshOcTreeCollisionTraversalNode(const CollisionRequest& request) :
+  CollisionTraversalNodeBase (request)
   {
     model1 = NULL;
     model2 = NULL;
-    
+
     otsolver = NULL;
   }
 
-  FCL_REAL BVDistanceLowerBound(int, int) const
+  bool BVDisjoints(int, int) const
   {
-    return -1;
+    return false;
   }
 
-  void leafComputeDistance(int, int) const
+  bool BVDisjoints(int, int, FCL_REAL&) const
   {
-    otsolver->OcTreeShapeDistance(model2, *model1, tf2, tf1, request, *result);
+    return false;
   }
 
-  const S* model1;
+  void leafCollides(int, int, FCL_REAL&) const
+  {
+    otsolver->OcTreeMeshIntersect(model2, model1, tf2, tf1, request, *result);
+  }
+
+  const BVHModel<BV>* model1;
   const OcTree* model2;
 
+  Transform3f tf1, tf2;
+    
   const OcTreeSolver* otsolver;
 };
 
-/// @brief Traversal node for octree-shape distance
-/// @internal OcTreeShapeDistanceTraversalNode, private class.
-template<typename S>
-class OcTreeShapeDistanceTraversalNode : public DistanceTraversalNodeBase
+/// @brief Traversal node for octree-mesh collision
+template<typename BV>
+class OcTreeMeshCollisionTraversalNode : public CollisionTraversalNodeBase
 {
 public:
-  OcTreeShapeDistanceTraversalNode()
+ OcTreeMeshCollisionTraversalNode(const CollisionRequest& request) :
+  CollisionTraversalNodeBase (request)
   {
     model1 = NULL;
     model2 = NULL;
-    
+
     otsolver = NULL;
   }
 
-  FCL_REAL BVDistanceLowerBound(int, int) const
+  bool BVDisjoints(int, int) const
   {
-    return -1;
+    return false;
   }
 
-  void leafComputeDistance(int, int) const
+  bool BVDisjoints(int, int, FCL_REAL&) const
   {
-    otsolver->OcTreeShapeDistance(model1, *model2, tf1, tf2, request, *result);
+    return false;
+  }
+
+  void leafCollides(int, int, FCL_REAL&) const
+  {
+    otsolver->OcTreeMeshIntersect(model1, model2, tf1, tf2, request, *result);
   }
 
   const OcTree* model1;
-  const S* model2;
+  const BVHModel<BV>* model2;
 
+  Transform3f tf1, tf2;
+    
   const OcTreeSolver* otsolver;
 };
 
-/// @brief Traversal node for mesh-octree collision
-/// @internal MeshOcTreeCollisionTraversalNode, private class.
-template<typename BV>
-class MeshOcTreeCollisionTraversalNode : public CollisionTraversalNodeBase
+/// @}
+
+/// @addtogroup Traversal_For_Distance
+/// @{
+
+/// @brief Traversal node for octree distance
+class OcTreeDistanceTraversalNode : public DistanceTraversalNodeBase
 {
 public:
- MeshOcTreeCollisionTraversalNode(const CollisionRequest& request) :
-  CollisionTraversalNodeBase (request)
+  OcTreeDistanceTraversalNode()
   {
     model1 = NULL;
     model2 = NULL;
@@ -1112,69 +1092,89 @@ public:
     otsolver = NULL;
   }
 
-  bool BVDisjoints(int, int) const
+
+  FCL_REAL BVDistanceLowerBound(int, int) const
   {
-    return false;
+    return -1;
   }
 
-  bool BVDisjoints(int, int, FCL_REAL&) const
+  bool BVDistanceLowerBound(int, int, FCL_REAL&) const
   {
     return false;
   }
 
-  void leafCollides(int, int, FCL_REAL&) const
+  void leafComputeDistance(int, int) const
   {
-    otsolver->OcTreeMeshIntersect(model2, model1, tf2, tf1, request, *result);
+    otsolver->OcTreeDistance(model1, model2, tf1, tf2, request, *result);
   }
 
-  const BVHModel<BV>* model1;
+  const OcTree* model1;
   const OcTree* model2;
 
-  Transform3f tf1, tf2;
-    
   const OcTreeSolver* otsolver;
 };
 
-/// @brief Traversal node for octree-mesh collision
-/// @internal OcTreeMeshCollisionTraversalNode, private class.
-template<typename BV>
-class OcTreeMeshCollisionTraversalNode : public CollisionTraversalNodeBase
+
+
+/// @brief Traversal node for shape-octree distance
+template<typename S>
+class ShapeOcTreeDistanceTraversalNode : public DistanceTraversalNodeBase
 {
 public:
- OcTreeMeshCollisionTraversalNode(const CollisionRequest& request) :
-  CollisionTraversalNodeBase (request)
+  ShapeOcTreeDistanceTraversalNode()
   {
     model1 = NULL;
     model2 = NULL;
-
+    
     otsolver = NULL;
   }
 
-  bool BVDisjoints(int, int) const
+  FCL_REAL BVDistanceLowerBound(int, int) const
   {
-    return false;
+    return -1;
   }
 
-  bool BVDisjoints(int, int, FCL_REAL&) const
+  void leafComputeDistance(int, int) const
   {
-    return false;
+    otsolver->OcTreeShapeDistance(model2, *model1, tf2, tf1, request, *result);
   }
 
-  void leafCollides(int, int, FCL_REAL&) const
+  const S* model1;
+  const OcTree* model2;
+
+  const OcTreeSolver* otsolver;
+};
+
+/// @brief Traversal node for octree-shape distance
+template<typename S>
+class OcTreeShapeDistanceTraversalNode : public DistanceTraversalNodeBase
+{
+public:
+  OcTreeShapeDistanceTraversalNode()
   {
-    otsolver->OcTreeMeshIntersect(model1, model2, tf1, tf2, request, *result);
+    model1 = NULL;
+    model2 = NULL;
+    
+    otsolver = NULL;
+  }
+
+  FCL_REAL BVDistanceLowerBound(int, int) const
+  {
+    return -1;
+  }
+
+  void leafComputeDistance(int, int) const
+  {
+    otsolver->OcTreeShapeDistance(model1, *model2, tf1, tf2, request, *result);
   }
 
   const OcTree* model1;
-  const BVHModel<BV>* model2;
+  const S* model2;
 
-  Transform3f tf1, tf2;
-    
   const OcTreeSolver* otsolver;
 };
 
 /// @brief Traversal node for mesh-octree distance
-/// @internal MeshOcTreeDistanceTraversalNode, private class.
 template<typename BV>
 class MeshOcTreeDistanceTraversalNode : public DistanceTraversalNodeBase
 {
@@ -1205,7 +1205,6 @@ public:
 };
 
 /// @brief Traversal node for octree-mesh distance
-/// @internal OcTreeMeshDistanceTraversalNode, private class.
 template<typename BV>
 class OcTreeMeshDistanceTraversalNode : public DistanceTraversalNodeBase
 {
@@ -1235,10 +1234,12 @@ public:
 
 };
 
-
+/// @}
 
 }
 
 } // namespace hpp
 
+/// @endcond
+
 #endif
diff --git a/src/traversal/traversal_node_setup.h b/src/traversal/traversal_node_setup.h
index 85cdfbc5..4dc10681 100644
--- a/src/traversal/traversal_node_setup.h
+++ b/src/traversal/traversal_node_setup.h
@@ -35,10 +35,11 @@
 
 /** \author Jia Pan */
 
-
 #ifndef HPP_FCL_TRAVERSAL_NODE_SETUP_H
 #define HPP_FCL_TRAVERSAL_NODE_SETUP_H
 
+/// @cond INTERNAL
+
 #include "traversal_node_bvhs.h"
 #include "traversal_node_shapes.h"
 #include "traversal_node_bvh_shape.h"
@@ -61,7 +62,7 @@ inline bool initialize(OcTreeCollisionTraversalNode& node,
                        const OcTree& model2, const Transform3f& tf2,
                        const OcTreeSolver* otsolver,
                        CollisionResult& result)
-{
+
   node.result = &result;
 
   node.model1 = &model1;
@@ -82,6 +83,7 @@ inline bool initialize(OcTreeDistanceTraversalNode& node,
                        const OcTreeSolver* otsolver,
                        const DistanceRequest& request,
                        DistanceResult& result)
+
 {
   node.request = request;
   node.result = &result;
@@ -886,4 +888,6 @@ bool initialize(ShapeMeshDistanceTraversalNodeOBBRSS<S>& node,
 
 } // namespace hpp
 
+/// @endcond
+
 #endif
diff --git a/src/traversal/traversal_node_shapes.h b/src/traversal/traversal_node_shapes.h
index a9f6a6e8..a6d96060 100644
--- a/src/traversal/traversal_node_shapes.h
+++ b/src/traversal/traversal_node_shapes.h
@@ -35,24 +35,26 @@
 
 /** \author Jia Pan */
 
-
 #ifndef HPP_FCL_TRAVERSAL_NODE_SHAPES_H
 #define HPP_FCL_TRAVERSAL_NODE_SHAPES_H
 
+/// @cond INTERNAL
+
 #include <hpp/fcl/collision_data.h>
-#include "traversal_node_base.h"
 #include <hpp/fcl/narrowphase/narrowphase.h>
 #include <hpp/fcl/BV/BV.h>
 #include "../src/shape/geometric_shapes_utility.h"
+#include "traversal_node_base.h"
 
 namespace hpp
 {
 namespace fcl
 {
 
+/// @addtogroup Traversal_For_Collision
+/// @{
 
 /// @brief Traversal node for collision between two shapes
-/// @internal ShapeCollisionTraversalNode, private class.
 template<typename S1, typename S2>
 class ShapeCollisionTraversalNode : public CollisionTraversalNodeBase
 {
@@ -114,8 +116,12 @@ public:
   const GJKSolver* nsolver;
 };
 
+/// @}
+
+/// @addtogroup Traversal_For_Distance
+/// @{
+
 /// @brief Traversal node for distance between two shapes
-/// @internal ShapeDistanceTraversalNode, private class.
 template<typename S1, typename S2>
 class ShapeDistanceTraversalNode : public DistanceTraversalNodeBase
 {
@@ -150,8 +156,13 @@ public:
 
   const GJKSolver* nsolver;
 };
+
+/// @}
+
 }
 
 } // namespace hpp
 
+/// @endcond
+
 #endif
diff --git a/src/traversal/traversal_recurse.h b/src/traversal/traversal_recurse.h
index 4149d111..f5ac7578 100644
--- a/src/traversal/traversal_recurse.h
+++ b/src/traversal/traversal_recurse.h
@@ -35,14 +35,15 @@
 
 /** \author Jia Pan */
 
-
 #ifndef HPP_FCL_TRAVERSAL_RECURSE_H
 #define HPP_FCL_TRAVERSAL_RECURSE_H
 
-#include "traversal_node_base.h"
-#include "traversal_node_bvhs.h"
+/// @cond INTERNAL
+
 #include <hpp/fcl/BVH/BVH_front.h>
 #include <queue>
+#include "traversal_node_base.h"
+#include "traversal_node_bvhs.h"
 
 namespace hpp
 {
@@ -53,24 +54,19 @@ namespace fcl
 /// @param node collision node,
 /// @param b1, b2 ids of bounding volume nodes for object 1 and object 2
 /// @retval sqrDistLowerBound squared lower bound on distance between objects.
-/// @internal collisionRecurse, private function.
 void collisionRecurse(CollisionTraversalNodeBase* node, int b1, int b2,
 		      BVHFrontList* front_list, FCL_REAL& sqrDistLowerBound);
 
-/// @internal collisionNonRecurse, private function.
 void collisionNonRecurse(CollisionTraversalNodeBase* node,
 		         BVHFrontList* front_list, FCL_REAL& sqrDistLowerBound);
 
 /// @brief Recurse function for distance
-/// @internal distanceRecurse, private function.
 void distanceRecurse(DistanceTraversalNodeBase* node, int b1, int b2, BVHFrontList* front_list);
 
 /// @brief Recurse function for distance, using queue acceleration
-/// @internal distanceQueueRecurse, private function.
 void distanceQueueRecurse(DistanceTraversalNodeBase* node, int b1, int b2, BVHFrontList* front_list, int qsize);
 
 /// @brief Recurse function for front list propagation
-/// @internal propagateBVHFrontListCollisionRecurse, private function.
 void propagateBVHFrontListCollisionRecurse
   (CollisionTraversalNodeBase* node, const CollisionRequest& request,
    CollisionResult& result, BVHFrontList* front_list);
@@ -79,4 +75,6 @@ void propagateBVHFrontListCollisionRecurse
 
 } // namespace hpp
 
+/// @endcond
+
 #endif
-- 
GitLab