(viz): crash when zooming VR without autoresetcamera
Description
When we use autoresetcamera=false
with SVolumeRender
, the zoom scale computation may crash because of a singularity (colinearity).
Steps to reproduce
- Apply Changes-On-3ac2d0.patch
- Build and run SightViewer
- Load an image
- Unzoom
- Enjoy the crash
sightrun.bin: ./OgreMain/include/OgreAxisAlignedBox.h:220: void Ogre::AxisAlignedBox::setExtents(const Vector3&, const Vector3&): Assertion `(min.x <= max.x && min.y <= max.y && min.z <= max.z) && "The minimum corner of the box must be less th an or equal to maximum corner"' failed.
Functional specifications
Fix the computation, avoid the singularity.
Technical specifications
Just use the same computation as the one done in Layer::ResetCameraCoordinates()
Test plan
Repeat reproducing tests.