hpp-fcl  3.0.0
HPP fork of FCL -- The Flexible Collision Library
hfield.h
Go to the documentation of this file.
1 /*
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2021-2024, INRIA
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of Open Source Robotics Foundation nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  */
34 
37 #ifndef HPP_FCL_HEIGHT_FIELD_H
38 #define HPP_FCL_HEIGHT_FIELD_H
39 
40 #include "hpp/fcl/fwd.hh"
41 #include "hpp/fcl/data_types.h"
43 #include "hpp/fcl/BV/BV_node.h"
45 
46 #include <vector>
47 
48 namespace hpp {
49 namespace fcl {
50 
53 
55  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
56 
57  enum class FaceOrientation {
58  TOP = 1,
59  BOTTOM = 1,
60  NORTH = 2,
61  EAST = 4,
62  SOUTH = 8,
63  WEST = 16
64  };
65 
70  size_t first_child;
71 
72  Eigen::DenseIndex x_id, x_size;
73  Eigen::DenseIndex y_id, y_size;
74 
77 
80  : first_child(0),
81  x_id(-1),
82  x_size(0),
83  y_id(-1),
84  y_size(0),
85  max_height(std::numeric_limits<FCL_REAL>::lowest()),
86  contact_active_faces(0) {}
87 
89  bool operator==(const HFNodeBase& other) const {
90  return first_child == other.first_child && x_id == other.x_id &&
91  x_size == other.x_size && y_id == other.y_id &&
92  y_size == other.y_size && max_height == other.max_height &&
93  contact_active_faces == other.contact_active_faces;
94  }
95 
97  bool operator!=(const HFNodeBase& other) const { return !(*this == other); }
98 
101  inline bool isLeaf() const { return x_size == 1 && y_size == 1; }
102 
105  inline size_t leftChild() const { return first_child; }
106 
109  inline size_t rightChild() const { return first_child + 1; }
110 
111  inline Eigen::Vector2i leftChildIndexes() const {
112  return Eigen::Vector2i(x_id, y_id);
113  }
114  inline Eigen::Vector2i rightChildIndexes() const {
115  return Eigen::Vector2i(x_id + x_size / 2, y_id + y_size / 2);
116  }
117 };
118 
121  return HFNodeBase::FaceOrientation(int(a) & int(b));
122 }
123 
125  return a & int(b);
126 }
127 
128 template <typename BV>
130  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
131 
132  typedef HFNodeBase Base;
133 
135  BV bv;
136 
138  bool operator==(const HFNode& other) const {
139  return Base::operator==(other) && bv == other.bv;
140  }
141 
143  bool operator!=(const HFNode& other) const { return !(*this == other); }
144 
146  bool overlap(const HFNode& other) const { return bv.overlap(other.bv); }
148  bool overlap(const HFNode& other, const CollisionRequest& request,
149  FCL_REAL& sqrDistLowerBound) const {
150  return bv.overlap(other.bv, request, sqrDistLowerBound);
151  }
152 
155  FCL_REAL distance(const HFNode& other, Vec3f* P1 = NULL,
156  Vec3f* P2 = NULL) const {
157  return bv.distance(other.bv, P1, P2);
158  }
159 
161  Vec3f getCenter() const { return bv.center(); }
162 
164  hpp::fcl::Matrix3f::IdentityReturnType getOrientation() const {
165  return Matrix3f::Identity();
166  }
167 
168  virtual ~HFNode() {}
169 };
170 
171 namespace details {
172 
173 template <typename BV>
175  static void run(const Vec3f& pointA, const Vec3f& pointB, BV& bv) {
176  AABB bv_aabb(pointA, pointB);
177  // AABB bv_aabb;
178  // bv_aabb.update(pointA,pointB);
179  convertBV(bv_aabb, bv);
180  }
181 };
182 
183 template <>
185  static void run(const Vec3f& pointA, const Vec3f& pointB, AABB& bv) {
186  AABB bv_aabb(pointA, pointB);
187  convertBV(bv_aabb, bv);
188  // bv.update(pointA,pointB);
189  }
190 };
191 
192 } // namespace details
193 
202 template <typename BV>
204  public:
205  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
206 
208 
209  typedef HFNode<BV> Node;
210  typedef std::vector<Node, Eigen::aligned_allocator<Node>> BVS;
211 
214  : CollisionGeometry(),
215  min_height((std::numeric_limits<FCL_REAL>::min)()),
216  max_height((std::numeric_limits<FCL_REAL>::max)()) {}
217 
229  HeightField(const FCL_REAL x_dim, const FCL_REAL y_dim,
230  const MatrixXf& heights, const FCL_REAL min_height = (FCL_REAL)0)
231  : CollisionGeometry() {
232  init(x_dim, y_dim, heights, min_height);
233  }
234 
239  HeightField(const HeightField& other)
240  : CollisionGeometry(other),
241  x_dim(other.x_dim),
242  y_dim(other.y_dim),
243  heights(other.heights),
244  min_height(other.min_height),
245  max_height(other.max_height),
246  x_grid(other.x_grid),
247  y_grid(other.y_grid),
248  bvs(other.bvs),
249  num_bvs(other.num_bvs) {}
250 
252  const VecXf& getXGrid() const { return x_grid; }
254  const VecXf& getYGrid() const { return y_grid; }
255 
257  const MatrixXf& getHeights() const { return heights; }
258 
260  FCL_REAL getXDim() const { return x_dim; }
262  FCL_REAL getYDim() const { return y_dim; }
263 
265  FCL_REAL getMinHeight() const { return min_height; }
267  FCL_REAL getMaxHeight() const { return max_height; }
268 
269  virtual HeightField<BV>* clone() const { return new HeightField(*this); }
270 
271  const BVS& getNodes() const { return bvs; }
272 
274  virtual ~HeightField() {}
275 
279  const Vec3f A(x_grid[0], y_grid[0], min_height);
280  const Vec3f B(x_grid[x_grid.size() - 1], y_grid[y_grid.size() - 1],
281  max_height);
282  const AABB aabb_(A, B);
283 
284  aabb_radius = (A - B).norm() / 2.;
285  aabb_local = aabb_;
286  aabb_center = aabb_.center();
287  }
288 
290  void updateHeights(const MatrixXf& new_heights) {
291  if (new_heights.rows() != heights.rows() ||
292  new_heights.cols() != heights.cols())
294  "The matrix containing the new heights values does not have the same "
295  "matrix size as the original one.\n"
296  "\tinput values - rows: "
297  << new_heights.rows() << " - cols: " << new_heights.cols() << "\n"
298  << "\texpected values - rows: " << heights.rows()
299  << " - cols: " << heights.cols() << "\n",
300  std::invalid_argument);
301 
302  heights = new_heights.cwiseMax(min_height);
303  this->max_height = recursiveUpdateHeight(0);
304  assert(this->max_height == heights.maxCoeff());
305  }
306 
307  protected:
308  void init(const FCL_REAL x_dim, const FCL_REAL y_dim, const MatrixXf& heights,
309  const FCL_REAL min_height) {
310  this->x_dim = x_dim;
311  this->y_dim = y_dim;
312  this->heights = heights.cwiseMax(min_height);
313  this->min_height = min_height;
314  this->max_height = heights.maxCoeff();
315 
316  const Eigen::DenseIndex NX = heights.cols(), NY = heights.rows();
317  assert(NX >= 2 && "The number of columns is too small.");
318  assert(NY >= 2 && "The number of rows is too small.");
319 
320  x_grid = VecXf::LinSpaced(NX, -0.5 * x_dim, 0.5 * x_dim);
321  y_grid = VecXf::LinSpaced(NY, 0.5 * y_dim, -0.5 * y_dim);
322 
323  // Allocate BVS
324  const size_t num_tot_bvs =
325  (size_t)(NX * NY) - 1 + (size_t)((NX - 1) * (NY - 1));
326  bvs.resize(num_tot_bvs);
327  num_bvs = 0;
328 
329  // Build tree
330  buildTree();
331  }
332 
334  OBJECT_TYPE getObjectType() const { return OT_HFIELD; }
335 
336  Vec3f computeCOM() const { return Vec3f::Zero(); }
337 
338  FCL_REAL computeVolume() const { return 0; }
339 
340  Matrix3f computeMomentofInertia() const { return Matrix3f::Zero(); }
341 
342  protected:
344  FCL_REAL x_dim, y_dim;
345 
348 
351  FCL_REAL min_height, max_height;
352 
355  VecXf x_grid, y_grid;
356 
359  unsigned int num_bvs;
360 
362  int buildTree() {
363  num_bvs = 1;
364  const FCL_REAL max_recursive_height =
365  recursiveBuildTree(0, 0, heights.cols() - 1, 0, heights.rows() - 1);
366  assert(max_recursive_height == max_height &&
367  "the maximal height is not correct");
368  HPP_FCL_UNUSED_VARIABLE(max_recursive_height);
369 
370  bvs.resize(num_bvs);
371  return BVH_OK;
372  }
373 
374  FCL_REAL recursiveUpdateHeight(const size_t bv_id) {
375  HFNode<BV>& bv_node = bvs[bv_id];
376 
377  FCL_REAL max_height;
378  if (bv_node.isLeaf()) {
379  max_height = heights.block<2, 2>(bv_node.y_id, bv_node.x_id).maxCoeff();
380  } else {
381  FCL_REAL
382  max_left_height = recursiveUpdateHeight(bv_node.leftChild()),
383  max_right_height = recursiveUpdateHeight(bv_node.rightChild());
384 
385  max_height = (std::max)(max_left_height, max_right_height);
386  }
387 
388  bv_node.max_height = max_height;
389 
390  const Vec3f pointA(x_grid[bv_node.x_id], y_grid[bv_node.y_id], min_height);
391  const Vec3f pointB(x_grid[bv_node.x_id + bv_node.x_size],
392  y_grid[bv_node.y_id + bv_node.y_size], max_height);
393 
394  details::UpdateBoundingVolume<BV>::run(pointA, pointB, bv_node.bv);
395 
396  return max_height;
397  }
398 
399  FCL_REAL recursiveBuildTree(const size_t bv_id, const Eigen::DenseIndex x_id,
400  const Eigen::DenseIndex x_size,
401  const Eigen::DenseIndex y_id,
402  const Eigen::DenseIndex y_size) {
403  assert(x_id < heights.cols() && "x_id is out of bounds");
404  assert(y_id < heights.rows() && "y_id is out of bounds");
405  assert(x_size >= 0 && y_size >= 0 &&
406  "x_size or y_size are not of correct value");
407  assert(bv_id < bvs.size() && "bv_id exceeds the vector dimension");
408 
409  HFNode<BV>& bv_node = bvs[bv_id];
410  FCL_REAL max_height;
411  if (x_size == 1 &&
412  y_size == 1) // don't build any BV for the current child node
413  {
414  max_height = heights.block<2, 2>(y_id, x_id).maxCoeff();
415  } else {
416  bv_node.first_child = num_bvs;
417  num_bvs += 2;
418 
419  FCL_REAL max_left_height = min_height, max_right_height = min_height;
420  if (x_size >= y_size) // splitting along the X axis
421  {
422  Eigen::DenseIndex x_size_half = x_size / 2;
423  if (x_size == 1) x_size_half = 1;
424  max_left_height = recursiveBuildTree(bv_node.leftChild(), x_id,
425  x_size_half, y_id, y_size);
426 
427  max_right_height =
428  recursiveBuildTree(bv_node.rightChild(), x_id + x_size_half,
429  x_size - x_size_half, y_id, y_size);
430  } else // splitting along the Y axis
431  {
432  Eigen::DenseIndex y_size_half = y_size / 2;
433  if (y_size == 1) y_size_half = 1;
434  max_left_height = recursiveBuildTree(bv_node.leftChild(), x_id, x_size,
435  y_id, y_size_half);
436 
437  max_right_height =
438  recursiveBuildTree(bv_node.rightChild(), x_id, x_size,
439  y_id + y_size_half, y_size - y_size_half);
440  }
441 
442  max_height = (std::max)(max_left_height, max_right_height);
443  }
444 
445  bv_node.max_height = max_height;
446  // max_height = std::max(max_height,min_height);
447 
448  const Vec3f pointA(x_grid[x_id], y_grid[y_id], min_height);
449  assert(x_id + x_size < x_grid.size());
450  assert(y_id + y_size < y_grid.size());
451  const Vec3f pointB(x_grid[x_id + x_size], y_grid[y_id + y_size],
452  max_height);
453 
454  details::UpdateBoundingVolume<BV>::run(pointA, pointB, bv_node.bv);
455  bv_node.x_id = x_id;
456  bv_node.y_id = y_id;
457  bv_node.x_size = x_size;
458  bv_node.y_size = y_size;
459 
460  if (bv_node.isLeaf()) {
461  int& contact_active_faces = bv_node.contact_active_faces;
462  contact_active_faces |= int(HFNodeBase::FaceOrientation::TOP);
463  contact_active_faces |= int(HFNodeBase::FaceOrientation::BOTTOM);
464 
465  if (bv_node.x_id == 0) // first col
466  contact_active_faces |= int(HFNodeBase::FaceOrientation::WEST);
467 
468  if (bv_node.y_id == 0) // first row (TOP)
469  contact_active_faces |= int(HFNodeBase::FaceOrientation::NORTH);
470 
471  if (bv_node.x_id + 1 == heights.cols() - 1) // last col
472  contact_active_faces |= int(HFNodeBase::FaceOrientation::EAST);
473 
474  if (bv_node.y_id + 1 == heights.rows() - 1) // last row (BOTTOM)
475  contact_active_faces |= int(HFNodeBase::FaceOrientation::SOUTH);
476  }
477 
478  return max_height;
479  }
480 
481  public:
483  const HFNode<BV>& getBV(unsigned int i) const {
484  if (i >= num_bvs)
485  HPP_FCL_THROW_PRETTY("Index out of bounds", std::invalid_argument);
486  return bvs[i];
487  }
488 
490  HFNode<BV>& getBV(unsigned int i) {
491  if (i >= num_bvs)
492  HPP_FCL_THROW_PRETTY("Index out of bounds", std::invalid_argument);
493  return bvs[i];
494  }
495 
497  NODE_TYPE getNodeType() const { return BV_UNKNOWN; }
498 
499  private:
500  virtual bool isEqual(const CollisionGeometry& _other) const {
501  const HeightField* other_ptr = dynamic_cast<const HeightField*>(&_other);
502  if (other_ptr == nullptr) return false;
503  const HeightField& other = *other_ptr;
504 
505  return x_dim == other.x_dim && y_dim == other.y_dim &&
506  heights == other.heights && min_height == other.min_height &&
507  max_height == other.max_height && x_grid == other.x_grid &&
508  y_grid == other.y_grid && bvs == other.bvs &&
509  num_bvs == other.num_bvs;
510  }
511 };
512 
515 template <>
517 
518 template <>
520 
521 template <>
523 
524 template <>
526 
527 template <>
529 
530 template <>
531 NODE_TYPE HeightField<KDOP<16>>::getNodeType() const;
532 
533 template <>
534 NODE_TYPE HeightField<KDOP<18>>::getNodeType() const;
535 
536 template <>
537 NODE_TYPE HeightField<KDOP<24>>::getNodeType() const;
538 
540 
541 } // namespace fcl
542 
543 } // namespace hpp
544 
545 #endif
A class describing the AABB collision structure, which is a box in 3D space determined by two diagona...
Definition: AABB.h:56
The geometry for the object for collision or distance computation.
Definition: collision_object.h:95
Data structure depicting a height field given by the base grid dimensions and the elevation along the...
Definition: hfield.h:203
FCL_REAL max_height
Definition: hfield.h:351
FCL_REAL recursiveBuildTree(const size_t bv_id, const Eigen::DenseIndex x_id, const Eigen::DenseIndex x_size, const Eigen::DenseIndex y_id, const Eigen::DenseIndex y_size)
Definition: hfield.h:399
const BVS & getNodes() const
Definition: hfield.h:271
FCL_REAL y_dim
Definition: hfield.h:344
virtual HeightField< BV > * clone() const
Clone *this into a new CollisionGeometry.
Definition: hfield.h:269
void init(const FCL_REAL x_dim, const FCL_REAL y_dim, const MatrixXf &heights, const FCL_REAL min_height)
Definition: hfield.h:308
FCL_REAL computeVolume() const
compute the volume
Definition: hfield.h:338
FCL_REAL min_height
Minimal height of the Height Field: all values bellow min_height will be discarded.
Definition: hfield.h:351
const VecXf & getXGrid() const
Returns a const reference of the grid along the X direction.
Definition: hfield.h:252
HFNode< BV > & getBV(unsigned int i)
Access the bv giving the its index.
Definition: hfield.h:490
FCL_REAL x_dim
Dimensions in meters along X and Y directions.
Definition: hfield.h:344
VecXf y_grid
Definition: hfield.h:355
Vec3f computeCOM() const
compute center of mass
Definition: hfield.h:336
FCL_REAL getXDim() const
Returns the dimension of the Height Field along the X direction.
Definition: hfield.h:260
OBJECT_TYPE getObjectType() const
Get the object type: it is a HFIELD.
Definition: hfield.h:334
FCL_REAL getYDim() const
Returns the dimension of the Height Field along the Y direction.
Definition: hfield.h:262
int buildTree()
Build the bounding volume hierarchy.
Definition: hfield.h:362
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef CollisionGeometry Base
Definition: hfield.h:207
FCL_REAL getMinHeight() const
Returns the minimal height value of the Height Field.
Definition: hfield.h:265
HeightField(const HeightField &other)
Copy contructor from another HeightField.
Definition: hfield.h:239
HFNode< BV > Node
Definition: hfield.h:209
BVS bvs
Bounding volume hierarchy.
Definition: hfield.h:358
const HFNode< BV > & getBV(unsigned int i) const
Access the bv giving the its index.
Definition: hfield.h:483
FCL_REAL recursiveUpdateHeight(const size_t bv_id)
Definition: hfield.h:374
const VecXf & getYGrid() const
Returns a const reference of the grid along the Y direction.
Definition: hfield.h:254
const MatrixXf & getHeights() const
Returns a const reference of the heights.
Definition: hfield.h:257
std::vector< Node, Eigen::aligned_allocator< Node > > BVS
Definition: hfield.h:210
VecXf x_grid
Grids along the X and Y directions. Useful for plotting or other related things.
Definition: hfield.h:355
void computeLocalAABB()
Compute the AABB for the HeightField, used for broad-phase collision.
Definition: hfield.h:278
virtual ~HeightField()
deconstruction, delete mesh data related.
Definition: hfield.h:274
NODE_TYPE getNodeType() const
Get the BV type: default is unknown.
Definition: hfield.h:497
HeightField(const FCL_REAL x_dim, const FCL_REAL y_dim, const MatrixXf &heights, const FCL_REAL min_height=(FCL_REAL) 0)
Constructing an HeightField from its base dimensions and the set of heights points....
Definition: hfield.h:229
unsigned int num_bvs
Definition: hfield.h:359
Matrix3f computeMomentofInertia() const
compute the inertia matrix, related to the origin
Definition: hfield.h:340
HeightField()
Constructing an empty HeightField.
Definition: hfield.h:213
MatrixXf heights
Elevation values in meters of the Height Field.
Definition: hfield.h:347
void updateHeights(const MatrixXf &new_heights)
Update Height Field height.
Definition: hfield.h:290
FCL_REAL getMaxHeight() const
Returns the maximal height value of the Height Field.
Definition: hfield.h:267
#define HPP_FCL_DLLAPI
Definition: config.hh:88
#define HPP_FCL_THROW_PRETTY(message, exception)
Definition: fwd.hh:64
#define HPP_FCL_UNUSED_VARIABLE(var)
Definition: fwd.hh:56
Vec3f center() const
Center of the AABB.
Definition: AABB.h:165
@ OT_HFIELD
Definition: collision_object.h:58
@ BV_UNKNOWN
Definition: collision_object.h:66
CollisionRequestFlag operator&(CollisionRequestFlag a, CollisionRequestFlag b)
Definition: collision_data.h:1210
Eigen::Matrix< FCL_REAL, 3, 3 > Matrix3f
Definition: data_types.h:71
Eigen::Matrix< FCL_REAL, 3, 1 > Vec3f
Definition: data_types.h:67
Eigen::Matrix< FCL_REAL, Eigen::Dynamic, Eigen::Dynamic > MatrixXf
Definition: data_types.h:76
OBJECT_TYPE
object type: BVH (mesh, points), basic geometry, octree
Definition: collision_object.h:53
Eigen::Matrix< FCL_REAL, Eigen::Dynamic, 1 > VecXf
Definition: data_types.h:70
NODE_TYPE
traversal node type: bounding volume (AABB, OBB, RSS, kIOS, OBBRSS, KDOP16, KDOP18,...
Definition: collision_object.h:65
bool isEqual(const Eigen::MatrixBase< Derived > &lhs, const Eigen::MatrixBase< OtherDerived > &rhs, const FCL_REAL tol=std::numeric_limits< FCL_REAL >::epsilon() *100)
Definition: tools.h:205
double FCL_REAL
Definition: data_types.h:66
@ BVH_OK
Definition: BVH_internal.h:65
Main namespace.
Definition: broadphase_bruteforce.h:44
request to the collision algorithm
Definition: collision_data.h:312
Definition: hfield.h:54
size_t leftChild() const
Return the index of the first child. The index is referred to the bounding volume array (i....
Definition: hfield.h:105
FCL_REAL max_height
Definition: hfield.h:75
size_t rightChild() const
Return the index of the second child. The index is referred to the bounding volume array (i....
Definition: hfield.h:109
Eigen::Vector2i leftChildIndexes() const
Definition: hfield.h:111
Eigen::DenseIndex y_size
Definition: hfield.h:73
bool operator!=(const HFNodeBase &other) const
Difference operator.
Definition: hfield.h:97
Eigen::DenseIndex x_id
Definition: hfield.h:72
bool isLeaf() const
Whether current node is a leaf node (i.e. contains a primitive index)
Definition: hfield.h:101
Eigen::DenseIndex x_size
Definition: hfield.h:72
Eigen::DenseIndex y_id
Definition: hfield.h:73
size_t first_child
An index for first child node or primitive If the value is positive, it is the index of the first chi...
Definition: hfield.h:70
bool operator==(const HFNodeBase &other) const
Comparison operator.
Definition: hfield.h:89
int contact_active_faces
Definition: hfield.h:76
HFNodeBase()
Default constructor.
Definition: hfield.h:79
FaceOrientation
Definition: hfield.h:57
Eigen::Vector2i rightChildIndexes() const
Definition: hfield.h:114
Definition: hfield.h:129
FCL_REAL distance(const HFNode &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: hfield.h:155
bool overlap(const HFNode &other) const
Check whether two BVNode collide.
Definition: hfield.h:146
Vec3f getCenter() const
Access to the center of the BV.
Definition: hfield.h:161
bool overlap(const HFNode &other, const CollisionRequest &request, FCL_REAL &sqrDistLowerBound) const
Check whether two BVNode collide.
Definition: hfield.h:148
bool operator!=(const HFNode &other) const
Difference operator.
Definition: hfield.h:143
bool operator==(const HFNode &other) const
Equality operator.
Definition: hfield.h:138
virtual ~HFNode()
Definition: hfield.h:168
hpp::fcl::Matrix3f::IdentityReturnType getOrientation() const
Access to the orientation of the BV.
Definition: hfield.h:164
BV bv
bounding volume storing the geometry
Definition: hfield.h:135
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef HFNodeBase Base
Definition: hfield.h:132
static void run(const Vec3f &pointA, const Vec3f &pointB, AABB &bv)
Definition: hfield.h:185
static void run(const Vec3f &pointA, const Vec3f &pointB, BV &bv)
Definition: hfield.h:175