Public Types | Public Member Functions | Public Attributes | List of all members
hpp::fcl::MeshCollisionTraversalNode< BV, _Options > Class Template Reference

Traversal node for collision between two meshes. More...

#include <hpp/fcl/traversal/traversal_node_bvhs.h>

Inheritance diagram for hpp::fcl::MeshCollisionTraversalNode< BV, _Options >:
[legend]
Collaboration diagram for hpp::fcl::MeshCollisionTraversalNode< BV, _Options >:
[legend]

Public Types

enum  {
  Options = _Options,
  RTIsIdentity = _Options & RelativeTransformationIsIdentity
}
 

Public Member Functions

 MeshCollisionTraversalNode (const CollisionRequest &request)
 
bool BVTesting (int b1, int b2) const
 BV culling test in one BVTT node. More...
 
bool BVTesting (int b1, int b2, FCL_REAL &sqrDistLowerBound) const
 BV test between b1 and b2. More...
 
void leafTesting (int b1, int b2, FCL_REAL &sqrDistLowerBound) const
 Intersection testing between leaves (two triangles) More...
 
bool canStop () const
 Whether the traversal process can stop early. More...
 
- Public Member Functions inherited from hpp::fcl::BVHCollisionTraversalNode< BV >
 BVHCollisionTraversalNode (const CollisionRequest &request)
 
bool isFirstNodeLeaf (int b) const
 Whether the BV node in the first BVH tree is leaf. More...
 
bool isSecondNodeLeaf (int b) const
 Whether the BV node in the second BVH tree is leaf. More...
 
bool firstOverSecond (int b1, int b2) const
 Determine the traversal order, is the first BVTT subtree better. More...
 
int getFirstLeftChild (int b) const
 Obtain the left child of BV node in the first BVH. More...
 
int getFirstRightChild (int b) const
 Obtain the right child of BV node in the first BVH. More...
 
int getSecondLeftChild (int b) const
 Obtain the left child of BV node in the second BVH. More...
 
int getSecondRightChild (int b) const
 Obtain the right child of BV node in the second BVH. More...
 
- Public Member Functions inherited from hpp::fcl::CollisionTraversalNodeBase
 CollisionTraversalNodeBase (const CollisionRequest &request_)
 
virtual ~CollisionTraversalNodeBase ()
 
void enableStatistics (bool enable)
 Whether store some statistics information during traversal. More...
 
- Public Member Functions inherited from hpp::fcl::TraversalNodeBase
virtual ~TraversalNodeBase ()
 
virtual void preprocess ()
 
virtual void postprocess ()
 

Public Attributes

Vec3fvertices1
 
Vec3fvertices2
 
Triangletri_indices1
 
Triangletri_indices2
 
details::RelativeTransformation<!bool(RTIsIdentity)> RT
 
- Public Attributes inherited from hpp::fcl::BVHCollisionTraversalNode< BV >
const BVHModel< BV > * model1
 The first BVH model. More...
 
const BVHModel< BV > * model2
 The second BVH model. More...
 
int num_bv_tests
 statistical information More...
 
int num_leaf_tests
 
FCL_REAL query_time_seconds
 
- Public Attributes inherited from hpp::fcl::CollisionTraversalNodeBase
const CollisionRequestrequest
 request setting for collision More...
 
CollisionResultresult
 collision result kept during the traversal iteration More...
 
bool enable_statistics
 Whether stores statistics. More...
 
- Public Attributes inherited from hpp::fcl::TraversalNodeBase
Transform3f tf1
 configuation of first object More...
 
Transform3f tf2
 configuration of second object More...
 

Detailed Description

template<typename BV, int _Options = RelativeTransformationIsIdentity>
class hpp::fcl::MeshCollisionTraversalNode< BV, _Options >

Traversal node for collision between two meshes.

Member Enumeration Documentation

template<typename BV, int _Options = RelativeTransformationIsIdentity>
anonymous enum
Enumerator
Options 
RTIsIdentity 

Constructor & Destructor Documentation

template<typename BV, int _Options = RelativeTransformationIsIdentity>
hpp::fcl::MeshCollisionTraversalNode< BV, _Options >::MeshCollisionTraversalNode ( const CollisionRequest request)
inline

