Hi David, On Wed, Mar 11, 2009 at 12:52 PM, David Callu <[email protected]> wrote: > Problem: When I use osgManipulator::Dragger, geometry dragger is partially > hide by the geometry I want to move/rotate/scale/... (image 1 : > dragger_hide.png) > To fix this, I render the Dragger geometry in different RenderBin with a > DEPTH_TEST OFF. > (image 2 : dragger_not_hide.png) > Put the dragger in different RenderBin is the user responsability. > > Currently, PointerInfo check if the first intersection is a dragger, if it's > not one, > nothing is done. If it's one, dragger mechanism is applied. > > Now, I need to search in intersectionList if the second or third or .. hit > is a dragger. > If it's one, apply dragger mechanism otherwise don't do anything. > Depth is the variable to specify how many hit must be test to search a > dragger.
OK, I think I understand now. > If I well understand your last sentence : > > "The general approach to solving > this problem seems awkward, and can't help feel that perhaps the > dragger intersection code itself would be better off being tweaked so > that it ignores non dragger geometry automatically." > > It's better to check all intersection while there are one, and while it's > not a dragger. > So the depth variable is useless. > > I'm right ? My inclination is to just search the list from intersection list from back to front till a manipulator is hit then return this as a hit. Although I guess it might well be something you'd want to toggle on/off, perhaps per manipulator based on whether the manipulator might be using a visual trick lick the one you've suggested. W.r.t your visuals, displaying the manipulator always on top by disabling the depth test will break the depth cue of occlusion. My inclination would be to render the manipulator twice, once with depth test on, then a second time with depth test off and blending on so that the colour gets blended with the background colour. This would make it seem like the geometry is semi-transparent, but with occlusion still active. Robert. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
