Skip to content

Transforming mouse cursor position to GeoPoint #63

Discussion options

You must be logged in to vote

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.)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ComradeMashkov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants