Commit 9d6a9e11 authored by Lucile Remigy's avatar Lucile Remigy
Browse files

DOC, group of class, internal file

parent 27de5124
......@@ -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
{
......
......@@ -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
{
......
......@@ -46,6 +46,9 @@ namespace fcl
{
class CollisionRequest;
/// @addtogroup Bounding_Volume
/// @{
/// @brief Oriented bounding box class
class OBB
{
......
......@@ -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
{
......
......@@ -48,6 +48,9 @@ namespace fcl
{
class CollisionRequest;
/// @addtogroup Bounding_Volume
/// @{
/// @brief A class for rectangle sphere-swept bounding volume
class RSS
{
......
......@@ -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:
......
......@@ -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
{
......
......@@ -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);
......
......@@ -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
{
......
......@@ -33,7 +33,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
/** \author Jia Pan */
/** @author Jia Pan */
#ifndef HPP_FCL_DISTANCE_H
#define HPP_FCL_DISTANCE_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
{
......
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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>