38 #ifndef FCL_GEOMETRY_SHAPE_UTILITY_INL_H 39 #define FCL_GEOMETRY_SHAPE_UTILITY_INL_H 124 template <
typename S,
typename BV,
typename Shape>
129 std::vector<Vector3<S>> convex_bound_vertices = s.getBoundVertices(tf);
130 fit(convex_bound_vertices.data(),
131 static_cast<int>(convex_bound_vertices.size()), bv);
136 template <
typename S>
144 S x_range = 0.5 * (fabs(R(0, 0) * s.
side[0]) + fabs(R(0, 1) * s.
side[1]) + fabs(R(0, 2) * s.
side[2]));
145 S y_range = 0.5 * (fabs(R(1, 0) * s.
side[0]) + fabs(R(1, 1) * s.
side[1]) + fabs(R(1, 2) * s.
side[2]));
146 S z_range = 0.5 * (fabs(R(2, 0) * s.
side[0]) + fabs(R(2, 1) * s.
side[1]) + fabs(R(2, 2) * s.
side[2]));
148 Vector3<S> v_delta(x_range, y_range, z_range);
149 bv.
max_ = T + v_delta;
150 bv.
min_ = T - v_delta;
155 template <
typename S>
160 bv.
axis = tf.linear();
161 bv.
To = tf.translation();
167 template <
typename S>
175 S x_range = 0.5 * fabs(R(0, 2) * s.
lz) + s.
radius;
176 S y_range = 0.5 * fabs(R(1, 2) * s.
lz) + s.
radius;
177 S z_range = 0.5 * fabs(R(2, 2) * s.
lz) + s.
radius;
179 Vector3<S> v_delta(x_range, y_range, z_range);
180 bv.
max_ = T + v_delta;
181 bv.
min_ = T - v_delta;
186 template <
typename S>
191 bv.
axis = tf.linear();
192 bv.
To = tf.translation();
198 template <
typename S>
206 S x_range = fabs(R(0, 0) * s.
radius) + fabs(R(0, 1) * s.
radius) + 0.5 * fabs(R(0, 2) * s.
lz);
207 S y_range = fabs(R(1, 0) * s.
radius) + fabs(R(1, 1) * s.
radius) + 0.5 * fabs(R(1, 2) * s.
lz);
208 S z_range = fabs(R(2, 0) * s.
radius) + fabs(R(2, 1) * s.
radius) + 0.5 * fabs(R(2, 2) * s.
lz);
210 Vector3<S> v_delta(x_range, y_range, z_range);
211 bv.
max_ = T + v_delta;
212 bv.
min_ = T - v_delta;
217 template <
typename S>
222 bv.
axis = tf.linear();
223 bv.
To = tf.translation();
229 template <
typename S>
249 template <
typename S>
256 bv.
axis = tf.linear();
262 template <
typename S>
270 S x_range = fabs(R(0, 0) * s.
radius) + fabs(R(0, 1) * s.
radius) + 0.5 * fabs(R(0, 2) * s.
lz);
271 S y_range = fabs(R(1, 0) * s.
radius) + fabs(R(1, 1) * s.
radius) + 0.5 * fabs(R(1, 2) * s.
lz);
272 S z_range = fabs(R(2, 0) * s.
radius) + fabs(R(2, 1) * s.
radius) + 0.5 * fabs(R(2, 2) * s.
lz);
274 Vector3<S> v_delta(x_range, y_range, z_range);
275 bv.
max_ = T + v_delta;
276 bv.
min_ = T - v_delta;
281 template <
typename S>
286 bv.
axis = tf.linear();
287 bv.
To = tf.translation();
293 template <
typename S>
301 S x_range = (fabs(R(0, 0) * s.
radii[0]) + fabs(R(0, 1) * s.
radii[1]) + fabs(R(0, 2) * s.
radii[2]));
302 S y_range = (fabs(R(1, 0) * s.
radii[0]) + fabs(R(1, 1) * s.
radii[1]) + fabs(R(1, 2) * s.
radii[2]));
303 S z_range = (fabs(R(2, 0) * s.
radii[0]) + fabs(R(2, 1) * s.
radii[1]) + fabs(R(2, 2) * s.
radii[2]));
305 Vector3<S> v_delta(x_range, y_range, z_range);
306 bv.
max_ = T + v_delta;
307 bv.
min_ = T - v_delta;
312 template <
typename S>
317 bv.
axis = tf.linear();
318 bv.
To = tf.translation();
324 template <
typename S>
331 const S& d = new_s.
d;
336 if(n[1] == (S)0.0 && n[2] == (S)0.0)
339 if(n[0] < 0) bv_.
min_[0] = -d;
340 else if(n[0] > 0) bv_.
max_[0] = d;
342 else if(n[0] == (S)0.0 && n[2] == (S)0.0)
345 if(n[1] < 0) bv_.
min_[1] = -d;
346 else if(n[1] > 0) bv_.
max_[1] = d;
348 else if(n[0] == (S)0.0 && n[1] == (S)0.0)
351 if(n[2] < 0) bv_.
min_[2] = -d;
352 else if(n[2] > 0) bv_.
max_[2] = d;
360 template <
typename S>
369 bv.
axis.setIdentity();
376 template <
typename S>
385 bv.
axis.setIdentity();
392 template <
typename S>
403 template <
typename S>
416 template <
typename S>
423 const S& d = new_s.
d;
425 const std::size_t D = 8;
426 for(std::size_t i = 0; i < D; ++i)
428 for(std::size_t i = D; i < 2 * D; ++i)
431 if(n[1] == (S)0.0 && n[2] == (S)0.0)
433 if(n[0] > 0) bv.
dist(D) = d;
434 else bv.
dist(0) = -d;
436 else if(n[0] == (S)0.0 && n[2] == (S)0.0)
438 if(n[1] > 0) bv.
dist(D + 1) = d;
439 else bv.
dist(1) = -d;
441 else if(n[0] == (S)0.0 && n[1] == (S)0.0)
443 if(n[2] > 0) bv.
dist(D + 2) = d;
444 else bv.
dist(2) = -d;
446 else if(n[2] == (S)0.0 && n[0] == n[1])
448 if(n[0] > 0) bv.
dist(D + 3) = n[0] * d * 2;
449 else bv.
dist(3) = n[0] * d * 2;
451 else if(n[1] == (S)0.0 && n[0] == n[2])
453 if(n[1] > 0) bv.
dist(D + 4) = n[0] * d * 2;
454 else bv.
dist(4) = n[0] * d * 2;
456 else if(n[0] == (S)0.0 && n[1] == n[2])
458 if(n[1] > 0) bv.
dist(D + 5) = n[1] * d * 2;
459 else bv.
dist(5) = n[1] * d * 2;
461 else if(n[2] == (S)0.0 && n[0] + n[1] == (S)0.0)
463 if(n[0] > 0) bv.
dist(D + 6) = n[0] * d * 2;
464 else bv.
dist(6) = n[0] * d * 2;
466 else if(n[1] == (S)0.0 && n[0] + n[2] == (S)0.0)
468 if(n[0] > 0) bv.
dist(D + 7) = n[0] * d * 2;
469 else bv.
dist(7) = n[0] * d * 2;
475 template <
typename S>
482 const S& d = new_s.
d;
484 const std::size_t D = 9;
486 for(std::size_t i = 0; i < D; ++i)
488 for(std::size_t i = D; i < 2 * D; ++i)
491 if(n[1] == (S)0.0 && n[2] == (S)0.0)
493 if(n[0] > 0) bv.
dist(D) = d;
494 else bv.
dist(0) = -d;
496 else if(n[0] == (S)0.0 && n[2] == (S)0.0)
498 if(n[1] > 0) bv.
dist(D + 1) = d;
499 else bv.
dist(1) = -d;
501 else if(n[0] == (S)0.0 && n[1] == (S)0.0)
503 if(n[2] > 0) bv.
dist(D + 2) = d;
504 else bv.
dist(2) = -d;
506 else if(n[2] == (S)0.0 && n[0] == n[1])
508 if(n[0] > 0) bv.
dist(D + 3) = n[0] * d * 2;
509 else bv.
dist(3) = n[0] * d * 2;
511 else if(n[1] == (S)0.0 && n[0] == n[2])
513 if(n[1] > 0) bv.
dist(D + 4) = n[0] * d * 2;
514 else bv.
dist(4) = n[0] * d * 2;
516 else if(n[0] == (S)0.0 && n[1] == n[2])
518 if(n[1] > 0) bv.
dist(D + 5) = n[1] * d * 2;
519 else bv.
dist(5) = n[1] * d * 2;
521 else if(n[2] == (S)0.0 && n[0] + n[1] == (S)0.0)
523 if(n[0] > 0) bv.
dist(D + 6) = n[0] * d * 2;
524 else bv.
dist(6) = n[0] * d * 2;
526 else if(n[1] == (S)0.0 && n[0] + n[2] == (S)0.0)
528 if(n[0] > 0) bv.
dist(D + 7) = n[0] * d * 2;
529 else bv.
dist(7) = n[0] * d * 2;
531 else if(n[0] == (S)0.0 && n[1] + n[2] == (S)0.0)
533 if(n[1] > 0) bv.
dist(D + 8) = n[1] * d * 2;
534 else bv.
dist(8) = n[1] * d * 2;
540 template <
typename S>
547 const S& d = new_s.
d;
549 const std::size_t D = 12;
551 for(std::size_t i = 0; i < D; ++i)
553 for(std::size_t i = D; i < 2 * D; ++i)
556 if(n[1] == (S)0.0 && n[2] == (S)0.0)
558 if(n[0] > 0) bv.
dist(D) = d;
559 else bv.
dist(0) = -d;
561 else if(n[0] == (S)0.0 && n[2] == (S)0.0)
563 if(n[1] > 0) bv.
dist(D + 1) = d;
564 else bv.
dist(1) = -d;
566 else if(n[0] == (S)0.0 && n[1] == (S)0.0)
568 if(n[2] > 0) bv.
dist(D + 2) = d;
569 else bv.
dist(2) = -d;
571 else if(n[2] == (S)0.0 && n[0] == n[1])
573 if(n[0] > 0) bv.
dist(D + 3) = n[0] * d * 2;
574 else bv.
dist(3) = n[0] * d * 2;
576 else if(n[1] == (S)0.0 && n[0] == n[2])
578 if(n[1] > 0) bv.
dist(D + 4) = n[0] * d * 2;
579 else bv.
dist(4) = n[0] * d * 2;
581 else if(n[0] == (S)0.0 && n[1] == n[2])
583 if(n[1] > 0) bv.
dist(D + 5) = n[1] * d * 2;
584 else bv.
dist(5) = n[1] * d * 2;
586 else if(n[2] == (S)0.0 && n[0] + n[1] == (S)0.0)
588 if(n[0] > 0) bv.
dist(D + 6) = n[0] * d * 2;
589 else bv.
dist(6) = n[0] * d * 2;
591 else if(n[1] == (S)0.0 && n[0] + n[2] == (S)0.0)
593 if(n[0] > 0) bv.
dist(D + 7) = n[0] * d * 2;
594 else bv.
dist(7) = n[0] * d * 2;
596 else if(n[0] == (S)0.0 && n[1] + n[2] == (S)0.0)
598 if(n[1] > 0) bv.
dist(D + 8) = n[1] * d * 2;
599 else bv.
dist(8) = n[1] * d * 2;
601 else if(n[0] + n[2] == (S)0.0 && n[0] + n[1] == (S)0.0)
603 if(n[0] > 0) bv.
dist(D + 9) = n[0] * d * 3;
604 else bv.
dist(9) = n[0] * d * 3;
606 else if(n[0] + n[1] == (S)0.0 && n[1] + n[2] == (S)0.0)
608 if(n[0] > 0) bv.
dist(D + 10) = n[0] * d * 3;
609 else bv.
dist(10) = n[0] * d * 3;
611 else if(n[0] + n[1] == (S)0.0 && n[0] + n[2] == (S)0.0)
613 if(n[1] > 0) bv.
dist(D + 11) = n[1] * d * 3;
614 else bv.
dist(11) = n[1] * d * 3;
620 template <
typename S>
627 const S& d = new_s.
d;
632 if(n[1] == (S)0.0 && n[2] == (S)0.0)
635 if(n[0] < 0) { bv_.
min_[0] = bv_.
max_[0] = -d; }
636 else if(n[0] > 0) { bv_.
min_[0] = bv_.
max_[0] = d; }
638 else if(n[0] == (S)0.0 && n[2] == (S)0.0)
641 if(n[1] < 0) { bv_.
min_[1] = bv_.
max_[1] = -d; }
642 else if(n[1] > 0) { bv_.
min_[1] = bv_.
max_[1] = d; }
644 else if(n[0] == (S)0.0 && n[1] == (S)0.0)
647 if(n[2] < 0) { bv_.
min_[2] = bv_.
max_[2] = -d; }
648 else if(n[2] > 0) { bv_.
min_[2] = bv_.
max_[2] = d; }
656 template <
typename S>
672 template <
typename S>
691 template <
typename S>
702 template <
typename S>
715 template <
typename S>
722 const S& d = new_s.
d;
724 const std::size_t D = 8;
726 for(std::size_t i = 0; i < D; ++i)
728 for(std::size_t i = D; i < 2 * D; ++i)
731 if(n[1] == (S)0.0 && n[2] == (S)0.0)
733 if(n[0] > 0) bv.
dist(0) = bv.
dist(D) = d;
736 else if(n[0] == (S)0.0 && n[2] == (S)0.0)
738 if(n[1] > 0) bv.
dist(1) = bv.
dist(D + 1) = d;
739 else bv.
dist(1) = bv.
dist(D + 1) = -d;
741 else if(n[0] == (S)0.0 && n[1] == (S)0.0)
743 if(n[2] > 0) bv.
dist(2) = bv.
dist(D + 2) = d;
744 else bv.
dist(2) = bv.
dist(D + 2) = -d;
746 else if(n[2] == (S)0.0 && n[0] == n[1])
748 bv.
dist(3) = bv.
dist(D + 3) = n[0] * d * 2;
750 else if(n[1] == (S)0.0 && n[0] == n[2])
752 bv.
dist(4) = bv.
dist(D + 4) = n[0] * d * 2;
754 else if(n[0] == (S)0.0 && n[1] == n[2])
756 bv.
dist(6) = bv.
dist(D + 5) = n[1] * d * 2;
758 else if(n[2] == (S)0.0 && n[0] + n[1] == (S)0.0)
760 bv.
dist(6) = bv.
dist(D + 6) = n[0] * d * 2;
762 else if(n[1] == (S)0.0 && n[0] + n[2] == (S)0.0)
764 bv.
dist(7) = bv.
dist(D + 7) = n[0] * d * 2;
770 template <
typename S>
777 const S& d = new_s.
d;
779 const std::size_t D = 9;
781 for(std::size_t i = 0; i < D; ++i)
783 for(std::size_t i = D; i < 2 * D; ++i)
786 if(n[1] == (S)0.0 && n[2] == (S)0.0)
788 if(n[0] > 0) bv.
dist(0) = bv.
dist(D) = d;
791 else if(n[0] == (S)0.0 && n[2] == (S)0.0)
793 if(n[1] > 0) bv.
dist(1) = bv.
dist(D + 1) = d;
794 else bv.
dist(1) = bv.
dist(D + 1) = -d;
796 else if(n[0] == (S)0.0 && n[1] == (S)0.0)
798 if(n[2] > 0) bv.
dist(2) = bv.
dist(D + 2) = d;
799 else bv.
dist(2) = bv.
dist(D + 2) = -d;
801 else if(n[2] == (S)0.0 && n[0] == n[1])
803 bv.
dist(3) = bv.
dist(D + 3) = n[0] * d * 2;
805 else if(n[1] == (S)0.0 && n[0] == n[2])
807 bv.
dist(4) = bv.
dist(D + 4) = n[0] * d * 2;
809 else if(n[0] == (S)0.0 && n[1] == n[2])
811 bv.
dist(5) = bv.
dist(D + 5) = n[1] * d * 2;
813 else if(n[2] == (S)0.0 && n[0] + n[1] == (S)0.0)
815 bv.
dist(6) = bv.
dist(D + 6) = n[0] * d * 2;
817 else if(n[1] == (S)0.0 && n[0] + n[2] == (S)0.0)
819 bv.
dist(7) = bv.
dist(D + 7) = n[0] * d * 2;
821 else if(n[0] == (S)0.0 && n[1] + n[2] == (S)0.0)
823 bv.
dist(8) = bv.
dist(D + 8) = n[1] * d * 2;
829 template <
typename S>
836 const S& d = new_s.
d;
838 const std::size_t D = 12;
840 for(std::size_t i = 0; i < D; ++i)
842 for(std::size_t i = D; i < 2 * D; ++i)
845 if(n[1] == (S)0.0 && n[2] == (S)0.0)
847 if(n[0] > 0) bv.
dist(0) = bv.
dist(D) = d;
850 else if(n[0] == (S)0.0 && n[2] == (S)0.0)
852 if(n[1] > 0) bv.
dist(1) = bv.
dist(D + 1) = d;
853 else bv.
dist(1) = bv.
dist(D + 1) = -d;
855 else if(n[0] == (S)0.0 && n[1] == (S)0.0)
857 if(n[2] > 0) bv.
dist(2) = bv.
dist(D + 2) = d;
858 else bv.
dist(2) = bv.
dist(D + 2) = -d;
860 else if(n[2] == (S)0.0 && n[0] == n[1])
862 bv.
dist(3) = bv.
dist(D + 3) = n[0] * d * 2;
864 else if(n[1] == (S)0.0 && n[0] == n[2])
866 bv.
dist(4) = bv.
dist(D + 4) = n[0] * d * 2;
868 else if(n[0] == (S)0.0 && n[1] == n[2])
870 bv.
dist(5) = bv.
dist(D + 5) = n[1] * d * 2;
872 else if(n[2] == (S)0.0 && n[0] + n[1] == (S)0.0)
874 bv.
dist(6) = bv.
dist(D + 6) = n[0] * d * 2;
876 else if(n[1] == (S)0.0 && n[0] + n[2] == (S)0.0)
878 bv.
dist(7) = bv.
dist(D + 7) = n[0] * d * 2;
880 else if(n[0] == (S)0.0 && n[1] + n[2] == (S)0.0)
882 bv.
dist(8) = bv.
dist(D + 8) = n[1] * d * 2;
884 else if(n[0] + n[2] == (S)0.0 && n[0] + n[1] == (S)0.0)
886 bv.
dist(9) = bv.
dist(D + 9) = n[0] * d * 3;
888 else if(n[0] + n[1] == (S)0.0 && n[1] + n[2] == (S)0.0)
890 bv.
dist(10) = bv.
dist(D + 10) = n[0] * d * 3;
892 else if(n[0] + n[1] == (S)0.0 && n[0] + n[2] == (S)0.0)
894 bv.
dist(11) = bv.
dist(D + 11) = n[1] * d * 3;
900 template <
typename S>
906 bv.
max_ = tf.translation() + v_delta;
907 bv.
min_ = tf.translation() - v_delta;
912 template <
typename S>
917 bv.
To = tf.translation();
918 bv.
axis.setIdentity();
924 template <
typename S>
1054 template <
typename BV,
typename Shape>
1058 using S =
typename BV::S;
1064 template <
typename S>
1068 tf.linear().setIdentity();
1069 tf.translation() = bv.
center();
1073 template <
typename S>
1077 tf.linear() = bv.
axis;
1078 tf.translation() = bv.
To;
1082 template <
typename S>
1087 tf.translation() = bv.
obb.
To;
1091 template <
typename S>
1096 tf.translation() = bv.
obb.
To;
1100 template <
typename S>
1104 tf.linear() = bv.
axis;
1105 tf.translation() = bv.
To;
1109 template <
typename S>
1113 tf.linear().setIdentity();
1114 tf.translation() = bv.
center();
1118 template <
typename S>
1122 tf.linear().setIdentity();
1123 tf.translation() = bv.
center();
1127 template <
typename S>
1131 tf.linear().setIdentity();
1132 tf.translation() = bv.
center();
1136 template <
typename S>
1144 template <
typename S>
1150 tf.linear() = bv.
axis;
1151 tf.translation() = bv.
To;
1155 template <
typename S>
1160 tf.translation() = bv.
obb.
To;
1165 template <
typename S>
1172 tf.translation() = bv.
obb.
To;
1176 template <
typename S>
1180 tf.linear() = bv.
axis;
1181 tf.translation() = bv.
To;
1186 template <
typename S>
1194 template <
typename S>
1202 template <
typename S>
Triangle stores the points instead of only indices of points.
static void run(const TriangleP< S > &s, const Transform3< S > &tf, AABB< S > &bv)
static void run(const Convex< S > &s, const Transform3< S > &tf, OBB< S > &bv)
Half Space: this is equivalent to the Planed in ODE. The separation plane is defined as n * x = d...
static void run(const Plane< S > &s, const Transform3< S > &tf, OBB< S > &bv)
static void run(const Halfspace< S > &s, const Transform3< S > &tf, KDOP< S, 18 > &bv)
S depth() const
The (AABB) depth.
S radius
Radius of the cylinder.
template class FCL_EXPORT RSS< double >
template Halfspace< double > transform(const Halfspace< double > &a, const Transform3< double > &tf)
Eigen::Transform< S, 3, Eigen::Isometry > Transform3
A class describing the AABB collision structure, which is a box in 3D space determined by two diagona...
static void run(const Shape &s, const Transform3< S > &tf, BV &bv)
S height() const
The (AABB) height.
static void run(const Cone< S > &s, const Transform3< S > &tf, OBB< S > &bv)
static void run(const Halfspace< S > &s, const Transform3< S > &tf, kIOS< S > &bv)
Center at zero point ellipsoid.
template class FCL_EXPORT KDOP< double, 24 >
static void run(const Ellipsoid< S > &s, const Transform3< S > &tf, OBB< S > &bv)
static void run(const Halfspace< S > &s, const Transform3< S > &tf, OBB< S > &bv)
Eigen::Matrix< S, 3, 3 > Matrix3
Vector3< S > max_
The max point in the AABB.
Vector3< S > center() const
Center of the AABB.
S dist(std::size_t i) const
Eigen::Matrix< S, 3, 1 > Vector3
template class FCL_EXPORT KDOP< double, 16 >
const std::vector< Vector3< S > > & getVertices() const
Gets the vertex positions in the geometry's frame G.
FCL_EXPORT void computeBV(const Shape &s, const Transform3< typename BV::S > &tf, BV &bv)
calculate a bounding volume for a shape in a specific configuration
static void run(const Halfspace< S > &s, const Transform3< S > &tf, KDOP< S, 24 > &bv)
static void run(const Cone< S > &s, const Transform3< S > &tf, AABB< S > &bv)
template class FCL_EXPORT KDOP< double, 18 >
static void run(const Plane< S > &s, const Transform3< S > &tf, KDOP< S, 16 > &bv)
static void run(const Plane< S > &s, const Transform3< S > &tf, KDOP< S, 18 > &bv)
static void run(const Convex< S > &s, const Transform3< S > &tf, AABB< S > &bv)
static void run(const Sphere< S > &s, const Transform3< S > &tf, OBB< S > &bv)
KDOP class describes the KDOP collision structures. K is set as the template parameter, which should be 16, 18, or 24 The KDOP structure is defined by some pairs of parallel planes defined by some axes. For K = 16, the planes are 6 AABB planes and 10 diagonal planes that cut off some space of the edges: (-1,0,0) and (1,0,0) -> indices 0 and 8 (0,-1,0) and (0,1,0) -> indices 1 and 9 (0,0,-1) and (0,0,1) -> indices 2 and 10 (-1,-1,0) and (1,1,0) -> indices 3 and 11 (-1,0,-1) and (1,0,1) -> indices 4 and 12 (0,-1,-1) and (0,1,1) -> indices 5 and 13 (-1,1,0) and (1,-1,0) -> indices 6 and 14 (-1,0,1) and (1,0,-1) -> indices 7 and 15 For K = 18, the planes are 6 AABB planes and 12 diagonal planes that cut off some space of the edges: (-1,0,0) and (1,0,0) -> indices 0 and 9 (0,-1,0) and (0,1,0) -> indices 1 and 10 (0,0,-1) and (0,0,1) -> indices 2 and 11 (-1,-1,0) and (1,1,0) -> indices 3 and 12 (-1,0,-1) and (1,0,1) -> indices 4 and 13 (0,-1,-1) and (0,1,1) -> indices 5 and 14 (-1,1,0) and (1,-1,0) -> indices 6 and 15 (-1,0,1) and (1,0,-1) -> indices 7 and 16 (0,-1,1) and (0,1,-1) -> indices 8 and 17 For K = 18, the planes are 6 AABB planes and 18 diagonal planes that cut off some space of the edges: (-1,0,0) and (1,0,0) -> indices 0 and 12 (0,-1,0) and (0,1,0) -> indices 1 and 13 (0,0,-1) and (0,0,1) -> indices 2 and 14 (-1,-1,0) and (1,1,0) -> indices 3 and 15 (-1,0,-1) and (1,0,1) -> indices 4 and 16 (0,-1,-1) and (0,1,1) -> indices 5 and 17 (-1,1,0) and (1,-1,0) -> indices 6 and 18 (-1,0,1) and (1,0,-1) -> indices 7 and 19 (0,-1,1) and (0,1,-1) -> indices 8 and 20 (-1, -1, 1) and (1, 1, -1) –> indices 9 and 21 (-1, 1, -1) and (1, -1, 1) –> indices 10 and 22 (1, -1, -1) and (-1, 1, 1) –> indices 11 and 23.
Center at zero point capsule.
static void run(const Plane< S > &s, const Transform3< S > &tf, KDOP< S, 24 > &bv)
OBB< S > obb
OBB related with kIOS.
static void run(const Capsule< S > &s, const Transform3< S > &tf, OBB< S > &bv)
Center at zero point, axis aligned box.
S radius
Radius of the cone.
static void run(const Halfspace< S > &s, const Transform3< S > &tf, AABB< S > &bv)
Vector3< S > min_
The min point in the AABB.
Vector3< S > side
box side length
unsigned int num_spheres
The number of spheres, no larger than 5.
static void run(const Sphere< S > &s, const Transform3< S > &tf, AABB< S > &bv)
template void constructBox(const OBB< double > &bv, Box< double > &box, Transform3< double > &tf)
Eigen::Translation< S, 3 > Translation3
static void run(const Capsule< S > &s, const Transform3< S > &tf, AABB< S > &bv)
template class FCL_EXPORT kIOS< double >
Vector3< S > extent
Half dimensions of OBB.
template class FCL_EXPORT AABB< double >
template class FCL_EXPORT OBB< double >
Vector3< S > radii
Radii of the ellipsoid.
template Matrix3d generateCoordinateSystem(const Vector3d &x_axis)
Matrix3< S > axis
Orientation of OBB. The axes of the rotation matrix are the principle directions of the box...
static void run(const Halfspace< S > &s, const Transform3< S > &tf, KDOP< S, 16 > &bv)
static void run(const Ellipsoid< S > &s, const Transform3< S > &tf, AABB< S > &bv)
static void run(const Plane< S > &s, const Transform3< S > &tf, AABB< S > &bv)
S radius
Radius of the sphere.
Vector3< S > n
Planed normal.
static void run(const Plane< S > &s, const Transform3< S > &tf, kIOS< S > &bv)
FCL_EXPORT void fit(const Vector3< typename BV::S > *const ps, int n, BV &bv)
Compute a bounding volume that fits a set of n points.
template class FCL_EXPORT OBBRSS< double >
Center at zero point sphere.
static void run(const Cylinder< S > &s, const Transform3< S > &tf, OBB< S > &bv)
static void run(const Box< S > &s, const Transform3< S > &tf, AABB< S > &bv)
S radius
Radius of capsule.
Vector3< S > To
Center of OBB.
Vector3< S > center() const
The (AABB) center.
static void run(const Cylinder< S > &s, const Transform3< S > &tf, AABB< S > &bv)
static void run(const Box< S > &s, const Transform3< S > &tf, OBB< S > &bv)
S width() const
The (AABB) width.
A class describing the kIOS collision structure, which is a set of spheres.
template class FCL_EXPORT Box< double >
Vector3< S > n
Plane normal.
kIOS_Sphere spheres[5]
The (at most) five spheres for intersection.
Oriented bounding box class.