}
- bool intersect_ray(const ray<2>& ray, ray<2>::contact& hit) const
+ bool intersect_ray(const ray<2>& ray, moof::ray<2>::contact& hit) const
{
vector2 v1 = a - ray.point;
scalar a1 = signed_angle_2D(v1, b - ray.point);
polygon() {}
- bool intersect_ray(const ray<D>& ray, typename ray<D>::contact& hit)
+ bool intersect_ray(const ray<D>& ray,
+ typename moof::ray<D>::contact& hit)
{
return false;
}
d(scalar) {}
- bool intersect_ray(const ray<3>& ray, ray<3>::contact& hit)
+ bool intersect_ray(const ray3& ray, ray3::contact& hit)
{
// solve: [(ray.point + t*ray.direction) dot normal] + d = 0
* returned if there is no contact.
*/
virtual bool intersect_ray(const ray<D>& ray,
- typename ray<D>::contact& hit) const
+ typename moof::ray<D>::contact& hit) const
{
return false;
}
}
// a ray inside the sphere will not intersect on its way out
- bool intersect(const ray<D>& ray, typename ray<D>::contact& hit) const
+ bool intersect(const ray<D>& ray,
+ typename moof::ray<D>::contact& hit) const
{
vector b = point - ray.point;
scalar z = dot(b, ray.direction);