Hi Andi,

On Thu, 2006-06-15 at 16:26 +0200, Andreas Brüning wrote:
> 
> i have some Lines in a Geometry node and need the 2d- Screen
> koordinates from the Start- and Endpoints to give them to an OpenCV
> Image. How iŽcan get them? I have defined a perspective Camera and a
> Navigator. I try the gluUnProject Function, but it doesnŽt work well.
> Are the Matricies from OpenSG differnet to the OpenGl Matricies i get
> with for example "glGetDoublev(GL_PROJECTION_MATRIX, projection);" The
> lines in the OpenCV Images looks streched.
> 
> Please can somebody tell me how to get the right screenkoordinates?

The matrices are different from the OpenGL ones. 

The easiest way is to use the getWorldToScreen() method of the Camera,
which gives you a matrix that transforms from World coordinates to
screen coordinates (-1..1)^2.

Hope it helps

        Dirk




_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to