Get WorldCoordinates from Pixel
843799Nov 16 2001 — edited Nov 20 2001
I have read some posts concerning this subject, but none of them helped me.
I need some samplecode for the following:
I use SimpleUniverse. I want to position a plane so that it appears exactly at a certain pixellocation (left upper corner) with an exact width and height in pixel.
I tried a combination of getPixelLocationInImagePlate and getImagePlateToVworld.
The problem is, that I dont know what z-coordinate I should provide. If I set it to 0 it is to close to the other objects, I need it closer to the viewer, but when I use a higher z-value the plane is not positioned the way I want it.
So what I need is:
a piece of code that calculates the world-coordinates of a point with following parameters given:
pixellocation in window, desired z-coordinate of the point