38#ifndef COAL_SHAPE_CONVEX_H 39#define COAL_SHAPE_CONVEX_H 48template <
typename PolygonT>
63 Convex(std::shared_ptr<std::vector<Vec3s>> points_,
unsigned int num_points_,
64 std::shared_ptr<std::vector<PolygonT>> polygons_,
65 unsigned int num_polygons_);
92 std::shared_ptr<std::vector<PolygonT>>
polygons,
Convex polytope.
Definition convex.h:49
virtual Convex< PolygonT > * clone() const
Clone (deep copy)
Definition convex.hxx:84
Matrix3s computeMomentofInertia() const
based on http://number-none.com/blow/inertia/bb_inertia.doc
Definition convex.hxx:89
void set(std::shared_ptr< std::vector< Vec3s > > points, unsigned int num_points, std::shared_ptr< std::vector< PolygonT > > polygons, unsigned int num_polygons)
Set the current Convex from a list of points and polygons.
Definition convex.hxx:70
~Convex()
Definition convex.hxx:67
CoalScalar computeVolume() const
compute the volume
Definition convex.hxx:187
void fillNeighbors()
Definition convex.hxx:231
unsigned int num_polygons
Definition convex.h:102
Vec3s computeCOM() const
compute center of mass
Definition convex.hxx:142
std::shared_ptr< std::vector< PolygonT > > polygons
An array of PolygonT object. PolygonT should contains a list of vertices for each polygon,...
Definition convex.h:101
Convex()
Construct an uninitialized convex object.
Definition convex.h:52
unsigned int num_points
Definition geometric_shapes.h:720
ConvexBase()
Construct an uninitialized convex object Initialization is done with ConvexBase::initialize.
Definition geometric_shapes.h:762
std::shared_ptr< std::vector< Vec3s > > points
An array of the points of the polygon.
Definition geometric_shapes.h:719
Main namespace.
Definition broadphase_bruteforce.h:44
Eigen::Matrix< CoalScalar, 3, 3 > Matrix3s
Definition data_types.h:81
Eigen::Matrix< CoalScalar, 3, 1 > Vec3s
Definition data_types.h:77
double CoalScalar
Definition data_types.h:76