Resolve "(viz): add intensity picking in 2D negatoscope"
Description
We added the ability to pick pixel values in 2D negatoscopes, in the same way than it was already done in 3D negatoscopes. The picking cross code is now shared through the new class sight::viz::scene3d::PickingCross
.
Extra changes
Most of the picking code was factorized between 2D and 3D versions. Since the code is quite old, some cleaning/modernizing tasks have been performed:
-
CollisionTools
utility class was removed from the public API and moved to the detail namespace - The
IPicker
interface, which was actually an instantiable class, has been removed and replaced by a simple C function inUtils::pickObject()
. - RenderQueue identifiers have been gathered in the same header <Ogre.h> to avoid artificial dependencies between class headers.
- The
Plane
class has been refactored to reduce the number of functions, with the rule "if a function A is only called in function B, move the code in function B". Some members variables were also removed to help minimise state management, in favor of immediate use through function calls (see the newupdate()
function for instance) -
SNegato2D
andSNegato3D
have been modernized a bit as well.
Closes #872 (closed)
How to test it?
- Run SightViewer
- Load an image
- Enable the 2D negatoscopes views
- Left-click on the image and see that the value and the coordinates of the pixel is shown in the top right corner
- Verify that existing interactions still work properly