+
+ mRay.point = mState.heroine->getState().position;
+ mRay3.point = Mf::promote(mRay.point);
+ mRay3.direction = Mf::promote(mRay.direction);
+
+ Mf::Ray<2>::Intersection meh;
+ Mf::Ray<3>::Intersection meh3;
+
+ Mf::Scalar d = mLine.intersectRay(mRay, meh);
+ if (d > 0.0)
+ {
+ Mf::logDebug("line: d = %f", d);
+ Mf::logDebug(" P = <%f,%f>", meh.point[0], meh.point[1]);
+ Mf::logDebug(" n = <%f,%f>", meh.normal[0], meh.normal[1]);
+ }
+ //d = mPlane.intersectRay(mRay3, meh3);
+ //if (d > 0.0)
+ //{
+ //Mf::logDebug("plane: d = %f", d);
+ //Mf::logDebug(" P = <%f,%f>", meh3.point[0], meh3.point[1]);
+ //Mf::logDebug(" n = <%f,%f>", meh3.normal[0], meh3.normal[1]);
+ //}
+ d = mSphere.intersectRay(mRay, meh);
+ if (d > 0.0)
+ {
+ Mf::logDebug("sphere: d = %f", d);
+ Mf::logDebug(" P = <%f,%f>", meh.point[0], meh.point[1]);
+ Mf::logDebug(" n = <%f,%f>", meh.normal[0], meh.normal[1]);
+ }
+
+ std::list<Mf::Ray<2>::Intersection> hits;
+ if (mState.scene->castRay(mRay, hits))
+ {
+ Mf::logDebug("scene: d = %f", d);
+ Mf::logDebug(" P = <%f,%f>", hits.front().point[0], hits.front().point[1]);
+ Mf::logDebug(" n = <%f,%f>", hits.front().normal[0], hits.front().normal[1]);
+ }