Public Member Functions | Public Attributes | Protected Member Functions | List of all members
coal::Convex< PolygonT > Class Template Reference

Convex polytope. More...

#include <collision_object.h>

Inheritance diagram for coal::Convex< PolygonT >:
Inheritance graph
[legend]

Public Member Functions

virtual Convex< PolygonT > * clone () const
 Clone (deep copy) More...
 
Vec3s computeCOM () const
 
Matrix3s computeMomentofInertia () const
 based on http://number-none.com/blow/inertia/bb_inertia.doc More...
 
CoalScalar computeVolume () const
 
 Convex ()
 Construct an uninitialized convex object. More...
 
 Convex (const Convex &other)
 Copy constructor Only the list of neighbors is copied. More...
 
 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. More...
 
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. More...
 
 ~Convex ()
 

Public Attributes

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...
 

Protected Member Functions

void fillNeighbors ()
 

Detailed Description

template<typename PolygonT>
class coal::Convex< PolygonT >

Convex polytope.

Template Parameters
PolygonTthe polygon class. It must have method size() and operator[](int i)

Definition at line 51 of file coal/serialization/collision_object.h.

Constructor & Destructor Documentation

◆ Convex() [1/3]

template<typename PolygonT >
coal::Convex< PolygonT >::Convex ( )
inline

Construct an uninitialized convex object.

Definition at line 52 of file coal/shape/convex.h.

◆ 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
ownStoragewhether 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 >
coal::Convex< PolygonT >::Convex ( const Convex< PolygonT > &  other)

Copy constructor Only the list of neighbors is copied.

◆ ~Convex()

template<typename PolygonT >
coal::Convex< PolygonT >::~Convex ( )

Member Function Documentation

◆ clone()

template<typename PolygonT >
virtual Convex<PolygonT>* coal::Convex< PolygonT >::clone ( ) const
virtual

Clone (deep copy)

◆ computeCOM()

template<typename PolygonT >
Vec3s coal::Convex< PolygonT >::computeCOM ( ) const

◆ computeMomentofInertia()

template<typename PolygonT >
Matrix3s coal::Convex< PolygonT >::computeMomentofInertia ( ) const

◆ computeVolume()

template<typename PolygonT >
CoalScalar coal::Convex< PolygonT >::computeVolume ( ) const

◆ fillNeighbors()

template<typename PolygonT >
void coal::Convex< PolygonT >::fillNeighbors ( )
protected

◆ 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
ownStoragewhether this class owns the pointers of points and polygons. If owned, they are deleted upon destruction.
pointslist of 3D points
num_pointsnumber of 3D points
polygonsAn array of PolygonT object. PolygonT should contains a list of vertices for each polygon, in counter clockwise order.
num_polygonsthe number of polygons.
Note
num_polygons is not the allocated size of polygons.

Member Data Documentation

◆ num_polygons

template<typename PolygonT >
unsigned int coal::Convex< PolygonT >::num_polygons

Definition at line 102 of file coal/shape/convex.h.

◆ 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:


hpp-fcl
Author(s):
autogenerated on Sat Nov 23 2024 03:45:00