Skip to content

Commit a885152

Browse files
committed
Fix PointCloudRenderable::getBoundingRadius()
Compute *local* bounding radius from bounding box size.
1 parent 3f400ce commit a885152

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rviz/ogre_helpers/point_cloud.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ void PointCloudRenderable::_notifyCurrentCamera(Ogre::Camera* camera)
813813

814814
Ogre::Real PointCloudRenderable::getBoundingRadius() const
815815
{
816-
return Ogre::Math::Sqrt(std::max(mBox.getMaximum().squaredLength(), mBox.getMinimum().squaredLength()));
816+
return mBox.getHalfSize().length();
817817
}
818818

819819
Ogre::Real PointCloudRenderable::getSquaredViewDepth(const Ogre::Camera* cam) const

0 commit comments

Comments
 (0)