Convex polytope.
More...
#include <collision_object.h>
|
unsigned int | num_polygons |
|
std::shared_ptr< std::vector< PolygonT > > | polygons |
| An array of PolygonT object. PolygonT should contains a list of vertices for each polygon, in counter clockwise order. More...
|
|
template<typename PolygonT>
class coal::Convex< PolygonT >
Convex polytope.
- Template Parameters
-
PolygonT | the polygon class. It must have method size() and operator[](int i) |
Definition at line 51 of file coal/serialization/collision_object.h.
◆ Convex() [1/3]
template<typename PolygonT >
◆ Convex() [2/3]
template<typename PolygonT >
coal::Convex< PolygonT >::Convex |
( |
std::shared_ptr< std::vector< Vec3s >> |
points_, |
|
|
unsigned int |
num_points_, |
|
|
std::shared_ptr< std::vector< PolygonT >> |
polygons_, |
|
|
unsigned int |
num_polygons_ |
|
) |
| |
Constructing a convex, providing normal and offset of each polytype surface, and the points and shape topology information.
- Parameters
-
ownStorage | whether this class owns the pointers of points and polygons. If owned, they are deleted upon destruction. |
points_ | list of 3D points |
num_points_ | number of 3D points |
polygons_ | An array of PolygonT object. PolygonT should contains a list of vertices for each polygon, in counter clockwise order. |
num_polygons_ | the number of polygons. |
- Note
- num_polygons_ is not the allocated size of polygons_.
◆ Convex() [3/3]
template<typename PolygonT >
Copy constructor Only the list of neighbors is copied.
◆ ~Convex()
template<typename PolygonT >
◆ clone()
template<typename PolygonT >
◆ computeCOM()
template<typename PolygonT >
◆ computeMomentofInertia()
template<typename PolygonT >
◆ computeVolume()
template<typename PolygonT >
◆ fillNeighbors()
template<typename PolygonT >
◆ set()
template<typename PolygonT >
void coal::Convex< PolygonT >::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.
- Parameters
-
ownStorage | whether this class owns the pointers of points and polygons. If owned, they are deleted upon destruction. |
points | list of 3D points |
num_points | number of 3D points |
polygons | An array of PolygonT object. PolygonT should contains a list of vertices for each polygon, in counter clockwise order. |
num_polygons | the number of polygons. |
- Note
- num_polygons is not the allocated size of polygons.
◆ num_polygons
template<typename PolygonT >
◆ polygons
template<typename PolygonT >
std::shared_ptr<std::vector<PolygonT> > coal::Convex< PolygonT >::polygons |
An array of PolygonT object. PolygonT should contains a list of vertices for each polygon, in counter clockwise order.
Definition at line 101 of file coal/shape/convex.h.
The documentation for this class was generated from the following files: