Class ConvexBase

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class ConvexBase : public hpp::fcl::ShapeBase

Base for convex polytope.

Note

Inherited classes are responsible for filling ConvexBase::neighbors;

Subclassed by boost::serialization::internal::ConvexBaseAccessor, hpp::fcl::Convex< PolygonT >

Public Functions

virtual ~ConvexBase()
inline virtual ConvexBase *clone() const

Clone (deep copy).

virtual void computeLocalAABB()

Compute AABB.

inline virtual NODE_TYPE getNodeType() const

Get node type: a conex polytope.

Public Members

Vec3f *points

An array of the points of the polygon.

unsigned int num_points
Neighbors *neighbors

Neighbors of each vertex. It is an array of size num_points. For each vertex, it contains the number of neighbors and a list of indices to them.

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)

Public Static Functions

static ConvexBase *convexHull(const Vec3f *points, unsigned int num_points, bool keepTriangles, const char *qhullCommand = NULL)

Build a convex hull based on Qhull library and store the vertices and optionally the triangles.

Note

hpp-fcl must have been compiled with option HPP_FCL_HAS_QHULL set to ON.

Parameters:
  • points, num_points – the points whose convex hull should be computed.

  • keepTriangles – if true, returns a Convex<Triangle> object which contains the triangle of the shape.

  • qhullCommand – the command sent to qhull.

    • if keepTriangles is true, this parameter should include “Qt”. If NULL, “Qt” is passed to Qhull.

    • if keepTriangles is false, an empty string is passed to Qhull.

Protected Functions

inline ConvexBase()

Construct an uninitialized convex object Initialization is done with ConvexBase::initialize.

void initialize(bool ownStorage, Vec3f *points_, unsigned int num_points_)

Initialize the points of the convex shape This also initializes the ConvexBase::center.

Parameters:
  • ownStorage – weither the ConvexBase owns the data.

  • points_ – list of 3D points ///

  • num_points_ – number of 3D points

void set(bool ownStorage, Vec3f *points_, unsigned int num_points_)

Set the points of the convex shape.

Parameters:
  • ownStorage – weither the ConvexBase owns the data.

  • points_ – list of 3D points ///

  • num_points_ – number of 3D points

ConvexBase(const ConvexBase &other)

Copy constructor Only the list of neighbors is copied.

Protected Attributes

unsigned int *nneighbors_
bool own_storage_
struct Neighbors

Public Functions

inline unsigned char const &count() const
inline unsigned int &operator[](int i)
inline unsigned int const &operator[](int i) const
inline bool operator==(const Neighbors &other) const
inline bool operator!=(const Neighbors &other) const

Public Members

unsigned char count_
unsigned int *n_