hpp-fcl: include/hpp/fcl/shape/geometric_shapes.h Source File

hpp-fcl 1.6.0 HPP fork of FCL -- The Flexible Collision Library

geometric_shapes.h
Go to the documentation of this file.
1 /*
2 * Software License Agreement (BSD License)
3 *
4 * Copyright (c) 2011-2014, Willow Garage, Inc.
5 * Copyright (c) 2014-2015, 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
39 #ifndef HPP_FCL_GEOMETRIC_SHAPES_H
40 #define HPP_FCL_GEOMETRIC_SHAPES_H
41
42 #include <boost/math/constants/constants.hpp>
43
44 #include <hpp/fcl/collision_object.h>
45 #include <hpp/fcl/data_types.h>
46 #include <string.h>
47
48 namespace hpp
49 {
50 namespace fcl
51 {
52
54 class HPP_FCL_DLLAPI ShapeBase : public CollisionGeometry
55 {
56 public:
57 ShapeBase() {}
58
59 virtual ~ShapeBase () {};
60
62 OBJECT_TYPE getObjectType() const { return OT_GEOM; }
63 };
64
68
70 class HPP_FCL_DLLAPI TriangleP : public ShapeBase
71 {
72 public:
73 TriangleP(const Vec3f& a_, const Vec3f& b_, const Vec3f& c_) : ShapeBase(), a(a_), b(b_), c(c_)
74 {
75 }
76
78 void computeLocalAABB();
79
80 NODE_TYPE getNodeType() const { return GEOM_TRIANGLE; }
81
82 Vec3f a, b, c;
83 };
84
86 class HPP_FCL_DLLAPI Box : public ShapeBase
87 {
88 public:
89 Box(FCL_REAL x, FCL_REAL y, FCL_REAL z) : ShapeBase(), halfSide(x/2, y/2, z/2)
90 {
91 }
92
93 Box(const Vec3f& side_) : ShapeBase(), halfSide(side_/2)
94 {
95 }
96
97 Box() {}
98
100 Vec3f halfSide;
101
103 void computeLocalAABB();
104
106 NODE_TYPE getNodeType() const { return GEOM_BOX; }
107
108 FCL_REAL computeVolume() const
109 {
110 return 8*halfSide.prod();
111 }
112
113 Matrix3f computeMomentofInertia() const
114 {
115 FCL_REAL V = computeVolume();
116 Vec3f s (halfSide.cwiseAbs2() * V);
117 return (Vec3f (s[1] + s[2], s[0] + s[2], s[0] + s[1]) / 3).asDiagonal();
118 }
119 };
120
122 class HPP_FCL_DLLAPI Sphere : public ShapeBase
123 {
124 public:
125 Sphere(FCL_REAL radius_) : ShapeBase(), radius(radius_)
126 {
127 }
128
130 FCL_REAL radius;
131
133 void computeLocalAABB();
134
136 NODE_TYPE getNodeType() const { return GEOM_SPHERE; }
137
138 Matrix3f computeMomentofInertia() const
139 {
140 FCL_REAL I = 0.4 * radius * radius * computeVolume();
141 return I * Matrix3f::Identity();
142 }
143
144 FCL_REAL computeVolume() const
145 {
146 return 4 * boost::math::constants::pi<FCL_REAL>() * radius * radius * radius / 3;
147 }
148 };
149
154 class HPP_FCL_DLLAPI Capsule : public ShapeBase
155 {
156 public:
157 Capsule(FCL_REAL radius_, FCL_REAL lz_) : ShapeBase(), radius(radius_)
158 {
159 halfLength = lz_/2;
160 }
161
163 FCL_REAL radius;
164
166 FCL_REAL halfLength;
167
169 void computeLocalAABB();
170
172 NODE_TYPE getNodeType() const { return GEOM_CAPSULE; }
173
174 FCL_REAL computeVolume() const
175 {
176 return boost::math::constants::pi<FCL_REAL>() * radius * radius *((halfLength * 2) + radius * 4/3.0);
177 }
178
179 Matrix3f computeMomentofInertia() const
180 {
181 FCL_REAL v_cyl = radius * radius * (halfLength * 2) * boost::math::constants::pi<FCL_REAL>();
182 FCL_REAL v_sph = radius * radius * radius * boost::math::constants::pi<FCL_REAL>() * 4 / 3.0;
183
184 FCL_REAL h2 = halfLength * halfLength;
185 FCL_REAL r2 = radius * radius;
186 FCL_REAL ix = v_cyl * (h2 / 3. + r2 / 4.) + v_sph * (0.4 * r2 + h2 + 0.75 * radius * halfLength);
187 FCL_REAL iz = (0.5 * v_cyl + 0.4 * v_sph) * radius * radius;
188
189 return (Matrix3f() << ix, 0, 0,
190 0, ix, 0,
191 0, 0, iz).finished();
192 }
193
194 };
195
199 class HPP_FCL_DLLAPI Cone : public ShapeBase
200 {
201 public:
202 Cone(FCL_REAL radius_, FCL_REAL lz_) : ShapeBase(), radius(radius_)
203 {
204 halfLength = lz_/2;
205 }
206
208 FCL_REAL radius;
209
211 FCL_REAL halfLength;
212
214 void computeLocalAABB();
215
217 NODE_TYPE getNodeType() const { return GEOM_CONE; }
218
219 FCL_REAL computeVolume() const
220 {
221 return boost::math::constants::pi<FCL_REAL>() * radius * radius * (halfLength * 2) / 3;
222 }
223
224 Matrix3f computeMomentofInertia() const
225 {
226 FCL_REAL V = computeVolume();
227 FCL_REAL ix = V * (0.4 * halfLength * halfLength + 3 * radius * radius / 20);
228 FCL_REAL iz = 0.3 * V * radius * radius;
229
230 return (Matrix3f() << ix, 0, 0,
231 0, ix, 0,
232 0, 0, iz).finished();
233 }
234
235 Vec3f computeCOM() const
236 {
237 return Vec3f(0, 0, -0.5 * halfLength);
238 }
239 };
240
243 class HPP_FCL_DLLAPI Cylinder : public ShapeBase
244 {
245 public:
246 Cylinder(FCL_REAL radius_, FCL_REAL lz_) : ShapeBase(), radius(radius_)
247 {
248 halfLength = lz_/2;
249 }
250
252 FCL_REAL radius;
253
255 FCL_REAL halfLength;
256
258 void computeLocalAABB();
259
261 NODE_TYPE getNodeType() const { return GEOM_CYLINDER; }
262
263 FCL_REAL computeVolume() const
264 {
265 return boost::math::constants::pi<FCL_REAL>() * radius * radius * (halfLength * 2);
266 }
267
268 Matrix3f computeMomentofInertia() const
269 {
270 FCL_REAL V = computeVolume();
271 FCL_REAL ix = V * (radius * radius / 4 + halfLength * halfLength / 3);
272 FCL_REAL iz = V * radius * radius / 2;
273 return (Matrix3f() << ix, 0, 0,
274 0, ix, 0,
275 0, 0, iz).finished();
276 }
277 };
278
281 class HPP_FCL_DLLAPI ConvexBase : public ShapeBase
282 {
283 public:
296 static ConvexBase* convexHull (const Vec3f* points, int num_points,
297 bool keepTriangles, const char* qhullCommand = NULL);
298
299 virtual ~ConvexBase();
300
302 void computeLocalAABB();
303
305 NODE_TYPE getNodeType() const { return GEOM_CONVEX; }
306
308 Vec3f* points;
309 int num_points;
310
311 struct HPP_FCL_DLLAPI Neighbors
312 {
313 unsigned char count_;
314 unsigned int* n_;
315
316 unsigned char const& count () const { return count_; }
317 unsigned int & operator[] (int i) { assert(i<count_); return n_[i]; }
318 unsigned int const& operator[] (int i) const { assert(i<count_); return n_[i]; }
319 };
323 Neighbors* neighbors;
324
326 Vec3f center;
327
328 protected:
331 ConvexBase () : ShapeBase(), points(NULL), num_points(0),
332 neighbors(NULL), nneighbors_(NULL), own_storage_(false) {}
333
338 void initialize(bool ownStorage, Vec3f* points_, int num_points_);
339
342 ConvexBase(const ConvexBase& other);
343
344 unsigned int* nneighbors_;
345
346 bool own_storage_;
347
348 private:
349 void computeCenter();
350 };
351
352 template <typename PolygonT> class Convex;
353
357 class HPP_FCL_DLLAPI Halfspace : public ShapeBase
358 {
359 public:
361 Halfspace(const Vec3f& n_, FCL_REAL d_) : ShapeBase(), n(n_), d(d_)
362 {
363 unitNormalTest();
364 }
365
367 Halfspace(FCL_REAL a, FCL_REAL b, FCL_REAL c, FCL_REAL d_) : ShapeBase(), n(a, b, c), d(d_)
368 {
369 unitNormalTest();
370 }
371
372 Halfspace() : ShapeBase(), n(1, 0, 0), d(0)
373 {
374 }
375
376 FCL_REAL signedDistance(const Vec3f& p) const
377 {
378 return n.dot(p) - d;
379 }
380
381 FCL_REAL distance(const Vec3f& p) const
382 {
383 return std::abs(n.dot(p) - d);
384 }
385
387 void computeLocalAABB();
388
390 NODE_TYPE getNodeType() const { return GEOM_HALFSPACE; }
391
393 Vec3f n;
394
396 FCL_REAL d;
397
398 protected:
399
401 void unitNormalTest();
402 };
403
405 class HPP_FCL_DLLAPI Plane : public ShapeBase
406 {
407 public:
409 Plane(const Vec3f& n_, FCL_REAL d_) : ShapeBase(), n(n_), d(d_)
410 {
411 unitNormalTest();
412 }
413
415 Plane(FCL_REAL a, FCL_REAL b, FCL_REAL c, FCL_REAL d_) : ShapeBase(), n(a, b, c), d(d_)
416 {
417 unitNormalTest();
418 }
419
420 Plane() : ShapeBase(), n(1, 0, 0), d(0)
421 {}
422
423 FCL_REAL signedDistance(const Vec3f& p) const
424 {
425 return n.dot(p) - d;
426 }
427
428 FCL_REAL distance(const Vec3f& p) const
429 {
430 return std::abs(n.dot(p) - d);
431 }
432
434 void computeLocalAABB();
435
437 NODE_TYPE getNodeType() const { return GEOM_PLANE; }
438
440 Vec3f n;
441
443 FCL_REAL d;
444
445 protected:
446
448 void unitNormalTest();
449 };
450
451 }
452
453 } // namespace hpp
454
455 #endif
hpp::fcl::TriangleP::c
Vec3f c
Definition: geometric_shapes.h:82
hpp::fcl::ConvexBase
Base for convex polytope.
Definition: geometric_shapes.h:282
data_types.h
hpp::fcl::Plane::Plane
Plane(FCL_REAL a, FCL_REAL b, FCL_REAL c, FCL_REAL d_)
Construct a plane with normal direction and offset.
Definition: geometric_shapes.h:415
hpp::fcl::Plane::Plane
Plane(const Vec3f &n_, FCL_REAL d_)
Construct a plane with normal direction and offset.
Definition: geometric_shapes.h:409
hpp::fcl::Vec3f
Eigen::Matrix< FCL_REAL, 3, 1 > Vec3f
Definition: data_types.h:67
hpp::fcl::GEOM_SPHERE
@ GEOM_SPHERE
Definition: collision_object.h:57
hpp::fcl::Halfspace::distance
FCL_REAL distance(const Vec3f &p) const
Definition: geometric_shapes.h:381
hpp::fcl::Plane::signedDistance
FCL_REAL signedDistance(const Vec3f &p) const
Definition: geometric_shapes.h:423
collision_object.h
hpp::fcl::Sphere
Center at zero point sphere.
Definition: geometric_shapes.h:123
hpp::fcl::Cylinder::radius
FCL_REAL radius
Radius of the cylinder.
Definition: geometric_shapes.h:252
hpp::fcl::Cylinder
Cylinder along Z axis. The cylinder is defined at its centroid.
Definition: geometric_shapes.h:244
hpp::fcl::GEOM_HALFSPACE
@ GEOM_HALFSPACE
Definition: collision_object.h:57
hpp::fcl::Box
Center at zero point, axis aligned box.
Definition: geometric_shapes.h:87
hpp::fcl::ConvexBase::getNodeType
NODE_TYPE getNodeType() const
Get node type: a conex polytope.
Definition: geometric_shapes.h:305
hpp::fcl::ShapeBase::getObjectType
OBJECT_TYPE getObjectType() const
Get object type: a geometric shape.
Definition: geometric_shapes.h:62
hpp::fcl::Box::computeVolume
FCL_REAL computeVolume() const
compute the volume
Definition: geometric_shapes.h:108
hpp::fcl::ConvexBase::~ConvexBase
virtual ~ConvexBase()
hpp::fcl::GEOM_CONVEX
@ GEOM_CONVEX
Definition: collision_object.h:57
hpp::fcl::ConvexBase::Neighbors::count_
unsigned char count_
Definition: geometric_shapes.h:313
hpp::fcl::Capsule::computeVolume
FCL_REAL computeVolume() const
compute the volume
Definition: geometric_shapes.h:174
hpp::fcl::Halfspace::Halfspace
Halfspace(const Vec3f &n_, FCL_REAL d_)
Construct a half space with normal direction and offset.
Definition: geometric_shapes.h:361
hpp::fcl::Cone::radius
FCL_REAL radius
Radius of the cone.
Definition: geometric_shapes.h:208
hpp::fcl::Convex
Convex polytope.
Definition: convex.h:54
hpp::fcl::Halfspace::Halfspace
Halfspace()
Definition: geometric_shapes.h:372
hpp::fcl::TriangleP::computeLocalAABB
void computeLocalAABB()
virtual function of compute AABB in local coordinate
hpp::fcl::ConvexBase::own_storage_
bool own_storage_
Definition: geometric_shapes.h:346
hpp::fcl::Capsule::Capsule
Capsule(FCL_REAL radius_, FCL_REAL lz_)
Definition: geometric_shapes.h:157
hpp::fcl::Halfspace::signedDistance
FCL_REAL signedDistance(const Vec3f &p) const
Definition: geometric_shapes.h:376
hpp::fcl::Cone::halfLength
FCL_REAL halfLength
Half Length along z axis.
Definition: geometric_shapes.h:211
hpp::fcl::Plane::Plane
Plane()
Definition: geometric_shapes.h:420
hpp::fcl::ConvexBase::center
Vec3f center
center of the convex polytope, this is used for collision: center is guaranteed in the internal of th...
Definition: geometric_shapes.h:326
hpp::fcl::ConvexBase::neighbors
Neighbors * neighbors
Definition: geometric_shapes.h:323
hpp::fcl::Cylinder::halfLength
FCL_REAL halfLength
Half Length along z axis.
Definition: geometric_shapes.h:255
hpp::fcl::Halfspace
Half Space: this is equivalent to the Plane in ODE. The separation plane is defined as n * x = d; Poi...
Definition: geometric_shapes.h:358
hpp::fcl::Halfspace::unitNormalTest
void unitNormalTest()
Turn non-unit normal into unit.
hpp::fcl::GEOM_CAPSULE
@ GEOM_CAPSULE
Definition: collision_object.h:57
hpp::fcl::ConvexBase::Neighbors::n_
unsigned int * n_
Definition: geometric_shapes.h:314
hpp::fcl::Sphere::computeLocalAABB
void computeLocalAABB()
Compute AABB.
hpp::fcl::NODE_TYPE
NODE_TYPE
traversal node type: bounding volume (AABB, OBB, RSS, kIOS, OBBRSS, KDOP16, KDOP18,...
Definition: collision_object.h:56
hpp::fcl::Cone::Cone
Cone(FCL_REAL radius_, FCL_REAL lz_)
Definition: geometric_shapes.h:202
hpp::fcl::ConvexBase::nneighbors_
unsigned int * nneighbors_
Definition: geometric_shapes.h:344
hpp::fcl::GEOM_PLANE
@ GEOM_PLANE
Definition: collision_object.h:57
hpp::fcl::Capsule
Capsule It is where is the distance between the point x and the capsule segment AB,...
Definition: geometric_shapes.h:155
hpp::fcl::Box::Box
Box()
Definition: geometric_shapes.h:97
hpp::fcl::Halfspace::n
Vec3f n
Plane normal.
Definition: geometric_shapes.h:393
hpp::fcl::Cone
Cone The base of the cone is at and the top is at .
Definition: geometric_shapes.h:200
hpp::fcl::ConvexBase::num_points
int num_points
Definition: geometric_shapes.h:309
hpp::fcl::FCL_REAL
double FCL_REAL
Definition: data_types.h:66
hpp::fcl::Plane::getNodeType
NODE_TYPE getNodeType() const
Get node type: a plane.
Definition: geometric_shapes.h:437
hpp::fcl::GEOM_CONE
@ GEOM_CONE
Definition: collision_object.h:57
hpp::fcl::OBJECT_TYPE
OBJECT_TYPE
object type: BVH (mesh, points), basic geometry, octree
Definition: collision_object.h:53
hpp::fcl::Cylinder::computeLocalAABB
void computeLocalAABB()
Compute AABB.
hpp::fcl::Halfspace::computeLocalAABB
void computeLocalAABB()
Compute AABB.
hpp::fcl::Capsule::computeLocalAABB
void computeLocalAABB()
Compute AABB.
hpp::fcl::TriangleP::TriangleP
TriangleP(const Vec3f &a_, const Vec3f &b_, const Vec3f &c_)
Definition: geometric_shapes.h:73
hpp::fcl::ConvexBase::Neighbors::count
unsigned char const & count() const
Definition: geometric_shapes.h:316
hpp::fcl::Sphere::computeVolume
FCL_REAL computeVolume() const
compute the volume
Definition: geometric_shapes.h:144
hpp
Main namespace.
Definition: AABB.h:44
hpp::fcl::Cone::computeMomentofInertia
Matrix3f computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: geometric_shapes.h:224
hpp::fcl::OT_GEOM
@ OT_GEOM
Definition: collision_object.h:53
hpp::fcl::Plane::distance
FCL_REAL distance(const Vec3f &p) const
Definition: geometric_shapes.h:428
hpp::fcl::Box::computeLocalAABB
void computeLocalAABB()
Compute AABB.
hpp::fcl::ShapeBase::~ShapeBase
virtual ~ShapeBase()
Definition: geometric_shapes.h:59
hpp::fcl::GEOM_CYLINDER
@ GEOM_CYLINDER
Definition: collision_object.h:57
hpp::fcl::Box::Box
Box(FCL_REAL x, FCL_REAL y, FCL_REAL z)
Definition: geometric_shapes.h:89
hpp::fcl::TriangleP::getNodeType
NODE_TYPE getNodeType() const
get the node type
Definition: geometric_shapes.h:80
hpp::fcl::Box::Box
Box(const Vec3f &side_)
Definition: geometric_shapes.h:93
hpp::fcl::Box::halfSide
Vec3f halfSide
box side half-length
Definition: geometric_shapes.h:100
hpp::fcl::Sphere::Sphere
Sphere(FCL_REAL radius_)
Definition: geometric_shapes.h:125
hpp::fcl::Capsule::getNodeType
NODE_TYPE getNodeType() const
Get node type: a capsule.
Definition: geometric_shapes.h:172
hpp::fcl::Cone::getNodeType
NODE_TYPE getNodeType() const
Get node type: a cone.
Definition: geometric_shapes.h:217
hpp::fcl::Cone::computeLocalAABB
void computeLocalAABB()
Compute AABB.
hpp::fcl::Matrix3f
Eigen::Matrix< FCL_REAL, 3, 3 > Matrix3f
Definition: data_types.h:68
hpp::fcl::ConvexBase::points
Vec3f * points
An array of the points of the polygon.
Definition: geometric_shapes.h:308
hpp::fcl::Halfspace::d
FCL_REAL d
Plane offset.
Definition: geometric_shapes.h:396
hpp::fcl::Cone::computeVolume
FCL_REAL computeVolume() const
compute the volume
Definition: geometric_shapes.h:219
hpp::fcl::Plane
Infinite plane.
Definition: geometric_shapes.h:406
hpp::fcl::CollisionGeometry
The geometry for the object for collision or distance computation.
Definition: collision_object.h:64
hpp::fcl::Cylinder::Cylinder
Cylinder(FCL_REAL radius_, FCL_REAL lz_)
Definition: geometric_shapes.h:246
hpp::fcl::GEOM_BOX
@ GEOM_BOX
Definition: collision_object.h:57
hpp::fcl::Plane::n
Vec3f n
Plane normal.
Definition: geometric_shapes.h:440
hpp::fcl::ConvexBase::Neighbors
Definition: geometric_shapes.h:312
hpp::fcl::Cylinder::getNodeType
NODE_TYPE getNodeType() const
Get node type: a cylinder.
Definition: geometric_shapes.h:261
hpp::fcl::ConvexBase::convexHull
static ConvexBase * convexHull(const Vec3f *points, int num_points, bool keepTriangles, const char *qhullCommand=NULL)
Build a convex hull based on Qhull library and store the vertices and optionally the triangles.
hpp::fcl::ConvexBase::computeLocalAABB
void computeLocalAABB()
Compute AABB.
hpp::fcl::GEOM_TRIANGLE
@ GEOM_TRIANGLE
Definition: collision_object.h:57
hpp::fcl::ConvexBase::ConvexBase
ConvexBase()
Construct an uninitialized convex object Initialization is done with ConvexBase::initialize.
Definition: geometric_shapes.h:331
hpp::fcl::Sphere::getNodeType
NODE_TYPE getNodeType() const
Get node type: a sphere.
Definition: geometric_shapes.h:136
hpp::fcl::ConvexBase::ConvexBase
ConvexBase(const ConvexBase &other)
Copy constructor Only the list of neighbors is copied.
hpp::fcl::Plane::unitNormalTest
void unitNormalTest()
Turn non-unit normal into unit.
hpp::fcl::Sphere::computeMomentofInertia
Matrix3f computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: geometric_shapes.h:138
hpp::fcl::Cylinder::computeMomentofInertia
Matrix3f computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: geometric_shapes.h:268
hpp::fcl::Capsule::radius
FCL_REAL radius
Radius of capsule.
Definition: geometric_shapes.h:163
hpp::fcl::Cone::computeCOM
Vec3f computeCOM() const
compute center of mass
Definition: geometric_shapes.h:235
hpp::fcl::Box::getNodeType
NODE_TYPE getNodeType() const
Get node type: a box.
Definition: geometric_shapes.h:106
hpp::fcl::Capsule::halfLength
FCL_REAL halfLength
Half Length along z axis.
Definition: geometric_shapes.h:166
hpp::fcl::ShapeBase::ShapeBase
ShapeBase()
Definition: geometric_shapes.h:57
hpp::fcl::ConvexBase::initialize
void initialize(bool ownStorage, Vec3f *points_, int num_points_)
Initialize the points of the convex shape This also initializes the ConvexBase::center.
hpp::fcl::Halfspace::Halfspace
Halfspace(FCL_REAL a, FCL_REAL b, FCL_REAL c, FCL_REAL d_)
Construct a plane with normal direction and offset.
Definition: geometric_shapes.h:367
hpp::fcl::Sphere::radius
FCL_REAL radius
Radius of the sphere.
Definition: geometric_shapes.h:130
hpp::fcl::TriangleP
Triangle stores the points instead of only indices of points.
Definition: geometric_shapes.h:71
hpp::fcl::Cylinder::computeVolume
FCL_REAL computeVolume() const
compute the volume
Definition: geometric_shapes.h:263
hpp::fcl::ShapeBase
Base class for all basic geometric shapes.
Definition: geometric_shapes.h:55
hpp::fcl::Halfspace::getNodeType
NODE_TYPE getNodeType() const
Get node type: a half space.
Definition: geometric_shapes.h:390
hpp::fcl::Capsule::computeMomentofInertia
Matrix3f computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: geometric_shapes.h:179
hpp::fcl::Plane::computeLocalAABB
void computeLocalAABB()
Compute AABB.
hpp::fcl::Box::computeMomentofInertia
Matrix3f computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: geometric_shapes.h:113
hpp::fcl::Plane::d
FCL_REAL d
Plane offset.
Definition: geometric_shapes.h:443