All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fcl::Convex Class Reference

Convex polytope. More...

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

Inheritance diagram for fcl::Convex:
Collaboration diagram for fcl::Convex:

Classes

struct  Edge
 

Public Member Functions

 Convex (Vec3f *plane_normals_, FCL_REAL *plane_dis_, int num_planes_, Vec3f *points_, int num_points_, int *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 fcl::ShapeBase
 ShapeBase ()
 
OBJECT_TYPE getObjectType () const
 Get object type: a geometric shape. More...
 
- Public Member Functions inherited from 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
 whether the object is completely occupied More...
 
bool isFree () const
 whether the object is completely free More...
 
bool isUncertain () const
 whether the object has some uncertainty More...
 
virtual Matrix3f computeMomentofInertiaRelatedToCOM () const
 compute the inertia matrix, related to the com More...
 

Public Attributes

Vec3fplane_normals
 
FCL_REALplane_dis
 
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_planes
 
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 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

fcl::Convex::Convex ( Vec3f plane_normals_,
FCL_REAL plane_dis_,
int  num_planes_,
Vec3f points_,
int  num_points_,
int *  polygons_ 
)
inline

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

References center, edges, fillEdges(), num_planes, num_points, plane_dis, plane_normals, points, and polygons.

fcl::Convex::Convex ( const Convex other)
inline

Copy constructor.

References edges, num_edges, num_planes, plane_dis, plane_normals, points, and polygons.

fcl::Convex::~Convex ( )
inline

References edges.

Member Function Documentation

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

compute center of mass

Reimplemented from fcl::CollisionGeometry.

References num_planes, and polygons.

void fcl::Convex::computeLocalAABB ( )
virtual

Compute AABB.

Implements fcl::CollisionGeometry.

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

compute the volume

Reimplemented from fcl::CollisionGeometry.

References num_planes, and polygons.

void fcl::Convex::fillEdges ( )
protected

Get edge information.

Referenced by Convex().

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

Get node type: a conex polytope.

Reimplemented from fcl::CollisionGeometry.

References fcl::GEOM_CONVEX.

Member Data Documentation

Vec3f 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)

Referenced by Convex().

Edge* fcl::Convex::edges

Referenced by Convex(), and ~Convex().

int fcl::Convex::num_edges

Referenced by Convex().

int fcl::Convex::num_planes
int fcl::Convex::num_points

Referenced by Convex().

FCL_REAL* fcl::Convex::plane_dis

Referenced by Convex().

Vec3f* fcl::Convex::plane_normals

Referenced by Convex().

Vec3f* fcl::Convex::points

Referenced by Convex().

int* 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 computeCOM(), computeMomentofInertia(), computeVolume(), and Convex().