Hello,
I use osg:: LineSegment to perform an intersection between a ray starting from 
a wand and the objects in my scene. Here is my code:


osg::Vec3 wandpt1;
osg::Vec3 wandpt2;

line = new osg::LineSegment(wandpt1,wandpt2);

osg::BoundingBox modelbox;
modelbox.expandBy(modelTransf->getBound());

if(line->intersect(modelbox)){
std::cout << "intersection with the cow" << std::endl;

}

The problem is that detection is not very precise.
Do you know another solution in openscenegraph for this?


Thank you!

lucie

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=30105#30105





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to