Dave, I think this is what you're looking for: Make a line between the point and *any* point outside the geode's bounding volume. Do an intersection test between this line and the object, and count the number of intersections. Zero intersections or an even number of intersections means the point is "outside" the object, whereas an odd number of intersections means the point is inside the object. Caveat: if your object has 2-D "flags" that stick off of it, this procedure won't work.
-Penn Taylor Dave Pugmire wrote: > Hi, > I don't really have a direction, as in the case with a mouse (x,y point > and into the screen). I have a point in 3-space, and I need to know if > that point is inside any model. This goes with my other question > relating to moving something around. Once I determine that the wand is > inside a model, then I want the model to follow the wand around. > > Thanks, > Dave > > > Adrian Egli wrote: >> Hi Dave, >> >> i don't understand what you are doing. Do you like to get a surface >> point back? Do you like to get a >> line intersected point back. Do you like a point inside the model back. >> So one technique is the line >> intersection. You define a line segment by a starting point and a ending >> point, then let intersect this >> with the scene As result you get back all intersections, and then you >> can decide wether the point is >> on the line and has intersected with the models surface or not. >> >> may this short answer help you, may not. >> >> /adegli >> >> 2007/8/15, Dave Pugmire <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>: >> >> Hi, >> I need to determine the following. Given a 3D point, which models >> contain the point. I'm not seeing anything to do this off hand. >> Something easy is to grab the bounding volume for the Geode, and see if >> the point is inside, but I'd like to get something more accurate. >> >> Thanks, >> Dave >> >> _______________________________________________ >> osg-users mailing list >> [email protected] >> <mailto:[email protected]> >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> >> >> >> >> -- >> ******************************************** >> Adrian Egli >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> osg-users mailing list >> [email protected] >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

