{
Vec3f diff = m_a - ray.origin();
float t = diff.dot(m_n) / ray.direction().dot(m_n);
- if (t < 1e-5 || t > ray.t())
+ if (t < Epsilon || t > ray.t())
return false;
+
ray.setT(t);
+ ray.setHit(this);
+
return true;
}
Vec3f
InfinitePlane::GetNormal(Ray& ray)
{
- return Vec3f();
+ return m_n;
}