Added transform of the eye point into local coordinates to properly account

for transforms within the scene graph.
This commit is contained in:
Robert Osfield
2005-12-19 13:40:32 +00:00
parent 323473144a
commit acf198b28b

View File

@@ -207,6 +207,18 @@ bool IntersectVisitor::hits()
return false;
}
osg::Vec3 IntersectVisitor::getEyePoint() const
{
const IntersectState* cis = _intersectStateStack.empty() ? 0 : _intersectStateStack.back().get();
if (cis)
{
return _pseudoEyePoint * (*(cis->_inverse));
}
else
{
return _pseudoEyePoint;
}
}
void IntersectVisitor::addLineSegment(LineSegment* seg)
{