The main problem are the sizes and the position. I have used setScreenScale(), but this will cause trouble with the pick() method (is it a bug?).
It was a bug. Though it was the center of view, which wasn't honored by the PickRay. It is fixed now.
Setting the Viewport will not have the right effect (it reduces the area of painting on an higher value!?)
I don't know, what you mean with "higher value", but: yes.
On the other hand I don't want to use a global coordinate system rather than a local one.
After a hint from Marvin, I had a deeper view into the hud code, but the coordinate code is deeply involed. Is it possible to get a CoordinateNode? It should give control about the used scale and will allow to determine the exact position (for displaying and picking).
The fields used in the CoordinateNode may be (sorry for the vague definition)
- origin of the point(0,0)
- the calculation value of lets say 10px (as a setted value) to X (while X is the position in the local coordinate)
- the rotation
This will allow to set two pictures or other 3D elements in simple way and scale but not effecting others outside.
What do you think about? Or is there already such a node.
Please update from SVN and have a look at the org.xith3d.test.twodee.TwoDeeTest1. I have added new factory methods to the RenderPass class, whih allow for creating a RenderPass, which is correctly setup for 2D-rendering in resolution range/space. This should be, what you want about the coordinate system. These new methods basically contain the RenderPass-setup-code from the HUD.
Please tell me, if you like it this way.
the only thing, that might irritate a little bit is, that you have to use negative y-coordinates, which cannot be easily avoided, since it is the way, OpenGL works.
Marvin