+bool Scene::castRay(const Mf::Ray<2>& ray,
+ std::list<Mf::Ray<2>::Intersection>& hits) const
+{
+ std::list< Mf::Line<2> >& lines = mImpl->mLines;
+ std::list< Mf::Line<2> >::const_iterator it;
+
+ for (it = lines.begin(); it != lines.end(); ++it)
+ {
+ Mf::Ray<2>::Intersection hit;
+ Mf::Scalar d = (*it).intersectRay(ray, hit);
+ if (d > 0.0)
+ {
+ hits.push_back(hit);
+ //return true;
+ }
+ }
+
+ hits.sort();
+ return !hits.empty();
+ //return false;
+}
+