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...
#include <hpp/fcl/BVH/BVH_model.h>
Public Member Functions | |
BVHModelType | getModelType () const |
Model type described by the instance. | |
BVHModel () | |
Constructing an empty BVH. | |
BVHModel (const BVHModel &other) | |
copy from another BVH | |
~BVHModel () | |
deconstruction, delete mesh data related. | |
const BVNode< BV > & | getBV (int id) const |
We provide getBV() and getNumBVs() because BVH may be compressed (in future), so we must provide some flexibility here. | |
BVNode< BV > & | getBV (int id) |
Access the bv giving the its index. | |
int | getNumBVs () const |
Get the number of bv in the BVH. | |
OBJECT_TYPE | getObjectType () const |
Get the object type: it is a BVH. | |
NODE_TYPE | getNodeType () const |
Get the BV type: default is unknown. | |
void | computeLocalAABB () |
Compute the AABB for the BVH, used for broad-phase collision. | |
int | beginModel (int num_tris=0, int num_vertices=0) |
Begin a new BVH model. | |
int | addVertex (const Vec3f &p) |
Add one point in the new BVH model. | |
int | addTriangle (const Vec3f &p1, const Vec3f &p2, const Vec3f &p3) |
Add one triangle in the new BVH model. | |
int | addSubModel (const std::vector< Vec3f > &ps, const std::vector< Triangle > &ts) |
Add a set of triangles in the new BVH model. | |
int | addSubModel (const std::vector< Vec3f > &ps) |
Add a set of points in the new BVH model. | |
int | endModel () |
End BVH model construction, will build the bounding volume hierarchy. | |
int | beginReplaceModel () |
Replace the geometry information of current frame (i.e. should have the same mesh topology with the previous frame) | |
int | replaceVertex (const Vec3f &p) |
Replace one point in the old BVH model. | |
int | replaceTriangle (const Vec3f &p1, const Vec3f &p2, const Vec3f &p3) |
Replace one triangle in the old BVH model. | |
int | replaceSubModel (const std::vector< Vec3f > &ps) |
Replace a set of points in the old BVH model. | |
int | endReplaceModel (bool refit=true, bool bottomup=true) |
End BVH model replacement, will also refit or rebuild the bounding volume hierarchy. | |
int | beginUpdateModel () |
Replace the geometry information of current frame (i.e. | |
int | updateVertex (const Vec3f &p) |
Update one point in the old BVH model. | |
int | updateTriangle (const Vec3f &p1, const Vec3f &p2, const Vec3f &p3) |
Update one triangle in the old BVH model. | |
int | updateSubModel (const std::vector< Vec3f > &ps) |
Update a set of points in the old BVH model. | |
int | endUpdateModel (bool refit=true, bool bottomup=true) |
End BVH model update, will also refit or rebuild the bounding volume hierarchy. | |
int | memUsage (int msg) const |
Check the number of memory used. | |
void | makeParentRelative () |
This is a special acceleration: BVH_model default stores the BV's transform in world coordinate. | |
Vec3f | computeCOM () const |
compute center of mass | |
FCL_REAL | computeVolume () const |
compute the volume | |
Matrix3f | computeMomentofInertia () const |
compute the inertia matrix, related to the origin | |
template<> | |
NODE_TYPE | getNodeType () const |
get the node type | |
template<> | |
NODE_TYPE | getNodeType () const |
get the node type | |
template<> | |
NODE_TYPE | getNodeType () const |
get the node type | |
template<> | |
NODE_TYPE | getNodeType () const |
get the node type | |
template<> | |
NODE_TYPE | getNodeType () const |
get the node type | |
template<> | |
NODE_TYPE | getNodeType () const |
get the node type | |
template<> | |
NODE_TYPE | getNodeType () const |
get the node type | |
template<> | |
NODE_TYPE | getNodeType () const |
get the node type | |
Public Attributes | |
Vec3f * | vertices |
Geometry point data. | |
Triangle * | tri_indices |
Geometry triangle index data, will be NULL for point clouds. | |
Vec3f * | prev_vertices |
Geometry point data in previous frame. | |
int | num_tris |
Number of triangles. | |
int | num_vertices |
Number of points. | |
BVHBuildState | build_state |
The state of BVH building process. | |
boost::shared_ptr < BVSplitterBase< BV > > | bv_splitter |
Split rule to split one BV node into two children. | |
boost::shared_ptr < BVFitterBase< BV > > | bv_fitter |
Fitting rule to fit a BV node to a set of geometry primitives. |
A class describing the bounding hierarchy of a mesh model or a point cloud model (which is viewed as a degraded version of mesh)
fcl::BVHModel< BV >::BVHModel | ( | ) | [inline] |
Constructing an empty BVH.
fcl::BVHModel< BV >::BVHModel | ( | const BVHModel< BV > & | other | ) |
copy from another BVH
fcl::BVHModel< BV >::~BVHModel | ( | ) | [inline] |
deconstruction, delete mesh data related.
int fcl::BVHModel< BV >::addSubModel | ( | const std::vector< Vec3f > & | ps, |
const std::vector< Triangle > & | ts | ||
) |
Add a set of triangles in the new BVH model.
Referenced by fcl::generateBVHModel().
int fcl::BVHModel< BV >::addSubModel | ( | const std::vector< Vec3f > & | ps | ) |
Add a set of points in the new BVH model.
int fcl::BVHModel< BV >::addTriangle | ( | const Vec3f & | p1, |
const Vec3f & | p2, | ||
const Vec3f & | p3 | ||
) |
Add one triangle in the new BVH model.
int fcl::BVHModel< BV >::addVertex | ( | const Vec3f & | p | ) |
Add one point in the new BVH model.
int fcl::BVHModel< BV >::beginModel | ( | int | num_tris = 0 , |
int | num_vertices = 0 |
||
) |
Begin a new BVH model.
Referenced by fcl::generateBVHModel().
int fcl::BVHModel< BV >::beginReplaceModel | ( | ) |
Replace the geometry information of current frame (i.e. should have the same mesh topology with the previous frame)
Referenced by fcl::initialize().
int fcl::BVHModel< BV >::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.
Vec3f fcl::BVHModel< BV >::computeCOM | ( | ) | const [inline, virtual] |
compute center of mass
Reimplemented from fcl::CollisionGeometry.
void fcl::BVHModel< BV >::computeLocalAABB | ( | ) | [virtual] |
Compute the AABB for the BVH, used for broad-phase collision.
Implements fcl::CollisionGeometry.
Referenced by fcl::generateBVHModel().
Matrix3f fcl::BVHModel< BV >::computeMomentofInertia | ( | ) | const [inline, virtual] |
compute the inertia matrix, related to the origin
Reimplemented from fcl::CollisionGeometry.
FCL_REAL fcl::BVHModel< BV >::computeVolume | ( | ) | const [inline, virtual] |
compute the volume
Reimplemented from fcl::CollisionGeometry.
int fcl::BVHModel< BV >::endModel | ( | ) |
End BVH model construction, will build the bounding volume hierarchy.
Referenced by fcl::generateBVHModel().
int fcl::BVHModel< BV >::endReplaceModel | ( | bool | refit = true , |
bool | bottomup = true |
||
) |
End BVH model replacement, will also refit or rebuild the bounding volume hierarchy.
Referenced by fcl::initialize().
int fcl::BVHModel< BV >::endUpdateModel | ( | bool | refit = true , |
bool | bottomup = true |
||
) |
End BVH model update, will also refit or rebuild the bounding volume hierarchy.
const BVNode<BV>& fcl::BVHModel< BV >::getBV | ( | int | id | ) | const [inline] |
We provide getBV() and getNumBVs() because BVH may be compressed (in future), so we must provide some flexibility here.
Access the bv giving the its index
Referenced by fcl::BVHExpand(), fcl::MeshShapeCollisionTraversalNodeOBB< S, NarrowPhaseSolver >::BVTesting(), fcl::MeshShapeCollisionTraversalNodeRSS< S, NarrowPhaseSolver >::BVTesting(), fcl::MeshShapeCollisionTraversalNodekIOS< S, NarrowPhaseSolver >::BVTesting(), fcl::MeshShapeCollisionTraversalNodeOBBRSS< S, NarrowPhaseSolver >::BVTesting(), fcl::ShapeMeshCollisionTraversalNodeOBB< S, NarrowPhaseSolver >::BVTesting(), fcl::ShapeMeshCollisionTraversalNodeRSS< S, NarrowPhaseSolver >::BVTesting(), fcl::ShapeMeshCollisionTraversalNodekIOS< S, NarrowPhaseSolver >::BVTesting(), and fcl::ShapeMeshCollisionTraversalNodeOBBRSS< S, NarrowPhaseSolver >::BVTesting().
BVNode<BV>& fcl::BVHModel< BV >::getBV | ( | int | id | ) | [inline] |
Access the bv giving the its index.
BVHModelType fcl::BVHModel< BV >::getModelType | ( | ) | const [inline] |
Model type described by the instance.
Referenced by fcl::initialize(), and fcl::details::setupShapeMeshDistanceOrientedNode().
NODE_TYPE fcl::BVHModel< BV >::getNodeType | ( | ) | const [inline, virtual] |
Get the BV type: default is unknown.
Reimplemented from fcl::CollisionGeometry.
NODE_TYPE fcl::BVHModel< AABB >::getNodeType | ( | ) | const [virtual] |
get the node type
Reimplemented from fcl::CollisionGeometry.
NODE_TYPE fcl::BVHModel< OBB >::getNodeType | ( | ) | const [virtual] |
get the node type
Reimplemented from fcl::CollisionGeometry.
NODE_TYPE fcl::BVHModel< RSS >::getNodeType | ( | ) | const [virtual] |
get the node type
Reimplemented from fcl::CollisionGeometry.
NODE_TYPE fcl::BVHModel< kIOS >::getNodeType | ( | ) | const [virtual] |
get the node type
Reimplemented from fcl::CollisionGeometry.
NODE_TYPE fcl::BVHModel< OBBRSS >::getNodeType | ( | ) | const [virtual] |
get the node type
Reimplemented from fcl::CollisionGeometry.
NODE_TYPE fcl::BVHModel< KDOP< 16 > >::getNodeType | ( | ) | const [virtual] |
get the node type
Reimplemented from fcl::CollisionGeometry.
NODE_TYPE fcl::BVHModel< KDOP< 18 > >::getNodeType | ( | ) | const [virtual] |
get the node type
Reimplemented from fcl::CollisionGeometry.
NODE_TYPE fcl::BVHModel< KDOP< 24 > >::getNodeType | ( | ) | const [virtual] |
get the node type
Reimplemented from fcl::CollisionGeometry.
int fcl::BVHModel< BV >::getNumBVs | ( | ) | const [inline] |
Get the number of bv in the BVH.
OBJECT_TYPE fcl::BVHModel< BV >::getObjectType | ( | ) | const [inline, virtual] |
Get the object type: it is a BVH.
Reimplemented from fcl::CollisionGeometry.
void fcl::BVHModel< BV >::makeParentRelative | ( | ) | [inline] |
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.
int fcl::BVHModel< BV >::memUsage | ( | int | msg | ) | const |
Check the number of memory used.
int fcl::BVHModel< BV >::replaceSubModel | ( | const std::vector< Vec3f > & | ps | ) |
Replace a set of points in the old BVH model.
Referenced by fcl::initialize().
int fcl::BVHModel< BV >::replaceTriangle | ( | const Vec3f & | p1, |
const Vec3f & | p2, | ||
const Vec3f & | p3 | ||
) |
Replace one triangle in the old BVH model.
int fcl::BVHModel< BV >::replaceVertex | ( | const Vec3f & | p | ) |
Replace one point in the old BVH model.
int fcl::BVHModel< BV >::updateSubModel | ( | const std::vector< Vec3f > & | ps | ) |
Update a set of points in the old BVH model.
int fcl::BVHModel< BV >::updateTriangle | ( | const Vec3f & | p1, |
const Vec3f & | p2, | ||
const Vec3f & | p3 | ||
) |
Update one triangle in the old BVH model.
int fcl::BVHModel< BV >::updateVertex | ( | const Vec3f & | p | ) |
Update one point in the old BVH model.
BVHBuildState fcl::BVHModel< BV >::build_state |
The state of BVH building process.
boost::shared_ptr<BVFitterBase<BV> > fcl::BVHModel< BV >::bv_fitter |
Fitting rule to fit a BV node to a set of geometry primitives.
boost::shared_ptr<BVSplitterBase<BV> > fcl::BVHModel< BV >::bv_splitter |
Split rule to split one BV node into two children.
int fcl::BVHModel< BV >::num_tris |
Number of triangles.
Referenced by fcl::BVHModel< OBBRSS >::computeCOM(), fcl::BVHModel< OBBRSS >::computeMomentofInertia(), fcl::BVHModel< OBBRSS >::computeVolume(), and fcl::BVHModel< OBBRSS >::getModelType().
int fcl::BVHModel< BV >::num_vertices |
Number of points.
Referenced by fcl::BVHModel< OBBRSS >::getModelType(), and fcl::initialize().
Vec3f* fcl::BVHModel< BV >::prev_vertices |
Geometry point data in previous frame.
Referenced by fcl::BVHModel< OBBRSS >::~BVHModel().
Triangle* fcl::BVHModel< BV >::tri_indices |
Geometry triangle index data, will be NULL for point clouds.
Referenced by fcl::BVHModel< OBBRSS >::computeCOM(), fcl::BVHModel< OBBRSS >::computeMomentofInertia(), fcl::BVHModel< OBBRSS >::computeVolume(), fcl::initialize(), fcl::details::setupShapeMeshDistanceOrientedNode(), and fcl::BVHModel< OBBRSS >::~BVHModel().
Vec3f* fcl::BVHModel< BV >::vertices |