38 #ifndef HPP_FCL_GEOMETRIC_SHAPES_H
39 #define HPP_FCL_GEOMETRIC_SHAPES_H
44 #include <boost/math/constants/constants.hpp>
49 #ifdef HPP_FCL_HAS_QHULL
66 m_swept_sphere_radius(other.m_swept_sphere_radius) {}
80 std::invalid_argument);
82 this->m_swept_sphere_radius = radius;
117 :
ShapeBase(other), a(other.a), b(other.b), c(other.c) {}
152 if (other_ptr ==
nullptr)
return false;
155 return a == other.
a && b == other.
b && c == other.
c &&
160 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
167 :
ShapeBase(), halfSide(x / 2, y / 2, z / 2) {}
174 if (
this == &other)
return *
this;
199 Vec3f s(halfSide.cwiseAbs2() * V);
200 return (
Vec3f(s[1] + s[2], s[0] + s[2], s[0] + s[1]) / 3).asDiagonal();
214 if (value <= minInflationValue())
216 <<
"is two small. It should be at least: "
217 << minInflationValue(),
218 std::invalid_argument);
219 return std::make_pair(
Box(2 * (halfSide + Vec3f::Constant(value))),
225 const Box* other_ptr =
dynamic_cast<const Box*
>(&_other);
226 if (other_ptr ==
nullptr)
return false;
227 const Box& other = *other_ptr;
229 return halfSide == other.
halfSide &&
234 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
260 FCL_REAL I = 0.4 * radius * radius * computeVolume();
261 return I * Matrix3f::Identity();
265 return 4 * boost::math::constants::pi<FCL_REAL>() * radius * radius *
280 if (value <= minInflationValue())
282 "value (" << value <<
") is two small. It should be at least: "
283 << minInflationValue(),
284 std::invalid_argument);
290 const Sphere* other_ptr =
dynamic_cast<const Sphere*
>(&_other);
291 if (other_ptr ==
nullptr)
return false;
292 const Sphere& other = *other_ptr;
294 return radius == other.
radius &&
299 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
330 FCL_REAL a2 = V * radii[0] * radii[0];
331 FCL_REAL b2 = V * radii[1] * radii[1];
332 FCL_REAL c2 = V * radii[2] * radii[2];
333 return (
Matrix3f() << 0.2 * (b2 + c2), 0, 0, 0, 0.2 * (a2 + c2), 0, 0, 0,
339 return 4 * boost::math::constants::pi<FCL_REAL>() * radii[0] * radii[1] *
354 if (value <= minInflationValue())
356 "value (" << value <<
") is two small. It should be at least: "
357 << minInflationValue(),
358 std::invalid_argument);
359 return std::make_pair(
Ellipsoid(radii + Vec3f::Constant(value)),
366 if (other_ptr ==
nullptr)
return false;
369 return radii == other.
radii &&
374 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
387 halfLength = lz_ / 2;
391 :
ShapeBase(other), radius(other.radius), halfLength(other.halfLength) {}
409 return boost::math::constants::pi<FCL_REAL>() * radius * radius *
410 ((halfLength * 2) + radius * 4 / 3.0);
414 FCL_REAL v_cyl = radius * radius * (halfLength * 2) *
415 boost::math::constants::pi<FCL_REAL>();
416 FCL_REAL v_sph = radius * radius * radius *
417 boost::math::constants::pi<FCL_REAL>() * 4 / 3.0;
419 FCL_REAL h2 = halfLength * halfLength;
421 FCL_REAL ix = v_cyl * (h2 / 3. + r2 / 4.) +
422 v_sph * (0.4 * r2 + h2 + 0.75 * radius * halfLength);
423 FCL_REAL iz = (0.5 * v_cyl + 0.4 * v_sph) * radius * radius;
425 return (
Matrix3f() << ix, 0, 0, 0, ix, 0, 0, 0, iz).finished();
439 if (value <= minInflationValue())
441 "value (" << value <<
") is two small. It should be at least: "
442 << minInflationValue(),
443 std::invalid_argument);
444 return std::make_pair(
Capsule(radius + value, 2 * halfLength),
451 if (other_ptr ==
nullptr)
return false;
452 const Capsule& other = *other_ptr;
459 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
471 halfLength = lz_ / 2;
475 :
ShapeBase(other), radius(other.radius), halfLength(other.halfLength) {}
493 return boost::math::constants::pi<FCL_REAL>() * radius * radius *
494 (halfLength * 2) / 3;
500 V * (0.4 * halfLength * halfLength + 3 * radius * radius / 20);
501 FCL_REAL iz = 0.3 * V * radius * radius;
503 return (
Matrix3f() << ix, 0, 0, 0, ix, 0, 0, 0, iz).finished();
519 if (value <= minInflationValue())
521 "value (" << value <<
") is two small. It should be at least: "
522 << minInflationValue(),
523 std::invalid_argument);
526 const FCL_REAL tan_alpha = 2 * halfLength / radius;
527 const FCL_REAL sin_alpha = tan_alpha / std::sqrt(1 + tan_alpha * tan_alpha);
528 const FCL_REAL top_inflation = value / sin_alpha;
529 const FCL_REAL bottom_inflation = value;
531 const FCL_REAL new_lz = 2 * halfLength + top_inflation + bottom_inflation;
532 const FCL_REAL new_cz = (top_inflation + bottom_inflation) / 2.;
533 const FCL_REAL new_radius = new_lz / tan_alpha;
535 return std::make_pair(
Cone(new_radius, new_lz),
541 const Cone* other_ptr =
dynamic_cast<const Cone*
>(&_other);
542 if (other_ptr ==
nullptr)
return false;
543 const Cone& other = *other_ptr;
550 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
561 halfLength = lz_ / 2;
565 :
ShapeBase(other), radius(other.radius), halfLength(other.halfLength) {}
568 if (
this == &other)
return *
this;
570 this->radius = other.
radius;
591 return boost::math::constants::pi<FCL_REAL>() * radius * radius *
597 FCL_REAL ix = V * (radius * radius / 4 + halfLength * halfLength / 3);
598 FCL_REAL iz = V * radius * radius / 2;
599 return (
Matrix3f() << ix, 0, 0, 0, ix, 0, 0, 0, iz).finished();
613 if (value <= minInflationValue())
615 "value (" << value <<
") is two small. It should be at least: "
616 << minInflationValue(),
617 std::invalid_argument);
618 return std::make_pair(
Cylinder(radius + value, 2 * (halfLength + value)),
625 if (other_ptr ==
nullptr)
return false;
633 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
653 unsigned int num_points,
bool keepTriangles,
654 const char* qhullCommand = NULL);
658 const Vec3f* points,
unsigned int num_points,
bool keepTriangles,
659 const char* qhullCommand = NULL);
674 #ifdef HPP_FCL_HAS_QHULL
677 void buildDoubleDescription();
684 unsigned char const&
count()
const {
return count_; }
695 if (count_ != other.
count_)
return false;
697 for (
int i = 0; i < count_; ++i) {
698 if (n_[i] != other.
n_[i])
return false;
709 static constexpr
size_t num_vertices_large_convex_threshold = 32;
712 std::shared_ptr<std::vector<Vec3f>>
points;
747 static constexpr
size_t num_support_warm_starts = 14;
758 num_normals_and_offsets(0),
759 center(
Vec3f::Zero()) {}
768 unsigned int num_points_);
775 void set(std::shared_ptr<std::vector<Vec3f>> points_,
776 unsigned int num_points_);
782 #ifdef HPP_FCL_HAS_QHULL
783 void buildDoubleDescriptionFromQHullResult(
const orgQhull::Qhull& qh);
797 void computeCenter();
801 if (other_ptr ==
nullptr)
return false;
804 if (num_points != other.
num_points)
return false;
806 if ((!(points.get()) && other.
points.get()) ||
807 (points.get() && !(other.
points.get())))
809 if (points.get() && other.
points.get()) {
810 const std::vector<Vec3f>& points_ = *points;
811 const std::vector<Vec3f>& other_points_ = *(other.
points);
812 for (
unsigned int i = 0; i < num_points; ++i) {
813 if (points_[i] != (other_points_)[i])
return false;
817 if ((!(neighbors.get()) && other.
neighbors.get()) ||
818 (neighbors.get() && !(other.
neighbors.get())))
820 if (neighbors.get() && other.
neighbors.get()) {
821 const std::vector<Neighbors>& neighbors_ = *neighbors;
822 const std::vector<Neighbors>& other_neighbors_ = *(other.
neighbors);
823 for (
unsigned int i = 0; i < num_points; ++i) {
824 if (neighbors_[i] != other_neighbors_[i])
return false;
828 if ((!(normals.get()) && other.
normals.get()) ||
829 (normals.get() && !(other.
normals.get())))
831 if (normals.get() && other.
normals.get()) {
832 const std::vector<Vec3f>& normals_ = *normals;
833 const std::vector<Vec3f>& other_normals_ = *(other.
normals);
834 for (
unsigned int i = 0; i < num_normals_and_offsets; ++i) {
835 if (normals_[i] != other_normals_[i])
return false;
839 if ((!(offsets.get()) && other.
offsets.get()) ||
840 (offsets.get() && !(other.
offsets.get())))
842 if (offsets.get() && other.
offsets.get()) {
843 const std::vector<double>& offsets_ = *offsets;
844 const std::vector<double>& other_offsets_ = *(other.
offsets);
845 for (
unsigned int i = 0; i < num_normals_and_offsets; ++i) {
846 if (offsets_[i] != other_offsets_[i])
return false;
850 if (this->support_warm_starts.
points.size() !=
852 this->support_warm_starts.
indices.size() !=
857 for (
size_t i = 0; i < this->support_warm_starts.
points.size(); ++i) {
858 if (this->support_warm_starts.
points[i] !=
860 this->support_warm_starts.indices[i] !=
866 return center == other.
center &&
871 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
874 template <
typename PolygonT>
901 :
ShapeBase(other), n(other.n), d(other.d) {}
914 return n.dot(p) - (d + this->getSweptSphereRadius());
918 return std::abs(this->signedDistance(p));
928 return std::numeric_limits<FCL_REAL>::lowest();
940 if (value <= minInflationValue())
942 "value (" << value <<
") is two small. It should be at least: "
943 << minInflationValue(),
944 std::invalid_argument);
961 if (other_ptr ==
nullptr)
return false;
964 return n == other.
n && d == other.
d &&
969 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1004 const FCL_REAL dist = n.dot(p) - d;
1006 std::abs(n.dot(p) - d) - this->getSweptSphereRadius();
1010 if (signed_dist >= 0) {
1011 return -signed_dist;
1017 return std::abs(std::abs(n.dot(p) - d) - this->getSweptSphereRadius());
1038 const Plane* other_ptr =
dynamic_cast<const Plane*
>(&_other);
1039 if (other_ptr ==
nullptr)
return false;
1040 const Plane& other = *other_ptr;
1042 return n == other.
n && d == other.
d &&
1047 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Center at zero point, axis aligned box.
Definition: geometric_shapes.h:164
Capsule It is where is the distance between the point x and the capsule segment AB,...
Definition: geometric_shapes.h:381
The geometry for the object for collision or distance computation.
Definition: collision_object.h:95
Cone The base of the cone is at and the top is at .
Definition: geometric_shapes.h:465
Base for convex polytope.
Definition: geometric_shapes.h:638
Cylinder along Z axis. The cylinder is defined at its centroid.
Definition: geometric_shapes.h:555
Ellipsoid centered at point zero.
Definition: geometric_shapes.h:303
Half Space: this is equivalent to the Plane in ODE. A Half space has a priviledged direction: the dir...
Definition: geometric_shapes.h:885
Infinite plane. A plane can be viewed as two half spaces; it has no priviledged direction....
Definition: geometric_shapes.h:976
Base class for all basic geometric shapes.
Definition: geometric_shapes.h:59
Center at zero point sphere.
Definition: geometric_shapes.h:238
Triangle stores the points instead of only indices of points.
Definition: geometric_shapes.h:109
#define HPP_FCL_DLLAPI
Definition: config.hh:88
#define HPP_FCL_DEPRECATED
Definition: deprecated.hh:37
#define HPP_FCL_THROW_PRETTY(message, exception)
Definition: fwd.hh:64
@ OT_GEOM
Definition: collision_object.h:56
@ GEOM_TRIANGLE
Definition: collision_object.h:83
@ GEOM_CAPSULE
Definition: collision_object.h:77
@ GEOM_PLANE
Definition: collision_object.h:81
@ GEOM_HALFSPACE
Definition: collision_object.h:82
@ GEOM_ELLIPSOID
Definition: collision_object.h:85
@ GEOM_BOX
Definition: collision_object.h:75
@ GEOM_CONVEX
Definition: collision_object.h:80
@ GEOM_CYLINDER
Definition: collision_object.h:79
@ GEOM_SPHERE
Definition: collision_object.h:76
@ GEOM_CONE
Definition: collision_object.h:78
FCL_REAL computeVolume() const
compute the volume
Definition: geometric_shapes.h:492
void computeLocalAABB()
Compute AABB.
Vec3f c
Definition: geometric_shapes.h:147
void computeLocalAABB()
Compute AABB.
Plane(const Vec3f &n_, FCL_REAL d_)
Construct a plane with normal direction and offset.
Definition: geometric_shapes.h:979
FCL_REAL halfLength
Half Length along z axis.
Definition: geometric_shapes.h:400
ShapeBase()
Definition: geometric_shapes.h:61
FCL_REAL getSweptSphereRadius() const
Get radius of sphere swept around the shape. This radius is always >= 0.
Definition: geometric_shapes.h:87
std::shared_ptr< std::vector< Vec3f > > normals
An array of the normals of the polygon.
Definition: geometric_shapes.h:716
virtual Plane * clone() const
Clone *this into a new Plane.
Definition: geometric_shapes.h:1001
Capsule(const Capsule &other)
Definition: geometric_shapes.h:390
FCL_REAL computeVolume() const
compute the volume
Definition: geometric_shapes.h:195
FCL_REAL minInflationValue() const
Definition: geometric_shapes.h:927
NODE_TYPE getNodeType() const
Get node type: a plane.
Definition: geometric_shapes.h:1024
FCL_REAL computeVolume() const
compute the volume
Definition: geometric_shapes.h:590
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:893
Sphere(const Sphere &other)
Definition: geometric_shapes.h:245
unsigned int const & operator[](int i) const
Definition: geometric_shapes.h:689
Halfspace(const Halfspace &other)
Definition: geometric_shapes.h:900
ConvexBase()
Construct an uninitialized convex object Initialization is done with ConvexBase::initialize.
Definition: geometric_shapes.h:755
Halfspace()
Definition: geometric_shapes.h:898
NODE_TYPE getNodeType() const
Get node type: a convex polytope.
Definition: geometric_shapes.h:672
FCL_REAL distance(const Vec3f &p) const
Definition: geometric_shapes.h:917
std::shared_ptr< std::vector< Neighbors > > neighbors
Neighbors of each vertex. It is an array of size num_points. For each vertex, it contains the number ...
Definition: geometric_shapes.h:725
void unitNormalTest()
Turn non-unit normal into unit.
ShapeBase(const ShapeBase &other)
 
Definition: geometric_shapes.h:64
NODE_TYPE getNodeType() const
Get node type: an ellipsoid.
Definition: geometric_shapes.h:326
NODE_TYPE getNodeType() const
Get node type: a capsule.
Definition: geometric_shapes.h:406
Box(FCL_REAL x, FCL_REAL y, FCL_REAL z)
Definition: geometric_shapes.h:166
Matrix3f computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: geometric_shapes.h:497
TriangleP(const Vec3f &a_, const Vec3f &b_, const Vec3f &c_)
Definition: geometric_shapes.h:113
Halfspace(const Vec3f &n_, FCL_REAL d_)
Construct a half space with normal direction and offset.
Definition: geometric_shapes.h:888
Ellipsoid(const Vec3f &radii)
Definition: geometric_shapes.h:311
void set(std::shared_ptr< std::vector< Vec3f >> points_, unsigned int num_points_)
Set the points of the convex shape.
void computeLocalAABB()
Compute AABB.
Matrix3f computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: geometric_shapes.h:595
void computeLocalAABB()
Compute AABB.
Cylinder(const Cylinder &other)
Definition: geometric_shapes.h:564
Ellipsoid(const Ellipsoid &other)
Definition: geometric_shapes.h:313
virtual Halfspace * clone() const
Clone *this into a new Halfspace.
Definition: geometric_shapes.h:911
std::vector< int > indices
Indices of the support points warm starts. These are the indices of the real convex,...
Definition: geometric_shapes.h:743
Vec3f a
Definition: geometric_shapes.h:147
FCL_REAL computeVolume() const
compute the volume
Definition: geometric_shapes.h:408
virtual Cylinder * clone() const
Clone *this into a new Cylinder.
Definition: geometric_shapes.h:576
unsigned int num_normals_and_offsets
Definition: geometric_shapes.h:720
std::pair< Cone, Transform3f > inflated(const FCL_REAL value) const
Inflate the cone by an amount given by value. This value can be positive or negative but must always ...
Definition: geometric_shapes.h:518
FCL_REAL halfLength
Half Length along z axis.
Definition: geometric_shapes.h:582
std::pair< Box, Transform3f > inflated(const FCL_REAL value) const
Inflate the box by an amount given by value. This value can be positive or negative but must always >...
Definition: geometric_shapes.h:213
Vec3f n
Plane normal.
Definition: geometric_shapes.h:1027
void computeLocalAABB()
Compute AABB.
std::pair< Ellipsoid, Transform3f > inflated(const FCL_REAL value) const
Inflate the ellipsoid by an amount given by value. This value can be positive or negative but must al...
Definition: geometric_shapes.h:353
void unitNormalTest()
Turn non-unit normal into unit.
Halfspace & operator=(const Halfspace &other)
operator =
Definition: geometric_shapes.h:904
NODE_TYPE getNodeType() const
get the node type
Definition: geometric_shapes.h:125
FCL_REAL radius
Radius of capsule.
Definition: geometric_shapes.h:394
void computeLocalAABB()
virtual function of compute AABB in local coordinate
virtual ~ShapeBase()
Definition: geometric_shapes.h:70
unsigned char const & count() const
Definition: geometric_shapes.h:684
Matrix3f computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: geometric_shapes.h:197
Box(const Vec3f &side_)
Definition: geometric_shapes.h:169
TriangleP()
Definition: geometric_shapes.h:111
FCL_REAL minInflationValue() const
Definition: geometric_shapes.h:508
NODE_TYPE getNodeType() const
Get node type: a half space.
Definition: geometric_shapes.h:925
std::pair< Capsule, Transform3f > inflated(const FCL_REAL value) const
Inflate the capsule by an amount given by value. This value can be positive or negative but must alwa...
Definition: geometric_shapes.h:438
virtual Box * clone() const
Clone *this into a new Box.
Definition: geometric_shapes.h:181
Plane(const Plane &other)
Definition: geometric_shapes.h:991
Cylinder(FCL_REAL radius_, FCL_REAL lz_)
Definition: geometric_shapes.h:560
Vec3f n
Plane normal.
Definition: geometric_shapes.h:949
Cylinder()
Default constructor.
Definition: geometric_shapes.h:558
Plane()
Definition: geometric_shapes.h:989
FCL_REAL halfLength
Half Length along z axis.
Definition: geometric_shapes.h:484
bool operator!=(const Neighbors &other) const
Definition: geometric_shapes.h:704
Ellipsoid()
Default constructor.
Definition: geometric_shapes.h:306
bool operator==(const Neighbors &other) const
Definition: geometric_shapes.h:694
unsigned int * n_
Definition: geometric_shapes.h:682
FCL_REAL signedDistance(const Vec3f &p) const
Definition: geometric_shapes.h:913
unsigned int num_points
Definition: geometric_shapes.h:713
Cylinder & operator=(const Cylinder &other)
Definition: geometric_shapes.h:567
void computeLocalAABB()
Compute AABB.
FCL_REAL distance(const Vec3f &p) const
Definition: geometric_shapes.h:1016
FCL_REAL d
Plane offset.
Definition: geometric_shapes.h:1030
Vec3f computeCOM() const
compute center of mass
Definition: geometric_shapes.h:506
FCL_REAL radius
Radius of the sphere.
Definition: geometric_shapes.h:248
virtual Sphere * clone() const
Clone *this into a new Sphere.
Definition: geometric_shapes.h:248
FCL_REAL signedDistance(const Vec3f &p) const
Definition: geometric_shapes.h:1003
Sphere()
Default constructor.
Definition: geometric_shapes.h:241
Plane & operator=(const Plane &other)
operator =
Definition: geometric_shapes.h:994
Vec3f halfSide
box side half-length
Definition: geometric_shapes.h:187
virtual TriangleP * clone() const
Clone *this into a new TriangleP.
Definition: geometric_shapes.h:120
Vec3f center
center of the convex polytope, this is used for collision: center is guaranteed in the internal of th...
Definition: geometric_shapes.h:729
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:984
Box & operator=(const Box &other)
Definition: geometric_shapes.h:173
virtual Ellipsoid * clone() const
Clone *this into a new Ellipsoid.
Definition: geometric_shapes.h:316
void buildSupportWarmStart()
Build the support points warm starts.
std::pair< Cylinder, Transform3f > inflated(const FCL_REAL value) const
Inflate the cylinder by an amount given by value. This value can be positive or negative but must alw...
Definition: geometric_shapes.h:612
FCL_REAL minInflationValue() const
Definition: geometric_shapes.h:428
TriangleP(const TriangleP &other)
Definition: geometric_shapes.h:116
void computeLocalAABB()
Compute AABB.
Sphere(FCL_REAL radius_)
Definition: geometric_shapes.h:243
FCL_REAL radius
Radius of the cone.
Definition: geometric_shapes.h:478
Capsule()
Default constructor.
Definition: geometric_shapes.h:384
Cone()
Default constructor.
Definition: geometric_shapes.h:468
static ConvexBase * convexHull(std::shared_ptr< std::vector< Vec3f >> &points, unsigned 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.
ConvexBase(const ConvexBase &other)
Copy constructor Only the list of neighbors is copied.
FCL_REAL computeVolume() const
compute the volume
Definition: geometric_shapes.h:264
Matrix3f computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: geometric_shapes.h:413
FCL_REAL radius
Radius of the cylinder.
Definition: geometric_shapes.h:576
Box()
Default constructor.
Definition: geometric_shapes.h:184
static ConvexBase * convexHull(const Vec3f *points, unsigned int num_points, bool keepTriangles, const char *qhullCommand=NULL)
NODE_TYPE getNodeType() const
Get node type: a box.
Definition: geometric_shapes.h:193
Ellipsoid(FCL_REAL rx, FCL_REAL ry, FCL_REAL rz)
Definition: geometric_shapes.h:308
Cone(const Cone &other)
Definition: geometric_shapes.h:474
std::shared_ptr< std::vector< double > > offsets
An array of the offsets to the normals of the polygon. Note: there are as many offsets as normals.
Definition: geometric_shapes.h:719
SupportWarmStartPolytope support_warm_starts
Support warm start polytopes.
Definition: geometric_shapes.h:750
std::pair< Halfspace, Transform3f > inflated(const FCL_REAL value) const
Inflate the halfspace by an amount given by value. This value can be positive or negative but must al...
Definition: geometric_shapes.h:939
virtual Capsule * clone() const
Clone *this into a new Capsule.
Definition: geometric_shapes.h:394
virtual Cone * clone() const
Clone *this into a new Cone.
Definition: geometric_shapes.h:478
void setSweptSphereRadius(FCL_REAL radius)
Set radius of sphere swept around the shape. Must be >= 0.
Definition: geometric_shapes.h:77
ShapeBase & operator=(const ShapeBase &other)=default
FCL_REAL minInflationValue() const
Definition: geometric_shapes.h:203
virtual ConvexBase * clone() const
Clone (deep copy). This method is consistent with BVHModel clone method. The copy constructor is call...
Definition: geometric_shapes.h:666
Vec3f b
Definition: geometric_shapes.h:147
Cone(FCL_REAL radius_, FCL_REAL lz_)
Definition: geometric_shapes.h:470
Matrix3f computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: geometric_shapes.h:328
FCL_REAL minInflationValue() const
Definition: geometric_shapes.h:602
std::shared_ptr< std::vector< unsigned int > > nneighbors_
Array of indices of the neighbors of each vertex. Since we don't know a priori the number of neighbor...
Definition: geometric_shapes.h:794
Capsule(FCL_REAL radius_, FCL_REAL lz_)
Definition: geometric_shapes.h:386
void computeLocalAABB()
Compute AABB.
OBJECT_TYPE getObjectType() const
Get object type: a geometric shape.
Definition: geometric_shapes.h:73
std::shared_ptr< std::vector< Vec3f > > points
An array of the points of the polygon.
Definition: geometric_shapes.h:712
void initialize(std::shared_ptr< std::vector< Vec3f >> points_, unsigned int num_points_)
Initialize the points of the convex shape This also initializes the ConvexBase::center.
NODE_TYPE getNodeType() const
Get node type: a cone.
Definition: geometric_shapes.h:490
FCL_REAL minInflationValue() const
Definition: geometric_shapes.h:269
Matrix3f computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: geometric_shapes.h:259
NODE_TYPE getNodeType() const
Get node type: a cylinder.
Definition: geometric_shapes.h:588
Vec3f radii
Radii of the Ellipsoid (such that on boundary: x^2/rx^2 + y^2/ry^2.
Definition: geometric_shapes.h:316
unsigned int & operator[](int i)
Definition: geometric_shapes.h:685
NODE_TYPE getNodeType() const
Get node type: a sphere.
Definition: geometric_shapes.h:257
void computeLocalAABB()
Compute AABB.
FCL_REAL computeVolume() const
compute the volume
Definition: geometric_shapes.h:338
std::vector< Vec3f > points
Array of support points to warm start the support function computation.
Definition: geometric_shapes.h:738
std::pair< Sphere, Transform3f > inflated(const FCL_REAL value) const
Inflate the sphere by an amount given by value. This value can be positive or negative but must alway...
Definition: geometric_shapes.h:279
FCL_REAL minInflationValue() const
Definition: geometric_shapes.h:343
FCL_REAL d
Plane offset.
Definition: geometric_shapes.h:952
Box(const Box &other)
Definition: geometric_shapes.h:171
unsigned char count_
Definition: geometric_shapes.h:681
Eigen::Matrix< FCL_REAL, 3, 3 > Matrix3f
Definition: data_types.h:71
Eigen::Matrix< FCL_REAL, 3, 1 > Vec3f
Definition: data_types.h:67
OBJECT_TYPE
object type: BVH (mesh, points), basic geometry, octree
Definition: collision_object.h:53
NODE_TYPE
traversal node type: bounding volume (AABB, OBB, RSS, kIOS, OBBRSS, KDOP16, KDOP18,...
Definition: collision_object.h:65
bool isEqual(const Eigen::MatrixBase< Derived > &lhs, const Eigen::MatrixBase< OtherDerived > &rhs, const FCL_REAL tol=std::numeric_limits< FCL_REAL >::epsilon() *100)
Definition: tools.h:205
double FCL_REAL
Definition: data_types.h:66
Main namespace.
Definition: broadphase_bruteforce.h:44
Definition: geometric_shapes.h:680
The support warm start polytope contains certain points of this which are support points in specific ...
Definition: geometric_shapes.h:735