Transforming mouse cursor position to GeoPoint #63
-
Greetings, Rocky developers and users. I was wondering: is it possible to convert mouse position coordinates, for example, received with ImGui ( |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You are in luck, I have just pushed two new functions, in the DisplayManager header. GeoPoint pointAtWindowCoords(vsg::ref_ptr<vsg::View> view, int x, int y);
DisplayGeoPoint pointAtWindowCoords(vsg::ref_ptr<vsg::Viewer> viewer, int x, int y); They both take window coordinates, which is what would typically be returned by ImGui or by a vsg PointerEvent. (There is one catch; it doesn't seem to work for inset views yet. I am not sure why but I'll file a defect for it.) |
Beta Was this translation helpful? Give feedback.
You are in luck, I have just pushed two new functions, in the DisplayManager header.
They both take window coordinates, which is what would typically be returned by ImGui or by a vsg PointerEvent.
(There is one catch; it doesn't seem to work for inset views yet. I am not sure why but I'll file a defect for it.)