Member Function Documentation

template<typename BV, int _Options = RelativeTransformationIsIdentity>
bool hpp::fcl::MeshCollisionTraversalNode< BV, _Options >::BVTesting ( int  b1,
int  b2 
) const
inlinevirtual
template<typename BV, int _Options = RelativeTransformationIsIdentity>
bool hpp::fcl::MeshCollisionTraversalNode< BV, _Options >::BVTesting ( int  b1,
int  b2,
FCL_REAL sqrDistLowerBound 
) const
inlinevirtual

BV test between b1 and b2.

Parameters
b1,b2Bounding volumes to test,
Return values
sqrDistLowerBoundsquare of a lower bound of the minimal distance between bounding volumes.

Implements hpp::fcl::CollisionTraversalNodeBase.

References hpp::fcl::CollisionTraversalNodeBase::enable_statistics, hpp::fcl::BVHCollisionTraversalNode< BV >::model1, hpp::fcl::BVHCollisionTraversalNode< BV >::model2, hpp::fcl::BVHCollisionTraversalNode< BV >::num_bv_tests, hpp::fcl::overlap(), and hpp::fcl::CollisionTraversalNodeBase::request.

template<typename BV, int _Options = RelativeTransformationIsIdentity>
bool hpp::fcl::MeshCollisionTraversalNode< BV, _Options >::canStop ( ) const
inlinevirtual
template<typename BV, int _Options = RelativeTransformationIsIdentity>
void hpp::fcl::MeshCollisionTraversalNode< BV, _Options >::leafTesting ( int  b1,
int  b2,
FCL_REAL sqrDistLowerBound 
) const
inlinevirtual

Intersection testing between leaves (two triangles)

Parameters
b1,b2id of primitive in bounding volume hierarchy
Return values
sqrDistLowerBoundsquared lower bound of distance between primitives if they are not in collision.

This method supports a security margin. If the distance between the primitives is less than the security margin, the objects are considered as in collision. in this case a contact point is returned in the CollisionResult.

Note
If the distance between objects is less than the security margin, and the object are not colliding, the penetration depth is negative.

Reimplemented from hpp::fcl::CollisionTraversalNodeBase.

References hpp::fcl::CollisionResult::addContact(), hpp::fcl::distance(), hpp::fcl::CollisionTraversalNodeBase::enable_statistics, hpp::fcl::BVHCollisionTraversalNode< BV >::model1, hpp::fcl::BVHCollisionTraversalNode< BV >::model2, hpp::fcl::BVHCollisionTraversalNode< BV >::num_leaf_tests, hpp::fcl::CollisionRequest::num_max_contacts, hpp::fcl::CollisionResult::numContacts(), hpp::fcl::BVNodeBase::primitiveId(), hpp::fcl::CollisionTraversalNodeBase::request, hpp::fcl::CollisionTraversalNodeBase::result, hpp::fcl::CollisionRequest::security_margin, hpp::fcl::GJKSolver_indep::shapeDistance(), hpp::fcl::TraversalNodeBase::tf1, and hpp::fcl::TraversalNodeBase::tf2.

Member Data Documentation

template<typename BV, int _Options = RelativeTransformationIsIdentity>
details::RelativeTransformation<!bool(RTIsIdentity)> hpp::fcl::MeshCollisionTraversalNode< BV, _Options >::RT
template<typename BV, int _Options = RelativeTransformationIsIdentity>
Triangle* hpp::fcl::MeshCollisionTraversalNode< BV, _Options >::tri_indices1

Referenced by hpp::fcl::initialize().

template<typename BV, int _Options = RelativeTransformationIsIdentity>
Triangle* hpp::fcl::MeshCollisionTraversalNode< BV, _Options >::tri_indices2

Referenced by hpp::fcl::initialize().

template<typename BV, int _Options = RelativeTransformationIsIdentity>
Vec3f* hpp::fcl::MeshCollisionTraversalNode< BV, _Options >::vertices1

Referenced by hpp::fcl::initialize().

template<typename BV, int _Options = RelativeTransformationIsIdentity>
Vec3f* hpp::fcl::MeshCollisionTraversalNode< BV, _Options >::vertices2

Referenced by hpp::fcl::initialize().