Code: Select all
Real DistanceLodBoxStrategy::getSquaredDepth(const MovableObject *movableObject, const Ogre::Camera *camera) const
{
[color=#FF0000] return Math::Sqr(movableObject->getBoundingBox().distance(camera->getPosition()));
[/color] }
That's a nonsensical calculation. Surely what was intended is something more like this:
Code: Select all
Real DistanceLodBoxStrategy::getSquaredDepth(const MovableObject *movableObject, const Ogre::Camera *camera) const
{
return movableObject->getWorldBoundingBox().squaredDistance(camera->_getDerivedPosition());
}