hpp-fcl: Construction of BVHModel

hpp-fcl 1.7.7 HPP fork of FCL -- The Flexible Collision Library

Classes | Typedefs | Enumerator | Functions | Variables
Construction of BVHModel

## Classes
struct | hpp::fcl::BVNodeBase
| BVNodeBase encodes the tree structure for BVH. More...
struct | hpp::fcl::BVNode< BV >
| A class describing a bounding volume node. It includes the tree structure providing in BVNodeBase and also the geometry data provided in BV template parameter. More...
class | hpp::fcl::BVFitter< BV >
| The class for the default algorithm fitting a bounding volume to a set of points. More...
class | hpp::fcl::BVSplitter< BV >
| A class describing the split rule that splits each BV node. More...
class | hpp::fcl::BVHModelBase
| A base class describing the bounding hierarchy of a mesh model or a point cloud model (which is viewed as a degraded version of mesh) More...
class | hpp::fcl::BVHModel< BV >
| A class describing the bounding hierarchy of a mesh model or a point cloud model (which is viewed as a degraded version of mesh) More...
class | hpp::fcl::CollisionGeometry
| The geometry for the object for collision or distance computation. More...
class | hpp::fcl::CollisionObject
| the object for collision or distance computation, contains the geometry and the transform information More...

## Typedefs
typedef BVNodeBase | hpp::fcl::BVNode< BV >::Base

