Classes | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
hpp::fcl::Convex Class Reference

Convex polytope. More...

#include <hpp/fcl/shape/geometric_shapes.h>

Inheritance diagram for hpp::fcl::Convex:
[legend]
Collaboration diagram for hpp::fcl::Convex:
[legend]

Classes

struct  Edge
 

Public Member Functions

 Convex (Vec3f *points_, int num_points_, int *polygons_, int num_polygons_)
 Constructing a convex, providing normal and offset of each polytype surface, and the points and shape topology information. More...
 
 Convex (const Convex &other)
 Copy constructor. More...
 
 ~Convex ()
 
void computeLocalAABB ()
 Compute AABB. More...
 
NODE_TYPE getNodeType () const
 Get node type: a conex polytope. More...
 
Matrix3f computeMomentofInertia () const
 based on http://number-none.com/blow/inertia/bb_inertia.doc More...
 
Vec3f computeCOM () const
 compute center of mass More...
 
FCL_REAL computeVolume () const
 compute the volume More...
 
- Public Member Functions inherited from hpp::fcl::ShapeBase
 ShapeBase ()
 
OBJECT_TYPE getObjectType () const
 Get object type: a geometric shape. More...
 
- Public Member Functions inherited from hpp::fcl::CollisionGeometry
 CollisionGeometry ()
 
virtual ~CollisionGeometry ()
 
void * getUserData () const
 get user data in geometry More...
 
void setUserData (void *data)
 set user data in geometry More...
 
bool isOccupied () const HPP_FCL_DEPRECATED
 whether the object is completely occupied More...
 
bool isFree () const HPP_FCL_DEPRECATED
 whether the object is completely free More...
 
bool isUncertain () const HPP_FCL_DEPRECATED
 whether the object has some uncertainty More...
 
virtual Matrix3f computeMomentofInertiaRelatedToCOM () const
 compute the inertia matrix, related to the com More...
 

Public Attributes

int * polygons
 An array of indices to the points of each polygon, it should be the number of vertices followed by that amount of indices to "points" in counter clockwise order. More...
 
Vec3fpoints
 
int num_points
 
int num_edges
 
int num_polygons
 
Edgeedges
 
Vec3f center
 center of the convex polytope, this is used for collision: center is guaranteed in the internal of the polytope (as it is convex) More...
 
- Public Attributes inherited from hpp::fcl::CollisionGeometry
Vec3f aabb_center
 AABB center in local coordinate. More...
 
FCL_REAL aabb_radius
 AABB radius. More...
 
AABB aabb_local
 AABB in local coordinate, used for tight AABB when only translation transform. More...
 
void * user_data
 pointer to user defined data specific to this object More...
 
FCL_REAL cost_density
 collision cost for unit volume More...
 
FCL_REAL threshold_occupied
 threshold for occupied ( >= is occupied) More...
 
FCL_REAL threshold_free
 threshold for free (<= is free) More...
 

Protected Member Functions

void fillEdges ()
 Get edge information. More...
 

Detailed Description

Convex polytope.

Constructor & Destructor Documentation

hpp::fcl::Convex::Convex ( Vec3f points_,
int  num_points_,
int *  polygons_,
int  num_polygons_ 
)
inline

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

Parameters
points_list of 3D points
num_points_number of 3D points
polygons_An array of indices to the points of each polygon, it should be the number of vertices followed by that amount of indices to "points" in counter clockwise order.
num_polygons_the number of polygons.
Note
num_polygons_ is not the allocated size of polygons_.
hpp::fcl::Convex::Convex ( const Convex other)
inline

Copy constructor.

References edges, num_edges, num_points, num_polygons, points, and polygons.

hpp::fcl::Convex::~Convex ( )
inline

Member Function Documentation

Vec3f hpp::fcl::Convex::computeCOM ( ) const
inlinevirtual

compute center of mass

Reimplemented from hpp::fcl::CollisionGeometry.

void hpp::fcl::Convex::computeLocalAABB ( )
virtual

Compute AABB.

Implements hpp::fcl::CollisionGeometry.

Matrix3f hpp::fcl::Convex::computeMomentofInertia ( ) const
inlinevirtual
FCL_REAL hpp::fcl::Convex::computeVolume ( ) const
inlinevirtual

compute the volume

Reimplemented from hpp::fcl::CollisionGeometry.

void hpp::fcl::Convex::fillEdges ( )
protected

Get edge information.

NODE_TYPE hpp::fcl::Convex::getNodeType ( ) const
inlinevirtual

Get node type: a conex polytope.

Reimplemented from hpp::fcl::CollisionGeometry.

References hpp::fcl::GEOM_CONVEX.

Member Data Documentation

Vec3f hpp::fcl::Convex::center

center of the convex polytope, this is used for collision: center is guaranteed in the internal of the polytope (as it is convex)

Edge* hpp::fcl::Convex::edges

Referenced by Convex().

int hpp::fcl::Convex::num_edges

Referenced by Convex().

int hpp::fcl::Convex::num_points
int hpp::fcl::Convex::num_polygons

Referenced by Convex().

Vec3f* hpp::fcl::Convex::points
int* hpp::fcl::Convex::polygons

An array of indices to the points of each polygon, it should be the number of vertices followed by that amount of indices to "points" in counter clockwise order.

Referenced by Convex().