This class converts 2D coordinates, as used by AWT, to 2D coordinates usable in VTK.
This is essentially a Scala re-implementation based on vtk.rendering.jogl.vtkJoglPanelComponent.
This is essentially a Scala re-implementation based on vtk.rendering.jogl.vtkJoglPanelComponent. It includes a couple of bugfixes and extensions.
This class converts 2D coordinates, as used by AWT, to 2D coordinates usable in VTK.
In a nutshell, VTK uses "zero-at-bottom" y coordinates, whereas AWT uses "zero-at-top" ones.
In addition, VTK and AWT may disagree on how large a pixel even is. This has been observed on MacBooks with high-resolution Retina displays, where a "Java pixel" is in fact 2x2 physical pixels. VTK works with the physical pixels, whereas our events contain "Java pixels".
This class detects these cases and automatically applies scaling.
Note: Because performance is important at this low implementation level, we treat the various possible cases separately.