coal  3.0.1
Coal, The Collision Detection Library. Previously known as HPP-FCL, fork of FCL -- The Flexible Collision Library
traits_traversal.h
Go to the documentation of this file.
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2019, CNRS-LAAS
5  * All rights reserved.
6  */
7 
12 #include <../src/collision_node.h>
15 
16 namespace coal {
17 
18 // TraversalTraitsCollision for collision_func_matrix.cpp
19 
20 template <typename TypeA, typename TypeB>
22 
23 #ifdef COAL_HAS_OCTOMAP
24 
25 template <typename T_SH>
27  typedef ShapeOcTreeCollisionTraversalNode<T_SH> CollisionTraversal_t;
28 };
29 
30 template <typename T_SH>
31 struct COAL_LOCAL TraversalTraitsCollision<OcTree, T_SH> {
32  typedef OcTreeShapeCollisionTraversalNode<T_SH> CollisionTraversal_t;
33 };
34 
35 template <>
36 struct COAL_LOCAL TraversalTraitsCollision<OcTree, OcTree> {
37  typedef OcTreeCollisionTraversalNode CollisionTraversal_t;
38 };
39 
40 template <typename T_BVH>
41 struct COAL_LOCAL TraversalTraitsCollision<OcTree, BVHModel<T_BVH> > {
42  typedef OcTreeMeshCollisionTraversalNode<T_BVH> CollisionTraversal_t;
43 };
44 
45 template <typename T_BVH>
46 struct COAL_LOCAL TraversalTraitsCollision<BVHModel<T_BVH>, OcTree> {
47  typedef MeshOcTreeCollisionTraversalNode<T_BVH> CollisionTraversal_t;
48 };
49 
50 template <typename T_HF>
51 struct COAL_LOCAL TraversalTraitsCollision<OcTree, HeightField<T_HF> > {
52  typedef OcTreeHeightFieldCollisionTraversalNode<T_HF> CollisionTraversal_t;
53 };
54 
55 template <typename T_HF>
56 struct COAL_LOCAL TraversalTraitsCollision<HeightField<T_HF>, OcTree> {
57  typedef HeightFieldOcTreeCollisionTraversalNode<T_HF> CollisionTraversal_t;
58 };
59 
60 #endif
61 
62 // TraversalTraitsDistance for distance_func_matrix.cpp
63 
64 template <typename TypeA, typename TypeB>
66 
67 #ifdef COAL_HAS_OCTOMAP
68 
69 template <typename T_SH>
71  typedef ShapeOcTreeDistanceTraversalNode<T_SH> CollisionTraversal_t;
72 };
73 
74 template <typename T_SH>
75 struct COAL_LOCAL TraversalTraitsDistance<OcTree, T_SH> {
76  typedef OcTreeShapeDistanceTraversalNode<T_SH> CollisionTraversal_t;
77 };
78 
79 template <>
80 struct COAL_LOCAL TraversalTraitsDistance<OcTree, OcTree> {
81  typedef OcTreeDistanceTraversalNode CollisionTraversal_t;
82 };
83 
84 template <typename T_BVH>
85 struct COAL_LOCAL TraversalTraitsDistance<OcTree, BVHModel<T_BVH> > {
86  typedef OcTreeMeshDistanceTraversalNode<T_BVH> CollisionTraversal_t;
87 };
88 
89 template <typename T_BVH>
90 struct COAL_LOCAL TraversalTraitsDistance<BVHModel<T_BVH>, OcTree> {
91  typedef MeshOcTreeDistanceTraversalNode<T_BVH> CollisionTraversal_t;
92 };
93 
94 #endif
95 
96 } // namespace coal
Octree is one type of collision geometry which can encode uncertainty information in the sensor data.
Definition: octree.h:53
#define COAL_LOCAL
Definition: config.hh:92
Main namespace.
Definition: broadphase_bruteforce.h:44
Definition: traits_traversal.h:21
Definition: traits_traversal.h:65