Re: mouse input
Posted by
elect on
Feb 25, 2016; 7:50am
URL: https://forum.jogamp.org/SOLVED-mouse-input-tp3504609p4036339.html
OpenGL is about space transformations, this makes things *relatively* easier.
http://web.archive.org/web/20140106105946/http://www.arcsynthesis.org/gltut/Positioning/TransformPipeline.svgwhen you draw the rectangle you are in window space and what you want to do is retrieving the world space coordinates (I guess). Then you have to apply the inverse transformation, this is usually called unproject
There should be a lot of references on the net
This looks right, you go from object (model) space to window space.
For example, if model matrix is the matrix that transforms from model to world space, the inverse, model^(-1), transforms from worlds to model space.