hpp-fcl
1.4.4
HPP fork of FCL -- The Flexible Collision Library
|
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...
#include <hpp/fcl/BVH/BVH_model.h>
Public Member Functions | |
BVHModelType | getModelType () const |
Model type described by the instance. More... | |
BVHModelBase () | |
Constructing an empty BVH. More... | |
BVHModelBase (const BVHModelBase &other) | |
copy from another BVH More... | |
virtual | ~BVHModelBase () |
deconstruction, delete mesh data related. More... | |
OBJECT_TYPE | getObjectType () const |
Get the object type: it is a BVH. More... | |
void | computeLocalAABB () |
Compute the AABB for the BVH, used for broad-phase collision. More... | |
int | beginModel (int num_tris=0, int num_vertices=0) |
Begin a new BVH model. More... | |
int | addVertex (const Vec3f &p) |
Add one point in the new BVH model. More... | |
int | addTriangle (const Vec3f &p1, const Vec3f &p2, const Vec3f &p3) |
Add one triangle in the new BVH model. More... | |
int | addSubModel (const std::vector< Vec3f > &ps, const std::vector< Triangle > &ts) |
Add a set of triangles in the new BVH model. More... | |
int | addSubModel (const std::vector< Vec3f > &ps) |
Add a set of points in the new BVH model. More... | |
int | endModel () |
End BVH model construction, will build the bounding volume hierarchy. More... | |
int | beginReplaceModel () |
Replace the geometry information of current frame (i.e. should have the same mesh topology with the previous frame) More... | |
int | replaceVertex (const Vec3f &p) |
Replace one point in the old BVH model. More... | |
int | replaceTriangle (const Vec3f &p1, const Vec3f &p2, const Vec3f &p3) |
Replace one triangle in the old BVH model. More... | |
int | replaceSubModel (const std::vector< Vec3f > &ps) |
Replace a set of points in the old BVH model. More... | |
int | endReplaceModel (bool refit=true, bool bottomup=true) |
End BVH model replacement, will also refit or rebuild the bounding volume hierarchy. More... | |
int | beginUpdateModel () |
Replace the geometry information of current frame (i.e. should have the same mesh topology with the previous frame). The current frame will be saved as the previous frame in prev_vertices. More... | |
int | updateVertex (const Vec3f &p) |
Update one point in the old BVH model. More... | |
int | updateTriangle (const Vec3f &p1, const Vec3f &p2, const Vec3f &p3) |
Update one triangle in the old BVH model. More... | |
int | updateSubModel (const std::vector< Vec3f > &ps) |
Update a set of points in the old BVH model. More... | |
int | endUpdateModel (bool refit=true, bool bottomup=true) |
End BVH model update, will also refit or rebuild the bounding volume hierarchy. More... | |
void | buildConvexRepresentation (bool share_memory) |
Build this Convex<Triangle> representation of this model. More... | |
virtual int | memUsage (int msg) const =0 |
virtual void | makeParentRelative ()=0 |
This is a special acceleration: BVH_model default stores the BV's transform in world coordinate. However, we can also store each BV's transform related to its parent BV node. When traversing the BVH, this can save one matrix transformation. More... | |
Vec3f | computeCOM () const |
compute center of mass More... | |
FCL_REAL | computeVolume () const |
compute the volume More... | |
Matrix3f | computeMomentofInertia () const |
compute the inertia matrix, related to the origin More... | |
Public Member Functions inherited from hpp::fcl::CollisionGeometry | |
CollisionGeometry () | |
virtual | ~CollisionGeometry () |
virtual NODE_TYPE | getNodeType () const |
get the node type More... | |
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 | |
Vec3f * | vertices |
Geometry point data. More... | |
Triangle * | tri_indices |
Geometry triangle index data, will be NULL for point clouds. More... | |
Vec3f * | prev_vertices |
Geometry point data in previous frame. More... | |
int | num_tris |
Number of triangles. More... | |
int | num_vertices |
Number of points. More... | |
BVHBuildState | build_state |
The state of BVH building process. More... | |
boost::shared_ptr< ConvexBase > | convex |
Convex<Triangle> representation of this object. 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 | |
virtual void | deleteBVs ()=0 |
virtual bool | allocateBVs ()=0 |
virtual int | buildTree ()=0 |
Build the bounding volume hierarchy. More... | |
virtual int | refitTree (bool bottomup)=0 |
Refit the bounding volume hierarchy. More... | |
Protected Attributes | |
int | num_tris_allocated |
int | num_vertices_allocated |
int | num_vertex_updated |
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)
|
inline |
Constructing an empty BVH.
hpp::fcl::BVHModelBase::BVHModelBase | ( | const BVHModelBase & | other | ) |
copy from another BVH
|
inlinevirtual |
deconstruction, delete mesh data related.
int hpp::fcl::BVHModelBase::addSubModel | ( | const std::vector< Vec3f > & | ps, |
const std::vector< Triangle > & | ts | ||
) |
Add a set of triangles in the new BVH model.
int hpp::fcl::BVHModelBase::addSubModel | ( | const std::vector< Vec3f > & | ps | ) |
Add a set of points in the new BVH model.
Add one triangle in the new BVH model.
int hpp::fcl::BVHModelBase::addVertex | ( | const Vec3f & | p | ) |
Add one point in the new BVH model.
|
protectedpure virtual |
int hpp::fcl::BVHModelBase::beginModel | ( | int | num_tris = 0 , |
int | num_vertices = 0 |
||
) |
Begin a new BVH model.
int hpp::fcl::BVHModelBase::beginReplaceModel | ( | ) |
Replace the geometry information of current frame (i.e. should have the same mesh topology with the previous frame)
int hpp::fcl::BVHModelBase::beginUpdateModel | ( | ) |
Replace the geometry information of current frame (i.e. should have the same mesh topology with the previous frame). The current frame will be saved as the previous frame in prev_vertices.
void hpp::fcl::BVHModelBase::buildConvexRepresentation | ( | bool | share_memory | ) |
Build this Convex<Triangle> representation of this model.
|
protectedpure virtual |
Build the bounding volume hierarchy.
|
inlinevirtual |
compute center of mass
Reimplemented from hpp::fcl::CollisionGeometry.
|
virtual |
Compute the AABB for the BVH, used for broad-phase collision.
Implements hpp::fcl::CollisionGeometry.
|
inlinevirtual |
compute the inertia matrix, related to the origin
Reimplemented from hpp::fcl::CollisionGeometry.
|
inlinevirtual |
compute the volume
Reimplemented from hpp::fcl::CollisionGeometry.
|
protectedpure virtual |
int hpp::fcl::BVHModelBase::endModel | ( | ) |
End BVH model construction, will build the bounding volume hierarchy.
int hpp::fcl::BVHModelBase::endReplaceModel | ( | bool | refit = true , |
bool | bottomup = true |
||
) |
End BVH model replacement, will also refit or rebuild the bounding volume hierarchy.
int hpp::fcl::BVHModelBase::endUpdateModel | ( | bool | refit = true , |
bool | bottomup = true |
||
) |
End BVH model update, will also refit or rebuild the bounding volume hierarchy.
|
inline |
Model type described by the instance.
|
inlinevirtual |
Get the object type: it is a BVH.
Reimplemented from hpp::fcl::CollisionGeometry.
|
pure virtual |
This is a special acceleration: BVH_model default stores the BV's transform in world coordinate. However, we can also store each BV's transform related to its parent BV node. When traversing the BVH, this can save one matrix transformation.
Implemented in hpp::fcl::BVHModel< BV >.
|
pure virtual |
Implemented in hpp::fcl::BVHModel< BV >.
|
protectedpure virtual |
Refit the bounding volume hierarchy.
int hpp::fcl::BVHModelBase::replaceSubModel | ( | const std::vector< Vec3f > & | ps | ) |
Replace a set of points in the old BVH model.
int hpp::fcl::BVHModelBase::replaceTriangle | ( | const Vec3f & | p1, |
const Vec3f & | p2, | ||
const Vec3f & | p3 | ||
) |
Replace one triangle in the old BVH model.
int hpp::fcl::BVHModelBase::replaceVertex | ( | const Vec3f & | p | ) |
Replace one point in the old BVH model.
int hpp::fcl::BVHModelBase::updateSubModel | ( | const std::vector< Vec3f > & | ps | ) |
Update a set of points in the old BVH model.
Update one triangle in the old BVH model.
int hpp::fcl::BVHModelBase::updateVertex | ( | const Vec3f & | p | ) |
Update one point in the old BVH model.
BVHBuildState hpp::fcl::BVHModelBase::build_state |
The state of BVH building process.
boost::shared_ptr< ConvexBase > hpp::fcl::BVHModelBase::convex |
Convex<Triangle> representation of this object.
int hpp::fcl::BVHModelBase::num_tris |
Number of triangles.
|
protected |
|
protected |
int hpp::fcl::BVHModelBase::num_vertices |
Number of points.
|
protected |
Vec3f* hpp::fcl::BVHModelBase::prev_vertices |
Geometry point data in previous frame.
Triangle* hpp::fcl::BVHModelBase::tri_indices |
Geometry triangle index data, will be NULL for point clouds.
Vec3f* hpp::fcl::BVHModelBase::vertices |
Geometry point data.