Skip to content

Commit 9aeba1b

Browse files
author
Acorn
committed
fix cylinder bounding sphere calc.
1 parent ad3ed1c commit 9aeba1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shape_operations.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ void computeShapeBoundingSphere(const Shape *shape, Eigen::Vector3d& center, dou
323323
else if (shape->type == CYLINDER)
324324
{
325325
double r = static_cast<const Cylinder*>(shape)->radius;
326-
double l = static_cast<const Cylinder*>(shape)->length;
326+
double lo2 = static_cast<const Cylinder*>(shape)->length * 0.5;
327327
radius = std::sqrt(r * r + l * l);
328328
}
329329
else if (shape->type == CONE)

0 commit comments

Comments
 (0)