33 #ifndef DART_DYNAMICS_MULTISPHERECONVEXHULLSHAPE_HPP_ 34 #define DART_DYNAMICS_MULTISPHERECONVEXHULLSHAPE_HPP_ 38 #include "dart/dynamics/Shape.hpp" 48 using Sphere = std::pair<double, Eigen::Vector3d>;
49 using Spheres = std::vector<Sphere>;
58 const std::string&
getType()
const override;
70 void addSphere(
double radius,
const Eigen::Vector3d& position);
108 #endif // DART_DYNAMICS_MULTISPHERECONVEXHULLSHAPE_HPP_ std::size_t getNumSpheres() const
Get the number of spheres.
Definition: MultiSphereConvexHullShape.cpp:111
void addSpheres(const Spheres &spheres)
Add a list of spheres.
Definition: MultiSphereConvexHullShape.cpp:69
Definition: Aspect.cpp:40
MultiSphereConvexHullShape represents the convex hull of a collection of spheres. ...
Definition: MultiSphereConvexHullShape.hpp:45
static const std::string & getStaticType()
Returns shape type for this class.
Definition: MultiSphereConvexHullShape.cpp:62
void updateVolume() const override
Update the volume of this MultiSphereConvexHullShape.
Definition: MultiSphereConvexHullShape.cpp:154
MultiSphereConvexHullShape(const Spheres &spheres)
Constructor.
Definition: MultiSphereConvexHullShape.cpp:43
Eigen::Matrix3d computeInertia(double mass) const override
Compute the inertia of this MultiSphereConvexHullShape.
Definition: MultiSphereConvexHullShape.cpp:124
const std::string & getType() const override
Returns a string representing the shape type.
Definition: MultiSphereConvexHullShape.cpp:56
const Spheres & getSpheres() const
Get the set of spheres.
Definition: MultiSphereConvexHullShape.cpp:118
void addSphere(const Sphere &sphere)
Add a sphere.
Definition: MultiSphereConvexHullShape.cpp:81
void removeAllSpheres()
Remove all spheres.
Definition: MultiSphereConvexHullShape.cpp:100
void updateBoundingBox() const override
Updates bounding box.
Definition: MultiSphereConvexHullShape.cpp:131
virtual ~MultiSphereConvexHullShape()
Destructor.
Definition: MultiSphereConvexHullShape.cpp:50