Page MenuHomePhabricator

PlanarFigureInteractor is highly inefficient
Closed, ResolvedPublic

Description

The current Version of the PlanarFigureInteractor inefficient as all Events are handled, even if the PlanarFigure is not even on the currently rendered slice.

e.g. the Interactor of a PlanarFigure that has been positioned in the lung tries to handle all MouseMove-Events that occur even if I am currently looking at the legs of the patient.

Right now, PlanarFigures are 2D and it is not possible to have control points on different slices. An easy way to speed this up would be to extend the method CanHandleEvent() with an additional check. If the current renderer world-geometry is not near to the geometry2D of the PlanarFigure, we return 0.0 and do not handle the event at all. I tested this, work fine.

Event Timeline

[c3a2aa]: Merge branch 'bug-12651-planarfigure-interaction-speedup'

Merged commits:

2012-07-18 09:30:43 Markus Engel [1e885f]
Only handling event if PlanarFigureGeometry is near current rendering


2012-07-18 09:30:10 Markus Engel [6a6e43]
considering correct selection state in CanHandleEvent

I improved the PlanarFigureInteractor by adding an additional check in the CanHandleEvent(). If the cursor position in world coordinates is not close to the PlanarFigure-Geometry (figure is not visible) 0.0 is returned and the event will not be handled.