I'm not sure what an osgHud is, and I'm not sure what you would use a PAT
for in this case, so maybe I'm misunderstanding your question.

Here's how I'd do it:
 * Add a Camera Node to your scene graph, configured to post render, and set
the Camera's View and Projection to allow screen-space rendering (just as
you would for any normal HUD).
 * Attach a Geode (with a Geometry) as a child of this Camera.
 * When you get a mouse down event, configure the Geometry to render a
4-vertex line loop, and initialize the 4 vertices to the current mouse
position.
 * As you get mouse drag events, update the vertices/corners of the line
loop to reflect the rectangle that the user is defining.
 * When you get a mouse up event, define a frustum from the 4 vertices, the
near/far planes, and your viewpoint, and intersect this with your scene
graph.

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466

-----Original Message-----
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Martin
Beckett
Sent: Friday, March 27, 2009 4:35 PM
To: osg-users@lists.openscenegraph.org
Subject: [osg-users] Moving osgHud

I am trying to select nodes in a scene with a mouse drawn rectangle.
The first step is to draw the selected region. 
I am trying to use an osgHud but it's not obvious how you can change the
drawables - are you supposed to attach the Hud to a
PositionAttitudeTransform?

Anyone have an example of how to do this?

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=9372#9372





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to