Hi Sherman, You could try using an osg::AutoTransform that is positioned at your XYZ and set up to scale to screen coords and rotate to screen, then have the subraph by offset up the Y axis (effectively in screen space) to give you the offset you want.
Cheers, Robert. On Sun, Jun 22, 2008 at 1:28 AM, sherman wilcox <[EMAIL PROTECTED]> wrote: > I have nodes (models, text, etc.) that are positioned in XYZ > coordinates that I wish to offset in screen space. My question is > what's the best/fastest way to do this. An example follows. I have a > piece of text that acts as a label for a point on a sphere. In this > case that sphere is an osg ellipsoid model generated by virtual planet > builder. I position the text at a given lat/lon/altitude which I > translate to a XYZ world coordinate. However, I wish to offset the > text in screen space by X,Y pixels. Imagine you want to label a point > of interest on this globe but you want the label itself to be offset > (updated every frame) by X pixels in the x-dimension and Y pixels in > the y-dimension. I have one osg::MatrixTransform node acting as the > parent of each text object. I have about 100 of these labels objects. > I need to update the offset of the text every few frames. Doesn't have > to be every frame, I can accept lazy updates - but it is something > that needs to occur rather frequently. > > What's the best way to accomplish this? I have something working but > it's rather slow with 50 or more objects. I'm using IntersectVisitor > in the algorithm which is killing performance. Any suggestions? > _______________________________________________ > 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

