Hi,

Can't make simple example with the RayIntersector to work.

[code]
...
if (_node.valid()) {
  _rayIntersector->setStart(_eyePosition);
  _rayIntersector->setDirection(-newUp);
  _rayIntersector->setIntersectionLimit(osgUtil::Intersector::LIMIT_ONE);

    std::cout << "start: " << _eyePosition << ", direction: " << -newUp << 
std::endl;
    _node->accept(*_intersectVisitor);
    if (_rayIntersector->getIntersections().size() == 1)
        std::cout << "intersects" << std::endl;
    else
        std::cout << "not intersects" << std::endl;
}
[/code]

On simple 2 triangles plane model there is an error message:

[code]
start: 0 -23.4985 0, direction: 0 -1 -0
not intersects
Warning:: Picked up error in TriangleIntersect
   (10 -24.2973 -10,    10 -24.2973 10, -10 -24.2973 -10)
   (-nan,       -nan,   -nan)
Warning:: Picked up error in TriangleIntersect
   (10 -24.2973 10,     -10 -24.2973 10,        -10 -24.2973 -10)
   (-nan,       -nan,   -nan)
[/code]

Thank you!

Cheers,
Andrey

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





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

Reply via email to