Re: [osg-users] Draw a line from world to screen

2011-09-27 Thread Aurelien Albert
Thansk for pointing me to these topics. So, I found the solution : (be carefull, these function use WORLD coordinates, not local coordinates) worldToScreen : Code: osg::Vec2d worldToScreen(const osg::Vec3d worldPosition, const osg::Camera* pCamera) { osg::Vec2d screenPosition; if

Re: [osg-users] Draw a line from world to screen

2011-09-26 Thread Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC
=1786highlight= -Shayne -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Aurelien Albert Sent: Sunday, September 25, 2011 6:26 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Draw a line from world

[osg-users] Draw a line from world to screen

2011-09-25 Thread Aurelien Albert
Hi, I've made an Segment object which draw a segement from a point (x, y, z) to another (x, y, z) and working well. Now, I want to draw a Connector line from a point in space (x, y, z) to a point on screen (x, y). How can I transform my (x, y) screen point to find a equivalent (x, y, z) world