I've been playing with the osgFX classes and I'm thinking about using
osgFX::Outline() to highlight the node(s) under the mouse.

First, I would need a list of highlighted nodes. Initially it would be
empty.

Every highlightable node would have a parent osgFX::Outline instance
with an initial thin black outline.

I would handle osgGA::GUIEventAdapter::MOVE events. Using the
osgUtil::LineSegmentIntersector to find what's under the mouse pointer.
I would compare my list of nodes under the mouse pointer with my list of
highlighted nodes. Any nodes on the highlighted list not under the
mouse, would be reverted to a thin black outline. Any nodes under the
mouse would get a thicker, yellow outline. The list of highlighted nodes
would be updated to reflect the current state.

Is this reasonable? Is having an osgFX::Outline instance on every node a
heavy way of accomplishing this? Is hit-testing every move event crazy?

Alternatively, I thought about just lightening the face color of every
node under the mouse. This wouldn't require any osgFX::Outline() nodes.

Thanks,
Cory
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to