Go to the documentation of this file.
38 #ifndef COAL_BV_NODE_H
39 #define COAL_BV_NODE_H
70 (std::numeric_limits<unsigned int>::max)())
87 inline bool isLeaf()
const {
return first_child < 0; }
95 inline int leftChild()
const {
return first_child; }
99 inline int rightChild()
const {
return first_child + 1; }
105 template <
typename BV>
114 return Base::operator==(other) && bv == other.
bv;
125 return bv.overlap(other.
bv, request, sqrDistLowerBound);
132 return bv.distance(other.
bv,
P1,
P2);
140 static const Matrix3s id3 = Matrix3s::Identity();
145 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
CoalScalar distance(const BVNode &other, Vec3s *P1=NULL, Vec3s *P2=NULL) const
Compute the distance between two BVNode. P1 and P2, if not NULL and the underlying BV supports distan...
int primitiveId() const
Return the primitive index. The index is referred to the original data (i.e. vertices or tri_indices)...
bool operator==(const BVNodeBase &other) const
Equality operator.
Vec3s getCenter() const
Access to the center of the BV.
Eigen::Matrix< CoalScalar, 3, 1 > Vec3s
const Matrix3s & getOrientation() const
Access to the orientation of the BV.
BVNodeBase encodes the tree structure for BVH.
unsigned int num_primitives
The number of primitives belonging to the current node.
int rightChild() const
Return the index of the second child. The index is referred to the bounding volume array (i....
int first_child
An index for first child node or primitive If the value is positive, it is the index of the first chi...
bool overlap(const BVNode &other) const
Check whether two BVNode collide.
BV bv
bounding volume storing the geometry
request to the collision algorithm
unsigned int first_primitive
The start id the primitive belonging to the current node. The index is referred to the primitive_indi...
A class describing a bounding volume node. It includes the tree structure providing in BVNodeBase and...
bool operator!=(const BVNodeBase &other) const
Difference operator.
bool overlap(const BVNode &other, const CollisionRequest &request, CoalScalar &sqrDistLowerBound) const
Check whether two BVNode collide.
Eigen::Matrix< CoalScalar, 3, 3 > Matrix3s
bool operator!=(const BVNode &other) const
Difference operator.
BVNodeBase()
Default constructor.
bool isLeaf() const
Whether current node is a leaf node (i.e. contains a primitive index.
bool operator==(const BVNode &other) const
Equality operator.
int leftChild() const
Return the index of the first child. The index is referred to the bounding volume array (i....
hpp-fcl
Author(s):
autogenerated on Sat Nov 23 2024 03:44:57