FCL  0.6.0
Flexible Collision Library
utility.h
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2011-2014, Willow Garage, Inc.
5  * Copyright (c) 2014-2016, Open Source Robotics Foundation
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * * Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  * * Redistributions in binary form must reproduce the above
15  * copyright notice, this list of conditions and the following
16  * disclaimer in the documentation and/or other materials provided
17  * with the distribution.
18  * * Neither the name of Open Source Robotics Foundation nor the names of its
19  * contributors may be used to endorse or promote products derived
20  * from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33  * POSSIBILITY OF SUCH DAMAGE.
34  */
35 
38 #ifndef FCL_GEOMETRY_SHAPE_UTILITY_H
39 #define FCL_GEOMETRY_SHAPE_UTILITY_H
40 
41 // This header shouldn't be included by any bounding volumen classes (e.g.,
42 // AABB and OBB) nor geometric shapes (e.g., Box and Sphere).
43 
44 #include "fcl/common/types.h"
45 
46 #include "fcl/math/bv/AABB.h"
47 #include "fcl/math/bv/kDOP.h"
48 #include "fcl/math/bv/kIOS.h"
49 #include "fcl/math/bv/OBB.h"
50 #include "fcl/math/bv/OBBRSS.h"
51 #include "fcl/math/bv/RSS.h"
52 
53 #include "fcl/geometry/shape/box.h"
54 
55 namespace fcl
56 {
57 
59 template <typename BV, typename Shape>
60 void computeBV(const Shape& s, const Transform3<typename BV::S>& tf, BV& bv);
61 
63 template <typename S>
64 void constructBox(const AABB<S>& bv, Box<S>& box, Transform3<S>& tf);
65 
66 template <typename S>
67 void constructBox(const OBB<S>& bv, Box<S>& box, Transform3<S>& tf);
68 
69 template <typename S>
70 void constructBox(const OBBRSS<S>& bv, Box<S>& box, Transform3<S>& tf);
71 
72 template <typename S>
73 void constructBox(const kIOS<S>& bv, Box<S>& box, Transform3<S>& tf);
74 
75 template <typename S>
76 void constructBox(const RSS<S>& bv, Box<S>& box, Transform3<S>& tf);
77 
78 template <typename S>
79 void constructBox(const KDOP<S, 16>& bv, Box<S>& box, Transform3<S>& tf);
80 
81 template <typename S>
82 void constructBox(const KDOP<S, 18>& bv, Box<S>& box, Transform3<S>& tf);
83 
84 template <typename S>
85 void constructBox(const KDOP<S, 24>& bv, Box<S>& box, Transform3<S>& tf);
86 
87 template <typename S>
88 void constructBox(const AABB<S>& bv, const Transform3<S>& tf_bv, Box<S>& box, Transform3<S>& tf);
89 
90 template <typename S>
91 void constructBox(const OBB<S>& bv, const Transform3<S>& tf_bv, Box<S>& box, Transform3<S>& tf);
92 
93 template <typename S>
94 void constructBox(const OBBRSS<S>& bv, const Transform3<S>& tf_bv, Box<S>& box, Transform3<S>& tf);
95 
96 template <typename S>
97 void constructBox(const kIOS<S>& bv, const Transform3<S>& tf_bv, Box<S>& box, Transform3<S>& tf);
98 
99 template <typename S>
100 void constructBox(const RSS<S>& bv, const Transform3<S>& tf_bv, Box<S>& box, Transform3<S>& tf);
101 
102 template <typename S>
103 void constructBox(const KDOP<S, 16>& bv, const Transform3<S>& tf_bv, Box<S>& box, Transform3<S>& tf);
104 
105 template <typename S>
106 void constructBox(const KDOP<S, 18>& bv, const Transform3<S>& tf_bv, Box<S>& box, Transform3<S>& tf);
107 
108 template <typename S>
109 void constructBox(const KDOP<S, 24>& bv, const Transform3<S>& tf_bv, Box<S>& box, Transform3<S>& tf);
110 
111 } // namespace fcl
112 
113 #include "fcl/geometry/shape/utility-inl.h"
114 
115 #endif
Main namespace.
Definition: broadphase_bruteforce-inl.h:45
void computeBV(const Shape &s, const Transform3< typename BV::S > &tf, BV &bv)
calculate a bounding volume for a shape in a specific configuration
Definition: utility-inl.h:1049