Have a look through the Picking code and examples this shows you how to transform the 2d window coordinates ( in this case were the mouse is, but the principle is the same) into 3d scene coordinates Once you have the coordinates then straight forward to draw a line or any thing your want ,
We do this for callout type box that can track objects, points etc, ( sorry I'm not able to provide code on how we do this) Gordon Product Manager 3d __________________________________________________________ Gordon Tomlinson Email : gtomlinson @ overwatch.textron.com __________________________________________________________ -----Original Message----- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Hagen Sent: Wednesday, April 01, 2009 9:40 AM To: osg-users@lists.openscenegraph.org Subject: [osg-users] Labeling 3D Nodes with HUD style Hi, Im trying to label certain points in my 3D - Scene. Of course I could just use osgText and add it to a transform. But what i want to do is a little more complicated. I want to draw rectanlges with text inside that are drawn 2D (HUD like) on the screen. They shall only appear on near the border of the screen. But now (the tricky thing) I need to draw a line or sth. from the 2D Rectangle to a certain point in the scene that is given by 3D coordinates. How do i do that? I must somehow find out where on the screen my 3D-Point appears. Or is there another way? Thank you. Hagen ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9536#9536 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org