Well that's easy enough:
osg::Matrix MVPW(camera->getViewMatrix() *
camera->getProjectionMatrix() *
camera->getViewport()->computeWindowMatrix());
osg::Vec3 posIn2D = posIn3D * MVPW;
Thanks.
Alex
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Tueller,
Shayne R Civ USAF AFMC 519 SMXS/MXDEC
Sent: Tuesday, August 31, 2010 1:05 PM
To: OpenSceneGraph Users
Subject: EXTERNAL: Re: [osg-users] transform to screen function
Alex,
The short answer is "no".
However, this question has already been addressed...
http://thread.gmane.org/gmane.comp.graphics.openscenegraph.user/59941/focus=
59966
-Shayne
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Pecoraro,
Alexander N
Sent: Tuesday, August 31, 2010 9:56 AM
To: OpenSceneGraph Users
Subject: [osg-users] transform to screen function
Is there some easy function on the osg::Camera (or some other osg class) that I
can call to compute the 2d screen position of a 3d point? I couldn't find one
when looking through the documentation, but I figured I would ask just in case
I am missing it.
Thanks.
Alex
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org