Hi Neil,

Could you try leaving the osgManipulator code alone and toggling the
display mode of the polygons using a osg::PolygonMode state attribute
attached to a StateSet above the manipulator subgraph.  Have a look at
the osgscribe example to see osg::PolygonMode in action.

Another solution might be to create two sets of geometry. One would be polygons as before, but made invisible using setDrawableToAlwaysCull (or something like that) and that would be what the intersection tests against, and the other would be your lines and would be visible.

Look at the source for the existing draggers, there are examples of setting up invisible geometry to get some specific behavior (for example in the TrackballDragger there's an invisible sphere in the center which allows rotation around all axes, in addition to a visible circle for each axis.

I've done something similar in the past in order to get a larger click zone for draggers - users found it hard to pick some of the draggers (again the TrackballDragger comes to mind) so I would subclass the dragger creating larger invisible geometry for easier picking.

Hope this helps,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to