Hi Hagen,

You'll need to multiply the local vertex by Model*View*WindowMatrix.  The
Model matrix comes from the scene graph, you can use
node->getWorldMatrices() for this, the View matrix comes from the Camera,
and the WindowMatrix you can get from the camera viewport.

Robert.



On Mon, Apr 20, 2009 at 12:00 PM, Hagen <[email protected]> wrote:

> Hi,
>
> given a 3d Point and i want to know the corresponding screenspace
> coordinates.
> given a
> osg::Vec3 p
>
> do i have to do that this way?
> osg::vec3 result = p * viewer->getViewMatrix();
> and then i just ignore z?
>
> Thank you.
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=10412#10412
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to