## Functions
| hpp::fcl::BVNodeBase::BVNodeBase ()
| Default constructor. More...
bool | hpp::fcl::BVNodeBase::operator== (const BVNodeBase &other) const
| Equality operator. More...
bool | hpp::fcl::BVNodeBase::operator!= (const BVNodeBase &other) const
| Difference operator. More...
bool | hpp::fcl::BVNodeBase::isLeaf () const
| Whether current node is a leaf node (i.e. contains a primitive index. More...
int | hpp::fcl::BVNodeBase::primitiveId () const
| Return the primitive index. The index is referred to the original data (i.e. vertices or tri_indices) in BVHModel. More...
int | hpp::fcl::BVNodeBase::leftChild () const
| Return the index of the first child. The index is referred to the bounding volume array (i.e. bvs) in BVHModel. More...
int | hpp::fcl::BVNodeBase::rightChild () const
| Return the index of the second child. The index is referred to the bounding volume array (i.e. bvs) in BVHModel. More...
bool | hpp::fcl::BVNode< BV >::operator== (const BVNode &other) const
| Equality operator. More...
bool | hpp::fcl::BVNode< BV >::operator!= (const BVNode &other) const
| Difference operator. More...
bool | hpp::fcl::BVNode< BV >::overlap (const BVNode &other) const
| Check whether two BVNode collide. More...
bool | hpp::fcl::BVNode< BV >::overlap (const BVNode &other, const CollisionRequest &request, FCL_REAL &sqrDistLowerBound) const
| Check whether two BVNode collide. More...
FCL_REAL | hpp::fcl::BVNode< BV >::distance (const BVNode &other, Vec3f *P1=NULL, Vec3f *P2=NULL) const
| Compute the distance between two BVNode. P1 and P2, if not NULL and the underlying BV supports distance, return the nearest points. More...
Vec3f | hpp::fcl::BVNode< BV >::getCenter () const
| Access to the center of the BV. More...
const Matrix3f & | hpp::fcl::BVNode< BV >::getOrientation () const
| Access to the orientation of the BV. More...
| hpp::fcl::CollisionGeometry::CollisionGeometry ()
| hpp::fcl::CollisionGeometry::CollisionGeometry (const CollisionGeometry &other)
| Copy constructor. More...
virtual | hpp::fcl::CollisionGeometry::~CollisionGeometry ()
virtual CollisionGeometry * | hpp::fcl::CollisionGeometry::clone () const =0
| Clone *this into a new CollisionGeometry. More...
bool | hpp::fcl::CollisionGeometry::operator== (const CollisionGeometry &other) const
| Equality operator. More...
bool | hpp::fcl::CollisionGeometry::operator!= (const CollisionGeometry &other) const
| Difference operator. More...
virtual OBJECT_TYPE | hpp::fcl::CollisionGeometry::getObjectType () const
| get the type of the object More...
virtual NODE_TYPE | hpp::fcl::CollisionGeometry::getNodeType () const
| get the node type More...
virtual void | hpp::fcl::CollisionGeometry::computeLocalAABB ()=0
| compute the AABB for object in local coordinate More...
void * | hpp::fcl::CollisionGeometry::getUserData () const
| get user data in geometry More...
void | hpp::fcl::CollisionGeometry::setUserData (void *data)
| set user data in geometry More...
bool | hpp::fcl::CollisionGeometry::isOccupied () const
| whether the object is completely occupied More...
bool | hpp::fcl::CollisionGeometry::isFree () const
| whether the object is completely free More...
bool | hpp::fcl::CollisionGeometry::isUncertain () const
| whether the object has some uncertainty More...
virtual Vec3f | hpp::fcl::CollisionGeometry::computeCOM () const
| compute center of mass More...
virtual Matrix3f | hpp::fcl::CollisionGeometry::computeMomentofInertia () const
| compute the inertia matrix, related to the origin More...
virtual FCL_REAL | hpp::fcl::CollisionGeometry::computeVolume () const
| compute the volume More...
virtual Matrix3f | hpp::fcl::CollisionGeometry::computeMomentofInertiaRelatedToCOM () const
| compute the inertia matrix, related to the com More...
| hpp::fcl::CollisionObject::CollisionObject (const shared_ptr< CollisionGeometry > &cgeom_)
| hpp::fcl::CollisionObject::CollisionObject (const shared_ptr< CollisionGeometry > &cgeom_, const Transform3f &tf)
| hpp::fcl::CollisionObject::CollisionObject (const shared_ptr< CollisionGeometry > &cgeom_, const Matrix3f &R, const Vec3f &T)
| hpp::fcl::CollisionObject::~CollisionObject ()
OBJECT_TYPE | hpp::fcl::CollisionObject::getObjectType () const
| get the type of the object More...
NODE_TYPE | hpp::fcl::CollisionObject::getNodeType () const
| get the node type More...
const AABB & | hpp::fcl::CollisionObject::getAABB () const
| get the AABB in world space More...
void | hpp::fcl::CollisionObject::computeAABB ()
| compute the AABB in world space More...
void * | hpp::fcl::CollisionObject::getUserData () const
| get user data in object More...
void | hpp::fcl::CollisionObject::setUserData (void *data)
| set user data in object More...
const Vec3f & | hpp::fcl::CollisionObject::getTranslation () const
| get translation of the object More...
const Matrix3f & | hpp::fcl::CollisionObject::getRotation () const
| get matrix rotation of the object More...
const Transform3f & | hpp::fcl::CollisionObject::getTransform () const
| get object's transform More...
void | hpp::fcl::CollisionObject::setRotation (const Matrix3f &R)
| set object's rotation matrix More...
void | hpp::fcl::CollisionObject::setTranslation (const Vec3f &T)
| set object's translation More...
void | hpp::fcl::CollisionObject::setTransform (const Matrix3f &R, const Vec3f &T)
| set object's transform More...
void | hpp::fcl::CollisionObject::setTransform (const Transform3f &tf)
| set object's transform More...
bool | hpp::fcl::CollisionObject::isIdentityTransform () const
| whether the object is in local coordinate More...
void | hpp::fcl::CollisionObject::setIdentityTransform ()
| set the object in local coordinate More...
const shared_ptr< const CollisionGeometry > & | hpp::fcl::CollisionObject::collisionGeometry () const
| get geometry from the object instance More...
const shared_ptr< CollisionGeometry > & | hpp::fcl::CollisionObject::collisionGeometry ()
| get geometry from the object instance More...

## Variables
int | hpp::fcl::BVNodeBase::first_child
| An index for first child node or primitive If the value is positive, it is the index of the first child bv node If the value is negative, it is -(primitive index + 1) Zero is not used. More...
int | hpp::fcl::BVNodeBase::first_primitive
| The start id the primitive belonging to the current node. The index is referred to the primitive_indices in BVHModel and from that we can obtain the primitive's index in original data indirectly. More...
int | hpp::fcl::BVNodeBase::num_primitives
| The number of primitives belonging to the current node. More...
BV | hpp::fcl::BVNode< BV >::bv
| bounding volume storing the geometry More...
Vec3f | hpp::fcl::CollisionGeometry::aabb_center
| AABB center in local coordinate. More...
FCL_REAL | hpp::fcl::CollisionGeometry::aabb_radius
| AABB radius. More...
AABB | hpp::fcl::CollisionGeometry::aabb_local
| AABB in local coordinate, used for tight AABB when only translation transform. More...
void * | hpp::fcl::CollisionGeometry::user_data
| pointer to user defined data specific to this object More...
FCL_REAL | hpp::fcl::CollisionGeometry::cost_density
| collision cost for unit volume More...
FCL_REAL | hpp::fcl::CollisionGeometry::threshold_occupied
| threshold for occupied ( >= is occupied) More...
FCL_REAL | hpp::fcl::CollisionGeometry::threshold_free
| threshold for free (<= is free) More...
shared_ptr< CollisionGeometry > | hpp::fcl::CollisionObject::cgeom
shared_ptr< const CollisionGeometry > | hpp::fcl::CollisionObject::cgeom_const
Transform3f | hpp::fcl::CollisionObject::t
AABB | hpp::fcl::CollisionObject::aabb
| AABB in global coordinate. More...
void * | hpp::fcl::CollisionObject::user_data
| pointer to user defined data specific to this object More...

## Detailed Description

Classes which are used to build a BVHModel (Bounding Volume Hierarchy)

## Typedef Documentation

## ◆ Base

template<typename BV >

typedef BVNodeBase hpp::fcl::BVNode< BV >::Base

## Function Documentation

## ◆ BVNodeBase()

hpp::fcl::BVNodeBase::BVNodeBase | ( |  | ) |
| inline

Default constructor.

## ◆ clone()

virtual CollisionGeometry* hpp::fcl::CollisionGeometry::clone | ( |  | ) | const
| pure virtual

Clone *this into a new CollisionGeometry.

Implemented in hpp::fcl::Plane, hpp::fcl::Halfspace, hpp::fcl::ConvexBase, hpp::fcl::Cylinder, hpp::fcl::Cone, hpp::fcl::Capsule, hpp::fcl::Sphere, hpp::fcl::Box, hpp::fcl::TriangleP, hpp::fcl::OcTree, and hpp::fcl::BVHModel< BV >.

## ◆ CollisionGeometry() [1/2]

hpp::fcl::CollisionGeometry::CollisionGeometry | ( |  | ) |
| inline

## ◆ collisionGeometry() [1/2]

const shared_ptr<CollisionGeometry>& hpp::fcl::CollisionObject::collisionGeometry | ( |  | ) |
| inline

get geometry from the object instance

## ◆ collisionGeometry() [2/2]

const shared_ptr<const CollisionGeometry>& hpp::fcl::CollisionObject::collisionGeometry | ( |  | ) | const
| inline

get geometry from the object instance

## ◆ CollisionGeometry() [2/2]

hpp::fcl::CollisionGeometry::CollisionGeometry | ( | const CollisionGeometry & | other | ) |
| inline

Copy constructor.

## ◆ CollisionObject() [1/3]

hpp::fcl::CollisionObject::CollisionObject | ( | const shared_ptr< CollisionGeometry > & | cgeom_ | ) |
| inline

## ◆ CollisionObject() [2/3]

hpp::fcl::CollisionObject::CollisionObject | ( | const shared_ptr< CollisionGeometry > & | cgeom_,
|  | const Matrix3f & | R,
|  | const Vec3f & | T
| ) |  |
| inline

## ◆ CollisionObject() [3/3]

hpp::fcl::CollisionObject::CollisionObject | ( | const shared_ptr< CollisionGeometry > & | cgeom_,
|  | const Transform3f & | tf
| ) |  |
| inline

## ◆ computeAABB()

void hpp::fcl::CollisionObject::computeAABB | ( |  | ) |
| inline

compute the AABB in world space

## ◆ computeCOM()

virtual Vec3f hpp::fcl::CollisionGeometry::computeCOM | ( |  | ) | const
| inlinevirtual

compute center of mass

Reimplemented in hpp::fcl::Cone, hpp::fcl::Convex< PolygonT >, and hpp::fcl::BVHModelBase.

## ◆ computeLocalAABB()

virtual void hpp::fcl::CollisionGeometry::computeLocalAABB | ( |  | ) |
| pure virtual

compute the AABB for object in local coordinate

Implemented in hpp::fcl::Plane, hpp::fcl::Halfspace, hpp::fcl::ConvexBase, hpp::fcl::Cylinder, hpp::fcl::Cone, hpp::fcl::Capsule, hpp::fcl::Sphere, hpp::fcl::Box, hpp::fcl::TriangleP, hpp::fcl::OcTree, and hpp::fcl::BVHModelBase.

## ◆ computeMomentofInertia()

virtual Matrix3f hpp::fcl::CollisionGeometry::computeMomentofInertia | ( |  | ) | const
| inlinevirtual

compute the inertia matrix, related to the origin

Reimplemented in hpp::fcl::Cylinder, hpp::fcl::Cone, hpp::fcl::Capsule, hpp::fcl::Sphere, hpp::fcl::Box, hpp::fcl::Convex< PolygonT >, and hpp::fcl::BVHModelBase.

## ◆ computeMomentofInertiaRelatedToCOM()

virtual Matrix3f hpp::fcl::CollisionGeometry::computeMomentofInertiaRelatedToCOM | ( |  | ) | const
| inlinevirtual

compute the inertia matrix, related to the com

## ◆ computeVolume()

virtual FCL_REAL hpp::fcl::CollisionGeometry::computeVolume | ( |  | ) | const
| inlinevirtual

compute the volume

Reimplemented in hpp::fcl::Cylinder, hpp::fcl::Cone, hpp::fcl::Capsule, hpp::fcl::Sphere, hpp::fcl::Box, hpp::fcl::Convex< PolygonT >, and hpp::fcl::BVHModelBase.

## ◆ distance()

template<typename BV >

FCL_REAL hpp::fcl::BVNode< BV >::distance | ( | const BVNode< BV > & | other,
|  | Vec3f * | P1 = `NULL`,
|  | Vec3f * | P2 = `NULL`
| ) |  | const
| inline

Compute the distance between two BVNode. P1 and P2, if not NULL and the underlying BV supports distance, return the nearest points.

## ◆ getAABB()

const AABB& hpp::fcl::CollisionObject::getAABB | ( |  | ) | const
| inline

get the AABB in world space

## ◆ getCenter()

template<typename BV >

Vec3f hpp::fcl::BVNode< BV >::getCenter | ( |  | ) | const
| inline

Access to the center of the BV.

## ◆ getNodeType() [1/2]

virtual NODE_TYPE hpp::fcl::CollisionGeometry::getNodeType | ( |  | ) | const
| inlinevirtual

get the node type

Reimplemented in hpp::fcl::Plane, hpp::fcl::Halfspace, hpp::fcl::ConvexBase, hpp::fcl::Cylinder, hpp::fcl::Cone, hpp::fcl::Capsule, hpp::fcl::Sphere, hpp::fcl::Box, hpp::fcl::TriangleP, hpp::fcl::OcTree, hpp::fcl::BVHModel< BV >, hpp::fcl::BVHModel< BV >, hpp::fcl::BVHModel< BV >, hpp::fcl::BVHModel< BV >, hpp::fcl::BVHModel< BV >, hpp::fcl::BVHModel< BV >, hpp::fcl::BVHModel< BV >, hpp::fcl::BVHModel< BV >, and hpp::fcl::BVHModel< BV >.

## ◆ getNodeType() [2/2]

NODE_TYPE hpp::fcl::CollisionObject::getNodeType | ( |  | ) | const
| inline

get the node type

## ◆ getObjectType() [1/2]

virtual OBJECT_TYPE hpp::fcl::CollisionGeometry::getObjectType | ( |  | ) | const
| inlinevirtual

get the type of the object

Reimplemented in hpp::fcl::ShapeBase, hpp::fcl::OcTree, and hpp::fcl::BVHModelBase.

## ◆ getObjectType() [2/2]

OBJECT_TYPE hpp::fcl::CollisionObject::getObjectType | ( |  | ) | const
| inline

get the type of the object

## ◆ getOrientation()

template<typename BV >

const Matrix3f& hpp::fcl::BVNode< BV >::getOrientation | ( |  | ) | const
| inline

Access to the orientation of the BV.

## ◆ getRotation()

const Matrix3f& hpp::fcl::CollisionObject::getRotation | ( |  | ) | const
| inline

get matrix rotation of the object

## ◆ getTransform()

const Transform3f& hpp::fcl::CollisionObject::getTransform | ( |  | ) | const
| inline

get object's transform

## ◆ getTranslation()

const Vec3f& hpp::fcl::CollisionObject::getTranslation | ( |  | ) | const
| inline

get translation of the object

## ◆ getUserData() [1/2]

void* hpp::fcl::CollisionGeometry::getUserData | ( |  | ) | const
| inline

get user data in geometry

## ◆ getUserData() [2/2]

void* hpp::fcl::CollisionObject::getUserData | ( |  | ) | const
| inline

get user data in object

## ◆ isFree()

bool hpp::fcl::CollisionGeometry::isFree | ( |  | ) | const
| inline

whether the object is completely free

## ◆ isIdentityTransform()

bool hpp::fcl::CollisionObject::isIdentityTransform | ( |  | ) | const
| inline

whether the object is in local coordinate

## ◆ isLeaf()

bool hpp::fcl::BVNodeBase::isLeaf | ( |  | ) | const
| inline

Whether current node is a leaf node (i.e. contains a primitive index.

## ◆ isOccupied()

bool hpp::fcl::CollisionGeometry::isOccupied | ( |  | ) | const
| inline

whether the object is completely occupied

## ◆ isUncertain()

bool hpp::fcl::CollisionGeometry::isUncertain | ( |  | ) | const

whether the object has some uncertainty

## ◆ leftChild()

int hpp::fcl::BVNodeBase::leftChild | ( |  | ) | const
| inline

Return the index of the first child. The index is referred to the bounding volume array (i.e. bvs) in BVHModel.

## ◆ operator!=() [1/3]

template<typename BV >

bool hpp::fcl::BVNode< BV >::operator!= | ( | const BVNode< BV > & | other | ) | const
| inline

Difference operator.

## ◆ operator!=() [2/3]

bool hpp::fcl::BVNodeBase::operator!= | ( | const BVNodeBase & | other | ) | const
| inline

Difference operator.

## ◆ operator!=() [3/3]

bool hpp::fcl::CollisionGeometry::operator!= | ( | const CollisionGeometry & | other | ) | const
| inline

Difference operator.

## ◆ operator==() [1/3]

template<typename BV >

bool hpp::fcl::BVNode< BV >::operator== | ( | const BVNode< BV > & | other | ) | const
| inline

Equality operator.

## ◆ operator==() [2/3]

bool hpp::fcl::BVNodeBase::operator== | ( | const BVNodeBase & | other | ) | const
| inline

Equality operator.

## ◆ operator==() [3/3]

bool hpp::fcl::CollisionGeometry::operator== | ( | const CollisionGeometry & | other | ) | const
| inline

Equality operator.

## ◆ overlap() [1/2]

template<typename BV >

bool hpp::fcl::BVNode< BV >::overlap | ( | const BVNode< BV > & | other | ) | const
| inline

Check whether two BVNode collide.

## ◆ overlap() [2/2]

template<typename BV >

bool hpp::fcl::BVNode< BV >::overlap | ( | const BVNode< BV > & | other,
|  | const CollisionRequest & | request,
|  | FCL_REAL & | sqrDistLowerBound
| ) |  | const
| inline

Check whether two BVNode collide.

## ◆ primitiveId()

int hpp::fcl::BVNodeBase::primitiveId | ( |  | ) | const
| inline

Return the primitive index. The index is referred to the original data (i.e. vertices or tri_indices) in BVHModel.

## ◆ rightChild()

int hpp::fcl::BVNodeBase::rightChild | ( |  | ) | const
| inline

Return the index of the second child. The index is referred to the bounding volume array (i.e. bvs) in BVHModel.

## ◆ setIdentityTransform()

void hpp::fcl::CollisionObject::setIdentityTransform | ( |  | ) |
| inline

set the object in local coordinate

## ◆ setRotation()

void hpp::fcl::CollisionObject::setRotation | ( | const Matrix3f & | R | ) |
| inline

set object's rotation matrix

## ◆ setTransform() [1/2]

void hpp::fcl::CollisionObject::setTransform | ( | const Matrix3f & | R,
|  | const Vec3f & | T
| ) |  |
| inline

set object's transform

## ◆ setTransform() [2/2]

void hpp::fcl::CollisionObject::setTransform | ( | const Transform3f & | tf | ) |
| inline

set object's transform

## ◆ setTranslation()

void hpp::fcl::CollisionObject::setTranslation | ( | const Vec3f & | T | ) |
| inline

set object's translation

## ◆ setUserData() [1/2]

void hpp::fcl::CollisionGeometry::setUserData | ( | void * | data | ) |
| inline

set user data in geometry

## ◆ setUserData() [2/2]

void hpp::fcl::CollisionObject::setUserData | ( | void * | data | ) |
| inline

set user data in object

## ◆ ~CollisionGeometry()

virtual hpp::fcl::CollisionGeometry::~CollisionGeometry | ( |  | ) |
| inlinevirtual

## ◆ ~CollisionObject()

hpp::fcl::CollisionObject::~CollisionObject | ( |  | ) |
| inline

## Variable Documentation

## ◆ aabb

AABB hpp::fcl::CollisionObject::aabb
| mutableprotected

AABB in global coordinate.

## ◆ aabb_center

Vec3f hpp::fcl::CollisionGeometry::aabb_center

AABB center in local coordinate.

## ◆ aabb_local

AABB hpp::fcl::CollisionGeometry::aabb_local

AABB in local coordinate, used for tight AABB when only translation transform.

## ◆ aabb_radius

FCL_REAL hpp::fcl::CollisionGeometry::aabb_radius

AABB radius.

## ◆ bv

template<typename BV >

BV hpp::fcl::BVNode< BV >::bv

bounding volume storing the geometry

## ◆ cgeom

shared_ptr<CollisionGeometry> hpp::fcl::CollisionObject::cgeom
| protected

## ◆ cgeom_const

shared_ptr<const CollisionGeometry> hpp::fcl::CollisionObject::cgeom_const
| protected

## ◆ cost_density

FCL_REAL hpp::fcl::CollisionGeometry::cost_density

collision cost for unit volume

## ◆ first_child

int hpp::fcl::BVNodeBase::first_child

An index for first child node or primitive If the value is positive, it is the index of the first child bv node If the value is negative, it is -(primitive index + 1) Zero is not used.

## ◆ first_primitive

int hpp::fcl::BVNodeBase::first_primitive

The start id the primitive belonging to the current node. The index is referred to the primitive_indices in BVHModel and from that we can obtain the primitive's index in original data indirectly.

## ◆ num_primitives

int hpp::fcl::BVNodeBase::num_primitives

The number of primitives belonging to the current node.

## ◆ t

Transform3f hpp::fcl::CollisionObject::t
| protected

## ◆ threshold_free

FCL_REAL hpp::fcl::CollisionGeometry::threshold_free

threshold for free (<= is free)

## ◆ threshold_occupied

FCL_REAL hpp::fcl::CollisionGeometry::threshold_occupied

threshold for occupied ( >= is occupied)

## ◆ user_data [1/2]

void* hpp::fcl::CollisionGeometry::user_data

pointer to user defined data specific to this object

## ◆ user_data [2/2]

void* hpp::fcl::CollisionObject::user_data
| protected

pointer to user defined data specific to this object