[osg-users] Moving osgHud
pmartz at skew-matrix.com
Fri Mar 27 16:19:37 PDT 2009
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
* 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
Skew Matrix Software LLC
+1 303 859 9466
From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Martin
Sent: Friday, March 27, 2009 4:35 PM
To: osg-users at 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
Anyone have an example of how to do this?
Read this topic online here:
osg-users mailing list
osg-users at lists.openscenegraph.org
More information about the osg-users