JDK-8116798 : Event local coordinates are wrong with perspective camera
  • Type: Bug
  • Component: javafx
  • Sub-Component: scenegraph
  • Affected Version: 8
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-02-01
  • Updated: 2015-06-17
  • Resolved: 2013-02-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
With a perspective camera, events delivered to any node that's not lying flat on the XY plane contain wrong local coordinates - they don't reflect the projection transformations.

Needed API changes:
Affected classes: MouseEvent, MouseDragEvent, DragEvent, GestureEvent, ContextMenuEvent, TouchPoint
Add methods getZ(), getPickResult()
Add PickResult to all their constructors

See https://wikis.oracle.com/display/OpenJDK/Picking3dAPI
Comments
Verified on 8.0b106
09-09-2013

The fix is now merged in the mainline.
18-02-2013

Unit Tests: javafx/scene/input/ContextMenuEventTest/shouldCompute3dCoordinates javafx/scene/input/ContextMenuEventTest/pickResultIsFromEventCoordinates javafx/scene/input/DragAndDropTest/shouldCompute3dCoordinates javafx/scene/input/DragAndDropTest/dragEventsHavePickResult javafx/scene/input/ScrollEventTest/shouldCompute3dCoordinates javafx/scene/input/ScrollEventTest/shouldContainPickResult javafx/scene/input/ZoomEventTest/shouldCompute3dCoordinates javafx/scene/input/ZoomEventTest/shouldContainPickResult javafx/scene/input/RotateEventTest/shouldCompute3dCoordinates javafx/scene/input/RotateEventTest/shouldContainPickResult javafx/scene/input/SwipeEventTest/shouldCompute3dCoordinates javafx/scene/input/SwipeEventTest/shouldContainPickResult javafx/scene/input/TouchEventTest/shouldCompute3dCoordinates javafx/scene/input/TouchEventTest/touchPointsShouldHaveCorrectPickResult javafx/scene/MouseTest3D/shouldPickRectWithPickRay javafx/scene/MouseTest3D/localCoordinatesShouldBeCorrectDuringBubbling javafx/scene/MouseTest3D/shouldPickRectRotatedIn3D javafx/scene/MouseTest3D/shouldReportCorrectPickResultForClick javafx/scene/MouseTest3D/shouldReportCorrectPickResultForEnteredExited javafx/scene/MouseTest3D/shouldReportCorrectPickResultForDragDetected javafx/scene/MouseTest3D/shouldReportCorrectPickResultDuringPDR javafx/scene/MouseTest3D/shouldReportCorrectPickResultForFullPDR
05-02-2013

Fixed by changesets f6854e1f4383 (rt) and 947f8681929c (rt-closed). Pushed to 3D sandbox, leaving the issue open until it's merged to the main repos.
04-02-2013