38 #ifndef HPP_FCL_BV_NODE_H
39 #define HPP_FCL_BV_NODE_H
71 (std::numeric_limits<unsigned int>::max)())
88 inline bool isLeaf()
const {
return first_child < 0; }
96 inline int leftChild()
const {
return first_child; }
106 template <
typename BV>
115 return Base::operator==(other) && bv == other.
bv;
125 FCL_REAL& sqrDistLowerBound)
const {
126 return bv.overlap(other.
bv, request, sqrDistLowerBound);
132 Vec3f* P2 = NULL)
const {
133 return bv.distance(other.
bv, P1, P2);
141 static const Matrix3f id3 = Matrix3f::Identity();
146 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
#define HPP_FCL_DLLAPI
Definition: config.hh:88
int first_child
An index for first child node or primitive If the value is positive, it is the index of the first chi...
Definition: BV_node.h:57
bool operator!=(const BVNodeBase &other) const
Difference operator.
Definition: BV_node.h:84
bool operator!=(const BVNode &other) const
Difference operator.
Definition: BV_node.h:119
unsigned int first_primitive
The start id the primitive belonging to the current node. The index is referred to the primitive_indi...
Definition: BV_node.h:62
int rightChild() const
Return the index of the second child. The index is referred to the bounding volume array (i....
Definition: BV_node.h:100
int leftChild() const
Return the index of the first child. The index is referred to the bounding volume array (i....
Definition: BV_node.h:96
FCL_REAL 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 distan...
Definition: BV_node.h:131
BV bv
bounding volume storing the geometry
Definition: BV_node.h:111
BVNodeBase()
Default constructor.
Definition: BV_node.h:68
bool operator==(const BVNodeBase &other) const
Equality operator.
Definition: BV_node.h:77
bool operator==(const BVNode &other) const
Equality operator.
Definition: BV_node.h:114
const Matrix3f & getOrientation() const
Access to the orientation of the BV.
Definition: BV_node.h:140
BVNodeBase Base
Definition: BV_node.h:108
unsigned int num_primitives
The number of primitives belonging to the current node.
Definition: BV_node.h:65
Vec3f getCenter() const
Access to the center of the BV.
Definition: BV_node.h:137
bool isLeaf() const
Whether current node is a leaf node (i.e. contains a primitive index.
Definition: BV_node.h:88
int primitiveId() const
Return the primitive index. The index is referred to the original data (i.e. vertices or tri_indices)...
Definition: BV_node.h:92
bool overlap(const BVNode &other) const
Check whether two BVNode collide.
Definition: BV_node.h:122
bool overlap(const BVNode &other, const CollisionRequest &request, FCL_REAL &sqrDistLowerBound) const
Check whether two BVNode collide.
Definition: BV_node.h:124
Eigen::Matrix< FCL_REAL, 3, 3 > Matrix3f
Definition: data_types.h:71
Eigen::Matrix< FCL_REAL, 3, 1 > Vec3f
Definition: data_types.h:67
double FCL_REAL
Definition: data_types.h:66
Main namespace.
Definition: broadphase_bruteforce.h:44
BVNodeBase encodes the tree structure for BVH.
Definition: BV_node.h:52
A class describing a bounding volume node. It includes the tree structure providing in BVNodeBase and...
Definition: BV_node.h:107
request to the collision algorithm
Definition: collision_data.h:312