38 #ifndef COAL_GEOMETRIC_SHAPES_H
39 #define COAL_GEOMETRIC_SHAPES_H
44 #include <boost/math/constants/constants.hpp>
65 m_swept_sphere_radius(other.m_swept_sphere_radius) {}
79 std::invalid_argument);
81 this->m_swept_sphere_radius = radius;
87 return this->m_swept_sphere_radius;
118 :
ShapeBase(other), a(other.a), b(other.b), c(other.c) {}
154 if (other_ptr ==
nullptr)
return false;
157 return a == other.
a && b == other.
b && c == other.
c &&
162 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
169 :
ShapeBase(), halfSide(x / 2, y / 2, z / 2) {}
176 if (
this == &other)
return *
this;
201 Vec3s s(halfSide.cwiseAbs2() * V);
202 return (
Vec3s(s[1] + s[2], s[0] + s[2], s[0] + s[1]) / 3).asDiagonal();
216 if (value <= minInflationValue())
218 <<
"is two small. It should be at least: "
219 << minInflationValue(),
220 std::invalid_argument);
221 return std::make_pair(
Box(2 * (halfSide + Vec3s::Constant(value))),
227 const Box* other_ptr =
dynamic_cast<const Box*
>(&_other);
228 if (other_ptr ==
nullptr)
return false;
229 const Box& other = *other_ptr;
231 return halfSide == other.
halfSide &&
236 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
262 CoalScalar I = 0.4 * radius * radius * computeVolume();
263 return I * Matrix3s::Identity();
267 return 4 * boost::math::constants::pi<CoalScalar>() * radius * radius *
282 if (value <= minInflationValue())
284 <<
") is two small. It should be at least: "
285 << minInflationValue(),
286 std::invalid_argument);
292 const Sphere* other_ptr =
dynamic_cast<const Sphere*
>(&_other);
293 if (other_ptr ==
nullptr)
return false;
294 const Sphere& other = *other_ptr;
296 return radius == other.
radius &&
301 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
335 return (
Matrix3s() << 0.2 * (b2 + c2), 0, 0, 0, 0.2 * (a2 + c2), 0, 0, 0,
341 return 4 * boost::math::constants::pi<CoalScalar>() * radii[0] * radii[1] *
356 if (value <= minInflationValue())
358 <<
") is two small. It should be at least: "
359 << minInflationValue(),
360 std::invalid_argument);
361 return std::make_pair(
Ellipsoid(radii + Vec3s::Constant(value)),
368 if (other_ptr ==
nullptr)
return false;
371 return radii == other.
radii &&
376 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
389 halfLength = lz_ / 2;
393 :
ShapeBase(other), radius(other.radius), halfLength(other.halfLength) {}
411 return boost::math::constants::pi<CoalScalar>() * radius * radius *
412 ((halfLength * 2) + radius * 4 / 3.0);
416 CoalScalar v_cyl = radius * radius * (halfLength * 2) *
417 boost::math::constants::pi<CoalScalar>();
419 boost::math::constants::pi<CoalScalar>() * 4 / 3.0;
424 v_sph * (0.4 * r2 + h2 + 0.75 * radius * halfLength);
425 CoalScalar iz = (0.5 * v_cyl + 0.4 * v_sph) * radius * radius;
427 return (
Matrix3s() << ix, 0, 0, 0, ix, 0, 0, 0, iz).finished();
441 if (value <= minInflationValue())
443 <<
") is two small. It should be at least: "
444 << minInflationValue(),
445 std::invalid_argument);
446 return std::make_pair(
Capsule(radius + value, 2 * halfLength),
453 if (other_ptr ==
nullptr)
return false;
454 const Capsule& other = *other_ptr;
461 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
473 halfLength = lz_ / 2;
477 :
ShapeBase(other), radius(other.radius), halfLength(other.halfLength) {}
495 return boost::math::constants::pi<CoalScalar>() * radius * radius *
496 (halfLength * 2) / 3;
502 V * (0.4 * halfLength * halfLength + 3 * radius * radius / 20);
505 return (
Matrix3s() << ix, 0, 0, 0, ix, 0, 0, 0, iz).finished();
511 return -(std::min)(radius, halfLength);
523 if (value <= minInflationValue())
525 <<
") is two small. It should be at least: "
526 << minInflationValue(),
527 std::invalid_argument);
530 const CoalScalar tan_alpha = 2 * halfLength / radius;
532 tan_alpha / std::sqrt(1 + tan_alpha * tan_alpha);
533 const CoalScalar top_inflation = value / sin_alpha;
536 const CoalScalar new_lz = 2 * halfLength + top_inflation + bottom_inflation;
537 const CoalScalar new_cz = (top_inflation + bottom_inflation) / 2.;
538 const CoalScalar new_radius = new_lz / tan_alpha;
540 return std::make_pair(
Cone(new_radius, new_lz),
546 const Cone* other_ptr =
dynamic_cast<const Cone*
>(&_other);
547 if (other_ptr ==
nullptr)
return false;
548 const Cone& other = *other_ptr;
555 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
566 halfLength = lz_ / 2;
570 :
ShapeBase(other), radius(other.radius), halfLength(other.halfLength) {}
573 if (
this == &other)
return *
this;
575 this->radius = other.
radius;
596 return boost::math::constants::pi<CoalScalar>() * radius * radius *
602 CoalScalar ix = V * (radius * radius / 4 + halfLength * halfLength / 3);
604 return (
Matrix3s() << ix, 0, 0, 0, ix, 0, 0, 0, iz).finished();
608 return -(std::min)(radius, halfLength);
620 if (value <= minInflationValue())
622 <<
") is two small. It should be at least: "
623 << minInflationValue(),
624 std::invalid_argument);
625 return std::make_pair(
Cylinder(radius + value, 2 * (halfLength + value)),
632 if (other_ptr ==
nullptr)
return false;
640 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
660 unsigned int num_points,
bool keepTriangles,
661 const char* qhullCommand = NULL);
665 const Vec3s* points,
unsigned int num_points,
bool keepTriangles,
666 const char* qhullCommand = NULL);
681 #ifdef COAL_HAS_QHULL
684 void buildDoubleDescription();
691 unsigned char const&
count()
const {
return count_; }
702 if (count_ != other.
count_)
return false;
704 for (
int i = 0; i < count_; ++i) {
705 if (n_[i] != other.
n_[i])
return false;
716 static constexpr
size_t num_vertices_large_convex_threshold = 32;
719 std::shared_ptr<std::vector<Vec3s>>
points;
754 static constexpr
size_t num_support_warm_starts = 14;
765 num_normals_and_offsets(0),
766 center(
Vec3s::Zero()) {}
775 unsigned int num_points_);
782 void set(std::shared_ptr<std::vector<Vec3s>> points_,
783 unsigned int num_points_);
789 #ifdef COAL_HAS_QHULL
790 void buildDoubleDescriptionFromQHullResult(
const orgQhull::Qhull& qh);
804 void computeCenter();
808 if (other_ptr ==
nullptr)
return false;
811 if (num_points != other.
num_points)
return false;
813 if ((!(points.get()) && other.
points.get()) ||
814 (points.get() && !(other.
points.get())))
816 if (points.get() && other.
points.get()) {
817 const std::vector<Vec3s>& points_ = *points;
818 const std::vector<Vec3s>& other_points_ = *(other.
points);
819 for (
unsigned int i = 0; i < num_points; ++i) {
820 if (points_[i] != (other_points_)[i])
return false;
824 if ((!(neighbors.get()) && other.
neighbors.get()) ||
825 (neighbors.get() && !(other.
neighbors.get())))
827 if (neighbors.get() && other.
neighbors.get()) {
828 const std::vector<Neighbors>& neighbors_ = *neighbors;
829 const std::vector<Neighbors>& other_neighbors_ = *(other.
neighbors);
830 for (
unsigned int i = 0; i < num_points; ++i) {
831 if (neighbors_[i] != other_neighbors_[i])
return false;
835 if ((!(normals.get()) && other.
normals.get()) ||
836 (normals.get() && !(other.
normals.get())))
838 if (normals.get() && other.
normals.get()) {
839 const std::vector<Vec3s>& normals_ = *normals;
840 const std::vector<Vec3s>& other_normals_ = *(other.
normals);
841 for (
unsigned int i = 0; i < num_normals_and_offsets; ++i) {
842 if (normals_[i] != other_normals_[i])
return false;
846 if ((!(offsets.get()) && other.
offsets.get()) ||
847 (offsets.get() && !(other.
offsets.get())))
849 if (offsets.get() && other.
offsets.get()) {
850 const std::vector<double>& offsets_ = *offsets;
851 const std::vector<double>& other_offsets_ = *(other.
offsets);
852 for (
unsigned int i = 0; i < num_normals_and_offsets; ++i) {
853 if (offsets_[i] != other_offsets_[i])
return false;
857 if (this->support_warm_starts.
points.size() !=
859 this->support_warm_starts.
indices.size() !=
864 for (
size_t i = 0; i < this->support_warm_starts.
points.size(); ++i) {
865 if (this->support_warm_starts.
points[i] !=
867 this->support_warm_starts.indices[i] !=
873 return center == other.
center &&
878 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
881 template <
typename PolygonT>
908 :
ShapeBase(other), n(other.n), d(other.d) {}
921 return n.dot(p) - (d + this->getSweptSphereRadius());
925 return std::abs(this->signedDistance(p));
935 return std::numeric_limits<CoalScalar>::lowest();
947 if (value <= minInflationValue())
949 <<
") is two small. It should be at least: "
950 << minInflationValue(),
951 std::invalid_argument);
968 if (other_ptr ==
nullptr)
return false;
971 return n == other.
n && d == other.
d &&
976 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1013 std::abs(n.dot(p) - d) - this->getSweptSphereRadius();
1017 if (signed_dist >= 0) {
1018 return -signed_dist;
1024 return std::abs(std::abs(n.dot(p) - d) - this->getSweptSphereRadius());
1045 const Plane* other_ptr =
dynamic_cast<const Plane*
>(&_other);
1046 if (other_ptr ==
nullptr)
return false;
1047 const Plane& other = *other_ptr;
1049 return n == other.
n && d == other.
d &&
1054 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Center at zero point, axis aligned box.
Definition: geometric_shapes.h:166
Capsule It is where is the distance between the point x and the capsule segment AB,...
Definition: geometric_shapes.h:383
The geometry for the object for collision or distance computation.
Definition: collision_object.h:94
Cone The base of the cone is at and the top is at .
Definition: geometric_shapes.h:467
Base for convex polytope.
Definition: geometric_shapes.h:645
Cylinder along Z axis. The cylinder is defined at its centroid.
Definition: geometric_shapes.h:560
Ellipsoid centered at point zero.
Definition: geometric_shapes.h:305
Half Space: this is equivalent to the Plane in ODE. A Half space has a priviledged direction: the dir...
Definition: geometric_shapes.h:892
Infinite plane. A plane can be viewed as two half spaces; it has no priviledged direction....
Definition: geometric_shapes.h:983
Base class for all basic geometric shapes.
Definition: geometric_shapes.h:58
Center at zero point sphere.
Definition: geometric_shapes.h:240
Triangle stores the points instead of only indices of points.
Definition: geometric_shapes.h:110
#define COAL_DLLAPI
Definition: config.hh:88
#define COAL_DEPRECATED
Definition: deprecated.hh:37
#define COAL_THROW_PRETTY(message, exception)
Definition: fwd.hh:64
@ GEOM_CONE
Definition: collision_object.h:77
@ GEOM_TRIANGLE
Definition: collision_object.h:82
@ GEOM_BOX
Definition: collision_object.h:74
@ GEOM_SPHERE
Definition: collision_object.h:75
@ GEOM_CYLINDER
Definition: collision_object.h:78
@ GEOM_CAPSULE
Definition: collision_object.h:76
@ GEOM_ELLIPSOID
Definition: collision_object.h:84
@ GEOM_HALFSPACE
Definition: collision_object.h:81
@ GEOM_PLANE
Definition: collision_object.h:80
@ GEOM_CONVEX
Definition: collision_object.h:79
@ OT_GEOM
Definition: collision_object.h:55
std::pair< Halfspace, Transform3s > inflated(const CoalScalar 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:946
CoalScalar halfLength
Half Length along z axis.
Definition: geometric_shapes.h:486
Matrix3s computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: geometric_shapes.h:600
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:726
CoalScalar minInflationValue() const
Definition: geometric_shapes.h:607
Matrix3s computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: geometric_shapes.h:415
ShapeBase & operator=(const ShapeBase &other)=default
virtual Capsule * clone() const
Clone *this into a new Capsule.
Definition: geometric_shapes.h:396
virtual ~ShapeBase()
Definition: geometric_shapes.h:69
Cone(CoalScalar radius_, CoalScalar lz_)
Definition: geometric_shapes.h:472
CoalScalar computeVolume() const
compute the volume
Definition: geometric_shapes.h:197
ShapeBase(const ShapeBase &other)
 
Definition: geometric_shapes.h:63
std::pair< Capsule, Transform3s > inflated(const CoalScalar 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:440
Vec3s n
Plane normal.
Definition: geometric_shapes.h:956
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:801
unsigned int * n_
Definition: geometric_shapes.h:689
bool operator==(const Neighbors &other) const
Definition: geometric_shapes.h:701
Plane()
Definition: geometric_shapes.h:996
CoalScalar radius
Radius of the sphere.
Definition: geometric_shapes.h:250
Box & operator=(const Box &other)
Definition: geometric_shapes.h:175
CoalScalar minInflationValue() const
Definition: geometric_shapes.h:345
Capsule(const Capsule &other)
Definition: geometric_shapes.h:392
std::pair< Sphere, Transform3s > inflated(const CoalScalar 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:281
unsigned int const & operator[](int i) const
Definition: geometric_shapes.h:696
Halfspace & operator=(const Halfspace &other)
operator =
Definition: geometric_shapes.h:911
bool operator!=(const Neighbors &other) const
Definition: geometric_shapes.h:711
Vec3s n
Plane normal.
Definition: geometric_shapes.h:1034
CoalScalar distance(const Vec3s &p) const
Definition: geometric_shapes.h:924
virtual Box * clone() const
Clone *this into a new Box.
Definition: geometric_shapes.h:183
Matrix3s computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: geometric_shapes.h:261
Box()
Default constructor.
Definition: geometric_shapes.h:186
Sphere(const Sphere &other)
Definition: geometric_shapes.h:247
void computeLocalAABB()
Compute AABB.
virtual TriangleP * clone() const
Clone *this into a new TriangleP.
Definition: geometric_shapes.h:121
CoalScalar radius
Radius of the cone.
Definition: geometric_shapes.h:480
CoalScalar computeVolume() const
compute the volume
Definition: geometric_shapes.h:595
unsigned char const & count() const
Definition: geometric_shapes.h:691
Halfspace(CoalScalar a, CoalScalar b, CoalScalar c, CoalScalar d_)
Construct a plane with normal direction and offset.
Definition: geometric_shapes.h:900
virtual Plane * clone() const
Clone *this into a new Plane.
Definition: geometric_shapes.h:1008
Ellipsoid(CoalScalar rx, CoalScalar ry, CoalScalar rz)
Definition: geometric_shapes.h:310
std::shared_ptr< std::vector< Vec3s > > normals
An array of the normals of the polygon.
Definition: geometric_shapes.h:723
Ellipsoid(const Ellipsoid &other)
Definition: geometric_shapes.h:315
CoalScalar computeVolume() const
compute the volume
Definition: geometric_shapes.h:340
NODE_TYPE getNodeType() const
get the node type
Definition: geometric_shapes.h:126
TriangleP(const TriangleP &other)
Definition: geometric_shapes.h:117
Cylinder()
Default constructor.
Definition: geometric_shapes.h:563
void computeLocalAABB()
Compute AABB.
Ellipsoid()
Default constructor.
Definition: geometric_shapes.h:308
std::pair< Cone, Transform3s > inflated(const CoalScalar 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:522
unsigned int num_points
Definition: geometric_shapes.h:720
void computeLocalAABB()
Compute AABB.
Plane(const Plane &other)
Definition: geometric_shapes.h:998
CoalScalar computeVolume() const
compute the volume
Definition: geometric_shapes.h:266
CoalScalar halfLength
Half Length along z axis.
Definition: geometric_shapes.h:587
Plane(CoalScalar a, CoalScalar b, CoalScalar c, CoalScalar d_)
Construct a plane with normal direction and offset.
Definition: geometric_shapes.h:991
void buildSupportWarmStart()
Build the support points warm starts.
Matrix3s computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: geometric_shapes.h:330
Halfspace(const Halfspace &other)
Definition: geometric_shapes.h:907
CoalScalar minInflationValue() const
Definition: geometric_shapes.h:205
NODE_TYPE getNodeType() const
Get node type: an ellipsoid.
Definition: geometric_shapes.h:328
NODE_TYPE getNodeType() const
Get node type: a cone.
Definition: geometric_shapes.h:492
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:732
Ellipsoid(const Vec3s &radii)
Definition: geometric_shapes.h:313
virtual ConvexBase * clone() const
Clone (deep copy). This method is consistent with BVHModel clone method. The copy constructor is call...
Definition: geometric_shapes.h:673
void computeLocalAABB()
Compute AABB.
std::pair< Cylinder, Transform3s > inflated(const CoalScalar 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:619
Vec3s halfSide
box side half-length
Definition: geometric_shapes.h:189
Halfspace()
Definition: geometric_shapes.h:905
void set(std::shared_ptr< std::vector< Vec3s >> points_, unsigned int num_points_)
Set the points of the convex shape.
CoalScalar distance(const Vec3s &p) const
Definition: geometric_shapes.h:1023
Sphere()
Default constructor.
Definition: geometric_shapes.h:243
void setSweptSphereRadius(CoalScalar radius)
Set radius of sphere swept around the shape. Must be >= 0.
Definition: geometric_shapes.h:76
NODE_TYPE getNodeType() const
Get node type: a convex polytope.
Definition: geometric_shapes.h:679
Sphere(CoalScalar radius_)
Definition: geometric_shapes.h:245
void initialize(std::shared_ptr< std::vector< Vec3s >> points_, unsigned int num_points_)
Initialize the points of the convex shape This also initializes the ConvexBase::center.
Matrix3s computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: geometric_shapes.h:199
Vec3s a
Definition: geometric_shapes.h:149
OBJECT_TYPE getObjectType() const
Get object type: a geometric shape.
Definition: geometric_shapes.h:72
Halfspace(const Vec3s &n_, CoalScalar d_)
Construct a half space with normal direction and offset.
Definition: geometric_shapes.h:895
void computeLocalAABB()
Compute AABB.
Vec3s b
Definition: geometric_shapes.h:149
void computeLocalAABB()
Compute AABB.
virtual Ellipsoid * clone() const
Clone *this into a new Ellipsoid.
Definition: geometric_shapes.h:318
Plane(const Vec3s &n_, CoalScalar d_)
Construct a plane with normal direction and offset.
Definition: geometric_shapes.h:986
void unitNormalTest()
Turn non-unit normal into unit.
void computeLocalAABB()
Compute AABB.
CoalScalar getSweptSphereRadius() const
Get radius of sphere swept around the shape. This radius is always >= 0.
Definition: geometric_shapes.h:86
void computeLocalAABB()
Compute AABB.
unsigned int & operator[](int i)
Definition: geometric_shapes.h:692
CoalScalar signedDistance(const Vec3s &p) const
Definition: geometric_shapes.h:1010
Box(CoalScalar x, CoalScalar y, CoalScalar z)
Definition: geometric_shapes.h:168
Vec3s computeCOM() const
compute center of mass
Definition: geometric_shapes.h:508
static ConvexBase * convexHull(const Vec3s *points, unsigned int num_points, bool keepTriangles, const char *qhullCommand=NULL)
std::vector< int > indices
Indices of the support points warm starts. These are the indices of the real convex,...
Definition: geometric_shapes.h:750
Vec3s radii
Radii of the Ellipsoid (such that on boundary: x^2/rx^2 + y^2/ry^2.
Definition: geometric_shapes.h:318
Cylinder(const Cylinder &other)
Definition: geometric_shapes.h:569
std::pair< Ellipsoid, Transform3s > inflated(const CoalScalar 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:355
Vec3s c
Definition: geometric_shapes.h:149
NODE_TYPE getNodeType() const
Get node type: a sphere.
Definition: geometric_shapes.h:259
virtual Sphere * clone() const
Clone *this into a new Sphere.
Definition: geometric_shapes.h:250
CoalScalar computeVolume() const
compute the volume
Definition: geometric_shapes.h:410
Cylinder(CoalScalar radius_, CoalScalar lz_)
Definition: geometric_shapes.h:565
Plane & operator=(const Plane &other)
operator =
Definition: geometric_shapes.h:1001
CoalScalar signedDistance(const Vec3s &p) const
Definition: geometric_shapes.h:920
std::vector< Vec3s > points
Array of support points to warm start the support function computation.
Definition: geometric_shapes.h:745
virtual Cone * clone() const
Clone *this into a new Cone.
Definition: geometric_shapes.h:480
CoalScalar radius
Radius of capsule.
Definition: geometric_shapes.h:396
unsigned int num_normals_and_offsets
Definition: geometric_shapes.h:727
CoalScalar minInflationValue() const
Definition: geometric_shapes.h:271
CoalScalar d
Plane offset.
Definition: geometric_shapes.h:1037
Box(const Vec3s &side_)
Definition: geometric_shapes.h:171
void unitNormalTest()
Turn non-unit normal into unit.
Vec3s center
center of the convex polytope, this is used for collision: center is guaranteed in the internal of th...
Definition: geometric_shapes.h:736
unsigned char count_
Definition: geometric_shapes.h:688
ConvexBase()
Construct an uninitialized convex object Initialization is done with ConvexBase::initialize.
Definition: geometric_shapes.h:762
void computeLocalAABB()
virtual function of compute AABB in local coordinate
NODE_TYPE getNodeType() const
Get node type: a cylinder.
Definition: geometric_shapes.h:593
ShapeBase()
Definition: geometric_shapes.h:60
Matrix3s computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: geometric_shapes.h:499
CoalScalar halfLength
Half Length along z axis.
Definition: geometric_shapes.h:402
CoalScalar radius
Radius of the cylinder.
Definition: geometric_shapes.h:581
Box(const Box &other)
Definition: geometric_shapes.h:173
TriangleP()
Definition: geometric_shapes.h:112
std::shared_ptr< std::vector< Vec3s > > points
An array of the points of the polygon.
Definition: geometric_shapes.h:719
Capsule()
Default constructor.
Definition: geometric_shapes.h:386
static ConvexBase * convexHull(std::shared_ptr< std::vector< Vec3s >> &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.
NODE_TYPE getNodeType() const
Get node type: a half space.
Definition: geometric_shapes.h:932
TriangleP(const Vec3s &a_, const Vec3s &b_, const Vec3s &c_)
Definition: geometric_shapes.h:114
virtual Cylinder * clone() const
Clone *this into a new Cylinder.
Definition: geometric_shapes.h:581
Cone()
Default constructor.
Definition: geometric_shapes.h:470
Cylinder & operator=(const Cylinder &other)
Definition: geometric_shapes.h:572
ConvexBase(const ConvexBase &other)
Copy constructor Only the list of neighbors is copied.
NODE_TYPE getNodeType() const
Get node type: a plane.
Definition: geometric_shapes.h:1031
SupportWarmStartPolytope support_warm_starts
Support warm start polytopes.
Definition: geometric_shapes.h:757
Cone(const Cone &other)
Definition: geometric_shapes.h:476
CoalScalar minInflationValue() const
Definition: geometric_shapes.h:510
std::pair< Box, Transform3s > inflated(const CoalScalar 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:215
Capsule(CoalScalar radius_, CoalScalar lz_)
Definition: geometric_shapes.h:388
CoalScalar d
Plane offset.
Definition: geometric_shapes.h:959
NODE_TYPE getNodeType() const
Get node type: a box.
Definition: geometric_shapes.h:195
virtual Halfspace * clone() const
Clone *this into a new Halfspace.
Definition: geometric_shapes.h:918
CoalScalar computeVolume() const
compute the volume
Definition: geometric_shapes.h:494
void computeLocalAABB()
Compute AABB.
NODE_TYPE getNodeType() const
Get node type: a capsule.
Definition: geometric_shapes.h:408
CoalScalar minInflationValue() const
Definition: geometric_shapes.h:430
CoalScalar minInflationValue() const
Definition: geometric_shapes.h:934
Main namespace.
Definition: broadphase_bruteforce.h:44
Eigen::Matrix< CoalScalar, 3, 3 > Matrix3s
Definition: data_types.h:81
bool isEqual(const Eigen::MatrixBase< Derived > &lhs, const Eigen::MatrixBase< OtherDerived > &rhs, const CoalScalar tol=std::numeric_limits< CoalScalar >::epsilon() *100)
Definition: tools.h:204
NODE_TYPE
traversal node type: bounding volume (AABB, OBB, RSS, kIOS, OBBRSS, KDOP16, KDOP18,...
Definition: collision_object.h:64
OBJECT_TYPE
object type: BVH (mesh, points), basic geometry, octree
Definition: collision_object.h:52
Eigen::Matrix< CoalScalar, 3, 1 > Vec3s
Definition: data_types.h:77
double CoalScalar
Definition: data_types.h:76
Definition: geometric_shapes.h:687
The support warm start polytope contains certain points of this which are support points in specific ...
Definition: geometric_shapes.h:742