Eyal Raab wrote on Wednesday, December 12, 2007 6:25 AM: > Hi, > > * Can someone point me to an explanation on how LOD is used in > intersection testing? > * When doing intersection testing, can I specify the LOD for the > testing? > * I'm trying to find all of the drawable objects that fit inside a > given PolytopeIntersector but that appear only at a given LOD > range ( I'm only interested in the highest resolution drawables > objects ).
See osgUtil::IntersectVisitor::LODSelectionMode. osg::LOD uses the getDistanceToEyePoint function to determine which child to visit, so the visitor can influence what LOD is used by how it implements that function. The LODSelectionMode type lets you always select the highest level of detail, but there isn't an option for a specific range of LODs (which would be tricky anyway, since you never know how many levels are available in a particular scenegraph!). Basically, IntersectVisitor acts just like any other NodeVisitor when it comes to an LOD; it's just that the LOD either thinks the eyepoint is right next to it (IntersectVisitor::USE_HIGHEST_LEVEL_OF_DETAIL), or that the eyepoint is at the _pseudoEyePoint (which is set to the start point of the last segment added via addLineSegment()) (IntersectVisitor::USE_SEGMENT_START_POINT_AS_EYE_POINT_FOR_LOD_LEVEL_SE LECTION). If you need different LOD behavior than that, you could probably subclass IntersectVisitor and override getDistanceToEyePoint() to get the behavior you need. Hope this helps, -- Bryan Thrall FlightSafety International [EMAIL PROTECTED] _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org