Template Class Convex

Inheritance Relationships

Base Type

Derived Type

Class Documentation

template<typename PolygonT>
class Convex : public hpp::fcl::ConvexBase

Convex polytope.

Template Parameters:

PolygonT – the polygon class. It must have method size() and operator[](int i)

Subclassed by boost::serialization::internal::ConvexAccessor< PolygonT >

Public Functions

inline Convex()

Construct an uninitialized convex object.

Convex(bool ownStorage, Vec3f *points_, unsigned int num_points_, PolygonT *polygons_, unsigned int num_polygons_)

Constructing a convex, providing normal and offset of each polytype surface, and the points and shape topology information.

Note

num_polygons_ is not the allocated size of 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.

Convex(const Convex &other)

Copy constructor Only the list of neighbors is copied.

~Convex()
virtual Matrix3f computeMomentofInertia() const

based on http://number-none.com/blow/inertia/bb_inertia.doc

virtual Vec3f computeCOM() const

compute center of mass

virtual FCL_REAL computeVolume() const

compute the volume

void set(bool ownStorage, Vec3f *points, unsigned int num_points, PolygonT *polygons, unsigned int num_polygons)

Set the current Convex from a list of points and polygons.

Note

num_polygons is not the allocated size of 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.

virtual Convex<PolygonT> *clone() const

Clone (deep copy).

Public Members

PolygonT *polygons

An array of PolygonT object. PolygonT should contains a list of vertices for each polygon, in counter clockwise order.

unsigned int num_polygons

Protected Functions

void fillNeighbors()