File tree Expand file tree Collapse file tree 1 file changed +0
-12
lines changed Expand file tree Collapse file tree 1 file changed +0
-12
lines changed Original file line number Diff line number Diff line change 3434
3535void bodies::AABB::extendWithTransformedBox (const Eigen::Isometry3d& transform, const Eigen::Vector3d& box)
3636{
37- // Method adapted from FCL src/shape/geometric_shapes_utility.cpp#computeBV<AABB, Box>(...) (BSD-licensed code):
38- // https://github.com/flexible-collision-library/fcl/blob/fcl-0.4/src/shape/geometric_shapes_utility.cpp#L292
39- // We don't call their code because it would need creating temporary objects, and their method is in floats in FCL 0.5
40- //
41- // Here's a nice explanation why it works: https://zeuxcg.org/2010/10/17/aabb-from-obb-with-component-wise-abs/
42- const Eigen::Matrix3d& r = transform.rotation ();
43- const Eigen::Vector3d& t = transform.translation ();
44-
45- double x_range = 0.5 * (fabs (r (0 , 0 ) * box[0 ]) + fabs (r (0 , 1 ) * box[1 ]) + fabs (r (0 , 2 ) * box[2 ]));
46- double y_range = 0.5 * (fabs (r (1 , 0 ) * box[0 ]) + fabs (r (1 , 1 ) * box[1 ]) + fabs (r (1 , 2 ) * box[2 ]));
47- double z_range = 0.5 * (fabs (r (2 , 0 ) * box[0 ]) + fabs (r (2 , 1 ) * box[1 ]) + fabs (r (2 , 2 ) * box[2 ]));
48-
4937 fcl::AABBd aabb;
5038 fcl::computeBV (fcl::Boxd (box), transform, aabb);
5139 extend (aabb.min_ );
You can’t perform that action at this time.
0 commit comments